opik 1.9.49 → 1.9.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +27 -27
- package/dist/index.d.cts +409 -394
- package/dist/index.d.ts +409 -394
- package/dist/index.js +25 -25
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Bu=require('fs'),Xh=require('ini');require('dotenv/config');var Bb=require('qs'),uuid=require('uuid'),xR=require('fast-json-stable-stringify'),bR=require('xxhash-wasm'),util=require('util'),vR=require('mustache'),AR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),PR=require('fast-deep-equal'),async_hooks=require('async_hooks'),hn=require('chalk'),BR=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 Bu__default=/*#__PURE__*/_interopDefault(Bu);var Xh__default=/*#__PURE__*/_interopDefault(Xh);var Bb__default=/*#__PURE__*/_interopDefault(Bb);var xR__default=/*#__PURE__*/_interopDefault(xR);var bR__default=/*#__PURE__*/_interopDefault(bR);var vR__default=/*#__PURE__*/_interopDefault(vR);var AR__default=/*#__PURE__*/_interopDefault(AR);var PR__default=/*#__PURE__*/_interopDefault(PR);var hn__default=/*#__PURE__*/_interopDefault(hn);var BR__default=/*#__PURE__*/_interopDefault(BR);var LR__default=/*#__PURE__*/_interopDefault(LR);var Iu=Object.create;var ur=Object.defineProperty;var Uu=Object.getOwnPropertyDescriptor;var Ih=Object.getOwnPropertyNames;var Uh=Object.getPrototypeOf,Dh=Object.prototype.hasOwnProperty;var Du=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),Or=a=>{throw TypeError(a)};var Mh=(a,t,e)=>t in a?ur(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var An=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)ur(a,e,{get:t[e],enumerable:true});},Nh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ih(t))!Dh.call(a,i)&&i!==e&&ur(a,i,{get:()=>t[i],enumerable:!(o=Uu(t,i))||o.enumerable});return a};var Fh=(a,t,e)=>(e=a!=null?Iu(Uh(a)):{},Nh(ur(e,"default",{value:a,enumerable:true}),a));var Mu=a=>{var t;return [,,,Iu((t=void 0)!=null?t:null)]},Nu=["class","method","getter","setter","accessor","field","value","get","set"],Fr=a=>a!==void 0&&typeof a!="function"?Or("Function expected"):a,Oh=(a,t,e,o,i)=>({kind:Nu[a],name:t,metadata:o,addInitializer:n=>e._?Or("Already initialized"):i.push(Fr(n||null))}),Tn=(a,t)=>Mh(t,Du("metadata"),a[3]),Fu=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},Ou=(a,t,e,o,i,n)=>{var d,u,g,f,y=t&7,z=false,v=false,S=2,O=Nu[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),Uu(i,e));for(var dr=o.length-1;dr>=0;dr--)g=Oh(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),d=(0, o[dr])(te[O],g),u._=1,Fr(d)&&(te[O]=d);return te&&ur(i,e,te),i};var xg={};E(xg,{Node18UniversalStreamWrapper:()=>Kn});var Kn,Rg=An(()=>{Kn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var yg={};E(yg,{UndiciStreamWrapper:()=>Gn});var Gn,kg=An(()=>{Gn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var zg={};E(zg,{NodePre18StreamWrapper:()=>$n});var $n,vg=An(()=>{$n=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var Ig=Y((FD,jg)=>{var Cg=ue("stream").Stream,Xb=ue("util");jg.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=[];}Xb.inherits(we,Cg);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=Cg.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 Ng=Y((OD,Mg)=>{var Kb=ue("util"),Dg=ue("stream").Stream,Ug=Ig();Mg.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;}Kb.inherits(V,Dg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof Ug)){var e=Ug.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return Dg.prototype.pipe.call(this,a,t),this.resume(),a};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var Fg=Y((WD,Gb)=>{Gb.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 Wg=Y((BD,Og)=>{Og.exports=Fg();});var Vg=Y(ie=>{var xi=Wg(),$b=ue("path").extname,Bg=/^\s*([^;\s]*)(?:;|\s|$)/,Qb=/^text\//i;ie.charset=Lg;ie.charsets={lookup:Lg};ie.contentType=Yb;ie.extension=Zb;ie.extensions=Object.create(null);ie.lookup=qb;ie.types=Object.create(null);ex(ie.extensions,ie.types);function Lg(a){if(!a||typeof a!="string")return false;var t=Bg.exec(a),e=t&&xi[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&Qb.test(t[1])?"UTF-8":false}function Yb(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function Zb(a){if(!a||typeof a!="string")return false;var t=Bg.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function qb(a){if(!a||typeof a!="string")return false;var t=$b("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function ex(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(xi).forEach(function(i){var n=xi[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var d=0;d<c.length;d++){var u=c[d];if(t[u]){var g=e.indexOf(xi[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Jg=Y((VD,Hg)=>{Hg.exports=rx;function rx(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var Qn=Y((HD,Kg)=>{var Xg=Jg();Kg.exports=ox;function ox(a){var t=false;return Xg(function(){t=true;}),function(o,i){t?a(o,i):Xg(function(){a(o,i);});}}});var Yn=Y((JD,Gg)=>{Gg.exports=tx;function tx(a){Object.keys(a.jobs).forEach(ix.bind(a)),a.jobs={};}function ix(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var Zn=Y((XD,Qg)=>{var $g=Qn(),ax=Yn();Qg.exports=nx;function nx(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=sx(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?ax(e):e.results[i]=c,o(n,e.results));});}function sx(a,t,e,o){var i;return a.length==2?i=a(e,$g(o)):i=a(e,t,$g(o)),i}});var qn=Y((KD,Yg)=>{Yg.exports=px;function px(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var es=Y((GD,Zg)=>{var cx=Yn(),lx=Qn();Zg.exports=mx;function mx(a){Object.keys(this.jobs).length&&(this.index=this.size,cx(this),lx(a)(null,this.results));}});var ef=Y(($D,qg)=>{var dx=Zn(),ux=qn(),gx=es();qg.exports=fx;function fx(a,t,e){for(var o=ux(a);o.index<(o.keyedList||a).length;)dx(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return gx.bind(o,e)}});var rs=Y((QD,Ri)=>{var rf=Zn(),hx=qn(),wx=es();Ri.exports=bx;Ri.exports.ascending=of;Ri.exports.descending=xx;function bx(a,t,e,o){var i=hx(a,e);return rf(a,t,i,function n(c,d){if(c){o(c,d);return}if(i.index++,i.index<(i.keyedList||a).length){rf(a,t,i,n);return}o(null,i.results);}),wx.bind(i,o)}function of(a,t){return a<t?-1:a>t?1:0}function xx(a,t){return -1*of(a,t)}});var af=Y((YD,tf)=>{var Rx=rs();tf.exports=yx;function yx(a,t,e){return Rx(a,t,null,e)}});var sf=Y((ZD,nf)=>{nf.exports={parallel:ef(),serial:af(),serialOrdered:rs()};});var cf=Y((qD,pf)=>{pf.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var mf=Y((eM,lf)=>{var as=Ng(),kx=ue("util"),os=ue("path"),zx=ue("http"),vx=ue("https"),Sx=ue("url").parse,_x=ue("fs"),Ax=ue("stream").Stream,ts=Vg(),Tx=sf(),is=cf();lf.exports=C;kx.inherits(C,as);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],as.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
|
|
2
|
-
`;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=as.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Ax))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):_x.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&is(c,e.header);var d;for(var u in c)c.hasOwnProperty(u)&&(d=c[u],d!=null&&(Array.isArray(d)||(d=[d]),d.length&&(n+=u+": "+d.join("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=os.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=os.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=os.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=ts.lookup(a.name)),!e&&a.path&&(e=ts.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=ts.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}Tx.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=Sx(a),o=is({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=is(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=vx.request(o):e=zx.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),t){var d,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",d),t.call(this,g,f)};d=u.bind(this,null),e.on("error",u),e.on("response",d);}}.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 Hh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function ai(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Wu=a=>{k.settings.minLevel=Hh[a];},Jh=()=>{k.settings.minLevel=100;};Wu(process.env.OPIK_LOG_LEVEL||"INFO");var Kh="~/.opik.config",Pn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Lu(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function Gh(){return Lu({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 $h(){let a=process.env.OPIK_CONFIG_PATH||Kh;if(!Bu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=Xh__default.default.parse(Bu__default.default.readFileSync(a,"utf8"));return t.opik?Lu({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Vu(a){let t=Gh(),e=$h(),{headers:o,...i}=a||{};return Qh({...Pn,...e,...t,...i})}function Qh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=Yh(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function Yh(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>Zh,AlertPublicAlertType:()=>nw,AlertTriggerConfigPublicType:()=>iw,AlertTriggerConfigType:()=>ew,AlertTriggerConfigWriteType:()=>rw,AlertTriggerEventType:()=>qh,AlertTriggerPublicEventType:()=>aw,AlertTriggerWriteEventType:()=>ow,AlertWriteAlertType:()=>tw,AnnotationQueuePublicScope:()=>lw,AnnotationQueueScope:()=>pw,AnnotationQueueWriteScope:()=>cw,AssistantMessageRole:()=>Ew,AttachmentListRequestEntityType:()=>Ju,BadRequestError:()=>_,CheckName:()=>Qw,CheckPublicName:()=>Db,CheckPublicResult:()=>Mb,CheckResult:()=>Yw,ColumnCompareTypesItem:()=>Fw,ColumnPublicTypesItem:()=>Kw,ColumnTypesItem:()=>Gw,CompleteMultipartUploadRequestEntityType:()=>mw,ConflictError:()=>N,CreatePromptVersionDetailTemplateStructure:()=>lg,DatasetItemCompareSource:()=>Ow,DatasetItemFilterOperator:()=>Cw,DatasetItemPublicSource:()=>Jw,DatasetItemSource:()=>Uw,DatasetItemWriteSource:()=>Jn,DatasetPublicStatus:()=>Hw,DatasetPublicVisibility:()=>Vw,DatasetStatus:()=>Iw,DatasetUpdateVisibility:()=>Qu,DatasetVisibility:()=>jw,DatasetWriteVisibility:()=>$u,DeleteAttachmentsRequestEntityType:()=>dw,DownloadAttachmentRequestEntityType:()=>Xu,ExperimentItemCompareTraceVisibilityMode:()=>Ww,ExperimentItemPublicTraceVisibilityMode:()=>Xw,ExperimentItemTraceVisibilityMode:()=>Dw,ExperimentPublicStatus:()=>tb,ExperimentPublicType:()=>ob,ExperimentStatus:()=>$w,ExperimentType:()=>Xn,ExperimentUpdateStatus:()=>eg,ExperimentUpdateType:()=>qu,ExperimentWriteStatus:()=>Zu,ExperimentWriteType:()=>Yu,FeedbackScoreBatchItemSource:()=>Ub,FeedbackScoreBatchItemThreadSource:()=>Ob,FeedbackScoreCompareSource:()=>Bw,FeedbackScoreExperimentItemBulkWriteViewSource:()=>qw,FeedbackScorePublicSource:()=>Cb,FeedbackScoreSource:()=>Mw,FindFeedbackDefinitionsRequestType:()=>rg,FindFeedbackScoreNames1RequestType:()=>dg,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>ug,GetSpansByProjectRequestType:()=>mg,GetWebhookExamplesRequestAlertType:()=>Hu,GuardrailName:()=>ib,GuardrailResult:()=>ab,GuardrailWriteName:()=>nb,GuardrailWriteResult:()=>sb,LlmAsJudgeMessagePublicRole:()=>zw,LlmAsJudgeMessageRole:()=>uw,LlmAsJudgeMessageWriteRole:()=>bw,LlmAsJudgeOutputSchemaPublicType:()=>vw,LlmAsJudgeOutputSchemaType:()=>gw,LlmAsJudgeOutputSchemaWriteType:()=>xw,LogItemLevel:()=>Tw,ManualEvaluationRequestEntityType:()=>lb,NotFoundError:()=>A,NotImplementedError:()=>Je,OptimizationPublicStatus:()=>ub,OptimizationStatus:()=>mb,OptimizationUpdateStatus:()=>tg,OptimizationWriteStatus:()=>db,ProjectDetailedVisibility:()=>bb,ProjectMetricRequestPublicInterval:()=>sg,ProjectMetricRequestPublicMetricType:()=>ng,ProjectMetricResponsePublicInterval:()=>wb,ProjectMetricResponsePublicMetricType:()=>hb,ProjectPublicVisibility:()=>fb,ProjectUpdateVisibility:()=>ag,ProjectVisibility:()=>gb,ProjectWriteVisibility:()=>ig,PromptDetailTemplateStructure:()=>Sb,PromptPublicTemplateStructure:()=>Tb,PromptTemplateStructure:()=>Rb,PromptType:()=>xb,PromptVersionDetailTemplateStructure:()=>vb,PromptVersionDetailType:()=>zb,PromptVersionPublicTemplateStructure:()=>Ab,PromptVersionPublicType:()=>_b,PromptVersionTemplateStructure:()=>kb,PromptVersionType:()=>yb,PromptWriteTemplateStructure:()=>cg,PromptWriteType:()=>pg,ProviderApiKeyProvider:()=>cb,ProviderApiKeyPublicProvider:()=>pb,ProviderApiKeyWriteProvider:()=>og,ResponseFormatType:()=>Pw,SpanExperimentItemBulkWriteViewType:()=>eb,SpanFilterOperator:()=>fw,SpanFilterPublicOperator:()=>Sw,SpanFilterWriteOperator:()=>Rw,SpanPublicType:()=>jb,SpanSearchStreamRequestPublicType:()=>gg,SpanType:()=>ve,SpanUpdateType:()=>Eb,SpanWriteType:()=>Pb,StartMultipartUploadRequestEntityType:()=>Ku,TraceFilterOperator:()=>hw,TraceFilterPublicOperator:()=>_w,TraceFilterWriteOperator:()=>yw,TracePublicVisibilityMode:()=>Nb,TraceThreadFilterOperator:()=>ww,TraceThreadFilterPublicOperator:()=>Aw,TraceThreadFilterWriteOperator:()=>kw,TraceThreadStatus:()=>Fb,TraceVisibilityMode:()=>Zw,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>Gu,ValueEntryCompareSource:()=>Lw,ValueEntryExperimentItemBulkWriteViewSource:()=>rb,ValueEntryPublicSource:()=>Ib,ValueEntrySource:()=>Nw,WebhookTestResultStatus:()=>sw,alerts:()=>ni,annotationQueues:()=>jn,attachments:()=>si,automationRuleEvaluators:()=>Un,chatCompletions:()=>Dn,check:()=>In,dashboards:()=>Mn,datasets:()=>pi,experiments:()=>ci,feedbackDefinitions:()=>li,guardrails:()=>Nn,llmProviderKey:()=>mi,manualEvaluation:()=>Fn,openTelemetryIngestion:()=>On,optimizations:()=>di,projects:()=>ui,prompts:()=>gi,redirect:()=>Hn,serviceToggles:()=>Wn,spans:()=>fi,systemUsage:()=>Cn,traces:()=>Bn,welcomeWizard:()=>Ln,workspaces:()=>Vn});var ni={};E(ni,{GetWebhookExamplesRequestAlertType:()=>Hu});var Hu={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var si={};E(si,{AttachmentListRequestEntityType:()=>Ju,DownloadAttachmentRequestEntityType:()=>Xu,StartMultipartUploadRequestEntityType:()=>Ku,UploadAttachmentRequestEntityType:()=>Gu});var Ju={Trace:"trace",Span:"span"};var Xu={Trace:"trace",Span:"span"};var Ku={Trace:"trace",Span:"span"};var Gu={Trace:"trace",Span:"span"};var pi={};E(pi,{DatasetUpdateVisibility:()=>Qu,DatasetWriteVisibility:()=>$u});var $u={Private:"private",Public:"public"};var Qu={Private:"private",Public:"public"};var ci={};E(ci,{ExperimentUpdateStatus:()=>eg,ExperimentUpdateType:()=>qu,ExperimentWriteStatus:()=>Zu,ExperimentWriteType:()=>Yu});var Yu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Zu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var qu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var eg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var li={};E(li,{FindFeedbackDefinitionsRequestType:()=>rg});var rg={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var mi={};E(mi,{ProviderApiKeyWriteProvider:()=>og});var og={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var di={};E(di,{OptimizationUpdateStatus:()=>tg});var tg={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var ui={};E(ui,{ProjectMetricRequestPublicInterval:()=>sg,ProjectMetricRequestPublicMetricType:()=>ng,ProjectUpdateVisibility:()=>ag,ProjectWriteVisibility:()=>ig});var ig={Private:"private",Public:"public"};var ag={Private:"private",Public:"public"};var ng={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 sg={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var gi={};E(gi,{CreatePromptVersionDetailTemplateStructure:()=>lg,PromptWriteTemplateStructure:()=>cg,PromptWriteType:()=>pg});var pg={Mustache:"mustache",Jinja2:"jinja2"};var cg={Text:"text",Chat:"chat"};var lg={Text:"text",Chat:"chat"};var fi={};E(fi,{FindFeedbackScoreNames1RequestType:()=>dg,GetSpanStatsRequestType:()=>ug,GetSpansByProjectRequestType:()=>mg,SpanSearchStreamRequestPublicType:()=>gg});var mg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var dg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ug={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var gg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Cn={};var jn={};var In={};var Un={};var Dn={};var Mn={};var Nn={};var Fn={};var On={};var Wn={};var Bn={};var Ln={};var Vn={};var Hn={};var Zh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var qh={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 ew={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var rw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var ow={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 tw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var iw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var aw={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 nw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var sw={Success:"success",Failure:"failure"};var pw={Trace:"trace",Thread:"thread"};var cw={Trace:"trace",Thread:"thread"};var lw={Trace:"trace",Thread:"thread"};var mw={Trace:"trace",Span:"span"};var dw={Trace:"trace",Span:"span"};var uw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var gw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var fw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var hw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var ww={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 bw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var xw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};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 yw={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 kw={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 zw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var vw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var Sw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var _w={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Aw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Tw={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var Ew={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var Pw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var Cw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var jw={Private:"private",Public:"public"};var Iw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Uw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Dw={Default:"default",Hidden:"hidden"};var Mw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Nw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Jn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Fw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ow={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Ww={Default:"default",Hidden:"hidden"};var Bw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Vw={Private:"private",Public:"public"};var Hw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Jw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Xw={Default:"default",Hidden:"hidden"};var Kw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Gw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Xn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var $w={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Qw={Topic:"TOPIC",Pii:"PII"};var Yw={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Zw={Default:"default",Hidden:"hidden"};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={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var tb={Running:"running",Completed:"completed",Cancelled:"cancelled"};var ib={Topic:"TOPIC",Pii:"PII"};var ab={Passed:"passed",Failed:"failed"};var nb={Topic:"TOPIC",Pii:"PII"};var sb={Passed:"passed",Failed:"failed"};var pb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var cb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var lb={Trace:"trace",Thread:"thread",Span:"span"};var mb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var db={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var ub={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var gb={Private:"private",Public:"public"};var fb={Private:"private",Public:"public"};var hb={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 wb={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var bb={Private:"private",Public:"public"};var xb={Mustache:"mustache",Jinja2:"jinja2"};var Rb={Text:"text",Chat:"chat"};var yb={Mustache:"mustache",Jinja2:"jinja2"};var kb={Text:"text",Chat:"chat"};var zb={Mustache:"mustache",Jinja2:"jinja2"};var vb={Text:"text",Chat:"chat"};var Sb={Text:"text",Chat:"chat"};var _b={Mustache:"mustache",Jinja2:"jinja2"};var Ab={Text:"text",Chat:"chat"};var Tb={Text:"text",Chat:"chat"};var Eb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Pb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Cb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var jb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ib={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ub={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Db={Topic:"TOPIC",Pii:"PII"};var Mb={Passed:"passed",Failed:"failed"};var Nb={Default:"default",Hidden:"hidden"};var Fb={Active:"active",Inactive:"inactive"};var Ob={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ue=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Wb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Wb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ue(e,void 0,2)}`),o.join(`
|
|
3
|
-
`)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var N=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Je=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var Wr;typeof globalThis.Headers!="undefined"?Wr=globalThis.Headers:Wr=class fg{constructor(t){if(this.headers=new Map,t)if(t instanceof fg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var hi={headers:new Wr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},wi={headers:new Wr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function bi(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function hg(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${Bb__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var m=Lb();function Lb(){var u,g,f,y,z;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((f=self.constructor)==null?void 0:f.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((z=process.versions)!=null&&z.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function wg(){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?fetch:m.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function bg({body:a,type:t}){return t.includes("json")?Ue(a):a}async function Sg(a){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?new(await Promise.resolve().then(()=>(Rg(),xg))).Node18UniversalStreamWrapper(a):m.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(kg(),yg))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(vg(),zg))).NodePre18StreamWrapper(a)}async function _g(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return Sg(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Vb="timeout";function Ag(a){let t=new AbortController,e=setTimeout(()=>t.abort(Vb),a);return {signal:t.signal,abortId:e}}function Tg(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var Eg=async(a,t,e,o,i,n,c,d,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=Ag(n);f=S,g.push(v);}c!=null&&g.push(c);let y=Tg(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:d?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function Hb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function Pg(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=Hb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Jb(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=hg(a.url,a.queryParameters),o=await bg({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await wg();try{let n=await Pg(async()=>Eg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await _g(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:bi(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:bi(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:hi}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:hi}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:wi}:{ok:false,error:{reason:"unknown",errorMessage:Ue(n)},rawResponse:wi}}}var x=Jb;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function cs(a){return typeof a=="object"&&a!=null&&"name"in a}function ls(a){return typeof a=="object"&&a!=null&&"path"in a}function ms(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function df(){let a;return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?a=new ns:m.type==="node"?a=new ss:a=new ps,await a.setup(),a}var ns=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(cs(t))return t.name;if(ls(t)&&t.path)return ms(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},ss=class{async setup(){this.fd=new(await Promise.resolve().then(()=>Fh(mf()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(cs(t))return t.name;if(ls(t)&&t.path)return ms(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},ps=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(cs(t))return t.name;if(ls(t)&&t.path)return ms(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>gr,ParseError:()=>fr,any:()=>Af,bigint:()=>gf,boolean:()=>Tf,booleanLiteral:()=>_f,date:()=>ff,discriminant:()=>Nf,enum_:()=>ki,getObjectLikeUtils:()=>be,getObjectUtils:()=>Xe,getSchemaUtils:()=>D,isProperty:()=>Me,lazy:()=>hf,lazyObject:()=>zf,list:()=>vi,number:()=>Ef,object:()=>zi,objectWithoutOptionalProperties:()=>kf,optional:()=>ds,property:()=>bf,record:()=>If,set:()=>Uf,string:()=>Pf,stringLiteral:()=>Sf,transform:()=>us,undiscriminatedUnion:()=>Mf,union:()=>Of,unknown:()=>Cf,withParsedProperties:()=>fs});var T={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function U(a,t){return `Expected ${t}. Received ${Ex(a)}.`}function Ex(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:uf(a.json),parse:uf(a.parse)}}function uf(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
|
|
4
|
-
`)),{ok:true,value:t}):o}}function yi(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var gr=class a extends Error{constructor(e){super(e.map(yi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var fr=class a extends Error{constructor(e){super(e.map(yi).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>Px(a),optional:()=>ds(a),optionalNullable:()=>Cx(a),transform:t=>us(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new fr(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new gr(o.errors)}}}function Px(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.NULLABLE};return {...t,...D(t)}}function ds(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL};return {...t,...D(t)}}function Cx(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL_NULLABLE};return {...t,...D(t)}}function us(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function gf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>T.BIGINT};return {...Q(a),...D(a)}}var jx=/^([+-]?\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 ff(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:jx.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function ki(a){let t=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function hf(a){let t=gs(a);return {...t,...D(t)}}function gs(a){return {parse:(t,e)=>hr(a).parse(t,e),json:(t,e)=>hr(a).json(t,e),getType:()=>hr(a).getType()}}function hr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Br(a){return Object.entries(a)}function Lr(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function De(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Vr(a){return Object.keys(a)}function wf(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>fs(a,t)}}function fs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((d,[u,g])=>({...d,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var d;if(!De(o))return {ok:false,errors:[{path:(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Lr(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function bf(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function Me(a){return a.isProperty}function zi(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>Me(o)?o.rawKey:e),_getParsedProperties:()=>Vr(a),parse:(e,o)=>{let i={},n=[];for(let[c,d]of Br(a)){let u=Me(d)?d.rawKey:c,g=Me(d)?d.valueSchema:d,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,yf(g)&&n.push(u);}return xf({value:e,requiredKeys:n,getProperty:c=>{let d=i[c];if(d!=null)return {transformedKey:d.parsedKey,transform:u=>{var g;return d.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let i=[];for(let[n,c]of Br(a)){let d=Me(c)?c.valueSchema:c;yf(d)&&i.push(n);}return xf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return Me(c)?{transformedKey:c.rawKey,transform:d=>{var u;return c.valueSchema.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:d=>{var u;return c.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>T.OBJECT};return {...Q(t),...D(t),...be(t),...Xe(t)}}function xf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!De(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),d=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,d.push(...z.errors));}else switch(o){case "fail":d.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return d.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),d.length===0||i?{ok:true,value:u}:{ok:false,errors:d}}function Xe(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>Rf({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>Rf({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>T.OBJECT};return {...e,...D(e),...be(e),...Xe(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>T.OBJECT};return {...t,...D(t),...be(t),...Xe(t)}}}}function Rf({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=wf(Vr(t),g=>i.has(g)),d=e(Lr(t,c)),u=o(Lr(t,n));return d.ok&&u.ok?{ok:true,value:{...d.value,...u.value}}:{ok:false,errors:[...d.ok?[]:d.errors,...u.ok?[]:u.errors]}}function yf(a){return !Ix(a)}function Ix(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function kf(a){return zi(a)}function zf(a){let t={...gs(a),_getRawProperties:()=>hr(a)._getRawProperties(),_getParsedProperties:()=>hr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...Xe(t)}}function vi(a){let t={parse:(e,o)=>vf(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>vf(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(t),...D(t)}}function vf(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function Sf(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 _f(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 Af=q(T.ANY,a=>({ok:true,value:a}));var Tf=q(T.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var Ef=q(T.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var Pf=q(T.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var Cf=q(T.UNKNOWN,a=>({ok:true,value:a}));function If(a,t){let e={parse:(o,i)=>jf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.parse(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>jf({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.json(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...D(e)}}function jf({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return De(a)?Br(a).reduce((n,[c,d])=>{if(d===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(d,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function Uf(a){let t=vi(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...D(e)}}function Mf(a){let t={parse:(e,o)=>Df((i,n)=>i.parse(e,n),a,o),json:(e,o)=>Df((i,n)=>i.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function Df(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let d of c.errors)o.push({path:d.path,message:`[Variant ${i}] ${d.message}`});}return {ok:false,errors:o}}function Nf(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function Of(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=ki(Vr(t)),n={parse:(c,d)=>Ff({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),json:(c,d)=>Ff({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),getType:()=>T.UNION};return {...Q(n),...D(n),...be(n)}}function Ff({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:d=[]}){if(!De(a))return {ok:false,errors:[{path:d,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:d,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...d,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function Ux(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),Ux(a)}var j={};E(j,{AggregationData:()=>sm,Alert:()=>Wx,AlertAlertType:()=>pp,AlertPagePublic:()=>_p,AlertPublic:()=>it,AlertPublicAlertType:()=>Rp,AlertTrigger:()=>up,AlertTriggerConfig:()=>dp,AlertTriggerConfigPublic:()=>vp,AlertTriggerConfigPublicType:()=>zp,AlertTriggerConfigType:()=>mp,AlertTriggerConfigWrite:()=>fp,AlertTriggerConfigWriteType:()=>gp,AlertTriggerEventType:()=>lp,AlertTriggerPublic:()=>Sp,AlertTriggerPublicEventType:()=>kp,AlertTriggerWrite:()=>wp,AlertTriggerWriteEventType:()=>hp,AlertWrite:()=>tt,AlertWriteAlertType:()=>bp,AnnotationQueue:()=>jp,AnnotationQueueBatch:()=>Lx,AnnotationQueueBatchWrite:()=>$o,AnnotationQueueItemIds:()=>ga,AnnotationQueuePagePublic:()=>Dp,AnnotationQueuePublic:()=>at,AnnotationQueuePublicScope:()=>Ip,AnnotationQueueReviewer:()=>Cp,AnnotationQueueReviewerPublic:()=>Up,AnnotationQueueScope:()=>Pp,AnnotationQueueUpdate:()=>Qo,AnnotationQueueWrite:()=>Go,AnnotationQueueWriteScope:()=>Ks,AssistantMessage:()=>Zc,AssistantMessageRole:()=>Yc,Attachment:()=>Mp,AttachmentListRequestEntityType:()=>Ai,AttachmentPage:()=>Np,AudioUrl:()=>Hp,AudioUrlPublic:()=>_c,AudioUrlWrite:()=>ic,AuthDetailsHolder:()=>Lp,AutomationRuleEvaluator:()=>Hx,AutomationRuleEvaluatorLlmAsJudge:()=>Yp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ft,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>dc,AutomationRuleEvaluatorObjectObjectPublic:()=>Fc,AutomationRuleEvaluatorPagePublic:()=>Oc,AutomationRuleEvaluatorPublic:()=>Wc,AutomationRuleEvaluatorSpanLlmAsJudge:()=>oc,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>xt,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>fc,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>tc,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Rt,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>wc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>qp,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>wt,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Rc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>ec,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>bt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>kc,AutomationRuleEvaluatorUpdate:()=>Qc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Hc,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Gc,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>$c,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>Xc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Kc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Jc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Zp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>ht,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>vc,AutomationRuleEvaluatorWrite:()=>Sc,AvgValueStatPublic:()=>Al,BatchDelete:()=>B,BatchDeleteByProject:()=>lR,BiInformation:()=>tp,BiInformationResponse:()=>Rr,BooleanFeedbackDefinition:()=>dm,BooleanFeedbackDefinitionCreate:()=>xm,BooleanFeedbackDefinitionPublic:()=>Et,BooleanFeedbackDefinitionUpdate:()=>Dm,BooleanFeedbackDetail:()=>mm,BooleanFeedbackDetailCreate:()=>bm,BooleanFeedbackDetailPublic:()=>_m,BooleanFeedbackDetailUpdate:()=>Um,CategoricalFeedbackDefinition:()=>gm,CategoricalFeedbackDefinitionCreate:()=>ym,CategoricalFeedbackDefinitionPublic:()=>Pt,CategoricalFeedbackDefinitionUpdate:()=>Nm,CategoricalFeedbackDetail:()=>um,CategoricalFeedbackDetailCreate:()=>Rm,CategoricalFeedbackDetailPublic:()=>Am,CategoricalFeedbackDetailUpdate:()=>Mm,ChatCompletionChoice:()=>el,ChatCompletionRequest:()=>Zo,ChatCompletionResponse:()=>il,Check:()=>Gl,CheckName:()=>Xl,CheckPublic:()=>su,CheckPublicName:()=>au,CheckPublicResult:()=>nu,CheckResult:()=>Kl,ChunkedOutputJsonNode:()=>Gx,ChunkedOutputJsonNodePublic:()=>Zx,ChunkedOutputJsonNodePublicType:()=>lm,ChunkedOutputJsonNodeType:()=>Wl,Column:()=>Fl,ColumnCompare:()=>dl,ColumnCompareTypesItem:()=>ml,ColumnPublic:()=>Dl,ColumnPublicTypesItem:()=>Ul,ColumnTypesItem:()=>Nl,Comment:()=>H,CommentCompare:()=>ul,CommentPublic:()=>sr,CompleteMultipartUploadRequest:()=>fa,CompleteMultipartUploadRequestEntityType:()=>Fp,CompletionTokensDetails:()=>ol,CountValueStatPublic:()=>Tl,CreateDatasetItemsFromSpansRequest:()=>$r,CreateDatasetItemsFromTracesRequest:()=>Qr,CreatePromptVersionDetail:()=>_o,CreatePromptVersionDetailTemplateStructure:()=>ea,DashboardPagePublic:()=>al,DashboardPublic:()=>nr,DashboardUpdatePublic:()=>et,DashboardWrite:()=>qo,DataPointDouble:()=>mR,DataPointNumberPublic:()=>Sd,Dataset:()=>Jx,DatasetExpansion:()=>Kx,DatasetExpansionResponse:()=>ll,DatasetExpansionWrite:()=>eo,DatasetIdentifier:()=>Zr,DatasetIdentifierPublic:()=>ro,DatasetItem:()=>kt,DatasetItemBatch:()=>Xx,DatasetItemBatchUpdate:()=>Jr,DatasetItemBatchWrite:()=>Gr,DatasetItemCompare:()=>yl,DatasetItemCompareSource:()=>gl,DatasetItemFilter:()=>ws,DatasetItemFilterOperator:()=>hs,DatasetItemPageCompare:()=>kl,DatasetItemPagePublic:()=>Ml,DatasetItemPublic:()=>St,DatasetItemPublicSource:()=>jl,DatasetItemSource:()=>cl,DatasetItemStreamRequest:()=>oo,DatasetItemUpdate:()=>bs,DatasetItemWrite:()=>Kr,DatasetItemWriteSource:()=>xs,DatasetItemsDelete:()=>qr,DatasetPagePublic:()=>_l,DatasetPublic:()=>_r,DatasetPublicStatus:()=>vl,DatasetPublicVisibility:()=>zl,DatasetStatus:()=>sl,DatasetUpdate:()=>Yr,DatasetUpdateVisibility:()=>Ii,DatasetVersionCreatePublic:()=>io,DatasetVersionDiff:()=>Ll,DatasetVersionDiffStats:()=>Bl,DatasetVersionPagePublic:()=>Vl,DatasetVersionPublic:()=>Ar,DatasetVersionRestorePublic:()=>ao,DatasetVersionSummary:()=>pl,DatasetVersionSummaryPublic:()=>Sl,DatasetVersionTag:()=>to,DatasetVersionUpdatePublic:()=>no,DatasetVisibility:()=>nl,DatasetWrite:()=>Xr,DatasetWriteVisibility:()=>ji,DeleteAttachmentsRequest:()=>Vx,DeleteAttachmentsRequestEntityType:()=>Wp,DeleteFeedbackScore:()=>Nt,DeleteIdsHolder:()=>Tr,DeleteThreadFeedbackScores:()=>Vo,DeleteTraceThreads:()=>Ho,Delta:()=>qc,DownloadAttachmentRequestEntityType:()=>Ti,ErrorCountWithDeviation:()=>Dt,ErrorCountWithDeviationDetailed:()=>jd,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>mo,ErrorInfoPublic:()=>Ft,ErrorInfoWrite:()=>Po,ErrorMessage:()=>ae,ErrorMessageDetail:()=>sR,ErrorMessageDetailed:()=>aR,ErrorMessagePublic:()=>Bx,Experiment:()=>$x,ExperimentGroupAggregationsResponse:()=>cm,ExperimentGroupResponse:()=>nm,ExperimentItem:()=>po,ExperimentItemBulkRecord:()=>Zl,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Us,ExperimentItemBulkUpload:()=>Qx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>uo,ExperimentItemCompare:()=>Rl,ExperimentItemCompareTraceVisibilityMode:()=>xl,ExperimentItemPublic:()=>vt,ExperimentItemPublicTraceVisibilityMode:()=>Il,ExperimentItemStreamRequest:()=>ho,ExperimentItemTraceVisibilityMode:()=>_s,ExperimentItemsBatch:()=>co,ExperimentItemsDelete:()=>lo,ExperimentPagePublic:()=>om,ExperimentPublic:()=>Tt,ExperimentPublicStatus:()=>em,ExperimentPublicType:()=>ql,ExperimentScore:()=>go,ExperimentScorePublic:()=>rm,ExperimentScoreWrite:()=>ks,ExperimentStatus:()=>Jl,ExperimentStreamRequestPublic:()=>wo,ExperimentType:()=>Hl,ExperimentUpdate:()=>fo,ExperimentUpdateStatus:()=>Fi,ExperimentUpdateType:()=>Ni,ExperimentWrite:()=>so,ExperimentWriteStatus:()=>Mi,ExperimentWriteType:()=>Di,ExportTraceServiceRequest:()=>oR,Feedback:()=>qx,FeedbackCreate:()=>Sm,FeedbackDefinitionPagePublic:()=>Cm,FeedbackObjectPublic:()=>Pm,FeedbackPublic:()=>Im,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>Id,FeedbackScoreAveragePublic:()=>Qe,FeedbackScoreBatch:()=>Wt,FeedbackScoreBatchItem:()=>iu,FeedbackScoreBatchItemSource:()=>tu,FeedbackScoreBatchItemThread:()=>Js,FeedbackScoreBatchItemThreadSource:()=>Hs,FeedbackScoreBatchThread:()=>Jo,FeedbackScoreCompare:()=>bl,FeedbackScoreCompareSource:()=>fl,FeedbackScoreExperimentItemBulkWriteView:()=>Is,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Ps,FeedbackScoreNames:()=>vd,FeedbackScorePublic:()=>Pr,FeedbackScorePublicSource:()=>Zd,FeedbackScoreSource:()=>zs,FeedbackUpdate:()=>Bm,FindFeedbackDefinitionsRequestType:()=>Bi,FindFeedbackScoreNames1RequestType:()=>ta,Function:()=>Yo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>ia,GetSpansByProjectRequestType:()=>oa,GetWebhookExamplesRequestAlertType:()=>Si,GroupContent:()=>tm,GroupContentWithAggregations:()=>pm,GroupDetail:()=>im,GroupDetails:()=>am,Guardrail:()=>Hm,GuardrailBatch:()=>eR,GuardrailBatchWrite:()=>rt,GuardrailName:()=>Lm,GuardrailResult:()=>Vm,GuardrailWrite:()=>op,GuardrailWriteName:()=>ep,GuardrailWriteResult:()=>rp,GuardrailsValidation:()=>$l,GuardrailsValidationPublic:()=>pu,IdsHolder:()=>Yx,ImageUrl:()=>Kp,ImageUrlPublic:()=>Tc,ImageUrlWrite:()=>sc,JsonListString:()=>M,JsonListStringCompare:()=>ha,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Ns,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>Ys,LlmAsJudgeCode:()=>nt,LlmAsJudgeCodePublic:()=>jc,LlmAsJudgeCodeWrite:()=>mc,LlmAsJudgeMessage:()=>Ze,LlmAsJudgeMessageContent:()=>$p,LlmAsJudgeMessageContentPublic:()=>Pc,LlmAsJudgeMessageContentWrite:()=>cc,LlmAsJudgeMessagePublic:()=>ir,LlmAsJudgeMessagePublicRole:()=>Ac,LlmAsJudgeMessageRole:()=>Xp,LlmAsJudgeMessageWrite:()=>rr,LlmAsJudgeMessageWriteRole:()=>nc,LlmAsJudgeModelParameters:()=>Ye,LlmAsJudgeModelParametersPublic:()=>tr,LlmAsJudgeModelParametersWrite:()=>er,LlmAsJudgeOutputSchema:()=>qe,LlmAsJudgeOutputSchemaPublic:()=>ar,LlmAsJudgeOutputSchemaPublicType:()=>Cc,LlmAsJudgeOutputSchemaType:()=>Qp,LlmAsJudgeOutputSchemaWrite:()=>or,LlmAsJudgeOutputSchemaWriteType:()=>lc,LogItem:()=>Lc,LogItemLevel:()=>Bc,LogPage:()=>Vc,ManualEvaluationRequest:()=>Ut,ManualEvaluationRequestEntityType:()=>Gm,ManualEvaluationResponse:()=>It,Message:()=>Gs,MultipartUploadPart:()=>Op,NumericalFeedbackDefinition:()=>hm,NumericalFeedbackDefinitionCreate:()=>zm,NumericalFeedbackDefinitionPublic:()=>Ct,NumericalFeedbackDefinitionUpdate:()=>Om,NumericalFeedbackDetail:()=>fm,NumericalFeedbackDetailCreate:()=>km,NumericalFeedbackDetailPublic:()=>Tm,NumericalFeedbackDetailUpdate:()=>Fm,Optimization:()=>tR,OptimizationPagePublic:()=>Ra,OptimizationPublic:()=>Er,OptimizationPublicStatus:()=>md,OptimizationStatus:()=>$m,OptimizationStudioConfig:()=>od,OptimizationStudioConfigPublic:()=>bd,OptimizationStudioConfigWrite:()=>cd,OptimizationStudioLog:()=>xd,OptimizationUpdate:()=>Ro,OptimizationUpdateStatus:()=>Ji,OptimizationWrite:()=>xa,OptimizationWriteStatus:()=>ld,PageColumns:()=>Ol,PercentageValueStatPublic:()=>El,PercentageValues:()=>je,PercentageValuesDetailed:()=>Ud,PercentageValuesPublic:()=>zt,Project:()=>iR,ProjectDetailed:()=>Md,ProjectDetailedVisibility:()=>Dd,ProjectMetricRequestPublic:()=>zo,ProjectMetricRequestPublicInterval:()=>Qi,ProjectMetricRequestPublicMetricType:()=>$i,ProjectMetricResponsePublic:()=>Ed,ProjectMetricResponsePublicInterval:()=>Ad,ProjectMetricResponsePublicMetricType:()=>_d,ProjectPagePublic:()=>kd,ProjectPublic:()=>Mt,ProjectPublicVisibility:()=>yd,ProjectRetrieveDetailed:()=>vo,ProjectStatItemObjectPublic:()=>Cl,ProjectStatsPublic:()=>Ne,ProjectStatsSummary:()=>Cd,ProjectStatsSummaryItem:()=>Pd,ProjectUpdate:()=>ko,ProjectUpdateVisibility:()=>Gi,ProjectVisibility:()=>Rd,ProjectWrite:()=>yo,ProjectWriteVisibility:()=>Ki,Prompt:()=>nR,PromptDetail:()=>Vd,PromptDetailTemplateStructure:()=>Ld,PromptPagePublic:()=>Qd,PromptPublic:()=>$d,PromptPublicTemplateStructure:()=>Gd,PromptTemplateStructure:()=>Fd,PromptTokensDetails:()=>rl,PromptType:()=>Nd,PromptUpdatable:()=>To,PromptVersion:()=>Bd,PromptVersionBatchUpdate:()=>Ao,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Os,PromptVersionDetailType:()=>Fs,PromptVersionLink:()=>wa,PromptVersionLinkPublic:()=>ba,PromptVersionLinkWrite:()=>Wi,PromptVersionPagePublic:()=>Kd,PromptVersionPublic:()=>Xd,PromptVersionPublicTemplateStructure:()=>Jd,PromptVersionPublicType:()=>Hd,PromptVersionRetrieveDetail:()=>Eo,PromptVersionTemplateStructure:()=>Wd,PromptVersionType:()=>Od,PromptVersionUpdate:()=>Ws,PromptWrite:()=>So,PromptWriteTemplateStructure:()=>qi,PromptWriteType:()=>Zi,ProviderApiKey:()=>rR,ProviderApiKeyPagePublic:()=>Xm,ProviderApiKeyProvider:()=>Km,ProviderApiKeyPublic:()=>jt,ProviderApiKeyPublicProvider:()=>Jm,ProviderApiKeyUpdate:()=>xo,ProviderApiKeyWrite:()=>bo,ProviderApiKeyWriteProvider:()=>Vi,ResponseFormat:()=>Zs,ResponseFormatType:()=>Qs,Result:()=>pr,ResultsNumberPublic:()=>Td,ScoreName:()=>zd,ServiceTogglesConfig:()=>Yd,Span:()=>At,SpanBatch:()=>pR,SpanBatchUpdate:()=>Uo,SpanBatchWrite:()=>jo,SpanEnrichmentOptions:()=>Rs,SpanExperimentItemBulkWriteView:()=>Es,SpanExperimentItemBulkWriteViewType:()=>Ts,SpanFilter:()=>Ce,SpanFilterOperator:()=>rc,SpanFilterPublic:()=>Ge,SpanFilterPublicOperator:()=>Vs,SpanFilterWrite:()=>ut,SpanFilterWriteOperator:()=>uc,SpanLlmAsJudgeCode:()=>lt,SpanLlmAsJudgeCodePublic:()=>Mc,SpanLlmAsJudgeCodeWrite:()=>gc,SpanPagePublic:()=>ou,SpanPublic:()=>Ot,SpanPublicType:()=>ru,SpanSearchStreamRequestPublic:()=>Do,SpanSearchStreamRequestPublicType:()=>aa,SpanType:()=>Yl,SpanUpdate:()=>Io,SpanUpdateType:()=>Ls,SpanUserDefinedMetricPythonCode:()=>mt,SpanUserDefinedMetricPythonCodePublic:()=>Nc,SpanUserDefinedMetricPythonCodeWrite:()=>hc,SpanWrite:()=>Co,SpanWriteType:()=>Bs,SpansCountResponse:()=>ap,StartMultipartUploadRequest:()=>Hr,StartMultipartUploadRequestEntityType:()=>Ei,StartMultipartUploadResponse:()=>Bp,StreamOptions:()=>$s,StudioEvaluation:()=>ed,StudioEvaluationPublic:()=>hd,StudioEvaluationWrite:()=>sd,StudioLlmModel:()=>Zm,StudioLlmModelPublic:()=>gd,StudioLlmModelWrite:()=>ad,StudioMessage:()=>Qm,StudioMessagePublic:()=>dd,StudioMessageWrite:()=>td,StudioMetric:()=>qm,StudioMetricPublic:()=>fd,StudioMetricWrite:()=>nd,StudioOptimizer:()=>rd,StudioOptimizerPublic:()=>wd,StudioOptimizerWrite:()=>pd,StudioPrompt:()=>Ym,StudioPromptPublic:()=>ud,StudioPromptWrite:()=>id,Tool:()=>qs,ToolCall:()=>yt,Trace:()=>_t,TraceBatch:()=>cR,TraceBatchUpdate:()=>Oo,TraceBatchWrite:()=>No,TraceCountResponse:()=>sp,TraceEnrichmentOptions:()=>ys,TraceExperimentItemBulkWriteView:()=>As,TraceFilter:()=>Pe,TraceFilterOperator:()=>Jp,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>Ds,TraceFilterWrite:()=>dt,TraceFilterWriteOperator:()=>ac,TracePagePublic:()=>du,TracePublic:()=>Bt,TracePublicVisibilityMode:()=>cu,TraceSearchStreamRequestPublic:()=>Ko,TraceThread:()=>Lt,TraceThreadBatchIdentifier:()=>Lo,TraceThreadBatchUpdate:()=>Bo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Xs,TraceThreadFilterPublic:()=>Ke,TraceThreadFilterPublicOperator:()=>Ms,TraceThreadFilterWrite:()=>gt,TraceThreadFilterWriteOperator:()=>bc,TraceThreadIdentifier:()=>ya,TraceThreadLlmAsJudgeCode:()=>pt,TraceThreadLlmAsJudgeCodePublic:()=>Uc,TraceThreadLlmAsJudgeCodeWrite:()=>xc,TraceThreadPage:()=>mu,TraceThreadSearchStreamRequest:()=>Xo,TraceThreadStatus:()=>lu,TraceThreadUpdate:()=>Wo,TraceThreadUserDefinedMetricPythonCode:()=>ct,TraceThreadUserDefinedMetricPythonCodePublic:()=>Dc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>yc,TraceUpdate:()=>Fo,TraceVisibilityMode:()=>Ql,TraceWrite:()=>Mo,UploadAttachmentRequestEntityType:()=>Pi,Usage:()=>tl,UserDefinedMetricPythonCode:()=>st,UserDefinedMetricPythonCodePublic:()=>Ic,UserDefinedMetricPythonCodeWrite:()=>zc,ValueEntry:()=>Ss,ValueEntryCompare:()=>wl,ValueEntryCompareSource:()=>hl,ValueEntryExperimentItemBulkWriteView:()=>js,ValueEntryExperimentItemBulkWriteViewSource:()=>Cs,ValueEntryPublic:()=>eu,ValueEntryPublicSource:()=>qd,ValueEntrySource:()=>vs,VideoUrl:()=>Gp,VideoUrlPublic:()=>Ec,VideoUrlWrite:()=>pc,Webhook:()=>cp,WebhookExamples:()=>Ap,WebhookPublic:()=>yp,WebhookTestResult:()=>Ep,WebhookTestResultStatus:()=>Tp,WebhookWrite:()=>xp,WelcomeWizardSubmission:()=>ot,WelcomeWizardTracking:()=>uu,WorkspaceConfiguration:()=>Vt,WorkspaceMetricRequest:()=>dR,WorkspaceMetricResponse:()=>ka,WorkspaceMetricsSummaryRequest:()=>Cr,WorkspaceMetricsSummaryResponse:()=>gu,WorkspaceNameHolder:()=>Vp,WorkspaceSpansCount:()=>ip,WorkspaceTraceCount:()=>np,alerts:()=>_i,annotationQueues:()=>ca,attachments:()=>wr,chatCompletions:()=>la,dashboards:()=>ma,datasets:()=>Ui,experiments:()=>br,feedbackDefinitions:()=>Li,guardrails:()=>da,llmProviderKey:()=>Hi,optimizations:()=>Xi,projects:()=>Yi,prompts:()=>ra,spans:()=>xr,traces:()=>$e,welcomeWizard:()=>ua});var _i={};E(_i,{GetWebhookExamplesRequestAlertType:()=>Si});var Si=r.enum_(["general","slack","pagerduty"]);var wr={};E(wr,{AttachmentListRequestEntityType:()=>Ai,DownloadAttachmentRequestEntityType:()=>Ti,StartMultipartUploadRequest:()=>Hr,StartMultipartUploadRequestEntityType:()=>Ei,UploadAttachmentRequestEntityType:()=>Pi,uploadAttachment:()=>Ci});var Ai=r.enum_(["trace","span"]);var Ti=r.enum_(["trace","span"]);var Ei=r.enum_(["trace","span"]);var Pi=r.enum_(["trace","span"]);var Ci={};E(Ci,{Request:()=>Dx});var Dx=r.record(r.string(),r.unknown());var Hr=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",Ei),entityId:r.property("entity_id",r.string()),path:r.string()});var Ui={};E(Ui,{CreateDatasetItemsFromSpansRequest:()=>$r,CreateDatasetItemsFromTracesRequest:()=>Qr,DatasetExpansionWrite:()=>eo,DatasetIdentifier:()=>Zr,DatasetIdentifierPublic:()=>ro,DatasetItemBatchUpdate:()=>Jr,DatasetItemBatchWrite:()=>Gr,DatasetItemStreamRequest:()=>oo,DatasetItemsDelete:()=>qr,DatasetUpdate:()=>Yr,DatasetUpdateVisibility:()=>Ii,DatasetVersionCreatePublic:()=>io,DatasetVersionRestorePublic:()=>ao,DatasetVersionTag:()=>to,DatasetVersionUpdatePublic:()=>no,DatasetWrite:()=>Xr,DatasetWriteVisibility:()=>ji});var ji=r.enum_(["private","public"]);var Ii=r.enum_(["private","public"]);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 P=r.record(r.string(),r.unknown());var bs=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 Jr=r.object({ids:r.list(r.string()).optional(),filters:r.list(ws).optional(),update:bs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Xr=r.object({id:r.string().optional(),name:r.string(),visibility:ji.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var xs=r.enum_(["manual","trace","span","sdk"]);var Kr=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:xs,data:P,tags:r.list(r.string()).optional()});var Gr=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Kr)});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 $r=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Rs)});var ys=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 Qr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ys)});var Yr=r.object({name:r.string(),description:r.string().optional(),visibility:Ii.optional(),tags:r.list(r.string()).optional()});var Zr=r.object({datasetName:r.property("dataset_name",r.string())});var qr=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var eo=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 ro=r.object({datasetName:r.property("dataset_name",r.string())});var oo=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 to=r.object({tag:r.string()});var io=r.object({tags:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var ao=r.object({versionRef:r.property("version_ref",r.string())});var no=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});var br={};E(br,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>uo,ExperimentItemStreamRequest:()=>ho,ExperimentItemsBatch:()=>co,ExperimentItemsDelete:()=>lo,ExperimentStreamRequestPublic:()=>wo,ExperimentUpdate:()=>fo,ExperimentUpdateStatus:()=>Fi,ExperimentUpdateType:()=>Ni,ExperimentWrite:()=>so,ExperimentWriteStatus:()=>Mi,ExperimentWriteType:()=>Di,findFeedbackScoreNames:()=>Oi});var Di=r.enum_(["regular","trial","mini-batch"]);var Mi=r.enum_(["running","completed","cancelled"]);var Ni=r.enum_(["regular","trial","mini-batch"]);var Fi=r.enum_(["running","completed","cancelled"]);var Oi={};E(Oi,{Response:()=>Mx});var Mx=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 ks=r.object({name:r.string(),value:r.number()});var Wi=r.object({id:r.string()});var so=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Di.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Mi.optional(),experimentScores:r.property("experiment_scores",r.list(ks).optional()),promptVersion:r.property("prompt_version",Wi.optional()),promptVersions:r.property("prompt_versions",r.list(Wi).optional())});var M=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var zs=r.enum_(["ui","sdk","online_scoring"]);var vs=r.enum_(["ui","sdk","online_scoring"]);var Ss=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:vs.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:zs,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(),Ss).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 _s=r.enum_(["default","hidden"]);var po=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",_s.optional())});var co=r.object({experimentItems:r.property("experiment_items",r.list(po))});var lo=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 mo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var As=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",mo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Ts=r.enum_(["general","tool","llm","guardrail"]);var Es=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Ts.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",mo.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 Ps=r.enum_(["ui","sdk","online_scoring"]);var Cs=r.enum_(["ui","sdk","online_scoring"]);var js=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Cs.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 Is=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Ps,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(),js).optional())});var Us=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:As.optional(),spans:r.list(Es).optional(),feedbackScores:r.property("feedback_scores",r.list(Is).optional())});var uo=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(Us)});var go=r.object({name:r.string(),value:r.number()});var fo=r.object({name:r.string().optional(),metadata:P.optional(),type:Ni.optional(),status:Fi.optional(),experimentScores:r.property("experiment_scores",r.list(go).optional())});var ho=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 wo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Li={};E(Li,{FindFeedbackDefinitionsRequestType:()=>Bi});var Bi=r.enum_(["numerical","categorical","boolean"]);var Hi={};E(Hi,{ProviderApiKeyUpdate:()=>xo,ProviderApiKeyWrite:()=>bo,ProviderApiKeyWriteProvider:()=>Vi});var Vi=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var bo=r.object({provider:Vi,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 xo=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 Xi={};E(Xi,{OptimizationUpdate:()=>Ro,OptimizationUpdateStatus:()=>Ji});var Ji=r.enum_(["running","completed","cancelled","initialized","error"]);var Ro=r.object({name:r.string().optional(),status:Ji.optional()});var Yi={};E(Yi,{ProjectMetricRequestPublic:()=>zo,ProjectMetricRequestPublicInterval:()=>Qi,ProjectMetricRequestPublicMetricType:()=>$i,ProjectRetrieveDetailed:()=>vo,ProjectUpdate:()=>ko,ProjectUpdateVisibility:()=>Gi,ProjectWrite:()=>yo,ProjectWriteVisibility:()=>Ki});var Ki=r.enum_(["private","public"]);var Gi=r.enum_(["private","public"]);var $i=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Qi=r.enum_(["HOURLY","DAILY","WEEKLY"]);var yo=r.object({name:r.string(),visibility:Ki.optional(),description:r.string().optional()});var ko=r.object({name:r.string().optional(),description:r.string().optional(),visibility:Gi.optional()});var Ds=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:Ds.optional(),key:r.string().optional(),value:r.string().optional()});var Ms=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ke=r.object({field:r.string().optional(),operator:Ms.optional(),key:r.string().optional(),value:r.string().optional()});var zo=r.object({metricType:r.property("metric_type",$i.optional()),interval:Qi.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(Ke).optional())});var vo=r.object({name:r.string()});var ra={};E(ra,{CreatePromptVersionDetail:()=>_o,CreatePromptVersionDetailTemplateStructure:()=>ea,PromptUpdatable:()=>To,PromptVersionBatchUpdate:()=>Ao,PromptVersionRetrieveDetail:()=>Eo,PromptWrite:()=>So,PromptWriteTemplateStructure:()=>qi,PromptWriteType:()=>Zi});var Zi=r.enum_(["mustache","jinja2"]);var qi=r.enum_(["text","chat"]);var ea=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var So=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:Zi.optional(),templateStructure:r.property("template_structure",qi.optional()),tags:r.list(r.string()).optional()});var Ns=r.record(r.string(),r.unknown());var Fs=r.enum_(["mustache","jinja2"]);var Os=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Ns.optional(),type:Fs.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Os.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var _o=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",ea.optional())});var Ws=r.object({tags:r.list(r.string()).optional()});var Ao=r.object({ids:r.list(r.string()),update:Ws,mergeTags:r.property("merge_tags",r.boolean().optional())});var To=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var Eo=r.object({name:r.string(),commit:r.string().optional()});var xr={};E(xr,{FindFeedbackScoreNames1RequestType:()=>ta,GetSpanStatsRequestType:()=>ia,GetSpansByProjectRequestType:()=>oa,SpanBatchUpdate:()=>Uo,SpanBatchWrite:()=>jo,SpanSearchStreamRequestPublic:()=>Do,SpanSearchStreamRequestPublicType:()=>aa,findFeedbackScoreNames1:()=>na});var oa=r.enum_(["general","tool","llm","guardrail"]);var ta=r.enum_(["general","tool","llm","guardrail"]);var ia=r.enum_(["general","tool","llm","guardrail"]);var aa=r.enum_(["general","tool","llm","guardrail"]);var na={};E(na,{Response:()=>Nx});var Nx=r.list(r.string());var Bs=r.enum_(["general","tool","llm","guardrail"]);var Po=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Co=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:Bs.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",Po.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 jo=r.object({spans:r.list(Co)});var Ls=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 Io=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:Ls.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 Uo=r.object({ids:r.list(r.string()),update:Io,mergeTags:r.property("merge_tags",r.boolean().optional())});var Vs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ge=r.object({field:r.string().optional(),operator:Vs.optional(),key:r.string().optional(),value:r.string().optional()});var Do=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:aa.optional(),filters:r.list(Ge).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 $e={};E($e,{DeleteThreadFeedbackScores:()=>Vo,DeleteTraceThreads:()=>Ho,FeedbackScoreBatchThread:()=>Jo,TraceBatchUpdate:()=>Oo,TraceBatchWrite:()=>No,TraceSearchStreamRequestPublic:()=>Ko,TraceThreadBatchIdentifier:()=>Lo,TraceThreadBatchUpdate:()=>Bo,TraceThreadSearchStreamRequest:()=>Xo,findFeedbackScoreNames2:()=>sa,findTraceThreadsFeedbackScoreNames:()=>pa});var sa={};E(sa,{Response:()=>Fx});var Fx=r.list(r.string());var pa={};E(pa,{Response:()=>Ox});var Ox=r.list(r.string());var Mo=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",Po.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var No=r.object({traces:r.list(Mo)});var Fo=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 Oo=r.object({ids:r.list(r.string()),update:Fo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Wo=r.object({tags:r.list(r.string()).optional()});var Bo=r.object({ids:r.list(r.string()),update:Wo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Lo=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 Vo=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 Ho=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 Hs=r.enum_(["ui","sdk","online_scoring"]);var Js=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:Hs,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Jo=r.object({scores:r.list(Js)});var Xs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Xs.optional(),key:r.string().optional(),value:r.string().optional()});var Xo=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 Ko=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 ca={};E(ca,{AnnotationQueueBatchWrite:()=>$o,AnnotationQueueUpdate:()=>Qo});var Ks=r.enum_(["trace","thread"]);var Go=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:Ks,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var $o=r.object({annotationQueues:r.property("annotation_queues",r.list(Go))});var Qo=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 la={};E(la,{ChatCompletionRequest:()=>Zo});var Gs=r.record(r.string(),r.unknown());var $s=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Qs=r.enum_(["text","json_object","json_schema"]);var Ys=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var Zs=r.object({type:Qs.optional(),jsonSchema:r.property("json_schema",Ys.optional())});var Yo=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 qs=r.object({type:r.stringLiteral("function").optional(),function:Yo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var Zo=r.object({model:r.string().optional(),messages:r.list(Gs).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",$s.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",Zs.optional()),seed:r.number().optional(),tools:r.list(qs).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(Yo).optional(),functionCall:r.property("function_call",Ee.optional())});var ma={};E(ma,{DashboardUpdatePublic:()=>et,DashboardWrite:()=>qo});var qo=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var et=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var da={};E(da,{GuardrailBatchWrite:()=>rt});var ep=r.enum_(["TOPIC","PII"]);var rp=r.enum_(["passed","failed"]);var op=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:ep,result:rp,config:P,details:P});var rt=r.object({guardrails:r.list(op)});var ua={};E(ua,{WelcomeWizardSubmission:()=>ot});var ot=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 tp=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var Rr=r.object({biInformation:r.property("bi_information",r.list(tp).optional())});var ip=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var ap=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(ip).optional())});var np=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var sp=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(np).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var pp=r.enum_(["general","slack","pagerduty"]);var cp=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 lp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var mp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var dp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:mp,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 up=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",lp),triggerConfigs:r.property("trigger_configs",r.list(dp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Wx=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",pp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:cp,triggers:r.list(up).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.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var fp=r.object({id:r.string().optional(),type:gp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var hp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var wp=r.object({id:r.string().optional(),eventType:r.property("event_type",hp),triggerConfigs:r.property("trigger_configs",r.list(fp).optional())});var bp=r.enum_(["general","slack","pagerduty"]);var xp=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 tt=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",bp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:xp,triggers:r.list(wp).optional()});var B=r.object({ids:r.list(r.string())});var Rp=r.enum_(["general","slack","pagerduty"]);var yp=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 kp=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 zp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var vp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:zp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Sp=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",kp),triggerConfigs:r.property("trigger_configs",r.list(vp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var it=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:yp,triggers:r.list(Sp).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var _p=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(it).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Bx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Ap=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var Tp=r.enum_(["success","failure"]);var Ep=r.object({status:Tp.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 ga=r.object({ids:r.list(r.string())});var Pp=r.enum_(["trace","thread"]);var Cp=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var jp=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:Pp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Cp).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(jp))});var Ip=r.enum_(["trace","thread"]);var Up=r.object({username:r.string().optional(),status:r.number().optional()});var Qe=r.object({name:r.string(),value:r.number()});var at=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:Ip,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(Up).optional(),feedbackScores:r.property("feedback_scores",r.list(Qe).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 Dp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(at).optional(),sortableBy:r.list(r.string()).optional()});var Mp=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 Np=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Mp).optional(),sortableBy:r.list(r.string()).optional()});var Fp=r.enum_(["trace","span"]);var Op=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var fa=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Fp),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(Op))});var Wp=r.enum_(["trace","span"]);var Vx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Wp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Bp=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});var Lp=r.record(r.string(),r.unknown());var Vp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Hp=r.object({url:r.string()});var Jp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=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",P.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()),audioUrl:r.property("audio_url",Hp.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 nt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var Yp=r.object({filters:r.list(Pe).optional(),code:nt.optional()});var st=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Zp=r.object({filters:r.list(Pe).optional(),code:st.optional()});var pt=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var qp=r.object({filters:r.list(Re).optional(),code:pt.optional()});var ct=r.object({metric:r.string()});var ec=r.object({filters:r.list(Re).optional(),code:ct.optional()});var rc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ce=r.object({field:r.string().optional(),operator:rc.optional(),key:r.string().optional(),value:r.string().optional()});var lt=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(Ce).optional(),code:lt.optional()});var mt=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var tc=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var yr=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")}),Hx=r.union("type",{llm_as_judge:Yp.extend(yr),user_defined_metric_python:Zp.extend(yr),trace_thread_llm_as_judge:qp.extend(yr),trace_thread_user_defined_metric_python:ec.extend(yr),span_llm_as_judge:oc.extend(yr),span_user_defined_metric_python:tc.extend(yr)}).transform({transform:a=>a,untransform:a=>a});var ic=r.object({url:r.string()});var ac=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var dt=r.object({field:r.string().optional(),operator:ac.optional(),key:r.string().optional(),value:r.string().optional()});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.optional())});var nc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var sc=r.object({url:r.string(),detail:r.string().optional()});var pc=r.object({url:r.string()});var cc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",sc.optional()),videoUrl:r.property("video_url",pc.optional()),audioUrl:r.property("audio_url",ic.optional())});var rr=r.object({role:nc,content:r.string().optional(),contentArray:r.property("content_array",r.list(cc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var lc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:lc,description:r.string()});var mc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var dc=r.object({filters:r.list(dt).optional(),code:mc.optional()});var uc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ut=r.object({field:r.string().optional(),operator:uc.optional(),key:r.string().optional(),value:r.string().optional()});var gc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var fc=r.object({filters:r.list(ut).optional(),code:gc.optional()});var hc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var wc=r.object({filters:r.list(ut).optional(),code:hc.optional()});var bc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var gt=r.object({field:r.string().optional(),operator:bc.optional(),key:r.string().optional(),value:r.string().optional()});var xc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var Rc=r.object({filters:r.list(gt).optional(),code:xc.optional()});var yc=r.object({metric:r.string()});var kc=r.object({filters:r.list(gt).optional(),code:yc.optional()});var zc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var vc=r.object({filters:r.list(dt).optional(),code:zc.optional()});var kr=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")}),Sc=r.union("type",{llm_as_judge:dc.extend(kr),user_defined_metric_python:vc.extend(kr),trace_thread_llm_as_judge:Rc.extend(kr),trace_thread_user_defined_metric_python:kc.extend(kr),span_llm_as_judge:fc.extend(kr),span_user_defined_metric_python:wc.extend(kr)}).transform({transform:a=>a,untransform:a=>a});var _c=r.object({url:r.string()});var tr=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var Ac=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Tc=r.object({url:r.string(),detail:r.string().optional()});var Ec=r.object({url:r.string()});var Pc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Tc.optional()),videoUrl:r.property("video_url",Ec.optional()),audioUrl:r.property("audio_url",_c.optional())});var ir=r.object({role:Ac,content:r.string().optional(),contentArray:r.property("content_array",r.list(Pc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Cc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var ar=r.object({name:r.string(),type:Cc,description:r.string()});var jc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var ft=r.object({filters:r.list(Ae).optional(),code:jc.optional()});var Ic=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var ht=r.object({filters:r.list(Ae).optional(),code:Ic.optional()});var Uc=r.object({model:tr,messages:r.list(ir),schema:r.list(ar)});var wt=r.object({filters:r.list(Ke).optional(),code:Uc.optional()});var Dc=r.object({metric:r.string()});var bt=r.object({filters:r.list(Ke).optional(),code:Dc.optional()});var Mc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var xt=r.object({filters:r.list(Ge).optional(),code:Mc.optional()});var Nc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Rt=r.object({filters:r.list(Ge).optional(),code:Nc.optional()});var zr=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")}),Fc=r.union("type",{llm_as_judge:ft.extend(zr),user_defined_metric_python:ht.extend(zr),trace_thread_llm_as_judge:wt.extend(zr),trace_thread_user_defined_metric_python:bt.extend(zr),span_llm_as_judge:xt.extend(zr),span_user_defined_metric_python:Rt.extend(zr)}).transform({transform:a=>a,untransform:a=>a});var Oc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var vr=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")}),Wc=r.union("type",{llm_as_judge:ft.extend(vr),user_defined_metric_python:ht.extend(vr),trace_thread_llm_as_judge:wt.extend(vr),trace_thread_user_defined_metric_python:bt.extend(vr),span_llm_as_judge:xt.extend(vr),span_user_defined_metric_python:Rt.extend(vr)}).transform({transform:a=>a,untransform:a=>a});var Bc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Lc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Bc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var Vc=r.object({content:r.list(Lc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Hc=r.object({filters:r.list(Pe).optional(),code:nt.optional()});var Jc=r.object({filters:r.list(Pe).optional(),code:st.optional()});var Xc=r.object({filters:r.list(Re).optional(),code:pt.optional()});var Kc=r.object({filters:r.list(Re).optional(),code:ct.optional()});var Gc=r.object({filters:r.list(Ce).optional(),code:lt.optional()});var $c=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var Sr=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")}),Qc=r.union("type",{llm_as_judge:Hc.extend(Sr),user_defined_metric_python:Jc.extend(Sr),trace_thread_llm_as_judge:Xc.extend(Sr),trace_thread_user_defined_metric_python:Kc.extend(Sr),span_llm_as_judge:Gc.extend(Sr),span_user_defined_metric_python:$c.extend(Sr)}).transform({transform:a=>a,untransform:a=>a});var Yc=r.enum_(["system","user","assistant","tool","function"]);var yt=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var Zc=r.object({role:Yc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(yt).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var qc=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(yt).optional()),functionCall:r.property("function_call",Ee.optional())});var el=r.object({index:r.number().optional(),message:Zc.optional(),delta:qc.optional(),finishReason:r.property("finish_reason",r.string().optional())});var rl=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var ol=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var tl=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",rl.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",ol.optional())});var il=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(el).optional(),usage:tl.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var nr=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 al=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var nl=r.enum_(["private","public"]);var sl=r.enum_(["unknown","processing","completed","failed"]);var pl=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Jx=r.object({id:r.string().optional(),name:r.string(),visibility:nl.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:sl.optional(),latestVersion:r.property("latest_version",pl.optional())});var cl=r.enum_(["manual","trace","span","sdk"]);var kt=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:cl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(po).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 Xx=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(kt)});var ll=r.object({generatedSamples:r.property("generated_samples",r.list(kt).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var Kx=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 ml=r.enum_(["string","number","object","boolean","array","null"]);var dl=r.object({name:r.string().optional(),types:r.list(ml).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var ul=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 gl=r.enum_(["manual","trace","span","sdk"]);var ha=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var fl=r.enum_(["ui","sdk","online_scoring"]);var hl=r.enum_(["ui","sdk","online_scoring"]);var wl=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:hl.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 bl=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:fl,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(),wl).optional())});var xl=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:ha.optional(),output:ha.optional(),feedbackScores:r.property("feedback_scores",r.list(bl).optional()),comments:r.list(ul).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",xl.optional())});var yl=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:gl,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 kl=r.object({content:r.list(yl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(dl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var zl=r.enum_(["private","public"]);var vl=r.enum_(["unknown","processing","completed","failed"]);var Sl=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var _r=r.object({id:r.string().optional(),name:r.string(),visibility:zl.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:vl.optional(),latestVersion:r.property("latest_version",Sl.optional())});var _l=r.object({content:r.list(_r).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Al=r.object({value:r.number().optional()});var Tl=r.object({value:r.number().optional()});var zt=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var El=r.object({value:zt.optional()});var Pl=r.object({name:r.string().optional()}),Cl=r.union("type",{PERCENTAGE:El.extend(Pl),COUNT:Tl.extend(Pl),AVG:Al.extend(Pl)}).transform({transform:a=>a,untransform:a=>a});var Ne=r.object({stats:r.list(Cl).optional()});var jl=r.enum_(["manual","trace","span","sdk"]);var Il=r.enum_(["default","hidden"]);var vt=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",Il.optional())});var St=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:jl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(vt).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 Ul=r.enum_(["string","number","object","boolean","array","null"]);var Dl=r.object({name:r.string().optional(),types:r.list(Ul).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ml=r.object({content:r.list(St).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Dl).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var Nl=r.enum_(["string","number","object","boolean","array","null"]);var Fl=r.object({name:r.string().optional(),types:r.list(Nl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Ol=r.object({columns:r.list(Fl).optional()});var Wl=r.object({typeName:r.string().optional()});var Gx=r.object({type:Wl.optional(),closed:r.boolean().optional()});var Bl=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Ll=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:Bl.optional()});var Ar=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Vl=r.object({content:r.list(Ar).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Hl=r.enum_(["regular","trial","mini-batch"]);var Jl=r.enum_(["running","completed","cancelled"]);var je=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var wa=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 $x=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:Hl.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:je.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:Jl.optional(),experimentScores:r.property("experiment_scores",r.list(go).optional()),promptVersion:r.property("prompt_version",wa.optional()),promptVersions:r.property("prompt_versions",r.list(wa).optional())});var Tr=r.object({ids:r.list(r.string())});var Xl=r.enum_(["TOPIC","PII"]);var Kl=r.enum_(["passed","failed"]);var Gl=r.object({name:Xl.optional(),result:Kl.optional()});var $l=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Gl).optional()});var Ql=r.enum_(["default","hidden"]);var _t=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($l).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",Ql.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 Yl=r.enum_(["general","tool","llm","guardrail"]);var At=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:Yl.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 Zl=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",M.optional()),trace:_t.optional(),spans:r.list(At).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Qx=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(Zl)});var sr=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 ql=r.enum_(["regular","trial","mini-batch"]);var em=r.enum_(["running","completed","cancelled"]);var rm=r.object({name:r.string(),value:r.number()});var ba=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 Tt=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:ql.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),comments:r.list(sr).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:zt.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:em.optional(),experimentScores:r.property("experiment_scores",r.list(rm).optional()),promptVersion:r.property("prompt_version",ba.optional()),promptVersions:r.property("prompt_versions",r.list(ba).optional())});var om=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Tt).optional(),sortableBy:r.list(r.string()).optional()});var tm=r.object({label:r.string().optional()});var im=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var am=r.object({groupsDetails:r.property("groups_details",r.list(im).optional())});var nm=r.object({content:r.record(r.string(),tm).optional(),details:am.optional()});var sm=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:je.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var pm=r.object({label:r.string().optional(),aggregations:sm.optional()});var cm=r.object({content:r.record(r.string(),pm).optional()});var Yx=r.object({ids:r.list(r.string())});var lm=r.object({typeName:r.string().optional()});var Zx=r.object({type:lm.optional(),closed:r.boolean().optional()});var mm=r.object({trueLabel:r.string(),falseLabel:r.string()});var dm=r.object({details:mm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var um=r.object({categories:r.record(r.string(),r.number())});var gm=r.object({details:um.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var fm=r.object({max:r.number(),min:r.number()});var hm=r.object({details:fm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var wm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),qx=r.union("type",{numerical:hm.extend(wm),categorical:gm.extend(wm),boolean:dm.extend(wm)}).transform({transform:a=>a,untransform:a=>a});var bm=r.object({trueLabel:r.string(),falseLabel:r.string()});var xm=r.object({details:bm.optional()});var Rm=r.object({categories:r.record(r.string(),r.number())});var ym=r.object({details:Rm.optional()});var km=r.object({max:r.number(),min:r.number()});var zm=r.object({details:km.optional()});var vm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Sm=r.union("type",{numerical:zm.extend(vm),categorical:ym.extend(vm),boolean:xm.extend(vm)}).transform({transform:a=>a,untransform:a=>a});var _m=r.object({trueLabel:r.string(),falseLabel:r.string()});var Et=r.object({details:_m.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({categories:r.record(r.string(),r.number())});var Pt=r.object({details:Am.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Tm=r.object({max:r.number(),min:r.number()});var Ct=r.object({details:Tm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Em=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()}),Pm=r.union("type",{numerical:Ct.extend(Em),categorical:Pt.extend(Em),boolean:Et.extend(Em)}).transform({transform:a=>a,untransform:a=>a});var Cm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pm).optional()});var jm=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()}),Im=r.union("type",{numerical:Ct.extend(jm),categorical:Pt.extend(jm),boolean:Et.extend(jm)}).transform({transform:a=>a,untransform:a=>a});var Um=r.object({trueLabel:r.string(),falseLabel:r.string()});var Dm=r.object({details:Um.optional()});var Mm=r.object({categories:r.record(r.string(),r.number())});var Nm=r.object({details:Mm.optional()});var Fm=r.object({max:r.number(),min:r.number()});var Om=r.object({details:Fm.optional()});var Wm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Bm=r.union("type",{numerical:Om.extend(Wm),categorical:Nm.extend(Wm),boolean:Dm.extend(Wm)}).transform({transform:a=>a,untransform:a=>a});var Lm=r.enum_(["TOPIC","PII"]);var Vm=r.enum_(["passed","failed"]);var Hm=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:Lm,result:Vm,config:P,details:P});var eR=r.object({guardrails:r.list(Hm)});var Jm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var jt=r.object({id:r.string().optional(),provider:Jm,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});var Xm=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(jt).optional(),sortableBy:r.list(r.string()).optional()});var Km=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var rR=r.object({id:r.string().optional(),provider:Km,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()),readOnly:r.property("read_only",r.boolean().optional())});var It=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var Gm=r.enum_(["trace","thread","span"]);var Ut=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",Gm)});var oR=P;var $m=r.enum_(["running","completed","cancelled","initialized","error"]);var Qm=r.object({role:r.string(),content:r.string()});var Ym=r.object({messages:r.list(Qm)});var Zm=r.object({model:r.string(),parameters:P.optional()});var qm=r.object({type:r.string(),parameters:P.optional()});var ed=r.object({metrics:r.list(qm)});var rd=r.object({type:r.string(),parameters:P.optional()});var od=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Ym,llmModel:r.property("llm_model",Zm),evaluation:ed,optimizer:rd});var tR=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:$m,metadata:M.optional(),studioConfig:r.property("studio_config",od.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 td=r.object({role:r.string(),content:r.string()});var id=r.object({messages:r.list(td)});var ad=r.object({model:r.string(),parameters:le.optional()});var nd=r.object({type:r.string(),parameters:le.optional()});var sd=r.object({metrics:r.list(nd)});var pd=r.object({type:r.string(),parameters:le.optional()});var cd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:id,llmModel:r.property("llm_model",ad),evaluation:sd,optimizer:pd});var ld=r.enum_(["running","completed","cancelled","initialized","error"]);var xa=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:ld,metadata:ce.optional(),studioConfig:r.property("studio_config",cd.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var md=r.enum_(["running","completed","cancelled","initialized","error"]);var dd=r.object({role:r.string(),content:r.string()});var ud=r.object({messages:r.list(dd)});var gd=r.object({model:r.string(),parameters:re.optional()});var fd=r.object({type:r.string(),parameters:re.optional()});var hd=r.object({metrics:r.list(fd)});var wd=r.object({type:r.string(),parameters:re.optional()});var bd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:ud,llmModel:r.property("llm_model",gd),evaluation:hd,optimizer:wd});var Er=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:md,metadata:me.optional(),studioConfig:r.property("studio_config",bd.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).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 Ra=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Er).optional(),sortableBy:r.list(r.string()).optional()});var xd=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var Dt=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 iR=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:je.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",Dt.optional())});var yd=r.enum_(["private","public"]);var Mt=r.object({id:r.string().optional(),name:r.string(),visibility:yd.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 kd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Mt).optional(),sortableBy:r.list(r.string()).optional()});var zd=r.object({name:r.string().optional(),type:r.string().optional()});var vd=r.object({scores:r.list(zd).optional()});var Sd=r.object({time:r.date(),value:r.number().optional()});var _d=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Ad=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Td=r.object({name:r.string().optional(),data:r.list(Sd).optional()});var Ed=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",_d.optional()),interval:Ad.optional(),results:r.list(Td).optional()});var Pd=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.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",Dt.optional())});var Cd=r.object({content:r.list(Pd).optional()});var jd=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Id=r.object({name:r.string(),value:r.number()});var Ud=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Dd=r.enum_(["private","public"]);var Md=r.object({id:r.string().optional(),name:r.string(),visibility:Dd.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(Id).optional()),duration:Ud.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",jd.optional())});var aR=r.object({errors:r.list(r.string()).optional()});var Nd=r.enum_(["mustache","jinja2"]);var Fd=r.enum_(["text","chat"]);var Od=r.enum_(["mustache","jinja2"]);var Wd=r.enum_(["text","chat"]);var Bd=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:Od.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Wd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var nR=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:Nd.optional(),templateStructure:r.property("template_structure",Fd.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",Bd.optional())});var sR=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Ld=r.enum_(["text","chat"]);var Vd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Ld.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 Hd=r.enum_(["mustache","jinja2"]);var Jd=r.enum_(["text","chat"]);var Xd=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:Hd.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Jd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Kd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Xd).optional(),sortableBy:r.list(r.string()).optional()});var Gd=r.enum_(["text","chat"]);var $d=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Gd.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 Qd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($d).optional(),sortableBy:r.list(r.string()).optional()});var Yd=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),opikbuiltinProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean()});var pR=r.object({spans:r.list(At)});var Nt=r.object({name:r.string(),author:r.string().optional()});var Ft=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Zd=r.enum_(["ui","sdk","online_scoring"]);var qd=r.enum_(["ui","sdk","online_scoring"]);var eu=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:qd.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:Zd,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(),eu).optional())});var ru=r.enum_(["general","tool","llm","guardrail"]);var Ot=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:ru.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",Ft.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(sr).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 ou=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ot).optional(),sortableBy:r.list(r.string()).optional()});var tu=r.enum_(["ui","sdk","online_scoring"]);var iu=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:tu,author:r.string().optional(),id:r.string()});var Wt=r.object({scores:r.list(iu)});var cR=r.object({traces:r.list(_t)});var lR=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var au=r.enum_(["TOPIC","PII"]);var nu=r.enum_(["passed","failed"]);var su=r.object({name:au.optional(),result:nu.optional()});var pu=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(su).optional()});var cu=r.enum_(["default","hidden"]);var Bt=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",Ft.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(sr).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(pu).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",cu.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 lu=r.enum_(["active","inactive"]);var Lt=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:lu.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 ya=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 mu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Lt).optional(),sortableBy:r.list(r.string()).optional()});var du=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Bt).optional(),sortableBy:r.list(r.string()).optional()});var uu=r.object({completed:r.boolean().optional()});var pr=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 mR=r.object({time:r.date(),value:r.number().optional()});var ka=r.object({results:r.list(pr).optional()});var dR=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 Vt=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var gu=r.object({results:r.list(pr).optional()});var za=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:ap.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:sp.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 va=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.sorting=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:_p.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:it.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(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,d;let{alertType:o}=t,i={};o!=null&&(i.alert_type=Si.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Ap.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ep.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Sa=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),d!=null&&(u.sorting=d);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":m.type,"X-Fern-Runtime-Version":m.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:Dp.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Go.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:at.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(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _a=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:d,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=Ai.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Np.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:fa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:fa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:d,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=Ti.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=d,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Hr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:d,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=Pi.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:wr.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 Aa=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Lp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Vp.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 Ta=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:d,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),d!=null&&(f.sorting=d),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Oc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Sc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var d,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:B.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var d,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Wc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var d,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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}/logs.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ea=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Zo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:il.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 Pa=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:al.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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")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(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:et.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:nr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ca=class{constructor(t={}){this._options=t;}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")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(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:d,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),d!=null&&(y.prompt_id=d),u!=null&&(y.name=u),g!=null&&(y.sorting=g),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(z.ok)return {data:_l.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Gr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,d;let o=await df();o.append("file",Ue(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(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(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t,e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:ll.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:d,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,d!=null&&(y.filters=d),u!=null&&(y.sorting=u),g!=null&&(y.search=g),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(z.ok)return {data:kl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:Ne.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.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:d.error.errorMessage,rawResponse:d.rawResponse})}}getDatasetItemById(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:St.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:d,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),d!=null&&(g.filters=d),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ml.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var d,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ol.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ll.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(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:to.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:Vl.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}createDatasetVersion(t,e={},o){return w.fromPromise(this.__createDatasetVersion(t,e,o))}async __createDatasetVersion(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Ar.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateDatasetVersion(t,e,o={},i){return w.fromPromise(this.__updateDatasetVersion(t,e,o,i))}async __updateDatasetVersion(t,e,o={},i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:Ar.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/{id}/versions/hash/{versionHash}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ja=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,F;let{page:o,size:i,datasetId:n,optimizationId:c,types:d,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),d!=null&&(v.types=d),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:om.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(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,d;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:br.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:nm.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(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:cm.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(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Tt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new 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(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:vt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new 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(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-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 Ia=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.type=Bi.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:Cm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Sm.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Im.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Bm.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-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 Ua=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:rt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Da=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Xm.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:jt.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(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ma=class{constructor(t={}){this._options=t;}evaluateSpans(t,e){return w.fromPromise(this.__evaluateSpans(t,e))}async __evaluateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ut.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:It.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/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ut.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:It.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(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ut.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:It.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 Na=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Fa=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ra.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(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findStudioOptimizations(t={},e){return w.fromPromise(this.__findStudioOptimizations(t,e))}async __findStudioOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations/studio"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ra.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(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Er.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(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationById(t,e){return w.fromPromise(this.__getStudioOptimizationById(t,e))}async __getStudioOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Er.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(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:xd.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 Oa=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:kd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Mt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,d;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:vd.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Ed.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:Cd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Md.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 L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Wa=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),d!=null&&(u.filters=d);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":m.type,"X-Fern-Runtime-Version":m.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:Qd.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePromptVersions(t,e){return w.fromPromise(this.__updatePromptVersions(t,e))}async __updatePromptVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-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/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Vd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 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(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var y,z;let{page:i,size:n,search:c,sorting:d,filters:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.search=c),d!=null&&(g.sorting=d),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Kd.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/prompts/{id}/versions.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ba=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Yd.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 La=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Uo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpansByProject(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,dr;let{page:o,size:i,projectName:n,projectId:c,traceId:d,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,F={};o!=null&&(F.page=o.toString()),i!=null&&(F.size=i.toString()),n!=null&&(F.project_name=n),c!=null&&(F.project_id=c),d!=null&&(F.trace_id=d),u!=null&&(F.type=oa.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(F.filters=g),f!=null&&(F.truncate=f.toString()),y!=null&&(F.strip_attachments=y.toString()),z!=null&&(F.sorting=z),v!=null&&(F.exclude=v),S!=null&&(F.from_time=S.toISOString()),O!=null&&(F.to_time=O.toISOString());let G=await x({url:R((dr=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?dr: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:F,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:ou.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Co.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ot.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(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var d,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=ta.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.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:xr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:d,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=ia.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),d!=null&&(f.filters=d),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ne.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Do.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Va=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:No.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 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(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var F,G;let{page:o,size:i,projectName:n,projectId:c,filters:d,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),d!=null&&(S.filters=d),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(F=await s.get(this._options.baseUrl))!=null?F:await s.get(this._options.environment))!=null?G:b.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:du.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Bt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Fo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Nt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.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":m.type,"X-Fern-Runtime-Version":m.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:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThreadStats(t={},e){return w.fromPromise(this.__getTraceThreadStats(t,e))}async __getTraceThreadStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.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/threads/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":m.type,"X-Fern-Runtime-Version":m.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:Ne.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/threads/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ya.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Lt.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(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,F;let{page:o,size:i,projectName:n,projectId:c,truncate:d,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),d!=null&&(v.truncate=d.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:mu.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ya.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ko.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ha=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:uu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ot.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ja=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:pr.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(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Vt.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(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Vt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new 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(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ka.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(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:ka.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(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:gu.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 Xa=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=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":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.experiment_id=i,n!=null&&(d.workspace_name=n),d.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":m.type,"X-Fern-Runtime-Version":m.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(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(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.optimization_id=i,n!=null&&(d.workspace_name=n),d.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":m.type,"X-Fern-Runtime-Version":m.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(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(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=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":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ht=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new za(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new va(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new Sa(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new _a(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new Aa(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new Ta(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new Ea(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new Pa(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new Ca(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new ja(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Ia(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Ua(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Da(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new Ma(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new Na(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Fa(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new Oa(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Wa(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new Ba(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new La(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Va(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Ha(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Ja(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new Xa(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var oe=()=>uuid.v7();var Ka=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var o;let e={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...t};return this.opik.spanBatchQueue.update(this.data.id,e),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var Ga=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new Ka(o,this.opik);return this.spans.push(i),i};this.update=t=>{var o;let e={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...t};return this.opik.traceBatchQueue.update(this.data.id,e),this.data={...this.data,...e},this};}};var Wf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},$a={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},gR=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),fR=a=>a.replace(/\/api$/,""),hR=a=>Buffer.from(a).toString("base64"),Bf=(a,t,e)=>{let o=gR(e),i=`${t}?${o}`;return new URL(i,a).toString()},Lf=({datasetId:a,experimentId:t,baseUrl:e})=>Bf(e,Wf.EXPERIMENTS,{[$a.EXPERIMENT_ID]:t,[$a.DATASET_ID]:a,[$a.PATH]:hR(e)});var Vf=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=fR(e),i=`${t}/${Wf.PROJECT_BY_NAME}`;return Bf(o,i,{[$a.PROJECT_NAME]:a})};var wR=300,Qa=100,Jt=class{constructor({action:t,batchSize:e=Qa,delay:o,enableBatch:i,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=wR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=Qa,updateBatchSize:c=Qa,deleteBatchSize:d=Qa,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Jt({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Jt({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Jt({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:d,name:`${u}:deleteQueue`});}};var Ya=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 Za=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 qa=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 en=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 rn=class extends Ht{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var on=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 fu=null;async function Hf(){return fu||(fu=await bR__default.default()),fu}var Xt=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Jn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=xR__default.default(t);return (await Hf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Fe(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let d of a){n+=o.decode(d,{stream:!0});let u=n.split(`
|
|
5
|
-
`);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let d=JSON.parse(n),u=t.parse(d);u.ok?i.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(d){k.error("Error parsing remaining buffer:",d instanceof Error?d.message:String(d));}}catch(d){k.error("Error processing stream:",d instanceof Error?d.message:String(d));}return i}function
|
|
1
|
+
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),Lu=require('fs'),Kh=require('ini');require('dotenv/config');var Lb=require('qs'),uuid=require('uuid'),RR=require('fast-json-stable-stringify'),xR=require('xxhash-wasm'),util=require('util'),SR=require('mustache'),TR=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),CR=require('fast-deep-equal'),async_hooks=require('async_hooks'),wn=require('chalk'),LR=require('boxen'),VR=require('ora'),ai=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 Lu__default=/*#__PURE__*/_interopDefault(Lu);var Kh__default=/*#__PURE__*/_interopDefault(Kh);var Lb__default=/*#__PURE__*/_interopDefault(Lb);var RR__default=/*#__PURE__*/_interopDefault(RR);var xR__default=/*#__PURE__*/_interopDefault(xR);var SR__default=/*#__PURE__*/_interopDefault(SR);var TR__default=/*#__PURE__*/_interopDefault(TR);var CR__default=/*#__PURE__*/_interopDefault(CR);var wn__default=/*#__PURE__*/_interopDefault(wn);var LR__default=/*#__PURE__*/_interopDefault(LR);var VR__default=/*#__PURE__*/_interopDefault(VR);var Uu=Object.create;var ur=Object.defineProperty;var Du=Object.getOwnPropertyDescriptor;var Uh=Object.getOwnPropertyNames;var Dh=Object.getPrototypeOf,Mh=Object.prototype.hasOwnProperty;var Mu=(a,t)=>(t=Symbol[a])?t:Symbol.for("Symbol."+a),Wr=a=>{throw TypeError(a)};var Nh=(a,t,e)=>t in a?ur(a,t,{enumerable:true,configurable:true,writable:true,value:e}):a[t]=e;var ue=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(t,e)=>(typeof require!="undefined"?require:t)[e]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var Tn=(a,t)=>()=>(a&&(t=a(a=0)),t);var Y=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),E=(a,t)=>{for(var e in t)ur(a,e,{get:t[e],enumerable:true});},Fh=(a,t,e,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Uh(t))!Mh.call(a,i)&&i!==e&&ur(a,i,{get:()=>t[i],enumerable:!(o=Du(t,i))||o.enumerable});return a};var Oh=(a,t,e)=>(e=a!=null?Uu(Dh(a)):{},Fh(ur(e,"default",{value:a,enumerable:true}),a));var Nu=a=>{var t;return [,,,Uu((t=void 0)!=null?t:null)]},Fu=["class","method","getter","setter","accessor","field","value","get","set"],Or=a=>a!==void 0&&typeof a!="function"?Wr("Function expected"):a,Wh=(a,t,e,o,i)=>({kind:Fu[a],name:t,metadata:o,addInitializer:n=>e._?Wr("Already initialized"):i.push(Or(n||null))}),En=(a,t)=>Nh(t,Mu("metadata"),a[3]),Ou=(a,t,e,o)=>{for(var i=0,n=a[t>>1],c=n&&n.length;i<c;i++)n[i].call(e);return o},Wu=(a,t,e,o,i,n)=>{var d,u,g,f,y=t&7,z=false,v=false,S=2,O=Fu[y+5],G=a[S]||(a[S]=[]),te=((i=i.prototype),Du(i,e));for(var dr=o.length-1;dr>=0;dr--)g=Wh(y,e,u={},a[3],G),(g.static=z,g.private=v,f=g.access={has:pe=>e in pe},(f.get=pe=>pe[e]),y>2),d=(0, o[dr])(te[O],g),u._=1,Or(d)&&(te[O]=d);return te&&ur(i,e,te),i};var Rg={};E(Rg,{Node18UniversalStreamWrapper:()=>Gn});var Gn,yg=Tn(()=>{Gn=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.on("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.on("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",async e=>{if(t instanceof a)t._write(e);else if(t instanceof WritableStream){let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}else t.write(e);}),this.off("end",async()=>{t instanceof a?t._end():t instanceof WritableStream?t.getWriter().close():t.end();}),this.off("error",async e=>{t instanceof a?t._error(e):t instanceof WritableStream?t.getWriter().abort(e):t.destroy(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var kg={};E(kg,{UndiciStreamWrapper:()=>$n});var $n,zg=Tn(()=>{$n=class a{constructor(t){this.readableStream=t,this.reader=this.readableStream.getReader(),this.events={data:[],end:[],error:[],readable:[],close:[],pause:[],resume:[]},this.paused=false,this.resumeCallback=null,this.encoding=null;}on(t,e){var o;(o=this.events[t])==null||o.push(e);}off(t,e){var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(i=>i!==e);}pipe(t){return this.on("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.on("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.on("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);}),this._startReading(),t}pipeTo(t){return this.pipe(t)}unpipe(t){this.off("data",e=>{if(t instanceof a)t._write(e);else {let o=t.getWriter();o.write(e).then(()=>o.releaseLock());}}),this.off("end",()=>{t instanceof a?t._end():t.getWriter().close();}),this.off("error",e=>{t instanceof a?t._error(e):t.getWriter().abort(e);});}destroy(t){this.reader.cancel(t).then(()=>{this._emit("close");}).catch(e=>{this._emit("error",e);});}pause(){this.paused=true,this._emit("pause");}resume(){this.paused&&(this.paused=false,this._emit("resume"),this.resumeCallback&&(this.resumeCallback(),this.resumeCallback=null));}get isPaused(){return this.paused}async read(){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(!t)return e}setEncoding(t){this.encoding=t;}async text(){let t=[];for(;;){let{done:o,value:i}=await this.reader.read();if(o)break;i&&t.push(i);}return new TextDecoder(this.encoding||"utf-8").decode(await new Blob(t).arrayBuffer())}async json(){let t=await this.text();return JSON.parse(t)}_write(t){this._emit("data",t);}_end(){this._emit("end");}_error(t){this._emit("error",t);}_emit(t,e){if(this.events[t])for(let o of this.events[t]||[])o(e);}async _startReading(){try{for(this._emit("readable");;){this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();if(t){this._emit("end"),this._emit("close");break}e&&this._emit("data",e);}}catch(t){this._emit("error",t);}}[Symbol.asyncIterator](){return {next:async()=>{this.paused&&await new Promise(o=>{this.resumeCallback=o;});let{done:t,value:e}=await this.reader.read();return t?{done:true,value:void 0}:{done:false,value:e}},[Symbol.asyncIterator](){return this}}}};});var vg={};E(vg,{NodePre18StreamWrapper:()=>Qn});var Qn,Sg=Tn(()=>{Qn=class{constructor(t){this.readableStream=t;}on(t,e){this.readableStream.on(t,e);}off(t,e){this.readableStream.off(t,e);}pipe(t){return this.readableStream.pipe(t),t}pipeTo(t){return this.pipe(t)}unpipe(t){t?this.readableStream.unpipe(t):this.readableStream.unpipe();}destroy(t){this.readableStream.destroy(t);}pause(){this.readableStream.pause();}resume(){this.readableStream.resume();}get isPaused(){return this.readableStream.isPaused()}async read(){return new Promise((t,e)=>{let o=this.readableStream.read();o?t(o):(this.readableStream.once("readable",()=>{let i=this.readableStream.read();t(i);}),this.readableStream.once("error",e));})}setEncoding(t){this.readableStream.setEncoding(t),this.encoding=t;}async text(){let t=[],e=new TextEncoder;this.readableStream.setEncoding(this.encoding||"utf-8");for await(let i of this.readableStream)t.push(e.encode(i));return new TextDecoder(this.encoding||"utf-8").decode(Buffer.concat(t))}async json(){let t=await this.text();return JSON.parse(t)}[Symbol.asyncIterator](){let e=this.readableStream[Symbol.asyncIterator]();return {async next(){let{value:o,done:i}=await e.next();return {value:o,done:i}},[Symbol.asyncIterator](){return this}}}};});var Ug=Y((OD,Ig)=>{var jg=ue("stream").Stream,Kb=ue("util");Ig.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=[];}Kb.inherits(we,jg);we.create=function(a,t){var e=new this;t=t||{};for(var o in t)e[o]=t[o];e.source=a;var i=a.emit;return a.emit=function(){return e._handleEmit(arguments),i.apply(a,arguments)},a.on("error",function(){}),e.pauseStream&&a.pause(),e};Object.defineProperty(we.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});we.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};we.prototype.resume=function(){this._released||this.release(),this.source.resume();};we.prototype.pause=function(){this.source.pause();};we.prototype.release=function(){this._released=true,this._bufferedEvents.forEach(function(a){this.emit.apply(this,a);}.bind(this)),this._bufferedEvents=[];};we.prototype.pipe=function(){var a=jg.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 Fg=Y((WD,Ng)=>{var Gb=ue("util"),Mg=ue("stream").Stream,Dg=Ug();Ng.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;}Gb.inherits(V,Mg);V.create=function(a){var t=new this;a=a||{};for(var e in a)t[e]=a[e];return t};V.isStreamLike=function(a){return typeof a!="function"&&typeof a!="string"&&typeof a!="boolean"&&typeof a!="number"&&!Buffer.isBuffer(a)};V.prototype.append=function(a){var t=V.isStreamLike(a);if(t){if(!(a instanceof Dg)){var e=Dg.create(a,{maxDataSize:1/0,pauseStream:this.pauseStreams});a.on("data",this._checkDataSize.bind(this)),a=e;}this._handleErrors(a),this.pauseStreams&&a.pause();}return this._streams.push(a),this};V.prototype.pipe=function(a,t){return Mg.prototype.pipe.call(this,a,t),this.resume(),a};V.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=false;}};V.prototype._realGetNext=function(){var a=this._streams.shift();if(typeof a=="undefined"){this.end();return}if(typeof a!="function"){this._pipeNext(a);return}var t=a;t(function(e){var o=V.isStreamLike(e);o&&(e.on("data",this._checkDataSize.bind(this)),this._handleErrors(e)),this._pipeNext(e);}.bind(this));};V.prototype._pipeNext=function(a){this._currentStream=a;var t=V.isStreamLike(a);if(t){a.on("end",this._getNext.bind(this)),a.pipe(this,{end:false});return}var e=a;this.write(e),this._getNext();};V.prototype._handleErrors=function(a){var t=this;a.on("error",function(e){t._emitError(e);});};V.prototype.write=function(a){this.emit("data",a);};V.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"));};V.prototype.resume=function(){this._released||(this._released=true,this.writable=true,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume");};V.prototype.end=function(){this._reset(),this.emit("end");};V.prototype.destroy=function(){this._reset(),this.emit("close");};V.prototype._reset=function(){this.writable=false,this._streams=[],this._currentStream=null;};V.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var a="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(a));}};V.prototype._updateDataSize=function(){this.dataSize=0;var a=this;this._streams.forEach(function(t){t.dataSize&&(a.dataSize+=t.dataSize);}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize);};V.prototype._emitError=function(a){this._reset(),this.emit("error",a);};});var Og=Y((BD,$b)=>{$b.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 Bg=Y((LD,Wg)=>{Wg.exports=Og();});var Hg=Y(ie=>{var Ri=Bg(),Qb=ue("path").extname,Lg=/^\s*([^;\s]*)(?:;|\s|$)/,Yb=/^text\//i;ie.charset=Vg;ie.charsets={lookup:Vg};ie.contentType=Zb;ie.extension=qb;ie.extensions=Object.create(null);ie.lookup=ex;ie.types=Object.create(null);rx(ie.extensions,ie.types);function Vg(a){if(!a||typeof a!="string")return false;var t=Lg.exec(a),e=t&&Ri[t[1].toLowerCase()];return e&&e.charset?e.charset:t&&Yb.test(t[1])?"UTF-8":false}function Zb(a){if(!a||typeof a!="string")return false;var t=a.indexOf("/")===-1?ie.lookup(a):a;if(!t)return false;if(t.indexOf("charset")===-1){var e=ie.charset(t);e&&(t+="; charset="+e.toLowerCase());}return t}function qb(a){if(!a||typeof a!="string")return false;var t=Lg.exec(a),e=t&&ie.extensions[t[1].toLowerCase()];return !e||!e.length?false:e[0]}function ex(a){if(!a||typeof a!="string")return false;var t=Qb("x."+a).toLowerCase().substr(1);return t&&ie.types[t]||false}function rx(a,t){var e=["nginx","apache",void 0,"iana"];Object.keys(Ri).forEach(function(i){var n=Ri[i],c=n.extensions;if(!(!c||!c.length)){a[i]=c;for(var d=0;d<c.length;d++){var u=c[d];if(t[u]){var g=e.indexOf(Ri[t[u]].source),f=e.indexOf(n.source);if(t[u]!=="application/octet-stream"&&(g>f||g===f&&t[u].substr(0,12)==="application/"))continue}t[u]=i;}}});}});var Xg=Y((HD,Jg)=>{Jg.exports=ox;function ox(a){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(a):setTimeout(a,0);}});var Yn=Y((JD,Gg)=>{var Kg=Xg();Gg.exports=tx;function tx(a){var t=false;return Kg(function(){t=true;}),function(o,i){t?a(o,i):Kg(function(){a(o,i);});}}});var Zn=Y((XD,$g)=>{$g.exports=ix;function ix(a){Object.keys(a.jobs).forEach(ax.bind(a)),a.jobs={};}function ax(a){typeof this.jobs[a]=="function"&&this.jobs[a]();}});var qn=Y((KD,Yg)=>{var Qg=Yn(),nx=Zn();Yg.exports=sx;function sx(a,t,e,o){var i=e.keyedList?e.keyedList[e.index]:e.index;e.jobs[i]=px(t,i,a[i],function(n,c){i in e.jobs&&(delete e.jobs[i],n?nx(e):e.results[i]=c,o(n,e.results));});}function px(a,t,e,o){var i;return a.length==2?i=a(e,Qg(o)):i=a(e,t,Qg(o)),i}});var es=Y((GD,Zg)=>{Zg.exports=cx;function cx(a,t){var e=!Array.isArray(a),o={index:0,keyedList:e||t?Object.keys(a):null,jobs:{},results:e?{}:[],size:e?Object.keys(a).length:a.length};return t&&o.keyedList.sort(e?t:function(i,n){return t(a[i],a[n])}),o}});var rs=Y(($D,qg)=>{var lx=Zn(),mx=Yn();qg.exports=dx;function dx(a){Object.keys(this.jobs).length&&(this.index=this.size,lx(this),mx(a)(null,this.results));}});var rf=Y((QD,ef)=>{var ux=qn(),gx=es(),fx=rs();ef.exports=hx;function hx(a,t,e){for(var o=gx(a);o.index<(o.keyedList||a).length;)ux(a,t,o,function(i,n){if(i){e(i,n);return}if(Object.keys(o.jobs).length===0){e(null,o.results);return}}),o.index++;return fx.bind(o,e)}});var os=Y((YD,yi)=>{var of=qn(),wx=es(),bx=rs();yi.exports=xx;yi.exports.ascending=tf;yi.exports.descending=Rx;function xx(a,t,e,o){var i=wx(a,e);return of(a,t,i,function n(c,d){if(c){o(c,d);return}if(i.index++,i.index<(i.keyedList||a).length){of(a,t,i,n);return}o(null,i.results);}),bx.bind(i,o)}function tf(a,t){return a<t?-1:a>t?1:0}function Rx(a,t){return -1*tf(a,t)}});var nf=Y((ZD,af)=>{var yx=os();af.exports=kx;function kx(a,t,e){return yx(a,t,null,e)}});var pf=Y((qD,sf)=>{sf.exports={parallel:rf(),serial:nf(),serialOrdered:os()};});var lf=Y((eM,cf)=>{cf.exports=function(a,t){return Object.keys(t).forEach(function(e){a[e]=a[e]||t[e];}),a};});var df=Y((rM,mf)=>{var ns=Fg(),zx=ue("util"),ts=ue("path"),vx=ue("http"),Sx=ue("https"),_x=ue("url").parse,Ax=ue("fs"),Tx=ue("stream").Stream,is=Hg(),Ex=pf(),as=lf();mf.exports=C;zx.inherits(C,ns);function C(a){if(!(this instanceof C))return new C(a);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],ns.call(this),a=a||{};for(var t in a)this[t]=a[t];}C.LINE_BREAK=`\r
|
|
2
|
+
`;C.DEFAULT_CONTENT_TYPE="application/octet-stream";C.prototype.append=function(a,t,e){e=e||{},typeof e=="string"&&(e={filename:e});var o=ns.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(a,t,e),n=this._multiPartFooter();o(i),o(t),o(n),this._trackLength(i,t,e);};C.prototype._trackLength=function(a,t,e){var o=0;e.knownLength!=null?o+=+e.knownLength:Buffer.isBuffer(t)?o=t.length:typeof t=="string"&&(o=Buffer.byteLength(t)),this._valueLength+=o,this._overheadLength+=Buffer.byteLength(a)+C.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof Tx))&&(e.knownLength||this._valuesToMeasure.push(t));};C.prototype._lengthRetriever=function(a,t){a.hasOwnProperty("fd")?a.end!=null&&a.end!=1/0&&a.start!=null?t(null,a.end+1-(a.start?a.start:0)):Ax.stat(a.path,function(e,o){var i;if(e){t(e);return}i=o.size-(a.start?a.start:0),t(null,i);}):a.hasOwnProperty("httpVersion")?t(null,+a.headers["content-length"]):a.hasOwnProperty("httpModule")?(a.on("response",function(e){a.pause(),t(null,+e.headers["content-length"]);}),a.resume()):t("Unknown stream");};C.prototype._multiPartHeader=function(a,t,e){if(typeof e.header=="string")return e.header;var o=this._getContentDisposition(t,e),i=this._getContentType(t,e),n="",c={"Content-Disposition":["form-data",'name="'+a+'"'].concat(o||[]),"Content-Type":[].concat(i||[])};typeof e.header=="object"&&as(c,e.header);var d;for(var u in c)c.hasOwnProperty(u)&&(d=c[u],d!=null&&(Array.isArray(d)||(d=[d]),d.length&&(n+=u+": "+d.join("; ")+C.LINE_BREAK)));return "--"+this.getBoundary()+C.LINE_BREAK+n+C.LINE_BREAK};C.prototype._getContentDisposition=function(a,t){var e,o;return typeof t.filepath=="string"?e=ts.normalize(t.filepath).replace(/\\/g,"/"):t.filename||a.name||a.path?e=ts.basename(t.filename||a.name||a.path):a.readable&&a.hasOwnProperty("httpVersion")&&(e=ts.basename(a.client._httpMessage.path||"")),e&&(o='filename="'+e+'"'),o};C.prototype._getContentType=function(a,t){var e=t.contentType;return !e&&a.name&&(e=is.lookup(a.name)),!e&&a.path&&(e=is.lookup(a.path)),!e&&a.readable&&a.hasOwnProperty("httpVersion")&&(e=a.headers["content-type"]),!e&&(t.filepath||t.filename)&&(e=is.lookup(t.filepath||t.filename)),!e&&typeof a=="object"&&(e=C.DEFAULT_CONTENT_TYPE),e};C.prototype._multiPartFooter=function(){return function(a){var t=C.LINE_BREAK,e=this._streams.length===0;e&&(t+=this._lastBoundary()),a(t);}.bind(this)};C.prototype._lastBoundary=function(){return "--"+this.getBoundary()+"--"+C.LINE_BREAK};C.prototype.getHeaders=function(a){var t,e={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in a)a.hasOwnProperty(t)&&(e[t.toLowerCase()]=a[t]);return e};C.prototype.setBoundary=function(a){this._boundary=a;};C.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};C.prototype.getBuffer=function(){for(var a=new Buffer.alloc(0),t=this.getBoundary(),e=0,o=this._streams.length;e<o;e++)typeof this._streams[e]!="function"&&(Buffer.isBuffer(this._streams[e])?a=Buffer.concat([a,this._streams[e]]):a=Buffer.concat([a,Buffer.from(this._streams[e])]),(typeof this._streams[e]!="string"||this._streams[e].substring(2,t.length+2)!==t)&&(a=Buffer.concat([a,Buffer.from(C.LINE_BREAK)])));return Buffer.concat([a,Buffer.from(this._lastBoundary())])};C.prototype._generateBoundary=function(){for(var a="--------------------------",t=0;t<24;t++)a+=Math.floor(Math.random()*10).toString(16);this._boundary=a;};C.prototype.getLengthSync=function(){var a=this._overheadLength+this._valueLength;return this._streams.length&&(a+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),a};C.prototype.hasKnownLength=function(){var a=true;return this._valuesToMeasure.length&&(a=false),a};C.prototype.getLength=function(a){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(a.bind(this,null,t));return}Ex.parallel(this._valuesToMeasure,this._lengthRetriever,function(e,o){if(e){a(e);return}o.forEach(function(i){t+=i;}),a(null,t);});};C.prototype.submit=function(a,t){var e,o,i={method:"post"};return typeof a=="string"?(a=_x(a),o=as({port:a.port,path:a.pathname,host:a.hostname,protocol:a.protocol},i)):(o=as(a,i),o.port||(o.port=o.protocol=="https:"?443:80)),o.headers=this.getHeaders(a.headers),o.protocol=="https:"?e=Sx.request(o):e=vx.request(o),this.getLength(function(n,c){if(n&&n!=="Unknown stream"){this._error(n);return}if(c&&e.setHeader("Content-Length",c),this.pipe(e),t){var d,u=function(g,f){return e.removeListener("error",u),e.removeListener("response",d),t.call(this,g,f)};d=u.bind(this,null),e.on("error",u),e.on("response",d);}}.bind(this)),e};C.prototype._error=function(a){this.error||(this.error=a,this.pause(),this.emit("error",a));};C.prototype.toString=function(){return "[object FormData]"};});var Jh={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};function ni(a,t=a){return ansiEscapes.link(t,a)}var k=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),Bu=a=>{k.settings.minLevel=Jh[a];},Xh=()=>{k.settings.minLevel=100;};Bu(process.env.OPIK_LOG_LEVEL||"INFO");var Gh="~/.opik.config",Cn={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};function Vu(a){return Object.fromEntries(Object.entries(a).filter(([,t])=>t!==void 0))}function $h(){return Vu({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 Qh(){let a=process.env.OPIK_CONFIG_PATH||Gh;if(!Lu__default.default.existsSync(a)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${a}`);return {}}try{let t=Kh__default.default.parse(Lu__default.default.readFileSync(a,"utf8"));return t.opik?Vu({apiKey:t.opik.api_key,apiUrl:t.opik.url_override,projectName:t.opik.project_name,workspaceName:t.opik.workspace}):{}}catch(t){return k.error(`Error loading config file ${a}: ${t}`),{}}}function Hu(a){let t=$h(),e=Qh(),{headers:o,...i}=a||{};return Yh({...Cn,...e,...t,...i})}function Yh(a){if(!a.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let t=Zh(a.apiUrl);if(t&&!a.apiKey)throw new Error("OPIK_API_KEY is not set");if(t&&!a.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return a}function Zh(a){return new URL(a).hostname.endsWith("comet.com")}var X={};E(X,{AlertAlertType:()=>qh,AlertPublicAlertType:()=>sw,AlertTriggerConfigPublicType:()=>aw,AlertTriggerConfigType:()=>rw,AlertTriggerConfigWriteType:()=>ow,AlertTriggerEventType:()=>ew,AlertTriggerPublicEventType:()=>nw,AlertTriggerWriteEventType:()=>tw,AlertWriteAlertType:()=>iw,AnnotationQueuePublicScope:()=>mw,AnnotationQueueScope:()=>cw,AnnotationQueueWriteScope:()=>lw,AssistantMessageRole:()=>Pw,AttachmentListRequestEntityType:()=>Xu,BadRequestError:()=>_,CheckName:()=>Yw,CheckPublicName:()=>Mb,CheckPublicResult:()=>Nb,CheckResult:()=>Zw,ColumnCompareTypesItem:()=>Ow,ColumnPublicTypesItem:()=>Gw,ColumnTypesItem:()=>$w,CompleteMultipartUploadRequestEntityType:()=>dw,ConflictError:()=>N,CreatePromptVersionDetailTemplateStructure:()=>mg,DatasetItemCompareSource:()=>Ww,DatasetItemFilterOperator:()=>jw,DatasetItemPublicSource:()=>Xw,DatasetItemSource:()=>Dw,DatasetItemWriteSource:()=>Xn,DatasetPublicStatus:()=>Jw,DatasetPublicVisibility:()=>Hw,DatasetStatus:()=>Uw,DatasetUpdateVisibility:()=>Yu,DatasetVisibility:()=>Iw,DatasetWriteVisibility:()=>Qu,DeleteAttachmentsRequestEntityType:()=>uw,DownloadAttachmentRequestEntityType:()=>Ku,ExperimentItemCompareTraceVisibilityMode:()=>Bw,ExperimentItemPublicTraceVisibilityMode:()=>Kw,ExperimentItemTraceVisibilityMode:()=>Mw,ExperimentPublicStatus:()=>ib,ExperimentPublicType:()=>tb,ExperimentStatus:()=>Qw,ExperimentType:()=>Kn,ExperimentUpdateStatus:()=>rg,ExperimentUpdateType:()=>eg,ExperimentWriteStatus:()=>qu,ExperimentWriteType:()=>Zu,FeedbackScoreBatchItemSource:()=>Db,FeedbackScoreBatchItemThreadSource:()=>Wb,FeedbackScoreCompareSource:()=>Lw,FeedbackScoreExperimentItemBulkWriteViewSource:()=>eb,FeedbackScorePublicSource:()=>jb,FeedbackScoreSource:()=>Nw,FindFeedbackDefinitionsRequestType:()=>og,FindFeedbackScoreNames1RequestType:()=>ug,ForbiddenError:()=>Z,GetSpanStatsRequestType:()=>gg,GetSpansByProjectRequestType:()=>dg,GetWebhookExamplesRequestAlertType:()=>Ju,GuardrailName:()=>ab,GuardrailResult:()=>nb,GuardrailWriteName:()=>sb,GuardrailWriteResult:()=>pb,LlmAsJudgeMessagePublicRole:()=>vw,LlmAsJudgeMessageRole:()=>gw,LlmAsJudgeMessageWriteRole:()=>xw,LlmAsJudgeOutputSchemaPublicType:()=>Sw,LlmAsJudgeOutputSchemaType:()=>fw,LlmAsJudgeOutputSchemaWriteType:()=>Rw,LogItemLevel:()=>Ew,ManualEvaluationRequestEntityType:()=>mb,NotFoundError:()=>A,NotImplementedError:()=>Je,OptimizationPublicStatus:()=>gb,OptimizationStatus:()=>db,OptimizationUpdateStatus:()=>ig,OptimizationWriteStatus:()=>ub,ProjectDetailedVisibility:()=>xb,ProjectMetricRequestPublicInterval:()=>pg,ProjectMetricRequestPublicMetricType:()=>sg,ProjectMetricResponsePublicInterval:()=>bb,ProjectMetricResponsePublicMetricType:()=>wb,ProjectPublicVisibility:()=>hb,ProjectUpdateVisibility:()=>ng,ProjectVisibility:()=>fb,ProjectWriteVisibility:()=>ag,PromptDetailTemplateStructure:()=>_b,PromptPublicTemplateStructure:()=>Eb,PromptTemplateStructure:()=>yb,PromptType:()=>Rb,PromptVersionDetailTemplateStructure:()=>Sb,PromptVersionDetailType:()=>vb,PromptVersionPublicTemplateStructure:()=>Tb,PromptVersionPublicType:()=>Ab,PromptVersionTemplateStructure:()=>zb,PromptVersionType:()=>kb,PromptWriteTemplateStructure:()=>lg,PromptWriteType:()=>cg,ProviderApiKeyProvider:()=>lb,ProviderApiKeyPublicProvider:()=>cb,ProviderApiKeyWriteProvider:()=>tg,ResponseFormatType:()=>Cw,SpanExperimentItemBulkWriteViewType:()=>rb,SpanFilterOperator:()=>hw,SpanFilterPublicOperator:()=>_w,SpanFilterWriteOperator:()=>yw,SpanPublicType:()=>Ib,SpanSearchStreamRequestPublicType:()=>fg,SpanType:()=>ve,SpanUpdateType:()=>Pb,SpanWriteType:()=>Cb,StartMultipartUploadRequestEntityType:()=>Gu,TraceFilterOperator:()=>ww,TraceFilterPublicOperator:()=>Aw,TraceFilterWriteOperator:()=>kw,TracePublicVisibilityMode:()=>Fb,TraceThreadFilterOperator:()=>bw,TraceThreadFilterPublicOperator:()=>Tw,TraceThreadFilterWriteOperator:()=>zw,TraceThreadStatus:()=>Ob,TraceVisibilityMode:()=>qw,UnauthorizedError:()=>$,UnprocessableEntityError:()=>L,UploadAttachmentRequestEntityType:()=>$u,ValueEntryCompareSource:()=>Vw,ValueEntryExperimentItemBulkWriteViewSource:()=>ob,ValueEntryPublicSource:()=>Ub,ValueEntrySource:()=>Fw,WebhookTestResultStatus:()=>pw,alerts:()=>si,annotationQueues:()=>In,attachments:()=>pi,automationRuleEvaluators:()=>Dn,chatCompletions:()=>Mn,check:()=>Un,dashboards:()=>Nn,datasets:()=>ci,experiments:()=>li,feedbackDefinitions:()=>mi,guardrails:()=>Fn,llmProviderKey:()=>di,manualEvaluation:()=>On,openTelemetryIngestion:()=>Wn,optimizations:()=>ui,projects:()=>gi,prompts:()=>fi,redirect:()=>Jn,serviceToggles:()=>Bn,spans:()=>hi,systemUsage:()=>jn,traces:()=>Ln,welcomeWizard:()=>Vn,workspaces:()=>Hn});var si={};E(si,{GetWebhookExamplesRequestAlertType:()=>Ju});var Ju={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var pi={};E(pi,{AttachmentListRequestEntityType:()=>Xu,DownloadAttachmentRequestEntityType:()=>Ku,StartMultipartUploadRequestEntityType:()=>Gu,UploadAttachmentRequestEntityType:()=>$u});var Xu={Trace:"trace",Span:"span"};var Ku={Trace:"trace",Span:"span"};var Gu={Trace:"trace",Span:"span"};var $u={Trace:"trace",Span:"span"};var ci={};E(ci,{DatasetUpdateVisibility:()=>Yu,DatasetWriteVisibility:()=>Qu});var Qu={Private:"private",Public:"public"};var Yu={Private:"private",Public:"public"};var li={};E(li,{ExperimentUpdateStatus:()=>rg,ExperimentUpdateType:()=>eg,ExperimentWriteStatus:()=>qu,ExperimentWriteType:()=>Zu});var Zu={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var qu={Running:"running",Completed:"completed",Cancelled:"cancelled"};var eg={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var rg={Running:"running",Completed:"completed",Cancelled:"cancelled"};var mi={};E(mi,{FindFeedbackDefinitionsRequestType:()=>og});var og={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};var di={};E(di,{ProviderApiKeyWriteProvider:()=>tg});var tg={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var ui={};E(ui,{OptimizationUpdateStatus:()=>ig});var ig={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var gi={};E(gi,{ProjectMetricRequestPublicInterval:()=>pg,ProjectMetricRequestPublicMetricType:()=>sg,ProjectUpdateVisibility:()=>ng,ProjectWriteVisibility:()=>ag});var ag={Private:"private",Public:"public"};var ng={Private:"private",Public:"public"};var sg={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 pg={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var fi={};E(fi,{CreatePromptVersionDetailTemplateStructure:()=>mg,PromptWriteTemplateStructure:()=>lg,PromptWriteType:()=>cg});var cg={Mustache:"mustache",Jinja2:"jinja2"};var lg={Text:"text",Chat:"chat"};var mg={Text:"text",Chat:"chat"};var hi={};E(hi,{FindFeedbackScoreNames1RequestType:()=>ug,GetSpanStatsRequestType:()=>gg,GetSpansByProjectRequestType:()=>dg,SpanSearchStreamRequestPublicType:()=>fg});var dg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ug={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var gg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var fg={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var jn={};var In={};var Un={};var Dn={};var Mn={};var Nn={};var Fn={};var On={};var Wn={};var Bn={};var Ln={};var Vn={};var Hn={};var Jn={};var qh={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var ew={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 rw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var ow={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var tw={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 iw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var aw={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};var nw={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 sw={General:"general",Slack:"slack",Pagerduty:"pagerduty"};var pw={Success:"success",Failure:"failure"};var cw={Trace:"trace",Thread:"thread"};var lw={Trace:"trace",Thread:"thread"};var mw={Trace:"trace",Thread:"thread"};var dw={Trace:"trace",Span:"span"};var uw={Trace:"trace",Span:"span"};var gw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var fw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var hw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var ww={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 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 xw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Rw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var yw={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 kw={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 zw={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 vw={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};var Sw={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};var _w={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Aw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Tw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Ew={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};var Pw={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};var Cw={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};var jw={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};var Iw={Private:"private",Public:"public"};var Uw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Dw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Mw={Default:"default",Hidden:"hidden"};var Nw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Fw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Xn={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Ow={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Ww={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Bw={Default:"default",Hidden:"hidden"};var Lw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Vw={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Hw={Private:"private",Public:"public"};var Jw={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};var Xw={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};var Kw={Default:"default",Hidden:"hidden"};var Gw={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var $w={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};var Kn={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var Qw={Running:"running",Completed:"completed",Cancelled:"cancelled"};var Yw={Topic:"TOPIC",Pii:"PII"};var Zw={Passed:"passed",Failed:"failed"};var ve={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var qw={Default:"default",Hidden:"hidden"};var eb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var rb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var ob={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var tb={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch"};var ib={Running:"running",Completed:"completed",Cancelled:"cancelled"};var ab={Topic:"TOPIC",Pii:"PII"};var nb={Passed:"passed",Failed:"failed"};var sb={Topic:"TOPIC",Pii:"PII"};var pb={Passed:"passed",Failed:"failed"};var cb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var lb={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",CustomLlm:"custom-llm",OpikBuiltin:"opik-builtin"};var mb={Trace:"trace",Thread:"thread",Span:"span"};var db={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var ub={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var gb={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};var fb={Private:"private",Public:"public"};var hb={Private:"private",Public:"public"};var wb={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 bb={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY"};var xb={Private:"private",Public:"public"};var Rb={Mustache:"mustache",Jinja2:"jinja2"};var yb={Text:"text",Chat:"chat"};var kb={Mustache:"mustache",Jinja2:"jinja2"};var zb={Text:"text",Chat:"chat"};var vb={Mustache:"mustache",Jinja2:"jinja2"};var Sb={Text:"text",Chat:"chat"};var _b={Text:"text",Chat:"chat"};var Ab={Mustache:"mustache",Jinja2:"jinja2"};var Tb={Text:"text",Chat:"chat"};var Eb={Text:"text",Chat:"chat"};var Pb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Cb={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var jb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ib={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};var Ub={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Db={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Mb={Topic:"TOPIC",Pii:"PII"};var Nb={Passed:"passed",Failed:"failed"};var Fb={Default:"default",Hidden:"hidden"};var Ob={Active:"active",Inactive:"inactive"};var Wb={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};var Ue=(a,t,e)=>JSON.stringify(a,t,e);var p=class a extends Error{constructor({message:t,statusCode:e,body:o,rawResponse:i}){super(Bb({message:t,statusCode:e,body:o})),Object.setPrototypeOf(this,a.prototype),this.statusCode=e,this.body=o,this.rawResponse=i;}};function Bb({message:a,statusCode:t,body:e}){let o=[];return a!=null&&o.push(a),t!=null&&o.push(`Status code: ${t.toString()}`),e!=null&&o.push(`Body: ${Ue(e,void 0,2)}`),o.join(`
|
|
3
|
+
`)}var h=class a extends Error{constructor(t){super(t),Object.setPrototypeOf(this,a.prototype);}};var _=class a extends p{constructor(t,e){super({message:"BadRequestError",statusCode:400,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var N=class a extends p{constructor(t,e){super({message:"ConflictError",statusCode:409,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var L=class a extends p{constructor(t,e){super({message:"UnprocessableEntityError",statusCode:422,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var A=class a extends p{constructor(t,e){super({message:"NotFoundError",statusCode:404,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var $=class a extends p{constructor(t,e){super({message:"UnauthorizedError",statusCode:401,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Z=class a extends p{constructor(t,e){super({message:"ForbiddenError",statusCode:403,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var Je=class a extends p{constructor(t,e){super({message:"NotImplementedError",statusCode:501,body:t,rawResponse:e}),Object.setPrototypeOf(this,a.prototype);}};var b={Default:"http://localhost:5173/api"};var Br;typeof globalThis.Headers!="undefined"?Br=globalThis.Headers:Br=class hg{constructor(t){if(this.headers=new Map,t)if(t instanceof hg)t.forEach((e,o)=>this.append(o,e));else if(Array.isArray(t))for(let[e,o]of t)if(typeof e=="string"&&typeof o=="string")this.append(e,o);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,o]of Object.entries(t))if(typeof o=="string")this.append(e,o);else throw new TypeError("Header values must be strings")}append(t,e){let o=t.toLowerCase(),i=this.headers.get(o)||[];this.headers.set(o,[...i,e]);}delete(t){let e=t.toLowerCase();this.headers.delete(e);}get(t){let e=t.toLowerCase(),o=this.headers.get(e);return o?o.join(", "):null}has(t){let e=t.toLowerCase();return this.headers.has(e)}set(t,e){let o=t.toLowerCase();this.headers.set(o,[e]);}forEach(t,e){let o=e?t.bind(e):t;this.headers.forEach((i,n)=>o(i.join(", "),n,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[t,e]of this.headers.entries())yield [t,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let t of this.headers.values())yield t.join(", ");}[Symbol.iterator](){return this.entries()}};var wi={headers:new Br,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},bi={headers:new Br,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};function xi(a){return {headers:a.headers,redirected:a.redirected,status:a.status,statusText:a.statusText,type:a.type,url:a.url}}function wg(a,t){return Object.keys(t!=null?t:{}).length>0?`${a}?${Lb__default.default.stringify(t,{arrayFormat:"repeat"})}`:a}var m=Vb();function Vb(){var u,g,f,y,z;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((u=globalThis==null?void 0:globalThis.navigator)==null?void 0:u.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((g=self.constructor)==null?void 0:g.name)==="DedicatedWorkerGlobalScope"||((f=self.constructor)==null?void 0:f.name)==="ServiceWorkerGlobalScope"||((y=self.constructor)==null?void 0:y.name)==="SharedWorkerGlobalScope")?{type:"web-worker"}:typeof Deno!="undefined"&&typeof Deno.version!="undefined"&&typeof Deno.version.deno!="undefined"?{type:"deno",version:Deno.version.deno}:typeof Bun!="undefined"&&typeof Bun.version!="undefined"?{type:"bun",version:Bun.version}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((z=process.versions)!=null&&z.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:typeof navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:{type:"unknown"}}async function bg(){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?fetch:m.type==="node"?(await import('node-fetch')).default:typeof fetch=="function"?fetch:(await import('node-fetch')).default}async function xg({body:a,type:t}){return t.includes("json")?Ue(a):a}async function _g(a){return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?new(await Promise.resolve().then(()=>(yg(),Rg))).Node18UniversalStreamWrapper(a):m.type!=="node"&&typeof fetch=="function"?new(await Promise.resolve().then(()=>(zg(),kg))).UndiciStreamWrapper(a):new(await Promise.resolve().then(()=>(Sg(),vg))).NodePre18StreamWrapper(a)}async function Ag(a,t){if(a.body!=null&&t==="blob")return await a.blob();if(a.body!=null&&t==="arrayBuffer")return await a.arrayBuffer();if(a.body!=null&&t==="sse")return a.body;if(a.body!=null&&t==="streaming")return _g(a.body);if(a.body!=null&&t==="text")return await a.text();{let e=await a.text();if(e.length>0)try{return JSON.parse(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:a.status,rawBody:e}}}else return}}var Hb="timeout";function Tg(a){let t=new AbortController,e=setTimeout(()=>t.abort(Hb),a);return {signal:t.signal,abortId:e}}function Eg(...a){let t=a.length===1&&Array.isArray(a[0])?a[0]:a,e=new AbortController;for(let o of t){if(o.aborted){e.abort(o==null?void 0:o.reason);break}o.addEventListener("abort",()=>e.abort(o==null?void 0:o.reason),{signal:e.signal});}return e.signal}var Pg=async(a,t,e,o,i,n,c,d,u)=>{let g=[],f;if(n!=null){let{signal:v,abortId:S}=Tg(n);f=S,g.push(v);}c!=null&&g.push(c);let y=Eg(g),z=await a(t,{method:e,headers:o,body:i,signal:y,credentials:d?"include":void 0,duplex:u});return f!=null&&clearTimeout(f),z};function Jb(a){let t=1+(Math.random()*2-1)*.2;return a*t}async function Cg(a,t=2){let e=await a();for(let o=0;o<t&&([408,429].includes(e.status)||e.status>=500);++o){let i=Math.min(1e3*Math.pow(2,o),6e4),n=Jb(i);await new Promise(c=>setTimeout(c,n)),e=await a();}return e}async function Xb(a){let t={};if(a.body!==void 0&&a.contentType!=null&&(t["Content-Type"]=a.contentType),a.headers!=null)for(let[n,c]of Object.entries(a.headers))c!=null&&(t[n]=c);let e=wg(a.url,a.queryParameters),o=await xg({body:a.body,type:a.requestType==="json"?"json":"other"}),i=await bg();try{let n=await Cg(async()=>Pg(i,e,a.method,t,o,a.timeoutMs,a.abortSignal,a.withCredentials,a.duplex),a.maxRetries),c=await Ag(n,a.responseType);return n.status>=200&&n.status<400?{ok:!0,body:c,headers:n.headers,rawResponse:xi(n)}:{ok:!1,error:{reason:"status-code",statusCode:n.status,body:c},rawResponse:xi(n)}}catch(n){return a.abortSignal!=null&&a.abortSignal.aborted?{ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:wi}:n instanceof Error&&n.name==="AbortError"?{ok:false,error:{reason:"timeout"},rawResponse:wi}:n instanceof Error?{ok:false,error:{reason:"unknown",errorMessage:n.message},rawResponse:bi}:{ok:false,error:{reason:"unknown",errorMessage:Ue(n)},rawResponse:bi}}}var x=Xb;var s={get:async a=>typeof a=="function"?a():a};var w=class a extends Promise{constructor(t){super(e=>{e(void 0);}),this.innerPromise=t;}static fromFunction(t,...e){return new a(t(...e))}static interceptFunction(t){return (...e)=>a.fromPromise(t(...e))}static fromPromise(t){return new a(t)}static fromExecutor(t){let e=new Promise(t);return new a(e)}static fromResult(t){let e=Promise.resolve(t);return new a(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:t})=>t)),this.unwrappedPromise}then(t,e){return this.unwrap().then(t,e)}catch(t){return this.unwrap().catch(t)}finally(t){return this.unwrap().finally(t)}async withRawResponse(){return await this.innerPromise}};function ls(a){return typeof a=="object"&&a!=null&&"name"in a}function ms(a){return typeof a=="object"&&a!=null&&"path"in a}function ds(a){let t=a.lastIndexOf("/"),e=a.lastIndexOf("\\"),o=Math.max(t,e);return o>=0?a.substring(o+1):a}async function uf(){let a;return m.type==="node"&&m.parsedVersion!=null&&m.parsedVersion>=18?a=new ss:m.type==="node"?a=new ps:a=new cs,await a.setup(),a}var ss=class{async setup(){this.fd=new(await import('formdata-node')).FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ls(t))return t.name;if(ms(t)&&t.path)return ds(t.path.toString())}async appendFile(t,e,o){var i,n;o=this.getFileName(e,o),e instanceof Blob?(i=this.fd)==null||i.append(t,e,o):(n=this.fd)==null||n.append(t,{type:void 0,name:o,[Symbol.toStringTag]:"File",stream(){return e}});}async getRequest(){let t=new(await import('form-data-encoder')).FormDataEncoder(this.fd);return {body:(await import('readable-stream')).Readable.from(t),headers:t.headers,duplex:"half"}}},ps=class{async setup(){this.fd=new(await Promise.resolve().then(()=>Oh(df()))).default;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ls(t))return t.name;if(ms(t)&&t.path)return ds(t.path.toString())}async appendFile(t,e,o){var n,c;o=this.getFileName(e,o);let i;e instanceof Blob?i=Buffer.from(await e.arrayBuffer()):i=e,o==null?(n=this.fd)==null||n.append(t,i):(c=this.fd)==null||c.append(t,i,{filename:o});}getRequest(){return {body:this.fd,headers:this.fd?this.fd.getHeaders():{}}}},cs=class{async setup(){this.fd=new FormData;}append(t,e){var o;(o=this.fd)==null||o.append(t,e);}getFileName(t,e){if(e!=null)return e;if(ls(t))return t.name;if(ms(t)&&t.path)return ds(t.path.toString())}async appendFile(t,e,o){var i,n;if(o=this.getFileName(e,o),e instanceof Blob){(i=this.fd)==null||i.append(t,e,o);return}(n=this.fd)==null||n.append(t,new Blob([e]),o);}getRequest(){return {body:this.fd,headers:{}}}};var r={};E(r,{JsonError:()=>gr,ParseError:()=>fr,any:()=>Tf,bigint:()=>ff,boolean:()=>Ef,booleanLiteral:()=>Af,date:()=>hf,discriminant:()=>Ff,enum_:()=>zi,getObjectLikeUtils:()=>be,getObjectUtils:()=>Xe,getSchemaUtils:()=>D,isProperty:()=>Me,lazy:()=>wf,lazyObject:()=>vf,list:()=>Si,number:()=>Pf,object:()=>vi,objectWithoutOptionalProperties:()=>zf,optional:()=>us,property:()=>xf,record:()=>Uf,set:()=>Df,string:()=>Cf,stringLiteral:()=>_f,transform:()=>gs,undiscriminatedUnion:()=>Nf,union:()=>Wf,unknown:()=>jf,withParsedProperties:()=>hs});var T={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};function U(a,t){return `Expected ${t}. Received ${Px(a)}.`}function Px(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:gf(a.json),parse:gf(a.parse)}}function gf(a){return (t,e)=>{let o=a(t,e),{skipValidation:i=false}=e!=null?e:{};return !o.ok&&i?(console.warn(["Failed to validate.",...o.errors.map(n=>" - "+(n.path.length>0?`${n.path.join(".")}: ${n.message}`:n.message))].join(`
|
|
4
|
+
`)),{ok:true,value:t}):o}}function ki(a){return a.path.length===0?a.message:`${a.path.join(" -> ")}: ${a.message}`}var gr=class a extends Error{constructor(e){super(e.map(ki).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};var fr=class a extends Error{constructor(e){super(e.map(ki).join("; "));this.errors=e;Object.setPrototypeOf(this,a.prototype);}};function D(a){return {nullable:()=>Cx(a),optional:()=>us(a),optionalNullable:()=>jx(a),transform:t=>gs(a,t),parseOrThrow:(t,e)=>{let o=a.parse(t,e);if(o.ok)return o.value;throw new fr(o.errors)},jsonOrThrow:(t,e)=>{let o=a.json(t,e);if(o.ok)return o.value;throw new gr(o.errors)}}}function Cx(a){let t={parse:(e,o)=>e==null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.NULLABLE};return {...t,...D(t)}}function us(a){let t={parse:(e,o)=>e==null?{ok:true,value:void 0}:a.parse(e,o),json:(e,o)=>o!=null&&o.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL};return {...t,...D(t)}}function jx(a){let t={parse:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.parse(e,o),json:(e,o)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:a.json(e,o),getType:()=>T.OPTIONAL_NULLABLE};return {...t,...D(t)}}function gs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);return n.ok?{ok:true,value:t.transform(n.value)}:n},json:(o,i)=>{let n=t.untransform(o);return a.json(n,i)},getType:()=>a.getType()};return {...e,...D(e)}}function ff(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t=="bigint"?{ok:true,value:t}:typeof t=="number"?{ok:true,value:BigInt(t)}:{ok:false,errors:[{path:e,message:U(t,"bigint | number")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="bigint"?{ok:false,errors:[{path:e,message:U(t,"bigint")}]}:{ok:true,value:t},getType:()=>T.BIGINT};return {...Q(a),...D(a)}}var Ix=/^([+-]?\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 hf(){let a={parse:(t,{breadcrumbsPrefix:e=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:e,message:U(t,"string")}]}:Ix.test(t)?{ok:true,value:new Date(t)}:{ok:false,errors:[{path:e,message:U(t,"ISO 8601 date string")}]},json:(t,{breadcrumbsPrefix:e=[]}={})=>t instanceof Date?{ok:true,value:t.toISOString()}:{ok:false,errors:[{path:e,message:U(t,"Date object")}]},getType:()=>T.DATE};return {...Q(a),...D(a)}}function q(a,t){return ()=>{let e={parse:t,json:t,getType:()=>a};return {...Q(e),...D(e)}}}function zi(a){let t=new Set(a);return q(T.ENUM,(o,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:n=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:n,message:U(o,"string")}]}:!t.has(o)&&!i?{ok:false,errors:[{path:n,message:U(o,"enum")}]}:{ok:true,value:o})()}function wf(a){let t=fs(a);return {...t,...D(t)}}function fs(a){return {parse:(t,e)=>hr(a).parse(t,e),json:(t,e)=>hr(a).json(t,e),getType:()=>hr(a).getType()}}function hr(a){let t=a;return t.__zurg_memoized==null&&(t.__zurg_memoized=a()),t.__zurg_memoized}function Lr(a){return Object.entries(a)}function Vr(a,t){let e=new Set(t);return Object.entries(a).reduce((o,[i,n])=>(e.has(i)&&(o[i]=n),o),{})}function De(a){if(typeof a!="object"||a===null)return false;if(Object.getPrototypeOf(a)===null)return true;let t=a;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(a)===t}function Hr(a){return Object.keys(a)}function bf(a,t){let e=[],o=[];for(let i of a)t(i)?e.push(i):o.push(i);return [e,o]}function be(a){return {withParsedProperties:t=>hs(a,t)}}function hs(a,t){let e={parse:(o,i)=>{let n=a.parse(o,i);if(!n.ok)return n;let c=Object.entries(t).reduce((d,[u,g])=>({...d,[u]:typeof g=="function"?g(n.value):g}),{});return {ok:true,value:{...n.value,...c}}},json:(o,i)=>{var d;if(!De(o))return {ok:false,errors:[{path:(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],message:U(o,"object")}]};let n=new Set(Object.keys(t)),c=Vr(o,Object.keys(o).filter(u=>!n.has(u)));return a.json(c,i)},getType:()=>a.getType()};return {...e,...D(e),...be(e)}}function xf(a,t){return {rawKey:a,valueSchema:t,isProperty:true}}function Me(a){return a.isProperty}function vi(a){let t={_getRawProperties:()=>Object.entries(a).map(([e,o])=>Me(o)?o.rawKey:e),_getParsedProperties:()=>Hr(a),parse:(e,o)=>{let i={},n=[];for(let[c,d]of Lr(a)){let u=Me(d)?d.rawKey:c,g=Me(d)?d.valueSchema:d,f={rawKey:u,parsedKey:c,valueSchema:g};i[u]=f,kf(g)&&n.push(u);}return Rf({value:e,requiredKeys:n,getProperty:c=>{let d=i[c];if(d!=null)return {transformedKey:d.parsedKey,transform:u=>{var g;return d.valueSchema.parse(u,{...o,breadcrumbsPrefix:[...(g=o==null?void 0:o.breadcrumbsPrefix)!=null?g:[],c]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},json:(e,o)=>{let i=[];for(let[n,c]of Lr(a)){let d=Me(c)?c.valueSchema:c;kf(d)&&i.push(n);}return Rf({value:e,requiredKeys:i,getProperty:n=>{let c=a[n];if(c!=null)return Me(c)?{transformedKey:c.rawKey,transform:d=>{var u;return c.valueSchema.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}:{transformedKey:n,transform:d=>{var u;return c.json(d,{...o,breadcrumbsPrefix:[...(u=o==null?void 0:o.breadcrumbsPrefix)!=null?u:[],n]})}}},unrecognizedObjectKeys:o==null?void 0:o.unrecognizedObjectKeys,skipValidation:o==null?void 0:o.skipValidation,breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix,omitUndefined:o==null?void 0:o.omitUndefined})},getType:()=>T.OBJECT};return {...Q(t),...D(t),...be(t),...Xe(t)}}function Rf({value:a,requiredKeys:t,getProperty:e,unrecognizedObjectKeys:o="fail",skipValidation:i=false,breadcrumbsPrefix:n=[]}){if(!De(a))return {ok:false,errors:[{path:n,message:U(a,"object")}]};let c=new Set(t),d=[],u={};for(let[g,f]of Object.entries(a)){let y=e(g);if(y!=null){c.delete(g);let z=y.transform(f);z.ok?u[y.transformedKey]=z.value:(u[g]=f,d.push(...z.errors));}else switch(o){case "fail":d.push({path:[...n,g],message:`Unexpected key "${g}"`});break;case "strip":break;case "passthrough":u[g]=f;break}}return d.push(...t.filter(g=>c.has(g)).map(g=>({path:n,message:`Missing required key "${g}"`}))),d.length===0||i?{ok:true,value:u}:{ok:false,errors:d}}function Xe(a){return {extend:t=>{let e={_getParsedProperties:()=>[...a._getParsedProperties(),...t._getParsedProperties()],_getRawProperties:()=>[...a._getRawProperties(),...t._getRawProperties()],parse:(o,i)=>yf({extensionKeys:t._getRawProperties(),value:o,transformBase:n=>a.parse(n,i),transformExtension:n=>t.parse(n,i)}),json:(o,i)=>yf({extensionKeys:t._getParsedProperties(),value:o,transformBase:n=>a.json(n,i),transformExtension:n=>t.json(n,i)}),getType:()=>T.OBJECT};return {...e,...D(e),...be(e),...Xe(e)}},passthrough:()=>{let t={_getParsedProperties:()=>a._getParsedProperties(),_getRawProperties:()=>a._getRawProperties(),parse:(e,o)=>{let i=a.parse(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},json:(e,o)=>{let i=a.json(e,{...o,unrecognizedObjectKeys:"passthrough"});return i.ok?{ok:true,value:{...e,...i.value}}:i},getType:()=>T.OBJECT};return {...t,...D(t),...be(t),...Xe(t)}}}}function yf({extensionKeys:a,value:t,transformBase:e,transformExtension:o}){let i=new Set(a),[n,c]=bf(Hr(t),g=>i.has(g)),d=e(Vr(t,c)),u=o(Vr(t,n));return d.ok&&u.ok?{ok:true,value:{...d.value,...u.value}}:{ok:false,errors:[...d.ok?[]:d.errors,...u.ok?[]:u.errors]}}function kf(a){return !Ux(a)}function Ux(a){switch(a.getType()){case T.ANY:case T.UNKNOWN:case T.OPTIONAL:case T.OPTIONAL_NULLABLE:return true;default:return false}}function zf(a){return vi(a)}function vf(a){let t={...fs(a),_getRawProperties:()=>hr(a)._getRawProperties(),_getParsedProperties:()=>hr(a)._getParsedProperties()};return {...t,...D(t),...be(t),...Xe(t)}}function Si(a){let t={parse:(e,o)=>Sf(e,(i,n)=>{var c;return a.parse(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),json:(e,o)=>Sf(e,(i,n)=>{var c;return a.json(i,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`[${n}]`]})}),getType:()=>T.LIST};return {...Q(t),...D(t)}}function Sf(a,t){return Array.isArray(a)?a.map((o,i)=>t(o,i)).reduce((o,i)=>{if(o.ok&&i.ok)return {ok:true,value:[...o.value,i.value]};let n=[];return o.ok||n.push(...o.errors),i.ok||n.push(...i.errors),{ok:false,errors:n}},{ok:true,value:[]}):{ok:false,errors:[{message:U(a,"list"),path:[]}]}}function _f(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 Af(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 Tf=q(T.ANY,a=>({ok:true,value:a}));var Ef=q(T.BOOLEAN,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="boolean"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"boolean")}]});var Pf=q(T.NUMBER,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="number"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"number")}]});var Cf=q(T.STRING,(a,{breadcrumbsPrefix:t=[]}={})=>typeof a=="string"?{ok:true,value:a}:{ok:false,errors:[{path:t,message:U(a,"string")}]});var jf=q(T.UNKNOWN,a=>({ok:true,value:a}));function Uf(a,t){let e={parse:(o,i)=>If({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.parse(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.parse(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(o,i)=>If({value:o,isKeyNumeric:a.getType()===T.NUMBER,transformKey:n=>{var c;return a.json(n,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${n} (key)`]})},transformValue:(n,c)=>{var d;return t.json(n,{...i,breadcrumbsPrefix:[...(d=i==null?void 0:i.breadcrumbsPrefix)!=null?d:[],`${c}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>T.RECORD};return {...Q(e),...D(e)}}function If({value:a,isKeyNumeric:t,transformKey:e,transformValue:o,breadcrumbsPrefix:i=[]}){return De(a)?Lr(a).reduce((n,[c,d])=>{if(d===void 0)return n;let u=n,g=c;if(t){let v=c.length>0?Number(c):NaN;isNaN(v)||(g=v);}let f=e(g),y=o(d,g);if(u.ok&&f.ok&&y.ok)return {ok:true,value:{...u.value,[f.value]:y.value}};let z=[];return u.ok||z.push(...u.errors),f.ok||z.push(...f.errors),y.ok||z.push(...y.errors),{ok:false,errors:z}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:U(a,"object")}]}}function Df(a){let t=Si(a),e={parse:(o,i)=>{let n=t.parse(o,i);return n.ok?{ok:true,value:new Set(n.value)}:n},json:(o,i)=>{var c;return o instanceof Set?t.json([...o],i):{ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:U(o,"Set")}]}},getType:()=>T.SET};return {...Q(e),...D(e)}}function Nf(a){let t={parse:(e,o)=>Mf((i,n)=>i.parse(e,n),a,o),json:(e,o)=>Mf((i,n)=>i.json(e,n),a,o),getType:()=>T.UNDISCRIMINATED_UNION};return {...Q(t),...D(t)}}function Mf(a,t,e){let o=[];for(let[i,n]of t.entries()){let c=a(n,{...e,skipValidation:false});if(c.ok)return c;for(let d of c.errors)o.push({path:d.path,message:`[Variant ${i}] ${d.message}`});}return {ok:false,errors:o}}function Ff(a,t){return {parsedDiscriminant:a,rawDiscriminant:t}}function Wf(a,t){let e=typeof a=="string"?a:a.rawDiscriminant,o=typeof a=="string"?a:a.parsedDiscriminant,i=zi(Hr(t)),n={parse:(c,d)=>Of({value:c,discriminant:e,transformedDiscriminant:o,transformDiscriminantValue:u=>{var g;return i.parse(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],e]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.parse(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),json:(c,d)=>Of({value:c,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:u=>{var g;return i.json(u,{allowUnrecognizedEnumValues:d==null?void 0:d.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(g=d==null?void 0:d.breadcrumbsPrefix)!=null?g:[],o]})},getAdditionalPropertiesSchema:u=>t[u],allowUnrecognizedUnionMembers:d==null?void 0:d.allowUnrecognizedUnionMembers,transformAdditionalProperties:(u,g)=>g.json(u,d),breadcrumbsPrefix:d==null?void 0:d.breadcrumbsPrefix}),getType:()=>T.UNION};return {...Q(n),...D(n),...be(n)}}function Of({value:a,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:o,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:n=false,transformAdditionalProperties:c,breadcrumbsPrefix:d=[]}){if(!De(a))return {ok:false,errors:[{path:d,message:U(a,"object")}]};let{[t]:u,...g}=a;if(u==null)return {ok:false,errors:[{path:d,message:`Missing discriminant ("${t}")`}]};let f=o(u);if(!f.ok)return {ok:false,errors:f.errors};let y=i(f.value);if(y==null)return n?{ok:true,value:{[e]:f.value,...g}}:{ok:false,errors:[{path:[...d,t],message:"Unexpected discriminant value"}]};let z=c(g,y);return z.ok?{ok:true,value:{[e]:u,...z.value}}:z}function Dx(a){var t=[];if(a.length===0)return "";if(typeof a[0]!="string")throw new TypeError("Url must be a string. Received "+a[0]);if(a[0].match(/^[^/:]+:\/*$/)&&a.length>1){var e=a.shift();a[0]=e+a[0];}a[0].match(/^file:\/\/\//)?a[0]=a[0].replace(/^([^/:]+):\/*/,"$1:///"):a[0]=a[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<a.length;o++){var i=a[o];if(typeof i!="string")throw new TypeError("Url must be a string. Received "+i);i!==""&&(o>0&&(i=i.replace(/^[\/]+/,"")),o<a.length-1?i=i.replace(/[\/]+$/,""):i=i.replace(/[\/]+$/,"/"),t.push(i));}var n=t.join("/");n=n.replace(/\/(\?|&|#[^!])/g,"$1");var c=n.split("?");return n=c.shift()+(c.length>0?"?":"")+c.join("&"),n}function R(){var a;return typeof arguments[0]=="object"?a=arguments[0]:a=[].slice.call(arguments),Dx(a)}var j={};E(j,{AggregationData:()=>pm,Alert:()=>Bx,AlertAlertType:()=>cp,AlertPagePublic:()=>Ap,AlertPublic:()=>at,AlertPublicAlertType:()=>yp,AlertTrigger:()=>gp,AlertTriggerConfig:()=>up,AlertTriggerConfigPublic:()=>Sp,AlertTriggerConfigPublicType:()=>vp,AlertTriggerConfigType:()=>dp,AlertTriggerConfigWrite:()=>hp,AlertTriggerConfigWriteType:()=>fp,AlertTriggerEventType:()=>mp,AlertTriggerPublic:()=>_p,AlertTriggerPublicEventType:()=>zp,AlertTriggerWrite:()=>bp,AlertTriggerWriteEventType:()=>wp,AlertWrite:()=>it,AlertWriteAlertType:()=>xp,AnnotationQueue:()=>Ip,AnnotationQueueBatch:()=>Vx,AnnotationQueueBatchWrite:()=>Qo,AnnotationQueueItemIds:()=>fa,AnnotationQueuePagePublic:()=>Mp,AnnotationQueuePublic:()=>nt,AnnotationQueuePublicScope:()=>Up,AnnotationQueueReviewer:()=>jp,AnnotationQueueReviewerPublic:()=>Dp,AnnotationQueueScope:()=>Cp,AnnotationQueueUpdate:()=>Yo,AnnotationQueueWrite:()=>$o,AnnotationQueueWriteScope:()=>Gs,AssistantMessage:()=>qc,AssistantMessageRole:()=>Zc,Attachment:()=>Np,AttachmentListRequestEntityType:()=>Ti,AttachmentPage:()=>Fp,AudioUrl:()=>Jp,AudioUrlPublic:()=>Ac,AudioUrlWrite:()=>ac,AuthDetailsHolder:()=>Vp,AutomationRuleEvaluator:()=>Jx,AutomationRuleEvaluatorLlmAsJudge:()=>Zp,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ht,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>uc,AutomationRuleEvaluatorObjectObjectPublic:()=>Oc,AutomationRuleEvaluatorPagePublic:()=>Wc,AutomationRuleEvaluatorPublic:()=>Bc,AutomationRuleEvaluatorSpanLlmAsJudge:()=>tc,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>Rt,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>hc,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>ic,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>yt,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>bc,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>ec,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>bt,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>yc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>rc,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>xt,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>zc,AutomationRuleEvaluatorUpdate:()=>Yc,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Jc,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>$c,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>Qc,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>Kc,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>Gc,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>Xc,AutomationRuleEvaluatorUserDefinedMetricPython:()=>qp,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>wt,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>Sc,AutomationRuleEvaluatorWrite:()=>_c,AvgValueStatPublic:()=>Tl,BatchDelete:()=>B,BatchDeleteByProject:()=>mR,BiInformation:()=>ip,BiInformationResponse:()=>Rr,BooleanFeedbackDefinition:()=>um,BooleanFeedbackDefinitionCreate:()=>Rm,BooleanFeedbackDefinitionPublic:()=>Pt,BooleanFeedbackDefinitionUpdate:()=>Mm,BooleanFeedbackDetail:()=>dm,BooleanFeedbackDetailCreate:()=>xm,BooleanFeedbackDetailPublic:()=>Am,BooleanFeedbackDetailUpdate:()=>Dm,CategoricalFeedbackDefinition:()=>fm,CategoricalFeedbackDefinitionCreate:()=>km,CategoricalFeedbackDefinitionPublic:()=>Ct,CategoricalFeedbackDefinitionUpdate:()=>Fm,CategoricalFeedbackDetail:()=>gm,CategoricalFeedbackDetailCreate:()=>ym,CategoricalFeedbackDetailPublic:()=>Tm,CategoricalFeedbackDetailUpdate:()=>Nm,ChatCompletionChoice:()=>rl,ChatCompletionRequest:()=>qo,ChatCompletionResponse:()=>al,Check:()=>$l,CheckName:()=>Kl,CheckPublic:()=>pu,CheckPublicName:()=>nu,CheckPublicResult:()=>su,CheckResult:()=>Gl,ChunkedOutputJsonNode:()=>$x,ChunkedOutputJsonNodePublic:()=>qx,ChunkedOutputJsonNodePublicType:()=>mm,ChunkedOutputJsonNodeType:()=>Bl,Column:()=>Ol,ColumnCompare:()=>ul,ColumnCompareTypesItem:()=>dl,ColumnPublic:()=>Ml,ColumnPublicTypesItem:()=>Dl,ColumnTypesItem:()=>Fl,Comment:()=>H,CommentCompare:()=>gl,CommentPublic:()=>sr,CompleteMultipartUploadRequest:()=>ha,CompleteMultipartUploadRequestEntityType:()=>Op,CompletionTokensDetails:()=>tl,CountValueStatPublic:()=>El,CreateDatasetItemsFromSpansRequest:()=>Qr,CreateDatasetItemsFromTracesRequest:()=>Yr,CreatePromptVersionDetail:()=>Ao,CreatePromptVersionDetailTemplateStructure:()=>ra,DashboardPagePublic:()=>nl,DashboardPublic:()=>nr,DashboardUpdatePublic:()=>rt,DashboardWrite:()=>et,DataPointDouble:()=>dR,DataPointNumberPublic:()=>_d,Dataset:()=>Xx,DatasetExpansion:()=>Gx,DatasetExpansionResponse:()=>ml,DatasetExpansionWrite:()=>ro,DatasetIdentifier:()=>qr,DatasetIdentifierPublic:()=>oo,DatasetItem:()=>zt,DatasetItemBatch:()=>Kx,DatasetItemBatchUpdate:()=>Xr,DatasetItemBatchWrite:()=>$r,DatasetItemCompare:()=>kl,DatasetItemCompareSource:()=>fl,DatasetItemFilter:()=>bs,DatasetItemFilterOperator:()=>ws,DatasetItemPageCompare:()=>zl,DatasetItemPagePublic:()=>Nl,DatasetItemPublic:()=>_t,DatasetItemPublicSource:()=>Il,DatasetItemSource:()=>ll,DatasetItemStreamRequest:()=>to,DatasetItemUpdate:()=>xs,DatasetItemWrite:()=>Gr,DatasetItemWriteSource:()=>Rs,DatasetItemsDelete:()=>eo,DatasetPagePublic:()=>Al,DatasetPublic:()=>_r,DatasetPublicStatus:()=>Sl,DatasetPublicVisibility:()=>vl,DatasetStatus:()=>pl,DatasetUpdate:()=>Zr,DatasetUpdateVisibility:()=>Ui,DatasetVersionCreatePublic:()=>ao,DatasetVersionDiff:()=>Vl,DatasetVersionDiffStats:()=>Ll,DatasetVersionPagePublic:()=>Hl,DatasetVersionPublic:()=>Ar,DatasetVersionRestorePublic:()=>no,DatasetVersionSummary:()=>cl,DatasetVersionSummaryPublic:()=>_l,DatasetVersionTag:()=>io,DatasetVersionUpdatePublic:()=>so,DatasetVisibility:()=>sl,DatasetWrite:()=>Kr,DatasetWriteVisibility:()=>Ii,DeleteAttachmentsRequest:()=>Hx,DeleteAttachmentsRequestEntityType:()=>Bp,DeleteFeedbackScore:()=>Ft,DeleteIdsHolder:()=>Tr,DeleteThreadFeedbackScores:()=>Ho,DeleteTraceThreads:()=>Jo,Delta:()=>el,DownloadAttachmentRequestEntityType:()=>Ei,ErrorCountWithDeviation:()=>Mt,ErrorCountWithDeviationDetailed:()=>Id,ErrorInfo:()=>Te,ErrorInfoExperimentItemBulkWriteView:()=>uo,ErrorInfoPublic:()=>Ot,ErrorInfoWrite:()=>Co,ErrorMessage:()=>ae,ErrorMessageDetail:()=>pR,ErrorMessageDetailed:()=>nR,ErrorMessagePublic:()=>Lx,Experiment:()=>Qx,ExperimentGroupAggregationsResponse:()=>lm,ExperimentGroupResponse:()=>sm,ExperimentItem:()=>co,ExperimentItemBulkRecord:()=>ql,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Ds,ExperimentItemBulkUpload:()=>Yx,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>go,ExperimentItemCompare:()=>yl,ExperimentItemCompareTraceVisibilityMode:()=>Rl,ExperimentItemPublic:()=>St,ExperimentItemPublicTraceVisibilityMode:()=>Ul,ExperimentItemStreamRequest:()=>wo,ExperimentItemTraceVisibilityMode:()=>As,ExperimentItemsBatch:()=>lo,ExperimentItemsDelete:()=>mo,ExperimentPagePublic:()=>tm,ExperimentPublic:()=>Et,ExperimentPublicStatus:()=>rm,ExperimentPublicType:()=>em,ExperimentScore:()=>fo,ExperimentScorePublic:()=>om,ExperimentScoreWrite:()=>zs,ExperimentStatus:()=>Xl,ExperimentStreamRequestPublic:()=>bo,ExperimentType:()=>Jl,ExperimentUpdate:()=>ho,ExperimentUpdateStatus:()=>Oi,ExperimentUpdateType:()=>Fi,ExperimentWrite:()=>po,ExperimentWriteStatus:()=>Ni,ExperimentWriteType:()=>Mi,ExportTraceServiceRequest:()=>tR,Feedback:()=>eR,FeedbackCreate:()=>_m,FeedbackDefinitionPagePublic:()=>jm,FeedbackObjectPublic:()=>Cm,FeedbackPublic:()=>Um,FeedbackScore:()=>ee,FeedbackScoreAverage:()=>ne,FeedbackScoreAverageDetailed:()=>Ud,FeedbackScoreAveragePublic:()=>Qe,FeedbackScoreBatch:()=>Bt,FeedbackScoreBatchItem:()=>au,FeedbackScoreBatchItemSource:()=>iu,FeedbackScoreBatchItemThread:()=>Xs,FeedbackScoreBatchItemThreadSource:()=>Js,FeedbackScoreBatchThread:()=>Xo,FeedbackScoreCompare:()=>xl,FeedbackScoreCompareSource:()=>hl,FeedbackScoreExperimentItemBulkWriteView:()=>Us,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Cs,FeedbackScoreNames:()=>Sd,FeedbackScorePublic:()=>Pr,FeedbackScorePublicSource:()=>qd,FeedbackScoreSource:()=>vs,FeedbackUpdate:()=>Lm,FindFeedbackDefinitionsRequestType:()=>Li,FindFeedbackScoreNames1RequestType:()=>ia,Function:()=>Zo,FunctionCall:()=>Ee,GetSpanStatsRequestType:()=>aa,GetSpansByProjectRequestType:()=>ta,GetWebhookExamplesRequestAlertType:()=>_i,GroupContent:()=>im,GroupContentWithAggregations:()=>cm,GroupDetail:()=>am,GroupDetails:()=>nm,Guardrail:()=>Jm,GuardrailBatch:()=>rR,GuardrailBatchWrite:()=>ot,GuardrailName:()=>Vm,GuardrailResult:()=>Hm,GuardrailWrite:()=>tp,GuardrailWriteName:()=>rp,GuardrailWriteResult:()=>op,GuardrailsValidation:()=>Ql,GuardrailsValidationPublic:()=>cu,IdsHolder:()=>Zx,ImageUrl:()=>Gp,ImageUrlPublic:()=>Ec,ImageUrlWrite:()=>pc,JsonListString:()=>M,JsonListStringCompare:()=>wa,JsonListStringExperimentItemBulkWriteView:()=>xe,JsonListStringPublic:()=>me,JsonListStringWrite:()=>ce,JsonNode:()=>P,JsonNodeDetail:()=>Fs,JsonNodePublic:()=>re,JsonNodeWrite:()=>le,JsonSchema:()=>Zs,LlmAsJudgeCode:()=>st,LlmAsJudgeCodePublic:()=>Ic,LlmAsJudgeCodeWrite:()=>dc,LlmAsJudgeMessage:()=>Ze,LlmAsJudgeMessageContent:()=>Qp,LlmAsJudgeMessageContentPublic:()=>Cc,LlmAsJudgeMessageContentWrite:()=>lc,LlmAsJudgeMessagePublic:()=>ir,LlmAsJudgeMessagePublicRole:()=>Tc,LlmAsJudgeMessageRole:()=>Kp,LlmAsJudgeMessageWrite:()=>rr,LlmAsJudgeMessageWriteRole:()=>sc,LlmAsJudgeModelParameters:()=>Ye,LlmAsJudgeModelParametersPublic:()=>tr,LlmAsJudgeModelParametersWrite:()=>er,LlmAsJudgeOutputSchema:()=>qe,LlmAsJudgeOutputSchemaPublic:()=>ar,LlmAsJudgeOutputSchemaPublicType:()=>jc,LlmAsJudgeOutputSchemaType:()=>Yp,LlmAsJudgeOutputSchemaWrite:()=>or,LlmAsJudgeOutputSchemaWriteType:()=>mc,LogItem:()=>Vc,LogItemLevel:()=>Lc,LogPage:()=>Hc,ManualEvaluationRequest:()=>Dt,ManualEvaluationRequestEntityType:()=>$m,ManualEvaluationResponse:()=>Ut,Message:()=>$s,MultipartUploadPart:()=>Wp,NumericalFeedbackDefinition:()=>wm,NumericalFeedbackDefinitionCreate:()=>vm,NumericalFeedbackDefinitionPublic:()=>jt,NumericalFeedbackDefinitionUpdate:()=>Wm,NumericalFeedbackDetail:()=>hm,NumericalFeedbackDetailCreate:()=>zm,NumericalFeedbackDetailPublic:()=>Em,NumericalFeedbackDetailUpdate:()=>Om,Optimization:()=>iR,OptimizationPagePublic:()=>ya,OptimizationPublic:()=>Er,OptimizationPublicStatus:()=>dd,OptimizationStatus:()=>Qm,OptimizationStudioConfig:()=>td,OptimizationStudioConfigPublic:()=>xd,OptimizationStudioConfigWrite:()=>ld,OptimizationStudioLog:()=>Rd,OptimizationUpdate:()=>yo,OptimizationUpdateStatus:()=>Xi,OptimizationWrite:()=>Ra,OptimizationWriteStatus:()=>md,PageColumns:()=>Wl,PercentageValueStatPublic:()=>Pl,PercentageValues:()=>je,PercentageValuesDetailed:()=>Dd,PercentageValuesPublic:()=>vt,Project:()=>aR,ProjectDetailed:()=>Nd,ProjectDetailedVisibility:()=>Md,ProjectMetricRequestPublic:()=>vo,ProjectMetricRequestPublicInterval:()=>Yi,ProjectMetricRequestPublicMetricType:()=>Qi,ProjectMetricResponsePublic:()=>Pd,ProjectMetricResponsePublicInterval:()=>Td,ProjectMetricResponsePublicMetricType:()=>Ad,ProjectPagePublic:()=>zd,ProjectPublic:()=>Nt,ProjectPublicVisibility:()=>kd,ProjectRetrieveDetailed:()=>So,ProjectStatItemObjectPublic:()=>jl,ProjectStatsPublic:()=>Ne,ProjectStatsSummary:()=>jd,ProjectStatsSummaryItem:()=>Cd,ProjectUpdate:()=>zo,ProjectUpdateVisibility:()=>$i,ProjectVisibility:()=>yd,ProjectWrite:()=>ko,ProjectWriteVisibility:()=>Gi,Prompt:()=>sR,PromptDetail:()=>Hd,PromptDetailTemplateStructure:()=>Vd,PromptPagePublic:()=>Yd,PromptPublic:()=>Qd,PromptPublicTemplateStructure:()=>$d,PromptTemplateStructure:()=>Od,PromptTokensDetails:()=>ol,PromptType:()=>Fd,PromptUpdatable:()=>Eo,PromptVersion:()=>Ld,PromptVersionBatchUpdate:()=>To,PromptVersionDetail:()=>Se,PromptVersionDetailTemplateStructure:()=>Ws,PromptVersionDetailType:()=>Os,PromptVersionLink:()=>ba,PromptVersionLinkPublic:()=>xa,PromptVersionLinkWrite:()=>Bi,PromptVersionPagePublic:()=>Gd,PromptVersionPublic:()=>Kd,PromptVersionPublicTemplateStructure:()=>Xd,PromptVersionPublicType:()=>Jd,PromptVersionRetrieveDetail:()=>Po,PromptVersionTemplateStructure:()=>Bd,PromptVersionType:()=>Wd,PromptVersionUpdate:()=>Bs,PromptWrite:()=>_o,PromptWriteTemplateStructure:()=>ea,PromptWriteType:()=>qi,ProviderApiKey:()=>oR,ProviderApiKeyPagePublic:()=>Km,ProviderApiKeyProvider:()=>Gm,ProviderApiKeyPublic:()=>It,ProviderApiKeyPublicProvider:()=>Xm,ProviderApiKeyUpdate:()=>Ro,ProviderApiKeyWrite:()=>xo,ProviderApiKeyWriteProvider:()=>Hi,ResponseFormat:()=>qs,ResponseFormatType:()=>Ys,Result:()=>pr,ResultsNumberPublic:()=>Ed,ScoreName:()=>vd,ServiceTogglesConfig:()=>Zd,Span:()=>Tt,SpanBatch:()=>cR,SpanBatchUpdate:()=>Do,SpanBatchWrite:()=>Io,SpanEnrichmentOptions:()=>ys,SpanExperimentItemBulkWriteView:()=>Ps,SpanExperimentItemBulkWriteViewType:()=>Es,SpanFilter:()=>Ce,SpanFilterOperator:()=>oc,SpanFilterPublic:()=>Ge,SpanFilterPublicOperator:()=>Hs,SpanFilterWrite:()=>gt,SpanFilterWriteOperator:()=>gc,SpanLlmAsJudgeCode:()=>mt,SpanLlmAsJudgeCodePublic:()=>Nc,SpanLlmAsJudgeCodeWrite:()=>fc,SpanPagePublic:()=>tu,SpanPublic:()=>Wt,SpanPublicType:()=>ou,SpanSearchStreamRequestPublic:()=>Mo,SpanSearchStreamRequestPublicType:()=>na,SpanType:()=>Zl,SpanUpdate:()=>Uo,SpanUpdateType:()=>Vs,SpanUserDefinedMetricPythonCode:()=>dt,SpanUserDefinedMetricPythonCodePublic:()=>Fc,SpanUserDefinedMetricPythonCodeWrite:()=>wc,SpanWrite:()=>jo,SpanWriteType:()=>Ls,SpansCountResponse:()=>np,StartMultipartUploadRequest:()=>Jr,StartMultipartUploadRequestEntityType:()=>Pi,StartMultipartUploadResponse:()=>Lp,StreamOptions:()=>Qs,StudioEvaluation:()=>rd,StudioEvaluationPublic:()=>wd,StudioEvaluationWrite:()=>pd,StudioLlmModel:()=>qm,StudioLlmModelPublic:()=>fd,StudioLlmModelWrite:()=>nd,StudioMessage:()=>Ym,StudioMessagePublic:()=>ud,StudioMessageWrite:()=>id,StudioMetric:()=>ed,StudioMetricPublic:()=>hd,StudioMetricWrite:()=>sd,StudioOptimizer:()=>od,StudioOptimizerPublic:()=>bd,StudioOptimizerWrite:()=>cd,StudioPrompt:()=>Zm,StudioPromptPublic:()=>gd,StudioPromptWrite:()=>ad,Tool:()=>ep,ToolCall:()=>kt,Trace:()=>At,TraceBatch:()=>lR,TraceBatchUpdate:()=>Wo,TraceBatchWrite:()=>Fo,TraceCountResponse:()=>pp,TraceEnrichmentOptions:()=>ks,TraceExperimentItemBulkWriteView:()=>Ts,TraceFilter:()=>Pe,TraceFilterOperator:()=>Xp,TraceFilterPublic:()=>Ae,TraceFilterPublicOperator:()=>Ms,TraceFilterWrite:()=>ut,TraceFilterWriteOperator:()=>nc,TracePagePublic:()=>uu,TracePublic:()=>Lt,TracePublicVisibilityMode:()=>lu,TraceSearchStreamRequestPublic:()=>Go,TraceThread:()=>Vt,TraceThreadBatchIdentifier:()=>Vo,TraceThreadBatchUpdate:()=>Lo,TraceThreadFilter:()=>Re,TraceThreadFilterOperator:()=>Ks,TraceThreadFilterPublic:()=>Ke,TraceThreadFilterPublicOperator:()=>Ns,TraceThreadFilterWrite:()=>ft,TraceThreadFilterWriteOperator:()=>xc,TraceThreadIdentifier:()=>ka,TraceThreadLlmAsJudgeCode:()=>ct,TraceThreadLlmAsJudgeCodePublic:()=>Dc,TraceThreadLlmAsJudgeCodeWrite:()=>Rc,TraceThreadPage:()=>du,TraceThreadSearchStreamRequest:()=>Ko,TraceThreadStatus:()=>mu,TraceThreadUpdate:()=>Bo,TraceThreadUserDefinedMetricPythonCode:()=>lt,TraceThreadUserDefinedMetricPythonCodePublic:()=>Mc,TraceThreadUserDefinedMetricPythonCodeWrite:()=>kc,TraceUpdate:()=>Oo,TraceVisibilityMode:()=>Yl,TraceWrite:()=>No,UploadAttachmentRequestEntityType:()=>Ci,Usage:()=>il,UserDefinedMetricPythonCode:()=>pt,UserDefinedMetricPythonCodePublic:()=>Uc,UserDefinedMetricPythonCodeWrite:()=>vc,ValueEntry:()=>_s,ValueEntryCompare:()=>bl,ValueEntryCompareSource:()=>wl,ValueEntryExperimentItemBulkWriteView:()=>Is,ValueEntryExperimentItemBulkWriteViewSource:()=>js,ValueEntryPublic:()=>ru,ValueEntryPublicSource:()=>eu,ValueEntrySource:()=>Ss,VideoUrl:()=>$p,VideoUrlPublic:()=>Pc,VideoUrlWrite:()=>cc,Webhook:()=>lp,WebhookExamples:()=>Tp,WebhookPublic:()=>kp,WebhookTestResult:()=>Pp,WebhookTestResultStatus:()=>Ep,WebhookWrite:()=>Rp,WelcomeWizardSubmission:()=>tt,WelcomeWizardTracking:()=>gu,WorkspaceConfiguration:()=>Ht,WorkspaceMetricRequest:()=>uR,WorkspaceMetricResponse:()=>za,WorkspaceMetricsSummaryRequest:()=>Cr,WorkspaceMetricsSummaryResponse:()=>fu,WorkspaceNameHolder:()=>Hp,WorkspaceSpansCount:()=>ap,WorkspaceTraceCount:()=>sp,alerts:()=>Ai,annotationQueues:()=>la,attachments:()=>wr,chatCompletions:()=>ma,dashboards:()=>da,datasets:()=>Di,experiments:()=>br,feedbackDefinitions:()=>Vi,guardrails:()=>ua,llmProviderKey:()=>Ji,optimizations:()=>Ki,projects:()=>Zi,prompts:()=>oa,spans:()=>xr,traces:()=>$e,welcomeWizard:()=>ga});var Ai={};E(Ai,{GetWebhookExamplesRequestAlertType:()=>_i});var _i=r.enum_(["general","slack","pagerduty"]);var wr={};E(wr,{AttachmentListRequestEntityType:()=>Ti,DownloadAttachmentRequestEntityType:()=>Ei,StartMultipartUploadRequest:()=>Jr,StartMultipartUploadRequestEntityType:()=>Pi,UploadAttachmentRequestEntityType:()=>Ci,uploadAttachment:()=>ji});var Ti=r.enum_(["trace","span"]);var Ei=r.enum_(["trace","span"]);var Pi=r.enum_(["trace","span"]);var Ci=r.enum_(["trace","span"]);var ji={};E(ji,{Request:()=>Mx});var Mx=r.record(r.string(),r.unknown());var Jr=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",Pi),entityId:r.property("entity_id",r.string()),path:r.string()});var Di={};E(Di,{CreateDatasetItemsFromSpansRequest:()=>Qr,CreateDatasetItemsFromTracesRequest:()=>Yr,DatasetExpansionWrite:()=>ro,DatasetIdentifier:()=>qr,DatasetIdentifierPublic:()=>oo,DatasetItemBatchUpdate:()=>Xr,DatasetItemBatchWrite:()=>$r,DatasetItemStreamRequest:()=>to,DatasetItemsDelete:()=>eo,DatasetUpdate:()=>Zr,DatasetUpdateVisibility:()=>Ui,DatasetVersionCreatePublic:()=>ao,DatasetVersionRestorePublic:()=>no,DatasetVersionTag:()=>io,DatasetVersionUpdatePublic:()=>so,DatasetWrite:()=>Kr,DatasetWriteVisibility:()=>Ii});var Ii=r.enum_(["private","public"]);var Ui=r.enum_(["private","public"]);var ws=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var bs=r.object({field:r.string().optional(),operator:ws.optional(),key:r.string().optional(),value:r.string().optional()});var P=r.record(r.string(),r.unknown());var xs=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 Xr=r.object({ids:r.list(r.string()).optional(),filters:r.list(bs).optional(),update:xs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Kr=r.object({id:r.string().optional(),name:r.string(),visibility:Ii.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});var Rs=r.enum_(["manual","trace","span","sdk"]);var Gr=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Rs,data:P,tags:r.list(r.string()).optional()});var $r=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(Gr)});var ys=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});var Qr=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ys)});var ks=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 Yr=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",ks)});var Zr=r.object({name:r.string(),description:r.string().optional(),visibility:Ui.optional(),tags:r.list(r.string()).optional()});var qr=r.object({datasetName:r.property("dataset_name",r.string())});var eo=r.object({itemIds:r.property("item_ids",r.list(r.string()))});var ro=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 oo=r.object({datasetName:r.property("dataset_name",r.string())});var to=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 io=r.object({tag:r.string()});var ao=r.object({tags:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional()});var no=r.object({versionRef:r.property("version_ref",r.string())});var so=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});var br={};E(br,{ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>go,ExperimentItemStreamRequest:()=>wo,ExperimentItemsBatch:()=>lo,ExperimentItemsDelete:()=>mo,ExperimentStreamRequestPublic:()=>bo,ExperimentUpdate:()=>ho,ExperimentUpdateStatus:()=>Oi,ExperimentUpdateType:()=>Fi,ExperimentWrite:()=>po,ExperimentWriteStatus:()=>Ni,ExperimentWriteType:()=>Mi,findFeedbackScoreNames:()=>Wi});var Mi=r.enum_(["regular","trial","mini-batch"]);var Ni=r.enum_(["running","completed","cancelled"]);var Fi=r.enum_(["regular","trial","mini-batch"]);var Oi=r.enum_(["running","completed","cancelled"]);var Wi={};E(Wi,{Response:()=>Nx});var Nx=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 zs=r.object({name:r.string(),value:r.number()});var Bi=r.object({id:r.string()});var po=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string()),name:r.string().optional(),metadata:ce.optional(),type:Mi.optional(),optimizationId:r.property("optimization_id",r.string().optional()),status:Ni.optional(),experimentScores:r.property("experiment_scores",r.list(zs).optional()),promptVersion:r.property("prompt_version",Bi.optional()),promptVersions:r.property("prompt_versions",r.list(Bi).optional())});var M=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var vs=r.enum_(["ui","sdk","online_scoring"]);var Ss=r.enum_(["ui","sdk","online_scoring"]);var _s=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Ss.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:vs,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(),_s).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 As=r.enum_(["default","hidden"]);var co=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",As.optional())});var lo=r.object({experimentItems:r.property("experiment_items",r.list(co))});var mo=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 uo=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var Ts=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",uo.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Es=r.enum_(["general","tool","llm","guardrail"]);var Ps=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Es.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",uo.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 Cs=r.enum_(["ui","sdk","online_scoring"]);var js=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:js.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:Cs,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 Ds=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",xe.optional()),trace:Ts.optional(),spans:r.list(Ps).optional(),feedbackScores:r.property("feedback_scores",r.list(Us).optional())});var go=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(Ds)});var fo=r.object({name:r.string(),value:r.number()});var ho=r.object({name:r.string().optional(),metadata:P.optional(),type:Fi.optional(),status:Oi.optional(),experimentScores:r.property("experiment_scores",r.list(fo).optional())});var wo=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 bo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional())});var Vi={};E(Vi,{FindFeedbackDefinitionsRequestType:()=>Li});var Li=r.enum_(["numerical","categorical","boolean"]);var Ji={};E(Ji,{ProviderApiKeyUpdate:()=>Ro,ProviderApiKeyWrite:()=>xo,ProviderApiKeyWriteProvider:()=>Hi});var Hi=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var xo=r.object({provider:Hi,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 Ro=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 Ki={};E(Ki,{OptimizationUpdate:()=>yo,OptimizationUpdateStatus:()=>Xi});var Xi=r.enum_(["running","completed","cancelled","initialized","error"]);var yo=r.object({name:r.string().optional(),status:Xi.optional()});var Zi={};E(Zi,{ProjectMetricRequestPublic:()=>vo,ProjectMetricRequestPublicInterval:()=>Yi,ProjectMetricRequestPublicMetricType:()=>Qi,ProjectRetrieveDetailed:()=>So,ProjectUpdate:()=>zo,ProjectUpdateVisibility:()=>$i,ProjectWrite:()=>ko,ProjectWriteVisibility:()=>Gi});var Gi=r.enum_(["private","public"]);var $i=r.enum_(["private","public"]);var Qi=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Yi=r.enum_(["HOURLY","DAILY","WEEKLY"]);var ko=r.object({name:r.string(),visibility:Gi.optional(),description:r.string().optional()});var zo=r.object({name:r.string().optional(),description:r.string().optional(),visibility:$i.optional()});var Ms=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ae=r.object({field:r.string().optional(),operator:Ms.optional(),key:r.string().optional(),value:r.string().optional()});var Ns=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ke=r.object({field:r.string().optional(),operator:Ns.optional(),key:r.string().optional(),value:r.string().optional()});var vo=r.object({metricType:r.property("metric_type",Qi.optional()),interval:Yi.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(Ke).optional())});var So=r.object({name:r.string()});var oa={};E(oa,{CreatePromptVersionDetail:()=>Ao,CreatePromptVersionDetailTemplateStructure:()=>ra,PromptUpdatable:()=>Eo,PromptVersionBatchUpdate:()=>To,PromptVersionRetrieveDetail:()=>Po,PromptWrite:()=>_o,PromptWriteTemplateStructure:()=>ea,PromptWriteType:()=>qi});var qi=r.enum_(["mustache","jinja2"]);var ea=r.enum_(["text","chat"]);var ra=r.enum_(["text","chat"]);var le=r.record(r.string(),r.unknown());var _o=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:qi.optional(),templateStructure:r.property("template_structure",ea.optional()),tags:r.list(r.string()).optional()});var Fs=r.record(r.string(),r.unknown());var Os=r.enum_(["mustache","jinja2"]);var Ws=r.enum_(["text","chat"]);var Se=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:Fs.optional(),type:Os.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Ws.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Ao=r.object({name:r.string(),version:Se,templateStructure:r.property("template_structure",ra.optional())});var Bs=r.object({tags:r.list(r.string()).optional()});var To=r.object({ids:r.list(r.string()),update:Bs,mergeTags:r.property("merge_tags",r.boolean().optional())});var Eo=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});var Po=r.object({name:r.string(),commit:r.string().optional()});var xr={};E(xr,{FindFeedbackScoreNames1RequestType:()=>ia,GetSpanStatsRequestType:()=>aa,GetSpansByProjectRequestType:()=>ta,SpanBatchUpdate:()=>Do,SpanBatchWrite:()=>Io,SpanSearchStreamRequestPublic:()=>Mo,SpanSearchStreamRequestPublicType:()=>na,findFeedbackScoreNames1:()=>sa});var ta=r.enum_(["general","tool","llm","guardrail"]);var ia=r.enum_(["general","tool","llm","guardrail"]);var aa=r.enum_(["general","tool","llm","guardrail"]);var na=r.enum_(["general","tool","llm","guardrail"]);var sa={};E(sa,{Response:()=>Fx});var Fx=r.list(r.string());var Ls=r.enum_(["general","tool","llm","guardrail"]);var Co=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var jo=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:Ls.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",Co.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional())});var Io=r.object({spans:r.list(jo)});var Vs=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 Uo=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:Vs.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 Do=r.object({ids:r.list(r.string()),update:Uo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Hs=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ge=r.object({field:r.string().optional(),operator:Hs.optional(),key:r.string().optional(),value:r.string().optional()});var Mo=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:na.optional(),filters:r.list(Ge).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 $e={};E($e,{DeleteThreadFeedbackScores:()=>Ho,DeleteTraceThreads:()=>Jo,FeedbackScoreBatchThread:()=>Xo,TraceBatchUpdate:()=>Wo,TraceBatchWrite:()=>Fo,TraceSearchStreamRequestPublic:()=>Go,TraceThreadBatchIdentifier:()=>Vo,TraceThreadBatchUpdate:()=>Lo,TraceThreadSearchStreamRequest:()=>Ko,findFeedbackScoreNames2:()=>pa,findTraceThreadsFeedbackScoreNames:()=>ca});var pa={};E(pa,{Response:()=>Ox});var Ox=r.list(r.string());var ca={};E(ca,{Response:()=>Wx});var Wx=r.list(r.string());var No=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",Co.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),threadId:r.property("thread_id",r.string().optional())});var Fo=r.object({traces:r.list(No)});var Oo=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 Wo=r.object({ids:r.list(r.string()),update:Oo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Bo=r.object({tags:r.list(r.string()).optional()});var Lo=r.object({ids:r.list(r.string()),update:Bo,mergeTags:r.property("merge_tags",r.boolean().optional())});var Vo=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 Ho=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 Jo=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 Js=r.enum_(["ui","sdk","online_scoring"]);var Xs=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:Js,author:r.string().optional(),threadId:r.property("thread_id",r.string())});var Xo=r.object({scores:r.list(Xs)});var Ks=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Re=r.object({field:r.string().optional(),operator:Ks.optional(),key:r.string().optional(),value:r.string().optional()});var Ko=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 Go=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 la={};E(la,{AnnotationQueueBatchWrite:()=>Qo,AnnotationQueueUpdate:()=>Yo});var Gs=r.enum_(["trace","thread"]);var $o=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:Gs,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});var Qo=r.object({annotationQueues:r.property("annotation_queues",r.list($o))});var Yo=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 ma={};E(ma,{ChatCompletionRequest:()=>qo});var $s=r.record(r.string(),r.unknown());var Qs=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});var Ys=r.enum_(["text","json_object","json_schema"]);var Zs=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});var qs=r.object({type:Ys.optional(),jsonSchema:r.property("json_schema",Zs.optional())});var Zo=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 ep=r.object({type:r.stringLiteral("function").optional(),function:Zo.optional()});var Ee=r.object({name:r.string().optional(),arguments:r.string().optional()});var qo=r.object({model:r.string().optional(),messages:r.list($s).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",Qs.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",qs.optional()),seed:r.number().optional(),tools:r.list(ep).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(Zo).optional(),functionCall:r.property("function_call",Ee.optional())});var da={};E(da,{DashboardUpdatePublic:()=>rt,DashboardWrite:()=>et});var et=r.object({name:r.string(),description:r.string().optional(),config:le});var re=r.record(r.string(),r.unknown());var rt=r.object({name:r.string().optional(),description:r.string().optional(),config:re.optional()});var ua={};E(ua,{GuardrailBatchWrite:()=>ot});var rp=r.enum_(["TOPIC","PII"]);var op=r.enum_(["passed","failed"]);var tp=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:rp,result:op,config:P,details:P});var ot=r.object({guardrails:r.list(tp)});var ga={};E(ga,{WelcomeWizardSubmission:()=>tt});var tt=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 ip=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});var Rr=r.object({biInformation:r.property("bi_information",r.list(ip).optional())});var ap=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});var np=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(ap).optional())});var sp=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});var pp=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(sp).optional())});var ae=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});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 Bx=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.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var hp=r.object({id:r.string().optional(),type:fp,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});var wp=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);var bp=r.object({id:r.string().optional(),eventType:r.property("event_type",wp),triggerConfigs:r.property("trigger_configs",r.list(hp).optional())});var xp=r.enum_(["general","slack","pagerduty"]);var Rp=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 it=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",xp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:Rp,triggers:r.list(bp).optional()});var B=r.object({ids:r.list(r.string())});var yp=r.enum_(["general","slack","pagerduty"]);var kp=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 zp=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 vp=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);var Sp=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:vp,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 _p=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",zp),triggerConfigs:r.property("trigger_configs",r.list(Sp).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var at=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",yp.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:kp,triggers:r.list(_p).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.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(at).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var Lx=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Tp=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});var Ep=r.enum_(["success","failure"]);var Pp=r.object({status:Ep.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 fa=r.object({ids:r.list(r.string())});var Cp=r.enum_(["trace","thread"]);var jp=r.object({username:r.string().optional(),status:r.number().optional()});var ne=r.object({name:r.string(),value:r.number()});var Ip=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:Cp,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(jp).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 Vx=r.object({annotationQueues:r.property("annotation_queues",r.list(Ip))});var Up=r.enum_(["trace","thread"]);var Dp=r.object({username:r.string().optional(),status:r.number().optional()});var Qe=r.object({name:r.string(),value:r.number()});var nt=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:Up,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(Qe).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 Mp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(nt).optional(),sortableBy:r.list(r.string()).optional()});var Np=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 Fp=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Np).optional(),sortableBy:r.list(r.string()).optional()});var Op=r.enum_(["trace","span"]);var Wp=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});var ha=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Op),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(Wp))});var Bp=r.enum_(["trace","span"]);var Hx=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",Bp),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});var Lp=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 Hp=r.object({workspaceName:r.property("workspace_name",r.string().optional())});var Jp=r.object({url:r.string()});var Xp=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Pe=r.object({field:r.string().optional(),operator:Xp.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",P.optional())});var Kp=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Gp=r.object({url:r.string(),detail:r.string().optional()});var $p=r.object({url:r.string()});var Qp=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Gp.optional()),videoUrl:r.property("video_url",$p.optional()),audioUrl:r.property("audio_url",Jp.optional())});var Ze=r.object({role:Kp,content:r.string().optional(),contentArray:r.property("content_array",r.list(Qp).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var Yp=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var qe=r.object({name:r.string(),type:Yp,description:r.string()});var st=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(Pe).optional(),code:st.optional()});var pt=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var qp=r.object({filters:r.list(Pe).optional(),code:pt.optional()});var ct=r.object({model:Ye,messages:r.list(Ze),schema:r.list(qe)});var ec=r.object({filters:r.list(Re).optional(),code:ct.optional()});var lt=r.object({metric:r.string()});var rc=r.object({filters:r.list(Re).optional(),code:lt.optional()});var oc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var Ce=r.object({field:r.string().optional(),operator:oc.optional(),key:r.string().optional(),value:r.string().optional()});var mt=r.object({model:Ye,messages:r.list(Ze),variables:r.record(r.string(),r.string()),schema:r.list(qe)});var tc=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var dt=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var ic=r.object({filters:r.list(Ce).optional(),code:dt.optional()});var yr=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:r.stringLiteral("evaluator")}),Jx=r.union("type",{llm_as_judge:Zp.extend(yr),user_defined_metric_python:qp.extend(yr),trace_thread_llm_as_judge:ec.extend(yr),trace_thread_user_defined_metric_python:rc.extend(yr),span_llm_as_judge:tc.extend(yr),span_user_defined_metric_python:ic.extend(yr)}).transform({transform:a=>a,untransform:a=>a});var ac=r.object({url:r.string()});var nc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ut=r.object({field:r.string().optional(),operator:nc.optional(),key:r.string().optional(),value:r.string().optional()});var er=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",le.optional())});var sc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var pc=r.object({url:r.string(),detail:r.string().optional()});var cc=r.object({url:r.string()});var lc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",pc.optional()),videoUrl:r.property("video_url",cc.optional()),audioUrl:r.property("audio_url",ac.optional())});var rr=r.object({role:sc,content:r.string().optional(),contentArray:r.property("content_array",r.list(lc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var mc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var or=r.object({name:r.string(),type:mc,description:r.string()});var dc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var uc=r.object({filters:r.list(ut).optional(),code:dc.optional()});var gc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var gt=r.object({field:r.string().optional(),operator:gc.optional(),key:r.string().optional(),value:r.string().optional()});var fc=r.object({model:er,messages:r.list(rr),variables:r.record(r.string(),r.string()),schema:r.list(or)});var hc=r.object({filters:r.list(gt).optional(),code:fc.optional()});var wc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var bc=r.object({filters:r.list(gt).optional(),code:wc.optional()});var xc=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);var ft=r.object({field:r.string().optional(),operator:xc.optional(),key:r.string().optional(),value:r.string().optional()});var Rc=r.object({model:er,messages:r.list(rr),schema:r.list(or)});var yc=r.object({filters:r.list(ft).optional(),code:Rc.optional()});var kc=r.object({metric:r.string()});var zc=r.object({filters:r.list(ft).optional(),code:kc.optional()});var vc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var Sc=r.object({filters:r.list(ut).optional(),code:vc.optional()});var kr=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")}),_c=r.union("type",{llm_as_judge:uc.extend(kr),user_defined_metric_python:Sc.extend(kr),trace_thread_llm_as_judge:yc.extend(kr),trace_thread_user_defined_metric_python:zc.extend(kr),span_llm_as_judge:hc.extend(kr),span_user_defined_metric_python:bc.extend(kr)}).transform({transform:a=>a,untransform:a=>a});var Ac=r.object({url:r.string()});var tr=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",re.optional())});var Tc=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);var Ec=r.object({url:r.string(),detail:r.string().optional()});var Pc=r.object({url:r.string()});var Cc=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Ec.optional()),videoUrl:r.property("video_url",Pc.optional()),audioUrl:r.property("audio_url",Ac.optional())});var ir=r.object({role:Tc,content:r.string().optional(),contentArray:r.property("content_array",r.list(Cc).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});var jc=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);var ar=r.object({name:r.string(),type:jc,description:r.string()});var Ic=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var ht=r.object({filters:r.list(Ae).optional(),code:Ic.optional()});var Uc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var wt=r.object({filters:r.list(Ae).optional(),code:Uc.optional()});var Dc=r.object({model:tr,messages:r.list(ir),schema:r.list(ar)});var bt=r.object({filters:r.list(Ke).optional(),code:Dc.optional()});var Mc=r.object({metric:r.string()});var xt=r.object({filters:r.list(Ke).optional(),code:Mc.optional()});var Nc=r.object({model:tr,messages:r.list(ir),variables:r.record(r.string(),r.string()),schema:r.list(ar)});var Rt=r.object({filters:r.list(Ge).optional(),code:Nc.optional()});var Fc=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});var yt=r.object({filters:r.list(Ge).optional(),code:Fc.optional()});var zr=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")}),Oc=r.union("type",{llm_as_judge:ht.extend(zr),user_defined_metric_python:wt.extend(zr),trace_thread_llm_as_judge:bt.extend(zr),trace_thread_user_defined_metric_python:xt.extend(zr),span_llm_as_judge:Rt.extend(zr),span_user_defined_metric_python:yt.extend(zr)}).transform({transform:a=>a,untransform:a=>a});var Wc=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Oc).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var vr=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")}),Bc=r.union("type",{llm_as_judge:ht.extend(vr),user_defined_metric_python:wt.extend(vr),trace_thread_llm_as_judge:bt.extend(vr),trace_thread_user_defined_metric_python:xt.extend(vr),span_llm_as_judge:Rt.extend(vr),span_user_defined_metric_python:yt.extend(vr)}).transform({transform:a=>a,untransform:a=>a});var Lc=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);var Vc=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:Lc.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});var Hc=r.object({content:r.list(Vc).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Jc=r.object({filters:r.list(Pe).optional(),code:st.optional()});var Xc=r.object({filters:r.list(Pe).optional(),code:pt.optional()});var Kc=r.object({filters:r.list(Re).optional(),code:ct.optional()});var Gc=r.object({filters:r.list(Re).optional(),code:lt.optional()});var $c=r.object({filters:r.list(Ce).optional(),code:mt.optional()});var Qc=r.object({filters:r.list(Ce).optional(),code:dt.optional()});var Sr=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")}),Yc=r.union("type",{llm_as_judge:Jc.extend(Sr),user_defined_metric_python:Xc.extend(Sr),trace_thread_llm_as_judge:Kc.extend(Sr),trace_thread_user_defined_metric_python:Gc.extend(Sr),span_llm_as_judge:$c.extend(Sr),span_user_defined_metric_python:Qc.extend(Sr)}).transform({transform:a=>a,untransform:a=>a});var Zc=r.enum_(["system","user","assistant","tool","function"]);var kt=r.object({id:r.string().optional(),index:r.number().optional(),type:r.stringLiteral("function").optional(),function:Ee.optional()});var qc=r.object({role:Zc.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(kt).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Ee.optional())});var el=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(kt).optional()),functionCall:r.property("function_call",Ee.optional())});var rl=r.object({index:r.number().optional(),message:qc.optional(),delta:el.optional(),finishReason:r.property("finish_reason",r.string().optional())});var ol=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});var tl=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});var il=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",ol.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",tl.optional())});var al=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(rl).optional(),usage:il.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});var nr=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 nl=r.object({content:r.list(nr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});var sl=r.enum_(["private","public"]);var pl=r.enum_(["unknown","processing","completed","failed"]);var cl=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var Xx=r.object({id:r.string().optional(),name:r.string(),visibility:sl.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:pl.optional(),latestVersion:r.property("latest_version",cl.optional())});var ll=r.enum_(["manual","trace","span","sdk"]);var zt=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:ll,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(co).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 Kx=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),items:r.list(zt)});var ml=r.object({generatedSamples:r.property("generated_samples",r.list(zt).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});var Gx=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 dl=r.enum_(["string","number","object","boolean","array","null"]);var ul=r.object({name:r.string().optional(),types:r.list(dl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var gl=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 fl=r.enum_(["manual","trace","span","sdk"]);var wa=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);var hl=r.enum_(["ui","sdk","online_scoring"]);var wl=r.enum_(["ui","sdk","online_scoring"]);var bl=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:wl.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 xl=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:hl,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(),bl).optional())});var Rl=r.enum_(["default","hidden"]);var yl=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:wa.optional(),output:wa.optional(),feedbackScores:r.property("feedback_scores",r.list(xl).optional()),comments:r.list(gl).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",Rl.optional())});var kl=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:fl,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(yl).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 zl=r.object({content:r.list(kl).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(ul).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var vl=r.enum_(["private","public"]);var Sl=r.enum_(["unknown","processing","completed","failed"]);var _l=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});var _r=r.object({id:r.string().optional(),name:r.string(),visibility:vl.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:Sl.optional(),latestVersion:r.property("latest_version",_l.optional())});var Al=r.object({content:r.list(_r).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});var Tl=r.object({value:r.number().optional()});var El=r.object({value:r.number().optional()});var vt=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Pl=r.object({value:vt.optional()});var Cl=r.object({name:r.string().optional()}),jl=r.union("type",{PERCENTAGE:Pl.extend(Cl),COUNT:El.extend(Cl),AVG:Tl.extend(Cl)}).transform({transform:a=>a,untransform:a=>a});var Ne=r.object({stats:r.list(jl).optional()});var Il=r.enum_(["manual","trace","span","sdk"]);var Ul=r.enum_(["default","hidden"]);var St=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 _t=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:Il,data:P,tags:r.list(r.string()).optional(),experimentItems:r.property("experiment_items",r.list(St).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 Dl=r.enum_(["string","number","object","boolean","array","null"]);var Ml=r.object({name:r.string().optional(),types:r.list(Dl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Nl=r.object({content:r.list(_t).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Ml).optional(),sortableBy:r.list(r.string()).optional(),hasDraft:r.boolean().optional()});var Fl=r.enum_(["string","number","object","boolean","array","null"]);var Ol=r.object({name:r.string().optional(),types:r.list(Fl).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});var Wl=r.object({columns:r.list(Ol).optional()});var Bl=r.object({typeName:r.string().optional()});var $x=r.object({type:Bl.optional(),closed:r.boolean().optional()});var Ll=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});var Vl=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:Ll.optional()});var Ar=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Hl=r.object({content:r.list(Ar).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});var Jl=r.enum_(["regular","trial","mini-batch"]);var Xl=r.enum_(["running","completed","cancelled"]);var je=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var ba=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 Qx=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:Jl.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),comments:r.list(H).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:je.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:Xl.optional(),experimentScores:r.property("experiment_scores",r.list(fo).optional()),promptVersion:r.property("prompt_version",ba.optional()),promptVersions:r.property("prompt_versions",r.list(ba).optional())});var Tr=r.object({ids:r.list(r.string())});var Kl=r.enum_(["TOPIC","PII"]);var Gl=r.enum_(["passed","failed"]);var $l=r.object({name:Kl.optional(),result:Gl.optional()});var Ql=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list($l).optional()});var Yl=r.enum_(["default","hidden"]);var At=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(Ql).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",Yl.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 Zl=r.enum_(["general","tool","llm","guardrail"]);var Tt=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:Zl.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 ql=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",M.optional()),trace:At.optional(),spans:r.list(Tt).optional(),feedbackScores:r.property("feedback_scores",r.list(ee).optional())});var Yx=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(ql)});var sr=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 em=r.enum_(["regular","trial","mini-batch"]);var rm=r.enum_(["running","completed","cancelled"]);var om=r.object({name:r.string(),value:r.number()});var xa=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 Et=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:em.optional(),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).optional()),comments:r.list(sr).optional(),traceCount:r.property("trace_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:vt.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:rm.optional(),experimentScores:r.property("experiment_scores",r.list(om).optional()),promptVersion:r.property("prompt_version",xa.optional()),promptVersions:r.property("prompt_versions",r.list(xa).optional())});var tm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Et).optional(),sortableBy:r.list(r.string()).optional()});var im=r.object({label:r.string().optional()});var am=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});var nm=r.object({groupsDetails:r.property("groups_details",r.list(am).optional())});var sm=r.object({content:r.record(r.string(),im).optional(),details:nm.optional()});var pm=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:je.optional(),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),experimentScores:r.property("experiment_scores",r.list(ne).optional())});var cm=r.object({label:r.string().optional(),aggregations:pm.optional()});var lm=r.object({content:r.record(r.string(),cm).optional()});var Zx=r.object({ids:r.list(r.string())});var mm=r.object({typeName:r.string().optional()});var qx=r.object({type:mm.optional(),closed:r.boolean().optional()});var dm=r.object({trueLabel:r.string(),falseLabel:r.string()});var um=r.object({details:dm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var gm=r.object({categories:r.record(r.string(),r.number())});var fm=r.object({details:gm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var hm=r.object({max:r.number(),min:r.number()});var wm=r.object({details:hm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var bm=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()}),eR=r.union("type",{numerical:wm.extend(bm),categorical:fm.extend(bm),boolean:um.extend(bm)}).transform({transform:a=>a,untransform:a=>a});var xm=r.object({trueLabel:r.string(),falseLabel:r.string()});var Rm=r.object({details:xm.optional()});var ym=r.object({categories:r.record(r.string(),r.number())});var km=r.object({details:ym.optional()});var zm=r.object({max:r.number(),min:r.number()});var vm=r.object({details:zm.optional()});var Sm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),_m=r.union("type",{numerical:vm.extend(Sm),categorical:km.extend(Sm),boolean:Rm.extend(Sm)}).transform({transform:a=>a,untransform:a=>a});var Am=r.object({trueLabel:r.string(),falseLabel:r.string()});var Pt=r.object({details:Am.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Tm=r.object({categories:r.record(r.string(),r.number())});var Ct=r.object({details:Tm.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Em=r.object({max:r.number(),min:r.number()});var jt=r.object({details:Em.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});var Pm=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()}),Cm=r.union("type",{numerical:jt.extend(Pm),categorical:Ct.extend(Pm),boolean:Pt.extend(Pm)}).transform({transform:a=>a,untransform:a=>a});var jm=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cm).optional()});var Im=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()}),Um=r.union("type",{numerical:jt.extend(Im),categorical:Ct.extend(Im),boolean:Pt.extend(Im)}).transform({transform:a=>a,untransform:a=>a});var Dm=r.object({trueLabel:r.string(),falseLabel:r.string()});var Mm=r.object({details:Dm.optional()});var Nm=r.object({categories:r.record(r.string(),r.number())});var Fm=r.object({details:Nm.optional()});var Om=r.object({max:r.number(),min:r.number()});var Wm=r.object({details:Om.optional()});var Bm=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Lm=r.union("type",{numerical:Wm.extend(Bm),categorical:Fm.extend(Bm),boolean:Mm.extend(Bm)}).transform({transform:a=>a,untransform:a=>a});var Vm=r.enum_(["TOPIC","PII"]);var Hm=r.enum_(["passed","failed"]);var Jm=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Vm,result:Hm,config:P,details:P});var rR=r.object({guardrails:r.list(Jm)});var Xm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var It=r.object({id:r.string().optional(),provider:Xm,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()),readOnly:r.property("read_only",r.boolean().optional())});var Km=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(It).optional(),sortableBy:r.list(r.string()).optional()});var Gm=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","custom-llm","opik-builtin"]);var oR=r.object({id:r.string().optional(),provider:Gm,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()),readOnly:r.property("read_only",r.boolean().optional())});var Ut=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});var $m=r.enum_(["trace","thread","span"]);var Dt=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",$m)});var tR=P;var Qm=r.enum_(["running","completed","cancelled","initialized","error"]);var Ym=r.object({role:r.string(),content:r.string()});var Zm=r.object({messages:r.list(Ym)});var qm=r.object({model:r.string(),parameters:P.optional()});var ed=r.object({type:r.string(),parameters:P.optional()});var rd=r.object({metrics:r.list(ed)});var od=r.object({type:r.string(),parameters:P.optional()});var td=r.object({datasetName:r.property("dataset_name",r.string()),prompt:Zm,llmModel:r.property("llm_model",qm),evaluation:rd,optimizer:od});var iR=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),objectiveName:r.property("objective_name",r.string()),status:Qm,metadata:M.optional(),studioConfig:r.property("studio_config",td.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(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 id=r.object({role:r.string(),content:r.string()});var ad=r.object({messages:r.list(id)});var nd=r.object({model:r.string(),parameters:le.optional()});var sd=r.object({type:r.string(),parameters:le.optional()});var pd=r.object({metrics:r.list(sd)});var cd=r.object({type:r.string(),parameters:le.optional()});var ld=r.object({datasetName:r.property("dataset_name",r.string()),prompt:ad,llmModel:r.property("llm_model",nd),evaluation:pd,optimizer:cd});var md=r.enum_(["running","completed","cancelled","initialized","error"]);var Ra=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:md,metadata:ce.optional(),studioConfig:r.property("studio_config",ld.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});var dd=r.enum_(["running","completed","cancelled","initialized","error"]);var ud=r.object({role:r.string(),content:r.string()});var gd=r.object({messages:r.list(ud)});var fd=r.object({model:r.string(),parameters:re.optional()});var hd=r.object({type:r.string(),parameters:re.optional()});var wd=r.object({metrics:r.list(hd)});var bd=r.object({type:r.string(),parameters:re.optional()});var xd=r.object({datasetName:r.property("dataset_name",r.string()),prompt:gd,llmModel:r.property("llm_model",fd),evaluation:wd,optimizer:bd});var Er=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:dd,metadata:me.optional(),studioConfig:r.property("studio_config",xd.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Qe).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 ya=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Er).optional(),sortableBy:r.list(r.string()).optional()});var Rd=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});var Mt=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var yd=r.enum_(["private","public"]);var aR=r.object({id:r.string().optional(),name:r.string(),visibility:yd.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:je.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",Mt.optional())});var kd=r.enum_(["private","public"]);var Nt=r.object({id:r.string().optional(),name:r.string(),visibility:kd.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 zd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Nt).optional(),sortableBy:r.list(r.string()).optional()});var vd=r.object({name:r.string().optional(),type:r.string().optional()});var Sd=r.object({scores:r.list(vd).optional()});var _d=r.object({time:r.date(),value:r.number().optional()});var Ad=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES"]);var Td=r.enum_(["HOURLY","DAILY","WEEKLY"]);var Ed=r.object({name:r.string().optional(),data:r.list(_d).optional()});var Pd=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",Ad.optional()),interval:Td.optional(),results:r.list(Ed).optional()});var Cd=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ne).optional()),duration:je.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",Mt.optional())});var jd=r.object({content:r.list(Cd).optional()});var Id=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});var Ud=r.object({name:r.string(),value:r.number()});var Dd=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});var Md=r.enum_(["private","public"]);var Nd=r.object({id:r.string().optional(),name:r.string(),visibility:Md.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(Ud).optional()),duration:Dd.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",Id.optional())});var nR=r.object({errors:r.list(r.string()).optional()});var Fd=r.enum_(["mustache","jinja2"]);var Od=r.enum_(["text","chat"]);var Wd=r.enum_(["mustache","jinja2"]);var Bd=r.enum_(["text","chat"]);var Ld=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:Wd.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Bd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var sR=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:Fd.optional(),templateStructure:r.property("template_structure",Od.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",Ld.optional())});var pR=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});var Vd=r.enum_(["text","chat"]);var Hd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",Vd.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Se.optional())});var Jd=r.enum_(["mustache","jinja2"]);var Xd=r.enum_(["text","chat"]);var Kd=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:re.optional(),type:Jd.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Xd.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});var Gd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Kd).optional(),sortableBy:r.list(r.string()).optional()});var $d=r.enum_(["text","chat"]);var Qd=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),templateStructure:r.property("template_structure",$d.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});var Yd=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Qd).optional(),sortableBy:r.list(r.string()).optional()});var Zd=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),dashboardsEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),opikbuiltinProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean()});var cR=r.object({spans:r.list(Tt)});var Ft=r.object({name:r.string(),author:r.string().optional()});var Ot=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});var qd=r.enum_(["ui","sdk","online_scoring"]);var eu=r.enum_(["ui","sdk","online_scoring"]);var ru=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:eu.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:qd,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(),ru).optional())});var ou=r.enum_(["general","tool","llm","guardrail"]);var Wt=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:ou.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",Ot.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(sr).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 tu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Wt).optional(),sortableBy:r.list(r.string()).optional()});var iu=r.enum_(["ui","sdk","online_scoring"]);var au=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:iu,author:r.string().optional(),id:r.string()});var Bt=r.object({scores:r.list(au)});var lR=r.object({traces:r.list(At)});var mR=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});var nu=r.enum_(["TOPIC","PII"]);var su=r.enum_(["passed","failed"]);var pu=r.object({name:nu.optional(),result:su.optional()});var cu=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(pu).optional()});var lu=r.enum_(["default","hidden"]);var Lt=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",Ot.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(sr).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(cu).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",lu.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 mu=r.enum_(["active","inactive"]);var Vt=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:mu.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 ka=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 du=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vt).optional(),sortableBy:r.list(r.string()).optional()});var uu=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Lt).optional(),sortableBy:r.list(r.string()).optional()});var gu=r.object({completed:r.boolean().optional()});var pr=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 dR=r.object({time:r.date(),value:r.number().optional()});var za=r.object({results:r.list(pr).optional()});var uR=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 Ht=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional())});var fu=r.object({results:r.list(pr).optional()});var va=class{constructor(t={}){this._options=t;}getDatasetBiInfo(t){return w.fromPromise(this.__getDatasetBiInfo(t))}async __getDatasetBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-datasets.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getExperimentBiInfo(t){return w.fromPromise(this.__getExperimentBiInfo(t))}async __getExperimentBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-experiments.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansBiInfo(t){return w.fromPromise(this.__getSpansBiInfo(t))}async __getSpansBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-spans.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getSpansCountForWorkspaces(t){return w.fromPromise(this.__getSpansCountForWorkspaces(t))}async __getSpansCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:np.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/workspace-span-counts.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesBiInfo(t){return w.fromPromise(this.__getTracesBiInfo(t))}async __getTracesBiInfo(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Rr.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/internal/usage/bi-traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}getTracesCountForWorkspaces(t){return w.fromPromise(this.__getTracesCountForWorkspaces(t))}async __getTracesCountForWorkspaces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:pp.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 Sa=class{constructor(t={}){this._options=t;}findAlerts(t={},e){return w.fromPromise(this.__findAlerts(t,e))}async __findAlerts(t={},e){var g,f;let{page:o,size:i,sorting:n,filters:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.sorting=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:Ap.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createAlert(t,e){return w.fromPromise(this.__createAlert(t,e))}async __createAlert(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:it.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAlertBatch(t,e){return w.fromPromise(this.__deleteAlertBatch(t,e))}async __deleteAlertBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAlertById(t,e){return w.fromPromise(this.__getAlertById(t,e))}async __getAlertById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:at.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(t,e,o){return w.fromPromise(this.__updateAlert(t,e,o))}async __updateAlert(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/alerts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:it.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/alerts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getWebhookExamples(t={},e){return w.fromPromise(this.__getWebhookExamples(t,e))}async __getWebhookExamples(t={},e){var c,d;let{alertType:o}=t,i={};o!=null&&(i.alert_type=_i.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}));let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Tp.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/alerts/webhooks/examples.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}testWebhook(t,e){return w.fromPromise(this.__testWebhook(t,e))}async __testWebhook(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:it.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/alerts/webhooks/tests.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var _a=class{constructor(t={}){this._options=t;}addItemsToAnnotationQueue(t,e,o){return w.fromPromise(this.__addItemsToAnnotationQueue(t,e,o))}async __addItemsToAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/add`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/add.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findAnnotationQueues(t={},e){return w.fromPromise(this.__findAnnotationQueues(t,e))}async __findAnnotationQueues(t={},e){var f,y;let{page:o,size:i,name:n,filters:c,sorting:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.filters=c),d!=null&&(u.sorting=d);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":m.type,"X-Fern-Runtime-Version":m.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:Mp.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/annotation-queues.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createAnnotationQueue(t,e){return w.fromPromise(this.__createAnnotationQueue(t,e))}async __createAnnotationQueue(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createAnnotationQueueBatch(t,e){return w.fromPromise(this.__createAnnotationQueueBatch(t,e))}async __createAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Qo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAnnotationQueueBatch(t,e){return w.fromPromise(this.__deleteAnnotationQueueBatch(t,e))}async __deleteAnnotationQueueBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getAnnotationQueueById(t,e){return w.fromPromise(this.__getAnnotationQueueById(t,e))}async __getAnnotationQueueById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:nt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new 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(t,e={},o){return w.fromPromise(this.__updateAnnotationQueue(t,e,o))}async __updateAnnotationQueue(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/annotation-queues/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}removeItemsFromAnnotationQueue(t,e,o){return w.fromPromise(this.__removeItemsFromAnnotationQueue(t,e,o))}async __removeItemsFromAnnotationQueue(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/annotation-queues/${encodeURIComponent(t)}/items/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:fa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/annotation-queues/{id}/items/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Aa=class{constructor(t={}){this._options=t;}attachmentList(t,e){return w.fromPromise(this.__attachmentList(t,e))}async __attachmentList(t,e){var y,z;let{page:o,size:i,projectId:n,entityType:c,entityId:d,path:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),g.project_id=n,g.entity_type=Ti.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d,g.path=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/list"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Fp.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/list.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}completeMultiPartUpload(t,e){return w.fromPromise(this.__completeMultiPartUpload(t,e))}async __completeMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ha.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-complete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAttachments(t,e){return w.fromPromise(this.__deleteAttachments(t,e))}async __deleteAttachments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ha.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}downloadAttachment(t,e){return w.fromPromise(this.__downloadAttachment(t,e))}async __downloadAttachment(t,e){var y,z;let{workspaceName:o,containerId:i,entityType:n,entityId:c,fileName:d,mimeType:u}=t,g={};o!=null&&(g.workspace_name=o),g.container_id=i,g.entity_type=Ei.jsonOrThrow(n,{unrecognizedObjectKeys:"strip"}),g.entity_id=c,g.file_name=d,g.mime_type=u;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/download"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(f.ok)return {data:f.body,rawResponse:f.rawResponse};if(f.error.reason==="status-code")switch(f.error.statusCode){case 401:throw new $(f.error.body,f.rawResponse);case 403:throw new Z(ae.parseOrThrow(f.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),f.rawResponse);default:throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse})}switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/attachment/download.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}startMultiPartUpload(t,e){return w.fromPromise(this.__startMultiPartUpload(t,e))}async __startMultiPartUpload(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/attachment/upload-start"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/attachment/upload-start.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}uploadAttachment(t,e){return w.fromPromise(this.__uploadAttachment(t,e))}async __uploadAttachment(t,e){var y,z;let{fileName:o,projectName:i,mimeType:n,entityType:c,entityId:d,body:u}=t,g={};g.file_name=o,i!=null&&(g.project_name=i),n!=null&&(g.mime_type=n),g.entity_type=Ci.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"}),g.entity_id=d;let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/attachment/upload"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:g,requestType:"json",body:wr.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 Ta=class{constructor(t={}){this._options=t;}access(t,e){return w.fromPromise(this.__access(t,e))}async __access(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/auth"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/auth.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getWorkspaceName(t){return w.fromPromise(this.__getWorkspaceName(t))}async __getWorkspaceName(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/auth/workspace"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Hp.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 Ea=class{constructor(t={}){this._options=t;}findEvaluators(t={},e){return w.fromPromise(this.__findEvaluators(t,e))}async __findEvaluators(t={},e){var z,v;let{projectId:o,id:i,name:n,filters:c,sorting:d,page:u,size:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.id=i),n!=null&&(f.name=n),c!=null&&(f.filters=c),d!=null&&(f.sorting=d),u!=null&&(f.page=u.toString()),g!=null&&(f.size=g.toString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/automations/evaluators"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Wc.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}createAutomationRuleEvaluator(t,e){return w.fromPromise(this.__createAutomationRuleEvaluator(t,e))}async __createAutomationRuleEvaluator(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/automations/evaluators"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_c.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteAutomationRuleEvaluatorBatch(t,e){return w.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(t,e))}async __deleteAutomationRuleEvaluatorBatch(t,e){var d,u;let{projectId:o,body:i}=t,n={};o!=null&&(n.project_id=o);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:n,requestType:"json",body:B.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/automations/evaluators/delete.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getEvaluatorById(t,e={},o){return w.fromPromise(this.__getEvaluatorById(t,e,o))}async __getEvaluatorById(t,e={},o){var d,u;let{projectId:i}=e,n={};i!=null&&(n.project_id=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Bc.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}updateAutomationRuleEvaluator(t,e,o){return w.fromPromise(this.__updateAutomationRuleEvaluator(t,e,o))}async __updateAutomationRuleEvaluator(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yc.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/automations/evaluators/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getEvaluatorLogsById(t,e={},o){return w.fromPromise(this.__getEvaluatorLogsById(t,e,o))}async __getEvaluatorLogsById(t,e={},o){var d,u;let{size:i}=e,n={};i!=null&&(n.size=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/automations/evaluators/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Hc.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 Pa=class{constructor(t={}){this._options=t;}createChatCompletions(t={},e){return w.fromPromise(this.__createChatCompletions(t,e))}async __createChatCompletions(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/chat/completions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:al.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 Ca=class{constructor(t={}){this._options=t;}findDashboards(t={},e){return w.fromPromise(this.__findDashboards(t,e))}async __findDashboards(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.sorting=c);let u=await x({url:R((f=(g=await s.get(this._options.baseUrl))!=null?g:await s.get(this._options.environment))!=null?f:b.Default,"v1/private/dashboards"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:nl.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/dashboards.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createDashboard(t,e){return w.fromPromise(this.__createDashboard(t,e))}async __createDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:et.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDashboardById(t,e){return w.fromPromise(this.__getDashboardById(t,e))}async __getDashboardById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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")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(t,e){return w.fromPromise(this.__deleteDashboard(t,e))}async __deleteDashboard(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDashboard(t,e={},o){return w.fromPromise(this.__updateDashboard(t,e,o))}async __updateDashboard(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/dashboards/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:rt.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:nr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/dashboards/{dashboardId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDashboardsBatch(t,e){return w.fromPromise(this.__deleteDashboardsBatch(t,e))}async __deleteDashboardsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/dashboards/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var ja=class{constructor(t={}){this._options=t;}batchUpdateDatasetItems(t,e){return w.fromPromise(this.__batchUpdateDatasetItems(t,e))}async __batchUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")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(t={},e){return w.fromPromise(this.__findDatasets(t,e))}async __findDatasets(t={},e){var v,S;let{page:o,size:i,withExperimentsOnly:n,withOptimizationsOnly:c,promptId:d,name:u,sorting:g,filters:f}=t,y={};o!=null&&(y.page=o.toString()),i!=null&&(y.size=i.toString()),n!=null&&(y.with_experiments_only=n.toString()),c!=null&&(y.with_optimizations_only=c.toString()),d!=null&&(y.prompt_id=d),u!=null&&(y.name=u),g!=null&&(y.sorting=g),f!=null&&(y.filters=f);let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,"v1/private/datasets"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(z.ok)return {data:Al.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}createDataset(t,e){return w.fromPromise(this.__createDataset(t,e))}async __createDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Kr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createOrUpdateDatasetItems(t,e){return w.fromPromise(this.__createOrUpdateDatasetItems(t,e))}async __createOrUpdateDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:$r.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createDatasetItemsFromCsv(t,e){return w.fromPromise(this.__createDatasetItemsFromCsv(t,e))}async __createDatasetItemsFromCsv(t,e){var c,d;let o=await uf();o.append("file",Ue(t.file)),o.append("dataset_id",t.datasetId);let i=await o.getRequest(),n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i.headers,...e==null?void 0:e.headers},requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(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(t,e,o){return w.fromPromise(this.__createDatasetItemsFromSpans(t,e,o))}async __createDatasetItemsFromSpans(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-spans`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Qr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-spans.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createDatasetItemsFromTraces(t,e,o){return w.fromPromise(this.__createDatasetItemsFromTraces(t,e,o))}async __createDatasetItemsFromTraces(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/from-traces`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Yr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{dataset_id}/items/from-traces.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetById(t,e){return w.fromPromise(this.__getDatasetById(t,e))}async __getDatasetById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateDataset(t,e,o){return w.fromPromise(this.__updateDataset(t,e,o))}async __updateDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Zr.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/datasets/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteDataset(t,e){return w.fromPromise(this.__deleteDataset(t,e))}async __deleteDataset(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetByName(t,e){return w.fromPromise(this.__deleteDatasetByName(t,e))}async __deleteDatasetByName(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:qr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetItems(t,e){return w.fromPromise(this.__deleteDatasetItems(t,e))}async __deleteDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:eo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteDatasetsBatch(t,e){return w.fromPromise(this.__deleteDatasetsBatch(t,e))}async __deleteDatasetsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/delete-batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}expandDataset(t,e,o){return w.fromPromise(this.__expandDataset(t,e,o))}async __expandDataset(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/expansions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:ml.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/expansions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findDatasetItemsWithExperimentItems(t,e,o){return w.fromPromise(this.__findDatasetItemsWithExperimentItems(t,e,o))}async __findDatasetItemsWithExperimentItems(t,e,o){var v,S;let{page:i,size:n,experimentIds:c,filters:d,sorting:u,search:g,truncate:f}=e,y={};i!=null&&(y.page=i.toString()),n!=null&&(y.size=n.toString()),y.experiment_ids=c,d!=null&&(y.filters=d),u!=null&&(y.sorting=u),g!=null&&(y.search=g),f!=null&&(y.truncate=f.toString());let z=await x({url:R((S=(v=await s.get(this._options.baseUrl))!=null?v:await s.get(this._options.environment))!=null?S:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",queryParameters:y,requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(z.ok)return {data:zl.parseOrThrow(z.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:z.rawResponse};if(z.error.reason==="status-code")throw new p({statusCode:z.error.statusCode,body:z.error.body,rawResponse:z.rawResponse});switch(z.error.reason){case "non-json":throw new p({statusCode:z.error.statusCode,body:z.error.rawBody,rawResponse:z.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items.");case "unknown":throw new p({message:z.error.errorMessage,rawResponse:z.rawResponse})}}getDatasetByIdentifier(t,e){return w.fromPromise(this.__getDatasetByIdentifier(t,e))}async __getDatasetByIdentifier(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:oo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:_r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getDatasetExperimentItemsStats(t,e,o){return w.fromPromise(this.__getDatasetExperimentItemsStats(t,e,o))}async __getDatasetExperimentItemsStats(t,e,o){var u,g;let{experimentIds:i,filters:n}=e,c={};c.experiment_ids=i,n!=null&&(c.filters=n);let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/stats`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:Ne.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.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:d.error.errorMessage,rawResponse:d.rawResponse})}}getDatasetItemById(t,e){return w.fromPromise(this.__getDatasetItemById(t,e))}async __getDatasetItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:_t.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}patchDatasetItem(t,e,o){return w.fromPromise(this.__patchDatasetItem(t,e,o))}async __patchDatasetItem(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/items/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/items/{itemId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getDatasetItems(t,e={},o){return w.fromPromise(this.__getDatasetItems(t,e,o))}async __getDatasetItems(t,e={},o){var y,z;let{page:i,size:n,version:c,filters:d,truncate:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.version=c),d!=null&&(g.filters=d),u!=null&&(g.truncate=u.toString());let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Nl.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new p({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});switch(f.error.reason){case "non-json":throw new p({statusCode:f.error.statusCode,body:f.error.rawBody,rawResponse:f.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}getDatasetItemsOutputColumns(t,e={},o){return w.fromPromise(this.__getDatasetItemsOutputColumns(t,e,o))}async __getDatasetItemsOutputColumns(t,e={},o){var d,u;let{experimentIds:i}=e,n={};i!=null&&(n.experiment_ids=i);let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/items/experiments/items/output/columns`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Wl.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/items/experiments/items/output/columns.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}streamDatasetItems(t,e){return w.fromPromise(this.__streamDatasetItems(t,e))}async __streamDatasetItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/datasets/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:to.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}compareDatasetVersions(t,e){return w.fromPromise(this.__compareDatasetVersions(t,e))}async __compareDatasetVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/diff`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Vl.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(t,e,o,i){return w.fromPromise(this.__createVersionTag(t,e,o,i))}async __createVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}/tags`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:io.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/hash/{versionHash}/tags.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}listDatasetVersions(t,e={},o){return w.fromPromise(this.__listDatasetVersions(t,e,o))}async __listDatasetVersions(t,e={},o){var u,g;let{page:i,size:n}=e,c={};i!=null&&(c.page=i.toString()),n!=null&&(c.size=n.toString());let d=await x({url:R((g=(u=await s.get(this._options.baseUrl))!=null?u:await s.get(this._options.environment))!=null?g:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:Hl.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}createDatasetVersion(t,e={},o){return w.fromPromise(this.__createDatasetVersion(t,e,o))}async __createDatasetVersion(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ao.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteVersionTag(t,e,o,i){return w.fromPromise(this.__deleteVersionTag(t,e,o,i))}async __deleteVersionTag(t,e,o,i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(o)}/versions/${encodeURIComponent(t)}/tags/${encodeURIComponent(e)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:void 0,rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}restoreDatasetVersion(t,e,o){return w.fromPromise(this.__restoreDatasetVersion(t,e,o))}async __restoreDatasetVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/datasets/${encodeURIComponent(t)}/versions/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:no.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Ar.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/datasets/{id}/versions/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateDatasetVersion(t,e,o={},i){return w.fromPromise(this.__updateDatasetVersion(t,e,o,i))}async __updateDatasetVersion(t,e,o={},i){var c,d;let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d:b.Default,`v1/private/datasets/${encodeURIComponent(e)}/versions/hash/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...i==null?void 0:i.headers},contentType:"application/json",requestType:"json",body:so.jsonOrThrow(o,{unrecognizedObjectKeys:"strip"}),timeoutMs:(i==null?void 0:i.timeoutInSeconds)!=null?i.timeoutInSeconds*1e3:6e4,maxRetries:i==null?void 0:i.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal});if(n.ok)return {data:Ar.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")switch(n.error.statusCode){case 400:throw new _(n.error.body,n.rawResponse);case 404:throw new A(n.error.body,n.rawResponse);case 409:throw new N(n.error.body,n.rawResponse);default:throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse})}switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/datasets/{id}/versions/hash/{versionHash}.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ia=class{constructor(t={}){this._options=t;}findExperiments(t={},e){return w.fromPromise(this.__findExperiments(t,e))}async __findExperiments(t={},e){var O,F;let{page:o,size:i,datasetId:n,optimizationId:c,types:d,name:u,datasetDeleted:g,promptId:f,sorting:y,filters:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.datasetId=n),c!=null&&(v.optimization_id=c),d!=null&&(v.types=d),u!=null&&(v.name=u),g!=null&&(v.dataset_deleted=g.toString()),f!=null&&(v.prompt_id=f),y!=null&&(v.sorting=y),z!=null&&(v.filters=z);let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/experiments"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:tm.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(t,e){return w.fromPromise(this.__createExperiment(t,e))}async __createExperiment(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:po.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createExperimentItems(t,e){return w.fromPromise(this.__createExperimentItems(t,e))}async __createExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentItems(t,e){return w.fromPromise(this.__deleteExperimentItems(t,e))}async __deleteExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteExperimentsById(t,e){return w.fromPromise(this.__deleteExperimentsById(t,e))}async __deleteExperimentsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}experimentItemsBulk(t,e){return w.fromPromise(this.__experimentItemsBulk(t,e))}async __experimentItemsBulk(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:go.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/experiments/items/bulk.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames(t={},e){return w.fromPromise(this.__findFeedbackScoreNames(t,e))}async __findFeedbackScoreNames(t={},e){var c,d;let{experimentIds:o}=t,i={};o!=null&&(i.experiment_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:br.findFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/experiments/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findExperimentGroups(t={},e){return w.fromPromise(this.__findExperimentGroups(t,e))}async __findExperimentGroups(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:sm.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(t={},e){return w.fromPromise(this.__findExperimentGroupsAggregations(t,e))}async __findExperimentGroupsAggregations(t={},e){var g,f;let{groups:o,types:i,name:n,filters:c}=t,d={};o!=null&&(d.groups=o),i!=null&&(d.types=i),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:lm.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(t,e){return w.fromPromise(this.__finishExperiments(t,e))}async __finishExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/finish"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/finish.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getExperimentById(t,e){return w.fromPromise(this.__getExperimentById(t,e))}async __getExperimentById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Et.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")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(t,e={},o){return w.fromPromise(this.__updateExperiment(t,e,o))}async __updateExperiment(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/experiments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ho.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/experiments/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getExperimentItemById(t,e){return w.fromPromise(this.__getExperimentItemById(t,e))}async __getExperimentItemById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/experiments/items/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:St.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(t,e){return w.fromPromise(this.__streamExperimentItems(t,e))}async __streamExperimentItems(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/items/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:wo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/items/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}streamExperiments(t,e){return w.fromPromise(this.__streamExperiments(t,e))}async __streamExperiments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/experiments/stream"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:bo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/experiments/stream.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ua=class{constructor(t={}){this._options=t;}findFeedbackDefinitions(t={},e){return w.fromPromise(this.__findFeedbackDefinitions(t,e))}async __findFeedbackDefinitions(t={},e){var g,f;let{page:o,size:i,name:n,type:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.type=Li.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:jm.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createFeedbackDefinition(t,e){return w.fromPromise(this.__createFeedbackDefinition(t,e))}async __createFeedbackDefinition(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_m.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/feedback-definitions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getFeedbackDefinitionById(t,e){return w.fromPromise(this.__getFeedbackDefinitionById(t,e))}async __getFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Um.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateFeedbackDefinition(t,e,o){return w.fromPromise(this.__updateFeedbackDefinition(t,e,o))}async __updateFeedbackDefinition(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Lm.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteFeedbackDefinitionById(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionById(t,e))}async __deleteFeedbackDefinitionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/feedback-definitions/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/feedback-definitions/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteFeedbackDefinitionsBatch(t,e){return w.fromPromise(this.__deleteFeedbackDefinitionsBatch(t,e))}async __deleteFeedbackDefinitionsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-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 Da=class{constructor(t={}){this._options=t;}createGuardrails(t,e){return w.fromPromise(this.__createGuardrails(t,e))}async __createGuardrails(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/guardrails"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ot.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/guardrails.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ma=class{constructor(t={}){this._options=t;}deleteLlmProviderApiKeysBatch(t,e){return w.fromPromise(this.__deleteLlmProviderApiKeysBatch(t,e))}async __deleteLlmProviderApiKeysBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findLlmProviderKeys(t){return w.fromPromise(this.__findLlmProviderKeys(t))}async __findLlmProviderKeys(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/llm-provider-key"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Km.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/llm-provider-key.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}storeLlmProviderApiKey(t,e){return w.fromPromise(this.__storeLlmProviderApiKey(t,e))}async __storeLlmProviderApiKey(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/llm-provider-key"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new Z(ae.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/llm-provider-key.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getLlmProviderApiKeyById(t,e){return w.fromPromise(this.__getLlmProviderApiKeyById(t,e))}async __getLlmProviderApiKeyById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:It.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(t,e={},o){return w.fromPromise(this.__updateLlmProviderApiKey(t,e,o))}async __updateLlmProviderApiKey(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/llm-provider-key/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ro.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new $(i.error.body,i.rawResponse);case 403:throw new Z(ae.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/llm-provider-key/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Na=class{constructor(t={}){this._options=t;}evaluateSpans(t,e){return w.fromPromise(this.__evaluateSpans(t,e))}async __evaluateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Dt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ut.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/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}evaluateThreads(t,e){return w.fromPromise(this.__evaluateThreads(t,e))}async __evaluateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Dt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ut.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(t,e){return w.fromPromise(this.__evaluateTraces(t,e))}async __evaluateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Dt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ut.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 Fa=class{constructor(t={}){this._options=t;}receiveProtobufTraces(t){return w.fromPromise(this.__receiveProtobufTraces(t))}async __receiveProtobufTraces(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/otel/v1/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/otel/v1/traces.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Oa=class{constructor(t={}){this._options=t;}cancelStudioOptimizations(t,e){return w.fromPromise(this.__cancelStudioOptimizations(t,e))}async __cancelStudioOptimizations(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/cancel`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/optimizations/studio/{id}/cancel.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findOptimizations(t={},e){return w.fromPromise(this.__findOptimizations(t,e))}async __findOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:ya.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(t,e){return w.fromPromise(this.__createOptimization(t,e))}async __createOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ra.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}upsertOptimization(t,e){return w.fromPromise(this.__upsertOptimization(t,e))}async __upsertOptimization(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ra.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteOptimizationsById(t,e){return w.fromPromise(this.__deleteOptimizationsById(t,e))}async __deleteOptimizationsById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/optimizations/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Tr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/optimizations/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findStudioOptimizations(t={},e){return w.fromPromise(this.__findStudioOptimizations(t,e))}async __findStudioOptimizations(t={},e){var y,z;let{page:o,size:i,datasetId:n,name:c,datasetDeleted:d,filters:u}=t,g={};o!=null&&(g.page=o.toString()),i!=null&&(g.size=i.toString()),n!=null&&(g.dataset_id=n),c!=null&&(g.name=c),d!=null&&(g.dataset_deleted=d.toString()),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,"v1/private/optimizations/studio"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:ya.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(t,e){return w.fromPromise(this.__getOptimizationById(t,e))}async __getOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Er.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(t,e={},o){return w.fromPromise(this.__updateOptimizationsById(t,e,o))}async __updateOptimizationsById(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/optimizations/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:yo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/optimizations/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getStudioOptimizationById(t,e){return w.fromPromise(this.__getStudioOptimizationById(t,e))}async __getStudioOptimizationById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Er.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(t,e){return w.fromPromise(this.__getStudioOptimizationLogs(t,e))}async __getStudioOptimizationLogs(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/optimizations/studio/${encodeURIComponent(t)}/logs`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Rd.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 Wa=class{constructor(t={}){this._options=t;}findProjects(t={},e){return w.fromPromise(this.__findProjects(t,e))}async __findProjects(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:zd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}createProject(t,e){return w.fromPromise(this.__createProject(t,e))}async __createProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ko.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getProjectById(t,e){return w.fromPromise(this.__getProjectById(t,e))}async __getProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Nt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteProjectById(t,e){return w.fromPromise(this.__deleteProjectById(t,e))}async __deleteProjectById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/projects/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateProject(t,e={},o){return w.fromPromise(this.__updateProject(t,e,o))}async __updateProject(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:zo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/projects/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteProjectsBatch(t,e){return w.fromPromise(this.__deleteProjectsBatch(t,e))}async __deleteProjectsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNamesByProjectIds(t={},e){return w.fromPromise(this.__findFeedbackScoreNamesByProjectIds(t,e))}async __findFeedbackScoreNamesByProjectIds(t={},e){var c,d;let{projectIds:o}=t,i={};o!=null&&(i.project_ids=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:Sd.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getProjectMetrics(t,e={},o){return w.fromPromise(this.__getProjectMetrics(t,e,o))}async __getProjectMetrics(t,e={},o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/projects/${encodeURIComponent(t)}/metrics`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:vo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Pd.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/{id}/metrics.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getProjectStats(t={},e){return w.fromPromise(this.__getProjectStats(t,e))}async __getProjectStats(t={},e){var g,f;let{page:o,size:i,name:n,sorting:c}=t,d={};o!=null&&(d.page=o.toString()),i!=null&&(d.size=i.toString()),n!=null&&(d.name=n),c!=null&&(d.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":m.type,"X-Fern-Runtime-Version":m.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(u.ok)return {data:jd.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new p({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});switch(u.error.reason){case "non-json":throw new p({statusCode:u.error.statusCode,body:u.error.rawBody,rawResponse:u.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/projects/stats.");case "unknown":throw new p({message:u.error.errorMessage,rawResponse:u.rawResponse})}}retrieveProject(t,e){return w.fromPromise(this.__retrieveProject(t,e))}async __retrieveProject(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/projects/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:So.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Nd.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 L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/projects/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ba=class{constructor(t={}){this._options=t;}getPrompts(t={},e){return w.fromPromise(this.__getPrompts(t,e))}async __getPrompts(t={},e){var f,y;let{page:o,size:i,name:n,sorting:c,filters:d}=t,u={};o!=null&&(u.page=o.toString()),i!=null&&(u.size=i.toString()),n!=null&&(u.name=n),c!=null&&(u.sorting=c),d!=null&&(u.filters=d);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":m.type,"X-Fern-Runtime-Version":m.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:Yd.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/prompts.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}createPrompt(t,e){return w.fromPromise(this.__createPrompt(t,e))}async __createPrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:_o.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 409:throw new N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}createPromptVersion(t,e){return w.fromPromise(this.__createPromptVersion(t,e))}async __createPromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ao.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 N(o.error.body,o.rawResponse);case 422:throw new L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updatePromptVersions(t,e){return w.fromPromise(this.__updatePromptVersions(t,e))}async __updatePromptVersions(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions"),method:"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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:To.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-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/prompts/versions.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptById(t,e){return w.fromPromise(this.__getPromptById(t,e))}async __getPromptById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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: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 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(t,e,o){return w.fromPromise(this.__updatePrompt(t,e,o))}async __updatePrompt(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);case 409:throw new N(i.error.body,i.rawResponse);case 422:throw new L(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/prompts/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deletePrompt(t,e){return w.fromPromise(this.__deletePrompt(t,e))}async __deletePrompt(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/prompts/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deletePromptsBatch(t,e){return w.fromPromise(this.__deletePromptsBatch(t,e))}async __deletePromptsBatch(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getPromptVersionById(t,e){return w.fromPromise(this.__getPromptVersionById(t,e))}async __getPromptVersionById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/prompts/versions/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(t,e={},o){return w.fromPromise(this.__getPromptVersions(t,e,o))}async __getPromptVersions(t,e={},o){var y,z;let{page:i,size:n,search:c,sorting:d,filters:u}=e,g={};i!=null&&(g.page=i.toString()),n!=null&&(g.size=n.toString()),c!=null&&(g.search=c),d!=null&&(g.sorting=d),u!=null&&(g.filters=u);let f=await x({url:R((z=(y=await s.get(this._options.baseUrl))!=null?y:await s.get(this._options.environment))!=null?z:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Gd.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/prompts/{id}/versions.");case "unknown":throw new p({message:f.error.errorMessage,rawResponse:f.rawResponse})}}restorePromptVersion(t,e,o){return w.fromPromise(this.__restorePromptVersion(t,e,o))}async __restorePromptVersion(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/prompts/${encodeURIComponent(t)}/versions/${encodeURIComponent(e)}/restore`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:Se.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new _(i.error.body,i.rawResponse);case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/{promptId}/versions/{versionId}/restore.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}retrievePromptVersion(t,e){return w.fromPromise(this.__retrievePromptVersion(t,e))}async __retrievePromptVersion(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Po.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data: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 L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/prompts/versions/retrieve.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var La=class{constructor(t={}){this._options=t;}getServiceToggles(t){return w.fromPromise(this.__getServiceToggles(t))}async __getServiceToggles(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/toggles"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Zd.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/toggles.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Va=class{constructor(t={}){this._options=t;}addSpanComment(t,e,o){return w.fromPromise(this.__addSpanComment(t,e,o))}async __addSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addSpanFeedbackScore(t,e,o){return w.fromPromise(this.__addSpanFeedbackScore(t,e,o))}async __addSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createSpans(t,e){return w.fromPromise(this.__createSpans(t,e))}async __createSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Io.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateSpans(t,e){return w.fromPromise(this.__batchUpdateSpans(t,e))}async __batchUpdateSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Do.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 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(t={},e){return w.fromPromise(this.__getSpansByProject(t,e))}async __getSpansByProject(t={},e){var te,dr;let{page:o,size:i,projectName:n,projectId:c,traceId:d,type:u,filters:g,truncate:f,stripAttachments:y,sorting:z,exclude:v,fromTime:S,toTime:O}=t,F={};o!=null&&(F.page=o.toString()),i!=null&&(F.size=i.toString()),n!=null&&(F.project_name=n),c!=null&&(F.project_id=c),d!=null&&(F.trace_id=d),u!=null&&(F.type=ta.jsonOrThrow(u,{unrecognizedObjectKeys:"strip"})),g!=null&&(F.filters=g),f!=null&&(F.truncate=f.toString()),y!=null&&(F.strip_attachments=y.toString()),z!=null&&(F.sorting=z),v!=null&&(F.exclude=v),S!=null&&(F.from_time=S.toISOString()),O!=null&&(F.to_time=O.toISOString());let G=await x({url:R((dr=(te=await s.get(this._options.baseUrl))!=null?te:await s.get(this._options.environment))!=null?dr: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:F,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(G.ok)return {data:tu.parseOrThrow(G.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:G.rawResponse};if(G.error.reason==="status-code")throw new p({statusCode:G.error.statusCode,body:G.error.body,rawResponse:G.rawResponse});switch(G.error.reason){case "non-json":throw new p({statusCode:G.error.statusCode,body:G.error.rawBody,rawResponse:G.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans.");case "unknown":throw new p({message:G.error.errorMessage,rawResponse:G.rawResponse})}}createSpan(t,e){return w.fromPromise(this.__createSpan(t,e))}async __createSpan(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 409:throw new N(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getSpanById(t,e={},o){return w.fromPromise(this.__getSpanById(t,e,o))}async __getSpanById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Wt.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(t,e){return w.fromPromise(this.__deleteSpanById(t,e))}async __deleteSpanById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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 Je(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/spans/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpan(t,e,o){return w.fromPromise(this.__updateSpan(t,e,o))}async __updateSpan(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Uo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteSpanComments(t,e){return w.fromPromise(this.__deleteSpanComments(t,e))}async __deleteSpanComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteSpanFeedbackScore(t,e,o){return w.fromPromise(this.__deleteSpanFeedbackScore(t,e,o))}async __deleteSpanFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ft.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}findFeedbackScoreNames1(t={},e){return w.fromPromise(this.__findFeedbackScoreNames1(t,e))}async __findFeedbackScoreNames1(t={},e){var d,u;let{projectId:o,type:i}=t,n={};o!=null&&(n.project_id=o),i!=null&&(n.type=ia.jsonOrThrow(i,{unrecognizedObjectKeys:"strip"}));let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.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:xr.findFeedbackScoreNames1.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/feedback-scores/names.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}getSpanComment(t,e,o){return w.fromPromise(this.__getSpanComment(t,e,o))}async __getSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/{spanId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getSpanStats(t={},e){return w.fromPromise(this.__getSpanStats(t,e))}async __getSpanStats(t={},e){var z,v;let{projectId:o,projectName:i,traceId:n,type:c,filters:d,fromTime:u,toTime:g}=t,f={};o!=null&&(f.project_id=o),i!=null&&(f.project_name=i),n!=null&&(f.trace_id=n),c!=null&&(f.type=aa.jsonOrThrow(c,{unrecognizedObjectKeys:"strip"})),d!=null&&(f.filters=d),u!=null&&(f.from_time=u.toISOString()),g!=null&&(f.to_time=g.toISOString());let y=await x({url:R((v=(z=await s.get(this._options.baseUrl))!=null?z:await s.get(this._options.environment))!=null?v:b.Default,"v1/private/spans/stats"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Ne.parseOrThrow(y.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:y.rawResponse};if(y.error.reason==="status-code")throw new p({statusCode:y.error.statusCode,body:y.error.body,rawResponse:y.rawResponse});switch(y.error.reason){case "non-json":throw new p({statusCode:y.error.statusCode,body:y.error.rawBody,rawResponse:y.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/spans/stats.");case "unknown":throw new p({message:y.error.errorMessage,rawResponse:y.rawResponse})}}scoreBatchOfSpans(t,e){return w.fromPromise(this.__scoreBatchOfSpans(t,e))}async __scoreBatchOfSpans(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/spans/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchSpans(t={},e){return w.fromPromise(this.__searchSpans(t,e))}async __searchSpans(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/spans/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Mo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/spans/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateSpanComment(t,e,o){return w.fromPromise(this.__updateSpanComment(t,e,o))}async __updateSpanComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/spans/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/spans/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ha=class{constructor(t={}){this._options=t;}addThreadComment(t,e,o){return w.fromPromise(this.__addThreadComment(t,e,o))}async __addThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceComment(t,e,o){return w.fromPromise(this.__addTraceComment(t,e,o))}async __addTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/comments`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/comments.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}addTraceFeedbackScore(t,e,o){return w.fromPromise(this.__addTraceFeedbackScore(t,e,o))}async __addTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores`),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:ee.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/{id}/feedback-scores.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}createTraces(t,e){return w.fromPromise(this.__createTraces(t,e))}async __createTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Fo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateTraces(t,e){return w.fromPromise(this.__batchUpdateTraces(t,e))}async __batchUpdateTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Wo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}batchUpdateThreads(t,e){return w.fromPromise(this.__batchUpdateThreads(t,e))}async __batchUpdateThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Lo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/batch.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}closeTraceThread(t={},e){return w.fromPromise(this.__closeTraceThread(t,e))}async __closeTraceThread(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/close"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Vo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 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(t={},e){return w.fromPromise(this.__getTracesByProject(t,e))}async __getTracesByProject(t={},e){var F,G;let{page:o,size:i,projectName:n,projectId:c,filters:d,truncate:u,stripAttachments:g,sorting:f,exclude:y,fromTime:z,toTime:v}=t,S={};o!=null&&(S.page=o.toString()),i!=null&&(S.size=i.toString()),n!=null&&(S.project_name=n),c!=null&&(S.project_id=c),d!=null&&(S.filters=d),u!=null&&(S.truncate=u.toString()),g!=null&&(S.strip_attachments=g.toString()),f!=null&&(S.sorting=f),y!=null&&(S.exclude=y),z!=null&&(S.from_time=z.toISOString()),v!=null&&(S.to_time=v.toISOString());let O=await x({url:R((G=(F=await s.get(this._options.baseUrl))!=null?F:await s.get(this._options.environment))!=null?G:b.Default,"v1/private/traces"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:uu.parseOrThrow(O.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:O.rawResponse};if(O.error.reason==="status-code")throw new p({statusCode:O.error.statusCode,body:O.error.body,rawResponse:O.rawResponse});switch(O.error.reason){case "non-json":throw new p({statusCode:O.error.statusCode,body:O.error.rawBody,rawResponse:O.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces.");case "unknown":throw new p({message:O.error.errorMessage,rawResponse:O.rawResponse})}}createTrace(t,e){return w.fromPromise(this.__createTrace(t,e))}async __createTrace(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:No.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}getTraceById(t,e={},o){return w.fromPromise(this.__getTraceById(t,e,o))}async __getTraceById(t,e={},o){var d,u;let{stripAttachments:i}=e,n={};i!=null&&(n.strip_attachments=i.toString());let c=await x({url:R((u=(d=await s.get(this._options.baseUrl))!=null?d:await s.get(this._options.environment))!=null?u:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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:Lt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new p({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});switch(c.error.reason){case "non-json":throw new p({statusCode:c.error.statusCode,body:c.error.rawBody,rawResponse:c.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{id}.");case "unknown":throw new p({message:c.error.errorMessage,rawResponse:c.rawResponse})}}deleteTraceById(t,e){return w.fromPromise(this.__deleteTraceById(t,e))}async __deleteTraceById(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling DELETE /v1/private/traces/{id}.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateTrace(t,e,o){return w.fromPromise(this.__updateTrace(t,e,o))}async __updateTrace(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.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(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/{id}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteThreadComments(t,e){return w.fromPromise(this.__deleteThreadComments(t,e))}async __deleteThreadComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteThreadFeedbackScores(t,e){return w.fromPromise(this.__deleteThreadFeedbackScores(t,e))}async __deleteThreadFeedbackScores(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ho.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/feedback-scores/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceComments(t,e){return w.fromPromise(this.__deleteTraceComments(t,e))}async __deleteTraceComments(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/comments/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/comments/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraceFeedbackScore(t,e,o){return w.fromPromise(this.__deleteTraceFeedbackScore(t,e,o))}async __deleteTraceFeedbackScore(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(t)}/feedback-scores/delete`),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Ft.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/{id}/feedback-scores/delete.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}deleteTraceThreads(t,e){return w.fromPromise(this.__deleteTraceThreads(t,e))}async __deleteTraceThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteTraces(t,e){return w.fromPromise(this.__deleteTraces(t,e))}async __deleteTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/delete"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:B.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/delete.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}findFeedbackScoreNames2(t={},e){return w.fromPromise(this.__findFeedbackScoreNames2(t,e))}async __findFeedbackScoreNames2(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findFeedbackScoreNames2.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}findTraceThreadsFeedbackScoreNames(t={},e){return w.fromPromise(this.__findTraceThreadsFeedbackScoreNames(t,e))}async __findTraceThreadsFeedbackScoreNames(t={},e){var c,d;let{projectId:o}=t,i={};o!=null&&(i.project_id=o);let n=await x({url:R((d=(c=await s.get(this._options.baseUrl))!=null?c:await s.get(this._options.environment))!=null?d: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":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:i,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(n.ok)return {data:$e.findTraceThreadsFeedbackScoreNames.Response.parseOrThrow(n.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:n.rawResponse};if(n.error.reason==="status-code")throw new p({statusCode:n.error.statusCode,body:n.error.body,rawResponse:n.rawResponse});switch(n.error.reason){case "non-json":throw new p({statusCode:n.error.statusCode,body:n.error.rawBody,rawResponse:n.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/feedback-scores/names.");case "unknown":throw new p({message:n.error.errorMessage,rawResponse:n.rawResponse})}}getTraceStats(t={},e){return w.fromPromise(this.__getTraceStats(t,e))}async __getTraceStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.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":m.type,"X-Fern-Runtime-Version":m.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:Ne.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new p({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});switch(g.error.reason){case "non-json":throw new p({statusCode:g.error.statusCode,body:g.error.rawBody,rawResponse:g.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getThreadComment(t,e,o){return w.fromPromise(this.__getThreadComment(t,e,o))}async __getThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads/{threadId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThreadStats(t={},e){return w.fromPromise(this.__getTraceThreadStats(t,e))}async __getTraceThreadStats(t={},e){var f,y;let{projectId:o,projectName:i,filters:n,fromTime:c,toTime:d}=t,u={};o!=null&&(u.project_id=o),i!=null&&(u.project_name=i),n!=null&&(u.filters=n),c!=null&&(u.from_time=c.toISOString()),d!=null&&(u.to_time=d.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/threads/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":m.type,"X-Fern-Runtime-Version":m.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:Ne.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/threads/stats.");case "unknown":throw new p({message:g.error.errorMessage,rawResponse:g.rawResponse})}}getTraceComment(t,e,o){return w.fromPromise(this.__getTraceComment(t,e,o))}async __getTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/${encodeURIComponent(e)}/comments/${encodeURIComponent(t)}`),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:H.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/{traceId}/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}getTraceThread(t,e){return w.fromPromise(this.__getTraceThread(t,e))}async __getTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ka.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Vt.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new 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(t={},e){return w.fromPromise(this.__getTraceThreads(t,e))}async __getTraceThreads(t={},e){var O,F;let{page:o,size:i,projectName:n,projectId:c,truncate:d,stripAttachments:u,filters:g,sorting:f,fromTime:y,toTime:z}=t,v={};o!=null&&(v.page=o.toString()),i!=null&&(v.size=i.toString()),n!=null&&(v.project_name=n),c!=null&&(v.project_id=c),d!=null&&(v.truncate=d.toString()),u!=null&&(v.strip_attachments=u.toString()),g!=null&&(v.filters=g),f!=null&&(v.sorting=f),y!=null&&(v.from_time=y.toISOString()),z!=null&&(v.to_time=z.toISOString());let S=await x({url:R((F=(O=await s.get(this._options.baseUrl))!=null?O:await s.get(this._options.environment))!=null?F:b.Default,"v1/private/traces/threads"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",queryParameters:v,requestType:"json",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(S.ok)return {data:du.parseOrThrow(S.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:S.rawResponse};if(S.error.reason==="status-code")throw new p({statusCode:S.error.statusCode,body:S.error.body,rawResponse:S.rawResponse});switch(S.error.reason){case "non-json":throw new p({statusCode:S.error.statusCode,body:S.error.rawBody,rawResponse:S.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/traces/threads.");case "unknown":throw new p({message:S.error.errorMessage,rawResponse:S.rawResponse})}}openTraceThread(t,e){return w.fromPromise(this.__openTraceThread(t,e))}async __openTraceThread(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/open"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:ka.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/open.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfThreads(t,e){return w.fromPromise(this.__scoreBatchOfThreads(t,e))}async __scoreBatchOfThreads(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Xo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/threads/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}scoreBatchOfTraces(t,e){return w.fromPromise(this.__scoreBatchOfTraces(t,e))}async __scoreBatchOfTraces(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Bt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/traces/feedback-scores.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraceThreads(t={},e){return w.fromPromise(this.__searchTraceThreads(t,e))}async __searchTraceThreads(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/threads/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ko.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/threads/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}searchTraces(t={},e){return w.fromPromise(this.__searchTraces(t,e))}async __searchTraces(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/traces/search"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Go.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),responseType:"streaming",timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new _(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/traces/search.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}updateThread(t,e,o){return w.fromPromise(this.__updateThread(t,e,o))}async __updateThread(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:Bo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/{threadModelId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateThreadComment(t,e,o){return w.fromPromise(this.__updateThreadComment(t,e,o))}async __updateThreadComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/threads/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/threads/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}updateTraceComment(t,e,o){return w.fromPromise(this.__updateTraceComment(t,e,o))}async __updateTraceComment(t,e,o){var n,c;let i=await x({url:R((c=(n=await s.get(this._options.baseUrl))!=null?n:await s.get(this._options.environment))!=null?c:b.Default,`v1/private/traces/comments/${encodeURIComponent(t)}`),method:"PATCH",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...o==null?void 0:o.headers},contentType:"application/json",requestType:"json",body:H.jsonOrThrow(e,{unrecognizedObjectKeys:"strip"}),timeoutMs:(o==null?void 0:o.timeoutInSeconds)!=null?o.timeoutInSeconds*1e3:6e4,maxRetries:o==null?void 0:o.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new A(i.error.body,i.rawResponse);default:throw new p({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}switch(i.error.reason){case "non-json":throw new p({statusCode:i.error.statusCode,body:i.error.rawBody,rawResponse:i.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PATCH /v1/private/traces/comments/{commentId}.");case "unknown":throw new p({message:i.error.errorMessage,rawResponse:i.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Ja=class{constructor(t={}){this._options=t;}getWelcomeWizardStatus(t){return w.fromPromise(this.__getWelcomeWizardStatus(t))}async __getWelcomeWizardStatus(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/welcome-wizard"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:gu.parseOrThrow(e.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,breadcrumbsPrefix:["response"]}),rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/private/welcome-wizard.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}submitWelcomeWizard(t={},e){return w.fromPromise(this.__submitWelcomeWizard(t,e))}async __submitWelcomeWizard(t={},e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/welcome-wizard"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:tt.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling POST /v1/private/welcome-wizard.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Xa=class{constructor(t={}){this._options=t;}costsSummary(t,e){return w.fromPromise(this.__costsSummary(t,e))}async __costsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:pr.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(t){return w.fromPromise(this.__getWorkspaceConfiguration(t))}async __getWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:Ht.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(t,e){return w.fromPromise(this.__upsertWorkspaceConfiguration(t,e))}async __upsertWorkspaceConfiguration(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Ht.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:Ht.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 L(o.error.body,o.rawResponse);default:throw new p({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}switch(o.error.reason){case "non-json":throw new p({statusCode:o.error.statusCode,body:o.error.rawBody,rawResponse:o.rawResponse});case "timeout":throw new h("Timeout exceeded when calling PUT /v1/private/workspaces/configurations.");case "unknown":throw new p({message:o.error.errorMessage,rawResponse:o.rawResponse})}}deleteWorkspaceConfiguration(t){return w.fromPromise(this.__deleteWorkspaceConfiguration(t))}async __deleteWorkspaceConfiguration(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:void 0,rawResponse:e.rawResponse};if(e.error.reason==="status-code")switch(e.error.statusCode){case 404:throw new 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(t,e){return w.fromPromise(this.__getCost(t,e))}async __getCost(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/costs"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:za.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(t,e){return w.fromPromise(this.__getMetric(t,e))}async __getMetric(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:za.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(t,e){return w.fromPromise(this.__metricsSummary(t,e))}async __metricsSummary(t,e){var i,n;let o=await x({url:R((n=(i=await s.get(this._options.baseUrl))!=null?i:await s.get(this._options.environment))!=null?n:b.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...e==null?void 0:e.headers},contentType:"application/json",requestType:"json",body:Cr.jsonOrThrow(t,{unrecognizedObjectKeys:"strip"}),timeoutMs:(e==null?void 0:e.timeoutInSeconds)!=null?e.timeoutInSeconds*1e3:6e4,maxRetries:e==null?void 0:e.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal});if(o.ok)return {data:fu.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 Ka=class{constructor(t={}){this._options=t;}datasetsRedirect(t,e){return w.fromPromise(this.__datasetsRedirect(t,e))}async __datasetsRedirect(t,e){var u,g;let{datasetId:o,workspaceName:i,path:n}=t,c={};c.dataset_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=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":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/datasets.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}experimentsRedirect(t,e){return w.fromPromise(this.__experimentsRedirect(t,e))}async __experimentsRedirect(t,e){var g,f;let{datasetId:o,experimentId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.experiment_id=i,n!=null&&(d.workspace_name=n),d.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":m.type,"X-Fern-Runtime-Version":m.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(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(t,e){return w.fromPromise(this.__optimizationsRedirect(t,e))}async __optimizationsRedirect(t,e){var g,f;let{datasetId:o,optimizationId:i,workspaceName:n,path:c}=t,d={};d.dataset_id=o,d.optimization_id=i,n!=null&&(d.workspace_name=n),d.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":m.type,"X-Fern-Runtime-Version":m.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(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(t,e){return w.fromPromise(this.__projectsRedirect(t,e))}async __projectsRedirect(t,e){var u,g;let{traceId:o,workspaceName:i,path:n}=t,c={};c.trace_id=o,i!=null&&(c.workspace_name=i),c.path=n;let d=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":m.type,"X-Fern-Runtime-Version":m.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(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new _(d.error.body,d.rawResponse);case 404:throw new A(d.error.body,d.rawResponse);default:throw new p({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}switch(d.error.reason){case "non-json":throw new p({statusCode:d.error.statusCode,body:d.error.rawBody,rawResponse:d.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /v1/session/redirect/projects.");case "unknown":throw new p({message:d.error.errorMessage,rawResponse:d.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var Jt=class{constructor(t={}){this._options=t;}get systemUsage(){var t;return (t=this._systemUsage)!=null?t:this._systemUsage=new va(this._options)}get alerts(){var t;return (t=this._alerts)!=null?t:this._alerts=new Sa(this._options)}get annotationQueues(){var t;return (t=this._annotationQueues)!=null?t:this._annotationQueues=new _a(this._options)}get attachments(){var t;return (t=this._attachments)!=null?t:this._attachments=new Aa(this._options)}get check(){var t;return (t=this._check)!=null?t:this._check=new Ta(this._options)}get automationRuleEvaluators(){var t;return (t=this._automationRuleEvaluators)!=null?t:this._automationRuleEvaluators=new Ea(this._options)}get chatCompletions(){var t;return (t=this._chatCompletions)!=null?t:this._chatCompletions=new Pa(this._options)}get dashboards(){var t;return (t=this._dashboards)!=null?t:this._dashboards=new Ca(this._options)}get datasets(){var t;return (t=this._datasets)!=null?t:this._datasets=new ja(this._options)}get experiments(){var t;return (t=this._experiments)!=null?t:this._experiments=new Ia(this._options)}get feedbackDefinitions(){var t;return (t=this._feedbackDefinitions)!=null?t:this._feedbackDefinitions=new Ua(this._options)}get guardrails(){var t;return (t=this._guardrails)!=null?t:this._guardrails=new Da(this._options)}get llmProviderKey(){var t;return (t=this._llmProviderKey)!=null?t:this._llmProviderKey=new Ma(this._options)}get manualEvaluation(){var t;return (t=this._manualEvaluation)!=null?t:this._manualEvaluation=new Na(this._options)}get openTelemetryIngestion(){var t;return (t=this._openTelemetryIngestion)!=null?t:this._openTelemetryIngestion=new Fa(this._options)}get optimizations(){var t;return (t=this._optimizations)!=null?t:this._optimizations=new Oa(this._options)}get projects(){var t;return (t=this._projects)!=null?t:this._projects=new Wa(this._options)}get prompts(){var t;return (t=this._prompts)!=null?t:this._prompts=new Ba(this._options)}get serviceToggles(){var t;return (t=this._serviceToggles)!=null?t:this._serviceToggles=new La(this._options)}get spans(){var t;return (t=this._spans)!=null?t:this._spans=new Va(this._options)}get traces(){var t;return (t=this._traces)!=null?t:this._traces=new Ha(this._options)}get welcomeWizard(){var t;return (t=this._welcomeWizard)!=null?t:this._welcomeWizard=new Ja(this._options)}get workspaces(){var t;return (t=this._workspaces)!=null?t:this._workspaces=new Xa(this._options)}get redirect(){var t;return (t=this._redirect)!=null?t:this._redirect=new Ka(this._options)}isAlive(t){return w.fromPromise(this.__isAlive(t))}async __isAlive(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ping"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ping.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}version(t){return w.fromPromise(this.__version(t))}async __version(t){var o,i;let e=await x({url:R((i=(o=await s.get(this._options.baseUrl))!=null?o:await s.get(this._options.environment))!=null?i:b.Default,"is-alive/ver"),method:"GET",headers:{"Comet-Workspace":await s.get(this._options.workspaceName)!=null?await s.get(this._options.workspaceName):void 0,"X-Fern-Language":"JavaScript","X-Fern-Runtime":m.type,"X-Fern-Runtime-Version":m.version,...await this._getCustomAuthorizationHeaders(),...t==null?void 0:t.headers},contentType:"application/json",requestType:"json",timeoutMs:(t==null?void 0:t.timeoutInSeconds)!=null?t.timeoutInSeconds*1e3:6e4,maxRetries:t==null?void 0:t.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal});if(e.ok)return {data:e.body,rawResponse:e.rawResponse};if(e.error.reason==="status-code")throw new p({statusCode:e.error.statusCode,body:e.error.body,rawResponse:e.rawResponse});switch(e.error.reason){case "non-json":throw new p({statusCode:e.error.statusCode,body:e.error.rawBody,rawResponse:e.rawResponse});case "timeout":throw new h("Timeout exceeded when calling GET /is-alive/ver.");case "unknown":throw new p({message:e.error.errorMessage,rawResponse:e.rawResponse})}}async _getCustomAuthorizationHeaders(){return {Authorization:await s.get(this._options.apiKey)}}};var oe=()=>uuid.v7();var jr=class{static serializePromptToInfoDict(t){return {name:t.name,...t.id&&{id:t.id},version:{...t.versionId&&{id:t.versionId},...t.commit&&{commit:t.commit},template:t.prompt}}}static normalizeMetadata(t){if(!t)return {};if(typeof t=="object"&&!Array.isArray(t))return t;if(typeof t=="string")try{let e=JSON.parse(t);if(typeof e=="object"&&!Array.isArray(e))return e}catch{}return {}}static mergePromptsIntoMetadata(t,e,o){let i=o.map(d=>this.serializePromptToInfoDict(d)),n=this.normalizeMetadata(t),c=this.normalizeMetadata(e);return {...n,...c,opik_prompts:i}}static processTraceUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}static processSpanUpdate(t,e){let{prompts:o,...i}=t;if(!o||o.length===0)return i;let n=this.mergePromptsIntoMetadata(e,i.metadata,o);return {...i,metadata:n}}};var Ga=class a{constructor(t,e){this.data=t;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=t=>{var i;let e=jr.processSpanUpdate(t,this.data.metadata),o={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return this.opik.spanBatchQueue.update(this.data.id,o),this.data={...this.data,...t},this};this.span=t=>{var n;let e=(n=this.data.projectName)!=null?n:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new a(o,this.opik);return this.childSpans.push(i),i};}};var $a=class{constructor(t,e){this.data=t;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=t=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...t,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=t=>{var n,c;let e=(c=(n=this.data.projectName)!=null?n:t.projectName)!=null?c:this.opik.config.projectName,o={id:oe(),startTime:new Date,...t,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(o);let i=new Ga(o,this.opik);return this.spans.push(i),i};this.update=t=>{var i;let e=jr.processTraceUpdate(t,this.data.metadata),o={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return this.opik.traceBatchQueue.update(this.data.id,o),this.data={...this.data,...o},this};}};var Bf={EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECT_BY_NAME:"redirect/projects"},Qa={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",PROJECT_NAME:"name",PATH:"path"},fR=a=>Object.entries(a).map(([t,e])=>`${t}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),hR=a=>a.replace(/\/api$/,""),wR=a=>Buffer.from(a).toString("base64"),Lf=(a,t,e)=>{let o=fR(e),i=`${t}?${o}`;return new URL(i,a).toString()},Vf=({datasetId:a,experimentId:t,baseUrl:e})=>Lf(e,Bf.EXPERIMENTS,{[Qa.EXPERIMENT_ID]:t,[Qa.DATASET_ID]:a,[Qa.PATH]:wR(e)});var Hf=({projectName:a,workspaceName:t,apiUrl:e})=>{let o=hR(e),i=`${t}/${Bf.PROJECT_BY_NAME}`;return Lf(o,i,{[Qa.PROJECT_NAME]:a})};var bR=300,Ya=100,Xt=class{constructor({action:t,batchSize:e=Ya,delay:o,enableBatch:i,name:n="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(t,e)=>{if(this.queue.set(t,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(t,e)=>{let o=this.queue.get(t);o&&(this.queue.set(t,{...o,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let t=new Map(this.queue);this.queue.clear(),k.debug(`Adding ${t.size} items to ${this.name} promise:`,t),this.promise=this.promise.finally(()=>(k.debug(`Flushing ${this.name}:`,t),this.action(t))).catch(e=>{k.error(`Failed to flush ${this.name}:`,e,t);}),await this.promise;};this.action=t,this.batchSize=e,this.delay=o,this.enableBatch=i,this.name=n;}},ge=class{constructor({delay:t=bR,enableCreateBatch:e=true,enableUpdateBatch:o=false,enableDeleteBatch:i=true,createBatchSize:n=Ya,updateBatchSize:c=Ya,deleteBatchSize:d=Ya,name:u="BatchQueue"}={}){this.create=t=>{let e=this.getId(t);this.createQueue.add(e,t);};this.get=async t=>{let e=this.createQueue.queue.get(t);return e||this.getEntity(t)};this.update=(t,e)=>{if(this.createQueue.queue.get(t)){this.createQueue.update(t,e);return}this.updateQueue.add(t,e);};this.delete=t=>{if(this.createQueue.queue.has(t)){this.createQueue.queue.delete(t);return}this.deleteQueue.add(t);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=u,this.createQueue=new Xt({action:async g=>{await this.createEntities(Array.from(g.values()));},delay:t,enableBatch:e,batchSize:n,name:`${u}:createQueue`}),this.updateQueue=new Xt({action:async g=>{await this.createQueue.flush();let f=Array.from(g.entries());for(let[y,z]of f)await this.updateEntity(y,z);},delay:t,enableBatch:o,batchSize:c,name:`${u}:updateQueue`}),this.deleteQueue=new Xt({action:async g=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(g.keys()));},delay:t,enableBatch:i,batchSize:d,name:`${u}:deleteQueue`});}};var Za=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 qa=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 en=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 rn=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 on=class extends Jt{constructor(e){super(e);this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};var tn=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 hu=null;async function Jf(){return hu||(hu=await xR__default.default()),hu}var Kt=class a{constructor(t){let{id:e,traceId:o,spanId:i,source:n,...c}=t;this.id=e||oe(),this.traceId=o,this.spanId=i,this.source=n||Xn.Sdk,this.data={...c};}getContent(t=false){return t?{...this.data,id:this.id}:{...this.data}}async contentHash(){let t=this.getContent(),e=RR__default.default(t);return (await Jf()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent()}}static fromApiModel(t){return new a({id:t.id,traceId:t.traceId,spanId:t.spanId,source:t.source,...t.data})}};async function Fe(a,t,e){var c;if(e===0)return [];let o=new util.TextDecoder("utf-8"),i=[],n="";try{for await(let d of a){n+=o.decode(d,{stream:!0});let u=n.split(`
|
|
5
|
+
`);n=(c=u.pop())!=null?c:"";for(let g of u)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let f=JSON.parse(g),y=t.parse(f);if(y.ok){if(i.push(y.value),e!==void 0&&i.length>=e)return i}else k.error("Error parsing experiment item:",y.errors);}catch(f){k.error("Error parsing JSON line:",f instanceof Error?f.message:String(f));}}if(n.trim()&&n!=="{}"&&n!=="[]"&&n!=="null")try{let d=JSON.parse(n),u=t.parse(d);u.ok?i.push(u.value):k.error("Error parsing experiment item:",u.errors);}catch(d){k.error("Error parsing remaining buffer:",d instanceof Error?d.message:String(d));}}catch(d){k.error("Error processing stream:",d instanceof Error?d.message:String(d));}return i}function Gt(a,t){let e=[];for(let o=0;o<a.length;o+=t.maxBatchSize)e.push(a.slice(o,o+t.maxBatchSize));return e}var de=class extends Error{constructor(t){var e;super(t.message),this.name=this.constructor.name,this.code=t.code,this.statusCode=t.statusCode,this.details=t.details,this.originalError=t.originalError,k.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};var 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,t)=>`Item at position ${a} is not an object (${t})`,INSERTION_FAILED:a=>`Failed to insert items from JSON: ${a}`,DATASET_JSON_PARSE_ERROR:a=>`Failed to parse JSON input: ${a}`};var kR={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID"},an=class extends de{constructor(t){super({message:Xf.DATASET_ITEM_MISSING_ID(t),code:kR.DATASET_ITEM_MISSING_ID});}};var zR={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},nn=class extends de{constructor(t){super({message:t,code:zR.SEARCH_TIMEOUT});}};var sn={JSON_NOT_ARRAY:a=>`JSON input must be an array of objects${a?` (${a})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(a,t)=>`Item at position ${a} is not an object (${t})`};var wu={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},pn=class extends de{constructor(t){let e=t instanceof Error?t:new Error(String(t));super({message:sn.JSON_PARSE_ERROR,code:wu.JSON_PARSE_ERROR,originalError:e});}},cn=class extends de{constructor(t){super({message:sn.JSON_NOT_ARRAY(t),code:wu.JSON_NOT_ARRAY});}},ln=class extends de{constructor(t,e){super({message:sn.JSON_ITEM_NOT_OBJECT(t,e),code:wu.JSON_ITEM_NOT_OBJECT});}};var Ir=class{constructor({name:t,description:e,id:o},i){this.opik=i;this.idToHash=new Map;this.hashes=new Set;this.id=o||oe(),this.name=t,this.description=e;}async insert(t){if(!t||t.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(t),o=Gt(e,{maxBatchSize:1e3});try{let i=0;for(let n of o)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:n}),i+=n.length,k.info(`Inserted ${Math.min(i,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(i){throw k.error(`Error inserting items into dataset: ${i instanceof Error?i.message:String(i)}`),i}}async update(t){if(!(!t||t.length===0)){for(let e=0;e<t.length;e++)if(!t[e].id)throw new an(e);await this.insert(t);}}async delete(t){if(!t||t.length===0){k.info("No item IDs provided for deletion");return}let e=Gt(t,{maxBatchSize:100});for await(let o of e){k.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o});for(let i of o)if(this.idToHash.has(i)){let n=this.idToHash.get(i);this.hashes.delete(n),this.idToHash.delete(i);}}}async clear(){let e=(await this.getItems()).map(o=>o.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getItems(t,e){return (await this.getItemsAsDataclasses(t,e)).map(i=>i.getContent(true))}async getItemsAsDataclasses(t,e){let o=t?Math.min(t,2e3):2e3,i=await this.opik.api.datasets.streamDatasetItems({datasetName:this.name,lastRetrievedId:e,steamLimit:o});return (await Fe(i,j.DatasetItemPublic,t)).map(c=>Kt.fromApiModel(c))}async insertFromJson(t,e={},o=[]){let i;try{i=JSON.parse(t);}catch(c){throw new pn(c)}if(!Array.isArray(i))throw new cn(typeof i);if(i.length===0)return;for(let c=0;c<i.length;c++){let d=i[c];if(typeof d!="object"||d===null)throw new ln(c,typeof d)}let n=i.map(c=>{let d=c,u={};for(let[g,f]of Object.entries(d)){if(o.includes(g))continue;let y=e[g]||g;u[y]=f;}return u});await this.insert(n);}async toJson(t={}){let o=(await this.getItems()).map(i=>{let n={...i};if(Object.keys(t).length>0){for(let[c,d]of Object.entries(t))if(c in n){let u=n[c];delete n[c],n[d]=u;}}return n});return RR__default.default(o)}async getDeduplicatedItems(t){let e=[];for(let o of t){let i=new Kt(o),n=await i.contentHash();if(this.hashes.has(n)){k.debug("Duplicate item found - skipping",{contentHash:n,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(n),this.idToHash.set(i.id,n);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){k.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let t=await this.getItemsAsDataclasses();this.clearHashState();for(let e of t){let o=await e.contentHash();this.idToHash.set(e.id,o),this.hashes.add(o);}k.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:t.length});}catch(t){if(t instanceof p&&t.statusCode===404){k.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw t}}};var bu=class extends Error{constructor(t){super(t),this.name="DatasetError";}},$t=class extends bu{constructor(t){super(`Dataset with name '${t}' not found`),this.name="DatasetNotFoundError";}};var mn=class{constructor(t){if(!t.datasetItemId)throw new Error("datasetItemId is required");if(!t.traceId)throw new Error("traceId is required");this.datasetItemId=t.datasetItemId,this.traceId=t.traceId;}},dn=class a{constructor(t){this.id=t.id,this.datasetItemId=t.datasetItemId,this.traceId=t.traceId,this.datasetItemData=t.datasetItemData,this.evaluationTaskOutput=t.evaluationTaskOutput,this.feedbackScores=[...t.feedbackScores];}static fromRestExperimentItemCompare(t){var o,i;let e=(i=(o=t.feedbackScores)==null?void 0:o.map(n=>({categoryName:n.categoryName,name:n.name,reason:n.reason,value:n.value,source:n.source})))!=null?i:[];return new a({id:t.id,traceId:t.traceId,datasetItemId:t.datasetItemId,datasetItemData:t.input,evaluationTaskOutput:t.output,feedbackScores:e})}};var cr=class{constructor({id:t,name:e,datasetName:o,prompts:i},n){this.opik=n;this.id=t||oe(),this._name=e,this.datasetName=o,this.prompts=i;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let t=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=t.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(t){if(t.length===0)return;let e=t.map(i=>({id:oe(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId})),o=Gt(e,{maxBatchSize:50});try{for(let i of o)await this.opik.api.experiments.createExperimentItems({experimentItems:i});k.debug(`Inserted ${t.length} items into experiment ${this.id}`);}catch(i){throw k.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(t){let e=[],{maxResults:i,truncate:n=false}=t||{},c,d=true;try{for(;d&&!(i!==void 0&&e.length>=i);){let u=i?Math.min(i-e.length,2e3):2e3,g=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:u,lastRetrievedId:c,truncate:n});try{let f=await Fe(g,j.ExperimentItemCompare,u);if(f.length===0){d=!1;break}for(let y of f){let z=dn.fromRestExperimentItemCompare(y);if(e.push(z),i!==void 0&&e.length>=i){d=!1;break}}c=f[f.length-1].id;}catch(f){k.error("Error parsing experiment item: "+(f instanceof Error?f.message:String(f))),d=!1;break}}}catch(u){throw k.error("Error retrieving experiment items: "+(u instanceof Error?u.message:String(u))),u}return k.info(`Retrieved ${e.length} items${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){let t=await this.opik.getDataset(this.datasetName),e=this.opik.config.apiUrl||Cn.apiUrl;return Vf({datasetId:t.id,experimentId:this.id,baseUrl:e})}};var un={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 xu={EXPERIMENT_NOT_FOUND:"EXPERIMENT_NOT_FOUND",INVALID_CONFIG_TYPE:"INVALID_CONFIG_TYPE",CONFIG_PROMPTS_CONFLICT:"CONFIG_PROMPTS_CONFLICT"},Qt=class extends de{constructor(t){super({message:un.EXPERIMENT_NOT_FOUND(t),code:xu.EXPERIMENT_NOT_FOUND});}},Yt=class a extends de{constructor(t,e){super({message:t,code:e});}static invalidConfigType(t){return new a(un.INVALID_CONFIG_TYPE(t),xu.INVALID_CONFIG_TYPE)}static promptsConflict(){return new a(un.CONFIG_PROMPTS_CONFLICT(),xu.CONFIG_PROMPTS_CONFLICT)}};function Kf(a,t){if(a!==void 0&&(typeof a!="object"||a===null||Array.isArray(a)))throw Yt.invalidConfigType(typeof a);if(t&&t.length>0&&(a!=null&&a.prompts))throw Yt.promptsConflict();if(!a&&(!t||t.length===0))return [void 0,void 0];let e=a?structuredClone(a):{},o;if(t&&t.length>0){o=[];let i={};for(let n of t)o.push({id:n.versionId}),i[n.name]=n.prompt;e.prompts=i;}return Object.keys(e).length===0?[void 0,void 0]:[e,o]}var ye={MUSTACHE:"mustache",JINJA2:"jinja2"};var K=class a extends Error{constructor(t){super(t),this.name="PromptValidationError",Object.setPrototypeOf(this,a.prototype);}};function _R(a){try{let e=SR__default.default.parse(a).filter(o=>{let i=o[0];return i==="name"||i==="#"||i==="&"||i==="^"}).map(o=>o[1].split(".")[0]);return new Set(e)}catch(t){throw new K(`Invalid Mustache template syntax: ${t instanceof Error?t.message:String(t)}`)}}function Gf(a,t,e){if(e!=="mustache")return;let o=_R(a),i=new Set(Object.keys(t)),n=new Set([...o].filter(c=>!i.has(c)));if(n.size>0){let c=[];throw c.push(`Missing required variables: ${[...n].join(", ")}`),c.push(`Template placeholders: {${[...o].join(", ")}}`),c.push(`Provided variables: {${[...i].join(", ")}}`),new K(`Template variables validation failed:
|
|
10
10
|
${c.join(`
|
|
11
|
-
`)}`)}}function _e(a,t,e){try{switch(
|
|
11
|
+
`)}`)}}function _e(a,t,e){try{switch(Gf(a,t,e),e){case "mustache":return SR__default.default.render(a,t,{},{escape:o=>o});case "jinja2":return TR__default.default.renderString(a,t);default:return a}}catch(o){if(o instanceof K)throw o;let i=o instanceof Error?o.message:String(o);throw new K(`Failed to format prompt template: ${i}`)}}var Zt=class a{constructor(t){this.id=t.versionId,this.name=t.name,this.prompt=t.prompt,this.commit=t.commit,this.type=t.type,this.metadata=t.metadata,this.changeDescription=t.changeDescription,this.createdAt=t.createdAt,this.createdBy=t.createdBy;}format(t){return _e(this.prompt,t,this.type)}getVersionAge(){return this.createdAt?dateFns.formatDistanceToNow(new Date(this.createdAt),{addSuffix:true}):"Unknown"}getVersionInfo(){let t=[`[${this.commit}]`];if(this.createdAt){let e=new Date(this.createdAt);t.push(e.toISOString().split("T")[0]);}return this.createdBy&&t.push(`by ${this.createdBy}`),this.changeDescription&&t.push(`- ${this.changeDescription}`),t.join(" ")}compareTo(t){let e=`Current version [${this.commit}]`,o=`Other version [${t.commit}]`,i=jestDiff.diffStringsUnified(t.prompt,this.prompt,{aAnnotation:o,bAnnotation:e,includeChangeCounts:true,contextLines:3,expand:false});return k.info(`
|
|
12
12
|
Prompt version comparison:
|
|
13
|
-
${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Oe=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:d,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=d!=null?d:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Yt.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:t,error:e}),e}}};async function Gf(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(jR(o))return null;throw o}}function $f(a,t,e){return t?t.template!==a.prompt||!CR(t.metadata,a.metadata)||t.type!==e:true}function CR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return PR__default.default(e,o)}function jR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},We={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"},Qf={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},un={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Yf(a){let t=un.SPECIAL_FIELDS.includes(a),e=Object.keys(We).includes(a);if(!t&&!e){let o=Object.keys(We).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function Zf(a,t){if(!un.SPECIAL_FIELDS.includes(a)){let e=Object.keys(We).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!un.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function xu(a,t){let e=Qf[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function qf(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function gn(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var Zt=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return Yf(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:We[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(Zf(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:We[i]}}return {type:"nested",field:e,key:o,columnType:We[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let d=t.peekChar();if(d===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=d,t.advance();}let c=t.getFullInput().slice(o);return gn(n,o,c),i}};var qt=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return xu(e,i),{operator:i};let n=this.parseWordOperator(t);return xu(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var ei=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}gn(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Be=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=Zt.parse(t),o=qt.parse(t,this.getFieldName(e)),i=ei.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return qf(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function eh(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Fe(n,j.TracePublic,o)}async function rh(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(d=>setTimeout(d,o));}}function oh(a){if(!a)return null;let e=new Be(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var Ru=[],lr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Vf({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${ai(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new Ga({id:oe(),startTime:new Date,...t,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new jr(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new Gt(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new jr({name:t,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof Gt)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new jr(i,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=Xn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[d,u]=Xf(o,i),g=oe(),f=new cr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:d,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new cr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new $t(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Fe(e,j.ExperimentPublic)).map(i=>new cr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new $t(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let d=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:d,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new cr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;d+=1;}return n}catch(d){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:d}),d}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await Gf(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=$f(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let d=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Oe.fromApiResponse(d,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Oe.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Be(t).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async d=>{if(!d.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:d.name},this.api.requestOptions);return Oe.fromApiResponse(d,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:d.name,error:u}),null}}))).filter(d=>d!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:d=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:d});let u=oh(o),g=e!=null?e:this.config.projectName,f=()=>eh(this.api,g,u,i,n);if(c===void 0)return await f();let y=await rh(f,c,d*1e3,5e3);if(y.length<c)throw new an(`Timeout after ${d} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Vu(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new rn(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Ya(this.api,o),this.traceBatchQueue=new qa(this.api,o),this.spanFeedbackScoresBatchQueue=new Za(this.api,o),this.traceFeedbackScoresBatchQueue=new en(this.api,o),this.datasetBatchQueue=new on(this.api,o),Ru.push(this);}};var UR="track.decorator",ri=new async_hooks.AsyncLocalStorage,DR=()=>{let{span:a,trace:t}=ri.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function MR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function NR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=ku().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function FR({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function th({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let d=o(a);Object.assign(c,d);}t.update(c),e&&e.update({endTime:n,output:i});}function ih({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function fn({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let d=ri.getStore(),{span:u,trace:g}=NR({name:a!=null?a:i.name||UR,parentSpan:d==null?void 0:d.span,projectName:t,trace:d==null?void 0:d.trace,type:e}),f=!d,y=this;return ri.run({span:u,trace:g},()=>{let z=f?g:void 0;try{FR({args:c,span:u,trace:z});let v=i.apply(y,c);return MR(v)?v.then(S=>(th({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw ih({span:u,error:S,trace:z}),S}):(th({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw ih({span:u,error:v,trace:z}),v}})}}function Ie(a,t){if(typeof a=="function")return fn({},a);let e=a;return t?fn(e,t):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,d]=o;if(d.kind!=="method")throw new Error("track decorator is only applicable to methods");return fn(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=fn(e,n),i}}var yu=null;function ku(){return yu===null&&(yu=new lr),yu}var OR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([ku().flush(),...Ru.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 ah(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(d=>d!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(t);if(!i.success){let n=i.error.issues.map(d=>d.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(WR(a,t,c))}}function WR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var wn=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
|
|
13
|
+
${i}`),i}static fromApiResponse(t,e){var o;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id'");return new a({name:t,prompt:e.template,commit:e.commit,promptId:e.promptId,versionId:e.id,type:(o=e.type)!=null?o:ye.MUSTACHE,metadata:e.metadata,changeDescription:e.changeDescription,createdAt:e.createdAt?new Date(e.createdAt):void 0,createdBy:e.createdBy})}};var Oe=class a{constructor({promptId:t,versionId:e,name:o,prompt:i,commit:n,metadata:c,type:d,changeDescription:u,description:g,tags:f=[]},y){this.opik=y;this.id=t,this.versionId=e,this.prompt=i,this.commit=n,this.type=d!=null?d:ye.MUSTACHE,this.changeDescription=u,this._name=o,this._description=g,this._tags=[...f],this._metadata=c;}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}format(t){return _e(this.prompt,t,this.type)}static fromApiResponse(t,e,o){var n;if(!e.template)throw new K("Invalid API response: missing required field 'template'");if(!e.commit)throw new K("Invalid API response: missing required field 'commit'");if(!e.promptId)throw new K("Invalid API response: missing required field 'promptId'");if(!e.id)throw new K("Invalid API response: missing required field 'id' (version ID)");let i=(n=e.type)!=null?n:ye.MUSTACHE;if(i!=="mustache"&&i!=="jinja2")throw new K(`Invalid API response: unknown prompt type '${i}'`);return new a({promptId:e.promptId,versionId:e.id,name:t.name,prompt:e.template,commit:e.commit,metadata:e.metadata,type:i,changeDescription:e.changeDescription,description:t.description,tags:t.tags},o)}async updateProperties(t){var e,o,i,n;return await this.opik.api.prompts.updatePrompt(this.id,{name:(e=t.name)!=null?e:this._name,description:t.description,tags:t.tags},this.opik.api.requestOptions),this._name=(o=t.name)!=null?o:this._name,this._description=(i=t.description)!=null?i:this._description,this._tags=(n=t.tags)!=null?n:this._tags,this}async delete(){await this.opik.deletePrompts([this.id]);}async getVersions(){var t;k.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let e=[],o=1,i=100;for(;;){let c=(t=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:i},this.opik.api.requestOptions)).content)!=null?t:[];if(e.push(...c),c.length<i)break;o++;}return k.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:e.length}),e.map(n=>Zt.fromApiResponse(this.name,n))}catch(e){throw k.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:e}),e}}async useVersion(t){k.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit});try{let e=await this.opik.api.prompts.restorePromptVersion(this.id,t.id,this.opik.api.requestOptions);return k.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:e.id,restoredCommit:e.commit}),a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){throw k.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:t.id,versionCommit:t.commit,error:e}),e}}async getVersion(t){try{let e=await this.opik.api.prompts.retrievePromptVersion({name:this.name,commit:t},this.opik.api.requestOptions);return a.fromApiResponse({name:this.name,description:this.description,tags:this._tags},e,this.opik)}catch(e){if(e&&typeof e=="object"&&"statusCode"in e&&e.statusCode===404)return null;throw k.error("Failed to retrieve prompt version",{promptName:this.name,commit:t,error:e}),e}}};async function $f(a,t,e){try{return await a.retrievePromptVersion({name:t},e)}catch(o){if(IR(o))return null;throw o}}function Qf(a,t,e){return t?t.template!==a.prompt||!jR(t.metadata,a.metadata)||t.type!==e:true}function jR(a,t){let e=a!=null?a:{},o=t!=null?t:{};return CR__default.default(e,o)}function IR(a){return typeof a=="object"&&a!==null&&"statusCode"in a&&a.statusCode===404}var se=class{constructor(t){this.input=t;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(t){return this.input[this.cursor+t]}consumeChar(){return this.input[this.cursor++]}advance(t=1){this.cursor+=t;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(t){let e=this.cursor;for(;this.cursor<this.input.length&&t(this.input[this.cursor]);)this.cursor++;return this.input.slice(e,this.cursor)}sliceFrom(t){return this.input.slice(t,this.cursor)}static isFieldChar(t){return /[a-zA-Z0-9_]/.test(t)}static isLetterChar(t){return /[a-zA-Z]/.test(t)}static isDigitChar(t){return /\d/.test(t)}static isWhitespaceChar(t){return /\s/.test(t)}static isQuoteChar(t){return t==='"'||t==="'"}};var J={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["contains"],DICT_OPS:["=","contains",">","<"],LIMITED_STRING_OPS:["=","contains","not_contains"]},We={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"},Yf={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},gn={SPECIAL_FIELDS:["usage","metadata","feedback_scores"],USAGE_KEYS:["total_tokens","prompt_tokens","completion_tokens"]};function Zf(a){let t=gn.SPECIAL_FIELDS.includes(a),e=Object.keys(We).includes(a);if(!t&&!e){let o=Object.keys(We).join(", ");throw new Error(`Field ${a} is not supported, only the fields ${o} are supported.`)}}function qf(a,t){if(!gn.SPECIAL_FIELDS.includes(a)){let e=Object.keys(We).join(", ");throw new Error(`Field ${a}.${t} is not supported, only the fields ${e} are supported.`)}if(a==="usage"&&!gn.USAGE_KEYS.includes(t))throw new Error(`When querying usage, ${t} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function Ru(a,t){let e=Yf[a];if(!(e!=null&&e.includes(t))){let o=(e==null?void 0:e.join(", "))||"none";throw new Error(`Operator ${t} is not supported for field ${a}, only the operators ${o} are supported.`)}}function eh(a){let t=a.toLowerCase();if(t==="and")return true;throw t==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${a}`)}function fn(a,t,e){if(!a)throw new Error(`Missing closing quote for: ${e}`)}var qt=class{static parse(t){t.skipWhitespace();let e=this.parseFieldName(t);return Zf(e),t.peekChar()==="."?this.parseFieldWithKey(t,e):{type:"simple",field:e,columnType:We[e]}}static parseFieldName(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseFieldWithKey(t,e){t.advance();let o=this.parseKey(t);if(qf(e,o),e==="usage"){let i=`usage.${o}`;return {type:"simple",field:i,columnType:We[i]}}return {type:"nested",field:e,key:o,columnType:We[e]}}static parseKey(t){let e=t.peekChar();return se.isQuoteChar(e)?this.parseQuotedKey(t,e):this.parseUnquotedKey(t)}static parseUnquotedKey(t){return t.consumeWhile(e=>se.isFieldChar(e))}static parseQuotedKey(t,e){let o=t.getPosition();t.advance();let i="",n=false;for(;!t.isAtEnd();){let d=t.peekChar();if(d===e){if(t.peekCharAt(1)===e){i+=e,t.advance(2);continue}n=true,t.advance();break}i+=d,t.advance();}let c=t.getFullInput().slice(o);return fn(n,o,c),i}};var ei=class{static parse(t,e){t.skipWhitespace();let o=t.peekChar(),i=this.tryParseSymbolicOperator(t,o);if(i)return Ru(e,i),{operator:i};let n=this.parseWordOperator(t);return Ru(e,n),{operator:n}}static tryParseSymbolicOperator(t,e){if(e==="=")return t.advance(),"=";if(e==="<"||e===">"){let o=e;return t.advance(),t.peekChar()==="="?(t.advance(),o+"="):o}return e==="!"&&t.peekCharAt(1)==="="?(t.advance(2),"!="):null}static parseWordOperator(t){return t.consumeWhile(e=>!se.isWhitespaceChar(e))}};var ri=class{static parse(t){t.skipWhitespace();let e=t.getPosition(),o=t.peekChar();if(o==='"')return this.parseQuotedString(t,e);if(se.isDigitChar(o)||o==="-")return this.parseNumber(t);let i=t.getRemainingInput();throw new Error(`Invalid value ${i.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(t,e){t.advance();let o=t.getPosition(),i=false;for(;!t.isAtEnd();){if(t.peekChar()==='"'){i=true;break}t.advance();}fn(i,e,`value starting at position ${e}`);let n=t.sliceFrom(o);return t.advance(),{value:n}}static parseNumber(t){let e="";return t.peekChar()==="-"&&(e+=t.consumeChar()),e+=this.parseDigits(t),t.peekChar()==="."&&(e+=t.consumeChar(),e+=this.parseDigits(t)),{value:e}}static parseDigits(t){return t.consumeWhile(e=>se.isDigitChar(e))}};var Be=class{constructor(t){let e=t||"";this.filterExpressions=e?this.parse(e):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}getFilterExpressions(){return this.filterExpressions}parse(t){let e=new se(t),o=[];for(;!e.isAtEnd();){let i=this.parseExpression(e);if(o.push(i),e.skipWhitespace(),!e.isAtEnd()&&!this.parseConnector(e))break}return o}parseExpression(t){let e=qt.parse(t),o=ei.parse(t,this.getFieldName(e)),i=ri.parse(t);return this.buildExpression(e,o,i)}getFieldName(t){return t.field}buildExpression(t,e,o){let i={field:t.field,operator:e.operator,value:o.value,type:t.columnType};return t.type==="nested"&&(i.key=t.key),i}parseConnector(t){let e=t.getPosition(),o=t.consumeWhile(i=>se.isLetterChar(i));try{return eh(o)}catch(i){if(i instanceof Error&&i.message.includes("trailing characters")){let n=t.getFullInput().slice(e);throw new Error(`Invalid filter string, trailing characters ${n}`)}throw i}}};async function rh(a,t,e,o,i){let n=await a.traces.searchTraces({projectName:t,filters:e!=null?e:void 0,limit:o,truncate:i});return await Fe(n,j.TracePublic,o)}async function oh(a,t,e,o){let i=Date.now(),n=[];for(;;){if(n=await a(),n.length>=t||Date.now()-i>=e)return n;await new Promise(d=>setTimeout(d,o));}}function th(a){if(!a)return null;let e=new Be(a).getFilterExpressions();return e?e.map(o=>{let i={field:o.field,operator:o.operator,value:o.value};return o.key&&(i.key=o.key),i}):null}var yu=[],lr=class{constructor(t){this.displayTraceLog=t=>{if(t===this.lastProjectNameLogged||!this.config.apiUrl)return;let e=Hf({apiUrl:this.config.apiUrl,projectName:t,workspaceName:this.config.workspaceName});k.info(`Started logging traces to the "${t}" project at ${ni(e)}`),this.lastProjectNameLogged=t;};this.trace=t=>{var i;k.debug("Creating new trace with data:",t);let e=(i=t.projectName)!=null?i:this.config.projectName,o=new $a({id:oe(),startTime:new Date,...t,projectName:e},this);return this.traceBatchQueue.create(o.data),k.debug("Trace added to the queue with ID:",o.data.id),this.displayTraceLog(e),o};this.getDataset=async t=>{k.debug(`Getting dataset with name "${t}"`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.getDatasetByIdentifier({datasetName:t});return new Ir(e,this)}catch(e){throw e instanceof p&&e.statusCode===404?new $t(t):e}};this.createDataset=async(t,e)=>{k.debug(`Creating dataset with name "${t}"`);let o=new Ir({name:t,description:e},this);try{return this.datasetBatchQueue.create({name:o.name,description:o.description,id:o.id}),k.debug("Dataset added to the queue with name:",o.name),o}catch(i){throw k.error(`Failed to create dataset "${t}"`,{error:i}),new Error(`Error creating dataset "${t}": ${i}`)}};this.getOrCreateDataset=async(t,e)=>{k.debug(`Attempting to retrieve or create dataset with name: "${t}"`);try{return await this.getDataset(t)}catch(o){if(o instanceof $t)return k.info(`Dataset "${t}" not found. Proceeding to create a new one.`),this.createDataset(t,e);throw k.error(`Error retrieving dataset "${t}":`,o),o}};this.getDatasets=async(t=100)=>{k.debug(`Getting all datasets (limit: ${t})`);try{await this.datasetBatchQueue.flush();let e=await this.api.datasets.findDatasets({size:t}),o=[];for(let i of e.content||[])o.push(new Ir(i,this));return k.info(`Retrieved ${o.length} datasets`),o}catch(e){throw k.error("Failed to retrieve datasets",{error:e}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async t=>{k.debug(`Deleting dataset with name "${t}"`);try{let e=await this.getDataset(t);if(!e.id)throw new Error(`Cannot delete dataset "${t}": ID not available`);this.datasetBatchQueue.delete(e.id);}catch(e){throw k.error(`Failed to delete dataset "${t}"`,{error:e}),new Error(`Failed to delete dataset "${t}": ${e}`)}};this.createExperiment=async({datasetName:t,name:e,experimentConfig:o,prompts:i,type:n=Kn.Regular,optimizationId:c})=>{if(k.debug(`Creating experiment for dataset "${t}"`),!t)throw new Error("Dataset name is required to create an experiment");let[d,u]=Kf(o,i),g=oe(),f=new cr({id:g,name:e,datasetName:t,prompts:i},this);try{return this.api.experiments.createExperiment({id:g,datasetName:t,name:e,metadata:d,promptVersions:u,type:n,optimizationId:c}),k.debug("Experiment added to the queue with id:",g),f}catch(y){throw k.error(`Failed to create experiment for dataset "${t}"`,{error:y}),new Error(`Error creating experiment: ${y}`)}};this.updateExperiment=async(t,e)=>{if(!t)throw new Error("id is required to update an experiment");let{name:o,experimentConfig:i}=e;if(!o&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");k.debug(`Updating experiment with ID "${t}"`);let n={};o!==void 0&&(n.name=o),i!==void 0&&(n.metadata=i);try{await this.api.experiments.updateExperiment(t,n);}catch(c){throw k.error(`Failed to update experiment with ID "${t}"`,{error:c}),c}};this.getExperimentById=async t=>{k.debug(`Getting experiment with ID "${t}"`);try{let e=await this.api.experiments.getExperimentById(t);return new cr({id:e.id,name:e.name,datasetName:e.datasetName},this)}catch(e){throw e instanceof p&&e.statusCode===404?new Qt(`No experiment found with ID '${t}'`):(k.error(`Failed to get experiment with ID "${t}"`,{error:e}),e)}};this.getExperimentsByName=async t=>{k.debug(`Getting experiments with name "${t}"`);try{let e=await this.api.experiments.streamExperiments({name:t});return (await Fe(e,j.ExperimentPublic)).map(i=>new cr({id:i.id,name:i.name,datasetName:i.datasetName},this))}catch(e){throw k.error(`Failed to get experiments with name "${t}"`,{error:e}),e}};this.getExperiment=async t=>{k.debug(`Getting experiment with name "${t}"`);let e=await this.getExperimentsByName(t);if(e.length===0)throw new Qt(t);return e[0]};this.getDatasetExperiments=async(t,e=100)=>{var c;k.debug(`Getting experiments for dataset "${t}"`);let o=await this.getDataset(t),i=Math.min(100,e),n=[];try{let d=1;for(;n.length<e;){let u=await this.api.experiments.findExperiments({page:d,size:i,datasetId:o.id}),g=(c=u==null?void 0:u.content)!=null?c:[];if(g.length===0)break;let f=e-n.length,y=Math.min(g.length,f);for(let z=0;z<y;z++){let v=g[z];n.push(new cr({id:v.id,name:v.name,datasetName:v.datasetName},this));}if(y<g.length)break;d+=1;}return n}catch(d){throw k.error(`Failed to get experiments for dataset "${t}"`,{error:d}),d}};this.deleteExperiment=async t=>{k.debug(`Deleting experiment with ID "${t}"`);try{await this.api.experiments.deleteExperimentsById({ids:[t]});}catch(e){throw k.error(`Failed to delete experiment with ID "${t}"`,{error:e}),e}};this.createPrompt=async t=>{var e;k.debug("Creating prompt",{name:t.name});try{let o=await $f(this.api.prompts,t.name,this.api.requestOptions),i=(e=t.type)!=null?e:ye.MUSTACHE,n=Qf(t,o,i),c;if(n?(k.debug("Creating new prompt version",{name:t.name}),c=await this.api.prompts.createPromptVersion({name:t.name,version:{template:t.prompt,metadata:t.metadata,type:i}},this.api.requestOptions)):(k.debug("Returning existing prompt version",{name:t.name}),c=o),!c.promptId)throw new Error("Invalid API response: missing promptId");let d=await this.api.prompts.getPromptById(c.promptId,this.api.requestOptions),u=Oe.fromApiResponse(d,c,this);return k.debug("Prompt created",{name:t.name}),t.description||t.tags?await u.updateProperties({description:t.description,tags:t.tags}):u}catch(o){throw k.error("Failed to create prompt",{name:t.name,error:o}),o}};this.getPrompt=async t=>{var e;k.debug("Getting prompt",t);try{let i=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:t.name}]),size:1},this.api.requestOptions)).content)==null?void 0:e[0];if(!i)return k.debug("Prompt not found",{name:t.name}),null;let n=await this.api.prompts.retrievePromptVersion(t,this.api.requestOptions);return Oe.fromApiResponse(i,n,this)}catch(o){if(o instanceof p&&o.statusCode===404)return null;throw k.error("Failed to get prompt",{name:t.name,error:o}),o}};this.searchPrompts=async t=>{var e;k.debug("Searching prompts",{filterString:t});try{let o;if(t){let u=new Be(t).getFilterExpressions();o=u?JSON.stringify(u):void 0;}let n=(e=(await this.api.prompts.getPrompts({filters:o,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(n.map(async d=>{if(!d.name)return null;try{let u=await this.api.prompts.retrievePromptVersion({name:d.name},this.api.requestOptions);return Oe.fromApiResponse(d,u,this)}catch(u){return k.debug("Failed to get version for prompt",{name:d.name,error:u}),null}}))).filter(d=>d!==null)}catch(o){throw k.error("Failed to search prompts",{error:o}),o}};this.deletePrompts=async t=>{k.debug("Deleting prompts in batch",{count:t.length});try{await this.api.prompts.deletePromptsBatch({ids:t},this.api.requestOptions),k.info("Successfully deleted prompts",{count:t.length});}catch(e){throw k.error("Failed to delete prompts",{count:t.length,error:e}),e}};this.searchTraces=async t=>{let{projectName:e,filterString:o,maxResults:i=1e3,truncate:n=true,waitForAtLeast:c,waitForTimeout:d=60}=t!=null?t:{};k.debug("Searching traces",{projectName:e,filterString:o,maxResults:i,truncate:n,waitForAtLeast:c,waitForTimeout:d});let u=th(o),g=e!=null?e:this.config.projectName,f=()=>rh(this.api,g,u,i,n);if(c===void 0)return await f();let y=await oh(f,c,d*1e3,5e3);if(y.length<c)throw new nn(`Timeout after ${d} seconds: expected ${c} traces, but only ${y.length} were found.`);return y};this.flush=async()=>{k.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.datasetBatchQueue.flush(),k.info("Successfully flushed all data to Opik");}catch(t){k.error("Error during flush operation:",{error:t instanceof Error?t.message:t});}};k.debug("Initializing OpikClient with config:",t),this.config=Hu(t);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};t!=null&&t.headers&&(k.debug("Initializing OpikClient with additional headers:",t==null?void 0:t.headers),e.requestOptions={headers:t==null?void 0:t.headers}),this.api=new on(e);let o=this.config.holdUntilFlush?24*60*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new Za(this.api,o),this.traceBatchQueue=new en(this.api,o),this.spanFeedbackScoresBatchQueue=new qa(this.api,o),this.traceFeedbackScoresBatchQueue=new rn(this.api,o),this.datasetBatchQueue=new tn(this.api,o),yu.push(this);}};var DR="track.decorator",oi=new async_hooks.AsyncLocalStorage,MR=()=>{let{span:a,trace:t}=oi.getStore()||{};if(!(!a||!t))return {span:a,trace:t}};function NR(a){return !!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function FR({name:a,parentSpan:t,projectName:e,trace:o,type:i="llm"}){k.debug("Creating new span:",{name:a,parentSpan:t==null?void 0:t.data.id,projectName:e,type:i});let n=o;n||(n=zu().trace({name:a,projectName:e}));let c=n.span({name:a,parentSpanId:t==null?void 0:t.data.id,projectName:e,type:i});return k.debug("Span created with ID:",c.data.id),{span:c,trace:n}}function OR({args:a,span:t,trace:e}){if(k.debug("Starting span execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id}),a.length===0)return;let o={arguments:a};k.debug("Recording span input"),t.update({input:o}),e&&(k.debug("Recording trace input"),e.update({input:o}));}function ih({result:a,span:t,trace:e,enrichSpan:o}){k.debug("Recording successful execution:",{spanId:t.data.id,traceId:e==null?void 0:e.data.id});let i=typeof a=="object"?a:{result:a},n=new Date,c={endTime:n,output:i};if(o){let d=o(a);Object.assign(c,d);}t.update(c),e&&e.update({endTime:n,output:i});}function ah({span:a,error:t,trace:e}){var o,i;k.error("Recording execution error:",{spanId:a.data.id,traceId:e==null?void 0:e.data.id,error:t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}),t instanceof Error&&a.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(o=t.stack)!=null?o:""}}),a.end(),e&&(e.update({errorInfo:{message:t.message,exceptionType:t.name,traceback:(i=t.stack)!=null?i:""}}),e.end());}function hn({name:a,projectName:t,type:e,enrichSpan:o}={},i){return function(...c){let d=oi.getStore(),{span:u,trace:g}=FR({name:a!=null?a:i.name||DR,parentSpan:d==null?void 0:d.span,projectName:t,trace:d==null?void 0:d.trace,type:e}),f=!d,y=this;return oi.run({span:u,trace:g},()=>{let z=f?g:void 0;try{OR({args:c,span:u,trace:z});let v=i.apply(y,c);return NR(v)?v.then(S=>(ih({span:u,result:S,trace:z,enrichSpan:o}),S),S=>{throw ah({span:u,error:S,trace:z}),S}):(ih({span:u,result:v,trace:z,enrichSpan:o}),v)}catch(v){throw ah({span:u,error:v,trace:z}),v}})}}function Ie(a,t){if(typeof a=="function")return hn({},a);let e=a;return t?hn(e,t):function(...o){if(o.length===2&&typeof o[1]=="object"&&o[1]!==null&&"kind"in o[1]){let[c,d]=o;if(d.kind!=="method")throw new Error("track decorator is only applicable to methods");return hn(e,c)}let[,,i]=o;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let n=i.value;return i.value=hn(e,n),i}}var ku=null;function zu(){return ku===null&&(ku=new lr),ku}var WR=async()=>{k.debug("Starting flushAll operation");try{await Promise.all([zu().flush(),...yu.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 nh(a,t){if(!t||typeof t!="object")throw new Error("Arguments must be an object");let e=a.validationSchema,i=e.extend(Object.fromEntries(Object.entries(e.shape).map(([n,c])=>[n,c.refine(d=>d!==void 0,{message:`${n} cannot be undefined`,path:[n]})]))).safeParse(t);if(!i.success){let n=i.error.issues.map(d=>d.path[0]).filter(Boolean),c=[...new Set(n)];throw new Error(BR(a,t,c))}}function BR(a,t,e){let o=Object.keys(t),i=e.filter(n=>!(n in t));return `Metric '${a.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${o.join(", ")}.`}var bn=class{static calculateAverageScores(t){if(!t||t.length===0)return new Map;let e=new Map;for(let i of t)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let n of i.scoreResults){if(!n||n.scoringFailed||typeof n.value!="number")continue;let c=e.get(n.name)||{sum:0,count:0};c.sum+=n.value,c.count+=1,e.set(n.name,c);}let o=new Map;return e.forEach((i,n)=>{o.set(n,i.count>0?i.sum/i.count:0);}),o}static formatScore(t){return t.toFixed(4)}static formatTime(t){let e=Math.floor(t/3600),o=Math.floor(t%3600/60),i=Math.floor(t%60);return `${e.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(t,e,o,i){if(t.length===0){k.info(`
|
|
14
14
|
No test results available to display.`);return}if(o.size===0){k.info(`
|
|
15
|
-
No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),d=[
|
|
16
|
-
`),u=await e.ensureNameLoaded(),g=
|
|
15
|
+
No metrics available to display.`);return}let n=[...o.keys()].sort(),c=this.formatTime(i),d=[wn__default.default.bold(`Total time: ${c}`),wn__default.default.bold(`Number of samples: ${t.length}`),"",...n.map(f=>{let y=this.formatScore(o.get(f)||0);return wn__default.default.green(`${f}: ${y} (avg)`)})].join(`
|
|
16
|
+
`),u=await e.ensureNameLoaded(),g=LR__default.default(d,{title:`${u} (${t.length} samples)`,titleAlignment:"left",padding:1,margin:0,borderColor:"cyan",borderStyle:"round"});k.info(`
|
|
17
17
|
`+g+`
|
|
18
|
-
`),k.info(
|
|
18
|
+
`),k.info(wn__default.default.blue("Uploading results to Opik ... "));}static async displayExperimentLink(t){let e=await t.getUrl();k.info(`View the results ${ni(e,"in your Opik dashboard")}`);}static async processResults(t,e,o=0){let i=this.calculateAverageScores(t);await this.generateResultTable(t,e,i,o),await this.displayExperimentLink(e);let n=await e.ensureNameLoaded();return {experimentId:e.id,experimentName:n,testResults:t}}};function sh(a,t,e){if(!a||typeof t!="string"||t.trim()==="")return e;let o=t.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),i=a;for(let n of o)if(typeof i=="object"&&i!==null&&n in i)i=i[n];else return e;return i===void 0?e:i}var ph,vu;ph=[Ie({name:"metrics_calculation",type:ve.General})];var Ur=class{constructor(t,e,o){Ou(vu,5,this);this.client=void 0;this.dataset=void 0;this.task=void 0;this.scoringMetrics=void 0;this.projectName=void 0;this.nbSamples=void 0;this.scoringKeyMapping=void 0;this.experiment=void 0;this.rootTrace=void 0;this.client=e,this.dataset=t.dataset,this.experiment=o,this.task=t.task,this.scoringMetrics=t.scoringMetrics||[],this.projectName=t.projectName,this.nbSamples=t.nbSamples,this.scoringKeyMapping=t.scoringKeyMapping;}async execute(){var f;let t=performance.now(),e=[],o=await this.dataset.getItems(this.nbSamples),i=o.length,n=k.settings.minLevel;k.settings.minLevel=6;let c=VR__default.default({text:`Evaluating dataset (0/${i} items)`}).start(),d=[];for(let y=0;y<o.length;y++){let z=o[y];try{this.rootTrace=this.client.trace({projectName:this.projectName,name:"evaluation_task",createdBy:"evaluation",input:z}),oi.enterWith({trace:this.rootTrace});let v=await this.executeTask(z);d.push(v),this.rootTrace.update({output:v.testCase.taskOutput,endTime:new Date});}catch(v){let S=v instanceof Error?v.message:String(v);k.error(`Error processing dataset item: ${z.id} - ${S}`),v instanceof Error&&this.rootTrace.update({errorInfo:{message:v.message,exceptionType:v.name,traceback:(f=v.stack)!=null?f:""},endTime:new Date});}e.push(new mn({datasetItemId:z.id,traceId:this.rootTrace.data.id})),c.text=`Evaluating dataset (${y+1}/${i} items, ${Math.round((y+1)/i*100)}%)`;}let g=(performance.now()-t)/1e3;return c.succeed(`Evaluation complete: ${i} items processed in ${g.toFixed(2)}s`),k.settings.minLevel=n,this.experiment.insert(e),await this.client.flush(),bn.processResults(d,this.experiment,g)}async executeTask(t){let e={},o=[];k.debug(`Starting evaluation task on dataset item ${t.id}`),e=await Ie({name:"llm_task",type:ve.General},this.task)(t),k.debug(`Finished evaluation task on dataset item ${t.id}`);let i=this.prepareScoringInputs(t,e),n={traceId:this.rootTrace.data.id,datasetItemId:t.id,scoringInputs:i,taskOutput:e};return this.scoringMetrics.length>0?this.calculateScores(n):{testCase:n,scoreResults:o}}async calculateScores(t){let e=[],{scoringInputs:o}=t;for(let i of this.scoringMetrics){k.debug(`Calculating score for metric ${i.name}`);try{nh(i,o);let n=await i.score(o),c=Array.isArray(n)?n:[n];e.push(...c);}catch(n){let c=n instanceof Error?n.message:String(n);k.error(`Metric ${i.name} failed: ${c}`);}k.debug(`Finished calculating score for metric ${i.name}`);}return e.forEach(i=>{var n;return (n=this.rootTrace)==null?void 0:n.score({name:i.name,value:i.value,reason:i.reason})}),{testCase:t,scoreResults:e}}prepareScoringInputs(t,e){let o={...t,...e};if(!this.scoringKeyMapping)return o;let i={...o};for(let[n,c]of Object.entries(this.scoringKeyMapping)){let d=sh(o,c);d!==void 0&&(i[n]=d);}return i}};vu=Nu(),Wu(vu,1,"calculateScores",ph,Ur),En(vu,Ur);var Dr=class Dr{static getInstance(t){return Dr.instance||(Dr.instance=new lr(t)),Dr.instance}};Dr.instance=null;var xn=Dr;async function ch(a){var o;if(!a.dataset)throw new Error("Dataset is required for evaluation");if(!a.task)throw new Error("Task function is required for evaluation");let t=(o=a.client)!=null?o:xn.getInstance(),e=await t.createExperiment({name:a.experimentName,datasetName:a.dataset.name,experimentConfig:a.experimentConfig,prompts:a.prompts});try{let i=new Ur(a,t,e);return k.info("Starting evaluation"),i.execute()}catch(i){throw k.error(`Error during evaluation: ${i}`),i}}var mr=class{constructor(t){this.modelName=t;}};var ti=class a extends Error{constructor(t){super(t),this.name="ModelError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Mr=class a extends ti{constructor(e,o){super(e);this.cause=o;this.name="ModelGenerationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},Le=class a extends ti{constructor(t){super(t),this.name="ModelConfigurationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function KR(a,t){return a.startsWith("gpt-")||a.startsWith("o1")||a.startsWith("o3")||a.startsWith("chatgpt-")}function GR(a,t){return a.startsWith("claude-")}function $R(a,t){return a.startsWith("gemini-")||a.startsWith("gemma-")}function Su(a,t,e){if(!t)throw new Le(`API key for ${a} is not configured. Please provide it via the 'apiKey' option or set the ${e} environment variable.`)}function _u(a,t){if(KR(a)){let e=(t==null?void 0:t.apiKey)||process.env.OPENAI_API_KEY;return Su("OpenAI",e,"OPENAI_API_KEY"),openai.createOpenAI({apiKey:e,...t})(a)}if(GR(a)){let e=(t==null?void 0:t.apiKey)||process.env.ANTHROPIC_API_KEY;return Su("Anthropic",e,"ANTHROPIC_API_KEY"),anthropic.createAnthropic({apiKey:e,...t})(a)}if($R(a)){let e=(t==null?void 0:t.apiKey)||process.env.GOOGLE_API_KEY;return Su("Google Gemini",e,"GOOGLE_API_KEY"),google.createGoogleGenerativeAI({apiKey:e,...t})(a)}throw new Le(`Unable to detect provider for model ID: ${a}. Supported providers are OpenAI (gpt-*, o1*, o3*, chatgpt-*), Anthropic (claude-*), and Google Gemini (gemini-*, gemma-*).`)}var QR={inputTokens:"prompt_tokens",outputTokens:"completion_tokens",totalTokens:"total_tokens",reasoningTokens:"reasoning_tokens",cachedInputTokens:"cached_input_tokens"};function YR(a){if(!a||typeof a!="object")return false;let t=a,e="usage"in t,o="response"in t,i="text"in t,n="object"in t;return e||o||i||n}function Au(a,t){if(!YR(a))return {model:t};let e={model:ZR(a,t)},o=qR(a.usage);o&&(e.usage=o);let i=ey(a);i&&(e.provider=i);let n=oy(a);n&&(e.metadata=n);let c=ty(a);return c&&(e.output=c),e}function ZR(a,t){var e,o;return (o=(e=a.response)==null?void 0:e.modelId)!=null?o:t}function qR(a){if(!a)return;let t={};for(let[e,o]of Object.entries(QR)){let i=a[e];i!==void 0&&(t[o]=i);}return Object.keys(t).length>0?t:void 0}function ey(a){if(!a.providerMetadata)return;let t=Object.keys(a.providerMetadata);return t.length>0?t[0]:void 0}function ry(a){if(!a)return;let t={};return a.id&&(t.id=a.id),a.timestamp&&(t.timestamp=a.timestamp.toISOString()),Object.keys(t).length>0?t:void 0}function oy(a){let t={};a.usage&&(t.usage=a.usage),a.warnings&&a.warnings.length>0&&(t.warnings=a.warnings);let e=ry(a.response);return e&&(t.response=e),a.providerMetadata&&(t.providerMetadata=a.providerMetadata),a.finishReason&&(t.finishReason=a.finishReason),Object.keys(t).length>0?t:void 0}function ty(a){let t={};return "text"in a&&a.text&&(t.text=a.text),"object"in a&&a.object!==void 0&&(t.object=a.object),"toolCalls"in a&&Array.isArray(a.toolCalls)&&(t.toolCalls=a.toolCalls),"toolResults"in a&&Array.isArray(a.toolResults)&&(t.toolResults=a.toolResults),"sources"in a&&Array.isArray(a.sources)&&(t.sources=a.sources),Object.keys(t).length>0?t:void 0}var Nr=class extends mr{constructor(t,e={trackGenerations:true}){let o=typeof t=="string"?t:t.modelId;super(o);let{trackGenerations:i,...n}=e;try{typeof t!="string"?(this.model=t,k.debug("Initialized VercelAIChatModel with custom LanguageModel")):(this.model=_u(t,n),k.debug(`Initialized VercelAIChatModel with model ID: ${t}`)),i?(this._generateText=Ie({name:"model.generateText",type:ve.Llm,enrichSpan:c=>Au(c,this.modelName)},ai.generateText),this._generateObject=Ie({name:"model.generateObject",type:ve.Llm,enrichSpan:c=>Au(c,this.modelName)},ai.generateObject)):(this._generateText=ai.generateText,this._generateObject=ai.generateObject);}catch(c){throw new Le(`Failed to initialize model ${o}: ${c instanceof Error?c.message:String(c)}`)}}async generateString(t,e,o){try{let i;if(e){k.debug(`Generating structured output with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateObject({model:this.model,prompt:t,schema:e,...o});k.debug(`Generated structured output with model ${this.modelName}`),i=JSON.stringify(n.object);}else {k.debug(`Generating text with model ${this.modelName}, input length: ${t.length}`);let n=await this._generateText({model:this.model,prompt:t,...o});k.debug(`Generated text with model ${this.modelName}, output length: ${n.text.length}`),i=n.text;}return i}catch(i){let n=e?`Failed to generate structured output with model ${this.modelName}`:`Failed to generate text with model ${this.modelName}`;throw k.error(n,{error:i}),new Mr(n,i instanceof Error?i:new Error(String(i)))}}async generateProviderResponse(t,e){try{k.debug(`Generating provider response with model ${this.modelName}, messages count: ${t.length}`);let o=await this._generateText({model:this.model,messages:t,...e});return k.debug(`Generated provider response with model ${this.modelName}`),o}catch(o){let i=`Failed to generate provider response with model ${this.modelName}`;throw k.error(i,{error:o}),new Mr(i,o instanceof Error?o:new Error(String(o)))}}};var dh="gpt-4o";function Tu(a,t){return new Nr(a,t)}function uh(a,t){return new Nr(a,t)}function iy(a){return a instanceof mr}function ay(a){return typeof a=="object"&&a!==null&&"modelId"in a&&typeof a.modelId=="string"}function ny(a){return typeof a=="string"&&a.length>0}function sy(a){let t=typeof a,e=t==="object"?JSON.stringify(a):String(a);return new Error(`Invalid model type. Expected one of:
|
|
19
19
|
- string (model ID like 'gpt-4o', 'claude-3-5-sonnet-latest')
|
|
20
20
|
- LanguageModel instance from Vercel AI SDK
|
|
21
21
|
- OpikBaseModel instance
|
|
22
|
-
- undefined (uses default model: ${
|
|
22
|
+
- undefined (uses default model: ${dh})
|
|
23
23
|
|
|
24
|
-
Received: ${t} ${e}`)}function
|
|
25
|
-
`)}function
|
|
26
|
-
`)}function
|
|
24
|
+
Received: ${t} ${e}`)}function ii(a,t){if(a==null)return Tu(dh,t);if(ny(a))return Tu(a,t);if(iy(a))return a;if(ay(a))return uh(a,t);throw sy(a)}function gh(a){return a.map(t=>{let e=Array.isArray(t.content)?py(t.content):t.content;return `${t.role}: ${e}`}).join(`
|
|
25
|
+
`)}function py(a){return a.map(t=>t.type==="text"?t.text:t.type==="file"?`[file: ${t.filename||"unknown"}]`:t.type==="tool-call"?`[tool-call: ${t.toolName}]`:t.type==="tool-result"?`[tool-result: ${t.toolName}]`:t.type==="reasoning"?`[reasoning: ${t.text}]`:"").filter(t=>t.length>0).join(`
|
|
26
|
+
`)}function cy(a,t,e){return typeof a=="string"?_e(a,t,e):Array.isArray(a)?a.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i.type==="image"&&typeof i.image=="string"?{...i,image:_e(i.image,t,e)}:i.type==="file"&&typeof i.data=="string"?{...i,data:_e(i.data,t,e)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:_e(i.text,t,e)}:i):a}function fh(a,t,e){let o=cy(a.content,t,e);return {...a,content:o}}async function gue(a){var i;if(!a.dataset)throw new Error("Dataset is required for prompt evaluation");if(!a.messages||a.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(a.experimentConfig!==void 0&&(typeof a.experimentConfig!="object"||a.experimentConfig===null||Array.isArray(a.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let t=ii(a.model),e={...a.experimentConfig,prompt_template:a.messages,model:t.modelName,...a.temperature!==void 0&&{temperature:a.temperature},...a.seed!==void 0&&{seed:a.seed}},o=ly(t,a.messages,(i=a.templateType)!=null?i:ye.MUSTACHE,{temperature:a.temperature,seed:a.seed});return ch({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 ly(a,t,e,o){return async i=>{let n=t.map(g=>fh(g,i,e)),c=await a.generateProviderResponse(n,o),d=my(c);return {input:gh(n),output:d}}}function my(a){return a&&typeof a=="object"?"text"in a&&typeof a.text=="string"?a.text:"content"in a&&typeof a.content=="string"?a.content:JSON.stringify(a):String(a)}var fe=class{constructor(t,e=true){if(this.name=t,this.trackMetric=e,e){let o=this.score.bind(this);this.score=Ie({name:this.name,type:ve.General},o);}}};var dy=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),hh=class extends fe{constructor(e="exact_match",o=true){super(e,o);this.validationSchema=dy;}async score(e){let{output:o,expected:i}=e,n=o===i?1:0;return {name:this.name,value:n,reason:`Exact match: ${n===1?"Match":"No match"}`}}};var uy=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),wh=class extends fe{constructor(e="contains",o=true,i=false){super(e,o);this.validationSchema=uy;this.caseSensitive=i;}async score(e){let{output:o,substring:i}=e,n=this.caseSensitive?o:o.toLowerCase(),c=this.caseSensitive?i:i.toLowerCase();return n.includes(c)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};var gy=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),bh=class extends fe{constructor(e="regex_match",o=true){super(e,o);this.validationSchema=gy;}async score(e){let{output:o,pattern:i,flags:n}=e,c;typeof i=="string"&&n?c=new RegExp(i,n):c=new RegExp(i);let d=c.test(o);return {name:this.name,value:d?1:0,reason:d?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};var fy=zod.z.object({output:zod.z.unknown()}),Rh=class extends fe{constructor(e="is_json_metric",o=true){super(e,o);this.validationSchema=fy;}async score(e){let{output:o}=e;try{return JSON.parse(o),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};var ke=class extends fe{constructor(t,e){var i;let o=(i=e==null?void 0:e.trackMetric)!=null?i:true;super(t,o),this.temperature=e==null?void 0:e.temperature,this.seed=e==null?void 0:e.seed,this.maxTokens=e==null?void 0:e.maxTokens,this.modelSettings=e==null?void 0:e.modelSettings,this.model=this.initModel(e==null?void 0:e.model,{trackGenerations:o});}initModel(t,e){return ii(t,e)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};function yh(a,t=[]){let e="";return t.length>0&&(e=`
|
|
27
27
|
|
|
28
28
|
###EXAMPLES###
|
|
29
29
|
|
|
@@ -85,7 +85,7 @@ ${e}
|
|
|
85
85
|
Analyze the following text and provide your verdict score, and reason in the specified JSON format:
|
|
86
86
|
|
|
87
87
|
${a}
|
|
88
|
-
`}var
|
|
88
|
+
`}var yn=class a extends Error{constructor(t){super(t),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},he=class a extends yn{constructor(e,o){super(e);this.cause=o;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}},kn=class a extends yn{constructor(e,o){super(e);this.cause=o;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,a);}};function Ve(a){try{return JSON.parse(a)}catch{return hy(a)}}function hy(a){try{let t=a.indexOf("{"),e=a.lastIndexOf("}");if(t===-1||e===-1||t>=e)throw new Error("No valid JSON object found in content");let o=a.substring(t,e+1);return JSON.parse(o)}catch(t){let e=t instanceof Error?t.message:String(t);throw new kn(`Failed to extract JSON from content: ${e}`,t instanceof Error?t:void 0)}}function kh(a,t){try{let e=Ve(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Moderation score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate moderation score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var wy=zod.z.object({output:zod.z.string()}),by=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),zn=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"moderation_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=wy;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{output:o}=e,i=yh(o,this.fewShotExamples),n=this.buildModelOptions(),c=await this.model.generateString(i,by,n);return kh(c,this.name)}};function zh(a,t){return `
|
|
89
89
|
You are an impartial judge tasked with evaluating the quality and usefulness of AI-generated responses.
|
|
90
90
|
Your evaluation should consider the following key factors:
|
|
91
91
|
- Helpfulness: How well does it solve the user's problem?
|
|
@@ -121,7 +121,7 @@ ${a}
|
|
|
121
121
|
AI Response: ${t}
|
|
122
122
|
|
|
123
123
|
Provide your evaluation in the specified JSON format.
|
|
124
|
-
`}function
|
|
124
|
+
`}function vh(a,t){try{let e=Ve(a),o=Number(e.score);if(isNaN(o)||o<0||o>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${o}`);return {name:t,value:o,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var xy=zod.z.object({input:zod.z.string(),output:zod.z.string()}),Ry=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),vn=class extends ke{constructor(e){var i;let o=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=xy;}async score(e){let{input:o,output:i}=e,n=zh(o,i),c=this.buildModelOptions(),d=await this.model.generateString(n,Ry,c);return vh(d,this.name)}};var yy=`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
|
+
`,ky=`You are an expert judge tasked with evaluating the factual accuracy and reliability of an AI-generated answer. Analyze the provided INPUT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.
|
|
160
160
|
|
|
161
161
|
Guidelines:
|
|
162
162
|
1. Evaluate the OUTPUT based on generally accepted facts and reliable information.
|
|
@@ -187,7 +187,7 @@ It is crucial that you provide your answer in the following JSON format:
|
|
|
187
187
|
"reason": ["some reason 1", "some reason 2"]
|
|
188
188
|
}}
|
|
189
189
|
Reasons amount is not restricted. Output must be JSON format only.
|
|
190
|
-
`;function
|
|
190
|
+
`;function Sh(a,t){return a.length===0?"":`
|
|
191
191
|
|
|
192
192
|
EXAMPLES:
|
|
193
193
|
|
|
@@ -199,7 +199,7 @@ ${i}Output: ${o.output}
|
|
|
199
199
|
{"score": "${o.score}", "reason": "${o.reason}"}
|
|
200
200
|
</example>`}).join(`
|
|
201
201
|
|
|
202
|
-
`)}`}function
|
|
202
|
+
`)}`}function _h(a,t,e,o=[]){let i=Sh(o,true);return yy.replace("{examples_str}",i).replace("{input}",a).replace("{context}",JSON.stringify(e)).replace("{output}",t)}function Ah(a,t,e=[]){let o=Sh(e,false);return ky.replace("{examples_str}",o).replace("{input}",a).replace("{output}",t)}function Th(a,t){try{let e=Ve(a),o=e.score;if(o==null)throw new Error(`Hallucination score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Hallucination score must be between 0.0 and 1.0, got ${i}`);let n="",c=e.reason;return Array.isArray(c)?n=c.map(d=>String(d)).join(" "):c&&(n=String(c)),{name:t,value:i,reason:n}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate hallucination score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var zy=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),vy=zod.z.object({score:zod.z.number(),reason:zod.z.union([zod.z.string(),zod.z.array(zod.z.string())])}),Sn=class extends ke{constructor(e){var i,n;let o=(i=e==null?void 0:e.name)!=null?i:"hallucination_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=zy;this.fewShotExamples=(n=e==null?void 0:e.fewShotExamples)!=null?n:[];}async score(e){let{input:o,output:i,context:n}=e,c=n?_h(o,i,n,this.fewShotExamples):Ah(o,i,this.fewShotExamples),d=this.buildModelOptions(),u=await this.model.generateString(c,vy,d);return Th(u,this.name)}};var Eh=[{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."}],Ph=[{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 Sy(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
|
|
203
203
|
|
|
204
204
|
- **Input:** "${t.input}"
|
|
205
205
|
- **Output:** "${t.output}"
|
|
@@ -212,7 +212,7 @@ ${i}Output: ${o.output}
|
|
|
212
212
|
}
|
|
213
213
|
\`\`\``).join(`
|
|
214
214
|
|
|
215
|
-
`)}function
|
|
215
|
+
`)}function _y(a){return a.map((t,e)=>`#### Example ${e+1}: ${t.title}
|
|
216
216
|
|
|
217
217
|
- **Input:** "${t.input}"
|
|
218
218
|
- **Output:** "${t.output}"
|
|
@@ -224,7 +224,7 @@ ${i}Output: ${o.output}
|
|
|
224
224
|
}
|
|
225
225
|
\`\`\``).join(`
|
|
226
226
|
|
|
227
|
-
`)}function
|
|
227
|
+
`)}function Ch(a,t,e,o){return `
|
|
228
228
|
YOU ARE AN EXPERT IN NLP EVALUATION METRICS, SPECIALLY TRAINED TO ASSESS ANSWER RELEVANCE IN RESPONSES
|
|
229
229
|
PROVIDED BY LANGUAGE MODELS. YOUR TASK IS TO EVALUATE THE RELEVANCE OF A GIVEN ANSWER FROM
|
|
230
230
|
ANOTHER LLM BASED ON THE USER'S INPUT AND CONTEXT PROVIDED.
|
|
@@ -270,7 +270,7 @@ ${i}Output: ${o.output}
|
|
|
270
270
|
|
|
271
271
|
###FEW-SHOT EXAMPLES###
|
|
272
272
|
|
|
273
|
-
${
|
|
273
|
+
${Sy(o)}
|
|
274
274
|
|
|
275
275
|
###INPUTS:###
|
|
276
276
|
***
|
|
@@ -283,7 +283,7 @@ ${i}Output: ${o.output}
|
|
|
283
283
|
Context:
|
|
284
284
|
${JSON.stringify(e)}
|
|
285
285
|
***
|
|
286
|
-
`}function
|
|
286
|
+
`}function jh(a,t,e){return `
|
|
287
287
|
YOU ARE AN EXPERT IN NLP EVALUATION METRICS, SPECIALLY TRAINED TO ASSESS ANSWER RELEVANCE IN RESPONSES
|
|
288
288
|
PROVIDED BY LANGUAGE MODELS. YOUR TASK IS TO EVALUATE THE RELEVANCE OF A GIVEN ANSWER FROM
|
|
289
289
|
ANOTHER LLM BASED ON THE USER'S INPUT.
|
|
@@ -328,7 +328,7 @@ ${i}Output: ${o.output}
|
|
|
328
328
|
|
|
329
329
|
###FEW-SHOT EXAMPLES###
|
|
330
330
|
|
|
331
|
-
${
|
|
331
|
+
${_y(e)}
|
|
332
332
|
|
|
333
333
|
###INPUTS:###
|
|
334
334
|
***
|
|
@@ -338,7 +338,7 @@ ${i}Output: ${o.output}
|
|
|
338
338
|
Output:
|
|
339
339
|
${t}
|
|
340
340
|
***
|
|
341
|
-
`}function
|
|
341
|
+
`}function Ih(a,t){try{let e=Ve(a),o=e.answer_relevance_score;if(o==null)throw new Error(`Answer relevance score is required but got ${o}`);let i=Number(o);if(isNaN(i)||i<0||i>1)throw new Error(`Answer relevance score must be between 0.0 and 1.0, got ${i}`);return {name:t,value:i,reason:String(e.reason||"")}}catch(e){let o=e instanceof Error?e.message:String(e);throw k.error(`Failed to parse model output: ${o}`),new he("Failed to calculate answer relevance score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var Ay=zod.z.object({input:zod.z.string(),output:zod.z.string(),context:zod.z.array(zod.z.string()).optional()}),Ty=zod.z.object({answer_relevance_score:zod.z.number(),reason:zod.z.string()}),_n=class extends ke{constructor(e){var i,n,c,d;let o=(i=e==null?void 0:e.name)!=null?i:"answer_relevance_metric";super(o,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Ay;this.fewShotExamplesWithContext=(n=e==null?void 0:e.fewShotExamples)!=null?n:Eh,this.fewShotExamplesNoContext=(c=e==null?void 0:e.fewShotExamplesNoContext)!=null?c:Ph,this.requireContext=(d=e==null?void 0:e.requireContext)!=null?d:true;}async score(e){let{input:o,output:i,context:n}=e;if(!n&&this.requireContext)throw new he(`${this.name} requires context by default. If you want to allow execution in no-context mode, enable it via 'new AnswerRelevance({ requireContext: false })'`);let c=n?Ch(o,i,n,this.fewShotExamplesWithContext):jh(o,i,this.fewShotExamplesNoContext),d=this.buildModelOptions(),u=await this.model.generateString(c,Ty,d);return Ih(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=_n;exports.BaseLLMJudgeMetric=ke;exports.BaseMetric=fe;exports.Contains=wh;exports.ExactMatch=hh;exports.Hallucination=Sn;exports.IsJson=Rh;exports.ModelConfigurationError=Le;exports.ModelError=ti;exports.ModelGenerationError=Mr;exports.Moderation=zn;exports.Opik=lr;exports.OpikBaseModel=mr;exports.OpikQueryLanguage=Be;exports.OpikSpanType=ve;exports.Prompt=Oe;exports.PromptType=ye;exports.RegexMatch=bh;exports.Usefulness=vn;exports.VercelAIChatModel=Nr;exports.createModel=Tu;exports.createModelFromInstance=uh;exports.detectProvider=_u;exports.disableLogger=Xh;exports.evaluate=ch;exports.evaluatePrompt=gue;exports.flushAll=WR;exports.generateId=oe;exports.getTrackContext=MR;exports.logger=k;exports.resolveModel=ii;exports.setLoggerLevel=Bu;exports.track=Ie;
|