opik 2.2.86 → 2.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),wN=require('fs'),_N=require('os'),hee=require('path'),yee=require('ini');require('dotenv/config');var uuid=require('uuid'),zae=require('xxhash-wasm'),Sae=require('fast-json-stable-stringify'),util=require('util'),Cae=require('mustache'),Uae=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),Hae=require('fast-deep-equal'),async_hooks=require('async_hooks'),Au=require('chalk'),wne=require('boxen'),zod=require('zod'),kne=require('ora'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),ai=require('ai');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var wN__default=/*#__PURE__*/_interopDefault(wN);var _N__default=/*#__PURE__*/_interopDefault(_N);var hee__default=/*#__PURE__*/_interopDefault(hee);var yee__default=/*#__PURE__*/_interopDefault(yee);var zae__default=/*#__PURE__*/_interopDefault(zae);var Sae__default=/*#__PURE__*/_interopDefault(Sae);var Cae__default=/*#__PURE__*/_interopDefault(Cae);var Uae__default=/*#__PURE__*/_interopDefault(Uae);var Hae__default=/*#__PURE__*/_interopDefault(Hae);var Au__default=/*#__PURE__*/_interopDefault(Au);var wne__default=/*#__PURE__*/_interopDefault(wne);var kne__default=/*#__PURE__*/_interopDefault(kne);var oee=Object.create;var to=Object.defineProperty;var gN=Object.getOwnPropertyDescriptor;var iee=Object.getOwnPropertyNames;var aee=Object.prototype.hasOwnProperty;var fN=(p,o)=>(o=Symbol[p])?o:Symbol.for("Symbol."+p),mi=p=>{throw TypeError(p)};var nee=(p,o,e)=>o in p?to(p,o,{enumerable:true,configurable:true,writable:true,value:e}):p[o]=e;var n=(p,o)=>()=>(p&&(o=p(p=0)),o);var L=(p,o)=>{for(var e in o)to(p,e,{get:o[e],enumerable:true});},see=(p,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of iee(o))!aee.call(p,i)&&i!==e&&to(p,i,{get:()=>o[i],enumerable:!(t=gN(o,i))||t.enumerable});return p};var pee=p=>see(to({},"__esModule",{value:true}),p);var hN=p=>{var o;return [,,,oee((o=void 0)!=null?o:null)]},yN=["class","method","getter","setter","accessor","field","value","get","set"],li=p=>p!==void 0&&typeof p!="function"?mi("Function expected"):p,cee=(p,o,e,t,i)=>({kind:yN[p],name:o,metadata:t,addInitializer:a=>e._?mi("Already initialized"):i.push(li(a||null))}),og=(p,o)=>nee(o,fN("metadata"),p[3]),bN=(p,o,e,t)=>{for(var i=0,a=p[o>>1],s=a&&a.length;i<s;i++)a[i].call(e);return t},RN=(p,o,e,t,i,a)=>{var c,l,m,u,d=o&7,f=false,g=false,h=2,y=yN[d+5],A=p[h]||(p[h]=[]),C=((i=i.prototype),gN(i,e));for(var I=t.length-1;I>=0;I--)m=cee(d,e,l={},p[3],A),(m.static=f,m.private=g,u=m.access={has:D=>e in D},(u.get=D=>D[e]),d>2),c=(0, t[I])(C[y],m),l._=1,li(c)&&(C[y]=c);return C&&to(i,e,C),i};function Ap(p,o=p){return ansiEscapes.link(o,p)}var gee;exports.logger=void 0;exports.setLoggerLevel=void 0;exports.disableLogger=void 0;var re=n(()=>{gee={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};exports.logger=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),exports.setLoggerLevel=p=>{exports.logger.settings.minLevel=gee[p];},exports.disableLogger=()=>{exports.logger.settings.minLevel=100;};exports.setLoggerLevel(process.env.OPIK_LOG_LEVEL||"INFO");});function ag(p){return Object.fromEntries(Object.entries(p).filter(([,o])=>o!==void 0))}function Pp(p){if(p!==void 0)return ["1","true","yes"].includes(String(p).toLowerCase())}function Ree(){return ag({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,environment:process.env.OPIK_ENVIRONMENT,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:Pp(process.env.OPIK_HOLD_UNTIL_FLUSH),trackDisable:Pp(process.env.OPIK_TRACK_DISABLE),maxPayloadSizeMb:process.env.OPIK_MAX_PAYLOAD_SIZE_MB&&Number.isFinite(Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB))?Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB):void 0,isAttachmentExtractionActive:Pp(process.env.OPIK_IS_ATTACHMENT_EXTRACTION_ACTIVE),minBase64EmbeddedAttachmentSize:process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE&&Number.isFinite(Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE))?Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE):void 0,promptCacheTtlSeconds:process.env.OPIK_PROMPT_CACHE_TTL_SECONDS?Math.max(1,parseInt(process.env.OPIK_PROMPT_CACHE_TTL_SECONDS,10)||1):void 0})}function xee(p){return p.replace(/^~(?=$|\/|\\)/,_N__default.default.homedir())}function wee(){let p=process.env.OPIK_CONFIG_PATH||bee,o=xee(p);if(!wN__default.default.existsSync(o)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${o}`);return {}}try{let e=yee__default.default.parse(wN__default.default.readFileSync(o,"utf8"));return e.opik?ag({apiKey:e.opik.api_key,apiUrl:e.opik.url_override,projectName:e.opik.project_name,workspaceName:e.opik.workspace,trackDisable:Pp(e.opik.track_disable)}):{}}catch(e){return exports.logger.error(`Error loading config file ${o}: ${e}`),{}}}function zp(p){let o=Ree(),e=wee(),{headers:t,...i}=p||{};return _ee({...Ke,...e,...o,...ag(i)})}function _ee(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");if(p.trackDisable)return p;let o=kee(p.apiUrl);if(o&&!p.apiKey)throw new Error("OPIK_API_KEY is not set");if(o&&!p.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return p}function kee(p){return new URL(p).hostname.endsWith("comet.com")}var bee,Ke,ct=n(()=>{re();bee=hee__default.default.join(_N__default.default.homedir(),".opik.config"),Ke={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false,trackDisable:false,maxPayloadSizeMb:20,isAttachmentExtractionActive:true,minBase64EmbeddedAttachmentSize:256e3};});function Aee(p){sg.setTracingActive(p);}function Le(){return sg.isTracingActive()}function Pee(){sg.resetToConfigDefault();}var ng,sg,oo=n(()=>{ct();ng=class{constructor(){this.tracingActive=null;}setTracingActive(o){this.tracingActive=o;}resetToConfigDefault(){this.tracingActive=null;}isTracingActive(){if(this.tracingActive!==null)return this.tracingActive;try{return this.tracingActive=!zp().trackDisable,this.tracingActive}catch{return true}}},sg=new ng;});function di(p,o){return JSON.parse(p,o)}var $e,Mr=n(()=>{$e=(p,o,e)=>JSON.stringify(p,o,e);});function zee({message:p,statusCode:o,body:e}){let t=[];return p!=null&&t.push(p),o!=null&&t.push(`Status code: ${o.toString()}`),e!=null&&t.push(`Body: ${$e(e,void 0,2)}`),t.join(`
|
|
2
2
|
`)}var k,Sp=n(()=>{Mr();k=class extends Error{constructor({message:o,statusCode:e,body:t,rawResponse:i}){super(zee({message:o,statusCode:e,body:t})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=e,this.body=t,this.rawResponse=i;}};});var Wr,kN=n(()=>{Wr=class extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var J=n(()=>{Sp();kN();});var ui,AN=n(()=>{J();ui=class extends k{constructor(o,e){super({message:"BadGatewayError",statusCode:502,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var N,PN=n(()=>{J();N=class extends k{constructor(o,e){super({message:"BadRequestError",statusCode:400,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var X,zN=n(()=>{J();X=class extends k{constructor(o,e){super({message:"ConflictError",statusCode:409,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var fe,SN=n(()=>{J();fe=class extends k{constructor(o,e){super({message:"ForbiddenError",statusCode:403,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var lt,pg=n(()=>{J();lt=class extends k{constructor(o,e){super({message:"GoneError",statusCode:410,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var mt,vN=n(()=>{J();mt=class extends k{constructor(o,e){super({message:"InternalServerError",statusCode:500,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var U,TN=n(()=>{J();U=class extends k{constructor(o,e){super({message:"NotFoundError",statusCode:404,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Lr,jN=n(()=>{J();Lr=class extends k{constructor(o,e){super({message:"NotImplementedError",statusCode:501,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var io,EN=n(()=>{J();io=class extends k{constructor(o,e){super({message:"ServiceUnavailableError",statusCode:503,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Qe,CN=n(()=>{J();Qe=class extends k{constructor(o,e){super({message:"TooManyRequestsError",statusCode:429,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var O,IN=n(()=>{J();O=class extends k{constructor(o,e){super({message:"UnauthorizedError",statusCode:401,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ae,DN=n(()=>{J();ae=class extends k{constructor(o,e){super({message:"UnprocessableEntityError",statusCode:422,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var UN=n(()=>{AN();PN();zN();SN();pg();vN();TN();jN();EN();CN();IN();DN();});var cg=n(()=>{});var NN=n(()=>{cg();});var lg={};var FN=n(()=>{NN();});var mg=n(()=>{});var BN=n(()=>{mg();});var MN,WN=n(()=>{MN={Open:"open",Resolved:"resolved",Closed:"closed"};});var LN,VN=n(()=>{LN={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var JN,HN=n(()=>{JN={Open:"open",Resolved:"resolved",Closed:"closed"};});var dg=n(()=>{WN();VN();HN();});var vp={};L(vp,{AgentInsightsIssueUpdateStatus:()=>MN,FindAgentInsightsIssuesRequestSeverity:()=>LN,FindAgentInsightsIssuesRequestStatus:()=>JN});var GN=n(()=>{BN();dg();});var ug=n(()=>{});var ON=n(()=>{ug();});var gg={};var KN=n(()=>{ON();});var fg=n(()=>{});var $N=n(()=>{fg();});var QN,YN=n(()=>{QN={Enabled:"enabled",Disabled:"disabled"};});var hg=n(()=>{YN();});var Tp={};L(Tp,{AgentInsightsJobUpdateStatus:()=>QN});var XN=n(()=>{$N();hg();});var yg=n(()=>{});var ZN=n(()=>{yg();});var qN,eF=n(()=>{qN={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var bg=n(()=>{eF();});var jp={};L(jp,{GetWebhookExamplesRequestAlertType:()=>qN});var rF=n(()=>{ZN();bg();});var Rg=n(()=>{});var tF=n(()=>{Rg();});var xg={};var oF=n(()=>{tF();});var wg=n(()=>{});var iF=n(()=>{wg();});var aF,nF=n(()=>{aF={Trace:"TRACE",Span:"SPAN",Thread:"THREAD"};});var _g=n(()=>{nF();});var Ep={};L(Ep,{AssertionResultBatchEntityType:()=>aF});var sF=n(()=>{iF();_g();});var kg=n(()=>{});var pF=n(()=>{kg();});var cF,lF=n(()=>{cF={Trace:"trace",Span:"span"};});var mF,dF=n(()=>{mF={Trace:"trace",Span:"span"};});var uF,gF=n(()=>{uF={Trace:"trace",Span:"span"};});var fF,hF=n(()=>{fF={Trace:"trace",Span:"span"};});var Ag=n(()=>{lF();dF();gF();hF();});var Cp={};L(Cp,{AttachmentListRequestEntityType:()=>cF,DownloadAttachmentRequestEntityType:()=>mF,StartMultipartUploadRequestEntityType:()=>uF,UploadAttachmentRequestEntityType:()=>fF});var yF=n(()=>{pF();Ag();});var Pg=n(()=>{});var bF=n(()=>{Pg();});var zg={};var RF=n(()=>{bF();});var Sg=n(()=>{});var xF=n(()=>{Sg();});var vg={};var wF=n(()=>{xF();});var _F=n(()=>{});var Tg={};var kF=n(()=>{_F();});var jg=n(()=>{});var AF=n(()=>{jg();});var Eg={};var PF=n(()=>{AF();});var Cg=n(()=>{});var zF=n(()=>{Cg();});var SF,vF=n(()=>{SF={Json:"json",Jsonl:"jsonl"};});var TF,jF=n(()=>{TF={Private:"private",Public:"public"};});var Ip,Ig=n(()=>{Ip={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var EF,CF=n(()=>{EF={Private:"private",Public:"public"};});var Dg=n(()=>{vF();jF();Ig();CF();});var Dp={};L(Dp,{CreateDatasetItemsFromJsonRequestFormat:()=>SF,DatasetUpdateVisibility:()=>TF,DatasetWriteType:()=>Ip,DatasetWriteVisibility:()=>EF});var IF=n(()=>{zF();Dg();});var Ug=n(()=>{});var DF=n(()=>{Ug();});var Ng={};var UF=n(()=>{DF();});var Fg=n(()=>{});var NF=n(()=>{Fg();});var Up,Bg=n(()=>{Up={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var FF,BF=n(()=>{FF={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var MF,WF=n(()=>{MF={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var Mg=n(()=>{Bg();BF();WF();});var Np={};L(Np,{ExperimentWriteEvaluationMethod:()=>Up,ExperimentWriteStatus:()=>FF,ExperimentWriteType:()=>MF});var LF=n(()=>{NF();Mg();});var Wg=n(()=>{});var VF=n(()=>{Wg();});var JF,HF=n(()=>{JF={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};});var Lg=n(()=>{HF();});var Fp={};L(Fp,{FindFeedbackDefinitionsRequestType:()=>JF});var GF=n(()=>{VF();Lg();});var Vg=n(()=>{});var OF=n(()=>{Vg();});var Jg={};var KF=n(()=>{OF();});var Hg=n(()=>{});var $F=n(()=>{Hg();});var Gg={};var QF=n(()=>{$F();});var YF=n(()=>{});var Og={};var XF=n(()=>{YF();});var Kg=n(()=>{});var ZF=n(()=>{Kg();});var qF,eB=n(()=>{qF={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var $g=n(()=>{eB();});var Bp={};L(Bp,{ProviderApiKeyWriteProvider:()=>qF});var rB=n(()=>{ZF();$g();});var tB=n(()=>{});var Qg={};var oB=n(()=>{tB();});var Yg=n(()=>{});var iB=n(()=>{Yg();});var Xg={};var aB=n(()=>{iB();});var nB=n(()=>{});var Zg={};var sB=n(()=>{nB();});var pB=n(()=>{});var qg={};var cB=n(()=>{pB();});var lB=n(()=>{});var ef={};var mB=n(()=>{lB();});var rf=n(()=>{});var dB=n(()=>{rf();});var uB,gB=n(()=>{uB={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var tf=n(()=>{gB();});var Mp={};L(Mp,{OptimizationUpdateStatus:()=>uB});var fB=n(()=>{dB();tf();});var of=n(()=>{});var hB=n(()=>{of();});var yB,bB=n(()=>{yB={Connect:"connect",Endpoint:"endpoint"};});var af=n(()=>{bB();});var Wp={};L(Wp,{CreateSessionRequestType:()=>yB});var RB=n(()=>{hB();af();});var nf=n(()=>{});var xB=n(()=>{nf();});var wB,_B=n(()=>{wB={Traces:"traces",Spans:"spans",Threads:"threads"};});var kB,AB=n(()=>{kB={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var PB,zB=n(()=>{PB={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",SpanFeedbackScores:"SPAN_FEEDBACK_SCORES",SpanCount:"SPAN_COUNT",SpanDuration:"SPAN_DURATION",SpanTokenUsage:"SPAN_TOKEN_USAGE",TraceAverageDuration:"TRACE_AVERAGE_DURATION",TraceErrorRate:"TRACE_ERROR_RATE",SpanAverageDuration:"SPAN_AVERAGE_DURATION",SpanCost:"SPAN_COST",SpanErrorRate:"SPAN_ERROR_RATE",ThreadAverageDuration:"THREAD_AVERAGE_DURATION",ThreadCost:"THREAD_COST"};});var SB,vB=n(()=>{SB={Private:"private",Public:"public"};});var TB,jB=n(()=>{TB={Private:"private",Public:"public"};});var sf=n(()=>{_B();AB();zB();vB();jB();});var Lp={};L(Lp,{KpiCardRequestEntityType:()=>wB,ProjectMetricRequestPublicInterval:()=>kB,ProjectMetricRequestPublicMetricType:()=>PB,ProjectUpdateVisibility:()=>SB,ProjectWriteVisibility:()=>TB});var EB=n(()=>{xB();sf();});var pf=n(()=>{});var CB=n(()=>{pf();});var IB,DB=n(()=>{IB={Text:"text",Chat:"chat"};});var UB,NB=n(()=>{UB={Text:"text",Chat:"chat"};});var FB,BB=n(()=>{FB={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var cf=n(()=>{DB();NB();BB();});var Vp={};L(Vp,{CreatePromptVersionDetailTemplateStructure:()=>IB,PromptWriteTemplateStructure:()=>UB,PromptWriteType:()=>FB});var MB=n(()=>{CB();cf();});var lf=n(()=>{});var WB=n(()=>{lf();});var mf={};var LB=n(()=>{WB();});var df=n(()=>{});var VB=n(()=>{df();});var JB,HB=n(()=>{JB={AgentInsights:"agent_insights"};});var uf=n(()=>{HB();});var Jp={};L(Jp,{FindReportFailuresRequestType:()=>JB});var GB=n(()=>{VB();uf();});var gf=n(()=>{});var OB=n(()=>{gf();});var KB,$B=n(()=>{KB={Pending:"pending",Completed:"completed",Failed:"failed"};});var ff=n(()=>{$B();});var Hp={};L(Hp,{ReportCompleteRequestStatus:()=>KB});var QB=n(()=>{OB();ff();});var hf=n(()=>{});var YB=n(()=>{hf();});var XB,ZB=n(()=>{XB={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var yf=n(()=>{ZB();});var Gp={};L(Gp,{RetentionRuleWriteRetention:()=>XB});var qB=n(()=>{YB();yf();});var bf=n(()=>{});var eM=n(()=>{bf();});var rM,tM=n(()=>{rM={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var oM,iM=n(()=>{oM={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var aM,nM=n(()=>{aM={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var sM,pM=n(()=>{sM={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var Rf=n(()=>{tM();iM();nM();pM();});var Op={};L(Op,{BridgeCommandResultRequestStatus:()=>rM,BridgeCommandSubmitRequestType:()=>oM,ListRunnersRequestStatus:()=>aM,LocalRunnerJobResultRequestStatus:()=>sM});var cM=n(()=>{eM();Rf();});var lM=n(()=>{});var xf={};var mM=n(()=>{lM();});var wf=n(()=>{});var dM=n(()=>{wf();});var uM,gM=n(()=>{uM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var fM,hM=n(()=>{fM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var yM,bM=n(()=>{yM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var RM,xM=n(()=>{RM={Name:"name",Type:"type",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Model:"model",Provider:"provider",Tags:"tags",Usage:"usage",ErrorInfo:"error_info",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",Comments:"comments",TotalEstimatedCost:"total_estimated_cost",TotalEstimatedCostVersion:"total_estimated_cost_version",Duration:"duration",Ttft:"ttft",Source:"source",Environment:"environment"};});var wM,_M=n(()=>{wM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var _f=n(()=>{gM();hM();bM();xM();_M();});var Kp={};L(Kp,{FindFeedbackScoreNames1RequestType:()=>uM,GetSpanStatsRequestType:()=>fM,GetSpansByProjectRequestType:()=>yM,SpanSearchStreamRequestPublicExcludeItem:()=>RM,SpanSearchStreamRequestPublicType:()=>wM});var kM=n(()=>{dM();_f();});var kf=n(()=>{});var AM=n(()=>{kf();});var Af={};var PM=n(()=>{AM();});var zM=n(()=>{});var Pf={};var SM=n(()=>{zM();});var zf=n(()=>{});var vM=n(()=>{zf();});var TM,jM=n(()=>{TM={Name:"name",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Tags:"tags",ErrorInfo:"error_info",Usage:"usage",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",SpanFeedbackScores:"span_feedback_scores",Comments:"comments",GuardrailsValidations:"guardrails_validations",TotalEstimatedCost:"total_estimated_cost",SpanCount:"span_count",LlmSpanCount:"llm_span_count",HasToolSpans:"has_tool_spans",Duration:"duration",Ttft:"ttft",ThreadId:"thread_id",VisibilityMode:"visibility_mode",Providers:"providers",Experiment:"experiment",Source:"source",Environment:"environment"};});var Sf=n(()=>{jM();});var $p={};L($p,{TraceSearchStreamRequestPublicExcludeItem:()=>TM});var EM=n(()=>{vM();Sf();});var vf=n(()=>{});var CM=n(()=>{vf();});var Tf={};var IM=n(()=>{CM();});var DM=n(()=>{});var jf={};var UM=n(()=>{DM();});var Ef=n(()=>{});var NM=n(()=>{Ef();});var FM,BM=n(()=>{FM={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var MM,WM=n(()=>{MM={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",SpanFeedbackScores:"SPAN_FEEDBACK_SCORES",SpanCount:"SPAN_COUNT",SpanDuration:"SPAN_DURATION",SpanTokenUsage:"SPAN_TOKEN_USAGE",TraceAverageDuration:"TRACE_AVERAGE_DURATION",TraceErrorRate:"TRACE_ERROR_RATE",SpanAverageDuration:"SPAN_AVERAGE_DURATION",SpanCost:"SPAN_COST",SpanErrorRate:"SPAN_ERROR_RATE",ThreadAverageDuration:"THREAD_AVERAGE_DURATION",ThreadCost:"THREAD_COST"};});var Cf=n(()=>{BM();WM();});var Qp={};L(Qp,{WorkspaceSpanMetricRequestInterval:()=>FM,WorkspaceSpanMetricRequestMetricType:()=>MM});var LM=n(()=>{NM();Cf();});var VM=n(()=>{cg();FN();mg();GN();dg();ug();KN();fg();XN();hg();yg();rF();bg();Rg();oF();wg();sF();_g();kg();yF();Ag();Pg();RF();Sg();wF();kF();jg();PF();Cg();IF();Dg();Ug();UF();Fg();LF();Mg();Wg();GF();Lg();Vg();KF();Hg();QF();XF();Kg();rB();$g();oB();Yg();aB();sB();cB();mB();rf();fB();tf();of();RB();af();nf();EB();sf();pf();MB();cf();lf();LB();df();GB();uf();gf();QB();ff();hf();qB();yf();bf();cM();Rf();mM();wf();kM();_f();kf();PM();SM();zf();EM();Sf();vf();IM();UM();Ef();LM();Cf();});var JM=n(()=>{});var HM=n(()=>{});var See,GM=n(()=>{See={Blueprint:"blueprint",Mask:"mask"};});var OM=n(()=>{});var vee,KM=n(()=>{vee={Blueprint:"blueprint",Mask:"mask"};});var $M=n(()=>{});var gi,QM=n(()=>{gi={Blueprint:"blueprint",Mask:"mask"};});var YM=n(()=>{});var XM=n(()=>{});var ZM=n(()=>{});var Tee,qM=n(()=>{Tee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var eW=n(()=>{});var jee,rW=n(()=>{jee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var tW=n(()=>{});var Eee,oW=n(()=>{Eee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var iW=n(()=>{});var aW=n(()=>{});var nW=n(()=>{});var Cee,sW=n(()=>{Cee={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Iee,pW=n(()=>{Iee={Open:"open",Resolved:"resolved",Closed:"closed"};});var cW=n(()=>{});var Dee,lW=n(()=>{Dee={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Uee,mW=n(()=>{Uee={Open:"open",Resolved:"resolved",Closed:"closed"};});var dW=n(()=>{});var Nee,uW=n(()=>{Nee={Enabled:"enabled",Disabled:"disabled"};});var gW=n(()=>{});var fW=n(()=>{});var Fee,hW=n(()=>{Fee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var yW=n(()=>{});var bW=n(()=>{});var Bee,RW=n(()=>{Bee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var xW=n(()=>{});var wW=n(()=>{});var _W=n(()=>{});var Mee,kW=n(()=>{Mee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var Wee,AW=n(()=>{Wee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var PW=n(()=>{});var Lee,zW=n(()=>{Lee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var Vee,SW=n(()=>{Vee={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 vW=n(()=>{});var Jee,TW=n(()=>{Jee={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 jW=n(()=>{});var Hee,EW=n(()=>{Hee={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 CW=n(()=>{});var Gee,IW=n(()=>{Gee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var DW=n(()=>{});var UW=n(()=>{});var NW=n(()=>{});var FW=n(()=>{});var BW=n(()=>{});var MW=n(()=>{});var WW=n(()=>{});var LW=n(()=>{});var Oee,VW=n(()=>{Oee={Manual:"manual",Automated:"automated"};});var JW=n(()=>{});var HW=n(()=>{});var GW=n(()=>{});var Kee,OW=n(()=>{Kee={Trace:"trace",Thread:"thread"};});var KW=n(()=>{});var $W=n(()=>{});var $ee,QW=n(()=>{$ee={Trace:"trace",Thread:"thread"};});var YW=n(()=>{});var Qee,XW=n(()=>{Qee={Trace:"trace",Thread:"thread"};});var ZW=n(()=>{});var qW=n(()=>{});var Yee,e0=n(()=>{Yee={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var Xee,r0=n(()=>{Xee={Passed:"passed",Failed:"failed"};});var t0=n(()=>{});var o0=n(()=>{});var i0=n(()=>{});var a0=n(()=>{});var Zee,n0=n(()=>{Zee={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};});var s0=n(()=>{});var p0=n(()=>{});var c0=n(()=>{});var l0=n(()=>{});var m0=n(()=>{});var d0=n(()=>{});var u0=n(()=>{});var g0=n(()=>{});var f0=n(()=>{});var qee,h0=n(()=>{qee={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var y0=n(()=>{});var b0=n(()=>{});var R0=n(()=>{});var x0=n(()=>{});var ere,w0=n(()=>{ere={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var rre,_0=n(()=>{rre={Production:"production",Experiment:"experiment",Both:"both"};});var k0=n(()=>{});var A0=n(()=>{});var tre,P0=n(()=>{tre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var ore,z0=n(()=>{ore={Production:"production",Experiment:"experiment",Both:"both"};});var S0=n(()=>{});var v0=n(()=>{});var T0=n(()=>{});var j0=n(()=>{});var E0=n(()=>{});var C0=n(()=>{});var I0=n(()=>{});var D0=n(()=>{});var U0=n(()=>{});var N0=n(()=>{});var F0=n(()=>{});var B0=n(()=>{});var ire,M0=n(()=>{ire={Production:"production",Experiment:"experiment",Both:"both"};});var W0=n(()=>{});var are,L0=n(()=>{are={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var V0=n(()=>{});var J0=n(()=>{});var H0=n(()=>{});var G0=n(()=>{});var O0=n(()=>{});var nre,K0=n(()=>{nre={Production:"production",Experiment:"experiment",Both:"both"};});var $0=n(()=>{});var Q0=n(()=>{});var Y0=n(()=>{});var X0=n(()=>{});var Z0=n(()=>{});var sre,q0=n(()=>{sre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var pre,eL=n(()=>{pre={Production:"production",Experiment:"experiment",Both:"both"};});var rL=n(()=>{});var tL=n(()=>{});var oL=n(()=>{});var iL=n(()=>{});var aL=n(()=>{});var nL=n(()=>{});var sL=n(()=>{});var pL=n(()=>{});var cL=n(()=>{});var lL=n(()=>{});var mL=n(()=>{});var dL=n(()=>{});var uL=n(()=>{});var gL=n(()=>{});var cre,fL=n(()=>{cre={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var hL=n(()=>{});var lre,yL=n(()=>{lre={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var bL=n(()=>{});var RL=n(()=>{});var xL=n(()=>{});var mre,wL=n(()=>{mre={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var dre,_L=n(()=>{dre={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var kL=n(()=>{});var ure,AL=n(()=>{ure={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var PL=n(()=>{});var zL=n(()=>{});var SL=n(()=>{});var vL=n(()=>{});var TL=n(()=>{});var jL=n(()=>{});var EL=n(()=>{});var CL=n(()=>{});var IL=n(()=>{});var DL=n(()=>{});var UL=n(()=>{});var gre,NL=n(()=>{gre={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var FL=n(()=>{});var fre,BL=n(()=>{fre={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var hre,ML=n(()=>{hre={Passed:"passed",Failed:"failed"};});var yre,WL=n(()=>{yre={Passed:"passed",Failed:"failed"};});var LL=n(()=>{});var VL=n(()=>{});var JL=n(()=>{});var HL=n(()=>{});var GL=n(()=>{});var OL=n(()=>{});var KL=n(()=>{});var bre,$L=n(()=>{bre={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var QL=n(()=>{});var Rre,YL=n(()=>{Rre={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var xre,XL=n(()=>{xre={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var ZL=n(()=>{});var qL=n(()=>{});var eV=n(()=>{});var rV=n(()=>{});var wre,tV=n(()=>{wre={Trace:"trace",Span:"span"};});var oV=n(()=>{});var iV=n(()=>{});var aV=n(()=>{});var nV=n(()=>{});var sV=n(()=>{});var pV=n(()=>{});var cV=n(()=>{});var lV=n(()=>{});var mV=n(()=>{});var dV=n(()=>{});var uV=n(()=>{});var gV=n(()=>{});var fV=n(()=>{});var hV=n(()=>{});var yV=n(()=>{});var _re,bV=n(()=>{_re={Workspace:"workspace",Insights:"insights"};});var kre,RV=n(()=>{kre={MultiProject:"multi_project",Experiments:"experiments"};});var xV=n(()=>{});var Are,wV=n(()=>{Are={MultiProject:"multi_project",Experiments:"experiments"};});var _V=n(()=>{});var Pre,kV=n(()=>{Pre={MultiProject:"multi_project",Experiments:"experiments"};});var AV=n(()=>{});var PV=n(()=>{});var zV=n(()=>{});var SV=n(()=>{});var vV=n(()=>{});var TV=n(()=>{});var zre,jV=n(()=>{zre={Pending:"PENDING",Processing:"PROCESSING",Completed:"COMPLETED",Failed:"FAILED"};});var EV=n(()=>{});var CV=n(()=>{});var IV=n(()=>{});var DV=n(()=>{});var Sre,UV=n(()=>{Sre={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var NV=n(()=>{});var vre,FV=n(()=>{vre={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var BV=n(()=>{});var MV=n(()=>{});var WV=n(()=>{});var Tre,LV=n(()=>{Tre={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var jre,VV=n(()=>{jre={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var JV=n(()=>{});var HV=n(()=>{});var If,GV=n(()=>{If={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var OV=n(()=>{});var KV=n(()=>{});var Ere,$V=n(()=>{Ere={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Df,QV=n(()=>{Df={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var Cre,YV=n(()=>{Cre={Private:"private",Public:"public"};});var Ire,XV=n(()=>{Ire={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Dre,ZV=n(()=>{Dre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var qV=n(()=>{});var eJ=n(()=>{});var rJ=n(()=>{});var tJ=n(()=>{});var oJ=n(()=>{});var iJ=n(()=>{});var Ure,aJ=n(()=>{Ure={Private:"private",Public:"public"};});var nJ=n(()=>{});var Nre,sJ=n(()=>{Nre={Trace:"trace",Span:"span"};});var pJ=n(()=>{});var cJ=n(()=>{});var lJ=n(()=>{});var mJ=n(()=>{});var dJ=n(()=>{});var uJ=n(()=>{});var gJ=n(()=>{});var fJ=n(()=>{});var hJ=n(()=>{});var yJ=n(()=>{});var bJ=n(()=>{});var RJ=n(()=>{});var xJ=n(()=>{});var wJ=n(()=>{});var _J=n(()=>{});var kJ=n(()=>{});var AJ=n(()=>{});var PJ=n(()=>{});var zJ=n(()=>{});var SJ=n(()=>{});var Fre,vJ=n(()=>{Fre={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var TJ=n(()=>{});var Uf,Nf=n(()=>{Uf={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var Bre,jJ=n(()=>{Bre={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var EJ=n(()=>{});var Ff,Bf=n(()=>{Ff={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var CJ=n(()=>{});var IJ=n(()=>{});var DJ=n(()=>{});var UJ=n(()=>{});var NJ=n(()=>{});var FJ=n(()=>{});var Mre,BJ=n(()=>{Mre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var MJ=n(()=>{});var WJ=n(()=>{});var LJ=n(()=>{});var VJ=n(()=>{});var JJ=n(()=>{});var HJ=n(()=>{});var GJ=n(()=>{});var OJ=n(()=>{});var KJ=n(()=>{});var Wre,$J=n(()=>{Wre={Passed:"passed",Failed:"failed"};});var Lre,QJ=n(()=>{Lre={Default:"default",Hidden:"hidden"};});var YJ=n(()=>{});var Vre,XJ=n(()=>{Vre={Default:"default",Hidden:"hidden"};});var ZJ=n(()=>{});var qJ=n(()=>{});var Jre,eH=n(()=>{Jre={Passed:"passed",Failed:"failed"};});var Hre,rH=n(()=>{Hre={Default:"default",Hidden:"hidden"};});var tH=n(()=>{});var oH=n(()=>{});var Gre,iH=n(()=>{Gre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var Ore,aH=n(()=>{Ore={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Kre,nH=n(()=>{Kre={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var sH=n(()=>{});var pH=n(()=>{});var $re,cH=n(()=>{$re={Passed:"passed",Failed:"failed"};});var lH=n(()=>{});var Qre,mH=n(()=>{Qre={Passed:"passed",Failed:"failed"};});var Yre,dH=n(()=>{Yre={Passed:"passed",Failed:"failed"};});var uH=n(()=>{});var gH=n(()=>{});var fH=n(()=>{});var Xre,hH=n(()=>{Xre={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Mf,yH=n(()=>{Mf={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var bH=n(()=>{});var Zre,RH=n(()=>{Zre={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var qre,xH=n(()=>{qre={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var wH=n(()=>{});var _H=n(()=>{});var kH=n(()=>{});var AH=n(()=>{});var PH=n(()=>{});var zH=n(()=>{});var SH=n(()=>{});var vH=n(()=>{});var TH=n(()=>{});var jH=n(()=>{});var EH=n(()=>{});var CH=n(()=>{});var Wf,Lf=n(()=>{Wf={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var IH=n(()=>{});var ete,DH=n(()=>{ete={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var UH=n(()=>{});var rte,NH=n(()=>{rte={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var FH=n(()=>{});var tte,BH=n(()=>{tte={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var MH=n(()=>{});var WH=n(()=>{});var LH=n(()=>{});var ote,VH=n(()=>{ote={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var ite,JH=n(()=>{ite={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var HH=n(()=>{});var GH=n(()=>{});var OH=n(()=>{});var KH=n(()=>{});var $H=n(()=>{});var QH=n(()=>{});var YH=n(()=>{});var XH=n(()=>{});var ZH=n(()=>{});var qH=n(()=>{});var ate,e1=n(()=>{ate={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var nte,r1=n(()=>{nte={Passed:"passed",Failed:"failed"};});var t1=n(()=>{});var o1=n(()=>{});var i1=n(()=>{});var ste,a1=n(()=>{ste={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var pte,n1=n(()=>{pte={Passed:"passed",Failed:"failed"};});var s1=n(()=>{});var p1=n(()=>{});var c1=n(()=>{});var l1=n(()=>{});var m1=n(()=>{});var d1=n(()=>{});var u1=n(()=>{});var g1=n(()=>{});var f1=n(()=>{});var h1=n(()=>{});var y1=n(()=>{});var b1=n(()=>{});var R1=n(()=>{});var x1=n(()=>{});var w1=n(()=>{});var _1=n(()=>{});var k1=n(()=>{});var A1=n(()=>{});var cte,P1=n(()=>{cte={Count:"count",Errors:"errors",AvgDuration:"avg_duration",TotalCost:"total_cost"};});var z1=n(()=>{});var S1=n(()=>{});var v1=n(()=>{});var T1=n(()=>{});var j1=n(()=>{});var E1=n(()=>{});var C1=n(()=>{});var I1=n(()=>{});var lte,D1=n(()=>{lte={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var mte,U1=n(()=>{mte={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var N1=n(()=>{});var dte,F1=n(()=>{dte={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var B1=n(()=>{});var M1=n(()=>{});var W1=n(()=>{});var L1=n(()=>{});var V1=n(()=>{});var ute,J1=n(()=>{ute={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var gte,H1=n(()=>{gte={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var G1=n(()=>{});var fte,O1=n(()=>{fte={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var K1=n(()=>{});var $1=n(()=>{});var Q1=n(()=>{});var Y1=n(()=>{});var X1=n(()=>{});var hte,Z1=n(()=>{hte={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var q1=n(()=>{});var eG=n(()=>{});var yte,rG=n(()=>{yte={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var bte,tG=n(()=>{bte={Connect:"connect",Endpoint:"endpoint"};});var oG=n(()=>{});var iG=n(()=>{});var aG=n(()=>{});var Rte,nG=n(()=>{Rte={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};});var sG=n(()=>{});var pG=n(()=>{});var cG=n(()=>{});var lG=n(()=>{});var xte,mG=n(()=>{xte={Trace:"trace",Thread:"thread",Span:"span"};});var dG=n(()=>{});var uG=n(()=>{});var gG=n(()=>{});var fG=n(()=>{});var hG=n(()=>{});var yG=n(()=>{});var bG=n(()=>{});var RG=n(()=>{});var xG=n(()=>{});var wG=n(()=>{});var _G=n(()=>{});var kG=n(()=>{});var AG=n(()=>{});var PG=n(()=>{});var zG=n(()=>{});var SG=n(()=>{});var vG=n(()=>{});var wte,TG=n(()=>{wte={Pending:"pending",Completed:"completed",Failed:"failed"};});var jG=n(()=>{});var EG=n(()=>{});var CG=n(()=>{});var _te,IG=n(()=>{_te={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var kte,DG=n(()=>{kte={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var UG=n(()=>{});var NG=n(()=>{});var FG=n(()=>{});var BG=n(()=>{});var MG=n(()=>{});var Ate,WG=n(()=>{Ate={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var LG=n(()=>{});var VG=n(()=>{});var ao,Vf=n(()=>{ao={Required:"required",Optional:"optional"};});var JG=n(()=>{});var HG=n(()=>{});var GG=n(()=>{});var OG=n(()=>{});var KG=n(()=>{});var $G=n(()=>{});var QG=n(()=>{});var Pte,YG=n(()=>{Pte={Private:"private",Public:"public"};});var XG=n(()=>{});var zte,ZG=n(()=>{zte={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var Ste,qG=n(()=>{Ste={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",SpanFeedbackScores:"SPAN_FEEDBACK_SCORES",SpanCount:"SPAN_COUNT",SpanDuration:"SPAN_DURATION",SpanTokenUsage:"SPAN_TOKEN_USAGE",TraceAverageDuration:"TRACE_AVERAGE_DURATION",TraceErrorRate:"TRACE_ERROR_RATE",SpanAverageDuration:"SPAN_AVERAGE_DURATION",SpanCost:"SPAN_COST",SpanErrorRate:"SPAN_ERROR_RATE",ThreadAverageDuration:"THREAD_AVERAGE_DURATION",ThreadCost:"THREAD_COST"};});var eO=n(()=>{});var rO=n(()=>{});var vte,tO=n(()=>{vte={Private:"private",Public:"public"};});var oO=n(()=>{});var iO=n(()=>{});var aO=n(()=>{});var nO=n(()=>{});var sO=n(()=>{});var pO=n(()=>{});var Tte,cO=n(()=>{Tte={Private:"private",Public:"public"};});var lO=n(()=>{});var mO=n(()=>{});var jte,dO=n(()=>{jte={Text:"text",Chat:"chat"};});var uO=n(()=>{});var gO=n(()=>{});var Ete,fO=n(()=>{Ete={Text:"text",Chat:"chat"};});var Cte,hO=n(()=>{Cte={Text:"text",Chat:"chat"};});var yO=n(()=>{});var Ite,bO=n(()=>{Ite={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var RO=n(()=>{});var xO=n(()=>{});var wO=n(()=>{});var Dte,_O=n(()=>{Dte={Text:"text",Chat:"chat"};});var Ute,kO=n(()=>{Ute={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var Nte,AO=n(()=>{Nte={PromptVersion:"prompt_version",Mask:"mask"};});var PO=n(()=>{});var zO=n(()=>{});var SO=n(()=>{});var vO=n(()=>{});var TO=n(()=>{});var Fte,jO=n(()=>{Fte={Text:"text",Chat:"chat"};});var Bte,EO=n(()=>{Bte={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var Mte,CO=n(()=>{Mte={PromptVersion:"prompt_version",Mask:"mask"};});var Wte,IO=n(()=>{Wte={Text:"text",Chat:"chat"};});var Lte,DO=n(()=>{Lte={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var UO=n(()=>{});var Vte,NO=n(()=>{Vte={PromptVersion:"prompt_version",Mask:"mask"};});var FO=n(()=>{});var BO=n(()=>{});var Jte,MO=n(()=>{Jte={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var WO=n(()=>{});var Hte,LO=n(()=>{Hte={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var VO=n(()=>{});var JO=n(()=>{});var Gte,HO=n(()=>{Gte={Form:"form",Json:"json",Basic:"basic"};});var Ote,GO=n(()=>{Ote={Form:"form",Json:"json",Basic:"basic"};});var OO=n(()=>{});var Kte,KO=n(()=>{Kte={Form:"form",Json:"json",Basic:"basic"};});var $O=n(()=>{});var $te,QO=n(()=>{$te={TraceDaily:"trace_daily",Experiment:"experiment",DatasetVersion:"dataset_version",TestSuiteVersion:"test_suite_version",AlertEvent:"alert_event",Optimization:"optimization",PromptVersion:"prompt_version"};});var YO=n(()=>{});var XO=n(()=>{});var Qte,ZO=n(()=>{Qte={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var qO=n(()=>{});var eK=n(()=>{});var Yte,rK=n(()=>{Yte={AgentInsights:"agent_insights"};});var tK=n(()=>{});var oK=n(()=>{});var iK=n(()=>{});var Xte,aK=n(()=>{Xte={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};});var nK=n(()=>{});var sK=n(()=>{});var pK=n(()=>{});var cK=n(()=>{});var Zte,lK=n(()=>{Zte={Organization:"organization",Workspace:"workspace",Project:"project"};});var qte,mK=n(()=>{qte={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var dK=n(()=>{});var eoe,uK=n(()=>{eoe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var gK=n(()=>{});var roe,fK=n(()=>{roe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var hK=n(()=>{});var toe,yK=n(()=>{toe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var bK=n(()=>{});var RK=n(()=>{});var xK=n(()=>{});var wK=n(()=>{});var _K=n(()=>{});var kK=n(()=>{});var AK=n(()=>{});var ooe,PK=n(()=>{ooe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var ioe,zK=n(()=>{ioe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var SK=n(()=>{});var aoe,vK=n(()=>{aoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var TK=n(()=>{});var noe,jK=n(()=>{noe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var EK=n(()=>{});var soe,CK=n(()=>{soe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var IK=n(()=>{});var DK=n(()=>{});var UK=n(()=>{});var NK=n(()=>{});var FK=n(()=>{});var poe,BK=n(()=>{poe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var coe,MK=n(()=>{coe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var loe,WK=n(()=>{loe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var LK=n(()=>{});exports.OpikSpanType=void 0;var Jf=n(()=>{exports.OpikSpanType={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var VK=n(()=>{});var moe,JK=n(()=>{moe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var doe,HK=n(()=>{doe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var GK=n(()=>{});var OK=n(()=>{});var KK=n(()=>{});var $K=n(()=>{});var uoe,QK=n(()=>{uoe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var goe,YK=n(()=>{goe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var XK=n(()=>{});var ZK=n(()=>{});var qK=n(()=>{});var e$=n(()=>{});var r$=n(()=>{});var t$=n(()=>{});var o$=n(()=>{});var i$=n(()=>{});var a$=n(()=>{});var n$=n(()=>{});var s$=n(()=>{});var p$=n(()=>{});var c$=n(()=>{});var l$=n(()=>{});var m$=n(()=>{});var d$=n(()=>{});var u$=n(()=>{});var g$=n(()=>{});var f$=n(()=>{});var h$=n(()=>{});var y$=n(()=>{});var b$=n(()=>{});var R$=n(()=>{});var x$=n(()=>{});var foe,w$=n(()=>{foe={Function:"function"};});var hoe,_$=n(()=>{hoe={Function:"function"};});var k$=n(()=>{});var A$=n(()=>{});var P$=n(()=>{});var z$=n(()=>{});var S$=n(()=>{});var yoe,v$=n(()=>{yoe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var T$=n(()=>{});var boe,j$=n(()=>{boe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var E$=n(()=>{});var Roe,C$=n(()=>{Roe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var I$=n(()=>{});var xoe,D$=n(()=>{xoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var U$=n(()=>{});var N$=n(()=>{});var woe,F$=n(()=>{woe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var _oe,B$=n(()=>{_oe={Default:"default",Hidden:"hidden"};});var koe,M$=n(()=>{koe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var W$=n(()=>{});var L$=n(()=>{});var Aoe,V$=n(()=>{Aoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var J$=n(()=>{});var Poe,H$=n(()=>{Poe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var G$=n(()=>{});var zoe,O$=n(()=>{zoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var K$=n(()=>{});var $$=n(()=>{});var Q$=n(()=>{});var Y$=n(()=>{});var X$=n(()=>{});var Soe,Z$=n(()=>{Soe={Active:"active",Inactive:"inactive"};});var q$=n(()=>{});var eQ=n(()=>{});var rQ=n(()=>{});var tQ=n(()=>{});var oQ=n(()=>{});var voe,iQ=n(()=>{voe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Toe,aQ=n(()=>{Toe={Default:"default",Hidden:"hidden"};});var nQ=n(()=>{});var joe,sQ=n(()=>{joe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var pQ=n(()=>{});var cQ=n(()=>{});var lQ=n(()=>{});var mQ=n(()=>{});var dQ=n(()=>{});var uQ=n(()=>{});var gQ=n(()=>{});var fQ=n(()=>{});var Eoe,hQ=n(()=>{Eoe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var yQ=n(()=>{});var Coe,bQ=n(()=>{Coe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var RQ=n(()=>{});var Ioe,xQ=n(()=>{Ioe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var Doe,wQ=n(()=>{Doe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var _Q=n(()=>{});var kQ=n(()=>{});var AQ=n(()=>{});var PQ=n(()=>{});var zQ=n(()=>{});var SQ=n(()=>{});var vQ=n(()=>{});var Uoe,TQ=n(()=>{Uoe={Success:"success",Failure:"failure"};});var jQ=n(()=>{});var EQ=n(()=>{});var CQ=n(()=>{});var IQ=n(()=>{});var DQ=n(()=>{});var UQ=n(()=>{});var NQ=n(()=>{});var FQ=n(()=>{});var BQ=n(()=>{});var MQ=n(()=>{});var WQ=n(()=>{});var LQ=n(()=>{});var VQ=n(()=>{});var Hf=n(()=>{JM();HM();GM();OM();KM();$M();QM();YM();XM();ZM();qM();eW();rW();tW();oW();iW();aW();nW();sW();pW();cW();lW();mW();dW();uW();gW();fW();hW();yW();bW();RW();xW();wW();_W();kW();AW();PW();zW();SW();vW();TW();jW();EW();CW();IW();DW();UW();NW();FW();BW();MW();WW();LW();VW();JW();HW();GW();OW();KW();$W();QW();YW();XW();ZW();qW();e0();r0();t0();o0();i0();a0();n0();s0();p0();c0();l0();m0();d0();u0();g0();f0();h0();y0();b0();R0();x0();w0();_0();k0();A0();P0();z0();S0();v0();T0();j0();E0();C0();I0();D0();U0();N0();F0();B0();M0();W0();L0();V0();J0();H0();G0();O0();K0();$0();Q0();Y0();X0();Z0();q0();eL();rL();tL();oL();iL();aL();nL();sL();pL();cL();lL();mL();dL();uL();gL();fL();hL();yL();bL();RL();xL();wL();_L();kL();AL();PL();zL();SL();vL();TL();jL();EL();CL();IL();DL();UL();NL();FL();BL();ML();WL();LL();VL();JL();HL();GL();OL();KL();$L();QL();YL();XL();ZL();qL();eV();rV();tV();oV();iV();aV();nV();sV();pV();cV();lV();mV();dV();uV();gV();fV();hV();yV();bV();RV();xV();wV();_V();kV();AV();PV();zV();SV();vV();TV();jV();EV();CV();IV();DV();UV();NV();FV();BV();MV();WV();LV();VV();JV();HV();GV();OV();KV();$V();QV();YV();XV();ZV();qV();eJ();rJ();tJ();oJ();iJ();aJ();nJ();sJ();pJ();cJ();lJ();mJ();dJ();uJ();gJ();fJ();hJ();yJ();bJ();RJ();xJ();wJ();_J();kJ();AJ();PJ();zJ();SJ();vJ();TJ();Nf();jJ();EJ();Bf();CJ();IJ();DJ();UJ();NJ();FJ();BJ();MJ();WJ();LJ();VJ();JJ();HJ();GJ();OJ();KJ();$J();QJ();YJ();XJ();ZJ();qJ();eH();rH();tH();oH();iH();aH();nH();sH();pH();cH();lH();mH();dH();uH();gH();fH();hH();yH();bH();RH();xH();wH();_H();kH();AH();PH();zH();SH();vH();TH();jH();EH();CH();Lf();IH();DH();UH();NH();FH();BH();MH();WH();LH();VH();JH();HH();GH();OH();KH();$H();QH();YH();XH();ZH();qH();e1();r1();t1();o1();i1();a1();n1();s1();p1();c1();l1();m1();d1();u1();g1();f1();h1();y1();b1();R1();x1();w1();_1();k1();A1();P1();z1();S1();v1();T1();j1();E1();C1();I1();D1();U1();N1();F1();B1();M1();W1();L1();V1();J1();H1();G1();O1();K1();$1();Q1();Y1();X1();Z1();q1();eG();rG();tG();oG();iG();aG();nG();sG();pG();cG();lG();mG();dG();uG();gG();fG();hG();yG();bG();RG();xG();wG();_G();kG();AG();PG();zG();SG();vG();TG();jG();EG();CG();IG();DG();UG();NG();FG();BG();MG();WG();LG();VG();Vf();JG();HG();GG();OG();KG();$G();QG();YG();XG();ZG();qG();eO();rO();tO();oO();iO();aO();nO();sO();pO();cO();lO();mO();dO();uO();gO();fO();hO();yO();bO();RO();xO();wO();_O();kO();AO();PO();zO();SO();vO();TO();jO();EO();CO();IO();DO();UO();NO();FO();BO();MO();WO();LO();VO();JO();HO();GO();OO();KO();$O();QO();YO();XO();ZO();qO();eK();rK();tK();oK();iK();aK();nK();sK();pK();cK();lK();mK();dK();uK();gK();fK();hK();yK();bK();RK();xK();wK();_K();kK();AK();PK();zK();SK();vK();TK();jK();EK();CK();IK();DK();UK();NK();FK();BK();MK();WK();LK();Jf();VK();JK();HK();GK();OK();KK();$K();QK();YK();XK();ZK();qK();e$();r$();t$();o$();i$();a$();n$();s$();p$();c$();l$();m$();d$();u$();g$();f$();h$();y$();b$();R$();x$();w$();_$();k$();A$();P$();z$();S$();v$();T$();j$();E$();C$();I$();D$();U$();N$();F$();B$();M$();W$();L$();V$();J$();H$();G$();O$();K$();$$();Q$();Y$();X$();Z$();q$();eQ();rQ();tQ();oQ();iQ();aQ();nQ();sQ();pQ();cQ();lQ();mQ();dQ();uQ();gQ();fQ();hQ();yQ();bQ();RQ();xQ();wQ();_Q();kQ();AQ();PQ();zQ();SQ();vQ();TQ();jQ();EQ();CQ();IQ();DQ();UQ();NQ();FQ();BQ();MQ();WQ();LQ();VQ();});var ie={};L(ie,{AgentBlueprintHistoryType:()=>See,AgentBlueprintPublicType:()=>vee,AgentBlueprintWriteType:()=>gi,AgentConfigValueHistoryType:()=>Tee,AgentConfigValuePublicType:()=>jee,AgentConfigValueWriteType:()=>Eee,AgentInsightsIssueSeverity:()=>Cee,AgentInsightsIssueStatus:()=>Iee,AgentInsightsIssueUpdateStatus:()=>MN,AgentInsightsIssueWithDetailsSeverity:()=>Dee,AgentInsightsIssueWithDetailsStatus:()=>Uee,AgentInsightsJobStatus:()=>Nee,AgentInsightsJobUpdateStatus:()=>QN,AlertAlertType:()=>Fee,AlertPublicAlertType:()=>Bee,AlertTriggerConfigPublicType:()=>Mee,AlertTriggerConfigType:()=>Wee,AlertTriggerConfigWriteType:()=>Lee,AlertTriggerEventType:()=>Vee,AlertTriggerPublicEventType:()=>Jee,AlertTriggerWriteEventType:()=>Hee,AlertWriteAlertType:()=>Gee,AnnotationQueueItemPublicSource:()=>Oee,AnnotationQueuePublicScope:()=>Kee,AnnotationQueueScope:()=>$ee,AnnotationQueueWriteScope:()=>Qee,AssertionResultBatchEntityType:()=>aF,AssertionResultBatchItemSource:()=>Yee,AssertionResultBatchItemStatus:()=>Xee,AssistantMessageRole:()=>Zee,AttachmentListRequestEntityType:()=>cF,AutomationRuleEvaluatorAction:()=>qee,AutomationRuleEvaluatorObjectObjectPublicAction:()=>ere,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>rre,AutomationRuleEvaluatorPublicAction:()=>tre,AutomationRuleEvaluatorPublicTriggerScope:()=>ore,AutomationRuleEvaluatorTriggerScope:()=>ire,AutomationRuleEvaluatorUpdateAction:()=>are,AutomationRuleEvaluatorUpdateTriggerScope:()=>nre,AutomationRuleEvaluatorWriteAction:()=>sre,AutomationRuleEvaluatorWriteTriggerScope:()=>pre,BadGatewayError:()=>ui,BadRequestError:()=>N,BreakdownConfigField:()=>cre,BreakdownConfigPublicField:()=>lre,BridgeCommandItemType:()=>mre,BridgeCommandResultRequestStatus:()=>rM,BridgeCommandStatus:()=>dre,BridgeCommandSubmitRequestType:()=>oM,BridgeCommandType:()=>ure,CheckName:()=>gre,CheckPublicName:()=>fre,CheckPublicResult:()=>hre,CheckResult:()=>yre,ColumnCompareTypesItem:()=>bre,ColumnPublicTypesItem:()=>Rre,ColumnTypesItem:()=>xre,CompleteMultipartUploadRequestEntityType:()=>wre,ConflictError:()=>X,CreateDatasetItemsFromJsonRequestFormat:()=>SF,CreatePromptVersionDetailTemplateStructure:()=>IB,CreateSessionRequestType:()=>yB,DashboardPublicScope:()=>_re,DashboardPublicType:()=>kre,DashboardUpdatePublicType:()=>Are,DashboardWriteType:()=>Pre,DatasetExportJobPublicStatus:()=>zre,DatasetItemCompareSource:()=>Sre,DatasetItemFilterOperator:()=>vre,DatasetItemPublicSource:()=>Tre,DatasetItemSource:()=>jre,DatasetItemWriteSource:()=>If,DatasetPublicStatus:()=>Ere,DatasetPublicType:()=>Df,DatasetPublicVisibility:()=>Cre,DatasetStatus:()=>Ire,DatasetType:()=>Dre,DatasetUpdateVisibility:()=>TF,DatasetVisibility:()=>Ure,DatasetWriteType:()=>Ip,DatasetWriteVisibility:()=>EF,DeleteAttachmentsRequestEntityType:()=>Nre,DownloadAttachmentRequestEntityType:()=>mF,EvaluatorItemCompareType:()=>Fre,EvaluatorItemPublicType:()=>Uf,EvaluatorItemType:()=>Bre,EvaluatorItemWriteType:()=>Ff,ExperimentEvaluationMethod:()=>Mre,ExperimentItemCompareStatus:()=>Wre,ExperimentItemCompareTraceVisibilityMode:()=>Lre,ExperimentItemPublicTraceVisibilityMode:()=>Vre,ExperimentItemStatus:()=>Jre,ExperimentItemTraceVisibilityMode:()=>Hre,ExperimentPublicEvaluationMethod:()=>Gre,ExperimentPublicStatus:()=>Ore,ExperimentPublicType:()=>Kre,ExperimentRunSummaryCompareStatus:()=>$re,ExperimentRunSummaryPublicStatus:()=>Qre,ExperimentRunSummaryStatus:()=>Yre,ExperimentStatus:()=>Xre,ExperimentType:()=>Mf,ExperimentUpdateStatus:()=>Zre,ExperimentUpdateType:()=>qre,ExperimentWriteEvaluationMethod:()=>Up,ExperimentWriteStatus:()=>FF,ExperimentWriteType:()=>MF,FeedbackScoreBatchItemSource:()=>Wf,FeedbackScoreBatchItemThreadSource:()=>ete,FeedbackScoreCompareSource:()=>rte,FeedbackScoreExperimentItemBulkWriteViewSource:()=>tte,FeedbackScorePublicSource:()=>ote,FeedbackScoreSource:()=>ite,FindAgentInsightsIssuesRequestSeverity:()=>LN,FindAgentInsightsIssuesRequestStatus:()=>JN,FindFeedbackDefinitionsRequestType:()=>JF,FindFeedbackScoreNames1RequestType:()=>uM,FindReportFailuresRequestType:()=>JB,ForbiddenError:()=>fe,GetSpanStatsRequestType:()=>fM,GetSpansByProjectRequestType:()=>yM,GetWebhookExamplesRequestAlertType:()=>qN,GoneError:()=>lt,GuardrailName:()=>ate,GuardrailResult:()=>nte,GuardrailWriteName:()=>ste,GuardrailWriteResult:()=>pte,InternalServerError:()=>mt,KpiCardRequestEntityType:()=>wB,KpiMetricType:()=>cte,ListRunnersRequestStatus:()=>aM,LlmAsJudgeMessagePublicRole:()=>lte,LlmAsJudgeMessageRole:()=>mte,LlmAsJudgeMessageWriteRole:()=>dte,LlmAsJudgeOutputSchemaPublicType:()=>ute,LlmAsJudgeOutputSchemaType:()=>gte,LlmAsJudgeOutputSchemaWriteType:()=>fte,LocalRunnerJobResultRequestStatus:()=>sM,LocalRunnerJobStatus:()=>hte,LocalRunnerStatus:()=>yte,LocalRunnerType:()=>bte,LogItemLevel:()=>Rte,ManualEvaluationRequestEntityType:()=>xte,NotFoundError:()=>U,NotImplementedError:()=>Lr,OllieReportStatus:()=>wte,OptimizationPublicStatus:()=>_te,OptimizationStatus:()=>kte,OptimizationUpdateStatus:()=>uB,OptimizationWriteStatus:()=>Ate,ParamPresence:()=>ao,ProjectDetailedVisibility:()=>Pte,ProjectMetricRequestPublicInterval:()=>kB,ProjectMetricRequestPublicMetricType:()=>PB,ProjectMetricResponsePublicInterval:()=>zte,ProjectMetricResponsePublicMetricType:()=>Ste,ProjectPublicVisibility:()=>vte,ProjectUpdateVisibility:()=>SB,ProjectVisibility:()=>Tte,ProjectWriteVisibility:()=>TB,PromptDetailTemplateStructure:()=>jte,PromptPublicTemplateStructure:()=>Ete,PromptTemplateStructure:()=>Cte,PromptType:()=>Ite,PromptVersionDetailTemplateStructure:()=>Dte,PromptVersionDetailType:()=>Ute,PromptVersionDetailVersionType:()=>Nte,PromptVersionPublicTemplateStructure:()=>Fte,PromptVersionPublicType:()=>Bte,PromptVersionPublicVersionType:()=>Mte,PromptVersionTemplateStructure:()=>Wte,PromptVersionType:()=>Lte,PromptVersionVersionType:()=>Vte,PromptWriteTemplateStructure:()=>UB,PromptWriteType:()=>FB,ProviderApiKeyProvider:()=>Jte,ProviderApiKeyPublicProvider:()=>Hte,ProviderApiKeyWriteProvider:()=>qF,ProviderAuthConfigPublicSendAs:()=>Gte,ProviderAuthConfigSendAs:()=>Ote,ProviderAuthConfigWriteSendAs:()=>Kte,RecentActivityItemPublicType:()=>$te,ReportCompleteRequestStatus:()=>KB,ReportFailureType:()=>Yte,ReportedIssueSeverity:()=>Qte,ResponseFormatType:()=>Xte,RetentionRulePublicLevel:()=>Zte,RetentionRulePublicRetention:()=>qte,RetentionRuleWriteRetention:()=>XB,ScoreConditionOperator:()=>eoe,ScoreConditionPublicOperator:()=>roe,ScoreConditionWriteOperator:()=>toe,ServiceUnavailableError:()=>io,SpanExperimentItemBulkWriteViewSource:()=>ooe,SpanExperimentItemBulkWriteViewType:()=>ioe,SpanFilterOperator:()=>aoe,SpanFilterPublicOperator:()=>noe,SpanFilterWriteOperator:()=>soe,SpanPublicSource:()=>poe,SpanPublicType:()=>coe,SpanSearchStreamRequestPublicExcludeItem:()=>RM,SpanSearchStreamRequestPublicType:()=>wM,SpanSource:()=>loe,SpanType:()=>exports.OpikSpanType,SpanUpdateSource:()=>moe,SpanUpdateType:()=>doe,SpanWriteSource:()=>uoe,SpanWriteType:()=>goe,StartMultipartUploadRequestEntityType:()=>uF,TooManyRequestsError:()=>Qe,ToolCallType:()=>foe,ToolType:()=>hoe,TraceExperimentItemBulkWriteViewSource:()=>yoe,TraceFilterOperator:()=>boe,TraceFilterPublicOperator:()=>Roe,TraceFilterWriteOperator:()=>xoe,TracePublicSource:()=>woe,TracePublicVisibilityMode:()=>_oe,TraceSearchStreamRequestPublicExcludeItem:()=>TM,TraceSource:()=>koe,TraceThreadFilterOperator:()=>Aoe,TraceThreadFilterPublicOperator:()=>Poe,TraceThreadFilterWriteOperator:()=>zoe,TraceThreadStatus:()=>Soe,TraceUpdateSource:()=>voe,TraceVisibilityMode:()=>Toe,TraceWriteSource:()=>joe,UnauthorizedError:()=>O,UnprocessableEntityError:()=>ae,UploadAttachmentRequestEntityType:()=>fF,ValueEntryCompareSource:()=>Eoe,ValueEntryExperimentItemBulkWriteViewSource:()=>Coe,ValueEntryPublicSource:()=>Ioe,ValueEntrySource:()=>Doe,WebhookTestResultStatus:()=>Uoe,WorkspaceSpanMetricRequestInterval:()=>FM,WorkspaceSpanMetricRequestMetricType:()=>MM,agentConfigs:()=>lg,agentInsights:()=>vp,agentInsightsEnrollment:()=>gg,agentInsightsJobs:()=>Tp,alerts:()=>jp,annotationQueues:()=>xg,assertionResults:()=>Ep,attachments:()=>Cp,automationRuleEvaluators:()=>zg,chatCompletions:()=>vg,check:()=>Tg,dashboards:()=>Eg,datasets:()=>Dp,environments:()=>Ng,experiments:()=>Np,feedbackDefinitions:()=>Fp,guardrails:()=>Jg,insightsViews:()=>Gg,llmModels:()=>Og,llmProviderKey:()=>Bp,manualEvaluation:()=>Qg,mcpOAuth:()=>Xg,ollama:()=>Zg,ollieState:()=>qg,openTelemetryIngestion:()=>ef,optimizations:()=>Mp,pairing:()=>Wp,projects:()=>Lp,prompts:()=>Vp,redirect:()=>mf,reportFailures:()=>Jp,reports:()=>Hp,retentionRules:()=>Gp,runners:()=>Op,serviceToggles:()=>xf,spans:()=>Kp,systemAnalyticsQueries:()=>Af,systemUsage:()=>Pf,traces:()=>$p,welcomeWizard:()=>Tf,workspacePermissions:()=>jf,workspaces:()=>Qp});var oe=n(()=>{UN();VM();Hf();});function z(...p){let o={};for(let[e,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=e.toLowerCase();t!=null?o[i]=t:i in o&&delete o[i];}return o}function T(...p){let o={};for(let[e,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=e.toLowerCase();t!=null&&(o[i]=t);}return o}var $=n(()=>{});var Gf,Of=n(()=>{Gf={get:async(p,o)=>typeof p=="function"?p(o):p};});function Kf(p){return p==null?Noe:p instanceof no?p:(p=p!=null?p:{},(p.level)!=null||(p.level=Ve.Info),(p.logger)!=null||(p.logger=new dt),(p.silent)!=null||(p.silent=true),new no(p))}var Ve,JQ,dt,no,Noe,Yp=n(()=>{Ve={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},JQ={[Ve.Debug]:1,[Ve.Info]:2,[Ve.Warn]:3,[Ve.Error]:4},dt=class{debug(o,...e){console.debug(o,...e);}info(o,...e){console.info(o,...e);}warn(o,...e){console.warn(o,...e);}error(o,...e){console.error(o,...e);}},no=class{constructor(o){this.level=JQ[o.level],this.logger=o.logger,this.silent=o.silent;}shouldLog(o){return !this.silent&&this.level<=JQ[o]}isDebug(){return this.shouldLog(Ve.Debug)}debug(o,...e){this.isDebug()&&this.logger.debug(o,...e);}isInfo(){return this.shouldLog(Ve.Info)}info(o,...e){this.isInfo()&&this.logger.info(o,...e);}isWarn(){return this.shouldLog(Ve.Warn)}warn(o,...e){this.isWarn()&&this.logger.warn(o,...e);}isError(){return this.shouldLog(Ve.Error)}error(o,...e){this.isError()&&this.logger.error(o,...e);}};Noe=new no({level:Ve.Info,logger:new dt,silent:true});});function HQ(p,o){if(p===void 0||p===null)return "";let e=String(p);return o?encodeURIComponent(e):e}function $f(p,o="",e){let t=[];for(let[i,a]of Object.entries(p)){let s=o?`${o}[${i}]`:i;if(a!==void 0)if(Array.isArray(a)){if(a.length===0)continue;for(let c=0;c<a.length;c++){let l=a[c];if(l!==void 0)if(typeof l=="object"&&!Array.isArray(l)&&l!==null){let m=e.arrayFormat==="indices"?`${s}[${c}]`:s;t.push(...$f(l,m,e));}else {let m=e.arrayFormat==="indices"?`${s}[${c}]`:s,u=e.encode?encodeURIComponent(m):m;t.push(`${u}=${HQ(l,e.encode)}`);}}}else if(typeof a=="object"&&a!==null){if(Object.keys(a).length===0)continue;t.push(...$f(a,s,e));}else {let c=e.encode?encodeURIComponent(s):s;t.push(`${c}=${HQ(a,e.encode)}`);}}return t}function ut(p,o){return p==null||typeof p!="object"?"":$f(p,"",{...Boe,...o}).join("&")}var Boe,fi=n(()=>{Boe={arrayFormat:"indices",encode:true};});function GQ(p,o){let e=ut(o,{arrayFormat:"repeat"});return e?`${p}?${e}`:p}var OQ=n(()=>{fi();});function KQ(p){let o={get bodyUsed(){return p.bodyUsed},stream:()=>p.body,arrayBuffer:p.arrayBuffer.bind(p),blob:p.blob.bind(p)};return "bytes"in p&&typeof p.bytes=="function"&&(o.bytes=p.bytes.bind(p)),o}var $Q=n(()=>{});async function Xp(p,o){switch(o){case "binary-response":return KQ(p);case "blob":return await p.blob();case "arrayBuffer":return await p.arrayBuffer();case "sse":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "streaming":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "text":return await p.text()}let e=await p.text();if(e.length>0)try{return di(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:p.status,rawBody:e}}}}var Qf=n(()=>{Mr();$Q();});async function QQ(p){var e,t,i;let o=(e=p.headers.get("Content-Type"))==null?void 0:e.toLowerCase();if(o==null||o.length===0)return Xp(p);switch(o.indexOf(";")!==-1&&(o=(i=(t=o.split(";")[0])==null?void 0:t.trim())!=null?i:""),o){case "application/hal+json":case "application/json":case "application/ld+json":case "application/problem+json":case "application/vnd.api+json":case "text/json":{let a=await p.text();return a.length>0?di(a):void 0}default:if(o.startsWith("application/vnd.")&&o.endsWith("+json")){let a=await p.text();return a.length>0?di(a):void 0}return await p.text()}}var YQ=n(()=>{Mr();Qf();});async function XQ(){return fetch}var ZQ=n(()=>{});async function qQ({body:p,type:o}){return o==="form"?ut(p,{arrayFormat:"repeat",encode:true}):o.includes("json")?$e(p):p}var e4=n(()=>{Mr();fi();});var Vr,Yf=n(()=>{typeof globalThis.Headers!="undefined"?Vr=globalThis.Headers:Vr=class r4{constructor(o){if(this.headers=new Map,o)if(o instanceof r4)o.forEach((e,t)=>this.append(t,e));else if(Array.isArray(o))for(let[e,t]of o)if(typeof e=="string"&&typeof t=="string")this.append(e,t);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,t]of Object.entries(o))if(typeof t=="string")this.append(e,t);else throw new TypeError("Header values must be strings")}append(o,e){let t=o.toLowerCase(),i=this.headers.get(t)||[];this.headers.set(t,[...i,e]);}delete(o){let e=o.toLowerCase();this.headers.delete(e);}get(o){let e=o.toLowerCase(),t=this.headers.get(e);return t?t.join(", "):null}has(o){let e=o.toLowerCase();return this.headers.has(e)}set(o,e){let t=o.toLowerCase();this.headers.set(t,[e]);}forEach(o,e){let t=e?o.bind(e):o;this.headers.forEach((i,a)=>t(i.join(", "),a,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[o,e]of this.headers.entries())yield [o,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let o of this.headers.values())yield o.join(", ");}[Symbol.iterator](){return this.entries()}};});function t4(p){let o=new AbortController,e=setTimeout(()=>o.abort(Moe),p);return {signal:o.signal,abortId:e}}function o4(...p){let o=p.length===1&&Array.isArray(p[0])?p[0]:p,e=new AbortController;for(let t of o){if(t.aborted){e.abort(t==null?void 0:t.reason);break}t.addEventListener("abort",()=>e.abort(t==null?void 0:t.reason),{signal:e.signal});}return e.signal}var Moe,i4=n(()=>{Moe="timeout";});var a4,n4=n(()=>{i4();a4=async(p,o,e,t,i,a,s,c,l)=>{let m=[],u;if(a!=null){let{signal:g,abortId:h}=t4(a);u=h,m.push(g);}s!=null&&m.push(s);let d=o4(m),f=await p(o,{method:e,headers:t,body:i,signal:d,credentials:c?"include":void 0,duplex:l});return u!=null&&clearTimeout(u),f};});function ec(p){return {headers:p.headers,redirected:p.redirected,status:p.status,statusText:p.statusText,type:p.type,url:p.url}}var Zp,qp,Xf=n(()=>{Yf();Zp={headers:new Vr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},qp={headers:new Vr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};});function Woe(p){let o=1+Math.random()*.2;return p*o}function Loe(p){let o=1+(Math.random()-.5)*.2;return p*o}function Voe(p,o){let e=p.headers.get("Retry-After");if(e){let i=parseInt(e,10);if(!Number.isNaN(i)&&i>0)return Math.min(i*1e3,6e4);let a=new Date(e);if(!Number.isNaN(a.getTime())){let s=a.getTime()-Date.now();if(s>0)return Math.min(Math.max(s,0),6e4)}}let t=p.headers.get("X-RateLimit-Reset");if(t){let i=parseInt(t,10);if(!Number.isNaN(i)){let a=i*1e3-Date.now();if(a>0)return Woe(Math.min(a,6e4))}}return Loe(Math.min(1e3*2**o,6e4))}async function s4(p,o=2){let e=await p();for(let t=0;t<o&&([408,429].includes(e.status)||e.status>=500);++t){let i=Voe(e,t);await new Promise(a=>setTimeout(a,i)),e=await p();}return e}var p4=n(()=>{});function Zf(p){let o={};for(let[e,t]of p instanceof Vr?p.entries():Object.entries(p))Joe.has(e.toLowerCase())?o[e]="[REDACTED]":o[e]=t;return o}function Hoe(p){if(p==null)return p;let o={};for(let[e,t]of Object.entries(p))qf.has(e.toLowerCase())?o[e]="[REDACTED]":o[e]=t;return o}function gt(p){let o=p.indexOf("://");if(o===-1)return p;let e=o+3,t=p.indexOf("/",e),i=p.indexOf("?",e),a=p.indexOf("#",e),s=Math.min(t===-1?p.length:t,i===-1?p.length:i,a===-1?p.length:a),c=-1;for(let h=e;h<s;h++)p[h]==="@"&&(c=h);if(c!==-1&&(p=`${p.slice(0,e)}[REDACTED]@${p.slice(c+1)}`),i=p.indexOf("?"),i===-1)return p;a=p.indexOf("#",i);let l=a!==-1?a:p.length,m=p.slice(i+1,l);if(m.length===0)return p;let u=m.toLowerCase();if(!(u.includes("token")||u.includes("key")||u.includes("password")||u.includes("passwd")||u.includes("secret")||u.includes("session")||u.includes("auth")))return p;let f=[],g=m.split("&");for(let h of g){let y=h.indexOf("=");if(y===-1){f.push(h);continue}let w=h.slice(0,y),A=qf.has(w.toLowerCase());if(!A&&w.includes("%"))try{let C=decodeURIComponent(w);A=qf.has(C.toLowerCase());}catch{}f.push(A?`${w}=[REDACTED]`:h);}return p.slice(0,i+1)+f.join("&")+p.slice(l)}async function Goe(p){var e;let o=new Vr;if(o.set("Accept",p.responseType==="json"?"application/json":p.responseType==="text"?"text/plain":"*/*"),p.body!==void 0&&p.contentType!=null&&o.set("Content-Type",p.contentType),p.headers==null)return o;for(let[t,i]of Object.entries(p.headers)){let a=await Gf.get(i,{endpointMetadata:(e=p.endpointMetadata)!=null?e:{}});if(typeof a=="string"){o.set(t,a);continue}a!=null&&o.set(t,`${a}`);}return o}async function Ooe(p){var s,c,l;let o=GQ(p.url,p.queryParameters),e=await qQ({body:p.body,type:(s=p.requestType)!=null?s:"other"}),t=(c=p.fetchFn)!=null?c:await XQ(),i=await Goe(p),a=Kf(p.logging);if(a.isDebug()){let m={method:p.method,url:gt(o),headers:Zf(i),queryParameters:Hoe(p.queryParameters),hasBody:e!=null};a.debug("Making HTTP request",m);}try{let m=await s4(async()=>a4(t,o,p.method,i,e,p.timeoutMs,p.abortSignal,p.withCredentials,p.duplex),p.maxRetries);if(m.status>=200&&m.status<400){if(a.isDebug()){let d={method:p.method,url:gt(o),statusCode:m.status,responseHeaders:Zf(m.headers)};a.debug("HTTP request succeeded",d);}return {ok:!0,body:await Xp(m,p.responseType),headers:m.headers,rawResponse:ec(m)}}else {if(a.isError()){let u={method:p.method,url:gt(o),statusCode:m.status,responseHeaders:Zf(Object.fromEntries(m.headers.entries()))};a.error("HTTP request failed with error status",u);}return {ok:!1,error:{reason:"status-code",statusCode:m.status,body:await QQ(m)},rawResponse:ec(m)}}}catch(m){if((l=p.abortSignal)!=null&&l.aborted){if(a.isError()){let u={method:p.method,url:gt(o)};a.error("HTTP request was aborted",u);}return {ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Zp}}else if(m instanceof Error&&m.name==="AbortError"){if(a.isError()){let u={method:p.method,url:gt(o),timeoutMs:p.timeoutMs};a.error("HTTP request timed out",u);}return {ok:false,error:{reason:"timeout"},rawResponse:Zp}}else if(m instanceof Error){if(a.isError()){let u={method:p.method,url:gt(o),errorMessage:m.message};a.error("HTTP request failed with error",u);}return {ok:false,error:{reason:"unknown",errorMessage:m.message},rawResponse:qp}}if(a.isError()){let u={method:p.method,url:gt(o),error:$e(m)};a.error("HTTP request failed with unknown error",u);}return {ok:false,error:{reason:"unknown",errorMessage:$e(m)},rawResponse:qp}}}var Joe,qf,S,c4=n(()=>{Mr();Yp();OQ();Of();YQ();ZQ();e4();Qf();Yf();n4();Xf();p4();Joe=new Set(["authorization","www-authenticate","x-api-key","api-key","apikey","x-api-token","x-auth-token","auth-token","cookie","set-cookie","proxy-authorization","proxy-authenticate","x-csrf-token","x-xsrf-token","x-session-token","x-access-token"]);qf=new Set(["api_key","api-key","apikey","token","access_token","access-token","auth_token","auth-token","password","passwd","secret","api_secret","api-secret","apisecret","key","session","session_id","session-id"]);S=Ooe;});var l4=n(()=>{});var P,m4=n(()=>{P=class p extends Promise{constructor(o){super(e=>{e(void 0);}),this.innerPromise=o;}static fromFunction(o,...e){return new p(o(...e))}static interceptFunction(o){return (...e)=>p.fromPromise(o(...e))}static fromPromise(o){return new p(o)}static fromExecutor(o){let e=new Promise(o);return new p(e)}static fromResult(o){let e=Promise.resolve(o);return new p(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:o})=>o)),this.unwrappedPromise}then(o,e){return this.unwrap().then(o,e)}catch(o){return this.unwrap().catch(o)}finally(o){return this.unwrap().finally(o)}async withRawResponse(){return await this.innerPromise}};});var x,d4=n(()=>{x={get:async p=>typeof p=="function"?p():p};});var u4=n(()=>{Of();c4();l4();m4();Xf();d4();});async function Koe(p){let{data:o,filename:e,contentLength:t,contentType:i}=await rh(p),a={body:o,headers:{}};return e&&(a.headers["Content-Disposition"]=`attachment; filename="${e}"`),i&&(a.headers["Content-Type"]=i),t!=null&&(a.headers["Content-Length"]=t.toString()),a}async function eh(p){let{data:o,filename:e,contentType:t}=await rh(p,{noSniffFileSize:true});return {data:o,filename:e,contentType:t}}async function rh(p,{noSniffFileSize:o}={}){var e,t,i,a,s;if($oe(p))return rh({data:p},{noSniffFileSize:o});if("path"in p){let c=await import('fs');if(!c||!c.createReadStream)throw new Error("File path uploads are not supported in this environment.");let l=c.createReadStream(p.path),m=(e=p.contentLength)!=null?e:o===true?void 0:await g4(p.path),u=(t=p.filename)!=null?t:f4(p.path);return {data:l,filename:u,contentType:p.contentType,contentLength:m}}if("data"in p){let c=p.data,l=(i=p.contentLength)!=null?i:await Yoe(c,{noSniffFileSize:o}),m=(a=p.filename)!=null?a:Qoe(c);return {data:c,filename:m,contentType:(s=p.contentType)!=null?s:Xoe(c),contentLength:l}}throw new Error(`Invalid FileUpload of type ${typeof p}: ${JSON.stringify(p)}`)}function $oe(p){return y4(p)||b4(p)||R4(p)||rie(p)||th(p)||oh(p)||qoe(p)||eie(p)}async function g4(p){try{let o=await import('fs');return !o||!o.promises||!o.promises.stat?void 0:(await o.promises.stat(p)).size}catch{return}}function Qoe(p){if(Zoe(p))return p.name;if(h4(p))return f4(p.path.toString())}async function Yoe(p,{noSniffFileSize:o}={}){if(y4(p))return p.length;if(b4(p)||R4(p))return p.byteLength;if(th(p)||oh(p))return p.size;if(o!==true&&h4(p))return await g4(p.path.toString())}function Xoe(p){if(th(p)||oh(p))return p.type}function f4(p){let o=p.lastIndexOf("/"),e=p.lastIndexOf("\\"),t=Math.max(o,e);return t>=0?p.substring(t+1):p}function Zoe(p){return typeof p=="object"&&p!=null&&"name"in p}function h4(p){return typeof p=="object"&&p!=null&&"path"in p}function qoe(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function eie(p){return typeof p=="object"&&p!=null&&"getReader"in p}function y4(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function b4(p){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(p)}function R4(p){return typeof ArrayBuffer!="undefined"&&p instanceof ArrayBuffer}function rie(p){return typeof Uint8Array!="undefined"&&p instanceof Uint8Array}function th(p){return typeof Blob!="undefined"&&p instanceof Blob}function oh(p){return typeof File!="undefined"&&p instanceof File}var x4=n(()=>{});var w4=n(()=>{});var hi={};L(hi,{toBinaryUploadRequest:()=>Koe,toMultipartDataPart:()=>eh});var ih=n(()=>{x4();w4();});var _4=n(()=>{fi();});function tie(){var l,m,u,d,f;return typeof window!="undefined"&&typeof window.document!="undefined"?{type:"browser",version:window.navigator.userAgent}:typeof globalThis!="undefined"&&((l=globalThis==null?void 0:globalThis.navigator)==null?void 0:l.userAgent)==="Cloudflare-Workers"?{type:"workerd"}:typeof EdgeRuntime=="string"?{type:"edge-runtime"}:typeof self=="object"&&typeof(self==null?void 0:self.importScripts)=="function"&&(((m=self.constructor)==null?void 0:m.name)==="DedicatedWorkerGlobalScope"||((u=self.constructor)==null?void 0:u.name)==="ServiceWorkerGlobalScope"||((d=self.constructor)==null?void 0:d.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 navigator!="undefined"&&(navigator==null?void 0:navigator.product)==="ReactNative"?{type:"react-native"}:typeof process!="undefined"&&"version"in process&&!!process.version&&"versions"in process&&!!((f=process.versions)!=null&&f.node)?{type:"node",version:process.versions.node,parsedVersion:Number(process.versions.node.split(".")[0])}:{type:"unknown"}}var so,k4=n(()=>{so=tie();});var ah=n(()=>{k4();});async function sh(){return new nh}function oie(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function A4(p){return typeof p=="object"&&p!=null&&"getReader"in p}function iie(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function aie(p){return ArrayBuffer.isView(p)}async function nie(p){if(so.type==="node"){let{Readable:o}=await import('stream');if(p instanceof o){let e=[];for await(let t of p)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e)}}if(A4(p)){let o=p.getReader(),e=[];try{for(;;){let{done:s,value:c}=await o.read();if(s)break;e.push(c);}}finally{o.releaseLock();}let t=e.reduce((s,c)=>s+c.length,0),i=new Uint8Array(t),a=0;for(let s of e)i.set(s,a),a+=s.length;return Buffer.from(i)}throw new Error(`Unsupported stream type: ${typeof p}. Expected Node.js Readable stream or Web ReadableStream.`)}async function sie(p,o){if(oie(p)||A4(p)){let e=await nie(p);return new Blob([e],{type:o})}return p instanceof Blob?p:iie(p)?new Blob([p],{type:o}):p instanceof ArrayBuffer?new Blob([p],{type:o}):aie(p)?new Blob([p],{type:o}):typeof p=="string"?new Blob([p],{type:o}):typeof p=="object"&&p!==null?new Blob([$e(p)],{type:o!=null?o:"application/json"}):new Blob([String(p)],{type:o})}var nh,P4=n(()=>{ih();Mr();ah();nh=class{constructor(){this.fd=new FormData;}async setup(){}append(o,e){this.fd.append(o,String(e));}async appendFile(o,e){let{data:t,filename:i,contentType:a}=await eh(e),s=await sie(t,a);i?this.fd.append(o,s,i):this.fd.append(o,s);}getRequest(){return {body:this.fd,headers:{},duplex:"half"}}};});var z4=n(()=>{_4();P4();});var yi={};L(yi,{ConsoleLogger:()=>dt,LogLevel:()=>Ve,Logger:()=>no,createLogger:()=>Kf});var S4=n(()=>{Yp();});var K,he=n(()=>{K={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",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};});function se(p,o){return `Expected ${o}. Received ${pie(p)}.`}function pie(p){if(Array.isArray(p))return "list";if(p===null)return "null";if(p instanceof BigInt)return "BigInt";switch(typeof p){case "string":return `"${p}"`;case "bigint":case "number":case "boolean":case "undefined":return `${p}`}return typeof p}var ze=n(()=>{});function ye(p){return {...p,json:v4(p.json),parse:v4(p.parse)}}function v4(p){return (o,e)=>{let t=p(o,e),{skipValidation:i=false}=e!=null?e:{};return !t.ok&&i?(console.warn(["Failed to validate.",...t.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|
|
3
|
-
`)),{ok:true,value:o}):t}}var mr=n(()=>{});function rc(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var ph=n(()=>{});var po,ch=n(()=>{ph();po=class p extends Error{constructor(e){super(e.map(rc).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var co,lh=n(()=>{ph();co=class p extends Error{constructor(e){super(e.map(rc).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ce(p){return {nullable:()=>cie(p),optional:()=>mh(p),optionalNullable:()=>lie(p),transform:o=>dh(p,o),parseOrThrow:(o,e)=>{let t=p.parse(o,e);if(t.ok)return t.value;throw new co(t.errors)},jsonOrThrow:(o,e)=>{let t=p.json(o,e);if(t.ok)return t.value;throw new po(t.errors)}}}function cie(p){let o={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.NULLABLE};return {...o,...ce(o)}}function mh(p){let o={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL};return {...o,...ce(o)}}function lie(p){let o={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL_NULLABLE};return {...o,...ce(o)}}function dh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);return a.ok?{ok:true,value:o.transform(a.value)}:a},json:(t,i)=>{let a=o.untransform(t);return p.json(a,i)},getType:()=>p.getType()};return {...e,...ce(e)}}var T4=n(()=>{he();ch();lh();});var Ie=n(()=>{T4();ch();lh();});function j4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o=="bigint"?{ok:true,value:o}:typeof o=="number"?{ok:true,value:BigInt(o)}:{ok:false,errors:[{path:e,message:se(o,"bigint | number")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="bigint"?{ok:false,errors:[{path:e,message:se(o,"bigint")}]}:{ok:true,value:o},getType:()=>K.BIGINT};return {...ye(p),...ce(p)}}var E4=n(()=>{he();ze();mr();Ie();});var C4=n(()=>{E4();});function I4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:e,message:se(o,"string")}]}:mie.test(o)?{ok:true,value:new Date(o)}:{ok:false,errors:[{path:e,message:se(o,"ISO 8601 date string")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>o instanceof Date?{ok:true,value:o.toISOString()}:{ok:false,errors:[{path:e,message:se(o,"Date object")}]},getType:()=>K.DATE};return {...ye(p),...ce(p)}}var mie,D4=n(()=>{he();ze();mr();Ie();mie=/^([+-]?\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)?)?)?)?$/;});var U4=n(()=>{D4();});function be(p,o){return ()=>{let e={parse:o,json:o,getType:()=>p};return {...ye(e),...ce(e)}}}var dr=n(()=>{Ie();mr();});function tc(p){let o=new Set(p);return be(K.ENUM,(t,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:se(t,"string")}]}:!o.has(t)&&!i?{ok:false,errors:[{path:a,message:se(t,"enum")}]}:{ok:true,value:t})()}var N4=n(()=>{he();dr();ze();});var uh=n(()=>{N4();});function F4(p){let o=gh(p);return {...o,...ce(o)}}function gh(p){return {parse:(o,e)=>lo(p).parse(o,e),json:(o,e)=>lo(p).json(o,e),getType:()=>lo(p).getType()}}function lo(p){let o=p;return o.__zurg_memoized==null&&(o.__zurg_memoized=p()),o.__zurg_memoized}var fh=n(()=>{Ie();});function bi(p){return Object.entries(p)}var hh=n(()=>{});function Ri(p,o){let e=new Set(o);return Object.entries(p).reduce((t,[i,a])=>(e.has(i)&&(t[i]=a),t),{})}var yh=n(()=>{});function xr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let o=p;for(;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(p)===o}var xi=n(()=>{});function wi(p){return Object.keys(p)}var bh=n(()=>{});function B4(p,o){let e=[],t=[];for(let i of p)o(i)?e.push(i):t.push(i);return [e,t]}var M4=n(()=>{});function Ze(p){return {withParsedProperties:o=>Rh(p,o)}}function Rh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);if(!a.ok)return a;let s=Object.entries(o).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,i)=>{var c;if(!xr(t))return {ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:se(t,"object")}]};let a=new Set(Object.keys(o)),s=Ri(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,i)},getType:()=>p.getType()};return {...e,...ce(e),...Ze(e)}}var W4=n(()=>{yh();ze();xi();Ie();});var _i=n(()=>{W4();});function L4(p,o){return {rawKey:p,valueSchema:o,isProperty:true}}function Jr(p){return p.isProperty}var xh=n(()=>{});function oc(p){let o={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Jr(t)?t.rawKey:e),_getParsedProperties:()=>wi(p),parse:(e,t)=>{let i={},a=[];for(let[s,c]of bi(p)){let l=Jr(c)?c.rawKey:s,m=Jr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};i[l]=u,H4(m)&&a.push(l);}return V4({value:e,requiredKeys:a,getProperty:s=>{let c=i[s];if(c!=null)return {transformedKey:c.parsedKey,transform:l=>{var m;return c.valueSchema.parse(l,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],s]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},json:(e,t)=>{let i=[];for(let[a,s]of bi(p)){let c=Jr(s)?s.valueSchema:s;H4(c)&&i.push(a);}return V4({value:e,requiredKeys:i,getProperty:a=>{let s=p[a];if(s!=null)return Jr(s)?{transformedKey:s.rawKey,transform:c=>{var l;return s.valueSchema.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}:{transformedKey:a,transform:c=>{var l;return s.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},getType:()=>K.OBJECT};return {...ye(o),...ce(o),...Ze(o),...ft(o)}}function V4({value:p,requiredKeys:o,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:i=false,breadcrumbsPrefix:a=[]}){if(!xr(p))return {ok:false,errors:[{path:a,message:se(p,"object")}]};let s=new Set(o),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...o.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||i?{ok:true,value:l}:{ok:false,errors:c}}function ft(p){return {extend:o=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...o._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...o._getRawProperties()],parse:(t,i)=>J4({extensionKeys:o._getRawProperties(),value:t,transformBase:a=>p.parse(a,i),transformExtension:a=>o.parse(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>J4({extensionKeys:o._getParsedProperties(),value:t,transformBase:a=>p.json(a,i),transformExtension:a=>o.json(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.OBJECT};return {...e,...ce(e),...Ze(e),...ft(e)}},passthrough:()=>{let o=new Set(p._getRawProperties()),e=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(i,a)=>{let s=p.parse(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))o.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(i,a)=>{let s=p.json(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>K.OBJECT};return {...t,...ce(t),...Ze(t),...ft(t)}}}}function J4({extensionKeys:p,value:o,transformBase:e,transformExtension:t,breadcrumbsPrefix:i=[]}){if(!xr(o))return {ok:false,errors:[{path:i,message:se(o,"object")}]};let a=new Set(p),[s,c]=B4(wi(o),u=>a.has(u)),l=e(Ri(o,c)),m=t(Ri(o,s));return l.ok&&m.ok?{ok:true,value:{...l.value,...m.value}}:{ok:false,errors:[...l.ok?[]:l.errors,...m.ok?[]:m.errors]}}function H4(p){return !die(p)}function die(p){switch(p.getType()){case K.ANY:case K.UNKNOWN:case K.OPTIONAL:case K.OPTIONAL_NULLABLE:return true;default:return false}}var wh=n(()=>{he();hh();yh();ze();xi();bh();mr();M4();_i();Ie();xh();});function G4(p){return oc(p)}var O4=n(()=>{wh();});var _h=n(()=>{wh();O4();xh();});function K4(p){let o={...gh(p),_getRawProperties:()=>lo(p)._getRawProperties(),_getParsedProperties:()=>lo(p)._getParsedProperties()};return {...o,...ce(o),...Ze(o),...ft(o)}}var $4=n(()=>{_h();_i();Ie();fh();});var Q4=n(()=>{fh();$4();});function ic(p){let o={parse:(e,t)=>Y4(e,(i,a)=>{var s;return p.parse(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>Y4(e,(i,a)=>{var s;return p.json(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>K.LIST};return {...ye(o),...ce(o)}}function Y4(p,o){return Array.isArray(p)?p.map((t,i)=>o(t,i)).reduce((t,i)=>{if(t.ok&&i.ok)return {ok:true,value:[...t.value,i.value]};let a=[];return t.ok||a.push(...t.errors),i.ok||a.push(...i.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:se(p,"list"),path:[]}]}}var X4=n(()=>{he();ze();mr();Ie();});var kh=n(()=>{X4();});function Z4(p){return be(K.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`${p.toString()}`)}]})()}var q4=n(()=>{he();dr();ze();});function e6(p){return be(K.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`"${p}"`)}]})()}var r6=n(()=>{he();dr();ze();});var t6=n(()=>{q4();r6();});var o6,i6=n(()=>{he();dr();o6=be(K.ANY,p=>({ok:true,value:p}));});var a6,n6=n(()=>{he();dr();ze();a6=be(K.BOOLEAN,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"boolean")}]});});var s6,p6=n(()=>{he();dr();s6=be(K.NEVER,(p,{breadcrumbsPrefix:o=[]}={})=>({ok:false,errors:[{path:o,message:"Expected never"}]}));});var c6,l6=n(()=>{he();dr();ze();c6=be(K.NUMBER,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"number")}]});});var m6,d6=n(()=>{he();dr();ze();m6=be(K.STRING,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"string")}]});});var u6,g6=n(()=>{he();dr();u6=be(K.UNKNOWN,p=>({ok:true,value:p}));});var f6=n(()=>{i6();n6();p6();l6();d6();g6();});function y6(p,o){let e={parse:(t,i)=>h6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.parse(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.parse(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>h6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.json(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.json(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.RECORD};return {...ye(e),...ce(e)}}function h6({value:p,isKeyNumeric:o,transformKey:e,transformValue:t,breadcrumbsPrefix:i=[]}){return xr(p)?bi(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(o){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:se(p,"object")}]}}var b6=n(()=>{he();hh();ze();xi();mr();Ie();});var R6=n(()=>{b6();});function x6(p){let o=ic(p),e={parse:(t,i)=>{let a=o.parse(t,i);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,i)=>{var s;return t instanceof Set?o.json([...t],i):{ok:false,errors:[{path:(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],message:se(t,"Set")}]}},getType:()=>K.SET};return {...ye(e),...ce(e)}}var w6=n(()=>{he();ze();mr();kh();Ie();});var _6=n(()=>{w6();});function A6(p){let o={parse:(e,t)=>k6((i,a)=>i.parse(e,a),p,t),json:(e,t)=>k6((i,a)=>i.json(e,a),p,t),getType:()=>K.UNDISCRIMINATED_UNION};return {...ye(o),...ce(o)}}function k6(p,o,e){let t=[];for(let[i,a]of o.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${i}] ${c.message}`});}return {ok:false,errors:t}}var P6=n(()=>{he();mr();Ie();});var z6=n(()=>{P6();});function S6(p,o){return {parsedDiscriminant:p,rawDiscriminant:o}}var v6=n(()=>{});function j6(p,o){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,i=tc(wi(o)),a={parse:(s,c)=>T6({value:s,discriminant:e,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return i.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],e]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.parse(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),json:(s,c)=>T6({value:s,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:l=>{var m;return i.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>K.UNION};return {...ye(a),...ce(a),...Ze(a)}}function T6({value:p,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!xr(p))return {ok:false,errors:[{path:c,message:se(p,"object")}]};let{[o]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${o}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=i(u.value);if(d==null)return a?{ok:true,value:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,o],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var E6=n(()=>{he();ze();xi();bh();mr();uh();_i();Ie();});var C6=n(()=>{v6();E6();});var I6=n(()=>{C4();U4();uh();Q4();kh();t6();_h();_i();f6();R6();Ie();_6();z6();C6();});var r={};L(r,{JsonError:()=>po,ParseError:()=>co,any:()=>o6,bigint:()=>j4,boolean:()=>a6,booleanLiteral:()=>Z4,date:()=>I4,discriminant:()=>S6,enum_:()=>tc,getObjectLikeUtils:()=>Ze,getObjectUtils:()=>ft,getSchemaUtils:()=>ce,isProperty:()=>Jr,lazy:()=>F4,lazyObject:()=>K4,list:()=>ic,never:()=>s6,number:()=>c6,object:()=>oc,objectWithoutOptionalProperties:()=>G4,optional:()=>mh,property:()=>L4,record:()=>y6,set:()=>x6,string:()=>m6,stringLiteral:()=>e6,transform:()=>dh,undiscriminatedUnion:()=>A6,union:()=>j6,unknown:()=>u6,withParsedProperties:()=>Rh});var D6=n(()=>{I6();});function U6(p){if(p===null)return "null";switch(typeof p){case "undefined":return "undefined";case "string":case "number":case "boolean":break;default:p=String(p);break}return encodeURIComponent(p)}var N6=n(()=>{});function B6(p,...o){if(!p)return "";if(o.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return F6(p,...o)}let t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=W6(a);s&&(e.pathname=M6(e.pathname,s));}return i&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return F6(p,...o)}function F6(p,...o){if(o.length===0)return p;let e=p,t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=W6(a);s&&(e=M6(e,s));}return i&&!e.endsWith("/")&&(e+="/"),e}function M6(p,o){return p.endsWith("/")?p+o:`${p}/${o}`}function W6(p){if(!p)return p;let o=0,e=p.length;return p.startsWith("/")&&(o=1),p.endsWith("/")&&(e=p.length-1),o===0&&e===p.length?p:p.slice(o,e)}var L6=n(()=>{});var _={};L(_,{encodePathParam:()=>U6,join:()=>B6,toQueryString:()=>ut});var V6=n(()=>{N6();L6();fi();});var b=n(()=>{u4();ih();z4();S4();ah();D6();V6();});function M(p){let o=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":so.type,"X-Fern-Runtime-Version":so.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:yi.createLogger(p==null?void 0:p.logging),headers:o}}var Z=n(()=>{$();b();});var v,Q=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,o,e,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:o});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:o});case "timeout":throw new Wr(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:o});default:throw new k({message:"Unknown error",rawResponse:o})}}var q=n(()=>{J();});var ki,J6=n(()=>{b();ki=r.object({blueprintName:r.property("blueprint_name",r.string())});});var Ah,Ph=n(()=>{b();Ah=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),envName:r.property("env_name",r.string()),blueprintId:r.property("blueprint_id",r.string()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),endedAt:r.property("ended_at",r.date().optional())});});var Ai,H6=n(()=>{b();Ph();Ai=r.object({projectId:r.property("project_id",r.string()),envs:r.list(Ah)});});var Pi,G6=n(()=>{b();Pi=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var zh=n(()=>{J6();H6();G6();});var O6=n(()=>{zh();});var ac={};L(ac,{AgentConfigEnvSetByName:()=>ki,AgentConfigEnvUpdate:()=>Ai,AgentConfigRemoveValues:()=>Pi});var K6=n(()=>{O6();});var nc,Sh=n(()=>{b();nc=r.enum_(["open","resolved","closed"]);});var zi,$6=n(()=>{b();Sh();zi=r.object({projectId:r.property("project_id",r.string()),status:nc});});var V,pe=n(()=>{b();V=r.record(r.string(),r.unknown());});var vh,Th=n(()=>{b();vh=r.enum_(["critical","high","medium","low"]);});var jh,Eh=n(()=>{b();pe();Th();jh=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),tracesQuery:r.property("traces_query",r.string().optional()),severity:vh,count:r.number(),totalCount:r.property("total_count",r.number()),usersImpacted:r.property("users_impacted",r.number()),totalUsers:r.property("total_users",r.number()),metadata:V.optional()});});var Si,Q6=n(()=>{b();Eh();Si=r.object({projectId:r.property("project_id",r.string()),reportDay:r.property("report_day",r.string()),issues:r.list(jh)});});var Ch=n(()=>{$6();Q6();});var Y6=n(()=>{Ch();});var sc,X6=n(()=>{b();sc=r.enum_(["critical","high","medium","low"]);});var pc,Z6=n(()=>{b();pc=r.enum_(["open","resolved","closed"]);});var Ih=n(()=>{Sh();X6();Z6();});var cc={};L(cc,{AgentInsightsIssueUpdate:()=>zi,AgentInsightsIssueUpdateStatus:()=>nc,AgentInsightsReport:()=>Si,FindAgentInsightsIssuesRequestSeverity:()=>sc,FindAgentInsightsIssuesRequestStatus:()=>pc});var q6=n(()=>{Y6();Ih();});var vi,e2=n(()=>{b();vi=r.object({enrolled:r.boolean(),projectIds:r.property("project_ids",r.list(r.string()))});});var Dh=n(()=>{e2();});var r2=n(()=>{Dh();});var lc={};L(lc,{Request:()=>vi});var t2=n(()=>{r2();});var mc,Uh=n(()=>{b();mc=r.enum_(["enabled","disabled"]);});var Ti,o2=n(()=>{b();Uh();Ti=r.object({status:mc});});var Nh=n(()=>{o2();});var i2=n(()=>{Nh();});var Fh=n(()=>{Uh();});var dc={};L(dc,{AgentInsightsJobUpdate:()=>Ti,AgentInsightsJobUpdateStatus:()=>mc});var a2=n(()=>{i2();Fh();});var uc,n2=n(()=>{b();uc=r.enum_(["general","slack","pagerduty"]);});var Bh=n(()=>{n2();});var gc={};L(gc,{GetWebhookExamplesRequestAlertType:()=>uc});var s2=n(()=>{Bh();});var Mh,Wh=n(()=>{b();Mh=r.enum_([">","<","="]);});var Lh,Vh=n(()=>{b();Wh();Lh=r.object({scoreName:r.property("score_name",r.string()),operator:Mh,value:r.number()});});var Jh,Hh=n(()=>{b();Vh();Jh=r.object({conditions:r.list(Lh)});});var Gh,Oh=n(()=>{b();Hh();Gh=r.object({groups:r.list(Jh)});});var Kh,$h=n(()=>{b();Oh();Kh=r.object({enabled:r.boolean().optional(),conditions:Gh.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Qh,Yh=n(()=>{b();Qh=r.enum_(["trace","thread"]);});var ji,Xh=n(()=>{b();$h();Yh();ji=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:Qh,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Kh.optional()});});var Ei,p2=n(()=>{b();Xh();Ei=r.object({annotationQueues:r.property("annotation_queues",r.list(ji))});});var Ci,c2=n(()=>{b();Ci=r.object({ids:r.list(r.string())});});var Zh,qh=n(()=>{b();Zh=r.enum_([">","<","="]);});var ey,ry=n(()=>{b();qh();ey=r.object({scoreName:r.property("score_name",r.string()),operator:Zh,value:r.number()});});var ty,oy=n(()=>{b();ry();ty=r.object({conditions:r.list(ey)});});var iy,ay=n(()=>{b();oy();iy=r.object({groups:r.list(ty)});});var Ii,fc=n(()=>{b();ay();Ii=r.object({enabled:r.boolean().optional(),conditions:iy.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Di,l2=n(()=>{b();fc();Di=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()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Ii.optional()});});var ny=n(()=>{p2();c2();l2();});var m2=n(()=>{ny();});var hc={};L(hc,{AnnotationQueueBatchWrite:()=>Ei,AnnotationQueueItemIdsPublic:()=>Ci,AnnotationQueueUpdate:()=>Di});var d2=n(()=>{m2();});var sy,py=n(()=>{b();sy=r.enum_(["ui","sdk","online_scoring"]);});var cy,ly=n(()=>{b();cy=r.enum_(["passed","failed"]);});var my,dy=n(()=>{b();py();ly();my=r.object({entityId:r.property("entity_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),status:cy,reason:r.string().optional(),source:sy});});var yc,uy=n(()=>{b();yc=r.enum_(["TRACE","SPAN","THREAD"]);});var Ui,u2=n(()=>{b();dy();uy();Ui=r.object({entityType:r.property("entity_type",yc),assertionResults:r.property("assertion_results",r.list(my))});});var gy=n(()=>{u2();});var g2=n(()=>{gy();});var fy=n(()=>{uy();});var bc={};L(bc,{AssertionResultBatch:()=>Ui,AssertionResultBatchEntityType:()=>yc});var f2=n(()=>{g2();fy();});var Rc,hy=n(()=>{b();Rc=r.enum_(["trace","span"]);});var Ni,h2=n(()=>{b();hy();Ni=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",Rc),entityId:r.property("entity_id",r.string()),path:r.string()});});var yy=n(()=>{h2();});var xc={};L(xc,{Request:()=>uie});var uie,y2=n(()=>{b();uie=r.record(r.string(),r.unknown());});var b2=n(()=>{yy();y2();});var wc,R2=n(()=>{b();wc=r.enum_(["trace","span"]);});var _c,x2=n(()=>{b();_c=r.enum_(["trace","span"]);});var kc,w2=n(()=>{b();kc=r.enum_(["trace","span"]);});var by=n(()=>{R2();x2();hy();w2();});var mo={};L(mo,{AttachmentListRequestEntityType:()=>wc,DownloadAttachmentRequestEntityType:()=>_c,StartMultipartUploadRequest:()=>Ni,StartMultipartUploadRequestEntityType:()=>Rc,UploadAttachmentRequestEntityType:()=>kc,uploadAttachment:()=>xc});var _2=n(()=>{b2();by();});var Fi,Ac=n(()=>{b();Fi=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 wr,uo=n(()=>{b();wr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var Bi,Pc=n(()=>{b();pe();Bi=r.object({role:r.string(),content:V});});var Ry,xy=n(()=>{b();Ry=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var wy,_y=n(()=>{b();wy=r.enum_(["text","json_object","json_schema"]);});var ky,Ay=n(()=>{b();xy();_y();ky=r.object({type:wy.optional(),jsonSchema:Ry.optional()});});var Py,zy=n(()=>{b();Py=r.object({includeUsage:r.boolean().optional()});});var Sy,vy=n(()=>{b();Sy=r.enum_(["function"]);});var Ty,jy=n(()=>{b();Ac();vy();Ty=r.object({type:Sy.optional(),function:Fi.optional()});});var Mi,k2=n(()=>{b();Ac();uo();Pc();Ay();zy();jy();Mi=r.object({model:r.string().optional(),messages:r.list(Bi).optional(),temperature:r.number().optional(),topP:r.number().optional(),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:Py.optional(),stop:r.list(r.string()).optional(),maxTokens:r.number().optional(),maxCompletionTokens:r.number().optional(),presencePenalty:r.number().optional(),frequencyPenalty:r.number().optional(),logitBias:r.record(r.string(),r.number()).optional(),user:r.string().optional(),responseFormat:ky.optional(),seed:r.number().optional(),tools:r.list(Ty).optional(),toolChoice:r.record(r.string(),r.unknown()).optional(),parallelToolCalls:r.boolean().optional(),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.string().optional(),serviceTier:r.string().optional(),logprobs:r.boolean().optional(),topLogprobs:r.number().optional(),functions:r.list(Fi).optional(),functionCall:wr.optional()});});var Ey=n(()=>{k2();});var A2=n(()=>{Ey();});var zc={};L(zc,{ChatCompletionRequest:()=>Mi});var P2=n(()=>{A2();});var Cy,Iy=n(()=>{b();Cy=r.enum_(["llm_judge","code_metric"]);});var _r,go=n(()=>{b();Iy();pe();_r=r.object({name:r.string(),type:Cy,config:V});});var qe,ht=n(()=>{b();qe=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Dy,Uy=n(()=>{b();Dy=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var Wi,z2=n(()=>{b();go();ht();Uy();Wi=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Dy),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Ny,Fy=n(()=>{b();Ny=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 Li,S2=n(()=>{b();go();ht();Fy();Li=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Ny),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Vi,v2=n(()=>{b();Vi=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()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var Ji,T2=n(()=>{b();Ji=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Hi,j2=n(()=>{b();Hi=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var By,My=n(()=>{b();By=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Gi,Sc=n(()=>{b();My();Gi=r.object({field:r.string().optional(),operator:By.optional(),key:r.string().optional(),value:r.string().optional()});});var Wy,Ly=n(()=>{b();go();ht();pe();Wy=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:V.optional(),data:V.optional(),description:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var Oi,E2=n(()=>{b();Sc();Ly();Oi=r.object({ids:r.list(r.string()).optional(),filters:r.list(Gi).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:Wy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Vy,Jy=n(()=>{b();Vy=r.enum_(["manual","trace","span","sdk"]);});var Hy,Gy=n(()=>{b();Hy=r.enum_(["llm_judge","code_metric"]);});var Se,kr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Oy,Ky=n(()=>{b();Gy();kr();Oy=r.object({name:r.string(),type:Hy,config:Se});});var $y,Qy=n(()=>{b();$y=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Ki,Yy=n(()=>{b();Jy();Ky();Qy();pe();Ki=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Vy,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Oy).optional(),executionPolicy:r.property("execution_policy",$y.optional())});});var $i,C2=n(()=>{b();Yy();$i=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(Ki),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var Qi,I2=n(()=>{b();Qi=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()),datasetVersion:r.property("dataset_version",r.string().optional()),projectName:r.property("project_name",r.string().optional()),filters:r.string().optional()});});var Yi,D2=n(()=>{b();Sc();Yi=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Gi).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var vc,Xy=n(()=>{b();vc=r.enum_(["private","public"]);});var Xi,U2=n(()=>{b();Xy();Xi=r.object({name:r.string(),description:r.string().optional(),visibility:vc.optional(),tags:r.list(r.string()).optional()});});var Zi,N2=n(()=>{b();Zi=r.object({versionRef:r.property("version_ref",r.string())});});var qi,F2=n(()=>{b();qi=r.object({versionName:r.property("version_name",r.string())});});var ea,B2=n(()=>{b();ea=r.object({tag:r.string()});});var ra,M2=n(()=>{b();ra=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var Tc,Zy=n(()=>{b();Tc=r.enum_(["dataset","evaluation_suite"]);});var jc,qy=n(()=>{b();jc=r.enum_(["private","public"]);});var ta,W2=n(()=>{b();Zy();qy();ta=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:Tc.optional(),visibility:jc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var eb=n(()=>{z2();S2();v2();T2();j2();E2();C2();I2();D2();U2();N2();F2();B2();M2();W2();});var rb,tb=n(()=>{b();rb=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var fo,ob=n(()=>{b();tb();fo=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:rb.optional(),filePath:r.property("file_path",r.string().optional()),errorMessage:r.property("error_message",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional()),viewedAt:r.property("viewed_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ec={};L(Ec,{Response:()=>gie});var gie,L2=n(()=>{b();ob();gie=r.list(fo);});var V2=n(()=>{L2();eb();});var Cc,J2=n(()=>{b();Cc=r.enum_(["json","jsonl"]);});var ib=n(()=>{J2();Xy();Zy();qy();});var ho={};L(ho,{CreateDatasetItemsFromJsonRequestFormat:()=>Cc,CreateDatasetItemsFromSpansRequest:()=>Wi,CreateDatasetItemsFromTracesRequest:()=>Li,DatasetExpansionWrite:()=>Vi,DatasetIdentifier:()=>Ji,DatasetIdentifierPublic:()=>Hi,DatasetItemBatchUpdate:()=>Oi,DatasetItemBatchWrite:()=>$i,DatasetItemStreamRequest:()=>Qi,DatasetItemsDelete:()=>Yi,DatasetUpdate:()=>Xi,DatasetUpdateVisibility:()=>vc,DatasetVersionRestorePublic:()=>Zi,DatasetVersionRetrieveRequestPublic:()=>qi,DatasetVersionTag:()=>ea,DatasetVersionUpdatePublic:()=>ra,DatasetWrite:()=>ta,DatasetWriteType:()=>Tc,DatasetWriteVisibility:()=>jc,getDatasetExportJobs:()=>Ec});var H2=n(()=>{V2();ib();});var oa,G2=n(()=>{b();oa=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ia,O2=n(()=>{b();ia=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ab=n(()=>{G2();O2();});var K2=n(()=>{ab();});var Ic={};L(Ic,{EnvironmentUpdate:()=>oa,EnvironmentWrite:()=>ia});var $2=n(()=>{K2();});var aa,Dc=n(()=>{b();aa=r.object({name:r.string(),value:r.number()});});var nb,sb=n(()=>{b();nb=r.enum_(["running","completed","cancelled"]);});var pb,cb=n(()=>{b();pb=r.enum_(["regular","trial","mini-batch","mutation"]);});var na,lb=n(()=>{b();Dc();sb();cb();pe();na=r.object({name:r.string().optional(),metadata:V.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),type:pb.optional(),status:nb.optional(),experimentScores:r.property("experiment_scores",r.list(aa).optional())});});var sa,Q2=n(()=>{b();lb();sa=r.object({ids:r.list(r.string()),update:na,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Hr,pa=n(()=>{b();Hr=r.object({id:r.string(),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var mb,db=n(()=>{b();pe();Pc();pa();mb=r.object({model:r.string(),messages:r.list(Bi),configs:r.record(r.string(),V).optional(),promptVersions:r.property("prompt_versions",r.list(Hr).optional()),experimentName:r.property("experiment_name",r.string().optional())});});var ca,Y2=n(()=>{b();db();pa();ca=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(mb),projectName:r.property("project_name",r.string().optional()),datasetId:r.property("dataset_id",r.string()),versionHash:r.property("version_hash",r.string().optional()),promptVersions:r.property("prompt_versions",r.list(Hr).optional())});});var ub,gb=n(()=>{b();ub=r.enum_(["ui","sdk","online_scoring"]);});var fb,hb=n(()=>{b();fb=r.enum_(["ui","sdk","online_scoring"]);});var yb,bb=n(()=>{b();hb();yb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:fb.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Rb,xb=n(()=>{b();gb();bb();Rb=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ub,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),yb).optional())});});var er,la=n(()=>{b();er=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ma,Uc=n(()=>{b();ma=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var wb,_b=n(()=>{b();wb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kb,Ab=n(()=>{b();kb=r.enum_(["general","tool","llm","guardrail"]);});var Pb,zb=n(()=>{b();Uc();la();_b();Ab();Pb=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:kb.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.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",ma.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()),ttft:r.number().optional(),source:wb.optional(),environment:r.string().optional()});});var Sb,vb=n(()=>{b();Sb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Tb,jb=n(()=>{b();Uc();la();vb();Tb=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:er.optional(),output:er.optional(),metadata:er.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",ma.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Sb.optional(),environment:r.string().optional()});});var Eb,Cb=n(()=>{b();xb();la();zb();jb();Eb=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",er.optional()),trace:Tb.optional(),spans:r.list(Pb).optional(),feedbackScores:r.property("feedback_scores",r.list(Rb).optional())});});var da,X2=n(()=>{b();Cb();da=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(Eb)});});var ua,Z2=n(()=>{b();ua=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(),projectName:r.property("project_name",r.string().optional())});});var Ib,Db=n(()=>{b();Ib=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var ge,yt=n(()=>{b();ge=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 Ub,Nb=n(()=>{b();Ub=r.enum_(["passed","failed"]);});var Fb,Bb=n(()=>{b();Fb=r.enum_(["default","hidden"]);});var Mb,Wb=n(()=>{b();Mb=r.enum_(["ui","sdk","online_scoring"]);});var Lb,Vb=n(()=>{b();Lb=r.enum_(["ui","sdk","online_scoring"]);});var Jb,Hb=n(()=>{b();Vb();Jb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Lb.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Pe,bt=n(()=>{b();Wb();Hb();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Mb,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Jb).optional())});});var le,Ye=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ga,Nc=n(()=>{b();Db();yt();ht();Nb();Bb();bt();Ye();ga=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()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),traceMetadata:r.property("trace_metadata",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).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",Fb.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",qe.optional()),assertionResults:r.property("assertion_results",r.list(Ib).optional()),status:Ub.optional()});});var fa,q2=n(()=>{b();Nc();fa=r.object({experimentItems:r.property("experiment_items",r.list(ga))});});var ha,eY=n(()=>{b();ha=r.object({ids:r.list(r.string())});});var ya,rY=n(()=>{b();ya=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Gb,Ob=n(()=>{b();Gb=r.object({name:r.string(),value:r.number()});});var Je,yo=n(()=>{b();Je=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Fc,Kb=n(()=>{b();Fc=r.object({id:r.string()});});var Bc,$b=n(()=>{b();Bc=r.enum_(["dataset","evaluation_suite"]);});var Mc,Qb=n(()=>{b();Mc=r.enum_(["running","completed","cancelled"]);});var Wc,Yb=n(()=>{b();Wc=r.enum_(["regular","trial","mini-batch","mutation"]);});var ba,tY=n(()=>{b();Ob();yo();Kb();$b();Qb();Yb();ba=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),type:Wc.optional(),evaluationMethod:r.property("evaluation_method",Bc.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Mc.optional(),experimentScores:r.property("experiment_scores",r.list(Gb).optional()),promptVersion:r.property("prompt_version",Fc.optional()),promptVersions:r.property("prompt_versions",r.list(Fc).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var Xb=n(()=>{Q2();Y2();X2();Z2();q2();eY();rY();tY();});var oY=n(()=>{Xb();});var Zb=n(()=>{$b();Qb();Yb();});var Lc={};L(Lc,{ExperimentBatchUpdate:()=>sa,ExperimentExecutionRequest:()=>ca,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>da,ExperimentItemStreamRequest:()=>ua,ExperimentItemsBatch:()=>fa,ExperimentItemsDelete:()=>ha,ExperimentStreamRequestPublic:()=>ya,ExperimentWrite:()=>ba,ExperimentWriteEvaluationMethod:()=>Bc,ExperimentWriteStatus:()=>Mc,ExperimentWriteType:()=>Wc});var iY=n(()=>{oY();Zb();});var Vc,aY=n(()=>{b();Vc=r.enum_(["numerical","categorical","boolean"]);});var qb=n(()=>{aY();});var Jc={};L(Jc,{FindFeedbackDefinitionsRequestType:()=>Vc});var nY=n(()=>{qb();});var eR,rR=n(()=>{b();eR=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var tR,oR=n(()=>{b();tR=r.enum_(["passed","failed"]);});var iR,aR=n(()=>{b();rR();oR();pe();iR=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:eR,result:tR,config:V,details:V});});var Ra,sY=n(()=>{b();aR();Ra=r.object({guardrails:r.list(iR)});});var nR=n(()=>{sY();});var pY=n(()=>{nR();});var Hc={};L(Hc,{GuardrailBatchWrite:()=>Ra});var cY=n(()=>{pY();});var Gc={};L(Gc,{Response:()=>fie});var fie,lY=n(()=>{b();fie=r.string();});var mY=n(()=>{lY();});var bo={};L(bo,{getLlmModels:()=>Gc});var dY=n(()=>{mY();});var sR,pR=n(()=>{b();sR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var cR,lR=n(()=>{b();cR=r.enum_(["form","json","basic"]);});var Rt,xa=n(()=>{b();pR();lR();Rt=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",cR.optional()),credentials:r.list(sR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var wa,uY=n(()=>{b();xa();wa=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()),authConfig:r.property("auth_config",Rt.optional())});});var mR,dR=n(()=>{b();mR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var uR,gR=n(()=>{b();uR=r.enum_(["form","json","basic"]);});var fR,hR=n(()=>{b();dR();gR();fR=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",uR.optional()),credentials:r.list(mR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Oc,yR=n(()=>{b();Oc=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var _a,gY=n(()=>{b();hR();yR();_a=r.object({provider:Oc,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()),authConfig:r.property("auth_config",fR.optional())});});var ka,fY=n(()=>{b();xa();ka=r.object({providerId:r.property("provider_id",r.string().optional()),authConfig:r.property("auth_config",Rt.optional())});});var bR=n(()=>{uY();gY();fY();});var hY=n(()=>{bR();});var RR=n(()=>{yR();});var Kc={};L(Kc,{ProviderApiKeyUpdate:()=>wa,ProviderApiKeyWrite:()=>_a,ProviderApiKeyWriteProvider:()=>Oc,ProviderAuthCheck:()=>ka});var yY=n(()=>{hY();RR();});var Aa,bY=n(()=>{b();Aa=r.object({clientName:r.property("client_name",r.string()),redirectUris:r.property("redirect_uris",r.list(r.string())),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional())});});var Pa,RY=n(()=>{b();Pa=r.object({clientId:r.property("client_id",r.string()),redirectUri:r.property("redirect_uri",r.string()),codeChallenge:r.property("code_challenge",r.string()),codeChallengeMethod:r.property("code_challenge_method",r.string()),resource:r.string(),state:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),csrf:r.string().optional()});});var za,xY=n(()=>{b();za=r.object({token:r.string().optional(),clientId:r.property("client_id",r.string().optional())});});var Sa,wY=n(()=>{b();Sa=r.object({grantType:r.property("grant_type",r.string().optional()),code:r.string().optional(),redirectUri:r.property("redirect_uri",r.string().optional()),clientId:r.property("client_id",r.string().optional()),codeVerifier:r.property("code_verifier",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional())});});var xR=n(()=>{bY();RY();xY();wY();});var _Y=n(()=>{xR();});var $c={};L($c,{ClientRegistrationRequest:()=>Aa,ConsentRequest:()=>Pa,RevokeRequest:()=>za,TokenRequest:()=>Sa});var kY=n(()=>{_Y();});var wR,_R=n(()=>{b();wR=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var Qc={};L(Qc,{Response:()=>hie});var hie,AY=n(()=>{b();_R();hie=r.list(wR);});var PY=n(()=>{AY();});var Ro={};L(Ro,{listModels:()=>Qc});var zY=n(()=>{PY();});var He,Gr=n(()=>{b();He=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Yc,kR=n(()=>{b();Yc=r.enum_(["running","completed","cancelled","initialized","error"]);});var va,SY=n(()=>{b();Gr();Ye();kR();va=r.object({name:r.string().optional(),status:Yc.optional(),errorInfo:r.property("error_info",He.optional()),metadata:le.optional()});});var AR=n(()=>{SY();});var vY=n(()=>{AR();});var PR=n(()=>{kR();});var Xc={};L(Xc,{OptimizationUpdate:()=>va,OptimizationUpdateStatus:()=>Yc});var TY=n(()=>{vY();PR();});var Ta,jY=n(()=>{b();Ta=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Zc,zR=n(()=>{b();Zc=r.enum_(["connect","endpoint"]);});var ja,EY=n(()=>{b();zR();ja=r.object({projectId:r.property("project_id",r.string()),activationKey:r.property("activation_key",r.string()),ttlSeconds:r.property("ttl_seconds",r.number().optional()),type:Zc});});var SR=n(()=>{jY();EY();});var CY=n(()=>{SR();});var vR=n(()=>{zR();});var qc={};L(qc,{ActivateRequest:()=>Ta,CreateSessionRequest:()=>ja,CreateSessionRequestType:()=>Zc});var IY=n(()=>{CY();vR();});var el,TR=n(()=>{b();el=r.enum_(["traces","spans","threads"]);});var Ea,DY=n(()=>{b();TR();Ea=r.object({entityType:r.property("entity_type",el),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var jR,ER=n(()=>{b();jR=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var CR,IR=n(()=>{b();ER();CR=r.object({field:jR.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var DR,UR=n(()=>{b();DR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Ar,xo=n(()=>{b();UR();Ar=r.object({field:r.string().optional(),operator:DR.optional(),key:r.string().optional(),value:r.string().optional()});});var NR,FR=n(()=>{b();NR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Pr,wo=n(()=>{b();FR();Pr=r.object({field:r.string().optional(),operator:NR.optional(),key:r.string().optional(),value:r.string().optional()});});var BR,MR=n(()=>{b();BR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var xt,Ca=n(()=>{b();MR();xt=r.object({field:r.string().optional(),operator:BR.optional(),key:r.string().optional(),value:r.string().optional()});});var rl,WR=n(()=>{b();rl=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var tl,LR=n(()=>{b();tl=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var Ia,UY=n(()=>{b();IR();xo();wo();Ca();WR();LR();Ia=r.object({metricType:r.property("metric_type",tl.optional()),interval:rl.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(Ar).optional()),traceFilters:r.property("trace_filters",r.list(Pr).optional()),threadFilters:r.property("thread_filters",r.list(xt).optional()),breakdown:CR.optional()});});var Da,NY=n(()=>{b();Da=r.object({name:r.string(),includeStats:r.boolean().optional()});});var ol,VR=n(()=>{b();ol=r.enum_(["private","public"]);});var Ua,FY=n(()=>{b();VR();Ua=r.object({name:r.string().optional(),description:r.string().optional(),visibility:ol.optional()});});var il,JR=n(()=>{b();il=r.enum_(["private","public"]);});var Na,BY=n(()=>{b();JR();Na=r.object({name:r.string(),visibility:il.optional(),description:r.string().optional()});});var HR=n(()=>{DY();UY();NY();FY();BY();});var MY=n(()=>{HR();});var GR=n(()=>{TR();WR();LR();VR();JR();});var al={};L(al,{KpiCardRequest:()=>Ea,KpiCardRequestEntityType:()=>el,ProjectMetricRequestPublic:()=>Ia,ProjectMetricRequestPublicInterval:()=>rl,ProjectMetricRequestPublicMetricType:()=>tl,ProjectRetrieveDetailed:()=>Da,ProjectUpdate:()=>Ua,ProjectUpdateVisibility:()=>ol,ProjectWrite:()=>Na,ProjectWriteVisibility:()=>il});var WY=n(()=>{MY();GR();});var OR,KR=n(()=>{b();OR=r.record(r.string(),r.unknown());});var $R,QR=n(()=>{b();$R=r.enum_(["text","chat"]);});var YR,XR=n(()=>{b();YR=r.enum_(["mustache","jinja2","python"]);});var ZR,qR=n(()=>{b();ZR=r.enum_(["prompt_version","mask"]);});var De,Fa=n(()=>{b();KR();QR();XR();qR();De=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:OR.optional(),type:YR.optional(),versionType:r.property("version_type",ZR.optional()),environment:r.string().optional(),environments:r.list(r.string()).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",$R.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var nl,ex=n(()=>{b();nl=r.enum_(["text","chat"]);});var Ba,LY=n(()=>{b();Fa();ex();Ba=r.object({name:r.string(),version:De,templateStructure:r.property("template_structure",nl.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Ma,VY=n(()=>{b();Ma=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var rx,tx=n(()=>{b();rx=r.object({tags:r.list(r.string()).optional()});});var Wa,JY=n(()=>{b();tx();Wa=r.object({ids:r.list(r.string()),update:rx,mergeTags:r.property("merge_tags",r.boolean().optional())});});var La,HY=n(()=>{b();La=r.object({commits:r.list(r.string())});});var Va,GY=n(()=>{b();Va=r.object({environments:r.list(r.string())});});var Ja,OY=n(()=>{b();Ja=r.object({ids:r.list(r.string())});});var Ha,KY=n(()=>{b();Ha=r.object({name:r.string(),commit:r.string().optional(),environment:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var sl,ox=n(()=>{b();sl=r.enum_(["text","chat"]);});var pl,ix=n(()=>{b();pl=r.enum_(["mustache","jinja2","python"]);});var Ga,$Y=n(()=>{b();kr();ox();ix();Ga=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:Se.optional(),changeDescription:r.property("change_description",r.string().optional()),type:pl.optional(),templateStructure:r.property("template_structure",sl.optional()),tags:r.list(r.string()).optional()});});var ax=n(()=>{LY();VY();JY();HY();GY();OY();KY();$Y();});var _o,cl=n(()=>{b();_o=r.object({promptVersionId:r.property("prompt_version_id",r.string().optional()),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var ll={};L(ll,{Response:()=>yie});var yie,QY=n(()=>{b();cl();yie=r.list(_o);});var ml={};L(ml,{Response:()=>bie});var bie,YY=n(()=>{b();Fa();bie=r.list(De);});var XY=n(()=>{QY();ax();YY();});var nx=n(()=>{ex();ox();ix();});var wt={};L(wt,{CreatePromptVersionDetail:()=>Ba,CreatePromptVersionDetailTemplateStructure:()=>nl,PromptUpdatable:()=>Ma,PromptVersionBatchUpdate:()=>Wa,PromptVersionCommitsRequestPublic:()=>La,PromptVersionEnvironmentUpdate:()=>Va,PromptVersionIdsRequestDetail:()=>Ja,PromptVersionRetrieveDetail:()=>Ha,PromptWrite:()=>Ga,PromptWriteTemplateStructure:()=>sl,PromptWriteType:()=>pl,getPromptsByCommits:()=>ll,retrievePromptVersionsByIds:()=>ml});var ZY=n(()=>{XY();nx();});var dl,qY=n(()=>{b();dl=r.enum_(["agent_insights"]);});var sx=n(()=>{qY();});var ul={};L(ul,{FindReportFailuresRequestType:()=>dl});var e9=n(()=>{sx();});var gl,px=n(()=>{b();gl=r.enum_(["pending","completed","failed"]);});var Oa,r9=n(()=>{b();pe();px();Oa=r.object({content:r.string().optional(),status:gl,sessionId:r.property("session_id",r.string().optional()),recommendedActions:r.property("recommended_actions",V.optional()),failureReason:r.property("failure_reason",r.string().optional())});});var cx=n(()=>{r9();});var t9=n(()=>{cx();});var lx=n(()=>{px();});var fl={};L(fl,{ReportCompleteRequest:()=>Oa,ReportCompleteRequestStatus:()=>gl});var o9=n(()=>{t9();lx();});var hl,mx=n(()=>{b();hl=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ka,i9=n(()=>{b();mx();Ka=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:hl,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var dx=n(()=>{i9();});var a9=n(()=>{dx();});var ux=n(()=>{mx();});var yl={};L(yl,{RetentionRuleWrite:()=>Ka,RetentionRuleWriteRetention:()=>hl});var n9=n(()=>{a9();ux();});var $a,s9=n(()=>{b();$a=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var bl,gx=n(()=>{b();bl=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Qa,p9=n(()=>{b();pe();gx();Qa=r.object({status:bl,result:V.optional(),error:V.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var Rl,fx=n(()=>{b();Rl=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Ya,c9=n(()=>{b();pe();fx();Ya=r.object({type:Rl,args:V,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var Xa,xl=n(()=>{b();Xa=r.object({datasetId:r.property("dataset_id",r.string().optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetItemVersionId:r.property("dataset_item_version_id",r.string().optional()),datasetItemId:r.property("dataset_item_id",r.string().optional())});});var Za,l9=n(()=>{b();pe();xl();Za=r.object({agentName:r.property("agent_name",r.string()),inputs:V.optional(),projectId:r.property("project_id",r.string()),maskId:r.property("mask_id",r.string().optional()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:Xa.optional()});});var qa,m9=n(()=>{b();qa=r.object({capabilities:r.list(r.string()).optional()});});var wl,hx=n(()=>{b();wl=r.enum_(["pending","running","completed","failed","cancelled"]);});var en,d9=n(()=>{b();pe();hx();en=r.object({status:wl,result:V.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var yx=n(()=>{s9();p9();c9();l9();m9();d9();});var rn,_l=n(()=>{b();rn=r.object({stream:r.string(),text:r.string()});});var kl={};L(kl,{Request:()=>Rie});var Rie,u9=n(()=>{b();_l();Rie=r.list(rn);});var Al={};L(Al,{Response:()=>xie});var xie,g9=n(()=>{b();_l();xie=r.list(rn);});var bx,Rx=n(()=>{b();bx=r.enum_(["pending","running","completed","failed","cancelled"]);});var _t,Pl=n(()=>{b();pe();xl();Rx();_t=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:bx.optional(),inputs:V.optional(),result:V.optional(),error:r.string().optional(),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),maskId:r.property("mask_id",r.string().optional()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:Xa.optional(),timeout:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),startedAt:r.property("started_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional())});});var zl={};L(zl,{Response:()=>wie});var wie,f9=n(()=>{Pl();wie=_t.nullable();});var Sl={};L(Sl,{Request:()=>_ie});var _ie,h9=n(()=>{b();_ie=r.record(r.string(),r.unknown());});var vl={};L(vl,{Request:()=>kie});var kie,y9=n(()=>{b();kie=r.record(r.string(),r.unknown());});var b9=n(()=>{u9();g9();f9();h9();y9();yx();});var Tl,R9=n(()=>{b();Tl=r.enum_(["pairing","connected","disconnected"]);});var xx=n(()=>{gx();fx();R9();hx();});var ur={};L(ur,{BridgeCommandNextRequest:()=>$a,BridgeCommandResultRequest:()=>Qa,BridgeCommandResultRequestStatus:()=>bl,BridgeCommandSubmitRequest:()=>Ya,BridgeCommandSubmitRequestType:()=>Rl,CreateLocalRunnerJobRequest:()=>Za,ListRunnersRequestStatus:()=>Tl,LocalRunnerHeartbeatRequest:()=>qa,LocalRunnerJobResultRequest:()=>en,LocalRunnerJobResultRequestStatus:()=>wl,appendJobLogs:()=>kl,getJobLogs:()=>Al,nextJob:()=>zl,patchChecklist:()=>Sl,registerAgents:()=>vl});var x9=n(()=>{b9();xx();});var wx,_x=n(()=>{b();wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kx,Ax=n(()=>{b();kx=r.enum_(["general","tool","llm","guardrail"]);});var tn,Px=n(()=>{b();Gr();Ye();_x();Ax();tn=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:kx.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",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",He.optional()),ttft:r.number().optional(),source:wx.optional(),environment:r.string().optional()});});var on,w9=n(()=>{b();Px();on=r.object({ids:r.list(r.string()),update:tn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var kt,an=n(()=>{b();kt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var zx,Sx=n(()=>{b();zx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vx,Tx=n(()=>{b();vx=r.enum_(["general","tool","llm","guardrail"]);});var nn,jx=n(()=>{b();an();yo();Sx();Tx();nn=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:vx.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.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",kt.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()),ttft:r.number().optional(),source:zx.optional(),environment:r.string().optional()});});var sn,_9=n(()=>{b();jx();sn=r.object({spans:r.list(nn)});});var jl,Ex=n(()=>{b();jl=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source","environment"]);});var El,Cx=n(()=>{b();El=r.enum_(["general","tool","llm","guardrail"]);});var pn,k9=n(()=>{b();xo();Ex();Cx();pn=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:El.optional(),filters:r.list(Ar).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(jl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Ix=n(()=>{w9();_9();k9();});var A9=n(()=>{Ix();});var Cl,P9=n(()=>{b();Cl=r.enum_(["general","tool","llm","guardrail"]);});var Il,z9=n(()=>{b();Il=r.enum_(["general","tool","llm","guardrail"]);});var Dl,S9=n(()=>{b();Dl=r.enum_(["general","tool","llm","guardrail"]);});var Dx=n(()=>{P9();z9();S9();Ex();Cx();});var Ul={};L(Ul,{FindFeedbackScoreNames1RequestType:()=>Cl,GetSpanStatsRequestType:()=>Il,GetSpansByProjectRequestType:()=>Dl,SpanBatchUpdate:()=>on,SpanBatchWrite:()=>sn,SpanSearchStreamRequestPublic:()=>pn,SpanSearchStreamRequestPublicExcludeItem:()=>jl,SpanSearchStreamRequestPublicType:()=>El});var v9=n(()=>{A9();Dx();});var cn,T9=n(()=>{b();cn=r.object({query:r.string()});});var ln,j9=n(()=>{b();ln=r.object({query:r.string(),projectId:r.property("project_id",r.string().optional())});});var Ux=n(()=>{T9();j9();});var E9=n(()=>{Ux();});var Nl={};L(Nl,{AnalyticsQueryRequest:()=>cn,ScopedAnalyticsQueryRequest:()=>ln});var C9=n(()=>{E9();});var mn,I9=n(()=>{b();mn=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var dn,D9=n(()=>{b();dn=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(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var un,U9=n(()=>{b();un=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 Nx,Fx=n(()=>{b();Nx=r.enum_(["ui","sdk","online_scoring"]);});var Bx,Mx=n(()=>{b();Fx();Bx=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:Nx,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),threadId:r.property("thread_id",r.string())});});var gn,N9=n(()=>{b();Mx();gn=r.object({scores:r.list(Bx)});});var Wx,Lx=n(()=>{b();Wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var fn,Vx=n(()=>{b();Gr();Ye();Lx();fn=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:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",He.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:Wx.optional(),environment:r.string().optional()});});var hn,F9=n(()=>{b();Vx();hn=r.object({ids:r.list(r.string()),update:fn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Jx,Hx=n(()=>{b();Jx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var yn,Gx=n(()=>{b();an();yo();Hx();yn=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:Je.optional(),output:Je.optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",kt.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Jx.optional(),environment:r.string().optional()});});var bn,B9=n(()=>{b();Gx();bn=r.object({traces:r.list(yn)});});var Fl,Ox=n(()=>{b();Fl=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source","environment"]);});var Rn,M9=n(()=>{b();wo();Ox();Rn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Pr).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()),exclude:r.list(Fl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var xn,W9=n(()=>{b();xn=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 wn,Kx=n(()=>{b();wn=r.object({tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional())});});var _n,L9=n(()=>{b();Kx();_n=r.object({ids:r.list(r.string()),update:wn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var $x,Qx=n(()=>{b();$x=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rr,At=n(()=>{b();Qx();rr=r.object({field:r.string().optional(),operator:$x.optional(),key:r.string().optional(),value:r.string().optional()});});var kn,V9=n(()=>{b();At();kn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(rr).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 Yx=n(()=>{I9();D9();U9();N9();F9();B9();M9();W9();L9();V9();});var J9=n(()=>{Yx();});var Xx=n(()=>{Ox();});var Bl={};L(Bl,{BatchDeleteByProject:()=>mn,DeleteThreadFeedbackScores:()=>dn,DeleteTraceThreads:()=>un,FeedbackScoreBatchThread:()=>gn,TraceBatchUpdate:()=>hn,TraceBatchWrite:()=>bn,TraceSearchStreamRequestPublic:()=>Rn,TraceSearchStreamRequestPublicExcludeItem:()=>Fl,TraceThreadBatchIdentifier:()=>xn,TraceThreadBatchUpdate:()=>_n,TraceThreadSearchStreamRequest:()=>kn});var H9=n(()=>{J9();Xx();});var An,G9=n(()=>{b();An=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 Zx=n(()=>{G9();});var O9=n(()=>{Zx();});var Ml={};L(Ml,{WelcomeWizardSubmission:()=>An});var K9=n(()=>{O9();});var qx,ew=n(()=>{b();qx=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var rw,tw=n(()=>{b();ew();rw=r.object({field:qx.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ow,iw=n(()=>{b();ow=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var tr,Pt=n(()=>{b();iw();tr=r.object({field:r.string().optional(),operator:ow.optional(),key:r.string().optional(),value:r.string().optional()});});var Wl,aw=n(()=>{b();Wl=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Ll,nw=n(()=>{b();Ll=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var Pn,$9=n(()=>{b();tw();Pt();aw();nw();Pn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),metricType:r.property("metric_type",Ll.optional()),interval:Wl.optional(),breakdown:rw.optional(),filters:r.list(tr).optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var zn,Q9=n(()=>{b();zn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional())});});var sw=n(()=>{$9();Q9();});var Y9=n(()=>{sw();});var pw=n(()=>{aw();nw();});var Vl={};L(Vl,{WorkspaceSpanMetricRequest:()=>Pn,WorkspaceSpanMetricRequestInterval:()=>Wl,WorkspaceSpanMetricRequestMetricType:()=>Ll,WorkspaceTokenUsageNamesRequest:()=>zn});var X9=n(()=>{Y9();pw();});var Z9=n(()=>{zh();K6();Ch();q6();Ih();Dh();t2();Nh();a2();Fh();s2();Bh();ny();d2();gy();f2();fy();yy();_2();by();Ey();P2();eb();H2();ib();ab();$2();Xb();iY();Zb();nY();qb();nR();cY();dY();bR();yY();RR();xR();kY();zY();AR();TY();PR();SR();IY();vR();HR();WY();GR();ax();ZY();nx();e9();sx();cx();o9();lx();dx();n9();ux();yx();x9();xx();Ix();v9();Dx();Ux();C9();Yx();H9();Xx();Zx();K9();sw();X9();pw();});var cw,lw=n(()=>{b();cw=r.enum_(["required","optional"]);});var mw,dw=n(()=>{b();lw();mw=r.object({name:r.string(),type:r.string(),presence:cw.optional()});});var uw,gw=n(()=>{b();dw();uw=r.object({name:r.string().optional(),description:r.string().optional(),language:r.string().optional(),executable:r.string().optional(),sourceFile:r.property("source_file",r.string().optional()),params:r.list(mw).optional(),timeout:r.number().optional()});});var fw,hw=n(()=>{b();fw=r.enum_(["blueprint","mask"]);});var yw,bw=n(()=>{b();yw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Rw,xw=n(()=>{b();bw();Rw=r.object({key:r.string(),value:r.string().optional(),type:yw,description:r.string().optional()});});var ww,_w=n(()=>{b();hw();xw();ww=r.object({id:r.string().optional(),name:r.string().optional(),type:fw,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Rw)});});var kw,Aw=n(()=>{b();kw=r.enum_(["blueprint","mask"]);});var Pw,zw=n(()=>{b();Pw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Sw,vw=n(()=>{b();zw();Sw=r.object({key:r.string(),value:r.string().optional(),type:Pw,description:r.string().optional()});});var zt,q9=n(()=>{b();Aw();vw();zt=r.object({id:r.string().optional(),name:r.string().optional(),type:kw,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Sw)});});var Tw,jw=n(()=>{b();Tw=r.enum_(["blueprint","mask"]);});var Ew,Cw=n(()=>{b();Ew=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Iw,Dw=n(()=>{b();Cw();Iw=r.object({key:r.string(),value:r.string().optional(),type:Ew,description:r.string().optional()});});var Uw,Nw=n(()=>{b();jw();Dw();Uw=r.object({id:r.string().optional(),type:Tw,description:r.string().optional(),values:r.list(Iw)});});var Jl,eX=n(()=>{b();Nw();Jl=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Uw});});var Fw,Bw=n(()=>{b();Fw=r.enum_(["critical","high","medium","low"]);});var Mw,Ww=n(()=>{b();Mw=r.enum_(["open","resolved","closed"]);});var Lw,Vw=n(()=>{b();Bw();Ww();Lw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Mw.optional(),severity:Fw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),totalOccurrences:r.property("total_occurrences",r.number().optional()),latestCount:r.property("latest_count",r.number().optional()),total:r.number().optional(),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),firstSeen:r.property("first_seen",r.string().optional()),lastSeen:r.property("last_seen",r.string().optional()),daysReported:r.property("days_reported",r.number().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var Jw,Hw=n(()=>{b();pe();Jw=r.object({reportDay:r.property("report_day",r.string().optional()),count:r.number().optional(),totalCount:r.property("total_count",r.number().optional()),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),metadata:V.optional()});});var Gw,rX=n(()=>{b();Vw();Gw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Lw).optional()});});var Ow,Kw=n(()=>{b();Ow=r.enum_(["critical","high","medium","low"]);});var $w,Qw=n(()=>{b();$w=r.enum_(["open","resolved","closed"]);});var Yw,tX=n(()=>{b();Hw();Kw();Qw();Yw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:$w.optional(),severity:Ow.optional(),tracesQuery:r.property("traces_query",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),details:r.list(Jw).optional()});});var Xw,Zw=n(()=>{b();Xw=r.enum_(["enabled","disabled"]);});var Sn,oX=n(()=>{b();Zw();Sn=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:Xw.optional(),autoFirstRunEnrolled:r.property("auto_first_run_enrolled",r.boolean().optional()),autoFirstRunAt:r.property("auto_first_run_at",r.date().optional()),lastScanAt:r.property("last_scan_at",r.date().optional()),lastFailureReason:r.property("last_failure_reason",r.string().optional()),lastFailureDetail:r.property("last_failure_detail",r.string().optional()),lastFailedAt:r.property("last_failed_at",r.date().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 ve,Or=n(()=>{b();ve=r.object({name:r.string(),value:r.number()});});var zr,ko=n(()=>{b();zr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var qw,e_=n(()=>{b();Or();ko();qw=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:zr.optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var r_,t_=n(()=>{b();r_=r.enum_(["general","slack","pagerduty"]);});var o_,i_=n(()=>{b();o_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var a_,n_=n(()=>{b();i_();a_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:o_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",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 s_,p_=n(()=>{b();s_=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 c_,l_=n(()=>{b();n_();p_();c_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",s_),triggerConfigs:r.property("trigger_configs",r.list(a_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var m_,d_=n(()=>{b();m_=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 Aie,iX=n(()=>{b();t_();l_();d_();Aie=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",r_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:m_,triggers:r.list(c_).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()),projectId:r.property("project_id",r.string().optional())});});var u_,g_=n(()=>{b();u_=r.enum_(["general","slack","pagerduty"]);});var f_,h_=n(()=>{b();f_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var y_,b_=n(()=>{b();h_();y_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:f_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",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 R_,x_=n(()=>{b();R_=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 w_,__=n(()=>{b();b_();x_();w_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",R_),triggerConfigs:r.property("trigger_configs",r.list(y_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var k_,A_=n(()=>{b();k_=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 vn,P_=n(()=>{b();g_();__();A_();vn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",u_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:k_,triggers:r.list(w_).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()),projectId:r.property("project_id",r.string().optional())});});var Tn,aX=n(()=>{b();P_();Tn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vn).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var z_,S_=n(()=>{b();z_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var v_,T_=n(()=>{b();S_();v_=r.object({id:r.string().optional(),type:z_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional())});});var j_,E_=n(()=>{b();j_=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 C_,I_=n(()=>{b();T_();E_();C_=r.object({id:r.string().optional(),eventType:r.property("event_type",j_),triggerConfigs:r.property("trigger_configs",r.list(v_).optional())});});var D_,U_=n(()=>{b();D_=r.enum_(["general","slack","pagerduty"]);});var N_,F_=n(()=>{b();N_=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 jn,nX=n(()=>{b();I_();U_();F_();jn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",D_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:N_,triggers:r.list(C_).optional(),projectId:r.property("project_id",r.string().optional())});});var Hl,sX=n(()=>{b();pe();Hl=r.object({results:r.list(V).optional()});});var B_,M_=n(()=>{b();B_=r.object({username:r.string().optional(),status:r.number().optional()});});var W_,L_=n(()=>{b();W_=r.enum_(["trace","thread"]);});var V_,J_=n(()=>{b();fc();M_();L_();Or();V_=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:W_,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Ii.optional(),reviewers:r.list(B_).optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var H_,G_=n(()=>{b();H_=r.enum_([">","<","="]);});var O_,K_=n(()=>{b();G_();O_=r.object({scoreName:r.property("score_name",r.string()),operator:H_,value:r.number()});});var $_,Q_=n(()=>{b();K_();$_=r.object({conditions:r.list(O_)});});var Y_,X_=n(()=>{b();Q_();Y_=r.object({groups:r.list($_)});});var Z_,q_=n(()=>{b();X_();Z_=r.object({enabled:r.boolean().optional(),conditions:Y_.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Pie,pX=n(()=>{b();J_();Pie=r.object({annotationQueues:r.property("annotation_queues",r.list(V_))});});var Gl,cX=n(()=>{b();Gl=r.object({ids:r.list(r.string())});});var ek,rk=n(()=>{b();ek=r.enum_(["manual","automated"]);});var tk,ok=n(()=>{b();rk();tk=r.object({id:r.string().optional(),source:ek.optional()});});var ik,lX=n(()=>{b();ok();ik=r.object({content:r.list(tk).optional()});});var ak,nk=n(()=>{b();ak=r.enum_(["trace","thread"]);});var sk,pk=n(()=>{b();sk=r.object({username:r.string().optional(),status:r.number().optional()});});var Kr,En=n(()=>{b();Kr=r.object({name:r.string(),value:r.number()});});var Cn,ck=n(()=>{b();q_();nk();pk();En();Cn=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:ak,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Z_.optional(),reviewers:r.list(sk).optional(),feedbackScores:r.property("feedback_scores",r.list(Kr).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 lk,mX=n(()=>{b();ck();lk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cn).optional(),sortableBy:r.list(r.string()).optional()});});var mk,dk=n(()=>{b();mk=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var uk,gk=n(()=>{b();uk=r.object({name:r.string(),value:r.number()});});var fk,hk=n(()=>{b();fk=r.object({name:r.string(),value:r.number()});});var yk,bk=n(()=>{b();yk=r.enum_(["system","user","assistant","tool","function"]);});var Rk,xk=n(()=>{b();Rk=r.enum_(["function"]);});var In,Ol=n(()=>{b();uo();xk();In=r.object({id:r.string().optional(),index:r.number().optional(),type:Rk.optional(),function:wr.optional()});});var wk,_k=n(()=>{b();bk();uo();Ol();wk=r.object({role:yk.optional(),content:r.string().optional(),reasoningContent:r.string().optional(),name:r.string().optional(),toolCalls:r.list(In).optional(),refusal:r.string().optional(),functionCall:wr.optional()});});var kk,Ak=n(()=>{b();kk=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 Pk,dX=n(()=>{b();Ak();Pk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(kk).optional(),sortableBy:r.list(r.string()).optional()});});var zk,Sk=n(()=>{b();zk=r.object({url:r.string()});});var vk,Tk=n(()=>{b();vk=r.object({url:r.string()});});var jk,Ek=n(()=>{b();jk=r.object({url:r.string()});});var Ck,uX=n(()=>{b();Ck=r.record(r.string(),r.unknown());});var Ik,gX=n(()=>{b();Ik=r.object({issuer:r.string().optional(),authorizationEndpoint:r.property("authorization_endpoint",r.string().optional()),tokenEndpoint:r.property("token_endpoint",r.string().optional()),revocationEndpoint:r.property("revocation_endpoint",r.string().optional()),registrationEndpoint:r.property("registration_endpoint",r.string().optional()),responseTypesSupported:r.property("response_types_supported",r.list(r.string()).optional()),grantTypesSupported:r.property("grant_types_supported",r.list(r.string()).optional()),codeChallengeMethodsSupported:r.property("code_challenge_methods_supported",r.list(r.string()).optional()),tokenEndpointAuthMethodsSupported:r.property("token_endpoint_auth_methods_supported",r.list(r.string()).optional())});});var Dk,Uk=n(()=>{b();Dk=r.object({id:r.string().optional(),name:r.string().optional(),isDefault:r.property("is_default",r.boolean().optional())});});var Nk,fX=n(()=>{b();Uk();Nk=r.object({clientName:r.property("client_name",r.string().optional()),clientLogoUri:r.property("client_logo_uri",r.string().optional()),workspaces:r.list(Dk).optional(),csrfToken:r.property("csrf_token",r.string().optional())});});var Fk,Bk=n(()=>{b();Fk=r.enum_(["evaluator","annotation_queue_router"]);});var Mk,Wk=n(()=>{b();Mk=r.object({url:r.string(),detail:r.string().optional()});});var Lk,Vk=n(()=>{b();Lk=r.object({url:r.string()});});var Jk,Hk=n(()=>{b();Sk();Wk();Vk();Jk=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Mk.optional()),videoUrl:r.property("video_url",Lk.optional()),audioUrl:r.property("audio_url",zk.optional())});});var Gk,Ok=n(()=>{b();Gk=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var St,Dn=n(()=>{b();Hk();Ok();St=r.object({role:Gk,content:r.string().optional(),contentArray:r.property("content_array",r.list(Jk).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var vt,Un=n(()=>{b();pe();vt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",V.optional())});});var Kk,$k=n(()=>{b();Kk=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Tt,Nn=n(()=>{b();$k();Tt=r.object({name:r.string(),type:Kk,description:r.string()});});var Fn,Kl=n(()=>{b();Dn();Un();Nn();Fn=r.object({model:vt,messages:r.list(St),variables:r.record(r.string(),r.string()),schema:r.list(Tt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Qk,Yk=n(()=>{b();Qk=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,Ao=n(()=>{b();Yk();Sr=r.object({field:r.string().optional(),operator:Qk.optional(),key:r.string().optional(),value:r.string().optional()});});var Xk,Zk=n(()=>{b();Kl();Ao();Xk=r.object({filters:r.list(Sr).optional(),code:Fn.optional()});});var Bn,$l=n(()=>{b();Dn();Un();Nn();Bn=r.object({model:vt,messages:r.list(St),variables:r.record(r.string(),r.string()),schema:r.list(Tt)});});var qk,eA=n(()=>{b();Pt();$l();qk=r.object({filters:r.list(tr).optional(),code:Bn.optional()});});var Mn,Ql=n(()=>{b();Mn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var rA,tA=n(()=>{b();Pt();Ql();rA=r.object({filters:r.list(tr).optional(),code:Mn.optional()});});var Wn,Yl=n(()=>{b();Dn();Un();Nn();Wn=r.object({model:vt,messages:r.list(St),schema:r.list(Tt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var oA,iA=n(()=>{b();At();Yl();oA=r.object({filters:r.list(rr).optional(),code:Wn.optional()});});var Ln,Xl=n(()=>{b();Ln=r.object({metric:r.string()});});var aA,nA=n(()=>{b();At();Xl();aA=r.object({filters:r.list(rr).optional(),code:Ln.optional()});});var sA,pA=n(()=>{b();sA=r.enum_(["production","experiment","both"]);});var Vn,Zl=n(()=>{b();Vn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var cA,lA=n(()=>{b();Ao();Zl();cA=r.object({filters:r.list(Sr).optional(),code:Vn.optional()});});var mA,dA=n(()=>{b();mA=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var Po,zie,hX=n(()=>{b();Bk();Zk();eA();tA();iA();nA();pA();lA();dA();Po=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(mA).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",sA.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:Fk}),zie=r.union("type",{llm_as_judge:Xk.extend(Po),user_defined_metric_python:cA.extend(Po),trace_thread_llm_as_judge:oA.extend(Po),trace_thread_user_defined_metric_python:aA.extend(Po),span_llm_as_judge:qk.extend(Po),span_user_defined_metric_python:rA.extend(Po)}).transform({transform:p=>p,untransform:p=>p});});var uA,gA=n(()=>{b();uA=r.object({url:r.string(),detail:r.string().optional()});});var fA,hA=n(()=>{b();fA=r.object({url:r.string()});});var yA,bA=n(()=>{b();Tk();gA();hA();yA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",uA.optional()),videoUrl:r.property("video_url",fA.optional()),audioUrl:r.property("audio_url",vk.optional())});});var RA,xA=n(()=>{b();RA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var jt,Jn=n(()=>{b();bA();xA();jt=r.object({role:RA,content:r.string().optional(),contentArray:r.property("content_array",r.list(yA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,gr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var Et,Hn=n(()=>{b();gr();Et=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var wA,_A=n(()=>{b();wA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ct,Gn=n(()=>{b();_A();Ct=r.object({name:r.string(),type:wA,description:r.string()});});var kA,AA=n(()=>{b();Jn();Hn();Gn();kA=r.object({model:Et,messages:r.list(jt),variables:r.record(r.string(),r.string()),schema:r.list(Ct),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var On,ql=n(()=>{b();AA();wo();On=r.object({filters:r.list(Pr).optional(),code:kA.optional()});});var PA,zA=n(()=>{b();PA=r.object({url:r.string(),detail:r.string().optional()});});var SA,vA=n(()=>{b();SA=r.object({url:r.string()});});var TA,jA=n(()=>{b();Ek();zA();vA();TA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",PA.optional()),videoUrl:r.property("video_url",SA.optional()),audioUrl:r.property("audio_url",jk.optional())});});var EA,CA=n(()=>{b();EA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var It,Kn=n(()=>{b();jA();CA();It=r.object({role:EA,content:r.string().optional(),contentArray:r.property("content_array",r.list(TA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var Dt,$n=n(()=>{b();kr();Dt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var IA,DA=n(()=>{b();IA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ut,Qn=n(()=>{b();DA();Ut=r.object({name:r.string(),type:IA,description:r.string()});});var UA,NA=n(()=>{b();Kn();$n();Qn();UA=r.object({model:Dt,messages:r.list(It),variables:r.record(r.string(),r.string()),schema:r.list(Ut),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var FA,BA=n(()=>{b();FA=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Yn,em=n(()=>{b();BA();Yn=r.object({field:r.string().optional(),operator:FA.optional(),key:r.string().optional(),value:r.string().optional()});});var MA,WA=n(()=>{b();NA();em();MA=r.object({filters:r.list(Yn).optional(),code:UA.optional()});});var LA,VA=n(()=>{b();LA=r.enum_(["evaluator","annotation_queue_router"]);});var JA,HA=n(()=>{b();JA=r.enum_(["production","experiment","both"]);});var GA,OA=n(()=>{b();Jn();Hn();Gn();GA=r.object({model:Et,messages:r.list(jt),variables:r.record(r.string(),r.string()),schema:r.list(Ct)});});var Xn,rm=n(()=>{b();xo();OA();Xn=r.object({filters:r.list(Ar).optional(),code:GA.optional()});});var KA,$A=n(()=>{b();KA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zn,tm=n(()=>{b();xo();$A();Zn=r.object({filters:r.list(Ar).optional(),code:KA.optional()});});var QA,YA=n(()=>{b();Jn();Hn();Gn();QA=r.object({model:Et,messages:r.list(jt),schema:r.list(Ct),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var qn,om=n(()=>{b();Ca();YA();qn=r.object({filters:r.list(xt).optional(),code:QA.optional()});});var XA,ZA=n(()=>{b();XA=r.object({metric:r.string()});});var es,im=n(()=>{b();Ca();ZA();es=r.object({filters:r.list(xt).optional(),code:XA.optional()});});var qA,eP=n(()=>{b();qA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var rs,am=n(()=>{b();wo();eP();rs=r.object({filters:r.list(Pr).optional(),code:qA.optional()});});var ts,nm=n(()=>{b();ts=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var zo,rP,tP=n(()=>{b();ql();VA();HA();rm();tm();om();im();am();nm();zo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ts).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",JA.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:LA}),rP=r.union("type",{llm_as_judge:On.extend(zo),user_defined_metric_python:rs.extend(zo),trace_thread_llm_as_judge:qn.extend(zo),trace_thread_user_defined_metric_python:es.extend(zo),span_llm_as_judge:Xn.extend(zo),span_user_defined_metric_python:Zn.extend(zo)}).transform({transform:p=>p,untransform:p=>p});});var oP,yX=n(()=>{b();tP();oP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(rP).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var iP,aP=n(()=>{b();iP=r.enum_(["evaluator","annotation_queue_router"]);});var nP,sP=n(()=>{b();nP=r.enum_(["production","experiment","both"]);});var So,pP,bX=n(()=>{b();ql();aP();sP();rm();tm();om();im();am();nm();So=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ts).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",nP.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:iP}),pP=r.union("type",{llm_as_judge:On.extend(So),user_defined_metric_python:rs.extend(So),trace_thread_llm_as_judge:qn.extend(So),trace_thread_user_defined_metric_python:es.extend(So),span_llm_as_judge:Xn.extend(So),span_user_defined_metric_python:Zn.extend(So)}).transform({transform:p=>p,untransform:p=>p});});var cP,lP=n(()=>{b();cP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var os,sm=n(()=>{b();lP();os=r.object({field:r.string().optional(),operator:cP.optional(),key:r.string().optional(),value:r.string().optional()});});var mP,dP=n(()=>{b();Kn();$n();Qn();mP=r.object({model:Dt,messages:r.list(It),variables:r.record(r.string(),r.string()),schema:r.list(Ut)});});var uP,gP=n(()=>{b();sm();dP();uP=r.object({filters:r.list(os).optional(),code:mP.optional()});});var fP,hP=n(()=>{b();fP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var yP,bP=n(()=>{b();sm();hP();yP=r.object({filters:r.list(os).optional(),code:fP.optional()});});var RP,xP=n(()=>{b();RP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var is,pm=n(()=>{b();xP();is=r.object({field:r.string().optional(),operator:RP.optional(),key:r.string().optional(),value:r.string().optional()});});var wP,_P=n(()=>{b();Kn();$n();Qn();wP=r.object({model:Dt,messages:r.list(It),schema:r.list(Ut),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var kP,AP=n(()=>{b();pm();_P();kP=r.object({filters:r.list(is).optional(),code:wP.optional()});});var PP,zP=n(()=>{b();PP=r.object({metric:r.string()});});var SP,vP=n(()=>{b();pm();zP();SP=r.object({filters:r.list(is).optional(),code:PP.optional()});});var TP,jP=n(()=>{b();TP=r.enum_(["evaluator","annotation_queue_router"]);});var EP,CP=n(()=>{b();Kl();Ao();EP=r.object({filters:r.list(Sr).optional(),code:Fn.optional()});});var IP,DP=n(()=>{b();Pt();$l();IP=r.object({filters:r.list(tr).optional(),code:Bn.optional()});});var UP,NP=n(()=>{b();Pt();Ql();UP=r.object({filters:r.list(tr).optional(),code:Mn.optional()});});var FP,BP=n(()=>{b();At();Yl();FP=r.object({filters:r.list(rr).optional(),code:Wn.optional()});});var MP,WP=n(()=>{b();At();Xl();MP=r.object({filters:r.list(rr).optional(),code:Ln.optional()});});var LP,VP=n(()=>{b();LP=r.enum_(["production","experiment","both"]);});var JP,HP=n(()=>{b();Ao();Zl();JP=r.object({filters:r.list(Sr).optional(),code:Vn.optional()});});var vo,GP,RX=n(()=>{b();jP();CP();DP();NP();BP();WP();VP();HP();vo=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",LP.optional()),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:TP}),GP=r.union("type",{llm_as_judge:EP.extend(vo),user_defined_metric_python:JP.extend(vo),trace_thread_llm_as_judge:FP.extend(vo),trace_thread_user_defined_metric_python:MP.extend(vo),span_llm_as_judge:IP.extend(vo),span_user_defined_metric_python:UP.extend(vo)}).transform({transform:p=>p,untransform:p=>p});});var OP,KP=n(()=>{b();OP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var $P,QP=n(()=>{b();em();KP();$P=r.object({filters:r.list(Yn).optional(),code:OP.optional()});});var YP,XP=n(()=>{b();YP=r.enum_(["evaluator","annotation_queue_router"]);});var ZP,qP=n(()=>{b();ZP=r.enum_(["production","experiment","both"]);});var To,ez,xX=n(()=>{b();WA();gP();bP();AP();vP();QP();XP();qP();To=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",ZP.optional()),action:YP}),ez=r.union("type",{llm_as_judge:MA.extend(To),user_defined_metric_python:$P.extend(To),trace_thread_llm_as_judge:kP.extend(To),trace_thread_user_defined_metric_python:SP.extend(To),span_llm_as_judge:uP.extend(To),span_user_defined_metric_python:yP.extend(To)}).transform({transform:p=>p,untransform:p=>p});});var rz,tz=n(()=>{b();rz=r.object({value:r.number().optional()});});var de,wX=n(()=>{b();de=r.object({ids:r.list(r.string())});});var oz,iz=n(()=>{b();oz=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var jo,_X=n(()=>{b();iz();jo=r.object({biInformation:r.property("bi_information",r.list(oz).optional())});});var az,kX=n(()=>{b();_w();az=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ww).optional()});});var nz,sz=n(()=>{b();nz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var pz,cz=n(()=>{b();sz();pz=r.object({details:nz.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 lz,mz=n(()=>{b();lz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var dz,uz=n(()=>{b();mz();dz=r.object({details:lz.optional()});});var gz,fz=n(()=>{b();gz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var as,cm=n(()=>{b();fz();as=r.object({details:gz.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 hz,yz=n(()=>{b();hz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var bz,Rz=n(()=>{b();yz();bz=r.object({details:hz.optional()});});var xz,wz=n(()=>{b();xz=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var _z,kz=n(()=>{b();_z=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Az,AX=n(()=>{b();wz();kz();pe();Az=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:_z.optional(),status:xz.optional(),args:V.optional(),result:V.optional(),error:V.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional()),pickedUpAt:r.property("picked_up_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional()),durationMs:r.property("duration_ms",r.number().optional())});});var Pz,zz=n(()=>{b();Pz=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Sz,vz=n(()=>{b();zz();pe();Sz=r.object({commandId:r.property("command_id",r.string().optional()),type:Pz.optional(),args:V.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var Tz,PX=n(()=>{b();vz();Tz=r.object({commands:r.list(Sz).optional()});});var jz,zX=n(()=>{b();jz=r.object({commandId:r.property("command_id",r.string().optional())});});var Ez,Cz=n(()=>{b();Ez=r.object({categories:r.record(r.string(),r.number())});});var Iz,Dz=n(()=>{b();Cz();Iz=r.object({details:Ez.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 Uz,Nz=n(()=>{b();Uz=r.object({categories:r.record(r.string(),r.number())});});var Fz,Bz=n(()=>{b();Nz();Fz=r.object({details:Uz.optional()});});var Mz,Wz=n(()=>{b();Mz=r.object({categories:r.record(r.string(),r.number())});});var ns,lm=n(()=>{b();Wz();ns=r.object({details:Mz.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 Lz,Vz=n(()=>{b();Lz=r.object({categories:r.record(r.string(),r.number())});});var Jz,Hz=n(()=>{b();Vz();Jz=r.object({details:Lz.optional()});});var Gz,Oz=n(()=>{b();uo();Ol();Gz=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.string().optional(),toolCalls:r.list(In).optional(),functionCall:wr.optional()});});var Kz,$z=n(()=>{b();Kz=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var Qz,Yz=n(()=>{b();$z();Qz=r.object({content:r.list(Kz).optional()});});var Xz,Zz=n(()=>{b();_k();Oz();Yz();Xz=r.object({index:r.number().optional(),message:wk.optional(),delta:Gz.optional(),finishReason:r.string().optional(),logprobs:Qz.optional()});});var qz,eS=n(()=>{b();qz=r.object({reasoningTokens:r.number().optional()});});var rS,tS=n(()=>{b();rS=r.object({cachedTokens:r.number().optional()});});var oS,iS=n(()=>{b();eS();tS();oS=r.object({totalTokens:r.number().optional(),promptTokens:r.number().optional(),promptTokensDetails:rS.optional(),completionTokens:r.number().optional(),completionTokensDetails:qz.optional()});});var aS,SX=n(()=>{b();Zz();iS();aS=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Xz).optional(),usage:oS.optional(),systemFingerprint:r.string().optional(),serviceTier:r.string().optional()});});var nS,sS=n(()=>{b();nS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var pS,cS=n(()=>{b();pS=r.enum_(["passed","failed"]);});var lS,mS=n(()=>{b();sS();cS();lS=r.object({name:nS.optional(),result:pS.optional()});});var dS,uS=n(()=>{b();dS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var gS,fS=n(()=>{b();gS=r.enum_(["passed","failed"]);});var hS,yS=n(()=>{b();uS();fS();hS=r.object({name:dS.optional(),result:gS.optional()});});var bS,RS=n(()=>{b();bS=r.object({typeName:r.string().optional()});});var Sie,vX=n(()=>{b();RS();Sie=r.object({type:bS.optional(),closed:r.boolean().optional()});});var xS,wS=n(()=>{b();xS=r.object({typeName:r.string().optional()});});var vie,TX=n(()=>{b();wS();vie=r.object({type:xS.optional(),closed:r.boolean().optional()});});var _S,jX=n(()=>{b();_S=r.object({clientId:r.property("client_id",r.string().optional()),clientIdIssuedAt:r.property("client_id_issued_at",r.number().optional()),clientName:r.property("client_name",r.string().optional()),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional()),redirectUris:r.property("redirect_uris",r.list(r.string()).optional()),tokenEndpointAuthMethod:r.property("token_endpoint_auth_method",r.string().optional()),grantTypes:r.property("grant_types",r.list(r.string()).optional()),responseTypes:r.property("response_types",r.list(r.string()).optional())});});var kS,AS=n(()=>{b();kS=r.enum_(["string","number","object","boolean","array","null"]);});var PS,zS=n(()=>{b();AS();PS=r.object({name:r.string().optional(),types:r.list(kS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var SS,vS=n(()=>{b();SS=r.enum_(["string","number","object","boolean","array","null"]);});var TS,jS=n(()=>{b();vS();TS=r.object({name:r.string().optional(),types:r.list(SS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var ES,CS=n(()=>{b();ES=r.enum_(["string","number","object","boolean","array","null"]);});var IS,DS=n(()=>{b();CS();IS=r.object({name:r.string().optional(),types:r.list(ES).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var US,NS=n(()=>{b();US=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 Nt,ss=n(()=>{b();Nt=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 FS,BS=n(()=>{b();FS=r.enum_(["trace","span"]);});var MS,WS=n(()=>{b();MS=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var mm,EX=n(()=>{b();BS();WS();mm=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",FS),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(MS))});});var LS,CX=n(()=>{b();LS=r.object({redirectTo:r.property("redirect_to",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.object({value:r.number().optional()});});var HS,IX=n(()=>{b();HS=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var GS,OS=n(()=>{b();GS=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var KS,$S=n(()=>{b();KS=r.enum_(["workspace","insights"]);});var QS,YS=n(()=>{b();QS=r.enum_(["multi_project","experiments"]);});var or,XS=n(()=>{b();$S();YS();gr();or=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:QS.optional(),scope:KS.optional(),description:r.string().optional(),config:_e,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 Ft,DX=n(()=>{b();XS();Ft=r.object({content:r.list(or).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var ZS,qS=n(()=>{b();ZS=r.enum_(["multi_project","experiments"]);});var ps,UX=n(()=>{b();qS();gr();ps=r.object({name:r.string().optional(),type:ZS.optional(),description:r.string().optional(),config:_e.optional()});});var ev,rv=n(()=>{b();ev=r.enum_(["multi_project","experiments"]);});var cs,NX=n(()=>{b();rv();kr();cs=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:ev.optional(),description:r.string().optional(),config:Se});});var Tie,FX=n(()=>{b();Tie=r.object({time:r.date(),value:r.number().optional()});});var tv,ov=n(()=>{b();tv=r.object({time:r.date(),value:r.number().optional()});});var iv,av=n(()=>{b();iv=r.enum_(["unknown","processing","completed","failed"]);});var nv,sv=n(()=>{b();nv=r.enum_(["dataset","evaluation_suite"]);});var ls,dm=n(()=>{b();ls=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var pv,cv=n(()=>{b();pv=r.enum_(["private","public"]);});var jie,BX=n(()=>{b();av();sv();dm();cv();jie=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:nv.optional(),visibility:pv.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:iv.optional(),latestVersion:r.property("latest_version",ls.optional())});});var Eie,MX=n(()=>{b();Eie=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()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var lv,mv=n(()=>{b();lv=r.enum_(["manual","trace","span","sdk"]);});var dv,uv=n(()=>{b();dv=r.enum_(["passed","failed"]);});var gv,fv=n(()=>{b();uv();gv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:dv.optional()});});var ms,um=n(()=>{b();mv();go();ht();Nc();fv();pe();ms=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:lv,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),experimentItems:r.property("experiment_items",r.list(ga).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),gv).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 hv,WX=n(()=>{b();um();hv=r.object({generatedSamples:r.property("generated_samples",r.list(ms).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var Cie,LX=n(()=>{b();um();Cie=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(ms),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var yv,VX=n(()=>{b();yv=r.record(r.string(),r.unknown());});var bv,Rv=n(()=>{b();bv=r.enum_(["manual","trace","span","sdk"]);});var xv,wv=n(()=>{b();xv=r.enum_(["llm_judge","code_metric"]);});var _v,kv=n(()=>{b();_v=r.record(r.string(),r.unknown());});var Av,Pv=n(()=>{b();wv();kv();Av=r.object({name:r.string(),type:xv,config:_v});});var ds,gm=n(()=>{b();ds=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var zv,Sv=n(()=>{b();zv=r.enum_(["passed","failed"]);});var vv,Tv=n(()=>{b();vv=r.enum_(["default","hidden"]);});var jv,Ev=n(()=>{b();jv=r.enum_(["ui","sdk","online_scoring"]);});var Cv,Iv=n(()=>{b();Cv=r.enum_(["ui","sdk","online_scoring"]);});var Dv,Uv=n(()=>{b();Iv();Dv=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Cv.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Nv,Fv=n(()=>{b();Ev();Uv();Nv=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:jv,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Dv).optional())});});var us,Bv=n(()=>{b();us=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Mv,Wv=n(()=>{b();dk();NS();gm();Sv();Tv();Fv();Bv();Mv=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()),projectId:r.property("project_id",r.string().optional()),input:us.optional(),output:us.optional(),traceMetadata:r.property("trace_metadata",us.optional()),feedbackScores:r.property("feedback_scores",r.list(Nv).optional()),comments:r.list(US).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",vv.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",ds.optional()),assertionResults:r.property("assertion_results",r.list(mk).optional()),status:zv.optional()});});var Lv,Vv=n(()=>{b();Lv=r.enum_(["passed","failed"]);});var Jv,Hv=n(()=>{b();Vv();Jv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Lv.optional()});});var Gv,Ov=n(()=>{b();Rv();Pv();gm();Wv();Hv();pe();Gv=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:bv,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Av).optional(),executionPolicy:r.property("execution_policy",ds.optional()),experimentItems:r.property("experiment_items",r.list(Mv).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),Jv).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 Kv,JX=n(()=>{b();jS();Ov();Kv=r.object({content:r.list(Gv).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(TS).optional(),sortableBy:r.list(r.string()).optional()});});var $v,Qv=n(()=>{b();$v=r.enum_(["manual","trace","span","sdk"]);});var Yv,Xv=n(()=>{b();Yv=r.enum_(["llm_judge","code_metric"]);});var gs,fm=n(()=>{b();Xv();gr();gs=r.object({name:r.string(),type:Yv,config:_e});});var fs,hm=n(()=>{b();fs=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Zv,qv=n(()=>{b();Zv=r.enum_(["default","hidden"]);});var hs,eT=n(()=>{b();qv();hs=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()),projectId:r.property("project_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()),traceVisibilityMode:r.property("trace_visibility_mode",Zv.optional())});});var rT,tT=n(()=>{b();rT=r.enum_(["passed","failed"]);});var oT,iT=n(()=>{b();tT();oT=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:rT.optional()});});var ys,aT=n(()=>{b();Qv();fm();hm();eT();iT();pe();ys=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:$v,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(gs).optional(),executionPolicy:r.property("execution_policy",fs.optional()),experimentItems:r.property("experiment_items",r.list(hs).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),oT).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 nT,HX=n(()=>{b();DS();aT();nT=r.object({content:r.list(ys).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(IS).optional(),sortableBy:r.list(r.string()).optional()});});var sT,pT=n(()=>{b();sT=r.enum_(["unknown","processing","completed","failed"]);});var cT,lT=n(()=>{b();cT=r.enum_(["dataset","evaluation_suite"]);});var mT,dT=n(()=>{b();mT=r.enum_(["private","public"]);});var bs,ym=n(()=>{b();bs=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var Eo,uT=n(()=>{b();pT();lT();dT();ym();Eo=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:cT.optional(),visibility:mT.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:sT.optional(),latestVersion:r.property("latest_version",bs.optional())});});var Rs,GX=n(()=>{b();uT();Rs=r.object({content:r.list(Eo).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var gT,fT=n(()=>{b();gT=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var hT,OX=n(()=>{b();fT();hT=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:gT.optional()});});var $r,yT=n(()=>{b();fm();hm();$r=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()),versionName:r.property("version_name",r.string().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),evaluators:r.list(gs).optional(),executionPolicy:r.property("execution_policy",fs.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 bT,KX=n(()=>{b();yT();bT=r.object({content:r.list($r).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var RT,xT=n(()=>{b();RT=r.enum_(["trace","span"]);});var Iie,$X=n(()=>{b();xT();Iie=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",RT),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var xs,QX=n(()=>{b();xs=r.object({name:r.string(),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var Co,YX=n(()=>{b();Co=r.object({ids:r.list(r.string())});});var Die,XX=n(()=>{b();Die=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position: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 ws,wT=n(()=>{b();ws=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position: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 _T,ZX=n(()=>{b();wT();_T=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ws).optional(),sortableBy:r.list(r.string()).optional()});});var _s,bm=n(()=>{b();_s=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var kT,AT=n(()=>{b();kT=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Bt,ks=n(()=>{b();Bt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Io,qX=n(()=>{b();Io=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Uie,e5=n(()=>{b();Uie=r.object({errors:r.list(r.string()).optional()});});var Nie,r5=n(()=>{b();Nie=r.object({errors:r.list(r.string()).optional()});});var Fie,t5=n(()=>{b();Fie=r.object({errors:r.list(r.string()).optional()});});var Bie,o5=n(()=>{b();Bie=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Mie,i5=n(()=>{b();Mie=r.object({errors:r.list(r.string()).optional()});});var As,a5=n(()=>{b();As=r.object({exists:r.boolean().optional()});});var PT,zT=n(()=>{b();PT=r.enum_(["dataset","evaluation_suite"]);});var ST,vT=n(()=>{b();ST=r.enum_(["running","completed","cancelled"]);});var TT,jT=n(()=>{b();TT=r.enum_(["regular","trial","mini-batch","mutation"]);});var Wie,n5=n(()=>{b();gk();yt();dm();zT();Dc();vT();jT();Or();Ye();ko();pa();Wie=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),type:TT.optional(),evaluationMethod:r.property("evaluation_method",PT.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),comments:r.list(ge).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:zr.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:ST.optional(),experimentScores:r.property("experiment_scores",r.list(aa).optional()),promptVersion:r.property("prompt_version",Hr.optional()),promptVersions:r.property("prompt_versions",r.list(Hr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",ls.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(uk).optional())});});var ET,CT=n(()=>{b();ET=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var IT,s5=n(()=>{b();CT();IT=r.object({experiments:r.list(ET).optional(),totalItems:r.property("total_items",r.number().optional())});});var DT,UT=n(()=>{b();e_();DT=r.object({label:r.string().optional(),aggregations:qw.optional()});});var NT,p5=n(()=>{b();UT();NT=r.object({content:r.record(r.string(),DT).optional()});});var FT,BT=n(()=>{b();FT=r.object({label:r.string().optional()});});var MT,WT=n(()=>{b();MT=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var LT,VT=n(()=>{b();WT();LT=r.object({groupsDetails:r.property("groups_details",r.list(MT).optional())});});var JT,c5=n(()=>{b();BT();VT();JT=r.object({content:r.record(r.string(),FT).optional(),details:LT.optional()});});var HT,GT=n(()=>{b();HT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var OT,KT=n(()=>{b();OT=r.enum_(["general","tool","llm","guardrail"]);});var Ps,Rm=n(()=>{b();yt();Gr();bt();Ye();GT();KT();Ps=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:OT.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.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",He.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(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:HT.optional(),environment:r.string().optional()});});var $T,QT=n(()=>{b();$T=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var YT,XT=n(()=>{b();mS();YT=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(lS).optional()});});var ZT,qT=n(()=>{b();ZT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var ej,rj=n(()=>{b();ej=r.enum_(["default","hidden"]);});var zs,xm=n(()=>{b();yt();Gr();QT();bt();XT();Ye();qT();rj();zs=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:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",He.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(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(YT).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ej.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(),experiment:$T.optional(),source:ZT.optional(),environment:r.string().optional()});});var tj,oj=n(()=>{b();bt();Ye();Rm();xm();tj=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:zs.optional(),spans:r.list(Ps).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var Lie,l5=n(()=>{b();oj();Lie=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(tj)});});var ij,aj=n(()=>{b();ij=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var nj,sj=n(()=>{b();nj=r.enum_(["dataset","evaluation_suite"]);});var pj,cj=n(()=>{b();pj=r.enum_(["running","completed","cancelled"]);});var lj,mj=n(()=>{b();lj=r.enum_(["regular","trial","mini-batch","mutation"]);});var dj,uj=n(()=>{b();dj=r.object({name:r.string(),value:r.number()});});var Ge,Do=n(()=>{b();Ge=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Ss,wm=n(()=>{b();Ss=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var vs,gj=n(()=>{b();hk();ss();ym();sj();cj();mj();uj();En();Do();wm();cl();vs=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),type:lj.optional(),evaluationMethod:r.property("evaluation_method",nj.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Kr).optional()),comments:r.list(Nt).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ss.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:pj.optional(),experimentScores:r.property("experiment_scores",r.list(dj).optional()),promptVersion:r.property("prompt_version",_o.optional()),promptVersions:r.property("prompt_versions",r.list(_o).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",bs.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(fk).optional())});});var Ts,m5=n(()=>{b();gj();Ts=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vs).optional(),sortableBy:r.list(r.string()).optional()});});var Vie,d5=n(()=>{pe();Vie=V;});var fj,hj=n(()=>{b();fj=r.object({max:r.number(),min:r.number()});});var yj,bj=n(()=>{b();hj();yj=r.object({details:fj.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 Rj,Jie,u5=n(()=>{b();cz();Dz();bj();Rj=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()}),Jie=r.union("type",{numerical:yj.extend(Rj),categorical:Iz.extend(Rj),boolean:pz.extend(Rj)}).transform({transform:p=>p,untransform:p=>p});});var xj,wj=n(()=>{b();xj=r.object({max:r.number(),min:r.number()});});var _j,kj=n(()=>{b();wj();_j=r.object({details:xj.optional()});});var Aj,Pj,g5=n(()=>{b();uz();Bz();kj();Aj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Pj=r.union("type",{numerical:_j.extend(Aj),categorical:Fz.extend(Aj),boolean:dz.extend(Aj)}).transform({transform:p=>p,untransform:p=>p});});var zj,Sj=n(()=>{b();zj=r.object({max:r.number(),min:r.number()});});var js,_m=n(()=>{b();Sj();js=r.object({details:zj.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 vj,Tj,jj=n(()=>{b();cm();lm();_m();vj=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()}),Tj=r.union("type",{numerical:js.extend(vj),categorical:ns.extend(vj),boolean:as.extend(vj)}).transform({transform:p=>p,untransform:p=>p});});var Ej,f5=n(()=>{b();jj();Ej=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Tj).optional()});});var Cj,Ij,h5=n(()=>{b();cm();lm();_m();Cj=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()}),Ij=r.union("type",{numerical:js.extend(Cj),categorical:ns.extend(Cj),boolean:as.extend(Cj)}).transform({transform:p=>p,untransform:p=>p});});var Dj,Uj=n(()=>{b();Dj=r.object({name:r.string(),value:r.number()});});var Nj,Fj=n(()=>{b();Nj=r.enum_(["ui","sdk","online_scoring"]);});var Bj,Mj=n(()=>{b();Fj();Bj=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:Nj,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),id:r.string()});});var Es,y5=n(()=>{b();Mj();Es=r.object({scores:r.list(Bj)});});var Wj,Lj=n(()=>{b();Wj=r.object({name:r.string().optional(),type:r.string().optional()});});var Vj,b5=n(()=>{b();Lj();Vj=r.object({scores:r.list(Wj).optional()});});var Jj,Hj=n(()=>{b();Jj=r.object({name:r.string().optional(),type:r.string().optional()});});var Qr,R5=n(()=>{b();Hj();Qr=r.object({scores:r.list(Jj).optional()});});var Gj,Oj=n(()=>{b();Gj=r.enum_(["ui","sdk","online_scoring"]);});var Kj,$j=n(()=>{b();Kj=r.enum_(["ui","sdk","online_scoring"]);});var Qj,Yj=n(()=>{b();$j();Qj=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Kj.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Uo,km=n(()=>{b();Oj();Yj();Uo=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Gj,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Qj).optional())});});var Xj,Zj=n(()=>{b();Xj=r.object({max:r.number(),min:r.number()});});var qj,eE=n(()=>{b();Zj();qj=r.object({details:Xj.optional()});});var rE,tE,x5=n(()=>{b();Rz();Hz();eE();rE=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),tE=r.union("type",{numerical:qj.extend(rE),categorical:Jz.extend(rE),boolean:bz.extend(rE)}).transform({transform:p=>p,untransform:p=>p});});var oE,w5=n(()=>{b();oE=r.object({reportId:r.string().optional()});});var iE,aE=n(()=>{b();iE=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var nE,sE=n(()=>{b();nE=r.enum_(["passed","failed"]);});var pE,cE=n(()=>{b();aE();sE();pe();pE=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:iE,result:nE,config:V,details:V});});var Hie,_5=n(()=>{b();cE();Hie=r.object({guardrails:r.list(pE)});});var lE,mE=n(()=>{b();yS();lE=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(hS).optional()});});var Gie,k5=n(()=>{b();Gie=r.object({ids:r.list(r.string())});});var dE,uE=n(()=>{b();dE=r.object({activeLocks:r.property("active_locks",r.number().optional()),lockedBy:r.property("locked_by",r.list(r.string()).optional())});});var gE,fE=n(()=>{b();gE=r.enum_(["count","errors","avg_duration","total_cost"]);});var hE,yE=n(()=>{b();fE();hE=r.object({type:gE.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var bE,A5=n(()=>{b();yE();bE=r.object({stats:r.list(hE).optional()});});var RE,xE=n(()=>{b();RE=r.enum_(["pairing","connected","disconnected"]);});var wE,_E=n(()=>{b();wE=r.enum_(["connect","endpoint"]);});var Cs,kE=n(()=>{b();gw();pe();xE();_E();Cs=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:RE.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(uw).optional(),capabilities:r.list(r.string()).optional(),checklist:V.optional(),type:wE.optional()});});var AE,P5=n(()=>{b();AE=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var PE,z5=n(()=>{b();Pl();PE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(_t).optional()});});var zE,S5=n(()=>{b();kE();zE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cs).optional()});});var SE,v5=n(()=>{b();SE=r.object({acquired:r.boolean().optional(),itemId:r.property("item_id",r.string().optional()),lockedBy:r.property("locked_by",r.string().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var vE,T5=n(()=>{b();uE();vE=r.object({locks:r.record(r.string(),dE).optional()});});var TE,jE=n(()=>{b();TE=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var EE,CE=n(()=>{b();jE();EE=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:TE.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var IE,j5=n(()=>{b();CE();IE=r.object({content:r.list(EE).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var DE,UE=n(()=>{b();DE=r.enum_(["trace","thread","span"]);});var Is,E5=n(()=>{b();UE();Is=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",DE)});});var Ds,C5=n(()=>{b();Ds=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var Oie,I5=n(()=>{b();Oie=r.object({error:r.string().optional(),errorDescription:r.property("error_description",r.string().optional())});});var Am,D5=n(()=>{b();Am=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var Pm,U5=n(()=>{b();Pm=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var NE,FE=n(()=>{b();NE=r.enum_(["pending","completed","failed"]);});var BE,ME=n(()=>{b();pe();FE();BE=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),sessionId:r.property("session_id",r.string().optional()),content:r.string().optional(),recommendedActions:r.property("recommended_actions",V.optional()),status:NE.optional(),failureReason:r.property("failure_reason",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var WE,N5=n(()=>{b();ME();WE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(BE).optional()});});var LE,VE=n(()=>{b();LE=r.enum_(["running","completed","cancelled","initialized","error"]);});var JE,HE=n(()=>{b();pe();JE=r.object({type:r.string(),parameters:V.optional()});});var GE,OE=n(()=>{b();HE();GE=r.object({metrics:r.list(JE)});});var KE,$E=n(()=>{b();pe();KE=r.object({model:r.string(),parameters:V.optional()});});var QE,YE=n(()=>{b();pe();QE=r.object({type:r.string(),parameters:V.optional()});});var XE,ZE=n(()=>{b();XE=r.object({role:r.string(),content:r.string()});});var qE,eC=n(()=>{b();ZE();qE=r.object({messages:r.list(XE)});});var rC,tC=n(()=>{b();OE();$E();YE();eC();rC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:qE,llmModel:r.property("llm_model",KE),evaluation:GE,optimizer:QE});});var Kie,F5=n(()=>{b();Gr();Or();Ye();VE();tC();Kie=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:LE,metadata:le.optional(),studioConfig:r.property("studio_config",rC.optional()),errorInfo:r.property("error_info",He.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var oC,iC=n(()=>{b();oC=r.enum_(["running","completed","cancelled","initialized","error"]);});var aC,nC=n(()=>{b();gr();aC=r.object({type:r.string(),parameters:_e.optional()});});var sC,pC=n(()=>{b();nC();sC=r.object({metrics:r.list(aC)});});var cC,lC=n(()=>{b();gr();cC=r.object({model:r.string(),parameters:_e.optional()});});var mC,dC=n(()=>{b();gr();mC=r.object({type:r.string(),parameters:_e.optional()});});var uC,gC=n(()=>{b();uC=r.object({role:r.string(),content:r.string()});});var fC,hC=n(()=>{b();gC();fC=r.object({messages:r.list(uC)});});var yC,bC=n(()=>{b();pC();lC();dC();hC();yC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:fC,llmModel:r.property("llm_model",cC),evaluation:sC,optimizer:mC});});var Us,RC=n(()=>{b();ks();En();Do();iC();bC();Us=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:oC,metadata:Ge.optional(),studioConfig:r.property("studio_config",yC.optional()),errorInfo:r.property("error_info",Bt.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Kr).optional()),experimentScores:r.property("experiment_scores",r.list(Kr).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()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var Ns,B5=n(()=>{b();RC();Ns=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Us).optional(),sortableBy:r.list(r.string()).optional()});});var xC,wC=n(()=>{b();kr();xC=r.object({type:r.string(),parameters:Se.optional()});});var _C,kC=n(()=>{b();wC();_C=r.object({metrics:r.list(xC)});});var AC,PC=n(()=>{b();kr();AC=r.object({model:r.string(),parameters:Se.optional()});});var zC,SC=n(()=>{b();kr();zC=r.object({type:r.string(),parameters:Se.optional()});});var vC,TC=n(()=>{b();vC=r.object({role:r.string(),content:r.string()});});var jC,EC=n(()=>{b();TC();jC=r.object({messages:r.list(vC)});});var CC,IC=n(()=>{b();kC();PC();SC();EC();CC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:jC,llmModel:r.property("llm_model",AC),evaluation:_C,optimizer:zC});});var DC,M5=n(()=>{b();DC=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var UC,NC=n(()=>{b();UC=r.enum_(["running","completed","cancelled","initialized","error"]);});var zm,W5=n(()=>{b();an();yo();IC();NC();zm=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:UC,metadata:Je.optional(),studioConfig:r.property("studio_config",CC.optional()),errorInfo:r.property("error_info",kt.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FC,L5=n(()=>{b();zS();FC=r.object({columns:r.list(PS).optional()});});var BC,MC=n(()=>{b();wm();BC=r.object({value:Ss.optional()});});var WC,LC=n(()=>{b();WC=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var VC,JC=n(()=>{b();VC=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var HC,GC=n(()=>{b();HC=r.enum_(["private","public"]);});var $ie,V5=n(()=>{b();bm();Or();ko();GC();$ie=r.object({id:r.string().optional(),name:r.string(),visibility:HC.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(ve).optional()),duration:zr.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",_s.optional())});});var OC,KC=n(()=>{b();OC=r.enum_(["private","public"]);});var $C,J5=n(()=>{b();AT();Uj();LC();KC();$C=r.object({id:r.string().optional(),name:r.string(),visibility:OC.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(Dj).optional()),duration:WC.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",kT.optional())});});var QC,YC=n(()=>{b();QC=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var XC,ZC=n(()=>{b();XC=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var qC,eI=n(()=>{b();ov();qC=r.object({name:r.string().optional(),data:r.list(tv).optional()});});var rI,H5=n(()=>{b();YC();ZC();eI();rI=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",XC.optional()),interval:QC.optional(),results:r.list(qC).optional()});});var tI,oI=n(()=>{b();tI=r.enum_(["private","public"]);});var Fs,iI=n(()=>{b();oI();Fs=r.object({id:r.string().optional(),name:r.string(),visibility:tI.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 aI,G5=n(()=>{b();iI();aI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fs).optional(),sortableBy:r.list(r.string()).optional()});});var nI,sI,pI=n(()=>{b();tz();JS();MC();nI=r.object({name:r.string().optional()}),sI=r.union("type",{PERCENTAGE:BC.extend(nI),COUNT:VS.extend(nI),AVG:rz.extend(nI)}).transform({transform:p=>p,untransform:p=>p});});var Yr,O5=n(()=>{b();pI();Yr=r.object({stats:r.list(sI).optional()});});var cI,lI=n(()=>{b();bm();Or();ko();cI=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",_s.optional())});});var mI,K5=n(()=>{b();lI();mI=r.object({content:r.list(cI).optional()});});var dI,uI=n(()=>{b();dI=r.enum_(["text","chat"]);});var gI,fI=n(()=>{b();gI=r.enum_(["mustache","jinja2","python"]);});var hI,yI=n(()=>{b();hI=r.enum_(["text","chat"]);});var bI,RI=n(()=>{b();bI=r.enum_(["mustache","jinja2","python"]);});var xI,wI=n(()=>{b();xI=r.enum_(["prompt_version","mask"]);});var Sm,_I=n(()=>{b();pe();yI();RI();wI();Sm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:V.optional(),type:bI.optional(),versionType:r.property("version_type",xI.optional()),environment:r.string().optional(),environments:r.list(r.string()).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",hI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Qie,$5=n(()=>{b();pe();uI();fI();_I();Qie=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:V.optional(),changeDescription:r.property("change_description",r.string().optional()),type:gI.optional(),templateStructure:r.property("template_structure",dI.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",Sm.optional()),requestedVersion:r.property("requested_version",Sm.optional())});});var kI,AI=n(()=>{b();kI=r.enum_(["text","chat"]);});var vm,Q5=n(()=>{b();AI();Fa();vm=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",kI.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",De.optional()),requestedVersion:r.property("requested_version",De.optional())});});var PI,zI=n(()=>{b();PI=r.enum_(["text","chat"]);});var SI,vI=n(()=>{b();zI();SI=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",PI.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 Bs,Y5=n(()=>{b();vI();Bs=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(SI).optional(),sortableBy:r.list(r.string()).optional()});});var TI,jI=n(()=>{b();TI=r.enum_(["text","chat"]);});var EI,CI=n(()=>{b();EI=r.enum_(["mustache","jinja2","python"]);});var II,DI=n(()=>{b();II=r.enum_(["prompt_version","mask"]);});var UI,NI=n(()=>{b();gr();jI();CI();DI();UI=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:_e.optional(),type:EI.optional(),versionType:r.property("version_type",II.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",TI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var FI,X5=n(()=>{b();NI();FI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(UI).optional(),sortableBy:r.list(r.string()).optional()});});var BI,MI=n(()=>{b();BI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Yie,Z5=n(()=>{b();MI();xa();Yie=r.object({id:r.string().optional(),provider:BI,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()),authConfig:r.property("auth_config",Rt.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 WI,LI=n(()=>{b();WI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var VI,JI=n(()=>{b();VI=r.enum_(["form","json","basic"]);});var HI,GI=n(()=>{b();OS();JI();HI=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",VI.optional()),credentials:r.list(GS).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Ms,OI=n(()=>{b();LI();GI();Ms=r.object({id:r.string().optional(),provider:WI,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()),authConfig:r.property("auth_config",HI.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 KI,q5=n(()=>{b();OI();KI=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Ms).optional(),sortableBy:r.list(r.string()).optional()});});var $I,QI=n(()=>{b();$I=r.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var YI,XI=n(()=>{b();QI();YI=r.object({type:$I.optional(),id:r.string().optional(),name:r.string().optional(),resourceId:r.property("resource_id",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var ZI,e3=n(()=>{b();XI();ZI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(YI).optional()});});var qI,eD=n(()=>{b();qI=r.enum_(["agent_insights"]);});var Ws,rD=n(()=>{b();eD();Ws=r.object({id:r.string().optional(),type:qI,projectId:r.property("project_id",r.string()),reason:r.string(),detail: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 tD,r3=n(()=>{b();rD();tD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ws).optional()});});var Ls,t3=n(()=>{b();Ls=r.object({projectId:r.property("project_id",r.string().optional()),enabled:r.boolean().optional(),scheduleTime:r.property("schedule_time",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var oD,o3=n(()=>{b();oD=r.object({enrolled:r.number().optional(),cleared:r.number().optional(),unknownProjectIds:r.property("unknown_project_ids",r.list(r.string()).optional()),alreadyRunProjectIds:r.property("already_run_project_ids",r.list(r.string()).optional())});});var vr,Tm=n(()=>{b();vr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var iD,aD=n(()=>{b();iD=r.enum_(["organization","workspace","project"]);});var nD,sD=n(()=>{b();nD=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var No,pD=n(()=>{b();aD();sD();No=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:iD.optional(),retention:nD,applyToPast:r.property("apply_to_past",r.boolean().optional()),enabled:r.boolean().optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),catchUpCursor:r.property("catch_up_cursor",r.string().optional()),catchUpDone:r.property("catch_up_done",r.boolean().optional())});});var cD,i3=n(()=>{b();pD();cD=r.object({content:r.list(No).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var lD,a3=n(()=>{b();lD=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(),exportEnabled:r.boolean(),costIntelligenceEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),demoDataEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),ollieEnabled:r.boolean(),projectHomepageEnabled:r.boolean(),onlineScoringTracingEnabled:r.boolean(),annotationQueueAutomationEnabled:r.boolean(),defaultPageSize:r.number().optional()});});var Xie,n3=n(()=>{b();Rm();Xie=r.object({spans:r.list(Ps)});});var mD,dD=n(()=>{b();mD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var uD,gD=n(()=>{b();uD=r.enum_(["general","tool","llm","guardrail"]);});var Vs,fD=n(()=>{b();ss();ks();km();Do();dD();gD();Vs=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:uD.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.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",Bt.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(Uo).optional()),comments:r.list(Nt).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:mD.optional(),environment:r.string().optional()});});var hD,s3=n(()=>{b();fD();hD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vs).optional(),sortableBy:r.list(r.string()).optional()});});var yD,bD=n(()=>{b();yD=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var RD,p3=n(()=>{b();bD();RD=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(yD).optional())});});var xD,c3=n(()=>{b();xD=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var wD,l3=n(()=>{b();wD=r.object({accessToken:r.property("access_token",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional()),tokenType:r.property("token_type",r.string().optional()),expiresIn:r.property("expires_in",r.number().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional())});});var Js,m3=n(()=>{b();Js=r.object({names:r.list(r.string()).optional()});});var Zie,d3=n(()=>{b();xm();Zie=r.object({traces:r.list(zs)});});var _D,kD=n(()=>{b();_D=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var AD,u3=n(()=>{b();kD();AD=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(_D).optional())});});var PD,zD=n(()=>{b();PD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var SD,vD=n(()=>{b();SD=r.enum_(["default","hidden"]);});var Hs,TD=n(()=>{b();ss();ks();aj();km();mE();Do();zD();vD();Hs=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:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Bt.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(Uo).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Uo).optional()),comments:r.list(Nt).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(lE).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",SD.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(),experiment:ij.optional(),source:PD.optional(),environment:r.string().optional()});});var jD,g3=n(()=>{b();TD();jD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Hs).optional(),sortableBy:r.list(r.string()).optional()});});var ED,CD=n(()=>{b();ED=r.enum_(["active","inactive"]);});var Gs,ID=n(()=>{b();yt();bt();Ye();CD();Gs=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",le.optional()),lastMessage:r.property("last_message",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),status:ED.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(ge).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()),environment:r.string().optional()});});var jm,f3=n(()=>{b();jm=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 DD,h3=n(()=>{b();ID();DD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Gs).optional(),sortableBy:r.list(r.string()).optional()});});var UD,ND=n(()=>{b();UD=r.object({workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var FD,y3=n(()=>{b();ND();FD=r.object({breakdown:r.list(UD).optional()});});var BD,b3=n(()=>{b();BD=r.object({userName:r.property("user_name",r.string().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),resource:r.string().optional(),expiresAt:r.property("expires_at",r.date().optional())});});var MD,R3=n(()=>{b();MD=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var WD,LD=n(()=>{b();WD=r.enum_(["success","failure"]);});var VD,x3=n(()=>{b();LD();VD=r.object({status:WD.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 JD,w3=n(()=>{b();JD=r.object({completed:r.boolean().optional()});});var Os,_3=n(()=>{b();Os=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional()),colorMap:r.property("color_map",r.record(r.string(),r.string()).optional())});});var qie,k3=n(()=>{b();qie=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 Ks,A3=n(()=>{b();Tm();Ks=r.object({results:r.list(vr).optional()});});var Fo,P3=n(()=>{b();Fo=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 HD,z3=n(()=>{b();Tm();HD=r.object({results:r.list(vr).optional()});});var GD,S3=n(()=>{b();GD=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var OD,v3=n(()=>{b();JC();OD=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(VC).optional()});});var T3=n(()=>{gw();_w();hw();q9();Aw();Nw();jw();eX();Ph();xw();bw();vw();zw();Dw();Cw();Vw();Hw();rX();Bw();Ww();tX();Kw();Qw();oX();Zw();e_();iX();t_();aX();P_();g_();l_();n_();b_();h_();i_();T_();S_();p_();__();x_();I_();E_();nX();U_();sX();J_();fc();q_();$h();pX();cX();ok();rk();lX();mX();ck();nk();M_();pk();L_();Xh();Yh();Db();dy();py();ly();dk();gk();hk();_k();bk();Ak();dX();Sk();Tk();Ek();uX();gX();fX();hX();Bk();Zk();ql();WA();tP();VA();HA();yX();bX();aP();sP();eA();rm();gP();tA();tm();bP();iA();om();AP();nA();im();vP();pA();RX();jP();CP();DP();NP();BP();WP();VP();HP();lA();am();QP();xX();XP();qP();tz();wX();iz();_X();kX();cz();uz();cm();Rz();sz();mz();fz();yz();tw();ew();IR();ER();AX();PX();vz();zz();wz();zX();kz();Dz();Bz();lm();Hz();Cz();Nz();Wz();Vz();Zz();SX();mS();sS();yS();uS();fS();cS();vX();TX();wS();RS();jX();zS();jS();vS();DS();CS();AS();yt();NS();ss();EX();BS();eS();oy();Q_();Hh();ay();X_();Oh();CX();JS();IX();pR();OS();dR();DX();XS();$S();YS();UX();qS();NX();rv();FX();ov();BX();MX();WX();ob();tb();um();LX();VX();Ov();Rv();Sc();My();JX();HX();aT();Qv();mv();Ly();Yy();Jy();GX();uT();pT();lT();dT();av();sv();OX();fT();KX();yT();dm();ym();cv();$X();xT();QX();YX();Oz();XX();ZX();wT();bm();AT();Gr();Uc();ks();an();qX();e5();r5();t5();o5();i5();go();Pv();wv();fm();Xv();Iy();Ky();Gy();ht();gm();hm();Qy();a5();n5();zT();s5();p5();c5();CT();Nc();oj();Cb();l5();Wv();Sv();Tv();eT();qv();QT();aj();Nb();Bb();m5();gj();sj();cj();mj();fv();Hv();Vv();iT();tT();uv();Dc();uj();Ob();vT();jT();lb();sb();cb();d5();u5();g5();f5();jj();h5();bt();Or();Uj();En();y5();Mj();Fj();Mx();Fx();Fv();Ev();xb();gb();b5();R5();km();Oj();Wb();x5();Ac();uo();w5();BT();UT();WT();VT();cE();_5();aE();sE();XT();mE();aR();rR();oR();k5();Wk();gA();zA();uE();Ye();Bv();la();Do();yo();pe();kv();KR();gr();kr();xy();A5();yE();fE();Kl();AA();NA();Dn();Hk();bA();jA();Jn();xA();Ok();Kn();CA();Un();Hn();$n();Nn();Gn();_A();$k();Qn();DA();kE();P5();Pl();xl();z5();Rx();_l();S5();xE();_E();v5();T5();CE();jE();j5();$z();Yz();E5();UE();C5();Pc();WS();bj();kj();_m();eE();hj();wj();Sj();Zj();I5();D5();U5();_R();ME();N5();FE();F5();B5();RC();iC();VE();tC();bC();IC();M5();W5();NC();L5();dw();lw();MC();ko();LC();wm();JC();V5();J5();KC();H5();YC();ZC();G5();iI();oI();dA();nm();pI();O5();K5();lI();GC();$5();Q5();AI();Y5();vI();zI();uI();tS();fI();db();_I();Fa();QR();XR();qR();pa();cl();Kb();X5();NI();jI();CI();DI();yI();RI();tx();wI();Z5();q5();MI();OI();LI();xa();GI();JI();lR();hR();gR();XI();QI();e3();Eh();Th();rD();r3();eD();t3();o3();Ay();_y();Tm();eI();i3();pD();aD();sD();ry();qh();K_();G_();Vh();Wh();Lj();Hj();a3();Rm();n3();Uy();zb();_b();Ab();Pt();iw();xo();UR();sm();lP();$l();OA();dP();s3();fD();dD();gD();GT();p3();KT();Px();_x();Ax();Ql();$A();hP();jx();Sx();Tx();c3();zy();OE();pC();kC();$E();lC();PC();ZE();gC();TC();HE();nC();wC();YE();dC();SC();eC();hC();EC();l3();m3();jy();Ol();xk();vy();xm();d3();u3();Fy();jb();vb();Ao();Yk();wo();FR();em();BA();g3();TD();zD();vD();qT();ID();At();Qx();Ca();MR();pm();xP();f3();Yl();YA();_P();h3();CD();Kx();Xl();ZA();zP();Vx();Lx();rj();Gx();Hx();iS();y3();Zl();eP();KP();b3();Hb();Uv();Iv();bb();hb();Yj();$j();Vb();Vk();hA();vA();d_();R3();A_();x3();LD();F_();w3();_3();Uk();k3();A3();P3();z3();S3();ND();bD();kD();v3();});var G={};L(G,{ActivateRequest:()=>Ta,Agent:()=>uw,AgentBlueprintHistory:()=>ww,AgentBlueprintHistoryType:()=>fw,AgentBlueprintPublic:()=>zt,AgentBlueprintPublicType:()=>kw,AgentBlueprintWrite:()=>Uw,AgentBlueprintWriteType:()=>Tw,AgentConfigCreateWrite:()=>Jl,AgentConfigEnv:()=>Ah,AgentConfigEnvSetByName:()=>ki,AgentConfigEnvUpdate:()=>Ai,AgentConfigRemoveValues:()=>Pi,AgentConfigValueHistory:()=>Rw,AgentConfigValueHistoryType:()=>yw,AgentConfigValuePublic:()=>Sw,AgentConfigValuePublicType:()=>Pw,AgentConfigValueWrite:()=>Iw,AgentConfigValueWriteType:()=>Ew,AgentInsightsIssue:()=>Lw,AgentInsightsIssueDetail:()=>Jw,AgentInsightsIssuePage:()=>Gw,AgentInsightsIssueSeverity:()=>Fw,AgentInsightsIssueStatus:()=>Mw,AgentInsightsIssueUpdate:()=>zi,AgentInsightsIssueUpdateStatus:()=>nc,AgentInsightsIssueWithDetails:()=>Yw,AgentInsightsIssueWithDetailsSeverity:()=>Ow,AgentInsightsIssueWithDetailsStatus:()=>$w,AgentInsightsJob:()=>Sn,AgentInsightsJobStatus:()=>Xw,AgentInsightsJobUpdate:()=>Ti,AgentInsightsJobUpdateStatus:()=>mc,AgentInsightsReport:()=>Si,AggregationData:()=>qw,Alert:()=>Aie,AlertAlertType:()=>r_,AlertPagePublic:()=>Tn,AlertPublic:()=>vn,AlertPublicAlertType:()=>u_,AlertTrigger:()=>c_,AlertTriggerConfig:()=>a_,AlertTriggerConfigPublic:()=>y_,AlertTriggerConfigPublicType:()=>f_,AlertTriggerConfigType:()=>o_,AlertTriggerConfigWrite:()=>v_,AlertTriggerConfigWriteType:()=>z_,AlertTriggerEventType:()=>s_,AlertTriggerPublic:()=>w_,AlertTriggerPublicEventType:()=>R_,AlertTriggerWrite:()=>C_,AlertTriggerWriteEventType:()=>j_,AlertWrite:()=>jn,AlertWriteAlertType:()=>D_,AnalyticsQueryRequest:()=>cn,AnalyticsQueryResponse:()=>Hl,AnnotationQueue:()=>V_,AnnotationQueueAutomation:()=>Ii,AnnotationQueueAutomationPublic:()=>Z_,AnnotationQueueAutomationWrite:()=>Kh,AnnotationQueueBatch:()=>Pie,AnnotationQueueBatchWrite:()=>Ei,AnnotationQueueItemIds:()=>Gl,AnnotationQueueItemIdsPublic:()=>Ci,AnnotationQueueItemPublic:()=>tk,AnnotationQueueItemPublicSource:()=>ek,AnnotationQueueItemsPublic:()=>ik,AnnotationQueuePagePublic:()=>lk,AnnotationQueuePublic:()=>Cn,AnnotationQueuePublicScope:()=>ak,AnnotationQueueReviewer:()=>B_,AnnotationQueueReviewerPublic:()=>sk,AnnotationQueueScope:()=>W_,AnnotationQueueUpdate:()=>Di,AnnotationQueueWrite:()=>ji,AnnotationQueueWriteScope:()=>Qh,AssertionResult:()=>Ib,AssertionResultBatch:()=>Ui,AssertionResultBatchEntityType:()=>yc,AssertionResultBatchItem:()=>my,AssertionResultBatchItemSource:()=>sy,AssertionResultBatchItemStatus:()=>cy,AssertionResultCompare:()=>mk,AssertionScoreAverage:()=>uk,AssertionScoreAveragePublic:()=>fk,AssistantMessage:()=>wk,AssistantMessageRole:()=>yk,Attachment:()=>kk,AttachmentListRequestEntityType:()=>wc,AttachmentPage:()=>Pk,AudioUrl:()=>zk,AudioUrlPublic:()=>vk,AudioUrlWrite:()=>jk,AuthDetailsHolder:()=>Ck,AuthorizationServerMetadata:()=>Ik,AuthorizeContext:()=>Nk,AutomationRuleEvaluator:()=>zie,AutomationRuleEvaluatorAction:()=>Fk,AutomationRuleEvaluatorLlmAsJudge:()=>Xk,AutomationRuleEvaluatorLlmAsJudgePublic:()=>On,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>MA,AutomationRuleEvaluatorObjectObjectPublic:()=>rP,AutomationRuleEvaluatorObjectObjectPublicAction:()=>LA,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>JA,AutomationRuleEvaluatorPagePublic:()=>oP,AutomationRuleEvaluatorPublic:()=>pP,AutomationRuleEvaluatorPublicAction:()=>iP,AutomationRuleEvaluatorPublicTriggerScope:()=>nP,AutomationRuleEvaluatorSpanLlmAsJudge:()=>qk,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>Xn,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>uP,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>rA,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Zn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>yP,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>oA,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>qn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>kP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>aA,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>es,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>SP,AutomationRuleEvaluatorTriggerScope:()=>sA,AutomationRuleEvaluatorUpdate:()=>GP,AutomationRuleEvaluatorUpdateAction:()=>TP,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>EP,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>IP,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>UP,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>FP,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>MP,AutomationRuleEvaluatorUpdateTriggerScope:()=>LP,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>JP,AutomationRuleEvaluatorUserDefinedMetricPython:()=>cA,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>rs,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>$P,AutomationRuleEvaluatorWrite:()=>ez,AutomationRuleEvaluatorWriteAction:()=>YP,AutomationRuleEvaluatorWriteTriggerScope:()=>ZP,AvgValueStatPublic:()=>rz,BatchDelete:()=>de,BatchDeleteByProject:()=>mn,BiInformation:()=>oz,BiInformationResponse:()=>jo,BlueprintPageHistory:()=>az,BooleanFeedbackDefinition:()=>pz,BooleanFeedbackDefinitionCreate:()=>dz,BooleanFeedbackDefinitionPublic:()=>as,BooleanFeedbackDefinitionUpdate:()=>bz,BooleanFeedbackDetail:()=>nz,BooleanFeedbackDetailCreate:()=>lz,BooleanFeedbackDetailPublic:()=>gz,BooleanFeedbackDetailUpdate:()=>hz,BreakdownConfig:()=>rw,BreakdownConfigField:()=>qx,BreakdownConfigPublic:()=>CR,BreakdownConfigPublicField:()=>jR,BridgeCommand:()=>Az,BridgeCommandBatchResponse:()=>Tz,BridgeCommandItem:()=>Sz,BridgeCommandItemType:()=>Pz,BridgeCommandNextRequest:()=>$a,BridgeCommandResultRequest:()=>Qa,BridgeCommandResultRequestStatus:()=>bl,BridgeCommandStatus:()=>xz,BridgeCommandSubmitRequest:()=>Ya,BridgeCommandSubmitRequestType:()=>Rl,BridgeCommandSubmitResponse:()=>jz,BridgeCommandType:()=>_z,CategoricalFeedbackDefinition:()=>Iz,CategoricalFeedbackDefinitionCreate:()=>Fz,CategoricalFeedbackDefinitionPublic:()=>ns,CategoricalFeedbackDefinitionUpdate:()=>Jz,CategoricalFeedbackDetail:()=>Ez,CategoricalFeedbackDetailCreate:()=>Uz,CategoricalFeedbackDetailPublic:()=>Mz,CategoricalFeedbackDetailUpdate:()=>Lz,ChatCompletionChoice:()=>Xz,ChatCompletionRequest:()=>Mi,ChatCompletionResponse:()=>aS,Check:()=>lS,CheckName:()=>nS,CheckPublic:()=>hS,CheckPublicName:()=>dS,CheckPublicResult:()=>gS,CheckResult:()=>pS,ChunkedOutputJsonNode:()=>Sie,ChunkedOutputJsonNodePublic:()=>vie,ChunkedOutputJsonNodePublicType:()=>xS,ChunkedOutputJsonNodeType:()=>bS,ClientRegistrationRequest:()=>Aa,ClientRegistrationResponse:()=>_S,Column:()=>PS,ColumnCompare:()=>TS,ColumnCompareTypesItem:()=>SS,ColumnPublic:()=>IS,ColumnPublicTypesItem:()=>ES,ColumnTypesItem:()=>kS,Comment:()=>ge,CommentCompare:()=>US,CommentPublic:()=>Nt,CompleteMultipartUploadRequest:()=>mm,CompleteMultipartUploadRequestEntityType:()=>FS,CompletionTokensDetails:()=>qz,ConditionGroup:()=>ty,ConditionGroupPublic:()=>$_,ConditionGroupWrite:()=>Jh,Conditions:()=>iy,ConditionsPublic:()=>Y_,ConditionsWrite:()=>Gh,ConsentRequest:()=>Pa,ConsentResponse:()=>LS,CountValueStatPublic:()=>VS,CreateDatasetItemsFromJsonRequestFormat:()=>Cc,CreateDatasetItemsFromSpansRequest:()=>Wi,CreateDatasetItemsFromTracesRequest:()=>Li,CreateLocalRunnerJobRequest:()=>Za,CreatePromptVersionDetail:()=>Ba,CreatePromptVersionDetailTemplateStructure:()=>nl,CreateSessionRequest:()=>ja,CreateSessionRequestType:()=>Zc,CreateSessionResponse:()=>HS,Credential:()=>sR,CredentialPublic:()=>GS,CredentialWrite:()=>mR,DashboardPagePublic:()=>Ft,DashboardPublic:()=>or,DashboardPublicScope:()=>KS,DashboardPublicType:()=>QS,DashboardUpdatePublic:()=>ps,DashboardUpdatePublicType:()=>ZS,DashboardWrite:()=>cs,DashboardWriteType:()=>ev,DataPointDouble:()=>Tie,DataPointNumberPublic:()=>tv,Dataset:()=>jie,DatasetExpansion:()=>Eie,DatasetExpansionResponse:()=>hv,DatasetExpansionWrite:()=>Vi,DatasetExportJobPublic:()=>fo,DatasetExportJobPublicStatus:()=>rb,DatasetIdentifier:()=>Ji,DatasetIdentifierPublic:()=>Hi,DatasetItem:()=>ms,DatasetItemBatch:()=>Cie,DatasetItemBatchUpdate:()=>Oi,DatasetItemBatchWrite:()=>$i,DatasetItemChangesPublic:()=>yv,DatasetItemCompare:()=>Gv,DatasetItemCompareSource:()=>bv,DatasetItemFilter:()=>Gi,DatasetItemFilterOperator:()=>By,DatasetItemPageCompare:()=>Kv,DatasetItemPagePublic:()=>nT,DatasetItemPublic:()=>ys,DatasetItemPublicSource:()=>$v,DatasetItemSource:()=>lv,DatasetItemStreamRequest:()=>Qi,DatasetItemUpdate:()=>Wy,DatasetItemWrite:()=>Ki,DatasetItemWriteSource:()=>Vy,DatasetItemsDelete:()=>Yi,DatasetPagePublic:()=>Rs,DatasetPublic:()=>Eo,DatasetPublicStatus:()=>sT,DatasetPublicType:()=>cT,DatasetPublicVisibility:()=>mT,DatasetStatus:()=>iv,DatasetType:()=>nv,DatasetUpdate:()=>Xi,DatasetUpdateVisibility:()=>vc,DatasetVersionDiff:()=>hT,DatasetVersionDiffStats:()=>gT,DatasetVersionPagePublic:()=>bT,DatasetVersionPublic:()=>$r,DatasetVersionRestorePublic:()=>Zi,DatasetVersionRetrieveRequestPublic:()=>qi,DatasetVersionSummary:()=>ls,DatasetVersionSummaryPublic:()=>bs,DatasetVersionTag:()=>ea,DatasetVersionUpdatePublic:()=>ra,DatasetVisibility:()=>pv,DatasetWrite:()=>ta,DatasetWriteType:()=>Tc,DatasetWriteVisibility:()=>jc,DeleteAttachmentsRequest:()=>Iie,DeleteAttachmentsRequestEntityType:()=>RT,DeleteFeedbackScore:()=>xs,DeleteIdsHolder:()=>Co,DeleteThreadFeedbackScores:()=>dn,DeleteTraceThreads:()=>un,Delta:()=>Gz,DownloadAttachmentRequestEntityType:()=>_c,Environment:()=>Die,EnvironmentPagePublic:()=>_T,EnvironmentPublic:()=>ws,EnvironmentUpdate:()=>oa,EnvironmentWrite:()=>ia,ErrorCountWithDeviation:()=>_s,ErrorCountWithDeviationDetailed:()=>kT,ErrorInfo:()=>He,ErrorInfoExperimentItemBulkWriteView:()=>ma,ErrorInfoPublic:()=>Bt,ErrorInfoWrite:()=>kt,ErrorMessage:()=>Io,ErrorMessageDetail:()=>Uie,ErrorMessageDetailed:()=>Nie,ErrorMessageHistory:()=>Fie,ErrorMessagePublic:()=>Bie,ErrorMessageWrite:()=>Mie,EvaluatorItem:()=>_r,EvaluatorItemCompare:()=>Av,EvaluatorItemCompareType:()=>xv,EvaluatorItemPublic:()=>gs,EvaluatorItemPublicType:()=>Yv,EvaluatorItemType:()=>Cy,EvaluatorItemWrite:()=>Oy,EvaluatorItemWriteType:()=>Hy,ExecutionPolicy:()=>qe,ExecutionPolicyCompare:()=>ds,ExecutionPolicyPublic:()=>fs,ExecutionPolicyWrite:()=>$y,ExistenceResponse:()=>As,Experiment:()=>Wie,ExperimentBatchUpdate:()=>sa,ExperimentEvaluationMethod:()=>PT,ExperimentExecutionRequest:()=>ca,ExperimentExecutionResponse:()=>IT,ExperimentGroupAggregationsResponse:()=>NT,ExperimentGroupResponse:()=>JT,ExperimentInfo:()=>ET,ExperimentItem:()=>ga,ExperimentItemBulkRecord:()=>tj,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Eb,ExperimentItemBulkUpload:()=>Lie,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>da,ExperimentItemCompare:()=>Mv,ExperimentItemCompareStatus:()=>zv,ExperimentItemCompareTraceVisibilityMode:()=>vv,ExperimentItemPublic:()=>hs,ExperimentItemPublicTraceVisibilityMode:()=>Zv,ExperimentItemReference:()=>$T,ExperimentItemReferencePublic:()=>ij,ExperimentItemStatus:()=>Ub,ExperimentItemStreamRequest:()=>ua,ExperimentItemTraceVisibilityMode:()=>Fb,ExperimentItemsBatch:()=>fa,ExperimentItemsDelete:()=>ha,ExperimentPagePublic:()=>Ts,ExperimentPublic:()=>vs,ExperimentPublicEvaluationMethod:()=>nj,ExperimentPublicStatus:()=>pj,ExperimentPublicType:()=>lj,ExperimentRunSummary:()=>gv,ExperimentRunSummaryCompare:()=>Jv,ExperimentRunSummaryCompareStatus:()=>Lv,ExperimentRunSummaryPublic:()=>oT,ExperimentRunSummaryPublicStatus:()=>rT,ExperimentRunSummaryStatus:()=>dv,ExperimentScore:()=>aa,ExperimentScorePublic:()=>dj,ExperimentScoreWrite:()=>Gb,ExperimentStatus:()=>ST,ExperimentStreamRequestPublic:()=>ya,ExperimentType:()=>TT,ExperimentUpdate:()=>na,ExperimentUpdateStatus:()=>nb,ExperimentUpdateType:()=>pb,ExperimentWrite:()=>ba,ExperimentWriteEvaluationMethod:()=>Bc,ExperimentWriteStatus:()=>Mc,ExperimentWriteType:()=>Wc,ExportTraceServiceRequest:()=>Vie,Feedback:()=>Jie,FeedbackCreate:()=>Pj,FeedbackDefinitionPagePublic:()=>Ej,FeedbackObjectPublic:()=>Tj,FeedbackPublic:()=>Ij,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>ve,FeedbackScoreAverageDetailed:()=>Dj,FeedbackScoreAveragePublic:()=>Kr,FeedbackScoreBatch:()=>Es,FeedbackScoreBatchItem:()=>Bj,FeedbackScoreBatchItemSource:()=>Nj,FeedbackScoreBatchItemThread:()=>Bx,FeedbackScoreBatchItemThreadSource:()=>Nx,FeedbackScoreBatchThread:()=>gn,FeedbackScoreCompare:()=>Nv,FeedbackScoreCompareSource:()=>jv,FeedbackScoreExperimentItemBulkWriteView:()=>Rb,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ub,FeedbackScoreNames:()=>Vj,FeedbackScoreNamesPublic:()=>Qr,FeedbackScorePublic:()=>Uo,FeedbackScorePublicSource:()=>Gj,FeedbackScoreSource:()=>Mb,FeedbackUpdate:()=>tE,FindAgentInsightsIssuesRequestSeverity:()=>sc,FindAgentInsightsIssuesRequestStatus:()=>pc,FindFeedbackDefinitionsRequestType:()=>Vc,FindFeedbackScoreNames1RequestType:()=>Cl,FindReportFailuresRequestType:()=>dl,Function:()=>Fi,FunctionCall:()=>wr,GenerateReportResponse:()=>oE,GetSpanStatsRequestType:()=>Il,GetSpansByProjectRequestType:()=>Dl,GetWebhookExamplesRequestAlertType:()=>uc,GroupContent:()=>FT,GroupContentWithAggregations:()=>DT,GroupDetail:()=>MT,GroupDetails:()=>LT,Guardrail:()=>pE,GuardrailBatch:()=>Hie,GuardrailBatchWrite:()=>Ra,GuardrailName:()=>iE,GuardrailResult:()=>nE,GuardrailWrite:()=>iR,GuardrailWriteName:()=>eR,GuardrailWriteResult:()=>tR,GuardrailsValidation:()=>YT,GuardrailsValidationPublic:()=>lE,IdsHolder:()=>Gie,ImageUrl:()=>Mk,ImageUrlPublic:()=>uA,ImageUrlWrite:()=>PA,ItemLockInfo:()=>dE,JsonListString:()=>le,JsonListStringCompare:()=>us,JsonListStringExperimentItemBulkWriteView:()=>er,JsonListStringPublic:()=>Ge,JsonListStringWrite:()=>Je,JsonNode:()=>V,JsonNodeCompare:()=>_v,JsonNodeDetail:()=>OR,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>Ry,KpiCardRequest:()=>Ea,KpiCardRequestEntityType:()=>el,KpiCardResponse:()=>bE,KpiMetric:()=>hE,KpiMetricType:()=>gE,ListRunnersRequestStatus:()=>Tl,LlmAsJudgeCode:()=>Fn,LlmAsJudgeCodePublic:()=>kA,LlmAsJudgeCodeWrite:()=>UA,LlmAsJudgeMessage:()=>St,LlmAsJudgeMessageContent:()=>Jk,LlmAsJudgeMessageContentPublic:()=>yA,LlmAsJudgeMessageContentWrite:()=>TA,LlmAsJudgeMessagePublic:()=>jt,LlmAsJudgeMessagePublicRole:()=>RA,LlmAsJudgeMessageRole:()=>Gk,LlmAsJudgeMessageWrite:()=>It,LlmAsJudgeMessageWriteRole:()=>EA,LlmAsJudgeModelParameters:()=>vt,LlmAsJudgeModelParametersPublic:()=>Et,LlmAsJudgeModelParametersWrite:()=>Dt,LlmAsJudgeOutputSchema:()=>Tt,LlmAsJudgeOutputSchemaPublic:()=>Ct,LlmAsJudgeOutputSchemaPublicType:()=>wA,LlmAsJudgeOutputSchemaType:()=>Kk,LlmAsJudgeOutputSchemaWrite:()=>Ut,LlmAsJudgeOutputSchemaWriteType:()=>IA,LocalRunner:()=>Cs,LocalRunnerHeartbeatRequest:()=>qa,LocalRunnerHeartbeatResponse:()=>AE,LocalRunnerJob:()=>_t,LocalRunnerJobMetadata:()=>Xa,LocalRunnerJobPage:()=>PE,LocalRunnerJobResultRequest:()=>en,LocalRunnerJobResultRequestStatus:()=>wl,LocalRunnerJobStatus:()=>bx,LocalRunnerLogEntry:()=>rn,LocalRunnerPage:()=>zE,LocalRunnerStatus:()=>RE,LocalRunnerType:()=>wE,LockResponse:()=>SE,LocksResponse:()=>vE,LogItem:()=>EE,LogItemLevel:()=>TE,LogPage:()=>IE,LogProb:()=>Kz,LogProbs:()=>Qz,ManualEvaluationRequest:()=>Is,ManualEvaluationRequestEntityType:()=>DE,ManualEvaluationResponse:()=>Ds,Message:()=>Bi,MultipartUploadPart:()=>MS,NumericalFeedbackDefinition:()=>yj,NumericalFeedbackDefinitionCreate:()=>_j,NumericalFeedbackDefinitionPublic:()=>js,NumericalFeedbackDefinitionUpdate:()=>qj,NumericalFeedbackDetail:()=>fj,NumericalFeedbackDetailCreate:()=>xj,NumericalFeedbackDetailPublic:()=>zj,NumericalFeedbackDetailUpdate:()=>Xj,OAuthError:()=>Oie,OllamaConnectionTestResponse:()=>Am,OllamaInstanceBaseUrlRequest:()=>Pm,OllamaModel:()=>wR,OllieReport:()=>BE,OllieReportPage:()=>WE,OllieReportStatus:()=>NE,Optimization:()=>Kie,OptimizationPagePublic:()=>Ns,OptimizationPublic:()=>Us,OptimizationPublicStatus:()=>oC,OptimizationStatus:()=>LE,OptimizationStudioConfig:()=>rC,OptimizationStudioConfigPublic:()=>yC,OptimizationStudioConfigWrite:()=>CC,OptimizationStudioLog:()=>DC,OptimizationUpdate:()=>va,OptimizationUpdateStatus:()=>Yc,OptimizationWrite:()=>zm,OptimizationWriteStatus:()=>UC,PageColumns:()=>FC,Param:()=>mw,ParamPresence:()=>cw,PercentageValueStatPublic:()=>BC,PercentageValues:()=>zr,PercentageValuesDetailed:()=>WC,PercentageValuesPublic:()=>Ss,Permission:()=>VC,Project:()=>$ie,ProjectDetailed:()=>$C,ProjectDetailedVisibility:()=>OC,ProjectMetricRequestPublic:()=>Ia,ProjectMetricRequestPublicInterval:()=>rl,ProjectMetricRequestPublicMetricType:()=>tl,ProjectMetricResponsePublic:()=>rI,ProjectMetricResponsePublicInterval:()=>QC,ProjectMetricResponsePublicMetricType:()=>XC,ProjectPagePublic:()=>aI,ProjectPublic:()=>Fs,ProjectPublicVisibility:()=>tI,ProjectReference:()=>mA,ProjectReferencePublic:()=>ts,ProjectRetrieveDetailed:()=>Da,ProjectStatItemObjectPublic:()=>sI,ProjectStatsPublic:()=>Yr,ProjectStatsSummary:()=>mI,ProjectStatsSummaryItem:()=>cI,ProjectUpdate:()=>Ua,ProjectUpdateVisibility:()=>ol,ProjectVisibility:()=>HC,ProjectWrite:()=>Na,ProjectWriteVisibility:()=>il,Prompt:()=>Qie,PromptDetail:()=>vm,PromptDetailTemplateStructure:()=>kI,PromptPagePublic:()=>Bs,PromptPublic:()=>SI,PromptPublicTemplateStructure:()=>PI,PromptTemplateStructure:()=>dI,PromptTokensDetails:()=>rS,PromptType:()=>gI,PromptUpdatable:()=>Ma,PromptVariant:()=>mb,PromptVersion:()=>Sm,PromptVersionBatchUpdate:()=>Wa,PromptVersionCommitsRequestPublic:()=>La,PromptVersionDetail:()=>De,PromptVersionDetailTemplateStructure:()=>$R,PromptVersionDetailType:()=>YR,PromptVersionDetailVersionType:()=>ZR,PromptVersionEnvironmentUpdate:()=>Va,PromptVersionIdsRequestDetail:()=>Ja,PromptVersionLink:()=>Hr,PromptVersionLinkPublic:()=>_o,PromptVersionLinkWrite:()=>Fc,PromptVersionPagePublic:()=>FI,PromptVersionPublic:()=>UI,PromptVersionPublicTemplateStructure:()=>TI,PromptVersionPublicType:()=>EI,PromptVersionPublicVersionType:()=>II,PromptVersionRetrieveDetail:()=>Ha,PromptVersionTemplateStructure:()=>hI,PromptVersionType:()=>bI,PromptVersionUpdate:()=>rx,PromptVersionVersionType:()=>xI,PromptWrite:()=>Ga,PromptWriteTemplateStructure:()=>sl,PromptWriteType:()=>pl,ProviderApiKey:()=>Yie,ProviderApiKeyPagePublic:()=>KI,ProviderApiKeyProvider:()=>BI,ProviderApiKeyPublic:()=>Ms,ProviderApiKeyPublicProvider:()=>WI,ProviderApiKeyUpdate:()=>wa,ProviderApiKeyWrite:()=>_a,ProviderApiKeyWriteProvider:()=>Oc,ProviderAuthCheck:()=>ka,ProviderAuthConfig:()=>Rt,ProviderAuthConfigPublic:()=>HI,ProviderAuthConfigPublicSendAs:()=>VI,ProviderAuthConfigSendAs:()=>cR,ProviderAuthConfigWrite:()=>fR,ProviderAuthConfigWriteSendAs:()=>uR,RecentActivityItemPublic:()=>YI,RecentActivityItemPublicType:()=>$I,RecentActivityPagePublic:()=>ZI,ReportCompleteRequest:()=>Oa,ReportCompleteRequestStatus:()=>gl,ReportFailure:()=>Ws,ReportFailurePage:()=>tD,ReportFailureType:()=>qI,ReportPreference:()=>Ls,ReportedIssue:()=>jh,ReportedIssueSeverity:()=>vh,Request:()=>vi,Response:()=>oD,ResponseFormat:()=>ky,ResponseFormatType:()=>wy,Result:()=>vr,ResultsNumberPublic:()=>qC,RetentionRulePagePublic:()=>cD,RetentionRulePublic:()=>No,RetentionRulePublicLevel:()=>iD,RetentionRulePublicRetention:()=>nD,RetentionRuleWrite:()=>Ka,RetentionRuleWriteRetention:()=>hl,RevokeRequest:()=>za,ScopedAnalyticsQueryRequest:()=>ln,ScoreCondition:()=>ey,ScoreConditionOperator:()=>Zh,ScoreConditionPublic:()=>O_,ScoreConditionPublicOperator:()=>H_,ScoreConditionWrite:()=>Lh,ScoreConditionWriteOperator:()=>Mh,ScoreName:()=>Wj,ScoreNamePublic:()=>Jj,ServiceTogglesConfig:()=>lD,Span:()=>Ps,SpanBatch:()=>Xie,SpanBatchUpdate:()=>on,SpanBatchWrite:()=>sn,SpanEnrichmentOptions:()=>Dy,SpanExperimentItemBulkWriteView:()=>Pb,SpanExperimentItemBulkWriteViewSource:()=>wb,SpanExperimentItemBulkWriteViewType:()=>kb,SpanFilter:()=>tr,SpanFilterOperator:()=>ow,SpanFilterPublic:()=>Ar,SpanFilterPublicOperator:()=>DR,SpanFilterWrite:()=>os,SpanFilterWriteOperator:()=>cP,SpanLlmAsJudgeCode:()=>Bn,SpanLlmAsJudgeCodePublic:()=>GA,SpanLlmAsJudgeCodeWrite:()=>mP,SpanPagePublic:()=>hD,SpanPublic:()=>Vs,SpanPublicSource:()=>mD,SpanPublicType:()=>uD,SpanSearchStreamRequestPublic:()=>pn,SpanSearchStreamRequestPublicExcludeItem:()=>jl,SpanSearchStreamRequestPublicType:()=>El,SpanSource:()=>HT,SpanType:()=>OT,SpanUpdate:()=>tn,SpanUpdateSource:()=>wx,SpanUpdateType:()=>kx,SpanUserDefinedMetricPythonCode:()=>Mn,SpanUserDefinedMetricPythonCodePublic:()=>KA,SpanUserDefinedMetricPythonCodeWrite:()=>fP,SpanWrite:()=>nn,SpanWriteSource:()=>zx,SpanWriteType:()=>vx,SpansCountResponse:()=>RD,StartMultipartUploadRequest:()=>Ni,StartMultipartUploadRequestEntityType:()=>Rc,StartMultipartUploadResponse:()=>xD,StreamOptions:()=>Py,StudioEvaluation:()=>GE,StudioEvaluationPublic:()=>sC,StudioEvaluationWrite:()=>_C,StudioLlmModel:()=>KE,StudioLlmModelPublic:()=>cC,StudioLlmModelWrite:()=>AC,StudioMessage:()=>XE,StudioMessagePublic:()=>uC,StudioMessageWrite:()=>vC,StudioMetric:()=>JE,StudioMetricPublic:()=>aC,StudioMetricWrite:()=>xC,StudioOptimizer:()=>QE,StudioOptimizerPublic:()=>mC,StudioOptimizerWrite:()=>zC,StudioPrompt:()=>qE,StudioPromptPublic:()=>fC,StudioPromptWrite:()=>jC,TokenRequest:()=>Sa,TokenResponse:()=>wD,TokenUsageNames:()=>Js,Tool:()=>Ty,ToolCall:()=>In,ToolCallType:()=>Rk,ToolType:()=>Sy,Trace:()=>zs,TraceBatch:()=>Zie,TraceBatchUpdate:()=>hn,TraceBatchWrite:()=>bn,TraceCountResponse:()=>AD,TraceEnrichmentOptions:()=>Ny,TraceExperimentItemBulkWriteView:()=>Tb,TraceExperimentItemBulkWriteViewSource:()=>Sb,TraceFilter:()=>Sr,TraceFilterOperator:()=>Qk,TraceFilterPublic:()=>Pr,TraceFilterPublicOperator:()=>NR,TraceFilterWrite:()=>Yn,TraceFilterWriteOperator:()=>FA,TracePagePublic:()=>jD,TracePublic:()=>Hs,TracePublicSource:()=>PD,TracePublicVisibilityMode:()=>SD,TraceSearchStreamRequestPublic:()=>Rn,TraceSearchStreamRequestPublicExcludeItem:()=>Fl,TraceSource:()=>ZT,TraceThread:()=>Gs,TraceThreadBatchIdentifier:()=>xn,TraceThreadBatchUpdate:()=>_n,TraceThreadFilter:()=>rr,TraceThreadFilterOperator:()=>$x,TraceThreadFilterPublic:()=>xt,TraceThreadFilterPublicOperator:()=>BR,TraceThreadFilterWrite:()=>is,TraceThreadFilterWriteOperator:()=>RP,TraceThreadIdentifier:()=>jm,TraceThreadLlmAsJudgeCode:()=>Wn,TraceThreadLlmAsJudgeCodePublic:()=>QA,TraceThreadLlmAsJudgeCodeWrite:()=>wP,TraceThreadPage:()=>DD,TraceThreadSearchStreamRequest:()=>kn,TraceThreadStatus:()=>ED,TraceThreadUpdate:()=>wn,TraceThreadUserDefinedMetricPythonCode:()=>Ln,TraceThreadUserDefinedMetricPythonCodePublic:()=>XA,TraceThreadUserDefinedMetricPythonCodeWrite:()=>PP,TraceUpdate:()=>fn,TraceUpdateSource:()=>Wx,TraceVisibilityMode:()=>ej,TraceWrite:()=>yn,TraceWriteSource:()=>Jx,UploadAttachmentRequestEntityType:()=>kc,Usage:()=>oS,UsageByWorkspaceProjectUserResponse:()=>FD,UserDefinedMetricPythonCode:()=>Vn,UserDefinedMetricPythonCodePublic:()=>qA,UserDefinedMetricPythonCodeWrite:()=>OP,ValidatedToken:()=>BD,ValueEntry:()=>Jb,ValueEntryCompare:()=>Dv,ValueEntryCompareSource:()=>Cv,ValueEntryExperimentItemBulkWriteView:()=>yb,ValueEntryExperimentItemBulkWriteViewSource:()=>fb,ValueEntryPublic:()=>Qj,ValueEntryPublicSource:()=>Kj,ValueEntrySource:()=>Lb,VideoUrl:()=>Lk,VideoUrlPublic:()=>fA,VideoUrlWrite:()=>SA,Webhook:()=>m_,WebhookExamples:()=>MD,WebhookPublic:()=>k_,WebhookTestResult:()=>VD,WebhookTestResultStatus:()=>WD,WebhookWrite:()=>N_,WelcomeWizardSubmission:()=>An,WelcomeWizardTracking:()=>JD,WorkspaceConfiguration:()=>Os,WorkspaceInfo:()=>Dk,WorkspaceMetricRequest:()=>qie,WorkspaceMetricResponse:()=>Ks,WorkspaceMetricsSummaryRequest:()=>Fo,WorkspaceMetricsSummaryResponse:()=>HD,WorkspaceNameHolder:()=>GD,WorkspaceProjectUserCount:()=>UD,WorkspaceSpanMetricRequest:()=>Pn,WorkspaceSpanMetricRequestInterval:()=>Wl,WorkspaceSpanMetricRequestMetricType:()=>Ll,WorkspaceSpansCount:()=>yD,WorkspaceTokenUsageNamesRequest:()=>zn,WorkspaceTraceCount:()=>_D,WorkspaceUserPermissions:()=>OD,agentConfigs:()=>ac,agentInsights:()=>cc,agentInsightsEnrollment:()=>lc,agentInsightsJobs:()=>dc,alerts:()=>gc,annotationQueues:()=>hc,assertionResults:()=>bc,attachments:()=>mo,chatCompletions:()=>zc,datasets:()=>ho,environments:()=>Ic,experiments:()=>Lc,feedbackDefinitions:()=>Jc,guardrails:()=>Hc,llmModels:()=>bo,llmProviderKey:()=>Kc,mcpOAuth:()=>$c,ollama:()=>Ro,optimizations:()=>Xc,pairing:()=>qc,projects:()=>al,prompts:()=>wt,reportFailures:()=>ul,reports:()=>fl,retentionRules:()=>yl,runners:()=>ur,spans:()=>Ul,systemAnalyticsQueries:()=>Nl,traces:()=>Bl,welcomeWizard:()=>Ml,workspaces:()=>Vl});var te=n(()=>{Z9();T3();});var Em,j3=n(()=>{Z();$();b();Q();q();J();te();oe();Em=class{constructor(o={}){this._options=M(o);}createAgentConfig(o,e){return P.fromPromise(this.__createAgentConfig(o,e))}async __createAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(o,e){return P.fromPromise(this.__updateAgentConfig(o,e))}async __updateAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(o,e,t={},i){return P.fromPromise(this.__createBlueprintFromMask(o,e,t,i))}async __createBlueprintFromMask(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/masks/${_.encodePathParam(e)}`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/agent-configs/blueprints/projects/{project_id}/masks/{mask_id}")}createOrUpdateEnvs(o,e){return P.fromPromise(this.__createOrUpdateEnvs(o,e))}async __createOrUpdateEnvs(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ai.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(o,e,t={},i){return P.fromPromise(this.__getBlueprintByEnv(o,e,t,i))}async __getBlueprintByEnv(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:zt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}setEnvByBlueprintName(o,e,t,i){return P.fromPromise(this.__setEnvByBlueprintName(o,e,t,i))}async __setEnvByBlueprintName(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ki.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}deleteEnv(o,e,t={},i){return P.fromPromise(this.__deleteEnv(o,e,t,i))}async __deleteEnv(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"DELETE",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===401?new O(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"DELETE","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}getBlueprintById(o,e={},t){return P.fromPromise(this.__getBlueprintById(o,e,t))}async __getBlueprintById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:zt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}")}getBlueprintByName(o,e,t={},i){return P.fromPromise(this.__getBlueprintByName(o,e,t,i))}async __getBlueprintByName(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/names/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:zt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/projects/{project_id}/names/{name}")}getBlueprintHistory(o,e={},t){return P.fromPromise(this.__getBlueprintHistory(o,e,t))}async __getBlueprintHistory(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/history/projects/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:az.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/history/projects/{project_id}")}getDeltaById(o,e={},t){return P.fromPromise(this.__getDeltaById(o,e,t))}async __getDeltaById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}/deltas`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:zt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}/deltas")}getLatestBlueprint(o,e={},t){return P.fromPromise(this.__getLatestBlueprint(o,e,t))}async __getLatestBlueprint(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/latest/projects/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:zt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/latest/projects/{project_id}")}removeConfigKeys(o,e){return P.fromPromise(this.__removeConfigKeys(o,e))}async __removeConfigKeys(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===401?new O(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var Cm,E3=n(()=>{Z();$();b();Q();q();J();te();oe();Cm=class{constructor(o={}){this._options=M(o);}findAgentInsightsIssues(o,e){return P.fromPromise(this.__findAgentInsightsIssues(o,e))}async __findAgentInsightsIssues(o,e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,fromDate:i,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=o,d={project_id:t,from_date:i,to_date:a,status:s!=null?pc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?sc.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l,page:m,size:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/agent-insights/issues"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Gw.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new N(g.error.body,g.rawResponse);case 401:throw new O(g.error.body,g.rawResponse);default:throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}return j(g.error,g.rawResponse,"GET","/v1/private/agent-insights/issues")}reportAgentInsightsIssues(o,e){return P.fromPromise(this.__reportAgentInsightsIssues(o,e))}async __reportAgentInsightsIssues(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-insights/issues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Si.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(o,e,t){return P.fromPromise(this.__getAgentInsightsIssueById(o,e,t))}async __getAgentInsightsIssueById(o,e,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,fromDate:a,toDate:s}=e,c={project_id:i,from_date:a,to_date:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Yw.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 401:throw new O(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/private/agent-insights/issues/{issue_id}")}updateAgentInsightsIssue(o,e,t){return P.fromPromise(this.__updateAgentInsightsIssue(o,e,t))}async __updateAgentInsightsIssue(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/issues/{issue_id}")}};});var Im,C3=n(()=>{Z();$();b();Q();q();J();te();Im=class{constructor(o={}){this._options=M(o);}enrolProjectsInAutoFirstRun(o,e){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(o,e))}async __enrolProjectsInAutoFirstRun(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/agent-insights/enrollment"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:oD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var Dm,I3=n(()=>{Z();$();b();Q();q();J();te();oe();Dm=class{constructor(o={}){this._options=M(o);}getAgentInsightsJob(o,e={},t){return P.fromPromise(this.__getAgentInsightsJob(o,e,t))}async __getAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/agent-insights/jobs/{projectId}")}createAgentInsightsJob(o,e={},t){return P.fromPromise(this.__createAgentInsightsJob(o,e,t))}async __createAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}")}updateAgentInsightsJob(o,e,t){return P.fromPromise(this.__updateAgentInsightsJob(o,e,t))}async __updateAgentInsightsJob(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/jobs/{projectId}")}triggerAgentInsightsJob(o,e={},t){return P.fromPromise(this.__triggerAgentInsightsJob(o,e,t))}async __triggerAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}/trigger`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}/trigger")}};});var Um,D3=n(()=>{Z();$();b();Q();q();J();te();oe();Um=class{constructor(o={}){this._options=M(o);}findAlerts(o={},e){return P.fromPromise(this.__findAlerts(o,e))}async __findAlerts(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,sorting:a,filters:s}=o,c={page:t,size:i,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Tn.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/alerts")}createAlert(o,e){return P.fromPromise(this.__createAlert(o,e))}async __createAlert(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(o,e){return P.fromPromise(this.__deleteAlertBatch(o,e))}async __deleteAlertBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(o,e={},t){return P.fromPromise(this.__getAlertById(o,e,t))}async __getAlertById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/alerts/{id}")}updateAlert(o,e,t){return P.fromPromise(this.__updateAlert(o,e,t))}async __updateAlert(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);case 422:throw new ae(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/alerts/{id}")}getWebhookExamples(o={},e){return P.fromPromise(this.__getWebhookExamples(o,e))}async __getWebhookExamples(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=o,i={alert_type:t!=null?uc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:MD.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/alerts/webhooks/examples")}testWebhook(o,e){return P.fromPromise(this.__testWebhook(o,e))}async __testWebhook(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:VD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var Nm,U3=n(()=>{Z();$();b();Q();q();J();te();oe();Nm=class{constructor(o={}){this._options=M(o);}addItemsToAnnotationQueue(o,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(o,e,t))}async __addItemsToAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Gl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/add")}findAnnotationQueues(o={},e){return P.fromPromise(this.__findAnnotationQueues(o,e))}async __findAnnotationQueues(o={},e){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:i,name:a,filters:s,sorting:c}=o,l={page:t,size:i,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:lk.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/annotation-queues")}createAnnotationQueue(o,e){return P.fromPromise(this.__createAnnotationQueue(o,e))}async __createAnnotationQueue(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(o,e){return P.fromPromise(this.__createAnnotationQueueBatch(o,e))}async __createAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ei.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(o,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(o,e))}async __deleteAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(o,e={},t){return P.fromPromise(this.__getAnnotationQueueById(o,e,t))}async __getAnnotationQueueById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{id}")}updateAnnotationQueue(o,e={},t){return P.fromPromise(this.__updateAnnotationQueue(o,e,t))}async __updateAnnotationQueue(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Di.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/annotation-queues/{id}")}getAnnotationQueueLocks(o,e={},t){return P.fromPromise(this.__getAnnotationQueueLocks(o,e,t))}async __getAnnotationQueueLocks(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/locks`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{queueId}/locks")}lockAnnotationQueueItem(o,e,t={},i){return P.fromPromise(this.__lockAnnotationQueueItem(o,e,t,i))}async __lockAnnotationQueueItem(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/${_.encodePathParam(e)}/lock`),method:"PUT",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:SE.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/annotation-queues/{queueId}/items/{itemId}/lock")}removeItemsFromAnnotationQueue(o,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(o,e,t))}async __removeItemsFromAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Gl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/delete")}searchAnnotationQueueItems(o,e,t){return P.fromPromise(this.__searchAnnotationQueueItems(o,e,t))}async __searchAnnotationQueueItems(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/search`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ci.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ik.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/search")}};});var Fm,N3=n(()=>{Z();$();b();Q();q();J();te();Fm=class{constructor(o={}){this._options=M(o);}storeAssertionsBatch(o,e){return P.fromPromise(this.__storeAssertionsBatch(o,e))}async __storeAssertionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ui.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/assertion-results")}};});var Bm,F3=n(()=>{Z();$();b();Q();q();J();te();oe();Bm=class{constructor(o={}){this._options=M(o);}attachmentList(o,e){return P.fromPromise(this.__attachmentList(o,e))}async __attachmentList(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,projectId:a,entityType:s,entityId:c,path:l}=o,m={page:t,size:i,project_id:a,entity_type:wc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Pk.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/list")}completeMultiPartUpload(o,e){return P.fromPromise(this.__completeMultiPartUpload(o,e))}async __completeMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(o,e){return P.fromPromise(this.__deleteAttachments(o,e))}async __deleteAttachments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(o,e){return P.fromPromise(this.__downloadAttachment(o,e))}async __downloadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{workspaceName:t,containerId:i,entityType:a,entityId:s,fileName:c,mimeType:l}=o,m={workspace_name:t,container_id:i,entity_type:_c.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:s,file_name:c,mime_type:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:d.body,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/download")}startMultiPartUpload(o,e){return P.fromPromise(this.__startMultiPartUpload(o,e))}async __startMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ni.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(o,e){return P.fromPromise(this.__uploadAttachment(o,e))}async __uploadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{fileName:t,projectName:i,mimeType:a,entityType:s,entityId:c,body:l}=o,m={file_name:t,project_name:i,mime_type:a,entity_type:kc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:mo.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"PUT","/v1/private/attachment/upload")}};});var Mm,B3=n(()=>{Z();$();b();Q();q();J();te();Mm=class{constructor(o={}){this._options=M(o);}findEvaluators(o={},e){return P.fromPromise(this.__findEvaluators(o,e))}async __findEvaluators(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{projectId:t,id:i,name:a,filters:s,sorting:c,page:l,size:m}=o,u={project_id:t,id:i,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:oP.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/automations/evaluators")}createAutomationRuleEvaluator(o,e){return P.fromPromise(this.__createAutomationRuleEvaluator(o,e))}async __createAutomationRuleEvaluator(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ez.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(o,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(o,e))}async __deleteAutomationRuleEvaluatorBatch(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:i}=o,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:de.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(o,e={},t){return P.fromPromise(this.__getEvaluatorById(o,e,t))}async __getEvaluatorById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:i}=e,a={project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:pP.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}")}updateAutomationRuleEvaluator(o,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(o,e,t))}async __updateAutomationRuleEvaluator(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:GP.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/automations/evaluators/{id}")}getEvaluatorLogsById(o,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(o,e,t))}async __getEvaluatorLogsById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:i}=e,a={size:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:IE.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}/logs")}};});var Wm,M3=n(()=>{Z();$();b();Q();q();J();te();Wm=class{constructor(o={}){this._options=M(o);}createChatCompletions(o={},e){return P.fromPromise(this.__createChatCompletions(o,e))}async __createChatCompletions(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Mi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:aS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/chat/completions")}};});var Lm,W3=n(()=>{Z();$();b();Q();q();J();te();oe();Lm=class{constructor(o={}){this._options=M(o);}access(o,e){return P.fromPromise(this.__access(o,e))}async __access(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ck.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(o){return P.fromPromise(this.__getWorkspaceName(o))}async __getWorkspaceName(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/auth/workspace"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:GD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 403:throw new fe(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/auth/workspace")}};});var Vm,L3=n(()=>{Z();$();b();Q();q();J();te();oe();Vm=class{constructor(o={}){this._options=M(o);}findDashboards(o={},e){return P.fromPromise(this.__findDashboards(o,e))}async __findDashboards(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/dashboards")}createDashboard(o,e){return P.fromPromise(this.__createDashboard(o,e))}async __createDashboard(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(o,e={},t){return P.fromPromise(this.__getDashboardById(o,e,t))}async __getDashboardById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/dashboards/{dashboardId}")}deleteDashboard(o,e={},t){return P.fromPromise(this.__deleteDashboard(o,e,t))}async __deleteDashboard(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/dashboards/{dashboardId}")}updateDashboard(o,e,t){return P.fromPromise(this.__updateDashboard(o,e,t))}async __updateDashboard(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ps.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(o,e){return P.fromPromise(this.__deleteDashboardsBatch(o,e))}async __deleteDashboardsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards/delete-batch")}};});var Jm,V3=n(()=>{Z();$();b();Mr();Q();q();J();te();oe();Jm=class{constructor(o={}){this._options=M(o);}applyDatasetItemChanges(o,e,t){return P.fromPromise(this.__applyDatasetItemChanges(o,e,t))}async __applyDatasetItemChanges(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:i,body:a}=e,s={override:i},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:yv.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:$r.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new X(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"POST","/v1/private/datasets/{id}/items/changes")}batchUpdateDatasetItems(o,e){return P.fromPromise(this.__batchUpdateDatasetItems(o,e))}async __batchUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(o={},e){return P.fromPromise(this.__findDatasets(o,e))}async __findDatasets(o={},e){var y,w,A,C,I,D,F,B,Y,ne,we;let{page:t,size:i,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=o,f={page:t,size:i,with_experiments_only:a,with_optimizations_only:s,prompt_id:c,project_id:l,name:m,sorting:u,filters:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((B=(F=e==null?void 0:e.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?B:60)*1e3,maxRetries:(ne=e==null?void 0:e.maxRetries)!=null?ne:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:Rs.parseOrThrow(h.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:h.rawResponse};if(h.error.reason==="status-code")throw new k({statusCode:h.error.statusCode,body:h.error.body,rawResponse:h.rawResponse});return j(h.error,h.rawResponse,"GET","/v1/private/datasets")}createDataset(o,e){return P.fromPromise(this.__createDataset(o,e))}async __createDataset(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ta.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(o,e){return P.fromPromise(this.__createOrUpdateDatasetItems(o,e))}async __createOrUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:$i.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(o,e){return P.fromPromise(this.__createDatasetItemsFromCsv(o,e))}async __createDatasetItemsFromCsv(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await sh();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId);let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-csv")}createDatasetItemsFromJson(o,e){return P.fromPromise(this.__createDatasetItemsFromJson(o,e))}async __createDatasetItemsFromJson(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await sh();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId),t.append("format",Cc.jsonOrThrow(o.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-json"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-json")}createDatasetItemsFromSpans(o,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(o,e,t))}async __createDatasetItemsFromSpans(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-spans`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(o,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(o,e,t))}async __createDatasetItemsFromTraces(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-traces`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Li.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(o,e={},t){return P.fromPromise(this.__getDatasetById(o,e,t))}async __getDatasetById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Eo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}")}updateDataset(o,e,t){return P.fromPromise(this.__updateDataset(o,e,t))}async __updateDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Xi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(o,e={},t){return P.fromPromise(this.__deleteDataset(o,e,t))}async __deleteDataset(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/datasets/{id}")}deleteDatasetByName(o,e){return P.fromPromise(this.__deleteDatasetByName(o,e))}async __deleteDatasetByName(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(o={},e){return P.fromPromise(this.__deleteDatasetItems(o,e))}async __deleteDatasetItems(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Yi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(o,e){return P.fromPromise(this.__deleteDatasetsBatch(o,e))}async __deleteDatasetsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(o,e={},t){return P.fromPromise(this.__downloadDatasetExport(o,e,t))}async __downloadDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/download`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,responseType:"streaming",timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:a.body,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}/download")}expandDataset(o,e,t){return P.fromPromise(this.__expandDataset(o,e,t))}async __expandDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/expansions`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hv.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/expansions")}findDatasetItemsWithExperimentItems(o,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(o,e,t))}async __findDatasetItemsWithExperimentItems(o,e,t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:i,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Kv.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(o,e){return P.fromPromise(this.__getDatasetByIdentifier(o,e))}async __getDatasetByIdentifier(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Hi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Eo.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(o,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(o,e,t))}async __getDatasetExperimentItemsStats(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:i,filters:a}=e,s={experiment_ids:i,filters:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/stats`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Yr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/stats")}getDatasetExportJob(o,e={},t){return P.fromPromise(this.__getDatasetExportJob(o,e,t))}async __getDatasetExportJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}")}getDatasetExportJobs(o){return P.fromPromise(this.__getDatasetExportJobs(o))}async __getDatasetExportJobs(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ho.getDatasetExportJobs.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/datasets/export-jobs")}getDatasetItemById(o,e={},t){return P.fromPromise(this.__getDatasetItemById(o,e,t))}async __getDatasetItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ys.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/items/{itemId}")}patchDatasetItem(o,e,t){return P.fromPromise(this.__patchDatasetItem(o,e,t))}async __patchDatasetItem(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ki.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/items/{itemId}")}getDatasetItems(o,e={},t){return P.fromPromise(this.__getDatasetItems(o,e,t))}async __getDatasetItems(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,version:s,filters:c,truncate:l}=e,m={page:i,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:nT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/datasets/{id}/items")}getDatasetItemsOutputColumns(o,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(o,e,t))}async __getDatasetItemsOutputColumns(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:i}=e,a={experiment_ids:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/output/columns`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:FC.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/output/columns")}markDatasetExportJobViewed(o,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(o,e,t))}async __markDatasetExportJobViewed(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/mark-viewed`),method:"PUT",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/export-jobs/{jobId}/mark-viewed")}startDatasetExport(o,e={},t){return P.fromPromise(this.__startDatasetExport(o,e,t))}async __startDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/export`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(o,e){return P.fromPromise(this.__streamDatasetItems(o,e))}async __streamDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(o,e={},t){return P.fromPromise(this.__compareDatasetVersions(o,e,t))}async __compareDatasetVersions(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/diff`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hT.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}/versions/diff")}createVersionTag(o,e,t,i){return P.fromPromise(this.__createVersionTag(o,e,t,i))}async __createVersionTag(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ea.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/datasets/{id}/versions/hash/{versionHash}/tags")}deleteVersionTag(o,e,t,i={},a){return P.fromPromise(this.__deleteVersionTag(o,e,t,i,a))}async __deleteVersionTag(o,e,t,i={},a){var l,m,u,d,f,g,h,y,w,A,C;let s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=a==null?void 0:a.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),a==null?void 0:a.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(o,e={},t){return P.fromPromise(this.__listDatasetVersions(o,e,t))}async __listDatasetVersions(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:bT.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw l.error.statusCode===400?new N(l.error.body,l.rawResponse):new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/versions")}restoreDatasetVersion(o,e,t){return P.fromPromise(this.__restoreDatasetVersion(o,e,t))}async __restoreDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/restore`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:$r.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/restore")}retrieveDatasetVersion(o,e,t){return P.fromPromise(this.__retrieveDatasetVersion(o,e,t))}async __retrieveDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/retrieve`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:$r.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(o,e,t={},i){return P.fromPromise(this.__updateDatasetVersion(o,e,t,i))}async __updateDatasetVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ra.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Hm,J3=n(()=>{Z();$();b();Q();q();J();te();oe();Hm=class{constructor(o={}){this._options=M(o);}findEnvironments(o){return P.fromPromise(this.__findEnvironments(o))}async __findEnvironments(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/environments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_T.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/environments")}createEnvironment(o,e){return P.fromPromise(this.__createEnvironment(o,e))}async __createEnvironment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(o,e){return P.fromPromise(this.__deleteEnvironmentsBatch(o,e))}async __deleteEnvironmentsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(o,e={},t){return P.fromPromise(this.__getEnvironmentById(o,e,t))}async __getEnvironmentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ws.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/environments/{id}")}updateEnvironment(o,e={},t){return P.fromPromise(this.__updateEnvironment(o,e,t))}async __updateEnvironment(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:oa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/environments/{id}")}};});var Gm,H3=n(()=>{Z();$();b();Q();q();J();te();oe();Gm=class{constructor(o={}){this._options=M(o);}batchUpdateExperiments(o,e){return P.fromPromise(this.__batchUpdateExperiments(o,e))}async __batchUpdateExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/experiments/batch")}findExperiments(o={},e){return P.fromPromise(this.__findExperiments(o,e))}async __findExperiments(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Br,ci;let{page:t,size:i,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=o,A={page:t,size:i,datasetId:a,optimization_id:s,types:c,name:l,dataset_deleted:m,prompt_id:u,project_id:d,project_deleted:f,sorting:g,filters:h,experiment_ids:y,force_sorting:w},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Br=e==null?void 0:e.maxRetries)!=null?Br:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ci=this._options)==null?void 0:ci.fetch,logging:this._options.logging});if(I.ok)return {data:Ts.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw I.error.statusCode===400?new N(I.error.body,I.rawResponse):new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/experiments")}createExperiment(o,e){return P.fromPromise(this.__createExperiment(o,e))}async __createExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(o,e){return P.fromPromise(this.__createExperimentItems(o,e))}async __createExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(o,e){return P.fromPromise(this.__deleteExperimentItems(o,e))}async __deleteExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(o,e){return P.fromPromise(this.__deleteExperimentsById(o,e))}async __deleteExperimentsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(o,e){return P.fromPromise(this.__executeExperiment(o,e))}async __executeExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ca.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:IT.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(o,e){return P.fromPromise(this.__experimentItemsBulk(o,e))}async __experimentItemsBulk(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(o={},e){return P.fromPromise(this.__findFeedbackScoreNames(o,e))}async __findFeedbackScoreNames(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:i}=o,a={experiment_ids:t,project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Qr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/experiments/feedback-scores/names")}findExperimentGroups(o={},e){return P.fromPromise(this.__findExperimentGroups(o,e))}async __findExperimentGroups(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:JT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups")}findExperimentGroupsAggregations(o={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(o,e))}async __findExperimentGroupsAggregations(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:NT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups/aggregations")}finishExperiments(o,e){return P.fromPromise(this.__finishExperiments(o,e))}async __finishExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(o,e={},t){return P.fromPromise(this.__getExperimentById(o,e,t))}async __getExperimentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/{id}")}updateExperiment(o,e,t){return P.fromPromise(this.__updateExperiment(o,e,t))}async __updateExperiment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/experiments/{id}")}getExperimentItemById(o,e={},t){return P.fromPromise(this.__getExperimentItemById(o,e,t))}async __getExperimentItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/items/{id}")}streamExperimentItems(o,e){return P.fromPromise(this.__streamExperimentItems(o,e))}async __streamExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(o,e){return P.fromPromise(this.__streamExperiments(o,e))}async __streamExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ya.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/stream")}};});var Om,G3=n(()=>{Z();$();b();Q();q();J();te();oe();Om=class{constructor(o={}){this._options=M(o);}findFeedbackDefinitions(o={},e){return P.fromPromise(this.__findFeedbackDefinitions(o,e))}async __findFeedbackDefinitions(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,type:s}=o,c={page:t,size:i,name:a,type:s!=null?Vc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Ej.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/feedback-definitions")}createFeedbackDefinition(o,e){return P.fromPromise(this.__createFeedbackDefinition(o,e))}async __createFeedbackDefinition(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pj.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(o,e,t))}async __getFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ij.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/feedback-definitions/{id}")}updateFeedbackDefinition(o,e,t){return P.fromPromise(this.__updateFeedbackDefinition(o,e,t))}async __updateFeedbackDefinition(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:tE.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(o,e,t))}async __deleteFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionsBatch(o,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(o,e))}async __deleteFeedbackDefinitionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Km,O3=n(()=>{Z();$();b();Q();q();J();te();Km=class{constructor(o={}){this._options=M(o);}createGuardrails(o,e){return P.fromPromise(this.__createGuardrails(o,e))}async __createGuardrails(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/guardrails")}};});var $m,K3=n(()=>{Z();$();b();Q();q();J();te();oe();$m=class{constructor(o={}){this._options=M(o);}findInsightsViews(o={},e){return P.fromPromise(this.__findInsightsViews(o,e))}async __findInsightsViews(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/insights-views")}createInsightsView(o,e){return P.fromPromise(this.__createInsightsView(o,e))}async __createInsightsView(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(o,e={},t){return P.fromPromise(this.__getInsightsViewById(o,e,t))}async __getInsightsViewById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/insights-views/{insightsViewId}")}deleteInsightsView(o,e={},t){return P.fromPromise(this.__deleteInsightsView(o,e,t))}async __deleteInsightsView(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/insights-views/{insightsViewId}")}updateInsightsView(o,e,t){return P.fromPromise(this.__updateInsightsView(o,e,t))}async __updateInsightsView(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ps.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(o,e){return P.fromPromise(this.__deleteInsightsViewsBatch(o,e))}async __deleteInsightsViewsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views/delete-batch")}};});var Qm,$3=n(()=>{Z();$();b();Q();q();J();te();Qm=class{constructor(o={}){this._options=M(o);}getLlmModels(o){return P.fromPromise(this.__getLlmModels(o))}async __getLlmModels(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm/models"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:bo.getLlmModels.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models")}};});var Ym,Q3=n(()=>{Z();$();b();Q();q();J();te();oe();Ym=class{constructor(o={}){this._options=M(o);}deleteLlmProviderApiKeysBatch(o,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(o,e))}async __deleteLlmProviderApiKeysBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(o){return P.fromPromise(this.__findLlmProviderKeys(o))}async __findLlmProviderKeys(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:KI.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm-provider-key")}storeLlmProviderApiKey(o,e){return P.fromPromise(this.__storeLlmProviderApiKey(o,e))}async __storeLlmProviderApiKey(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(o,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(o,e,t))}async __getLlmProviderApiKeyById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ms.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/llm-provider-key/{id}")}updateLlmProviderApiKey(o,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(o,e,t))}async __updateLlmProviderApiKey(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:wa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/llm-provider-key/{id}")}testLlmProviderAuthConfig(o={},e){return P.fromPromise(this.__testLlmProviderAuthConfig(o,e))}async __testLlmProviderAuthConfig(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/auth-config/test"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Xm,Y3=n(()=>{Z();$();b();Q();q();J();te();oe();Xm=class{constructor(o={}){this._options=M(o);}evaluateSpans(o,e){return P.fromPromise(this.__evaluateSpans(o,e))}async __evaluateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(o,e){return P.fromPromise(this.__evaluateThreads(o,e))}async __evaluateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(o,e){return P.fromPromise(this.__evaluateTraces(o,e))}async __evaluateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Zm,X3=n(()=>{Z();$();b();Q();q();J();te();oe();Zm=class{constructor(o={}){this._options=M(o);}authorize(o,e){return P.fromPromise(this.__authorize(o,e))}async __authorize(o,e){var g,h,y,w,A,C,I,D,F,B,Y;let{clientId:t,redirectUri:i,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=o,u={client_id:t,redirect_uri:i,response_type:a,code_challenge:s,code_challenge_method:c,resource:l,state:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"oauth/authorize"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/oauth/authorize")}consent(o,e){return P.fromPromise(this.__consent(o,e))}async __consent(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/authorize"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(o,e){return P.fromPromise(this.__getAuthorizeContext(o,e))}async __getAuthorizeContext(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:i}=o,a={client_id:t,redirect_uri:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"oauth/authorize/context"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Nk.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/oauth/authorize/context")}getOAuthAuthorizationServerMetadata(o){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(o))}async __getOAuthAuthorizationServerMetadata(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,".well-known/oauth-authorization-server"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ik.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/.well-known/oauth-authorization-server")}registerOAuthClient(o,e){return P.fromPromise(this.__registerOAuthClient(o,e))}async __registerOAuthClient(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/register"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Aa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:_S.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===429?new Qe(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/register")}revoke(o={},e){return P.fromPromise(this.__revoke(o,e))}async __revoke(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/revoke"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:za.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/revoke")}token(o={},e){return P.fromPromise(this.__token(o,e))}async __token(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/token"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:Sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/token")}validateOAuthToken(o){return P.fromPromise(this.__validateOAuthToken(o))}async __validateOAuthToken(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"opik/auth-oauth"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:BD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/opik/auth-oauth")}};});var qm,Z3=n(()=>{Z();$();b();Q();q();J();te();oe();qm=class{constructor(o={}){this._options=M(o);}listModels(o,e){return P.fromPromise(this.__listModels(o,e))}async __listModels(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ro.listModels.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 500:throw new mt(i.error.body,i.rawResponse);case 503:throw new io(Io.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/models")}testConnection(o,e){return P.fromPromise(this.__testConnection(o,e))}async __testConnection(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Am.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 502:throw new ui(Am.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 503:throw new io(Io.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var ed,q3=n(()=>{Z();$();b();Q();q();J();oe();ed=class{constructor(o={}){this._options=M(o);}downloadOllieState(o){return P.fromPromise(this.__downloadOllieState(o))}async __downloadOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,responseType:"streaming",timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 404:throw new U(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/ollie/state")}replaceOllieState(o,e){return P.fromPromise(this.__replaceOllieState(o,e))}async __replaceOllieState(o,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await hi.toBinaryUploadRequest(o),i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,"v1/private/ollie/state"),method:"PUT",headers:i,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/ollie/state")}deleteOllieState(o){return P.fromPromise(this.__deleteOllieState(o))}async __deleteOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/ollie/state")}};});var rd,e8=n(()=>{Z();$();b();Q();q();J();rd=class{constructor(o={}){this._options=M(o);}receiveProtobufTraces(o){return P.fromPromise(this.__receiveProtobufTraces(o))}async __receiveProtobufTraces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/v1/private/otel/v1/traces")}};});var td,r8=n(()=>{Z();$();b();Q();q();J();te();oe();td=class{constructor(o={}){this._options=M(o);}findOptimizations(o={},e){return P.fromPromise(this.__findOptimizations(o,e))}async __findOptimizations(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:t,size:i,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=o,d={page:t,size:i,dataset_id:a,name:s,dataset_name:c,dataset_deleted:l,project_id:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Ns.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/optimizations")}createOptimization(o,e){return P.fromPromise(this.__createOptimization(o,e))}async __createOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(o,e){return P.fromPromise(this.__upsertOptimization(o,e))}async __upsertOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(o,e){return P.fromPromise(this.__deleteOptimizationsById(o,e))}async __deleteOptimizationsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(o,e={},t){return P.fromPromise(this.__getOptimizationById(o,e,t))}async __getOptimizationById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Us.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/{id}")}updateOptimizationsById(o,e={},t){return P.fromPromise(this.__updateOptimizationsById(o,e,t))}async __updateOptimizationsById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/optimizations/{id}")}getStudioOptimizationLogs(o,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(o,e,t))}async __getStudioOptimizationLogs(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/studio/${_.encodePathParam(o)}/logs`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:DC.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/studio/{id}/logs")}};});var od,t8=n(()=>{Z();$();b();Q();q();J();te();oe();od=class{constructor(o={}){this._options=M(o);}activatePairingSession(o,e,t){return P.fromPromise(this.__activatePairingSession(o,e,t))}async __activatePairingSession(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/pairing/sessions/${_.encodePathParam(o)}/activate`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ta.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/pairing/sessions/{sessionId}/activate")}createPairingSession(o,e){return P.fromPromise(this.__createPairingSession(o,e))}async __createPairingSession(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ja.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:HS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 429:throw new Qe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/pairing/sessions")}};});var id,o8=n(()=>{Z();$();b();Q();q();J();te();oe();id=class{constructor(o={}){this._options=M(o);}findAlertsByProject(o,e={},t){return P.fromPromise(this.__findAlertsByProject(o,e,t))}async __findAlertsByProject(o,e={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:i,size:a,sorting:s,filters:c}=e,l={page:i,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=t==null?void 0:t.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),t==null?void 0:t.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,`v1/private/projects/${_.encodePathParam(o)}/alerts`),method:"GET",headers:m,queryParameters:{...l,...t==null?void 0:t.queryParams},timeoutMs:((C=(A=t==null?void 0:t.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=t==null?void 0:t.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:Tn.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw u.error.statusCode===400?new N(u.error.body,u.rawResponse):new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/projects/{projectId}/alerts")}findDashboardsByProject(o,e={},t){return P.fromPromise(this.__findDashboardsByProject(o,e,t))}async __findDashboardsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/dashboards`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/dashboards")}findDatasetsByProject(o,e={},t){return P.fromPromise(this.__findDatasetsByProject(o,e,t))}async __findDatasetsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,d={page:i,size:a,with_experiments_only:s,with_optimizations_only:c,name:l,sorting:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Rs.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/datasets")}findExperimentsByProject(o,e={},t){return P.fromPromise(this.__findExperimentsByProject(o,e,t))}async __findExperimentsByProject(o,e={},t){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:i,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,y={page:i,size:a,datasetId:s,optimization_id:c,types:l,name:m,dataset_deleted:u,sorting:d,filters:f,experiment_ids:g,force_sorting:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=t==null?void 0:t.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),t==null?void 0:t.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,`v1/private/projects/${_.encodePathParam(o)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ne=t==null?void 0:t.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=t==null?void 0:t.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:Ts.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw A.error.statusCode===400?new N(A.error.body,A.rawResponse):new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/projects/{projectId}/experiments")}findOptimizationsByProject(o,e={},t){return P.fromPromise(this.__findOptimizationsByProject(o,e,t))}async __findOptimizationsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,d={page:i,size:a,dataset_id:s,dataset_name:c,name:l,dataset_deleted:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Ns.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/optimizations")}getPromptsByProject(o,e={},t){return P.fromPromise(this.__getPromptsByProject(o,e,t))}async __getPromptsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/prompts`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Bs.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/prompts")}findProjects(o={},e){return P.fromPromise(this.__findProjects(o,e))}async __findProjects(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,sorting:s}=o,c={page:t,size:i,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:aI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/projects")}createProject(o,e){return P.fromPromise(this.__createProject(o,e))}async __createProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Na.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects")}getProjectById(o,e={},t){return P.fromPromise(this.__getProjectById(o,e,t))}async __getProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Fs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}")}deleteProjectById(o,e={},t){return P.fromPromise(this.__deleteProjectById(o,e,t))}async __deleteProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/projects/{id}")}updateProject(o,e={},t){return P.fromPromise(this.__updateProject(o,e,t))}async __updateProject(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ua.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/projects/{id}")}deleteProjectsBatch(o,e){return P.fromPromise(this.__deleteProjectsBatch(o,e))}async __deleteProjectsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(o={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(o,e))}async __findFeedbackScoreNamesByProjectIds(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=o,i={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vj.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/projects/feedback-scores/names")}findTokenUsageNames(o,e={},t){return P.fromPromise(this.__findTokenUsageNames(o,e,t))}async __findTokenUsageNames(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/token-usage/names`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Js.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}/token-usage/names")}getProjectKpiCards(o,e,t){return P.fromPromise(this.__getProjectKpiCards(o,e,t))}async __getProjectKpiCards(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/kpi-cards`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ea.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:bE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/kpi-cards")}getProjectMetrics(o,e={},t){return P.fromPromise(this.__getProjectMetrics(o,e,t))}async __getProjectMetrics(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/metrics`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:rI.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/metrics")}getProjectStats(o={},e){return P.fromPromise(this.__getProjectStats(o,e))}async __getProjectStats(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{page:t,size:i,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=o,u={page:t,size:i,name:a,filters:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),sorting:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/projects/stats"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:mI.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/projects/stats")}retrieveProject(o,e){return P.fromPromise(this.__retrieveProject(o,e))}async __retrieveProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:$C.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(o,e={},t){return P.fromPromise(this.__getRecentActivity(o,e,t))}async __getRecentActivity(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/activities`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:ZI.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 500:throw new mt(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/activities")}};});var ad,i8=n(()=>{Z();$();b();Q();q();J();te();oe();ad=class{constructor(o={}){this._options=M(o);}getPrompts(o={},e){return P.fromPromise(this.__getPrompts(o,e))}async __getPrompts(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Bs.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts")}createPrompt(o,e){return P.fromPromise(this.__createPrompt(o,e))}async __createPrompt(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(o,e){return P.fromPromise(this.__createPromptVersion(o,e))}async __createPromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(o,e){return P.fromPromise(this.__updatePromptVersions(o,e))}async __updatePromptVersions(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(o,e={},t){return P.fromPromise(this.__getPromptById(o,e,t))}async __getPromptById(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:i,environment:a}=e,s={mask_id:i,environment:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:vm.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/prompts/{id}")}updatePrompt(o,e,t){return P.fromPromise(this.__updatePrompt(o,e,t))}async __updatePrompt(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ma.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/prompts/{id}")}deletePrompt(o,e={},t){return P.fromPromise(this.__deletePrompt(o,e,t))}async __deletePrompt(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/prompts/{id}")}deletePromptsBatch(o,e){return P.fromPromise(this.__deletePromptsBatch(o,e))}async __deletePromptsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(o,e={},t){return P.fromPromise(this.__getPromptByCommit(o,e,t))}async __getPromptByCommit(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/by-commit/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vm.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/prompts/by-commit/{commit}")}getPromptVersionById(o,e={},t){return P.fromPromise(this.__getPromptVersionById(o,e,t))}async __getPromptVersionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:De.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/prompts/versions/{versionId}")}getPromptVersionByNumber(o,e,t={},i){return P.fromPromise(this.__getPromptVersionByNumber(o,e,t,i))}async __getPromptVersionByNumber(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/by-number/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"GET","/v1/private/prompts/{promptId}/versions/by-number/{versionNumber}")}getPromptVersions(o,e={},t){return P.fromPromise(this.__getPromptVersions(o,e,t))}async __getPromptVersions(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,search:s,sorting:c,filters:l}=e,m={page:i,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:FI.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts/{id}/versions")}getPromptsByCommits(o,e){return P.fromPromise(this.__getPromptsByCommits(o,e))}async __getPromptsByCommits(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:La.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wt.getPromptsByCommits.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(o,e,t={},i){return P.fromPromise(this.__restorePromptVersion(o,e,t,i))}async __restorePromptVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/restore`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/prompts/{promptId}/versions/{versionId}/restore")}retrievePromptVersion(o,e){return P.fromPromise(this.__retrievePromptVersion(o,e))}async __retrievePromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(o,e){return P.fromPromise(this.__retrievePromptVersionsByIds(o,e))}async __retrievePromptVersionsByIds(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve-by-ids"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ja.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wt.retrievePromptVersionsByIds.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(o,e,t){return P.fromPromise(this.__setPromptVersionEnvironment(o,e,t))}async __setPromptVersionEnvironment(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}/environments`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/prompts/versions/{versionId}/environments")}};});var nd,a8=n(()=>{Z();$();b();Q();q();J();oe();nd=class{constructor(o={}){this._options=M(o);}datasetsRedirect(o,e){return P.fromPromise(this.__datasetsRedirect(o,e))}async __datasetsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:i,path:a}=o,s={dataset_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/datasets")}experimentsRedirect(o,e){return P.fromPromise(this.__experimentsRedirect(o,e))}async __experimentsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:i,workspaceName:a,path:s}=o,c={dataset_id:t,experiment_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/experiments")}optimizationsRedirect(o,e){return P.fromPromise(this.__optimizationsRedirect(o,e))}async __optimizationsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:i,workspaceName:a,path:s}=o,c={dataset_id:t,optimization_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/optimizations")}projectsRedirect(o,e){return P.fromPromise(this.__projectsRedirect(o,e))}async __projectsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:i,path:a}=o,s={trace_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/projects")}};});var sd,n8=n(()=>{Z();$();b();Q();q();J();te();oe();sd=class{constructor(o={}){this._options=M(o);}findReportFailures(o,e){return P.fromPromise(this.__findReportFailures(o,e))}async __findReportFailures(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:i,page:a,size:s}=o,c={type:dl.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/report-failures"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:tD.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===401?new O(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/report-failures")}createReportFailure(o,e){return P.fromPromise(this.__createReportFailure(o,e))}async __createReportFailure(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/report-failures"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ws.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/report-failures")}};});var pd,s8=n(()=>{Z();$();b();Q();q();J();te();oe();pd=class{constructor(o={}){this._options=M(o);}completeReport(o,e,t,i){return P.fromPromise(this.__completeReport(o,e,t,i))}async __completeReport(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/${_.encodePathParam(e)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Oa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/projects/{projectId}/reports/{reportId}/complete")}generateReport(o,e={},t){return P.fromPromise(this.__generateReport(o,e,t))}async __generateReport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/generate`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:oE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{projectId}/reports/generate")}getReportPreference(o,e={},t){return P.fromPromise(this.__getReportPreference(o,e,t))}async __getReportPreference(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ls.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{projectId}/reports/preferences")}updateReportPreference(o,e,t){return P.fromPromise(this.__updateReportPreference(o,e,t))}async __updateReportPreference(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ls.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Ls.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/projects/{projectId}/reports/preferences")}getReports(o,e={},t){return P.fromPromise(this.__getReports(o,e,t))}async __getReports(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:WE.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/reports")}};});var cd,p8=n(()=>{Z();$();b();Q();q();J();te();oe();cd=class{constructor(o={}){this._options=M(o);}findRetentionRules(o={},e){return P.fromPromise(this.__findRetentionRules(o,e))}async __findRetentionRules(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:i,includeInactive:a}=o,s={page:t,size:i,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:cD.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/retention/rules")}createRetentionRule(o,e){return P.fromPromise(this.__createRetentionRule(o,e))}async __createRetentionRule(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:No.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(o,e={},t){return P.fromPromise(this.__getRetentionRuleById(o,e,t))}async __getRetentionRuleById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:No.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/retention/rules/{ruleId}")}deactivateRetentionRule(o,e={},t){return P.fromPromise(this.__deactivateRetentionRule(o,e,t))}async __deactivateRetentionRule(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/retention/rules/{ruleId}")}};});var ld,c8=n(()=>{Z();$();b();Q();q();J();te();oe();ld=class{constructor(o={}){this._options=M(o);}getJobLogs(o,e={},t){return P.fromPromise(this.__getJobLogs(o,e,t))}async __getJobLogs(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:i}=e,a={offset:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:ur.getJobLogs.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}/logs")}appendJobLogs(o,e,t){return P.fromPromise(this.__appendJobLogs(o,e,t))}async __appendJobLogs(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.appendJobLogs.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/logs")}cancelJob(o,e={},t){return P.fromPromise(this.__cancelJob(o,e,t))}async __cancelJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/cancel`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/cancel")}createBridgeCommand(o,e,t){return P.fromPromise(this.__createBridgeCommand(o,e,t))}async __createBridgeCommand(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ya.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:jz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands")}createJob(o,e){return P.fromPromise(this.__createJob(o,e))}async __createJob(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Za.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new U(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(o,e={},t){return P.fromPromise(this.__getRunner(o,e,t))}async __getRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/{runnerId}")}disconnectRunner(o,e={},t){return P.fromPromise(this.__disconnectRunner(o,e,t))}async __disconnectRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/local-runners/{runnerId}")}getBridgeCommand(o,e,t={},i){return P.fromPromise(this.__getBridgeCommand(o,e,t,i))}async __getBridgeCommand(o,e,t={},i){var u,d,f,g,h,y,w,A,C,I,D;let{wait:a,timeout:s}=t,c={wait:a,timeout:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=i==null?void 0:i.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),i==null?void 0:i.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}`),method:"GET",headers:l,queryParameters:{...c,...i==null?void 0:i.queryParams},timeoutMs:((A=(w=i==null?void 0:i.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=i==null?void 0:i.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Az.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}")}getJob(o,e={},t){return P.fromPromise(this.__getJob(o,e,t))}async __getJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:_t.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}")}heartbeat(o,e={},t){return P.fromPromise(this.__heartbeat(o,e,t))}async __heartbeat(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/heartbeats`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:AE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 410:throw new lt(Io.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/heartbeats")}listJobs(o,e={},t){return P.fromPromise(this.__listJobs(o,e,t))}async __listJobs(o,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,page:a,size:s}=e,c={project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:PE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/jobs")}listRunners(o,e){return P.fromPromise(this.__listRunners(o,e))}async __listRunners(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:i,page:a,size:s}=o,c={project_id:t,status:i!=null?Tl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:zE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners")}nextBridgeCommands(o,e={},t){return P.fromPromise(this.__nextBridgeCommands(o,e,t))}async __nextBridgeCommands(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/next`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$a.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Tz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/next")}nextJob(o,e={},t){return P.fromPromise(this.__nextJob(o,e,t))}async __nextJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs/next`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ur.nextJob.Response.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/jobs/next")}patchChecklist(o,e,t){return P.fromPromise(this.__patchChecklist(o,e,t))}async __patchChecklist(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.patchChecklist.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/local-runners/{runnerId}/checklist")}registerAgents(o,e,t){return P.fromPromise(this.__registerAgents(o,e,t))}async __registerAgents(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.registerAgents.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/local-runners/{runnerId}/agents")}reportBridgeResult(o,e,t,i){return P.fromPromise(this.__reportBridgeResult(o,e,t,i))}async __reportBridgeResult(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Qa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}/results")}reportJobResult(o,e,t){return P.fromPromise(this.__reportJobResult(o,e,t))}async __reportJobResult(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/results`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:en.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/results")}};});var md,l8=n(()=>{Z();$();b();Q();q();J();te();md=class{constructor(o={}){this._options=M(o);}getServiceToggles(o){return P.fromPromise(this.__getServiceToggles(o))}async __getServiceToggles(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/toggles"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:lD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/toggles")}};});var dd,m8=n(()=>{Z();$();b();Q();q();J();te();oe();dd=class{constructor(o={}){this._options=M(o);}addSpanComment(o,e,t){return P.fromPromise(this.__addSpanComment(o,e,t))}async __addSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/comments")}addSpanFeedbackScore(o,e,t){return P.fromPromise(this.__addSpanFeedbackScore(o,e,t))}async __addSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/spans/{id}/feedback-scores")}createSpans(o,e){return P.fromPromise(this.__createSpans(o,e))}async __createSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(o,e){return P.fromPromise(this.__batchUpdateSpans(o,e))}async __batchUpdateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:on.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(o={},e){return P.fromPromise(this.__getSpansByProject(o,e))}async __getSpansByProject(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Br,ci;let{page:t,size:i,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=o,A={page:t,size:i,project_name:a,project_id:s,trace_id:c,type:l!=null?Dl.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:m,truncate:u,strip_attachments:d,sorting:f,exclude:g,search:h,from_time:y==null?void 0:y.toISOString(),to_time:w==null?void 0:w.toISOString()},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Br=e==null?void 0:e.maxRetries)!=null?Br:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ci=this._options)==null?void 0:ci.fetch,logging:this._options.logging});if(I.ok)return {data:hD.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/spans")}createSpan(o,e){return P.fromPromise(this.__createSpan(o,e))}async __createSpan(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:nn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans")}getSpanById(o,e={},t){return P.fromPromise(this.__getSpanById(o,e,t))}async __getSpanById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vs.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/{id}")}deleteSpanById(o,e={},t){return P.fromPromise(this.__deleteSpanById(o,e,t))}async __deleteSpanById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new Lr(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/spans/{id}")}updateSpan(o,e,t){return P.fromPromise(this.__updateSpan(o,e,t))}async __updateSpan(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:tn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/{id}")}deleteSpanComments(o,e){return P.fromPromise(this.__deleteSpanComments(o,e))}async __deleteSpanComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(o,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(o,e,t))}async __deleteSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:xs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/feedback-scores/delete")}findFeedbackScoreNames1(o={},e){return P.fromPromise(this.__findFeedbackScoreNames1(o,e))}async __findFeedbackScoreNames1(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:i}=o,a={project_id:t,type:i!=null?Cl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Qr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/feedback-scores/names")}getSpanComment(o,e,t={},i){return P.fromPromise(this.__getSpanComment(o,e,t,i))}async __getSpanComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/spans/{spanId}/comments/{commentId}")}getSpanStats(o={},e){return P.fromPromise(this.__getSpanStats(o,e))}async __getSpanStats(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,projectName:i,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=o,d={project_id:t,project_name:i,trace_id:a,type:s!=null?Il.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:c,search:l,from_time:m==null?void 0:m.toISOString(),to_time:u==null?void 0:u.toISOString()},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Yr.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/spans/stats")}scoreBatchOfSpans(o,e){return P.fromPromise(this.__scoreBatchOfSpans(o,e))}async __scoreBatchOfSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(o={},e){return P.fromPromise(this.__searchSpans(o,e))}async __searchSpans(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:i,source:a}=o,s={project_id:t,project_name:i,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/spans/exists"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:As.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/spans/exists")}updateSpanComment(o,e,t){return P.fromPromise(this.__updateSpanComment(o,e,t))}async __updateSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/comments/{commentId}")}};});var ud,d8=n(()=>{Z();$();b();Q();q();J();te();oe();ud=class{constructor(o={}){this._options=M(o);}executeAnalyticsQuery(o,e,t){return P.fromPromise(this.__executeAnalyticsQuery(o,e,t))}async __executeAnalyticsQuery(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/internal/analytics-queries/projects/${_.encodePathParam(o)}`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:cn.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Hl.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 501:throw new Lr(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/internal/analytics-queries/projects/{projectId}")}executeScopedAnalyticsQuery(o,e){return P.fromPromise(this.__executeScopedAnalyticsQuery(o,e))}async __executeScopedAnalyticsQuery(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ln.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hl.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 501:throw new Lr(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/internal/analytics-queries")}};});var gd,u8=n(()=>{Z();$();b();Q();q();J();te();gd=class{constructor(o={}){this._options=M(o);}getDatasetBiInfo(o){return P.fromPromise(this.__getDatasetBiInfo(o))}async __getDatasetBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-datasets")}getExperimentBiInfo(o){return P.fromPromise(this.__getExperimentBiInfo(o))}async __getExperimentBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-experiments")}getSpansBiInfo(o){return P.fromPromise(this.__getSpansBiInfo(o))}async __getSpansBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-spans")}getSpansCountBreakdownForWorkspaces(o){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(o))}async __getSpansCountBreakdownForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts-breakdown"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:FD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts-breakdown")}getSpansCountForWorkspaces(o){return P.fromPromise(this.__getSpansCountForWorkspaces(o))}async __getSpansCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:RD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts")}getTracesBiInfo(o){return P.fromPromise(this.__getTracesBiInfo(o))}async __getTracesBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-traces")}getTracesCountForWorkspaces(o){return P.fromPromise(this.__getTracesCountForWorkspaces(o))}async __getTracesCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:AD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-trace-counts")}};});var fd,g8=n(()=>{Z();$();b();Q();q();J();te();oe();fd=class{constructor(o={}){this._options=M(o);}addThreadComment(o,e,t){return P.fromPromise(this.__addThreadComment(o,e,t))}async __addThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/threads/{id}/comments")}addTraceComment(o,e,t){return P.fromPromise(this.__addTraceComment(o,e,t))}async __addTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/comments")}addTraceFeedbackScore(o,e,t){return P.fromPromise(this.__addTraceFeedbackScore(o,e,t))}async __addTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/traces/{id}/feedback-scores")}createTraces(o,e){return P.fromPromise(this.__createTraces(o,e))}async __createTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(o,e){return P.fromPromise(this.__batchUpdateTraces(o,e))}async __batchUpdateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(o,e){return P.fromPromise(this.__batchUpdateThreads(o,e))}async __batchUpdateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_n.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(o={},e){return P.fromPromise(this.__closeTraceThread(o,e))}async __closeTraceThread(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(o={},e){return P.fromPromise(this.__getTracesByProject(o,e))}async __getTracesByProject(o={},e){var I,D,F,B,Y,ne,we,je,Ee,Ce,Br;let{page:t,size:i,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=o,w={page:t,size:i,project_name:a,project_id:s,filters:c,truncate:l,strip_attachments:m,sorting:u,exclude:d,search:f,from_time:g==null?void 0:g.toISOString(),to_time:h==null?void 0:h.toISOString(),annotation_queue_id:y},A=z((I=this._options)==null?void 0:I.headers,T({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),e==null?void 0:e.headers),C=await S({url:_.join((Y=(B=await x.get(this._options.baseUrl))!=null?B:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...e==null?void 0:e.queryParams},timeoutMs:((je=(we=e==null?void 0:e.timeoutInSeconds)!=null?we:(ne=this._options)==null?void 0:ne.timeoutInSeconds)!=null?je:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Br=this._options)==null?void 0:Br.fetch,logging:this._options.logging});if(C.ok)return {data:jD.parseOrThrow(C.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:C.rawResponse};if(C.error.reason==="status-code")throw new k({statusCode:C.error.statusCode,body:C.error.body,rawResponse:C.rawResponse});return j(C.error,C.rawResponse,"GET","/v1/private/traces")}createTrace(o,e){return P.fromPromise(this.__createTrace(o,e))}async __createTrace(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces")}getTraceById(o,e={},t){return P.fromPromise(this.__getTraceById(o,e,t))}async __getTraceById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Hs.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/traces/{id}")}deleteTraceById(o,e={},t){return P.fromPromise(this.__deleteTraceById(o,e,t))}async __deleteTraceById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/traces/{id}")}updateTrace(o,e,t){return P.fromPromise(this.__updateTrace(o,e,t))}async __updateTrace(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/{id}")}deleteThreadComments(o,e){return P.fromPromise(this.__deleteThreadComments(o,e))}async __deleteThreadComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(o,e){return P.fromPromise(this.__deleteThreadFeedbackScores(o,e))}async __deleteThreadFeedbackScores(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:dn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(o,e){return P.fromPromise(this.__deleteTraceComments(o,e))}async __deleteTraceComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(o,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(o,e,t))}async __deleteTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:xs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/feedback-scores/delete")}deleteTraceThreads(o,e){return P.fromPromise(this.__deleteTraceThreads(o,e))}async __deleteTraceThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:un.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(o,e){return P.fromPromise(this.__deleteTraces(o,e))}async __deleteTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(o={},e){return P.fromPromise(this.__findFeedbackScoreNames2(o,e))}async __findFeedbackScoreNames2(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Qr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/feedback-scores/names")}findTraceThreadsFeedbackScoreNames(o={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(o,e))}async __findTraceThreadsFeedbackScoreNames(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Qr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/feedback-scores/names")}getTraceStats(o={},e){return P.fromPromise(this.__getTraceStats(o,e))}async __getTraceStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Yr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(o,e,t={},i){return P.fromPromise(this.__getThreadComment(o,e,t,i))}async __getThreadComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/{threadId}/comments/{commentId}")}getTraceThreadStats(o={},e){return P.fromPromise(this.__getTraceThreadStats(o,e))}async __getTraceThreadStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Yr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/threads/stats")}getTraceComment(o,e,t={},i){return P.fromPromise(this.__getTraceComment(o,e,t,i))}async __getTraceComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/{traceId}/comments/{commentId}")}getTraceThread(o,e){return P.fromPromise(this.__getTraceThread(o,e))}async __getTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Gs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(o={},e){return P.fromPromise(this.__getTraceThreads(o,e))}async __getTraceThreads(o={},e){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:t,size:i,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g,annotationQueueId:h}=o,y={page:t,size:i,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString(),annotation_queue_id:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,"v1/private/traces/threads"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ne=e==null?void 0:e.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:DD.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(o,e){return P.fromPromise(this.__openTraceThread(o,e))}async __openTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(o,e){return P.fromPromise(this.__scoreBatchOfThreads(o,e))}async __scoreBatchOfThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:gn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(o,e){return P.fromPromise(this.__scoreBatchOfTraces(o,e))}async __scoreBatchOfTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(o={},e){return P.fromPromise(this.__searchTraceThreads(o,e))}async __searchTraceThreads(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(o={},e){return P.fromPromise(this.__searchTraces(o,e))}async __searchTraces(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Rn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/traces/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:i,source:a,threadOnly:s}=o,c={project_id:t,project_name:i,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/traces/exists"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:As.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/traces/exists")}updateThread(o,e,t){return P.fromPromise(this.__updateThread(o,e,t))}async __updateThread(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:wn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/{threadModelId}")}updateThreadComment(o,e,t){return P.fromPromise(this.__updateThreadComment(o,e,t))}async __updateThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/comments/{commentId}")}updateTraceComment(o,e,t){return P.fromPromise(this.__updateTraceComment(o,e,t))}async __updateTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/comments/{commentId}")}};});var hd,f8=n(()=>{Z();$();b();Q();q();J();te();hd=class{constructor(o={}){this._options=M(o);}getWelcomeWizardStatus(o){return P.fromPromise(this.__getWelcomeWizardStatus(o))}async __getWelcomeWizardStatus(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:JD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/welcome-wizard")}submitWelcomeWizard(o={},e){return P.fromPromise(this.__submitWelcomeWizard(o,e))}async __submitWelcomeWizard(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:An.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/welcome-wizard")}};});var yd,h8=n(()=>{Z();$();b();Q();q();J();te();oe();yd=class{constructor(o={}){this._options=M(o);}getWorkspaceUserPermissions(o){return P.fromPromise(this.__getWorkspaceUserPermissions(o))}async __getWorkspaceUserPermissions(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:OD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new N(t.error.body,t.rawResponse);case 401:throw new O(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/workspace-permissions")}};});var bd,y8=n(()=>{Z();$();b();Q();q();J();te();oe();bd=class{constructor(o={}){this._options=M(o);}costsSummary(o,e){return P.fromPromise(this.__costsSummary(o,e))}async __costsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(o){return P.fromPromise(this.__getWorkspaceConfiguration(o))}async __getWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Os.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/workspaces/configurations")}upsertWorkspaceConfiguration(o,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(o,e))}async __upsertWorkspaceConfiguration(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Os.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Os.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(o){return P.fromPromise(this.__deleteWorkspaceConfiguration(o))}async __deleteWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/workspaces/configurations")}getCost(o,e){return P.fromPromise(this.__getCost(o,e))}async __getCost(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(o,e){return P.fromPromise(this.__getMetric(o,e))}async __getMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(o,e){return P.fromPromise(this.__getWorkspaceSpanMetric(o,e))}async __getWorkspaceSpanMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(o={},e){return P.fromPromise(this.__getWorkspaceTokenUsageNames(o,e))}async __getWorkspaceTokenUsageNames(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/token-usage/names"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Js.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(o,e){return P.fromPromise(this.__metricsSummary(o,e))}async __metricsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:HD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var $s,b8=n(()=>{j3();E3();C3();I3();D3();U3();N3();F3();B3();M3();W3();L3();V3();J3();H3();G3();O3();K3();$3();Q3();Y3();X3();Z3();q3();e8();r8();t8();o8();i8();a8();n8();s8();p8();c8();l8();m8();d8();u8();g8();f8();h8();y8();Z();$();b();Q();q();J();$s=class{constructor(o={}){this._options=M(o);}get mcpOAuth(){var o;return (o=this._mcpOAuth)!=null?o:this._mcpOAuth=new Zm(this._options)}get agentInsightsEnrollment(){var o;return (o=this._agentInsightsEnrollment)!=null?o:this._agentInsightsEnrollment=new Im(this._options)}get systemAnalyticsQueries(){var o;return (o=this._systemAnalyticsQueries)!=null?o:this._systemAnalyticsQueries=new ud(this._options)}get systemUsage(){var o;return (o=this._systemUsage)!=null?o:this._systemUsage=new gd(this._options)}get agentConfigs(){var o;return (o=this._agentConfigs)!=null?o:this._agentConfigs=new Em(this._options)}get agentInsightsJobs(){var o;return (o=this._agentInsightsJobs)!=null?o:this._agentInsightsJobs=new Dm(this._options)}get agentInsights(){var o;return (o=this._agentInsights)!=null?o:this._agentInsights=new Cm(this._options)}get alerts(){var o;return (o=this._alerts)!=null?o:this._alerts=new Um(this._options)}get annotationQueues(){var o;return (o=this._annotationQueues)!=null?o:this._annotationQueues=new Nm(this._options)}get assertionResults(){var o;return (o=this._assertionResults)!=null?o:this._assertionResults=new Fm(this._options)}get attachments(){var o;return (o=this._attachments)!=null?o:this._attachments=new Bm(this._options)}get check(){var o;return (o=this._check)!=null?o:this._check=new Lm(this._options)}get automationRuleEvaluators(){var o;return (o=this._automationRuleEvaluators)!=null?o:this._automationRuleEvaluators=new Mm(this._options)}get chatCompletions(){var o;return (o=this._chatCompletions)!=null?o:this._chatCompletions=new Wm(this._options)}get dashboards(){var o;return (o=this._dashboards)!=null?o:this._dashboards=new Vm(this._options)}get datasets(){var o;return (o=this._datasets)!=null?o:this._datasets=new Jm(this._options)}get environments(){var o;return (o=this._environments)!=null?o:this._environments=new Hm(this._options)}get experiments(){var o;return (o=this._experiments)!=null?o:this._experiments=new Gm(this._options)}get feedbackDefinitions(){var o;return (o=this._feedbackDefinitions)!=null?o:this._feedbackDefinitions=new Om(this._options)}get guardrails(){var o;return (o=this._guardrails)!=null?o:this._guardrails=new Km(this._options)}get insightsViews(){var o;return (o=this._insightsViews)!=null?o:this._insightsViews=new $m(this._options)}get llmModels(){var o;return (o=this._llmModels)!=null?o:this._llmModels=new Qm(this._options)}get llmProviderKey(){var o;return (o=this._llmProviderKey)!=null?o:this._llmProviderKey=new Ym(this._options)}get runners(){var o;return (o=this._runners)!=null?o:this._runners=new ld(this._options)}get manualEvaluation(){var o;return (o=this._manualEvaluation)!=null?o:this._manualEvaluation=new Xm(this._options)}get ollama(){var o;return (o=this._ollama)!=null?o:this._ollama=new qm(this._options)}get ollieState(){var o;return (o=this._ollieState)!=null?o:this._ollieState=new ed(this._options)}get openTelemetryIngestion(){var o;return (o=this._openTelemetryIngestion)!=null?o:this._openTelemetryIngestion=new rd(this._options)}get optimizations(){var o;return (o=this._optimizations)!=null?o:this._optimizations=new td(this._options)}get pairing(){var o;return (o=this._pairing)!=null?o:this._pairing=new od(this._options)}get projects(){var o;return (o=this._projects)!=null?o:this._projects=new id(this._options)}get prompts(){var o;return (o=this._prompts)!=null?o:this._prompts=new ad(this._options)}get reportFailures(){var o;return (o=this._reportFailures)!=null?o:this._reportFailures=new sd(this._options)}get reports(){var o;return (o=this._reports)!=null?o:this._reports=new pd(this._options)}get retentionRules(){var o;return (o=this._retentionRules)!=null?o:this._retentionRules=new cd(this._options)}get serviceToggles(){var o;return (o=this._serviceToggles)!=null?o:this._serviceToggles=new md(this._options)}get spans(){var o;return (o=this._spans)!=null?o:this._spans=new dd(this._options)}get traces(){var o;return (o=this._traces)!=null?o:this._traces=new fd(this._options)}get welcomeWizard(){var o;return (o=this._welcomeWizard)!=null?o:this._welcomeWizard=new hd(this._options)}get workspacePermissions(){var o;return (o=this._workspacePermissions)!=null?o:this._workspacePermissions=new yd(this._options)}get workspaces(){var o;return (o=this._workspaces)!=null?o:this._workspaces=new bd(this._options)}get redirect(){var o;return (o=this._redirect)!=null?o:this._redirect=new nd(this._options)}isAlive(o){return P.fromPromise(this.__isAlive(o))}async __isAlive(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ping"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ping")}version(o){return P.fromPromise(this.__version(o))}async __version(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ver"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ver")}};});var R8=n(()=>{});var x8,w8=n(()=>{Yp();(e=>(e.LogLevel=Ve,e.ConsoleLogger=dt))(x8||(x8={}));});var _8=n(()=>{R8();w8();});var k8=n(()=>{_8();});var Tr=n(()=>{oe();b8();Q();J();k8();te();});exports.generateId=void 0;var ir=n(()=>{exports.generateId=()=>uuid.v7();});function rae(p){return p.templateStructure==="text"}function tae(p){return p.templateStructure==="chat"}var jr,Rd=n(()=>{jr=class{static serializePromptToInfoDict(o){let e;return rae(o)?e=o.prompt:tae(o)?e=o.messages:e="",{name:o.name,...o.id&&{id:o.id},template_structure:o.templateStructure,version:{...o.versionId&&{id:o.versionId},...o.commit&&{commit:o.commit},template:e}}}static normalizeMetadata(o){if(!o)return {};if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{let e=JSON.parse(o);if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}catch{}return null}static promptAlreadyInjected(o,e,t){let i=this.normalizeMetadata(o);return i===null?true:(Array.isArray(i.opik_prompts)?i.opik_prompts:[]).some(s=>{var c;return s.id===e&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(o,e,t,i){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(o))!=null?m:{},c=(u=this.normalizeMetadata(e))!=null?u:{},l=i&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(o,e){var s,c;let{prompts:t,appendPrompts:i,...a}=o;if(!t||t.length===0){if(a.metadata&&e){let l=(s=this.normalizeMetadata(e))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(e,a.metadata,t,i!=null?i:false)}}static processTraceUpdate(o,e){return this.processUpdate(o,e)}static processSpanUpdate(o,e){return this.processUpdate(o,e)}};});var xd,A8=n(()=>{oo();ir();re();Rd();xd=class p{constructor(o,e){this.data=o;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.spanFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=o=>{var i;let e=jr.processSpanUpdate(o,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return Le()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=o=>{var c,l;let e=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(l=this.data.environment)!=null?l:""}" from the parent span will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var wd,P8=n(()=>{oo();ir();re();A8();Rd();wd=class{constructor(o,e){this.data=o;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.traceFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=o=>{var c,l,m;let e=(l=(c=this.data.projectName)!=null?c:o.projectName)!=null?l:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(m=this.data.environment)!=null?m:""}" from the parent trace will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new xd(a,this.opik);return this.spans.push(s),s};this.update=o=>{var i;let e=jr.processTraceUpdate(o,this.data.metadata),t={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return Le()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var z8,Qs,oae,iae,S8,v8,T8,j8,KD=n(()=>{z8={REDIRECT_BASE:"v1/session/redirect",EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECTS:"api/v1/session/redirect/projects/",DATASETS:"api/v1/session/redirect/datasets/",PROJECT_BY_NAME:"redirect/projects"},Qs={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},oae=p=>Object.entries(p).map(([o,e])=>`${o}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),iae=p=>p.replace(/\/api\/?$/,""),S8=p=>Buffer.from(p).toString("base64"),v8=(p,o,e)=>{let t=oae(e),i=iae(p),a=i.endsWith("/")?i:`${i}/`,s=o.startsWith("/")?o.slice(1):o;return `${a}${s}?${t}`},T8=({datasetId:p,experimentId:o,baseUrl:e})=>v8(e,z8.EXPERIMENTS,{[Qs.EXPERIMENT_ID]:o,[Qs.DATASET_ID]:p,[Qs.PATH]:S8(e)}),j8=(p,o)=>v8(o,z8.PROJECTS,{[Qs.TRACE_ID]:p,[Qs.PATH]:S8(o)});});var aae,_d,Ys,Ue,Mt=n(()=>{re();aae=300,_d=100,Ys=class{constructor({action:o,batchSize:e=_d,delay:t,enableBatch:i,name:a="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=(o,e)=>{if(this.queue.set(o,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(o,e)=>{let t=this.queue.get(o);t&&(this.queue.set(o,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let o=new Map(this.queue);this.queue.clear(),exports.logger.debug(`Adding ${o.size} items to ${this.name} promise:`,o),this.promise=this.promise.finally(()=>(exports.logger.debug(`Flushing ${this.name}:`,o),this.action(o))).catch(e=>{exports.logger.error(`Failed to flush ${this.name}:`,e,o);}),await this.promise;};this.action=o,this.batchSize=e,this.delay=t,this.enableBatch=i,this.name=a;}},Ue=class{constructor({delay:o=aae,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:i=true,createBatchSize:a=_d,updateBatchSize:s=_d,deleteBatchSize:c=_d,name:l="BatchQueue"}={}){this.create=o=>{let e=this.getId(o);this.createQueue.add(e,o);};this.get=async o=>{let e=this.createQueue.queue.get(o);return e||this.getEntity(o)};this.update=(o,e)=>{if(this.createQueue.queue.get(o)){this.createQueue.update(o,e);return}let i=this.updateQueue.queue.get(o);this.updateQueue.add(o,{...i,...e});};this.delete=o=>{if(this.createQueue.queue.has(o)){this.createQueue.queue.delete(o);return}this.deleteQueue.add(o);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new Ys({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:o,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new Ys({action:async m=>{await this.createQueue.flush();let u=Array.from(m.entries());for(let[d,f]of u)await this.updateEntity(d,f);},delay:o,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new Ys({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:o,enableBatch:i,batchSize:c,name:`${l}:deleteQueue`});}};});var nae,kd,E8=n(()=>{Sp();re();Mt();nae="suite_assertion",kd=class extends Ue{constructor(e,t,i="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${i}`});this.api=e;this.entityType=i;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,exports.logger.warn('Opik backend does not support PUT /v1/private/assertion-results yet \u2014 falling back to the legacy feedback-scores path with categoryName="suite_assertion". Upgrade the Opik backend to a version that includes OPIK-6048 to enable native assertion-results ingestion.'),await this.writeViaLegacyFeedbackScores(e);return}throw t}}async writeViaLegacyFeedbackScores(e){let t=e.map(i=>({id:i.entityId,name:i.name,value:i.status==="passed"?1:0,categoryName:nae,reason:i.reason,source:i.source,projectName:i.projectName,projectId:i.projectId}));await this.api.traces.scoreBatchOfTraces({scores:t},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(){throw new Error("Not implemented")}};});var Ad,sae,C8,pae,cae,Bo,$D=n(()=>{re();Ad=["input","output"],sae=1024*1024,C8=p=>({opik_truncated:true,reason:Number.isFinite(p)?`<omitted_due_to_size_${Math.round(p)}MB_error_code_413_400>`:"<omitted_unserializable_error_code_413_400>"}),pae=p=>{try{let o=JSON.stringify(p);return o?Buffer.byteLength(o,"utf8")/sae:0}catch{return 1/0}},cae=(p,o)=>{let e={};for(let s of Ad)p[s]!=null&&(e[s]=pae(p[s]));if(Object.keys(e).length===0)return {result:p,truncated:[]};let t={};for(let s of Ad)e[s]!==void 0&&e[s]>o&&(t[s]=C8(e[s]));if(Ad.reduce((s,c)=>{var l;return s+(t[c]?0:(l=e[c])!=null?l:0)},0)>o)for(let s of Ad)e[s]!==void 0&&t[s]===void 0&&(t[s]=C8(e[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},Bo=(p,o,e="span",t)=>{if(!o||o<=0)return p;let{result:i,truncated:a}=cae(p,o);if(a.length>0){let s=e.charAt(0).toUpperCase()+e.slice(1);exports.logger.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${o} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return i};});var Xr,lae,mae,dae,uae,gae,fae,hae,yae,I8,bae,D8,U8=n(()=>{Xr=(p,o,e=0)=>{if(p.length<e+o.length)return false;for(let t=0;t<o.length;t++)if(p[e+t]!==o[t])return false;return true},lae=[137,80,78,71,13,10,26,10],mae=[255,216,255],dae=[71,73,70,56,55,97],uae=[71,73,70,56,57,97],gae=[82,73,70,70],fae=[87,69,66,80],hae=[37,80,68,70],yae=[102,116,121,112],I8=p=>{if(Xr(p,lae))return "image/png";if(Xr(p,mae)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(Xr(p,dae)||Xr(p,uae))return "image/gif";if(Xr(p,gae)&&Xr(p,fae,8))return "image/webp";if(Xr(p,hae))return "application/pdf";if(Xr(p,yae,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let e=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(e.startsWith("{")||e.startsWith("["))return "application/json"}catch{}return null},bae={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","application/pdf":"pdf","image/svg+xml":"svg","video/mp4":"mp4","application/json":"json"},D8=p=>{var o;return (o=bae[p])!=null?o:"bin"};});var Rae,xae,wae,N8,_ae,kae,Aae,QD,F8,B8=n(()=>{U8();Rae=["input","output","metadata"],xae=(p,o)=>{let e=Math.floor(Math.random()*99999999)+1,t=D8(o);return `${p}-attachment-${e}-${Date.now()}-sdk.${t}`},wae=p=>{let o=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,e=Buffer.from(o,"base64");return e.length>0?e:null},N8=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,_ae=61,kae=/data:[^,]*;base64,$/,Aae=(p,o,e,t)=>{if(p.length<t)return p;let i=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!N8(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&N8(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===_ae&&u<2;)m++,u++;if(m-l>=t){let f=wae(p.slice(l,m)),g=f?I8(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&kae.test(p.slice(y,l))&&(h=y);let w=xae(o,g);i.push(p.slice(a,h)),i.push(`[${w}]`),a=m,e.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(i.push(p.slice(a)),i.join("")):p},QD=(p,o,e,t,i)=>{if(typeof p=="string")return Aae(p,o,e,t);if(Array.isArray(p)){if(i.has(p))return p;i.add(p);let a=false,s=p.map(c=>{let l=QD(c,o,e,t,i);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(i.has(p))return p;i.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=QD(l,o,e,t,i);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},F8=(p,o)=>{let e=Math.max(4,Math.floor(o/4)*4),t=[],i={};for(let a of Rae){let s=p[a];if(s==null)continue;let c=QD(s,a,t,e,new WeakSet);c!==s&&(i[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...i},attachments:t}};});var Pae,M8,W8,L8=n(()=>{Pae="BEMinIO",M8=async(p,o,e)=>{let t=await fetch(p,{method:"PUT",body:o,headers:e});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},W8=async(p,o,e,t)=>{let{data:i,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(i.length/5242880)),l=Buffer.from(o.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:e.entityType,entityId:e.entityId,path:l,projectName:e.projectName},p.requestOptions);if(m.uploadId===Pae){let d={"Content-Type":s,"Comet-Workspace":o.workspaceName,...o.extraHeaders};o.apiKey&&(d.authorization=o.apiKey),await M8(m.preSignUrls[0],i,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=i.subarray(f,f+5242880),h=await M8(m.preSignUrls[d],g);if(!h)throw new Error(`attachment upload part ${d+1} returned no ETag; cannot complete multipart upload`);u.push({eTag:h,partNumber:d+1});}await p.attachments.completeMultiPartUpload({fileName:a,entityType:e.entityType,entityId:e.entityId,fileSize:i.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:e.projectName},p.requestOptions);};});var Pd,YD=n(()=>{re();B8();L8();Pd=async(p,o,e,t)=>{let i;try{i=F8(t,o.minSizeBytes);}catch(a){return exports.logger.warn(`Attachment extraction skipped for ${e.entityType} '${e.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return i.attachments.length===0?t:(await Promise.all(i.attachments.map(a=>W8(p,o,e,a).catch(s=>{exports.logger.warn(`Failed to upload extracted attachment '${a.fileName}' for ${e.entityType} '${e.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),i.result)};});var zd,V8=n(()=>{Mt();$D();ct();YD();zd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Pd(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(Bo(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=Bo(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"span",e);await this.api.spans.updateSpan(e,{body:a},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var Sd,J8=n(()=>{Mt();Sd=class extends Ue{constructor(e,t){super({delay:t,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 t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var vd,H8=n(()=>{Mt();$D();ct();YD();vd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Pd(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(Bo(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=Bo(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"trace",e);await this.api.traces.updateTrace(e,{body:a},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var Td,G8=n(()=>{Mt();Td=class extends Ue{constructor(e,t){super({delay:t,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 t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var jd,O8=n(()=>{Tr();jd=class extends $s{constructor(e){var i;let t={...e==null?void 0:e.headers,...(i=e==null?void 0:e.requestOptions)==null?void 0:i.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var Ed,K8=n(()=>{Mt();Ed=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function $8(){return XD||(XD=await zae__default.default()),XD}var XD,Q8=n(()=>{XD=null;});var Mo,Cd=n(()=>{oe();ir();Q8();Mo=class p{constructor(o,e){let{id:t,traceId:i,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=o;this.id=t||exports.generateId(),this.traceId=i,this.spanId=a,this.source=s||If.Sdk,this.description=c!=null?c:e,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(o=false){return o?{...this.data,id:this.id}:{...this.data}}async contentHash(){let o={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(o.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(o.executionPolicy=this.executionPolicy);let e=Sae__default.default(o);return (await $8()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(o){return new p({id:o.id,traceId:o.traceId,spanId:o.spanId,source:o.source,...o.evaluators&&{evaluators:o.evaluators},...o.executionPolicy&&{executionPolicy:o.executionPolicy},...o.data},o.description)}};});async function Ne(p,o,e){var c;if(e===0)return [];let t=new util.TextDecoder("utf-8"),i=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
|
|
3
|
+
`)),{ok:true,value:o}):t}}var mr=n(()=>{});function rc(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var ph=n(()=>{});var po,ch=n(()=>{ph();po=class p extends Error{constructor(e){super(e.map(rc).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var co,lh=n(()=>{ph();co=class p extends Error{constructor(e){super(e.map(rc).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ce(p){return {nullable:()=>cie(p),optional:()=>mh(p),optionalNullable:()=>lie(p),transform:o=>dh(p,o),parseOrThrow:(o,e)=>{let t=p.parse(o,e);if(t.ok)return t.value;throw new co(t.errors)},jsonOrThrow:(o,e)=>{let t=p.json(o,e);if(t.ok)return t.value;throw new po(t.errors)}}}function cie(p){let o={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.NULLABLE};return {...o,...ce(o)}}function mh(p){let o={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL};return {...o,...ce(o)}}function lie(p){let o={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL_NULLABLE};return {...o,...ce(o)}}function dh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);return a.ok?{ok:true,value:o.transform(a.value)}:a},json:(t,i)=>{let a=o.untransform(t);return p.json(a,i)},getType:()=>p.getType()};return {...e,...ce(e)}}var T4=n(()=>{he();ch();lh();});var Ie=n(()=>{T4();ch();lh();});function j4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o=="bigint"?{ok:true,value:o}:typeof o=="number"?{ok:true,value:BigInt(o)}:{ok:false,errors:[{path:e,message:se(o,"bigint | number")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="bigint"?{ok:false,errors:[{path:e,message:se(o,"bigint")}]}:{ok:true,value:o},getType:()=>K.BIGINT};return {...ye(p),...ce(p)}}var E4=n(()=>{he();ze();mr();Ie();});var C4=n(()=>{E4();});function I4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:e,message:se(o,"string")}]}:mie.test(o)?{ok:true,value:new Date(o)}:{ok:false,errors:[{path:e,message:se(o,"ISO 8601 date string")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>o instanceof Date?{ok:true,value:o.toISOString()}:{ok:false,errors:[{path:e,message:se(o,"Date object")}]},getType:()=>K.DATE};return {...ye(p),...ce(p)}}var mie,D4=n(()=>{he();ze();mr();Ie();mie=/^([+-]?\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)?)?)?)?$/;});var U4=n(()=>{D4();});function be(p,o){return ()=>{let e={parse:o,json:o,getType:()=>p};return {...ye(e),...ce(e)}}}var dr=n(()=>{Ie();mr();});function tc(p){let o=new Set(p);return be(K.ENUM,(t,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:se(t,"string")}]}:!o.has(t)&&!i?{ok:false,errors:[{path:a,message:se(t,"enum")}]}:{ok:true,value:t})()}var N4=n(()=>{he();dr();ze();});var uh=n(()=>{N4();});function F4(p){let o=gh(p);return {...o,...ce(o)}}function gh(p){return {parse:(o,e)=>lo(p).parse(o,e),json:(o,e)=>lo(p).json(o,e),getType:()=>lo(p).getType()}}function lo(p){let o=p;return o.__zurg_memoized==null&&(o.__zurg_memoized=p()),o.__zurg_memoized}var fh=n(()=>{Ie();});function bi(p){return Object.entries(p)}var hh=n(()=>{});function Ri(p,o){let e=new Set(o);return Object.entries(p).reduce((t,[i,a])=>(e.has(i)&&(t[i]=a),t),{})}var yh=n(()=>{});function xr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let o=p;for(;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(p)===o}var xi=n(()=>{});function wi(p){return Object.keys(p)}var bh=n(()=>{});function B4(p,o){let e=[],t=[];for(let i of p)o(i)?e.push(i):t.push(i);return [e,t]}var M4=n(()=>{});function Ze(p){return {withParsedProperties:o=>Rh(p,o)}}function Rh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);if(!a.ok)return a;let s=Object.entries(o).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,i)=>{var c;if(!xr(t))return {ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:se(t,"object")}]};let a=new Set(Object.keys(o)),s=Ri(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,i)},getType:()=>p.getType()};return {...e,...ce(e),...Ze(e)}}var W4=n(()=>{yh();ze();xi();Ie();});var _i=n(()=>{W4();});function L4(p,o){return {rawKey:p,valueSchema:o,isProperty:true}}function Jr(p){return p.isProperty}var xh=n(()=>{});function oc(p){let o={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Jr(t)?t.rawKey:e),_getParsedProperties:()=>wi(p),parse:(e,t)=>{let i={},a=[];for(let[s,c]of bi(p)){let l=Jr(c)?c.rawKey:s,m=Jr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};i[l]=u,H4(m)&&a.push(l);}return V4({value:e,requiredKeys:a,getProperty:s=>{let c=i[s];if(c!=null)return {transformedKey:c.parsedKey,transform:l=>{var m;return c.valueSchema.parse(l,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],s]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},json:(e,t)=>{let i=[];for(let[a,s]of bi(p)){let c=Jr(s)?s.valueSchema:s;H4(c)&&i.push(a);}return V4({value:e,requiredKeys:i,getProperty:a=>{let s=p[a];if(s!=null)return Jr(s)?{transformedKey:s.rawKey,transform:c=>{var l;return s.valueSchema.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}:{transformedKey:a,transform:c=>{var l;return s.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},getType:()=>K.OBJECT};return {...ye(o),...ce(o),...Ze(o),...ft(o)}}function V4({value:p,requiredKeys:o,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:i=false,breadcrumbsPrefix:a=[]}){if(!xr(p))return {ok:false,errors:[{path:a,message:se(p,"object")}]};let s=new Set(o),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...o.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||i?{ok:true,value:l}:{ok:false,errors:c}}function ft(p){return {extend:o=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...o._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...o._getRawProperties()],parse:(t,i)=>J4({extensionKeys:o._getRawProperties(),value:t,transformBase:a=>p.parse(a,i),transformExtension:a=>o.parse(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>J4({extensionKeys:o._getParsedProperties(),value:t,transformBase:a=>p.json(a,i),transformExtension:a=>o.json(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.OBJECT};return {...e,...ce(e),...Ze(e),...ft(e)}},passthrough:()=>{let o=new Set(p._getRawProperties()),e=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(i,a)=>{let s=p.parse(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))o.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(i,a)=>{let s=p.json(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>K.OBJECT};return {...t,...ce(t),...Ze(t),...ft(t)}}}}function J4({extensionKeys:p,value:o,transformBase:e,transformExtension:t,breadcrumbsPrefix:i=[]}){if(!xr(o))return {ok:false,errors:[{path:i,message:se(o,"object")}]};let a=new Set(p),[s,c]=B4(wi(o),u=>a.has(u)),l=e(Ri(o,c)),m=t(Ri(o,s));return l.ok&&m.ok?{ok:true,value:{...l.value,...m.value}}:{ok:false,errors:[...l.ok?[]:l.errors,...m.ok?[]:m.errors]}}function H4(p){return !die(p)}function die(p){switch(p.getType()){case K.ANY:case K.UNKNOWN:case K.OPTIONAL:case K.OPTIONAL_NULLABLE:return true;default:return false}}var wh=n(()=>{he();hh();yh();ze();xi();bh();mr();M4();_i();Ie();xh();});function G4(p){return oc(p)}var O4=n(()=>{wh();});var _h=n(()=>{wh();O4();xh();});function K4(p){let o={...gh(p),_getRawProperties:()=>lo(p)._getRawProperties(),_getParsedProperties:()=>lo(p)._getParsedProperties()};return {...o,...ce(o),...Ze(o),...ft(o)}}var $4=n(()=>{_h();_i();Ie();fh();});var Q4=n(()=>{fh();$4();});function ic(p){let o={parse:(e,t)=>Y4(e,(i,a)=>{var s;return p.parse(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>Y4(e,(i,a)=>{var s;return p.json(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>K.LIST};return {...ye(o),...ce(o)}}function Y4(p,o){return Array.isArray(p)?p.map((t,i)=>o(t,i)).reduce((t,i)=>{if(t.ok&&i.ok)return {ok:true,value:[...t.value,i.value]};let a=[];return t.ok||a.push(...t.errors),i.ok||a.push(...i.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:se(p,"list"),path:[]}]}}var X4=n(()=>{he();ze();mr();Ie();});var kh=n(()=>{X4();});function Z4(p){return be(K.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`${p.toString()}`)}]})()}var q4=n(()=>{he();dr();ze();});function e6(p){return be(K.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`"${p}"`)}]})()}var r6=n(()=>{he();dr();ze();});var t6=n(()=>{q4();r6();});var o6,i6=n(()=>{he();dr();o6=be(K.ANY,p=>({ok:true,value:p}));});var a6,n6=n(()=>{he();dr();ze();a6=be(K.BOOLEAN,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"boolean")}]});});var s6,p6=n(()=>{he();dr();s6=be(K.NEVER,(p,{breadcrumbsPrefix:o=[]}={})=>({ok:false,errors:[{path:o,message:"Expected never"}]}));});var c6,l6=n(()=>{he();dr();ze();c6=be(K.NUMBER,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"number")}]});});var m6,d6=n(()=>{he();dr();ze();m6=be(K.STRING,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"string")}]});});var u6,g6=n(()=>{he();dr();u6=be(K.UNKNOWN,p=>({ok:true,value:p}));});var f6=n(()=>{i6();n6();p6();l6();d6();g6();});function y6(p,o){let e={parse:(t,i)=>h6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.parse(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.parse(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>h6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.json(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.json(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.RECORD};return {...ye(e),...ce(e)}}function h6({value:p,isKeyNumeric:o,transformKey:e,transformValue:t,breadcrumbsPrefix:i=[]}){return xr(p)?bi(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(o){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:se(p,"object")}]}}var b6=n(()=>{he();hh();ze();xi();mr();Ie();});var R6=n(()=>{b6();});function x6(p){let o=ic(p),e={parse:(t,i)=>{let a=o.parse(t,i);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,i)=>{var s;return t instanceof Set?o.json([...t],i):{ok:false,errors:[{path:(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],message:se(t,"Set")}]}},getType:()=>K.SET};return {...ye(e),...ce(e)}}var w6=n(()=>{he();ze();mr();kh();Ie();});var _6=n(()=>{w6();});function A6(p){let o={parse:(e,t)=>k6((i,a)=>i.parse(e,a),p,t),json:(e,t)=>k6((i,a)=>i.json(e,a),p,t),getType:()=>K.UNDISCRIMINATED_UNION};return {...ye(o),...ce(o)}}function k6(p,o,e){let t=[];for(let[i,a]of o.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${i}] ${c.message}`});}return {ok:false,errors:t}}var P6=n(()=>{he();mr();Ie();});var z6=n(()=>{P6();});function S6(p,o){return {parsedDiscriminant:p,rawDiscriminant:o}}var v6=n(()=>{});function j6(p,o){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,i=tc(wi(o)),a={parse:(s,c)=>T6({value:s,discriminant:e,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return i.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],e]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.parse(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),json:(s,c)=>T6({value:s,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:l=>{var m;return i.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>K.UNION};return {...ye(a),...ce(a),...Ze(a)}}function T6({value:p,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!xr(p))return {ok:false,errors:[{path:c,message:se(p,"object")}]};let{[o]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${o}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=i(u.value);if(d==null)return a?{ok:true,value:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,o],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var E6=n(()=>{he();ze();xi();bh();mr();uh();_i();Ie();});var C6=n(()=>{v6();E6();});var I6=n(()=>{C4();U4();uh();Q4();kh();t6();_h();_i();f6();R6();Ie();_6();z6();C6();});var r={};L(r,{JsonError:()=>po,ParseError:()=>co,any:()=>o6,bigint:()=>j4,boolean:()=>a6,booleanLiteral:()=>Z4,date:()=>I4,discriminant:()=>S6,enum_:()=>tc,getObjectLikeUtils:()=>Ze,getObjectUtils:()=>ft,getSchemaUtils:()=>ce,isProperty:()=>Jr,lazy:()=>F4,lazyObject:()=>K4,list:()=>ic,never:()=>s6,number:()=>c6,object:()=>oc,objectWithoutOptionalProperties:()=>G4,optional:()=>mh,property:()=>L4,record:()=>y6,set:()=>x6,string:()=>m6,stringLiteral:()=>e6,transform:()=>dh,undiscriminatedUnion:()=>A6,union:()=>j6,unknown:()=>u6,withParsedProperties:()=>Rh});var D6=n(()=>{I6();});function U6(p){if(p===null)return "null";switch(typeof p){case "undefined":return "undefined";case "string":case "number":case "boolean":break;default:p=String(p);break}return encodeURIComponent(p)}var N6=n(()=>{});function B6(p,...o){if(!p)return "";if(o.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return F6(p,...o)}let t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=W6(a);s&&(e.pathname=M6(e.pathname,s));}return i&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return F6(p,...o)}function F6(p,...o){if(o.length===0)return p;let e=p,t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=W6(a);s&&(e=M6(e,s));}return i&&!e.endsWith("/")&&(e+="/"),e}function M6(p,o){return p.endsWith("/")?p+o:`${p}/${o}`}function W6(p){if(!p)return p;let o=0,e=p.length;return p.startsWith("/")&&(o=1),p.endsWith("/")&&(e=p.length-1),o===0&&e===p.length?p:p.slice(o,e)}var L6=n(()=>{});var _={};L(_,{encodePathParam:()=>U6,join:()=>B6,toQueryString:()=>ut});var V6=n(()=>{N6();L6();fi();});var b=n(()=>{u4();ih();z4();S4();ah();D6();V6();});function M(p){let o=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":so.type,"X-Fern-Runtime-Version":so.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:yi.createLogger(p==null?void 0:p.logging),headers:o}}var Z=n(()=>{$();b();});var v,Q=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,o,e,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:o});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:o});case "timeout":throw new Wr(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:o});default:throw new k({message:"Unknown error",rawResponse:o})}}var q=n(()=>{J();});var ki,J6=n(()=>{b();ki=r.object({blueprintName:r.property("blueprint_name",r.string())});});var Ah,Ph=n(()=>{b();Ah=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),envName:r.property("env_name",r.string()),blueprintId:r.property("blueprint_id",r.string()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),endedAt:r.property("ended_at",r.date().optional())});});var Ai,H6=n(()=>{b();Ph();Ai=r.object({projectId:r.property("project_id",r.string()),envs:r.list(Ah)});});var Pi,G6=n(()=>{b();Pi=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var zh=n(()=>{J6();H6();G6();});var O6=n(()=>{zh();});var ac={};L(ac,{AgentConfigEnvSetByName:()=>ki,AgentConfigEnvUpdate:()=>Ai,AgentConfigRemoveValues:()=>Pi});var K6=n(()=>{O6();});var nc,Sh=n(()=>{b();nc=r.enum_(["open","resolved","closed"]);});var zi,$6=n(()=>{b();Sh();zi=r.object({projectId:r.property("project_id",r.string()),status:nc});});var V,pe=n(()=>{b();V=r.record(r.string(),r.unknown());});var vh,Th=n(()=>{b();vh=r.enum_(["critical","high","medium","low"]);});var jh,Eh=n(()=>{b();pe();Th();jh=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),tracesQuery:r.property("traces_query",r.string().optional()),severity:vh,count:r.number(),totalCount:r.property("total_count",r.number()),usersImpacted:r.property("users_impacted",r.number()),totalUsers:r.property("total_users",r.number()),metadata:V.optional()});});var Si,Q6=n(()=>{b();Eh();Si=r.object({projectId:r.property("project_id",r.string()),reportDay:r.property("report_day",r.string()),issues:r.list(jh)});});var Ch=n(()=>{$6();Q6();});var Y6=n(()=>{Ch();});var sc,X6=n(()=>{b();sc=r.enum_(["critical","high","medium","low"]);});var pc,Z6=n(()=>{b();pc=r.enum_(["open","resolved","closed"]);});var Ih=n(()=>{Sh();X6();Z6();});var cc={};L(cc,{AgentInsightsIssueUpdate:()=>zi,AgentInsightsIssueUpdateStatus:()=>nc,AgentInsightsReport:()=>Si,FindAgentInsightsIssuesRequestSeverity:()=>sc,FindAgentInsightsIssuesRequestStatus:()=>pc});var q6=n(()=>{Y6();Ih();});var vi,e2=n(()=>{b();vi=r.object({enrolled:r.boolean(),projectIds:r.property("project_ids",r.list(r.string()))});});var Dh=n(()=>{e2();});var r2=n(()=>{Dh();});var lc={};L(lc,{Request:()=>vi});var t2=n(()=>{r2();});var mc,Uh=n(()=>{b();mc=r.enum_(["enabled","disabled"]);});var Ti,o2=n(()=>{b();Uh();Ti=r.object({status:mc});});var Nh=n(()=>{o2();});var i2=n(()=>{Nh();});var Fh=n(()=>{Uh();});var dc={};L(dc,{AgentInsightsJobUpdate:()=>Ti,AgentInsightsJobUpdateStatus:()=>mc});var a2=n(()=>{i2();Fh();});var uc,n2=n(()=>{b();uc=r.enum_(["general","slack","pagerduty"]);});var Bh=n(()=>{n2();});var gc={};L(gc,{GetWebhookExamplesRequestAlertType:()=>uc});var s2=n(()=>{Bh();});var Mh,Wh=n(()=>{b();Mh=r.enum_([">","<","="]);});var Lh,Vh=n(()=>{b();Wh();Lh=r.object({scoreName:r.property("score_name",r.string()),operator:Mh,value:r.number()});});var Jh,Hh=n(()=>{b();Vh();Jh=r.object({conditions:r.list(Lh)});});var Gh,Oh=n(()=>{b();Hh();Gh=r.object({groups:r.list(Jh)});});var Kh,$h=n(()=>{b();Oh();Kh=r.object({enabled:r.boolean().optional(),conditions:Gh.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Qh,Yh=n(()=>{b();Qh=r.enum_(["trace","thread"]);});var ji,Xh=n(()=>{b();$h();Yh();ji=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:Qh,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Kh.optional()});});var Ei,p2=n(()=>{b();Xh();Ei=r.object({annotationQueues:r.property("annotation_queues",r.list(ji))});});var Ci,c2=n(()=>{b();Ci=r.object({ids:r.list(r.string())});});var Zh,qh=n(()=>{b();Zh=r.enum_([">","<","="]);});var ey,ry=n(()=>{b();qh();ey=r.object({scoreName:r.property("score_name",r.string()),operator:Zh,value:r.number()});});var ty,oy=n(()=>{b();ry();ty=r.object({conditions:r.list(ey)});});var iy,ay=n(()=>{b();oy();iy=r.object({groups:r.list(ty)});});var Ii,fc=n(()=>{b();ay();Ii=r.object({enabled:r.boolean().optional(),conditions:iy.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Di,l2=n(()=>{b();fc();Di=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()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Ii.optional()});});var ny=n(()=>{p2();c2();l2();});var m2=n(()=>{ny();});var hc={};L(hc,{AnnotationQueueBatchWrite:()=>Ei,AnnotationQueueItemIdsPublic:()=>Ci,AnnotationQueueUpdate:()=>Di});var d2=n(()=>{m2();});var sy,py=n(()=>{b();sy=r.enum_(["ui","sdk","online_scoring"]);});var cy,ly=n(()=>{b();cy=r.enum_(["passed","failed"]);});var my,dy=n(()=>{b();py();ly();my=r.object({entityId:r.property("entity_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),status:cy,reason:r.string().optional(),source:sy});});var yc,uy=n(()=>{b();yc=r.enum_(["TRACE","SPAN","THREAD"]);});var Ui,u2=n(()=>{b();dy();uy();Ui=r.object({entityType:r.property("entity_type",yc),assertionResults:r.property("assertion_results",r.list(my))});});var gy=n(()=>{u2();});var g2=n(()=>{gy();});var fy=n(()=>{uy();});var bc={};L(bc,{AssertionResultBatch:()=>Ui,AssertionResultBatchEntityType:()=>yc});var f2=n(()=>{g2();fy();});var Rc,hy=n(()=>{b();Rc=r.enum_(["trace","span"]);});var Ni,h2=n(()=>{b();hy();Ni=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",Rc),entityId:r.property("entity_id",r.string()),path:r.string()});});var yy=n(()=>{h2();});var xc={};L(xc,{Request:()=>uie});var uie,y2=n(()=>{b();uie=r.record(r.string(),r.unknown());});var b2=n(()=>{yy();y2();});var wc,R2=n(()=>{b();wc=r.enum_(["trace","span"]);});var _c,x2=n(()=>{b();_c=r.enum_(["trace","span"]);});var kc,w2=n(()=>{b();kc=r.enum_(["trace","span"]);});var by=n(()=>{R2();x2();hy();w2();});var mo={};L(mo,{AttachmentListRequestEntityType:()=>wc,DownloadAttachmentRequestEntityType:()=>_c,StartMultipartUploadRequest:()=>Ni,StartMultipartUploadRequestEntityType:()=>Rc,UploadAttachmentRequestEntityType:()=>kc,uploadAttachment:()=>xc});var _2=n(()=>{b2();by();});var Fi,Ac=n(()=>{b();Fi=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 wr,uo=n(()=>{b();wr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var Bi,Pc=n(()=>{b();pe();Bi=r.object({role:r.string(),content:V});});var Ry,xy=n(()=>{b();Ry=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var wy,_y=n(()=>{b();wy=r.enum_(["text","json_object","json_schema"]);});var ky,Ay=n(()=>{b();xy();_y();ky=r.object({type:wy.optional(),jsonSchema:Ry.optional()});});var Py,zy=n(()=>{b();Py=r.object({includeUsage:r.boolean().optional()});});var Sy,vy=n(()=>{b();Sy=r.enum_(["function"]);});var Ty,jy=n(()=>{b();Ac();vy();Ty=r.object({type:Sy.optional(),function:Fi.optional()});});var Mi,k2=n(()=>{b();Ac();uo();Pc();Ay();zy();jy();Mi=r.object({model:r.string().optional(),messages:r.list(Bi).optional(),temperature:r.number().optional(),topP:r.number().optional(),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:Py.optional(),stop:r.list(r.string()).optional(),maxTokens:r.number().optional(),maxCompletionTokens:r.number().optional(),presencePenalty:r.number().optional(),frequencyPenalty:r.number().optional(),logitBias:r.record(r.string(),r.number()).optional(),user:r.string().optional(),responseFormat:ky.optional(),seed:r.number().optional(),tools:r.list(Ty).optional(),toolChoice:r.record(r.string(),r.unknown()).optional(),parallelToolCalls:r.boolean().optional(),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.string().optional(),serviceTier:r.string().optional(),logprobs:r.boolean().optional(),topLogprobs:r.number().optional(),functions:r.list(Fi).optional(),functionCall:wr.optional()});});var Ey=n(()=>{k2();});var A2=n(()=>{Ey();});var zc={};L(zc,{ChatCompletionRequest:()=>Mi});var P2=n(()=>{A2();});var Cy,Iy=n(()=>{b();Cy=r.enum_(["llm_judge","code_metric"]);});var _r,go=n(()=>{b();Iy();pe();_r=r.object({name:r.string(),type:Cy,config:V});});var qe,ht=n(()=>{b();qe=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Dy,Uy=n(()=>{b();Dy=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var Wi,z2=n(()=>{b();go();ht();Uy();Wi=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Dy),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Ny,Fy=n(()=>{b();Ny=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 Li,S2=n(()=>{b();go();ht();Fy();Li=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Ny),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Vi,v2=n(()=>{b();Vi=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()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var Ji,T2=n(()=>{b();Ji=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Hi,j2=n(()=>{b();Hi=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var By,My=n(()=>{b();By=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Gi,Sc=n(()=>{b();My();Gi=r.object({field:r.string().optional(),operator:By.optional(),key:r.string().optional(),value:r.string().optional()});});var Wy,Ly=n(()=>{b();go();ht();pe();Wy=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:V.optional(),data:V.optional(),description:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var Oi,E2=n(()=>{b();Sc();Ly();Oi=r.object({ids:r.list(r.string()).optional(),filters:r.list(Gi).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:Wy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Vy,Jy=n(()=>{b();Vy=r.enum_(["manual","trace","span","sdk"]);});var Hy,Gy=n(()=>{b();Hy=r.enum_(["llm_judge","code_metric"]);});var Se,kr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Oy,Ky=n(()=>{b();Gy();kr();Oy=r.object({name:r.string(),type:Hy,config:Se});});var $y,Qy=n(()=>{b();$y=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Ki,Yy=n(()=>{b();Jy();Ky();Qy();pe();Ki=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:Vy,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Oy).optional(),executionPolicy:r.property("execution_policy",$y.optional())});});var $i,C2=n(()=>{b();Yy();$i=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(Ki),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var Qi,I2=n(()=>{b();Qi=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()),datasetVersion:r.property("dataset_version",r.string().optional()),projectName:r.property("project_name",r.string().optional()),filters:r.string().optional()});});var Yi,D2=n(()=>{b();Sc();Yi=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Gi).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var vc,Xy=n(()=>{b();vc=r.enum_(["private","public"]);});var Xi,U2=n(()=>{b();Xy();Xi=r.object({name:r.string(),description:r.string().optional(),visibility:vc.optional(),tags:r.list(r.string()).optional()});});var Zi,N2=n(()=>{b();Zi=r.object({versionRef:r.property("version_ref",r.string())});});var qi,F2=n(()=>{b();qi=r.object({versionName:r.property("version_name",r.string())});});var ea,B2=n(()=>{b();ea=r.object({tag:r.string()});});var ra,M2=n(()=>{b();ra=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var Tc,Zy=n(()=>{b();Tc=r.enum_(["dataset","evaluation_suite"]);});var jc,qy=n(()=>{b();jc=r.enum_(["private","public"]);});var ta,W2=n(()=>{b();Zy();qy();ta=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:Tc.optional(),visibility:jc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var eb=n(()=>{z2();S2();v2();T2();j2();E2();C2();I2();D2();U2();N2();F2();B2();M2();W2();});var rb,tb=n(()=>{b();rb=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var fo,ob=n(()=>{b();tb();fo=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:rb.optional(),filePath:r.property("file_path",r.string().optional()),errorMessage:r.property("error_message",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional()),viewedAt:r.property("viewed_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ec={};L(Ec,{Response:()=>gie});var gie,L2=n(()=>{b();ob();gie=r.list(fo);});var V2=n(()=>{L2();eb();});var Cc,J2=n(()=>{b();Cc=r.enum_(["json","jsonl"]);});var ib=n(()=>{J2();Xy();Zy();qy();});var ho={};L(ho,{CreateDatasetItemsFromJsonRequestFormat:()=>Cc,CreateDatasetItemsFromSpansRequest:()=>Wi,CreateDatasetItemsFromTracesRequest:()=>Li,DatasetExpansionWrite:()=>Vi,DatasetIdentifier:()=>Ji,DatasetIdentifierPublic:()=>Hi,DatasetItemBatchUpdate:()=>Oi,DatasetItemBatchWrite:()=>$i,DatasetItemStreamRequest:()=>Qi,DatasetItemsDelete:()=>Yi,DatasetUpdate:()=>Xi,DatasetUpdateVisibility:()=>vc,DatasetVersionRestorePublic:()=>Zi,DatasetVersionRetrieveRequestPublic:()=>qi,DatasetVersionTag:()=>ea,DatasetVersionUpdatePublic:()=>ra,DatasetWrite:()=>ta,DatasetWriteType:()=>Tc,DatasetWriteVisibility:()=>jc,getDatasetExportJobs:()=>Ec});var H2=n(()=>{V2();ib();});var oa,G2=n(()=>{b();oa=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ia,O2=n(()=>{b();ia=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ab=n(()=>{G2();O2();});var K2=n(()=>{ab();});var Ic={};L(Ic,{EnvironmentUpdate:()=>oa,EnvironmentWrite:()=>ia});var $2=n(()=>{K2();});var aa,Dc=n(()=>{b();aa=r.object({name:r.string(),value:r.number()});});var nb,sb=n(()=>{b();nb=r.enum_(["running","completed","cancelled"]);});var pb,cb=n(()=>{b();pb=r.enum_(["regular","trial","mini-batch","mutation"]);});var na,lb=n(()=>{b();Dc();sb();cb();pe();na=r.object({name:r.string().optional(),metadata:V.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),type:pb.optional(),status:nb.optional(),experimentScores:r.property("experiment_scores",r.list(aa).optional())});});var sa,Q2=n(()=>{b();lb();sa=r.object({ids:r.list(r.string()),update:na,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Hr,pa=n(()=>{b();Hr=r.object({id:r.string(),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var mb,db=n(()=>{b();pe();Pc();pa();mb=r.object({model:r.string(),messages:r.list(Bi),configs:r.record(r.string(),V).optional(),promptVersions:r.property("prompt_versions",r.list(Hr).optional()),experimentName:r.property("experiment_name",r.string().optional())});});var ca,Y2=n(()=>{b();db();pa();ca=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(mb),projectName:r.property("project_name",r.string().optional()),datasetId:r.property("dataset_id",r.string()),versionHash:r.property("version_hash",r.string().optional()),promptVersions:r.property("prompt_versions",r.list(Hr).optional())});});var ub,gb=n(()=>{b();ub=r.enum_(["ui","sdk","online_scoring"]);});var fb,hb=n(()=>{b();fb=r.enum_(["ui","sdk","online_scoring"]);});var yb,bb=n(()=>{b();hb();yb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:fb.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Rb,xb=n(()=>{b();gb();bb();Rb=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:ub,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),yb).optional())});});var er,la=n(()=>{b();er=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ma,Uc=n(()=>{b();ma=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var wb,_b=n(()=>{b();wb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kb,Ab=n(()=>{b();kb=r.enum_(["general","tool","llm","guardrail"]);});var Pb,zb=n(()=>{b();Uc();la();_b();Ab();Pb=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:kb.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.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",ma.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()),ttft:r.number().optional(),source:wb.optional(),environment:r.string().optional()});});var Sb,vb=n(()=>{b();Sb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Tb,jb=n(()=>{b();Uc();la();vb();Tb=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:er.optional(),output:er.optional(),metadata:er.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",ma.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Sb.optional(),environment:r.string().optional()});});var Eb,Cb=n(()=>{b();xb();la();zb();jb();Eb=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",er.optional()),trace:Tb.optional(),spans:r.list(Pb).optional(),feedbackScores:r.property("feedback_scores",r.list(Rb).optional())});});var da,X2=n(()=>{b();Cb();da=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(Eb)});});var ua,Z2=n(()=>{b();ua=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(),projectName:r.property("project_name",r.string().optional())});});var Ib,Db=n(()=>{b();Ib=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var ge,yt=n(()=>{b();ge=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 Ub,Nb=n(()=>{b();Ub=r.enum_(["passed","failed"]);});var Fb,Bb=n(()=>{b();Fb=r.enum_(["default","hidden"]);});var Mb,Wb=n(()=>{b();Mb=r.enum_(["ui","sdk","online_scoring"]);});var Lb,Vb=n(()=>{b();Lb=r.enum_(["ui","sdk","online_scoring"]);});var Jb,Hb=n(()=>{b();Vb();Jb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Lb.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Pe,bt=n(()=>{b();Wb();Hb();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Mb,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Jb).optional())});});var le,Ye=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ga,Nc=n(()=>{b();Db();yt();ht();Nb();Bb();bt();Ye();ga=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()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),traceMetadata:r.property("trace_metadata",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).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",Fb.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",qe.optional()),assertionResults:r.property("assertion_results",r.list(Ib).optional()),status:Ub.optional()});});var fa,q2=n(()=>{b();Nc();fa=r.object({experimentItems:r.property("experiment_items",r.list(ga))});});var ha,eY=n(()=>{b();ha=r.object({ids:r.list(r.string())});});var ya,rY=n(()=>{b();ya=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Gb,Ob=n(()=>{b();Gb=r.object({name:r.string(),value:r.number()});});var Je,yo=n(()=>{b();Je=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Fc,Kb=n(()=>{b();Fc=r.object({id:r.string()});});var Bc,$b=n(()=>{b();Bc=r.enum_(["dataset","evaluation_suite"]);});var Mc,Qb=n(()=>{b();Mc=r.enum_(["running","completed","cancelled"]);});var Wc,Yb=n(()=>{b();Wc=r.enum_(["regular","trial","mini-batch","mutation"]);});var ba,tY=n(()=>{b();Ob();yo();Kb();$b();Qb();Yb();ba=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),type:Wc.optional(),evaluationMethod:r.property("evaluation_method",Bc.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Mc.optional(),experimentScores:r.property("experiment_scores",r.list(Gb).optional()),promptVersion:r.property("prompt_version",Fc.optional()),promptVersions:r.property("prompt_versions",r.list(Fc).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var Xb=n(()=>{Q2();Y2();X2();Z2();q2();eY();rY();tY();});var oY=n(()=>{Xb();});var Zb=n(()=>{$b();Qb();Yb();});var Lc={};L(Lc,{ExperimentBatchUpdate:()=>sa,ExperimentExecutionRequest:()=>ca,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>da,ExperimentItemStreamRequest:()=>ua,ExperimentItemsBatch:()=>fa,ExperimentItemsDelete:()=>ha,ExperimentStreamRequestPublic:()=>ya,ExperimentWrite:()=>ba,ExperimentWriteEvaluationMethod:()=>Bc,ExperimentWriteStatus:()=>Mc,ExperimentWriteType:()=>Wc});var iY=n(()=>{oY();Zb();});var Vc,aY=n(()=>{b();Vc=r.enum_(["numerical","categorical","boolean"]);});var qb=n(()=>{aY();});var Jc={};L(Jc,{FindFeedbackDefinitionsRequestType:()=>Vc});var nY=n(()=>{qb();});var eR,rR=n(()=>{b();eR=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var tR,oR=n(()=>{b();tR=r.enum_(["passed","failed"]);});var iR,aR=n(()=>{b();rR();oR();pe();iR=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:eR,result:tR,config:V,details:V});});var Ra,sY=n(()=>{b();aR();Ra=r.object({guardrails:r.list(iR)});});var nR=n(()=>{sY();});var pY=n(()=>{nR();});var Hc={};L(Hc,{GuardrailBatchWrite:()=>Ra});var cY=n(()=>{pY();});var Gc={};L(Gc,{Response:()=>fie});var fie,lY=n(()=>{b();fie=r.string();});var mY=n(()=>{lY();});var bo={};L(bo,{getLlmModels:()=>Gc});var dY=n(()=>{mY();});var sR,pR=n(()=>{b();sR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var cR,lR=n(()=>{b();cR=r.enum_(["form","json","basic"]);});var Rt,xa=n(()=>{b();pR();lR();Rt=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",cR.optional()),credentials:r.list(sR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var wa,uY=n(()=>{b();xa();wa=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()),authConfig:r.property("auth_config",Rt.optional())});});var mR,dR=n(()=>{b();mR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var uR,gR=n(()=>{b();uR=r.enum_(["form","json","basic"]);});var fR,hR=n(()=>{b();dR();gR();fR=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",uR.optional()),credentials:r.list(mR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Oc,yR=n(()=>{b();Oc=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var _a,gY=n(()=>{b();hR();yR();_a=r.object({provider:Oc,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()),authConfig:r.property("auth_config",fR.optional())});});var ka,fY=n(()=>{b();xa();ka=r.object({providerId:r.property("provider_id",r.string().optional()),authConfig:r.property("auth_config",Rt.optional())});});var bR=n(()=>{uY();gY();fY();});var hY=n(()=>{bR();});var RR=n(()=>{yR();});var Kc={};L(Kc,{ProviderApiKeyUpdate:()=>wa,ProviderApiKeyWrite:()=>_a,ProviderApiKeyWriteProvider:()=>Oc,ProviderAuthCheck:()=>ka});var yY=n(()=>{hY();RR();});var Aa,bY=n(()=>{b();Aa=r.object({clientName:r.property("client_name",r.string()),redirectUris:r.property("redirect_uris",r.list(r.string())),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional())});});var Pa,RY=n(()=>{b();Pa=r.object({clientId:r.property("client_id",r.string()),redirectUri:r.property("redirect_uri",r.string()),codeChallenge:r.property("code_challenge",r.string()),codeChallengeMethod:r.property("code_challenge_method",r.string()),resource:r.string(),state:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),csrf:r.string().optional()});});var za,xY=n(()=>{b();za=r.object({token:r.string().optional(),clientId:r.property("client_id",r.string().optional())});});var Sa,wY=n(()=>{b();Sa=r.object({grantType:r.property("grant_type",r.string().optional()),code:r.string().optional(),redirectUri:r.property("redirect_uri",r.string().optional()),clientId:r.property("client_id",r.string().optional()),codeVerifier:r.property("code_verifier",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional())});});var xR=n(()=>{bY();RY();xY();wY();});var _Y=n(()=>{xR();});var $c={};L($c,{ClientRegistrationRequest:()=>Aa,ConsentRequest:()=>Pa,RevokeRequest:()=>za,TokenRequest:()=>Sa});var kY=n(()=>{_Y();});var wR,_R=n(()=>{b();wR=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var Qc={};L(Qc,{Response:()=>hie});var hie,AY=n(()=>{b();_R();hie=r.list(wR);});var PY=n(()=>{AY();});var Ro={};L(Ro,{listModels:()=>Qc});var zY=n(()=>{PY();});var He,Gr=n(()=>{b();He=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Yc,kR=n(()=>{b();Yc=r.enum_(["running","completed","cancelled","initialized","error"]);});var va,SY=n(()=>{b();Gr();Ye();kR();va=r.object({name:r.string().optional(),status:Yc.optional(),errorInfo:r.property("error_info",He.optional()),metadata:le.optional()});});var AR=n(()=>{SY();});var vY=n(()=>{AR();});var PR=n(()=>{kR();});var Xc={};L(Xc,{OptimizationUpdate:()=>va,OptimizationUpdateStatus:()=>Yc});var TY=n(()=>{vY();PR();});var Ta,jY=n(()=>{b();Ta=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Zc,zR=n(()=>{b();Zc=r.enum_(["connect","endpoint"]);});var ja,EY=n(()=>{b();zR();ja=r.object({projectId:r.property("project_id",r.string()),activationKey:r.property("activation_key",r.string()),ttlSeconds:r.property("ttl_seconds",r.number().optional()),type:Zc});});var SR=n(()=>{jY();EY();});var CY=n(()=>{SR();});var vR=n(()=>{zR();});var qc={};L(qc,{ActivateRequest:()=>Ta,CreateSessionRequest:()=>ja,CreateSessionRequestType:()=>Zc});var IY=n(()=>{CY();vR();});var el,TR=n(()=>{b();el=r.enum_(["traces","spans","threads"]);});var Ea,DY=n(()=>{b();TR();Ea=r.object({entityType:r.property("entity_type",el),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var jR,ER=n(()=>{b();jR=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var CR,IR=n(()=>{b();ER();CR=r.object({field:jR.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var DR,UR=n(()=>{b();DR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Ar,xo=n(()=>{b();UR();Ar=r.object({field:r.string().optional(),operator:DR.optional(),key:r.string().optional(),value:r.string().optional()});});var NR,FR=n(()=>{b();NR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Pr,wo=n(()=>{b();FR();Pr=r.object({field:r.string().optional(),operator:NR.optional(),key:r.string().optional(),value:r.string().optional()});});var BR,MR=n(()=>{b();BR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var xt,Ca=n(()=>{b();MR();xt=r.object({field:r.string().optional(),operator:BR.optional(),key:r.string().optional(),value:r.string().optional()});});var rl,WR=n(()=>{b();rl=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var tl,LR=n(()=>{b();tl=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var Ia,UY=n(()=>{b();IR();xo();wo();Ca();WR();LR();Ia=r.object({metricType:r.property("metric_type",tl.optional()),interval:rl.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(Ar).optional()),traceFilters:r.property("trace_filters",r.list(Pr).optional()),threadFilters:r.property("thread_filters",r.list(xt).optional()),breakdown:CR.optional()});});var Da,NY=n(()=>{b();Da=r.object({name:r.string(),includeStats:r.boolean().optional()});});var ol,VR=n(()=>{b();ol=r.enum_(["private","public"]);});var Ua,FY=n(()=>{b();VR();Ua=r.object({name:r.string().optional(),description:r.string().optional(),visibility:ol.optional()});});var il,JR=n(()=>{b();il=r.enum_(["private","public"]);});var Na,BY=n(()=>{b();JR();Na=r.object({name:r.string(),visibility:il.optional(),description:r.string().optional()});});var HR=n(()=>{DY();UY();NY();FY();BY();});var MY=n(()=>{HR();});var GR=n(()=>{TR();WR();LR();VR();JR();});var al={};L(al,{KpiCardRequest:()=>Ea,KpiCardRequestEntityType:()=>el,ProjectMetricRequestPublic:()=>Ia,ProjectMetricRequestPublicInterval:()=>rl,ProjectMetricRequestPublicMetricType:()=>tl,ProjectRetrieveDetailed:()=>Da,ProjectUpdate:()=>Ua,ProjectUpdateVisibility:()=>ol,ProjectWrite:()=>Na,ProjectWriteVisibility:()=>il});var WY=n(()=>{MY();GR();});var OR,KR=n(()=>{b();OR=r.record(r.string(),r.unknown());});var $R,QR=n(()=>{b();$R=r.enum_(["text","chat"]);});var YR,XR=n(()=>{b();YR=r.enum_(["mustache","jinja2","python"]);});var ZR,qR=n(()=>{b();ZR=r.enum_(["prompt_version","mask"]);});var De,Fa=n(()=>{b();KR();QR();XR();qR();De=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:OR.optional(),type:YR.optional(),versionType:r.property("version_type",ZR.optional()),environment:r.string().optional(),environments:r.list(r.string()).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",$R.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var nl,ex=n(()=>{b();nl=r.enum_(["text","chat"]);});var Ba,LY=n(()=>{b();Fa();ex();Ba=r.object({name:r.string(),version:De,templateStructure:r.property("template_structure",nl.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Ma,VY=n(()=>{b();Ma=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var rx,tx=n(()=>{b();rx=r.object({tags:r.list(r.string()).optional()});});var Wa,JY=n(()=>{b();tx();Wa=r.object({ids:r.list(r.string()),update:rx,mergeTags:r.property("merge_tags",r.boolean().optional())});});var La,HY=n(()=>{b();La=r.object({commits:r.list(r.string())});});var Va,GY=n(()=>{b();Va=r.object({environments:r.list(r.string())});});var Ja,OY=n(()=>{b();Ja=r.object({ids:r.list(r.string())});});var Ha,KY=n(()=>{b();Ha=r.object({name:r.string(),commit:r.string().optional(),environment:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var sl,ox=n(()=>{b();sl=r.enum_(["text","chat"]);});var pl,ix=n(()=>{b();pl=r.enum_(["mustache","jinja2","python"]);});var Ga,$Y=n(()=>{b();kr();ox();ix();Ga=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:Se.optional(),changeDescription:r.property("change_description",r.string().optional()),type:pl.optional(),templateStructure:r.property("template_structure",sl.optional()),tags:r.list(r.string()).optional()});});var ax=n(()=>{LY();VY();JY();HY();GY();OY();KY();$Y();});var _o,cl=n(()=>{b();_o=r.object({promptVersionId:r.property("prompt_version_id",r.string().optional()),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var ll={};L(ll,{Response:()=>yie});var yie,QY=n(()=>{b();cl();yie=r.list(_o);});var ml={};L(ml,{Response:()=>bie});var bie,YY=n(()=>{b();Fa();bie=r.list(De);});var XY=n(()=>{QY();ax();YY();});var nx=n(()=>{ex();ox();ix();});var wt={};L(wt,{CreatePromptVersionDetail:()=>Ba,CreatePromptVersionDetailTemplateStructure:()=>nl,PromptUpdatable:()=>Ma,PromptVersionBatchUpdate:()=>Wa,PromptVersionCommitsRequestPublic:()=>La,PromptVersionEnvironmentUpdate:()=>Va,PromptVersionIdsRequestDetail:()=>Ja,PromptVersionRetrieveDetail:()=>Ha,PromptWrite:()=>Ga,PromptWriteTemplateStructure:()=>sl,PromptWriteType:()=>pl,getPromptsByCommits:()=>ll,retrievePromptVersionsByIds:()=>ml});var ZY=n(()=>{XY();nx();});var dl,qY=n(()=>{b();dl=r.enum_(["agent_insights"]);});var sx=n(()=>{qY();});var ul={};L(ul,{FindReportFailuresRequestType:()=>dl});var e9=n(()=>{sx();});var gl,px=n(()=>{b();gl=r.enum_(["pending","completed","failed"]);});var Oa,r9=n(()=>{b();pe();px();Oa=r.object({content:r.string().optional(),status:gl,sessionId:r.property("session_id",r.string().optional()),recommendedActions:r.property("recommended_actions",V.optional()),failureReason:r.property("failure_reason",r.string().optional())});});var cx=n(()=>{r9();});var t9=n(()=>{cx();});var lx=n(()=>{px();});var fl={};L(fl,{ReportCompleteRequest:()=>Oa,ReportCompleteRequestStatus:()=>gl});var o9=n(()=>{t9();lx();});var hl,mx=n(()=>{b();hl=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ka,i9=n(()=>{b();mx();Ka=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:hl,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var dx=n(()=>{i9();});var a9=n(()=>{dx();});var ux=n(()=>{mx();});var yl={};L(yl,{RetentionRuleWrite:()=>Ka,RetentionRuleWriteRetention:()=>hl});var n9=n(()=>{a9();ux();});var $a,s9=n(()=>{b();$a=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var bl,gx=n(()=>{b();bl=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Qa,p9=n(()=>{b();pe();gx();Qa=r.object({status:bl,result:V.optional(),error:V.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var Rl,fx=n(()=>{b();Rl=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Ya,c9=n(()=>{b();pe();fx();Ya=r.object({type:Rl,args:V,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var Xa,xl=n(()=>{b();Xa=r.object({datasetId:r.property("dataset_id",r.string().optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetItemVersionId:r.property("dataset_item_version_id",r.string().optional()),datasetItemId:r.property("dataset_item_id",r.string().optional())});});var Za,l9=n(()=>{b();pe();xl();Za=r.object({agentName:r.property("agent_name",r.string()),inputs:V.optional(),projectId:r.property("project_id",r.string()),maskId:r.property("mask_id",r.string().optional()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:Xa.optional()});});var qa,m9=n(()=>{b();qa=r.object({capabilities:r.list(r.string()).optional()});});var wl,hx=n(()=>{b();wl=r.enum_(["pending","running","completed","failed","cancelled"]);});var en,d9=n(()=>{b();pe();hx();en=r.object({status:wl,result:V.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var yx=n(()=>{s9();p9();c9();l9();m9();d9();});var rn,_l=n(()=>{b();rn=r.object({stream:r.string(),text:r.string()});});var kl={};L(kl,{Request:()=>Rie});var Rie,u9=n(()=>{b();_l();Rie=r.list(rn);});var Al={};L(Al,{Response:()=>xie});var xie,g9=n(()=>{b();_l();xie=r.list(rn);});var bx,Rx=n(()=>{b();bx=r.enum_(["pending","running","completed","failed","cancelled"]);});var _t,Pl=n(()=>{b();pe();xl();Rx();_t=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:bx.optional(),inputs:V.optional(),result:V.optional(),error:r.string().optional(),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),maskId:r.property("mask_id",r.string().optional()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:Xa.optional(),timeout:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),startedAt:r.property("started_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional())});});var zl={};L(zl,{Response:()=>wie});var wie,f9=n(()=>{Pl();wie=_t.nullable();});var Sl={};L(Sl,{Request:()=>_ie});var _ie,h9=n(()=>{b();_ie=r.record(r.string(),r.unknown());});var vl={};L(vl,{Request:()=>kie});var kie,y9=n(()=>{b();kie=r.record(r.string(),r.unknown());});var b9=n(()=>{u9();g9();f9();h9();y9();yx();});var Tl,R9=n(()=>{b();Tl=r.enum_(["pairing","connected","disconnected"]);});var xx=n(()=>{gx();fx();R9();hx();});var ur={};L(ur,{BridgeCommandNextRequest:()=>$a,BridgeCommandResultRequest:()=>Qa,BridgeCommandResultRequestStatus:()=>bl,BridgeCommandSubmitRequest:()=>Ya,BridgeCommandSubmitRequestType:()=>Rl,CreateLocalRunnerJobRequest:()=>Za,ListRunnersRequestStatus:()=>Tl,LocalRunnerHeartbeatRequest:()=>qa,LocalRunnerJobResultRequest:()=>en,LocalRunnerJobResultRequestStatus:()=>wl,appendJobLogs:()=>kl,getJobLogs:()=>Al,nextJob:()=>zl,patchChecklist:()=>Sl,registerAgents:()=>vl});var x9=n(()=>{b9();xx();});var wx,_x=n(()=>{b();wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kx,Ax=n(()=>{b();kx=r.enum_(["general","tool","llm","guardrail"]);});var tn,Px=n(()=>{b();Gr();Ye();_x();Ax();tn=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:kx.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",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",He.optional()),ttft:r.number().optional(),source:wx.optional(),environment:r.string().optional()});});var on,w9=n(()=>{b();Px();on=r.object({ids:r.list(r.string()),update:tn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var kt,an=n(()=>{b();kt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var zx,Sx=n(()=>{b();zx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vx,Tx=n(()=>{b();vx=r.enum_(["general","tool","llm","guardrail"]);});var nn,jx=n(()=>{b();an();yo();Sx();Tx();nn=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:vx.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.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",kt.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()),ttft:r.number().optional(),source:zx.optional(),environment:r.string().optional()});});var sn,_9=n(()=>{b();jx();sn=r.object({spans:r.list(nn)});});var jl,Ex=n(()=>{b();jl=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source","environment"]);});var El,Cx=n(()=>{b();El=r.enum_(["general","tool","llm","guardrail"]);});var pn,k9=n(()=>{b();xo();Ex();Cx();pn=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:El.optional(),filters:r.list(Ar).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(jl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Ix=n(()=>{w9();_9();k9();});var A9=n(()=>{Ix();});var Cl,P9=n(()=>{b();Cl=r.enum_(["general","tool","llm","guardrail"]);});var Il,z9=n(()=>{b();Il=r.enum_(["general","tool","llm","guardrail"]);});var Dl,S9=n(()=>{b();Dl=r.enum_(["general","tool","llm","guardrail"]);});var Dx=n(()=>{P9();z9();S9();Ex();Cx();});var Ul={};L(Ul,{FindFeedbackScoreNames1RequestType:()=>Cl,GetSpanStatsRequestType:()=>Il,GetSpansByProjectRequestType:()=>Dl,SpanBatchUpdate:()=>on,SpanBatchWrite:()=>sn,SpanSearchStreamRequestPublic:()=>pn,SpanSearchStreamRequestPublicExcludeItem:()=>jl,SpanSearchStreamRequestPublicType:()=>El});var v9=n(()=>{A9();Dx();});var cn,T9=n(()=>{b();cn=r.object({query:r.string()});});var ln,j9=n(()=>{b();ln=r.object({query:r.string(),projectId:r.property("project_id",r.string().optional())});});var Ux=n(()=>{T9();j9();});var E9=n(()=>{Ux();});var Nl={};L(Nl,{AnalyticsQueryRequest:()=>cn,ScopedAnalyticsQueryRequest:()=>ln});var C9=n(()=>{E9();});var mn,I9=n(()=>{b();mn=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var dn,D9=n(()=>{b();dn=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(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var un,U9=n(()=>{b();un=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 Nx,Fx=n(()=>{b();Nx=r.enum_(["ui","sdk","online_scoring"]);});var Bx,Mx=n(()=>{b();Fx();Bx=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:Nx,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),threadId:r.property("thread_id",r.string())});});var gn,N9=n(()=>{b();Mx();gn=r.object({scores:r.list(Bx)});});var Wx,Lx=n(()=>{b();Wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var fn,Vx=n(()=>{b();Gr();Ye();Lx();fn=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:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",He.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:Wx.optional(),environment:r.string().optional()});});var hn,F9=n(()=>{b();Vx();hn=r.object({ids:r.list(r.string()),update:fn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Jx,Hx=n(()=>{b();Jx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var yn,Gx=n(()=>{b();an();yo();Hx();yn=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:Je.optional(),output:Je.optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",kt.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Jx.optional(),environment:r.string().optional()});});var bn,B9=n(()=>{b();Gx();bn=r.object({traces:r.list(yn)});});var Fl,Ox=n(()=>{b();Fl=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source","environment"]);});var Rn,M9=n(()=>{b();wo();Ox();Rn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Pr).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()),exclude:r.list(Fl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var xn,W9=n(()=>{b();xn=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 wn,Kx=n(()=>{b();wn=r.object({tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional())});});var _n,L9=n(()=>{b();Kx();_n=r.object({ids:r.list(r.string()),update:wn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var $x,Qx=n(()=>{b();$x=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rr,At=n(()=>{b();Qx();rr=r.object({field:r.string().optional(),operator:$x.optional(),key:r.string().optional(),value:r.string().optional()});});var kn,V9=n(()=>{b();At();kn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(rr).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 Yx=n(()=>{I9();D9();U9();N9();F9();B9();M9();W9();L9();V9();});var J9=n(()=>{Yx();});var Xx=n(()=>{Ox();});var Bl={};L(Bl,{BatchDeleteByProject:()=>mn,DeleteThreadFeedbackScores:()=>dn,DeleteTraceThreads:()=>un,FeedbackScoreBatchThread:()=>gn,TraceBatchUpdate:()=>hn,TraceBatchWrite:()=>bn,TraceSearchStreamRequestPublic:()=>Rn,TraceSearchStreamRequestPublicExcludeItem:()=>Fl,TraceThreadBatchIdentifier:()=>xn,TraceThreadBatchUpdate:()=>_n,TraceThreadSearchStreamRequest:()=>kn});var H9=n(()=>{J9();Xx();});var An,G9=n(()=>{b();An=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 Zx=n(()=>{G9();});var O9=n(()=>{Zx();});var Ml={};L(Ml,{WelcomeWizardSubmission:()=>An});var K9=n(()=>{O9();});var qx,ew=n(()=>{b();qx=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var rw,tw=n(()=>{b();ew();rw=r.object({field:qx.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ow,iw=n(()=>{b();ow=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var tr,Pt=n(()=>{b();iw();tr=r.object({field:r.string().optional(),operator:ow.optional(),key:r.string().optional(),value:r.string().optional()});});var Wl,aw=n(()=>{b();Wl=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Ll,nw=n(()=>{b();Ll=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var Pn,$9=n(()=>{b();tw();Pt();aw();nw();Pn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),metricType:r.property("metric_type",Ll.optional()),interval:Wl.optional(),breakdown:rw.optional(),filters:r.list(tr).optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var zn,Q9=n(()=>{b();zn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional())});});var sw=n(()=>{$9();Q9();});var Y9=n(()=>{sw();});var pw=n(()=>{aw();nw();});var Vl={};L(Vl,{WorkspaceSpanMetricRequest:()=>Pn,WorkspaceSpanMetricRequestInterval:()=>Wl,WorkspaceSpanMetricRequestMetricType:()=>Ll,WorkspaceTokenUsageNamesRequest:()=>zn});var X9=n(()=>{Y9();pw();});var Z9=n(()=>{zh();K6();Ch();q6();Ih();Dh();t2();Nh();a2();Fh();s2();Bh();ny();d2();gy();f2();fy();yy();_2();by();Ey();P2();eb();H2();ib();ab();$2();Xb();iY();Zb();nY();qb();nR();cY();dY();bR();yY();RR();xR();kY();zY();AR();TY();PR();SR();IY();vR();HR();WY();GR();ax();ZY();nx();e9();sx();cx();o9();lx();dx();n9();ux();yx();x9();xx();Ix();v9();Dx();Ux();C9();Yx();H9();Xx();Zx();K9();sw();X9();pw();});var cw,lw=n(()=>{b();cw=r.enum_(["required","optional"]);});var mw,dw=n(()=>{b();lw();mw=r.object({name:r.string(),type:r.string(),presence:cw.optional()});});var uw,gw=n(()=>{b();dw();uw=r.object({name:r.string().optional(),description:r.string().optional(),language:r.string().optional(),executable:r.string().optional(),sourceFile:r.property("source_file",r.string().optional()),params:r.list(mw).optional(),timeout:r.number().optional()});});var fw,hw=n(()=>{b();fw=r.enum_(["blueprint","mask"]);});var yw,bw=n(()=>{b();yw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Rw,xw=n(()=>{b();bw();Rw=r.object({key:r.string(),value:r.string().optional(),type:yw,description:r.string().optional()});});var ww,_w=n(()=>{b();hw();xw();ww=r.object({id:r.string().optional(),name:r.string().optional(),type:fw,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Rw)});});var kw,Aw=n(()=>{b();kw=r.enum_(["blueprint","mask"]);});var Pw,zw=n(()=>{b();Pw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Sw,vw=n(()=>{b();zw();Sw=r.object({key:r.string(),value:r.string().optional(),type:Pw,description:r.string().optional()});});var zt,q9=n(()=>{b();Aw();vw();zt=r.object({id:r.string().optional(),name:r.string().optional(),type:kw,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Sw)});});var Tw,jw=n(()=>{b();Tw=r.enum_(["blueprint","mask"]);});var Ew,Cw=n(()=>{b();Ew=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Iw,Dw=n(()=>{b();Cw();Iw=r.object({key:r.string(),value:r.string().optional(),type:Ew,description:r.string().optional()});});var Uw,Nw=n(()=>{b();jw();Dw();Uw=r.object({id:r.string().optional(),type:Tw,description:r.string().optional(),values:r.list(Iw)});});var Jl,eX=n(()=>{b();Nw();Jl=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Uw});});var Fw,Bw=n(()=>{b();Fw=r.enum_(["critical","high","medium","low"]);});var Mw,Ww=n(()=>{b();Mw=r.enum_(["open","resolved","closed"]);});var Lw,Vw=n(()=>{b();Bw();Ww();Lw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Mw.optional(),severity:Fw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),totalOccurrences:r.property("total_occurrences",r.number().optional()),latestCount:r.property("latest_count",r.number().optional()),total:r.number().optional(),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),firstSeen:r.property("first_seen",r.string().optional()),lastSeen:r.property("last_seen",r.string().optional()),daysReported:r.property("days_reported",r.number().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var Jw,Hw=n(()=>{b();pe();Jw=r.object({reportDay:r.property("report_day",r.string().optional()),count:r.number().optional(),totalCount:r.property("total_count",r.number().optional()),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),metadata:V.optional()});});var Gw,rX=n(()=>{b();Vw();Gw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Lw).optional()});});var Ow,Kw=n(()=>{b();Ow=r.enum_(["critical","high","medium","low"]);});var $w,Qw=n(()=>{b();$w=r.enum_(["open","resolved","closed"]);});var Yw,tX=n(()=>{b();Hw();Kw();Qw();Yw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:$w.optional(),severity:Ow.optional(),tracesQuery:r.property("traces_query",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),details:r.list(Jw).optional()});});var Xw,Zw=n(()=>{b();Xw=r.enum_(["enabled","disabled"]);});var Sn,oX=n(()=>{b();Zw();Sn=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:Xw.optional(),autoFirstRunEnrolled:r.property("auto_first_run_enrolled",r.boolean().optional()),autoFirstRunAt:r.property("auto_first_run_at",r.date().optional()),lastScanAt:r.property("last_scan_at",r.date().optional()),lastFailureReason:r.property("last_failure_reason",r.string().optional()),lastFailureDetail:r.property("last_failure_detail",r.string().optional()),lastFailedAt:r.property("last_failed_at",r.date().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 ve,Or=n(()=>{b();ve=r.object({name:r.string(),value:r.number()});});var zr,ko=n(()=>{b();zr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var qw,e_=n(()=>{b();Or();ko();qw=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:zr.optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var r_,t_=n(()=>{b();r_=r.enum_(["general","slack","pagerduty"]);});var o_,i_=n(()=>{b();o_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var a_,n_=n(()=>{b();i_();a_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:o_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",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 s_,p_=n(()=>{b();s_=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 c_,l_=n(()=>{b();n_();p_();c_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",s_),triggerConfigs:r.property("trigger_configs",r.list(a_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var m_,d_=n(()=>{b();m_=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 Aie,iX=n(()=>{b();t_();l_();d_();Aie=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",r_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:m_,triggers:r.list(c_).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()),projectId:r.property("project_id",r.string().optional())});});var u_,g_=n(()=>{b();u_=r.enum_(["general","slack","pagerduty"]);});var f_,h_=n(()=>{b();f_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var y_,b_=n(()=>{b();h_();y_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:f_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",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 R_,x_=n(()=>{b();R_=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 w_,__=n(()=>{b();b_();x_();w_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",R_),triggerConfigs:r.property("trigger_configs",r.list(y_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var k_,A_=n(()=>{b();k_=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 vn,P_=n(()=>{b();g_();__();A_();vn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",u_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:k_,triggers:r.list(w_).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()),projectId:r.property("project_id",r.string().optional())});});var Tn,aX=n(()=>{b();P_();Tn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vn).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var z_,S_=n(()=>{b();z_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var v_,T_=n(()=>{b();S_();v_=r.object({id:r.string().optional(),type:z_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional())});});var j_,E_=n(()=>{b();j_=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 C_,I_=n(()=>{b();T_();E_();C_=r.object({id:r.string().optional(),eventType:r.property("event_type",j_),triggerConfigs:r.property("trigger_configs",r.list(v_).optional())});});var D_,U_=n(()=>{b();D_=r.enum_(["general","slack","pagerduty"]);});var N_,F_=n(()=>{b();N_=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 jn,nX=n(()=>{b();I_();U_();F_();jn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",D_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:N_,triggers:r.list(C_).optional(),projectId:r.property("project_id",r.string().optional())});});var Hl,sX=n(()=>{b();pe();Hl=r.object({results:r.list(V).optional()});});var B_,M_=n(()=>{b();B_=r.object({username:r.string().optional(),status:r.number().optional()});});var W_,L_=n(()=>{b();W_=r.enum_(["trace","thread"]);});var V_,J_=n(()=>{b();fc();M_();L_();Or();V_=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:W_,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Ii.optional(),reviewers:r.list(B_).optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var H_,G_=n(()=>{b();H_=r.enum_([">","<","="]);});var O_,K_=n(()=>{b();G_();O_=r.object({scoreName:r.property("score_name",r.string()),operator:H_,value:r.number()});});var $_,Q_=n(()=>{b();K_();$_=r.object({conditions:r.list(O_)});});var Y_,X_=n(()=>{b();Q_();Y_=r.object({groups:r.list($_)});});var Z_,q_=n(()=>{b();X_();Z_=r.object({enabled:r.boolean().optional(),conditions:Y_.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Pie,pX=n(()=>{b();J_();Pie=r.object({annotationQueues:r.property("annotation_queues",r.list(V_))});});var Gl,cX=n(()=>{b();Gl=r.object({ids:r.list(r.string())});});var ek,rk=n(()=>{b();ek=r.enum_(["manual","automated"]);});var tk,ok=n(()=>{b();rk();tk=r.object({id:r.string().optional(),source:ek.optional()});});var ik,lX=n(()=>{b();ok();ik=r.object({content:r.list(tk).optional()});});var ak,nk=n(()=>{b();ak=r.enum_(["trace","thread"]);});var sk,pk=n(()=>{b();sk=r.object({username:r.string().optional(),status:r.number().optional()});});var Kr,En=n(()=>{b();Kr=r.object({name:r.string(),value:r.number()});});var Cn,ck=n(()=>{b();q_();nk();pk();En();Cn=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:ak,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Z_.optional(),reviewers:r.list(sk).optional(),feedbackScores:r.property("feedback_scores",r.list(Kr).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 lk,mX=n(()=>{b();ck();lk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cn).optional(),sortableBy:r.list(r.string()).optional()});});var mk,dk=n(()=>{b();mk=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var uk,gk=n(()=>{b();uk=r.object({name:r.string(),value:r.number()});});var fk,hk=n(()=>{b();fk=r.object({name:r.string(),value:r.number()});});var yk,bk=n(()=>{b();yk=r.enum_(["system","user","assistant","tool","function"]);});var Rk,xk=n(()=>{b();Rk=r.enum_(["function"]);});var In,Ol=n(()=>{b();uo();xk();In=r.object({id:r.string().optional(),index:r.number().optional(),type:Rk.optional(),function:wr.optional()});});var wk,_k=n(()=>{b();bk();uo();Ol();wk=r.object({role:yk.optional(),content:r.string().optional(),reasoningContent:r.string().optional(),name:r.string().optional(),toolCalls:r.list(In).optional(),refusal:r.string().optional(),functionCall:wr.optional()});});var kk,Ak=n(()=>{b();kk=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 Pk,dX=n(()=>{b();Ak();Pk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(kk).optional(),sortableBy:r.list(r.string()).optional()});});var zk,Sk=n(()=>{b();zk=r.object({url:r.string()});});var vk,Tk=n(()=>{b();vk=r.object({url:r.string()});});var jk,Ek=n(()=>{b();jk=r.object({url:r.string()});});var Ck,uX=n(()=>{b();Ck=r.record(r.string(),r.unknown());});var Ik,gX=n(()=>{b();Ik=r.object({issuer:r.string().optional(),authorizationEndpoint:r.property("authorization_endpoint",r.string().optional()),tokenEndpoint:r.property("token_endpoint",r.string().optional()),revocationEndpoint:r.property("revocation_endpoint",r.string().optional()),registrationEndpoint:r.property("registration_endpoint",r.string().optional()),responseTypesSupported:r.property("response_types_supported",r.list(r.string()).optional()),grantTypesSupported:r.property("grant_types_supported",r.list(r.string()).optional()),codeChallengeMethodsSupported:r.property("code_challenge_methods_supported",r.list(r.string()).optional()),tokenEndpointAuthMethodsSupported:r.property("token_endpoint_auth_methods_supported",r.list(r.string()).optional())});});var Dk,Uk=n(()=>{b();Dk=r.object({id:r.string().optional(),name:r.string().optional(),isDefault:r.property("is_default",r.boolean().optional())});});var Nk,fX=n(()=>{b();Uk();Nk=r.object({clientName:r.property("client_name",r.string().optional()),clientLogoUri:r.property("client_logo_uri",r.string().optional()),workspaces:r.list(Dk).optional(),csrfToken:r.property("csrf_token",r.string().optional())});});var Fk,Bk=n(()=>{b();Fk=r.enum_(["evaluator","annotation_queue_router"]);});var Mk,Wk=n(()=>{b();Mk=r.object({url:r.string(),detail:r.string().optional()});});var Lk,Vk=n(()=>{b();Lk=r.object({url:r.string()});});var Jk,Hk=n(()=>{b();Sk();Wk();Vk();Jk=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Mk.optional()),videoUrl:r.property("video_url",Lk.optional()),audioUrl:r.property("audio_url",zk.optional())});});var Gk,Ok=n(()=>{b();Gk=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var St,Dn=n(()=>{b();Hk();Ok();St=r.object({role:Gk,content:r.string().optional(),contentArray:r.property("content_array",r.list(Jk).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var vt,Un=n(()=>{b();pe();vt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",V.optional())});});var Kk,$k=n(()=>{b();Kk=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Tt,Nn=n(()=>{b();$k();Tt=r.object({name:r.string(),type:Kk,description:r.string()});});var Fn,Kl=n(()=>{b();Dn();Un();Nn();Fn=r.object({model:vt,messages:r.list(St),variables:r.record(r.string(),r.string()),schema:r.list(Tt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Qk,Yk=n(()=>{b();Qk=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,Ao=n(()=>{b();Yk();Sr=r.object({field:r.string().optional(),operator:Qk.optional(),key:r.string().optional(),value:r.string().optional()});});var Xk,Zk=n(()=>{b();Kl();Ao();Xk=r.object({filters:r.list(Sr).optional(),code:Fn.optional()});});var Bn,$l=n(()=>{b();Dn();Un();Nn();Bn=r.object({model:vt,messages:r.list(St),variables:r.record(r.string(),r.string()),schema:r.list(Tt)});});var qk,eA=n(()=>{b();Pt();$l();qk=r.object({filters:r.list(tr).optional(),code:Bn.optional()});});var Mn,Ql=n(()=>{b();Mn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var rA,tA=n(()=>{b();Pt();Ql();rA=r.object({filters:r.list(tr).optional(),code:Mn.optional()});});var Wn,Yl=n(()=>{b();Dn();Un();Nn();Wn=r.object({model:vt,messages:r.list(St),schema:r.list(Tt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var oA,iA=n(()=>{b();At();Yl();oA=r.object({filters:r.list(rr).optional(),code:Wn.optional()});});var Ln,Xl=n(()=>{b();Ln=r.object({metric:r.string()});});var aA,nA=n(()=>{b();At();Xl();aA=r.object({filters:r.list(rr).optional(),code:Ln.optional()});});var sA,pA=n(()=>{b();sA=r.enum_(["production","experiment","both"]);});var Vn,Zl=n(()=>{b();Vn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var cA,lA=n(()=>{b();Ao();Zl();cA=r.object({filters:r.list(Sr).optional(),code:Vn.optional()});});var mA,dA=n(()=>{b();mA=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var Po,zie,hX=n(()=>{b();Bk();Zk();eA();tA();iA();nA();pA();lA();dA();Po=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(mA).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",sA.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:Fk}),zie=r.union("type",{llm_as_judge:Xk.extend(Po),user_defined_metric_python:cA.extend(Po),trace_thread_llm_as_judge:oA.extend(Po),trace_thread_user_defined_metric_python:aA.extend(Po),span_llm_as_judge:qk.extend(Po),span_user_defined_metric_python:rA.extend(Po)}).transform({transform:p=>p,untransform:p=>p});});var uA,gA=n(()=>{b();uA=r.object({url:r.string(),detail:r.string().optional()});});var fA,hA=n(()=>{b();fA=r.object({url:r.string()});});var yA,bA=n(()=>{b();Tk();gA();hA();yA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",uA.optional()),videoUrl:r.property("video_url",fA.optional()),audioUrl:r.property("audio_url",vk.optional())});});var RA,xA=n(()=>{b();RA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var jt,Jn=n(()=>{b();bA();xA();jt=r.object({role:RA,content:r.string().optional(),contentArray:r.property("content_array",r.list(yA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,gr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var Et,Hn=n(()=>{b();gr();Et=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var wA,_A=n(()=>{b();wA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ct,Gn=n(()=>{b();_A();Ct=r.object({name:r.string(),type:wA,description:r.string()});});var kA,AA=n(()=>{b();Jn();Hn();Gn();kA=r.object({model:Et,messages:r.list(jt),variables:r.record(r.string(),r.string()),schema:r.list(Ct),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var On,ql=n(()=>{b();AA();wo();On=r.object({filters:r.list(Pr).optional(),code:kA.optional()});});var PA,zA=n(()=>{b();PA=r.object({url:r.string(),detail:r.string().optional()});});var SA,vA=n(()=>{b();SA=r.object({url:r.string()});});var TA,jA=n(()=>{b();Ek();zA();vA();TA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",PA.optional()),videoUrl:r.property("video_url",SA.optional()),audioUrl:r.property("audio_url",jk.optional())});});var EA,CA=n(()=>{b();EA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var It,Kn=n(()=>{b();jA();CA();It=r.object({role:EA,content:r.string().optional(),contentArray:r.property("content_array",r.list(TA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var Dt,$n=n(()=>{b();kr();Dt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var IA,DA=n(()=>{b();IA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ut,Qn=n(()=>{b();DA();Ut=r.object({name:r.string(),type:IA,description:r.string()});});var UA,NA=n(()=>{b();Kn();$n();Qn();UA=r.object({model:Dt,messages:r.list(It),variables:r.record(r.string(),r.string()),schema:r.list(Ut),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var FA,BA=n(()=>{b();FA=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Yn,em=n(()=>{b();BA();Yn=r.object({field:r.string().optional(),operator:FA.optional(),key:r.string().optional(),value:r.string().optional()});});var MA,WA=n(()=>{b();NA();em();MA=r.object({filters:r.list(Yn).optional(),code:UA.optional()});});var LA,VA=n(()=>{b();LA=r.enum_(["evaluator","annotation_queue_router"]);});var JA,HA=n(()=>{b();JA=r.enum_(["production","experiment","both"]);});var GA,OA=n(()=>{b();Jn();Hn();Gn();GA=r.object({model:Et,messages:r.list(jt),variables:r.record(r.string(),r.string()),schema:r.list(Ct)});});var Xn,rm=n(()=>{b();xo();OA();Xn=r.object({filters:r.list(Ar).optional(),code:GA.optional()});});var KA,$A=n(()=>{b();KA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zn,tm=n(()=>{b();xo();$A();Zn=r.object({filters:r.list(Ar).optional(),code:KA.optional()});});var QA,YA=n(()=>{b();Jn();Hn();Gn();QA=r.object({model:Et,messages:r.list(jt),schema:r.list(Ct),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var qn,om=n(()=>{b();Ca();YA();qn=r.object({filters:r.list(xt).optional(),code:QA.optional()});});var XA,ZA=n(()=>{b();XA=r.object({metric:r.string()});});var es,im=n(()=>{b();Ca();ZA();es=r.object({filters:r.list(xt).optional(),code:XA.optional()});});var qA,eP=n(()=>{b();qA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var rs,am=n(()=>{b();wo();eP();rs=r.object({filters:r.list(Pr).optional(),code:qA.optional()});});var ts,nm=n(()=>{b();ts=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var zo,rP,tP=n(()=>{b();ql();VA();HA();rm();tm();om();im();am();nm();zo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ts).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",JA.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:LA}),rP=r.union("type",{llm_as_judge:On.extend(zo),user_defined_metric_python:rs.extend(zo),trace_thread_llm_as_judge:qn.extend(zo),trace_thread_user_defined_metric_python:es.extend(zo),span_llm_as_judge:Xn.extend(zo),span_user_defined_metric_python:Zn.extend(zo)}).transform({transform:p=>p,untransform:p=>p});});var oP,yX=n(()=>{b();tP();oP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(rP).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var iP,aP=n(()=>{b();iP=r.enum_(["evaluator","annotation_queue_router"]);});var nP,sP=n(()=>{b();nP=r.enum_(["production","experiment","both"]);});var So,pP,bX=n(()=>{b();ql();aP();sP();rm();tm();om();im();am();nm();So=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(ts).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",nP.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:iP}),pP=r.union("type",{llm_as_judge:On.extend(So),user_defined_metric_python:rs.extend(So),trace_thread_llm_as_judge:qn.extend(So),trace_thread_user_defined_metric_python:es.extend(So),span_llm_as_judge:Xn.extend(So),span_user_defined_metric_python:Zn.extend(So)}).transform({transform:p=>p,untransform:p=>p});});var cP,lP=n(()=>{b();cP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var os,sm=n(()=>{b();lP();os=r.object({field:r.string().optional(),operator:cP.optional(),key:r.string().optional(),value:r.string().optional()});});var mP,dP=n(()=>{b();Kn();$n();Qn();mP=r.object({model:Dt,messages:r.list(It),variables:r.record(r.string(),r.string()),schema:r.list(Ut)});});var uP,gP=n(()=>{b();sm();dP();uP=r.object({filters:r.list(os).optional(),code:mP.optional()});});var fP,hP=n(()=>{b();fP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var yP,bP=n(()=>{b();sm();hP();yP=r.object({filters:r.list(os).optional(),code:fP.optional()});});var RP,xP=n(()=>{b();RP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var is,pm=n(()=>{b();xP();is=r.object({field:r.string().optional(),operator:RP.optional(),key:r.string().optional(),value:r.string().optional()});});var wP,_P=n(()=>{b();Kn();$n();Qn();wP=r.object({model:Dt,messages:r.list(It),schema:r.list(Ut),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var kP,AP=n(()=>{b();pm();_P();kP=r.object({filters:r.list(is).optional(),code:wP.optional()});});var PP,zP=n(()=>{b();PP=r.object({metric:r.string()});});var SP,vP=n(()=>{b();pm();zP();SP=r.object({filters:r.list(is).optional(),code:PP.optional()});});var TP,jP=n(()=>{b();TP=r.enum_(["evaluator","annotation_queue_router"]);});var EP,CP=n(()=>{b();Kl();Ao();EP=r.object({filters:r.list(Sr).optional(),code:Fn.optional()});});var IP,DP=n(()=>{b();Pt();$l();IP=r.object({filters:r.list(tr).optional(),code:Bn.optional()});});var UP,NP=n(()=>{b();Pt();Ql();UP=r.object({filters:r.list(tr).optional(),code:Mn.optional()});});var FP,BP=n(()=>{b();At();Yl();FP=r.object({filters:r.list(rr).optional(),code:Wn.optional()});});var MP,WP=n(()=>{b();At();Xl();MP=r.object({filters:r.list(rr).optional(),code:Ln.optional()});});var LP,VP=n(()=>{b();LP=r.enum_(["production","experiment","both"]);});var JP,HP=n(()=>{b();Ao();Zl();JP=r.object({filters:r.list(Sr).optional(),code:Vn.optional()});});var vo,GP,RX=n(()=>{b();jP();CP();DP();NP();BP();WP();VP();HP();vo=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",LP.optional()),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:TP}),GP=r.union("type",{llm_as_judge:EP.extend(vo),user_defined_metric_python:JP.extend(vo),trace_thread_llm_as_judge:FP.extend(vo),trace_thread_user_defined_metric_python:MP.extend(vo),span_llm_as_judge:IP.extend(vo),span_user_defined_metric_python:UP.extend(vo)}).transform({transform:p=>p,untransform:p=>p});});var OP,KP=n(()=>{b();OP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var $P,QP=n(()=>{b();em();KP();$P=r.object({filters:r.list(Yn).optional(),code:OP.optional()});});var YP,XP=n(()=>{b();YP=r.enum_(["evaluator","annotation_queue_router"]);});var ZP,qP=n(()=>{b();ZP=r.enum_(["production","experiment","both"]);});var To,ez,xX=n(()=>{b();WA();gP();bP();AP();vP();QP();XP();qP();To=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",ZP.optional()),action:YP}),ez=r.union("type",{llm_as_judge:MA.extend(To),user_defined_metric_python:$P.extend(To),trace_thread_llm_as_judge:kP.extend(To),trace_thread_user_defined_metric_python:SP.extend(To),span_llm_as_judge:uP.extend(To),span_user_defined_metric_python:yP.extend(To)}).transform({transform:p=>p,untransform:p=>p});});var rz,tz=n(()=>{b();rz=r.object({value:r.number().optional()});});var de,wX=n(()=>{b();de=r.object({ids:r.list(r.string())});});var oz,iz=n(()=>{b();oz=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var jo,_X=n(()=>{b();iz();jo=r.object({biInformation:r.property("bi_information",r.list(oz).optional())});});var az,kX=n(()=>{b();_w();az=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ww).optional()});});var nz,sz=n(()=>{b();nz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var pz,cz=n(()=>{b();sz();pz=r.object({details:nz.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 lz,mz=n(()=>{b();lz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var dz,uz=n(()=>{b();mz();dz=r.object({details:lz.optional()});});var gz,fz=n(()=>{b();gz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var as,cm=n(()=>{b();fz();as=r.object({details:gz.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 hz,yz=n(()=>{b();hz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var bz,Rz=n(()=>{b();yz();bz=r.object({details:hz.optional()});});var xz,wz=n(()=>{b();xz=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var _z,kz=n(()=>{b();_z=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Az,AX=n(()=>{b();wz();kz();pe();Az=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:_z.optional(),status:xz.optional(),args:V.optional(),result:V.optional(),error:V.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional()),pickedUpAt:r.property("picked_up_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional()),durationMs:r.property("duration_ms",r.number().optional())});});var Pz,zz=n(()=>{b();Pz=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Sz,vz=n(()=>{b();zz();pe();Sz=r.object({commandId:r.property("command_id",r.string().optional()),type:Pz.optional(),args:V.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var Tz,PX=n(()=>{b();vz();Tz=r.object({commands:r.list(Sz).optional()});});var jz,zX=n(()=>{b();jz=r.object({commandId:r.property("command_id",r.string().optional())});});var Ez,Cz=n(()=>{b();Ez=r.object({categories:r.record(r.string(),r.number())});});var Iz,Dz=n(()=>{b();Cz();Iz=r.object({details:Ez.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 Uz,Nz=n(()=>{b();Uz=r.object({categories:r.record(r.string(),r.number())});});var Fz,Bz=n(()=>{b();Nz();Fz=r.object({details:Uz.optional()});});var Mz,Wz=n(()=>{b();Mz=r.object({categories:r.record(r.string(),r.number())});});var ns,lm=n(()=>{b();Wz();ns=r.object({details:Mz.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 Lz,Vz=n(()=>{b();Lz=r.object({categories:r.record(r.string(),r.number())});});var Jz,Hz=n(()=>{b();Vz();Jz=r.object({details:Lz.optional()});});var Gz,Oz=n(()=>{b();uo();Ol();Gz=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.string().optional(),toolCalls:r.list(In).optional(),functionCall:wr.optional()});});var Kz,$z=n(()=>{b();Kz=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var Qz,Yz=n(()=>{b();$z();Qz=r.object({content:r.list(Kz).optional()});});var Xz,Zz=n(()=>{b();_k();Oz();Yz();Xz=r.object({index:r.number().optional(),message:wk.optional(),delta:Gz.optional(),finishReason:r.string().optional(),logprobs:Qz.optional()});});var qz,eS=n(()=>{b();qz=r.object({reasoningTokens:r.number().optional()});});var rS,tS=n(()=>{b();rS=r.object({cachedTokens:r.number().optional()});});var oS,iS=n(()=>{b();eS();tS();oS=r.object({totalTokens:r.number().optional(),promptTokens:r.number().optional(),promptTokensDetails:rS.optional(),completionTokens:r.number().optional(),completionTokensDetails:qz.optional()});});var aS,SX=n(()=>{b();Zz();iS();aS=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(Xz).optional(),usage:oS.optional(),systemFingerprint:r.string().optional(),serviceTier:r.string().optional()});});var nS,sS=n(()=>{b();nS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var pS,cS=n(()=>{b();pS=r.enum_(["passed","failed"]);});var lS,mS=n(()=>{b();sS();cS();lS=r.object({name:nS.optional(),result:pS.optional()});});var dS,uS=n(()=>{b();dS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var gS,fS=n(()=>{b();gS=r.enum_(["passed","failed"]);});var hS,yS=n(()=>{b();uS();fS();hS=r.object({name:dS.optional(),result:gS.optional()});});var bS,RS=n(()=>{b();bS=r.object({typeName:r.string().optional()});});var Sie,vX=n(()=>{b();RS();Sie=r.object({type:bS.optional(),closed:r.boolean().optional()});});var xS,wS=n(()=>{b();xS=r.object({typeName:r.string().optional()});});var vie,TX=n(()=>{b();wS();vie=r.object({type:xS.optional(),closed:r.boolean().optional()});});var _S,jX=n(()=>{b();_S=r.object({clientId:r.property("client_id",r.string().optional()),clientIdIssuedAt:r.property("client_id_issued_at",r.number().optional()),clientName:r.property("client_name",r.string().optional()),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional()),redirectUris:r.property("redirect_uris",r.list(r.string()).optional()),tokenEndpointAuthMethod:r.property("token_endpoint_auth_method",r.string().optional()),grantTypes:r.property("grant_types",r.list(r.string()).optional()),responseTypes:r.property("response_types",r.list(r.string()).optional())});});var kS,AS=n(()=>{b();kS=r.enum_(["string","number","object","boolean","array","null"]);});var PS,zS=n(()=>{b();AS();PS=r.object({name:r.string().optional(),types:r.list(kS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var SS,vS=n(()=>{b();SS=r.enum_(["string","number","object","boolean","array","null"]);});var TS,jS=n(()=>{b();vS();TS=r.object({name:r.string().optional(),types:r.list(SS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var ES,CS=n(()=>{b();ES=r.enum_(["string","number","object","boolean","array","null"]);});var IS,DS=n(()=>{b();CS();IS=r.object({name:r.string().optional(),types:r.list(ES).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var US,NS=n(()=>{b();US=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 Nt,ss=n(()=>{b();Nt=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_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 FS,BS=n(()=>{b();FS=r.enum_(["trace","span"]);});var MS,WS=n(()=>{b();MS=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var mm,EX=n(()=>{b();BS();WS();mm=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",FS),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(MS))});});var LS,CX=n(()=>{b();LS=r.object({redirectTo:r.property("redirect_to",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.object({value:r.number().optional()});});var HS,IX=n(()=>{b();HS=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var GS,OS=n(()=>{b();GS=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var KS,$S=n(()=>{b();KS=r.enum_(["workspace","insights"]);});var QS,YS=n(()=>{b();QS=r.enum_(["multi_project","experiments"]);});var or,XS=n(()=>{b();$S();YS();gr();or=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:QS.optional(),scope:KS.optional(),description:r.string().optional(),config:_e,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 Ft,DX=n(()=>{b();XS();Ft=r.object({content:r.list(or).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var ZS,qS=n(()=>{b();ZS=r.enum_(["multi_project","experiments"]);});var ps,UX=n(()=>{b();qS();gr();ps=r.object({name:r.string().optional(),type:ZS.optional(),description:r.string().optional(),config:_e.optional()});});var ev,rv=n(()=>{b();ev=r.enum_(["multi_project","experiments"]);});var cs,NX=n(()=>{b();rv();kr();cs=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:ev.optional(),description:r.string().optional(),config:Se});});var Tie,FX=n(()=>{b();Tie=r.object({time:r.date(),value:r.number().optional()});});var tv,ov=n(()=>{b();tv=r.object({time:r.date(),value:r.number().optional()});});var iv,av=n(()=>{b();iv=r.enum_(["unknown","processing","completed","failed"]);});var nv,sv=n(()=>{b();nv=r.enum_(["dataset","evaluation_suite"]);});var ls,dm=n(()=>{b();ls=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var pv,cv=n(()=>{b();pv=r.enum_(["private","public"]);});var jie,BX=n(()=>{b();av();sv();dm();cv();jie=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:nv.optional(),visibility:pv.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:iv.optional(),latestVersion:r.property("latest_version",ls.optional())});});var Eie,MX=n(()=>{b();Eie=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()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var lv,mv=n(()=>{b();lv=r.enum_(["manual","trace","span","sdk"]);});var dv,uv=n(()=>{b();dv=r.enum_(["passed","failed"]);});var gv,fv=n(()=>{b();uv();gv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:dv.optional()});});var ms,um=n(()=>{b();mv();go();ht();Nc();fv();pe();ms=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:lv,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),experimentItems:r.property("experiment_items",r.list(ga).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),gv).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 hv,WX=n(()=>{b();um();hv=r.object({generatedSamples:r.property("generated_samples",r.list(ms).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var Cie,LX=n(()=>{b();um();Cie=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(ms),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var yv,VX=n(()=>{b();yv=r.record(r.string(),r.unknown());});var bv,Rv=n(()=>{b();bv=r.enum_(["manual","trace","span","sdk"]);});var xv,wv=n(()=>{b();xv=r.enum_(["llm_judge","code_metric"]);});var _v,kv=n(()=>{b();_v=r.record(r.string(),r.unknown());});var Av,Pv=n(()=>{b();wv();kv();Av=r.object({name:r.string(),type:xv,config:_v});});var ds,gm=n(()=>{b();ds=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var zv,Sv=n(()=>{b();zv=r.enum_(["passed","failed"]);});var vv,Tv=n(()=>{b();vv=r.enum_(["default","hidden"]);});var jv,Ev=n(()=>{b();jv=r.enum_(["ui","sdk","online_scoring"]);});var Cv,Iv=n(()=>{b();Cv=r.enum_(["ui","sdk","online_scoring"]);});var Dv,Uv=n(()=>{b();Iv();Dv=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Cv.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Nv,Fv=n(()=>{b();Ev();Uv();Nv=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:jv,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Dv).optional())});});var us,Bv=n(()=>{b();us=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Mv,Wv=n(()=>{b();dk();NS();gm();Sv();Tv();Fv();Bv();Mv=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()),projectId:r.property("project_id",r.string().optional()),input:us.optional(),output:us.optional(),traceMetadata:r.property("trace_metadata",us.optional()),feedbackScores:r.property("feedback_scores",r.list(Nv).optional()),comments:r.list(US).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",vv.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",ds.optional()),assertionResults:r.property("assertion_results",r.list(mk).optional()),status:zv.optional()});});var Lv,Vv=n(()=>{b();Lv=r.enum_(["passed","failed"]);});var Jv,Hv=n(()=>{b();Vv();Jv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Lv.optional()});});var Gv,Ov=n(()=>{b();Rv();Pv();gm();Wv();Hv();pe();Gv=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:bv,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Av).optional(),executionPolicy:r.property("execution_policy",ds.optional()),experimentItems:r.property("experiment_items",r.list(Mv).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),Jv).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 Kv,JX=n(()=>{b();jS();Ov();Kv=r.object({content:r.list(Gv).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(TS).optional(),sortableBy:r.list(r.string()).optional()});});var $v,Qv=n(()=>{b();$v=r.enum_(["manual","trace","span","sdk"]);});var Yv,Xv=n(()=>{b();Yv=r.enum_(["llm_judge","code_metric"]);});var gs,fm=n(()=>{b();Xv();gr();gs=r.object({name:r.string(),type:Yv,config:_e});});var fs,hm=n(()=>{b();fs=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Zv,qv=n(()=>{b();Zv=r.enum_(["default","hidden"]);});var hs,eT=n(()=>{b();qv();hs=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()),projectId:r.property("project_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()),traceVisibilityMode:r.property("trace_visibility_mode",Zv.optional())});});var rT,tT=n(()=>{b();rT=r.enum_(["passed","failed"]);});var oT,iT=n(()=>{b();tT();oT=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:rT.optional()});});var ys,aT=n(()=>{b();Qv();fm();hm();eT();iT();pe();ys=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:$v,data:V,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(gs).optional(),executionPolicy:r.property("execution_policy",fs.optional()),experimentItems:r.property("experiment_items",r.list(hs).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),oT).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 nT,HX=n(()=>{b();DS();aT();nT=r.object({content:r.list(ys).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(IS).optional(),sortableBy:r.list(r.string()).optional()});});var sT,pT=n(()=>{b();sT=r.enum_(["unknown","processing","completed","failed"]);});var cT,lT=n(()=>{b();cT=r.enum_(["dataset","evaluation_suite"]);});var mT,dT=n(()=>{b();mT=r.enum_(["private","public"]);});var bs,ym=n(()=>{b();bs=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var Eo,uT=n(()=>{b();pT();lT();dT();ym();Eo=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:cT.optional(),visibility:mT.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:sT.optional(),latestVersion:r.property("latest_version",bs.optional())});});var Rs,GX=n(()=>{b();uT();Rs=r.object({content:r.list(Eo).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var gT,fT=n(()=>{b();gT=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var hT,OX=n(()=>{b();fT();hT=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:gT.optional()});});var $r,yT=n(()=>{b();fm();hm();$r=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()),versionName:r.property("version_name",r.string().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),evaluators:r.list(gs).optional(),executionPolicy:r.property("execution_policy",fs.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 bT,KX=n(()=>{b();yT();bT=r.object({content:r.list($r).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var RT,xT=n(()=>{b();RT=r.enum_(["trace","span"]);});var Iie,$X=n(()=>{b();xT();Iie=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",RT),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var xs,QX=n(()=>{b();xs=r.object({name:r.string(),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var Co,YX=n(()=>{b();Co=r.object({ids:r.list(r.string())});});var Die,XX=n(()=>{b();Die=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position: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 ws,wT=n(()=>{b();ws=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position: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 _T,ZX=n(()=>{b();wT();_T=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ws).optional(),sortableBy:r.list(r.string()).optional()});});var _s,bm=n(()=>{b();_s=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var kT,AT=n(()=>{b();kT=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Bt,ks=n(()=>{b();Bt=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Io,qX=n(()=>{b();Io=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Uie,e5=n(()=>{b();Uie=r.object({errors:r.list(r.string()).optional()});});var Nie,r5=n(()=>{b();Nie=r.object({errors:r.list(r.string()).optional()});});var Fie,t5=n(()=>{b();Fie=r.object({errors:r.list(r.string()).optional()});});var Bie,o5=n(()=>{b();Bie=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Mie,i5=n(()=>{b();Mie=r.object({errors:r.list(r.string()).optional()});});var As,a5=n(()=>{b();As=r.object({exists:r.boolean().optional()});});var PT,zT=n(()=>{b();PT=r.enum_(["dataset","evaluation_suite"]);});var ST,vT=n(()=>{b();ST=r.enum_(["running","completed","cancelled"]);});var TT,jT=n(()=>{b();TT=r.enum_(["regular","trial","mini-batch","mutation"]);});var Wie,n5=n(()=>{b();gk();yt();dm();zT();Dc();vT();jT();Or();Ye();ko();pa();Wie=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),type:TT.optional(),evaluationMethod:r.property("evaluation_method",PT.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),comments:r.list(ge).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:zr.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:ST.optional(),experimentScores:r.property("experiment_scores",r.list(aa).optional()),promptVersion:r.property("prompt_version",Hr.optional()),promptVersions:r.property("prompt_versions",r.list(Hr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",ls.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(uk).optional())});});var ET,CT=n(()=>{b();ET=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var IT,s5=n(()=>{b();CT();IT=r.object({experiments:r.list(ET).optional(),totalItems:r.property("total_items",r.number().optional())});});var DT,UT=n(()=>{b();e_();DT=r.object({label:r.string().optional(),aggregations:qw.optional()});});var NT,p5=n(()=>{b();UT();NT=r.object({content:r.record(r.string(),DT).optional()});});var FT,BT=n(()=>{b();FT=r.object({label:r.string().optional()});});var MT,WT=n(()=>{b();MT=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var LT,VT=n(()=>{b();WT();LT=r.object({groupsDetails:r.property("groups_details",r.list(MT).optional())});});var JT,c5=n(()=>{b();BT();VT();JT=r.object({content:r.record(r.string(),FT).optional(),details:LT.optional()});});var HT,GT=n(()=>{b();HT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var OT,KT=n(()=>{b();OT=r.enum_(["general","tool","llm","guardrail"]);});var Ps,Rm=n(()=>{b();yt();Gr();bt();Ye();GT();KT();Ps=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:OT.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.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",He.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(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:HT.optional(),environment:r.string().optional()});});var $T,QT=n(()=>{b();$T=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var YT,XT=n(()=>{b();mS();YT=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(lS).optional()});});var ZT,qT=n(()=>{b();ZT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var ej,rj=n(()=>{b();ej=r.enum_(["default","hidden"]);});var zs,xm=n(()=>{b();yt();Gr();QT();bt();XT();Ye();qT();rj();zs=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:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",He.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(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(YT).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",ej.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(),experiment:$T.optional(),source:ZT.optional(),environment:r.string().optional()});});var tj,oj=n(()=>{b();bt();Ye();Rm();xm();tj=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:zs.optional(),spans:r.list(Ps).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var Lie,l5=n(()=>{b();oj();Lie=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(tj)});});var ij,aj=n(()=>{b();ij=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var nj,sj=n(()=>{b();nj=r.enum_(["dataset","evaluation_suite"]);});var pj,cj=n(()=>{b();pj=r.enum_(["running","completed","cancelled"]);});var lj,mj=n(()=>{b();lj=r.enum_(["regular","trial","mini-batch","mutation"]);});var dj,uj=n(()=>{b();dj=r.object({name:r.string(),value:r.number()});});var Ge,Do=n(()=>{b();Ge=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Ss,wm=n(()=>{b();Ss=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var vs,gj=n(()=>{b();hk();ss();ym();sj();cj();mj();uj();En();Do();wm();cl();vs=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),type:lj.optional(),evaluationMethod:r.property("evaluation_method",nj.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Kr).optional()),comments:r.list(Nt).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Ss.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:pj.optional(),experimentScores:r.property("experiment_scores",r.list(dj).optional()),promptVersion:r.property("prompt_version",_o.optional()),promptVersions:r.property("prompt_versions",r.list(_o).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",bs.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(fk).optional())});});var Ts,m5=n(()=>{b();gj();Ts=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(vs).optional(),sortableBy:r.list(r.string()).optional()});});var Vie,d5=n(()=>{pe();Vie=V;});var fj,hj=n(()=>{b();fj=r.object({max:r.number(),min:r.number()});});var yj,bj=n(()=>{b();hj();yj=r.object({details:fj.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 Rj,Jie,u5=n(()=>{b();cz();Dz();bj();Rj=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()}),Jie=r.union("type",{numerical:yj.extend(Rj),categorical:Iz.extend(Rj),boolean:pz.extend(Rj)}).transform({transform:p=>p,untransform:p=>p});});var xj,wj=n(()=>{b();xj=r.object({max:r.number(),min:r.number()});});var _j,kj=n(()=>{b();wj();_j=r.object({details:xj.optional()});});var Aj,Pj,g5=n(()=>{b();uz();Bz();kj();Aj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Pj=r.union("type",{numerical:_j.extend(Aj),categorical:Fz.extend(Aj),boolean:dz.extend(Aj)}).transform({transform:p=>p,untransform:p=>p});});var zj,Sj=n(()=>{b();zj=r.object({max:r.number(),min:r.number()});});var js,_m=n(()=>{b();Sj();js=r.object({details:zj.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 vj,Tj,jj=n(()=>{b();cm();lm();_m();vj=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()}),Tj=r.union("type",{numerical:js.extend(vj),categorical:ns.extend(vj),boolean:as.extend(vj)}).transform({transform:p=>p,untransform:p=>p});});var Ej,f5=n(()=>{b();jj();Ej=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Tj).optional()});});var Cj,Ij,h5=n(()=>{b();cm();lm();_m();Cj=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()}),Ij=r.union("type",{numerical:js.extend(Cj),categorical:ns.extend(Cj),boolean:as.extend(Cj)}).transform({transform:p=>p,untransform:p=>p});});var Dj,Uj=n(()=>{b();Dj=r.object({name:r.string(),value:r.number()});});var Nj,Fj=n(()=>{b();Nj=r.enum_(["ui","sdk","online_scoring"]);});var Bj,Mj=n(()=>{b();Fj();Bj=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:Nj,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),id:r.string()});});var Es,y5=n(()=>{b();Mj();Es=r.object({scores:r.list(Bj)});});var Wj,Lj=n(()=>{b();Wj=r.object({name:r.string().optional(),type:r.string().optional()});});var Vj,b5=n(()=>{b();Lj();Vj=r.object({scores:r.list(Wj).optional()});});var Jj,Hj=n(()=>{b();Jj=r.object({name:r.string().optional(),type:r.string().optional()});});var Qr,R5=n(()=>{b();Hj();Qr=r.object({scores:r.list(Jj).optional()});});var Gj,Oj=n(()=>{b();Gj=r.enum_(["ui","sdk","online_scoring"]);});var Kj,$j=n(()=>{b();Kj=r.enum_(["ui","sdk","online_scoring"]);});var Qj,Yj=n(()=>{b();$j();Qj=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Kj.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()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Uo,km=n(()=>{b();Oj();Yj();Uo=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Gj,sourceQueueId:r.property("source_queue_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()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Qj).optional())});});var Xj,Zj=n(()=>{b();Xj=r.object({max:r.number(),min:r.number()});});var qj,eE=n(()=>{b();Zj();qj=r.object({details:Xj.optional()});});var rE,tE,x5=n(()=>{b();Rz();Hz();eE();rE=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),tE=r.union("type",{numerical:qj.extend(rE),categorical:Jz.extend(rE),boolean:bz.extend(rE)}).transform({transform:p=>p,untransform:p=>p});});var oE,w5=n(()=>{b();oE=r.object({reportId:r.string().optional()});});var iE,aE=n(()=>{b();iE=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var nE,sE=n(()=>{b();nE=r.enum_(["passed","failed"]);});var pE,cE=n(()=>{b();aE();sE();pe();pE=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:iE,result:nE,config:V,details:V});});var Hie,_5=n(()=>{b();cE();Hie=r.object({guardrails:r.list(pE)});});var lE,mE=n(()=>{b();yS();lE=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(hS).optional()});});var Gie,k5=n(()=>{b();Gie=r.object({ids:r.list(r.string())});});var dE,uE=n(()=>{b();dE=r.object({activeLocks:r.property("active_locks",r.number().optional()),lockedBy:r.property("locked_by",r.list(r.string()).optional())});});var gE,fE=n(()=>{b();gE=r.enum_(["count","errors","avg_duration","total_cost"]);});var hE,yE=n(()=>{b();fE();hE=r.object({type:gE.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var bE,A5=n(()=>{b();yE();bE=r.object({stats:r.list(hE).optional()});});var RE,xE=n(()=>{b();RE=r.enum_(["pairing","connected","disconnected"]);});var wE,_E=n(()=>{b();wE=r.enum_(["connect","endpoint"]);});var Cs,kE=n(()=>{b();gw();pe();xE();_E();Cs=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:RE.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(uw).optional(),capabilities:r.list(r.string()).optional(),checklist:V.optional(),type:wE.optional()});});var AE,P5=n(()=>{b();AE=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var PE,z5=n(()=>{b();Pl();PE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(_t).optional()});});var zE,S5=n(()=>{b();kE();zE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cs).optional()});});var SE,v5=n(()=>{b();SE=r.object({acquired:r.boolean().optional(),itemId:r.property("item_id",r.string().optional()),lockedBy:r.property("locked_by",r.string().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var vE,T5=n(()=>{b();uE();vE=r.object({locks:r.record(r.string(),dE).optional()});});var TE,jE=n(()=>{b();TE=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var EE,CE=n(()=>{b();jE();EE=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:TE.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var IE,j5=n(()=>{b();CE();IE=r.object({content:r.list(EE).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var DE,UE=n(()=>{b();DE=r.enum_(["trace","thread","span"]);});var Is,E5=n(()=>{b();UE();Is=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",DE)});});var Ds,C5=n(()=>{b();Ds=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var Oie,I5=n(()=>{b();Oie=r.object({error:r.string().optional(),errorDescription:r.property("error_description",r.string().optional())});});var Am,D5=n(()=>{b();Am=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var Pm,U5=n(()=>{b();Pm=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var NE,FE=n(()=>{b();NE=r.enum_(["pending","completed","failed"]);});var BE,ME=n(()=>{b();pe();FE();BE=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),sessionId:r.property("session_id",r.string().optional()),content:r.string().optional(),recommendedActions:r.property("recommended_actions",V.optional()),status:NE.optional(),failureReason:r.property("failure_reason",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var WE,N5=n(()=>{b();ME();WE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(BE).optional()});});var LE,VE=n(()=>{b();LE=r.enum_(["running","completed","cancelled","initialized","error"]);});var JE,HE=n(()=>{b();pe();JE=r.object({type:r.string(),parameters:V.optional()});});var GE,OE=n(()=>{b();HE();GE=r.object({metrics:r.list(JE)});});var KE,$E=n(()=>{b();pe();KE=r.object({model:r.string(),parameters:V.optional()});});var QE,YE=n(()=>{b();pe();QE=r.object({type:r.string(),parameters:V.optional()});});var XE,ZE=n(()=>{b();XE=r.object({role:r.string(),content:r.string()});});var qE,eC=n(()=>{b();ZE();qE=r.object({messages:r.list(XE)});});var rC,tC=n(()=>{b();OE();$E();YE();eC();rC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:qE,llmModel:r.property("llm_model",KE),evaluation:GE,optimizer:QE});});var Kie,F5=n(()=>{b();Gr();Or();Ye();VE();tC();Kie=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:LE,metadata:le.optional(),studioConfig:r.property("studio_config",rC.optional()),errorInfo:r.property("error_info",He.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var oC,iC=n(()=>{b();oC=r.enum_(["running","completed","cancelled","initialized","error"]);});var aC,nC=n(()=>{b();gr();aC=r.object({type:r.string(),parameters:_e.optional()});});var sC,pC=n(()=>{b();nC();sC=r.object({metrics:r.list(aC)});});var cC,lC=n(()=>{b();gr();cC=r.object({model:r.string(),parameters:_e.optional()});});var mC,dC=n(()=>{b();gr();mC=r.object({type:r.string(),parameters:_e.optional()});});var uC,gC=n(()=>{b();uC=r.object({role:r.string(),content:r.string()});});var fC,hC=n(()=>{b();gC();fC=r.object({messages:r.list(uC)});});var yC,bC=n(()=>{b();pC();lC();dC();hC();yC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:fC,llmModel:r.property("llm_model",cC),evaluation:sC,optimizer:mC});});var Us,RC=n(()=>{b();ks();En();Do();iC();bC();Us=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:oC,metadata:Ge.optional(),studioConfig:r.property("studio_config",yC.optional()),errorInfo:r.property("error_info",Bt.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Kr).optional()),experimentScores:r.property("experiment_scores",r.list(Kr).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()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var Ns,B5=n(()=>{b();RC();Ns=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Us).optional(),sortableBy:r.list(r.string()).optional()});});var xC,wC=n(()=>{b();kr();xC=r.object({type:r.string(),parameters:Se.optional()});});var _C,kC=n(()=>{b();wC();_C=r.object({metrics:r.list(xC)});});var AC,PC=n(()=>{b();kr();AC=r.object({model:r.string(),parameters:Se.optional()});});var zC,SC=n(()=>{b();kr();zC=r.object({type:r.string(),parameters:Se.optional()});});var vC,TC=n(()=>{b();vC=r.object({role:r.string(),content:r.string()});});var jC,EC=n(()=>{b();TC();jC=r.object({messages:r.list(vC)});});var CC,IC=n(()=>{b();kC();PC();SC();EC();CC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:jC,llmModel:r.property("llm_model",AC),evaluation:_C,optimizer:zC});});var DC,M5=n(()=>{b();DC=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var UC,NC=n(()=>{b();UC=r.enum_(["running","completed","cancelled","initialized","error"]);});var zm,W5=n(()=>{b();an();yo();IC();NC();zm=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:UC,metadata:Je.optional(),studioConfig:r.property("studio_config",CC.optional()),errorInfo:r.property("error_info",kt.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FC,L5=n(()=>{b();zS();FC=r.object({columns:r.list(PS).optional()});});var BC,MC=n(()=>{b();wm();BC=r.object({value:Ss.optional()});});var WC,LC=n(()=>{b();WC=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var VC,JC=n(()=>{b();VC=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var HC,GC=n(()=>{b();HC=r.enum_(["private","public"]);});var $ie,V5=n(()=>{b();bm();Or();ko();GC();$ie=r.object({id:r.string().optional(),name:r.string(),visibility:HC.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(ve).optional()),duration:zr.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",_s.optional())});});var OC,KC=n(()=>{b();OC=r.enum_(["private","public"]);});var $C,J5=n(()=>{b();AT();Uj();LC();KC();$C=r.object({id:r.string().optional(),name:r.string(),visibility:OC.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(Dj).optional()),duration:WC.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",kT.optional())});});var QC,YC=n(()=>{b();QC=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var XC,ZC=n(()=>{b();XC=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var qC,eI=n(()=>{b();ov();qC=r.object({name:r.string().optional(),data:r.list(tv).optional()});});var rI,H5=n(()=>{b();YC();ZC();eI();rI=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",XC.optional()),interval:QC.optional(),results:r.list(qC).optional()});});var tI,oI=n(()=>{b();tI=r.enum_(["private","public"]);});var Fs,iI=n(()=>{b();oI();Fs=r.object({id:r.string().optional(),name:r.string(),visibility:tI.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 aI,G5=n(()=>{b();iI();aI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fs).optional(),sortableBy:r.list(r.string()).optional()});});var nI,sI,pI=n(()=>{b();tz();JS();MC();nI=r.object({name:r.string().optional()}),sI=r.union("type",{PERCENTAGE:BC.extend(nI),COUNT:VS.extend(nI),AVG:rz.extend(nI)}).transform({transform:p=>p,untransform:p=>p});});var Yr,O5=n(()=>{b();pI();Yr=r.object({stats:r.list(sI).optional()});});var cI,lI=n(()=>{b();bm();Or();ko();cI=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.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()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",_s.optional())});});var mI,K5=n(()=>{b();lI();mI=r.object({content:r.list(cI).optional()});});var dI,uI=n(()=>{b();dI=r.enum_(["text","chat"]);});var gI,fI=n(()=>{b();gI=r.enum_(["mustache","jinja2","python"]);});var hI,yI=n(()=>{b();hI=r.enum_(["text","chat"]);});var bI,RI=n(()=>{b();bI=r.enum_(["mustache","jinja2","python"]);});var xI,wI=n(()=>{b();xI=r.enum_(["prompt_version","mask"]);});var Sm,_I=n(()=>{b();pe();yI();RI();wI();Sm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:V.optional(),type:bI.optional(),versionType:r.property("version_type",xI.optional()),environment:r.string().optional(),environments:r.list(r.string()).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",hI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Qie,$5=n(()=>{b();pe();uI();fI();_I();Qie=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:V.optional(),changeDescription:r.property("change_description",r.string().optional()),type:gI.optional(),templateStructure:r.property("template_structure",dI.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",Sm.optional()),requestedVersion:r.property("requested_version",Sm.optional())});});var kI,AI=n(()=>{b();kI=r.enum_(["text","chat"]);});var vm,Q5=n(()=>{b();AI();Fa();vm=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",kI.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",De.optional()),requestedVersion:r.property("requested_version",De.optional())});});var PI,zI=n(()=>{b();PI=r.enum_(["text","chat"]);});var SI,vI=n(()=>{b();zI();SI=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",PI.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 Bs,Y5=n(()=>{b();vI();Bs=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(SI).optional(),sortableBy:r.list(r.string()).optional()});});var TI,jI=n(()=>{b();TI=r.enum_(["text","chat"]);});var EI,CI=n(()=>{b();EI=r.enum_(["mustache","jinja2","python"]);});var II,DI=n(()=>{b();II=r.enum_(["prompt_version","mask"]);});var UI,NI=n(()=>{b();gr();jI();CI();DI();UI=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:_e.optional(),type:EI.optional(),versionType:r.property("version_type",II.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",TI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var FI,X5=n(()=>{b();NI();FI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(UI).optional(),sortableBy:r.list(r.string()).optional()});});var BI,MI=n(()=>{b();BI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Yie,Z5=n(()=>{b();MI();xa();Yie=r.object({id:r.string().optional(),provider:BI,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()),authConfig:r.property("auth_config",Rt.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 WI,LI=n(()=>{b();WI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var VI,JI=n(()=>{b();VI=r.enum_(["form","json","basic"]);});var HI,GI=n(()=>{b();OS();JI();HI=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",VI.optional()),credentials:r.list(GS).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Ms,OI=n(()=>{b();LI();GI();Ms=r.object({id:r.string().optional(),provider:WI,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()),authConfig:r.property("auth_config",HI.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 KI,q5=n(()=>{b();OI();KI=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Ms).optional(),sortableBy:r.list(r.string()).optional()});});var $I,QI=n(()=>{b();$I=r.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var YI,XI=n(()=>{b();QI();YI=r.object({type:$I.optional(),id:r.string().optional(),name:r.string().optional(),resourceId:r.property("resource_id",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var ZI,e3=n(()=>{b();XI();ZI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(YI).optional()});});var qI,eD=n(()=>{b();qI=r.enum_(["agent_insights"]);});var Ws,rD=n(()=>{b();eD();Ws=r.object({id:r.string().optional(),type:qI,projectId:r.property("project_id",r.string()),reason:r.string(),detail: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 tD,r3=n(()=>{b();rD();tD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ws).optional()});});var Ls,t3=n(()=>{b();Ls=r.object({projectId:r.property("project_id",r.string().optional()),enabled:r.boolean().optional(),scheduleTime:r.property("schedule_time",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var oD,o3=n(()=>{b();oD=r.object({enrolled:r.number().optional(),cleared:r.number().optional(),unknownProjectIds:r.property("unknown_project_ids",r.list(r.string()).optional()),alreadyRunProjectIds:r.property("already_run_project_ids",r.list(r.string()).optional())});});var vr,Tm=n(()=>{b();vr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var iD,aD=n(()=>{b();iD=r.enum_(["organization","workspace","project"]);});var nD,sD=n(()=>{b();nD=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var No,pD=n(()=>{b();aD();sD();No=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:iD.optional(),retention:nD,applyToPast:r.property("apply_to_past",r.boolean().optional()),enabled:r.boolean().optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),catchUpCursor:r.property("catch_up_cursor",r.string().optional()),catchUpDone:r.property("catch_up_done",r.boolean().optional())});});var cD,i3=n(()=>{b();pD();cD=r.object({content:r.list(No).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var lD,a3=n(()=>{b();lD=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(),exportEnabled:r.boolean(),costIntelligenceEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),demoDataEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),ollieEnabled:r.boolean(),agentInsightsEnabled:r.boolean(),projectHomepageEnabled:r.boolean(),onlineScoringTracingEnabled:r.boolean(),annotationQueueAutomationEnabled:r.boolean(),defaultPageSize:r.number().optional()});});var Xie,n3=n(()=>{b();Rm();Xie=r.object({spans:r.list(Ps)});});var mD,dD=n(()=>{b();mD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var uD,gD=n(()=>{b();uD=r.enum_(["general","tool","llm","guardrail"]);});var Vs,fD=n(()=>{b();ss();ks();km();Do();dD();gD();Vs=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:uD.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.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",Bt.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(Uo).optional()),comments:r.list(Nt).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:mD.optional(),environment:r.string().optional()});});var hD,s3=n(()=>{b();fD();hD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vs).optional(),sortableBy:r.list(r.string()).optional()});});var yD,bD=n(()=>{b();yD=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var RD,p3=n(()=>{b();bD();RD=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(yD).optional())});});var xD,c3=n(()=>{b();xD=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var wD,l3=n(()=>{b();wD=r.object({accessToken:r.property("access_token",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional()),tokenType:r.property("token_type",r.string().optional()),expiresIn:r.property("expires_in",r.number().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional())});});var Js,m3=n(()=>{b();Js=r.object({names:r.list(r.string()).optional()});});var Zie,d3=n(()=>{b();xm();Zie=r.object({traces:r.list(zs)});});var _D,kD=n(()=>{b();_D=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var AD,u3=n(()=>{b();kD();AD=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(_D).optional())});});var PD,zD=n(()=>{b();PD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var SD,vD=n(()=>{b();SD=r.enum_(["default","hidden"]);});var Hs,TD=n(()=>{b();ss();ks();aj();km();mE();Do();zD();vD();Hs=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:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Bt.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(Uo).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Uo).optional()),comments:r.list(Nt).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(lE).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",SD.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(),experiment:ij.optional(),source:PD.optional(),environment:r.string().optional()});});var jD,g3=n(()=>{b();TD();jD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Hs).optional(),sortableBy:r.list(r.string()).optional()});});var ED,CD=n(()=>{b();ED=r.enum_(["active","inactive"]);});var Gs,ID=n(()=>{b();yt();bt();Ye();CD();Gs=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",le.optional()),lastMessage:r.property("last_message",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),status:ED.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(ge).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()),environment:r.string().optional()});});var jm,f3=n(()=>{b();jm=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 DD,h3=n(()=>{b();ID();DD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Gs).optional(),sortableBy:r.list(r.string()).optional()});});var UD,ND=n(()=>{b();UD=r.object({workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var FD,y3=n(()=>{b();ND();FD=r.object({breakdown:r.list(UD).optional()});});var BD,b3=n(()=>{b();BD=r.object({userName:r.property("user_name",r.string().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),resource:r.string().optional(),expiresAt:r.property("expires_at",r.date().optional())});});var MD,R3=n(()=>{b();MD=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var WD,LD=n(()=>{b();WD=r.enum_(["success","failure"]);});var VD,x3=n(()=>{b();LD();VD=r.object({status:WD.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 JD,w3=n(()=>{b();JD=r.object({completed:r.boolean().optional()});});var Os,_3=n(()=>{b();Os=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional()),colorMap:r.property("color_map",r.record(r.string(),r.string()).optional())});});var qie,k3=n(()=>{b();qie=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 Ks,A3=n(()=>{b();Tm();Ks=r.object({results:r.list(vr).optional()});});var Fo,P3=n(()=>{b();Fo=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 HD,z3=n(()=>{b();Tm();HD=r.object({results:r.list(vr).optional()});});var GD,S3=n(()=>{b();GD=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var OD,v3=n(()=>{b();JC();OD=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(VC).optional()});});var T3=n(()=>{gw();_w();hw();q9();Aw();Nw();jw();eX();Ph();xw();bw();vw();zw();Dw();Cw();Vw();Hw();rX();Bw();Ww();tX();Kw();Qw();oX();Zw();e_();iX();t_();aX();P_();g_();l_();n_();b_();h_();i_();T_();S_();p_();__();x_();I_();E_();nX();U_();sX();J_();fc();q_();$h();pX();cX();ok();rk();lX();mX();ck();nk();M_();pk();L_();Xh();Yh();Db();dy();py();ly();dk();gk();hk();_k();bk();Ak();dX();Sk();Tk();Ek();uX();gX();fX();hX();Bk();Zk();ql();WA();tP();VA();HA();yX();bX();aP();sP();eA();rm();gP();tA();tm();bP();iA();om();AP();nA();im();vP();pA();RX();jP();CP();DP();NP();BP();WP();VP();HP();lA();am();QP();xX();XP();qP();tz();wX();iz();_X();kX();cz();uz();cm();Rz();sz();mz();fz();yz();tw();ew();IR();ER();AX();PX();vz();zz();wz();zX();kz();Dz();Bz();lm();Hz();Cz();Nz();Wz();Vz();Zz();SX();mS();sS();yS();uS();fS();cS();vX();TX();wS();RS();jX();zS();jS();vS();DS();CS();AS();yt();NS();ss();EX();BS();eS();oy();Q_();Hh();ay();X_();Oh();CX();JS();IX();pR();OS();dR();DX();XS();$S();YS();UX();qS();NX();rv();FX();ov();BX();MX();WX();ob();tb();um();LX();VX();Ov();Rv();Sc();My();JX();HX();aT();Qv();mv();Ly();Yy();Jy();GX();uT();pT();lT();dT();av();sv();OX();fT();KX();yT();dm();ym();cv();$X();xT();QX();YX();Oz();XX();ZX();wT();bm();AT();Gr();Uc();ks();an();qX();e5();r5();t5();o5();i5();go();Pv();wv();fm();Xv();Iy();Ky();Gy();ht();gm();hm();Qy();a5();n5();zT();s5();p5();c5();CT();Nc();oj();Cb();l5();Wv();Sv();Tv();eT();qv();QT();aj();Nb();Bb();m5();gj();sj();cj();mj();fv();Hv();Vv();iT();tT();uv();Dc();uj();Ob();vT();jT();lb();sb();cb();d5();u5();g5();f5();jj();h5();bt();Or();Uj();En();y5();Mj();Fj();Mx();Fx();Fv();Ev();xb();gb();b5();R5();km();Oj();Wb();x5();Ac();uo();w5();BT();UT();WT();VT();cE();_5();aE();sE();XT();mE();aR();rR();oR();k5();Wk();gA();zA();uE();Ye();Bv();la();Do();yo();pe();kv();KR();gr();kr();xy();A5();yE();fE();Kl();AA();NA();Dn();Hk();bA();jA();Jn();xA();Ok();Kn();CA();Un();Hn();$n();Nn();Gn();_A();$k();Qn();DA();kE();P5();Pl();xl();z5();Rx();_l();S5();xE();_E();v5();T5();CE();jE();j5();$z();Yz();E5();UE();C5();Pc();WS();bj();kj();_m();eE();hj();wj();Sj();Zj();I5();D5();U5();_R();ME();N5();FE();F5();B5();RC();iC();VE();tC();bC();IC();M5();W5();NC();L5();dw();lw();MC();ko();LC();wm();JC();V5();J5();KC();H5();YC();ZC();G5();iI();oI();dA();nm();pI();O5();K5();lI();GC();$5();Q5();AI();Y5();vI();zI();uI();tS();fI();db();_I();Fa();QR();XR();qR();pa();cl();Kb();X5();NI();jI();CI();DI();yI();RI();tx();wI();Z5();q5();MI();OI();LI();xa();GI();JI();lR();hR();gR();XI();QI();e3();Eh();Th();rD();r3();eD();t3();o3();Ay();_y();Tm();eI();i3();pD();aD();sD();ry();qh();K_();G_();Vh();Wh();Lj();Hj();a3();Rm();n3();Uy();zb();_b();Ab();Pt();iw();xo();UR();sm();lP();$l();OA();dP();s3();fD();dD();gD();GT();p3();KT();Px();_x();Ax();Ql();$A();hP();jx();Sx();Tx();c3();zy();OE();pC();kC();$E();lC();PC();ZE();gC();TC();HE();nC();wC();YE();dC();SC();eC();hC();EC();l3();m3();jy();Ol();xk();vy();xm();d3();u3();Fy();jb();vb();Ao();Yk();wo();FR();em();BA();g3();TD();zD();vD();qT();ID();At();Qx();Ca();MR();pm();xP();f3();Yl();YA();_P();h3();CD();Kx();Xl();ZA();zP();Vx();Lx();rj();Gx();Hx();iS();y3();Zl();eP();KP();b3();Hb();Uv();Iv();bb();hb();Yj();$j();Vb();Vk();hA();vA();d_();R3();A_();x3();LD();F_();w3();_3();Uk();k3();A3();P3();z3();S3();ND();bD();kD();v3();});var G={};L(G,{ActivateRequest:()=>Ta,Agent:()=>uw,AgentBlueprintHistory:()=>ww,AgentBlueprintHistoryType:()=>fw,AgentBlueprintPublic:()=>zt,AgentBlueprintPublicType:()=>kw,AgentBlueprintWrite:()=>Uw,AgentBlueprintWriteType:()=>Tw,AgentConfigCreateWrite:()=>Jl,AgentConfigEnv:()=>Ah,AgentConfigEnvSetByName:()=>ki,AgentConfigEnvUpdate:()=>Ai,AgentConfigRemoveValues:()=>Pi,AgentConfigValueHistory:()=>Rw,AgentConfigValueHistoryType:()=>yw,AgentConfigValuePublic:()=>Sw,AgentConfigValuePublicType:()=>Pw,AgentConfigValueWrite:()=>Iw,AgentConfigValueWriteType:()=>Ew,AgentInsightsIssue:()=>Lw,AgentInsightsIssueDetail:()=>Jw,AgentInsightsIssuePage:()=>Gw,AgentInsightsIssueSeverity:()=>Fw,AgentInsightsIssueStatus:()=>Mw,AgentInsightsIssueUpdate:()=>zi,AgentInsightsIssueUpdateStatus:()=>nc,AgentInsightsIssueWithDetails:()=>Yw,AgentInsightsIssueWithDetailsSeverity:()=>Ow,AgentInsightsIssueWithDetailsStatus:()=>$w,AgentInsightsJob:()=>Sn,AgentInsightsJobStatus:()=>Xw,AgentInsightsJobUpdate:()=>Ti,AgentInsightsJobUpdateStatus:()=>mc,AgentInsightsReport:()=>Si,AggregationData:()=>qw,Alert:()=>Aie,AlertAlertType:()=>r_,AlertPagePublic:()=>Tn,AlertPublic:()=>vn,AlertPublicAlertType:()=>u_,AlertTrigger:()=>c_,AlertTriggerConfig:()=>a_,AlertTriggerConfigPublic:()=>y_,AlertTriggerConfigPublicType:()=>f_,AlertTriggerConfigType:()=>o_,AlertTriggerConfigWrite:()=>v_,AlertTriggerConfigWriteType:()=>z_,AlertTriggerEventType:()=>s_,AlertTriggerPublic:()=>w_,AlertTriggerPublicEventType:()=>R_,AlertTriggerWrite:()=>C_,AlertTriggerWriteEventType:()=>j_,AlertWrite:()=>jn,AlertWriteAlertType:()=>D_,AnalyticsQueryRequest:()=>cn,AnalyticsQueryResponse:()=>Hl,AnnotationQueue:()=>V_,AnnotationQueueAutomation:()=>Ii,AnnotationQueueAutomationPublic:()=>Z_,AnnotationQueueAutomationWrite:()=>Kh,AnnotationQueueBatch:()=>Pie,AnnotationQueueBatchWrite:()=>Ei,AnnotationQueueItemIds:()=>Gl,AnnotationQueueItemIdsPublic:()=>Ci,AnnotationQueueItemPublic:()=>tk,AnnotationQueueItemPublicSource:()=>ek,AnnotationQueueItemsPublic:()=>ik,AnnotationQueuePagePublic:()=>lk,AnnotationQueuePublic:()=>Cn,AnnotationQueuePublicScope:()=>ak,AnnotationQueueReviewer:()=>B_,AnnotationQueueReviewerPublic:()=>sk,AnnotationQueueScope:()=>W_,AnnotationQueueUpdate:()=>Di,AnnotationQueueWrite:()=>ji,AnnotationQueueWriteScope:()=>Qh,AssertionResult:()=>Ib,AssertionResultBatch:()=>Ui,AssertionResultBatchEntityType:()=>yc,AssertionResultBatchItem:()=>my,AssertionResultBatchItemSource:()=>sy,AssertionResultBatchItemStatus:()=>cy,AssertionResultCompare:()=>mk,AssertionScoreAverage:()=>uk,AssertionScoreAveragePublic:()=>fk,AssistantMessage:()=>wk,AssistantMessageRole:()=>yk,Attachment:()=>kk,AttachmentListRequestEntityType:()=>wc,AttachmentPage:()=>Pk,AudioUrl:()=>zk,AudioUrlPublic:()=>vk,AudioUrlWrite:()=>jk,AuthDetailsHolder:()=>Ck,AuthorizationServerMetadata:()=>Ik,AuthorizeContext:()=>Nk,AutomationRuleEvaluator:()=>zie,AutomationRuleEvaluatorAction:()=>Fk,AutomationRuleEvaluatorLlmAsJudge:()=>Xk,AutomationRuleEvaluatorLlmAsJudgePublic:()=>On,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>MA,AutomationRuleEvaluatorObjectObjectPublic:()=>rP,AutomationRuleEvaluatorObjectObjectPublicAction:()=>LA,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>JA,AutomationRuleEvaluatorPagePublic:()=>oP,AutomationRuleEvaluatorPublic:()=>pP,AutomationRuleEvaluatorPublicAction:()=>iP,AutomationRuleEvaluatorPublicTriggerScope:()=>nP,AutomationRuleEvaluatorSpanLlmAsJudge:()=>qk,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>Xn,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>uP,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>rA,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Zn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>yP,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>oA,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>qn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>kP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>aA,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>es,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>SP,AutomationRuleEvaluatorTriggerScope:()=>sA,AutomationRuleEvaluatorUpdate:()=>GP,AutomationRuleEvaluatorUpdateAction:()=>TP,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>EP,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>IP,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>UP,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>FP,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>MP,AutomationRuleEvaluatorUpdateTriggerScope:()=>LP,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>JP,AutomationRuleEvaluatorUserDefinedMetricPython:()=>cA,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>rs,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>$P,AutomationRuleEvaluatorWrite:()=>ez,AutomationRuleEvaluatorWriteAction:()=>YP,AutomationRuleEvaluatorWriteTriggerScope:()=>ZP,AvgValueStatPublic:()=>rz,BatchDelete:()=>de,BatchDeleteByProject:()=>mn,BiInformation:()=>oz,BiInformationResponse:()=>jo,BlueprintPageHistory:()=>az,BooleanFeedbackDefinition:()=>pz,BooleanFeedbackDefinitionCreate:()=>dz,BooleanFeedbackDefinitionPublic:()=>as,BooleanFeedbackDefinitionUpdate:()=>bz,BooleanFeedbackDetail:()=>nz,BooleanFeedbackDetailCreate:()=>lz,BooleanFeedbackDetailPublic:()=>gz,BooleanFeedbackDetailUpdate:()=>hz,BreakdownConfig:()=>rw,BreakdownConfigField:()=>qx,BreakdownConfigPublic:()=>CR,BreakdownConfigPublicField:()=>jR,BridgeCommand:()=>Az,BridgeCommandBatchResponse:()=>Tz,BridgeCommandItem:()=>Sz,BridgeCommandItemType:()=>Pz,BridgeCommandNextRequest:()=>$a,BridgeCommandResultRequest:()=>Qa,BridgeCommandResultRequestStatus:()=>bl,BridgeCommandStatus:()=>xz,BridgeCommandSubmitRequest:()=>Ya,BridgeCommandSubmitRequestType:()=>Rl,BridgeCommandSubmitResponse:()=>jz,BridgeCommandType:()=>_z,CategoricalFeedbackDefinition:()=>Iz,CategoricalFeedbackDefinitionCreate:()=>Fz,CategoricalFeedbackDefinitionPublic:()=>ns,CategoricalFeedbackDefinitionUpdate:()=>Jz,CategoricalFeedbackDetail:()=>Ez,CategoricalFeedbackDetailCreate:()=>Uz,CategoricalFeedbackDetailPublic:()=>Mz,CategoricalFeedbackDetailUpdate:()=>Lz,ChatCompletionChoice:()=>Xz,ChatCompletionRequest:()=>Mi,ChatCompletionResponse:()=>aS,Check:()=>lS,CheckName:()=>nS,CheckPublic:()=>hS,CheckPublicName:()=>dS,CheckPublicResult:()=>gS,CheckResult:()=>pS,ChunkedOutputJsonNode:()=>Sie,ChunkedOutputJsonNodePublic:()=>vie,ChunkedOutputJsonNodePublicType:()=>xS,ChunkedOutputJsonNodeType:()=>bS,ClientRegistrationRequest:()=>Aa,ClientRegistrationResponse:()=>_S,Column:()=>PS,ColumnCompare:()=>TS,ColumnCompareTypesItem:()=>SS,ColumnPublic:()=>IS,ColumnPublicTypesItem:()=>ES,ColumnTypesItem:()=>kS,Comment:()=>ge,CommentCompare:()=>US,CommentPublic:()=>Nt,CompleteMultipartUploadRequest:()=>mm,CompleteMultipartUploadRequestEntityType:()=>FS,CompletionTokensDetails:()=>qz,ConditionGroup:()=>ty,ConditionGroupPublic:()=>$_,ConditionGroupWrite:()=>Jh,Conditions:()=>iy,ConditionsPublic:()=>Y_,ConditionsWrite:()=>Gh,ConsentRequest:()=>Pa,ConsentResponse:()=>LS,CountValueStatPublic:()=>VS,CreateDatasetItemsFromJsonRequestFormat:()=>Cc,CreateDatasetItemsFromSpansRequest:()=>Wi,CreateDatasetItemsFromTracesRequest:()=>Li,CreateLocalRunnerJobRequest:()=>Za,CreatePromptVersionDetail:()=>Ba,CreatePromptVersionDetailTemplateStructure:()=>nl,CreateSessionRequest:()=>ja,CreateSessionRequestType:()=>Zc,CreateSessionResponse:()=>HS,Credential:()=>sR,CredentialPublic:()=>GS,CredentialWrite:()=>mR,DashboardPagePublic:()=>Ft,DashboardPublic:()=>or,DashboardPublicScope:()=>KS,DashboardPublicType:()=>QS,DashboardUpdatePublic:()=>ps,DashboardUpdatePublicType:()=>ZS,DashboardWrite:()=>cs,DashboardWriteType:()=>ev,DataPointDouble:()=>Tie,DataPointNumberPublic:()=>tv,Dataset:()=>jie,DatasetExpansion:()=>Eie,DatasetExpansionResponse:()=>hv,DatasetExpansionWrite:()=>Vi,DatasetExportJobPublic:()=>fo,DatasetExportJobPublicStatus:()=>rb,DatasetIdentifier:()=>Ji,DatasetIdentifierPublic:()=>Hi,DatasetItem:()=>ms,DatasetItemBatch:()=>Cie,DatasetItemBatchUpdate:()=>Oi,DatasetItemBatchWrite:()=>$i,DatasetItemChangesPublic:()=>yv,DatasetItemCompare:()=>Gv,DatasetItemCompareSource:()=>bv,DatasetItemFilter:()=>Gi,DatasetItemFilterOperator:()=>By,DatasetItemPageCompare:()=>Kv,DatasetItemPagePublic:()=>nT,DatasetItemPublic:()=>ys,DatasetItemPublicSource:()=>$v,DatasetItemSource:()=>lv,DatasetItemStreamRequest:()=>Qi,DatasetItemUpdate:()=>Wy,DatasetItemWrite:()=>Ki,DatasetItemWriteSource:()=>Vy,DatasetItemsDelete:()=>Yi,DatasetPagePublic:()=>Rs,DatasetPublic:()=>Eo,DatasetPublicStatus:()=>sT,DatasetPublicType:()=>cT,DatasetPublicVisibility:()=>mT,DatasetStatus:()=>iv,DatasetType:()=>nv,DatasetUpdate:()=>Xi,DatasetUpdateVisibility:()=>vc,DatasetVersionDiff:()=>hT,DatasetVersionDiffStats:()=>gT,DatasetVersionPagePublic:()=>bT,DatasetVersionPublic:()=>$r,DatasetVersionRestorePublic:()=>Zi,DatasetVersionRetrieveRequestPublic:()=>qi,DatasetVersionSummary:()=>ls,DatasetVersionSummaryPublic:()=>bs,DatasetVersionTag:()=>ea,DatasetVersionUpdatePublic:()=>ra,DatasetVisibility:()=>pv,DatasetWrite:()=>ta,DatasetWriteType:()=>Tc,DatasetWriteVisibility:()=>jc,DeleteAttachmentsRequest:()=>Iie,DeleteAttachmentsRequestEntityType:()=>RT,DeleteFeedbackScore:()=>xs,DeleteIdsHolder:()=>Co,DeleteThreadFeedbackScores:()=>dn,DeleteTraceThreads:()=>un,Delta:()=>Gz,DownloadAttachmentRequestEntityType:()=>_c,Environment:()=>Die,EnvironmentPagePublic:()=>_T,EnvironmentPublic:()=>ws,EnvironmentUpdate:()=>oa,EnvironmentWrite:()=>ia,ErrorCountWithDeviation:()=>_s,ErrorCountWithDeviationDetailed:()=>kT,ErrorInfo:()=>He,ErrorInfoExperimentItemBulkWriteView:()=>ma,ErrorInfoPublic:()=>Bt,ErrorInfoWrite:()=>kt,ErrorMessage:()=>Io,ErrorMessageDetail:()=>Uie,ErrorMessageDetailed:()=>Nie,ErrorMessageHistory:()=>Fie,ErrorMessagePublic:()=>Bie,ErrorMessageWrite:()=>Mie,EvaluatorItem:()=>_r,EvaluatorItemCompare:()=>Av,EvaluatorItemCompareType:()=>xv,EvaluatorItemPublic:()=>gs,EvaluatorItemPublicType:()=>Yv,EvaluatorItemType:()=>Cy,EvaluatorItemWrite:()=>Oy,EvaluatorItemWriteType:()=>Hy,ExecutionPolicy:()=>qe,ExecutionPolicyCompare:()=>ds,ExecutionPolicyPublic:()=>fs,ExecutionPolicyWrite:()=>$y,ExistenceResponse:()=>As,Experiment:()=>Wie,ExperimentBatchUpdate:()=>sa,ExperimentEvaluationMethod:()=>PT,ExperimentExecutionRequest:()=>ca,ExperimentExecutionResponse:()=>IT,ExperimentGroupAggregationsResponse:()=>NT,ExperimentGroupResponse:()=>JT,ExperimentInfo:()=>ET,ExperimentItem:()=>ga,ExperimentItemBulkRecord:()=>tj,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>Eb,ExperimentItemBulkUpload:()=>Lie,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>da,ExperimentItemCompare:()=>Mv,ExperimentItemCompareStatus:()=>zv,ExperimentItemCompareTraceVisibilityMode:()=>vv,ExperimentItemPublic:()=>hs,ExperimentItemPublicTraceVisibilityMode:()=>Zv,ExperimentItemReference:()=>$T,ExperimentItemReferencePublic:()=>ij,ExperimentItemStatus:()=>Ub,ExperimentItemStreamRequest:()=>ua,ExperimentItemTraceVisibilityMode:()=>Fb,ExperimentItemsBatch:()=>fa,ExperimentItemsDelete:()=>ha,ExperimentPagePublic:()=>Ts,ExperimentPublic:()=>vs,ExperimentPublicEvaluationMethod:()=>nj,ExperimentPublicStatus:()=>pj,ExperimentPublicType:()=>lj,ExperimentRunSummary:()=>gv,ExperimentRunSummaryCompare:()=>Jv,ExperimentRunSummaryCompareStatus:()=>Lv,ExperimentRunSummaryPublic:()=>oT,ExperimentRunSummaryPublicStatus:()=>rT,ExperimentRunSummaryStatus:()=>dv,ExperimentScore:()=>aa,ExperimentScorePublic:()=>dj,ExperimentScoreWrite:()=>Gb,ExperimentStatus:()=>ST,ExperimentStreamRequestPublic:()=>ya,ExperimentType:()=>TT,ExperimentUpdate:()=>na,ExperimentUpdateStatus:()=>nb,ExperimentUpdateType:()=>pb,ExperimentWrite:()=>ba,ExperimentWriteEvaluationMethod:()=>Bc,ExperimentWriteStatus:()=>Mc,ExperimentWriteType:()=>Wc,ExportTraceServiceRequest:()=>Vie,Feedback:()=>Jie,FeedbackCreate:()=>Pj,FeedbackDefinitionPagePublic:()=>Ej,FeedbackObjectPublic:()=>Tj,FeedbackPublic:()=>Ij,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>ve,FeedbackScoreAverageDetailed:()=>Dj,FeedbackScoreAveragePublic:()=>Kr,FeedbackScoreBatch:()=>Es,FeedbackScoreBatchItem:()=>Bj,FeedbackScoreBatchItemSource:()=>Nj,FeedbackScoreBatchItemThread:()=>Bx,FeedbackScoreBatchItemThreadSource:()=>Nx,FeedbackScoreBatchThread:()=>gn,FeedbackScoreCompare:()=>Nv,FeedbackScoreCompareSource:()=>jv,FeedbackScoreExperimentItemBulkWriteView:()=>Rb,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ub,FeedbackScoreNames:()=>Vj,FeedbackScoreNamesPublic:()=>Qr,FeedbackScorePublic:()=>Uo,FeedbackScorePublicSource:()=>Gj,FeedbackScoreSource:()=>Mb,FeedbackUpdate:()=>tE,FindAgentInsightsIssuesRequestSeverity:()=>sc,FindAgentInsightsIssuesRequestStatus:()=>pc,FindFeedbackDefinitionsRequestType:()=>Vc,FindFeedbackScoreNames1RequestType:()=>Cl,FindReportFailuresRequestType:()=>dl,Function:()=>Fi,FunctionCall:()=>wr,GenerateReportResponse:()=>oE,GetSpanStatsRequestType:()=>Il,GetSpansByProjectRequestType:()=>Dl,GetWebhookExamplesRequestAlertType:()=>uc,GroupContent:()=>FT,GroupContentWithAggregations:()=>DT,GroupDetail:()=>MT,GroupDetails:()=>LT,Guardrail:()=>pE,GuardrailBatch:()=>Hie,GuardrailBatchWrite:()=>Ra,GuardrailName:()=>iE,GuardrailResult:()=>nE,GuardrailWrite:()=>iR,GuardrailWriteName:()=>eR,GuardrailWriteResult:()=>tR,GuardrailsValidation:()=>YT,GuardrailsValidationPublic:()=>lE,IdsHolder:()=>Gie,ImageUrl:()=>Mk,ImageUrlPublic:()=>uA,ImageUrlWrite:()=>PA,ItemLockInfo:()=>dE,JsonListString:()=>le,JsonListStringCompare:()=>us,JsonListStringExperimentItemBulkWriteView:()=>er,JsonListStringPublic:()=>Ge,JsonListStringWrite:()=>Je,JsonNode:()=>V,JsonNodeCompare:()=>_v,JsonNodeDetail:()=>OR,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>Ry,KpiCardRequest:()=>Ea,KpiCardRequestEntityType:()=>el,KpiCardResponse:()=>bE,KpiMetric:()=>hE,KpiMetricType:()=>gE,ListRunnersRequestStatus:()=>Tl,LlmAsJudgeCode:()=>Fn,LlmAsJudgeCodePublic:()=>kA,LlmAsJudgeCodeWrite:()=>UA,LlmAsJudgeMessage:()=>St,LlmAsJudgeMessageContent:()=>Jk,LlmAsJudgeMessageContentPublic:()=>yA,LlmAsJudgeMessageContentWrite:()=>TA,LlmAsJudgeMessagePublic:()=>jt,LlmAsJudgeMessagePublicRole:()=>RA,LlmAsJudgeMessageRole:()=>Gk,LlmAsJudgeMessageWrite:()=>It,LlmAsJudgeMessageWriteRole:()=>EA,LlmAsJudgeModelParameters:()=>vt,LlmAsJudgeModelParametersPublic:()=>Et,LlmAsJudgeModelParametersWrite:()=>Dt,LlmAsJudgeOutputSchema:()=>Tt,LlmAsJudgeOutputSchemaPublic:()=>Ct,LlmAsJudgeOutputSchemaPublicType:()=>wA,LlmAsJudgeOutputSchemaType:()=>Kk,LlmAsJudgeOutputSchemaWrite:()=>Ut,LlmAsJudgeOutputSchemaWriteType:()=>IA,LocalRunner:()=>Cs,LocalRunnerHeartbeatRequest:()=>qa,LocalRunnerHeartbeatResponse:()=>AE,LocalRunnerJob:()=>_t,LocalRunnerJobMetadata:()=>Xa,LocalRunnerJobPage:()=>PE,LocalRunnerJobResultRequest:()=>en,LocalRunnerJobResultRequestStatus:()=>wl,LocalRunnerJobStatus:()=>bx,LocalRunnerLogEntry:()=>rn,LocalRunnerPage:()=>zE,LocalRunnerStatus:()=>RE,LocalRunnerType:()=>wE,LockResponse:()=>SE,LocksResponse:()=>vE,LogItem:()=>EE,LogItemLevel:()=>TE,LogPage:()=>IE,LogProb:()=>Kz,LogProbs:()=>Qz,ManualEvaluationRequest:()=>Is,ManualEvaluationRequestEntityType:()=>DE,ManualEvaluationResponse:()=>Ds,Message:()=>Bi,MultipartUploadPart:()=>MS,NumericalFeedbackDefinition:()=>yj,NumericalFeedbackDefinitionCreate:()=>_j,NumericalFeedbackDefinitionPublic:()=>js,NumericalFeedbackDefinitionUpdate:()=>qj,NumericalFeedbackDetail:()=>fj,NumericalFeedbackDetailCreate:()=>xj,NumericalFeedbackDetailPublic:()=>zj,NumericalFeedbackDetailUpdate:()=>Xj,OAuthError:()=>Oie,OllamaConnectionTestResponse:()=>Am,OllamaInstanceBaseUrlRequest:()=>Pm,OllamaModel:()=>wR,OllieReport:()=>BE,OllieReportPage:()=>WE,OllieReportStatus:()=>NE,Optimization:()=>Kie,OptimizationPagePublic:()=>Ns,OptimizationPublic:()=>Us,OptimizationPublicStatus:()=>oC,OptimizationStatus:()=>LE,OptimizationStudioConfig:()=>rC,OptimizationStudioConfigPublic:()=>yC,OptimizationStudioConfigWrite:()=>CC,OptimizationStudioLog:()=>DC,OptimizationUpdate:()=>va,OptimizationUpdateStatus:()=>Yc,OptimizationWrite:()=>zm,OptimizationWriteStatus:()=>UC,PageColumns:()=>FC,Param:()=>mw,ParamPresence:()=>cw,PercentageValueStatPublic:()=>BC,PercentageValues:()=>zr,PercentageValuesDetailed:()=>WC,PercentageValuesPublic:()=>Ss,Permission:()=>VC,Project:()=>$ie,ProjectDetailed:()=>$C,ProjectDetailedVisibility:()=>OC,ProjectMetricRequestPublic:()=>Ia,ProjectMetricRequestPublicInterval:()=>rl,ProjectMetricRequestPublicMetricType:()=>tl,ProjectMetricResponsePublic:()=>rI,ProjectMetricResponsePublicInterval:()=>QC,ProjectMetricResponsePublicMetricType:()=>XC,ProjectPagePublic:()=>aI,ProjectPublic:()=>Fs,ProjectPublicVisibility:()=>tI,ProjectReference:()=>mA,ProjectReferencePublic:()=>ts,ProjectRetrieveDetailed:()=>Da,ProjectStatItemObjectPublic:()=>sI,ProjectStatsPublic:()=>Yr,ProjectStatsSummary:()=>mI,ProjectStatsSummaryItem:()=>cI,ProjectUpdate:()=>Ua,ProjectUpdateVisibility:()=>ol,ProjectVisibility:()=>HC,ProjectWrite:()=>Na,ProjectWriteVisibility:()=>il,Prompt:()=>Qie,PromptDetail:()=>vm,PromptDetailTemplateStructure:()=>kI,PromptPagePublic:()=>Bs,PromptPublic:()=>SI,PromptPublicTemplateStructure:()=>PI,PromptTemplateStructure:()=>dI,PromptTokensDetails:()=>rS,PromptType:()=>gI,PromptUpdatable:()=>Ma,PromptVariant:()=>mb,PromptVersion:()=>Sm,PromptVersionBatchUpdate:()=>Wa,PromptVersionCommitsRequestPublic:()=>La,PromptVersionDetail:()=>De,PromptVersionDetailTemplateStructure:()=>$R,PromptVersionDetailType:()=>YR,PromptVersionDetailVersionType:()=>ZR,PromptVersionEnvironmentUpdate:()=>Va,PromptVersionIdsRequestDetail:()=>Ja,PromptVersionLink:()=>Hr,PromptVersionLinkPublic:()=>_o,PromptVersionLinkWrite:()=>Fc,PromptVersionPagePublic:()=>FI,PromptVersionPublic:()=>UI,PromptVersionPublicTemplateStructure:()=>TI,PromptVersionPublicType:()=>EI,PromptVersionPublicVersionType:()=>II,PromptVersionRetrieveDetail:()=>Ha,PromptVersionTemplateStructure:()=>hI,PromptVersionType:()=>bI,PromptVersionUpdate:()=>rx,PromptVersionVersionType:()=>xI,PromptWrite:()=>Ga,PromptWriteTemplateStructure:()=>sl,PromptWriteType:()=>pl,ProviderApiKey:()=>Yie,ProviderApiKeyPagePublic:()=>KI,ProviderApiKeyProvider:()=>BI,ProviderApiKeyPublic:()=>Ms,ProviderApiKeyPublicProvider:()=>WI,ProviderApiKeyUpdate:()=>wa,ProviderApiKeyWrite:()=>_a,ProviderApiKeyWriteProvider:()=>Oc,ProviderAuthCheck:()=>ka,ProviderAuthConfig:()=>Rt,ProviderAuthConfigPublic:()=>HI,ProviderAuthConfigPublicSendAs:()=>VI,ProviderAuthConfigSendAs:()=>cR,ProviderAuthConfigWrite:()=>fR,ProviderAuthConfigWriteSendAs:()=>uR,RecentActivityItemPublic:()=>YI,RecentActivityItemPublicType:()=>$I,RecentActivityPagePublic:()=>ZI,ReportCompleteRequest:()=>Oa,ReportCompleteRequestStatus:()=>gl,ReportFailure:()=>Ws,ReportFailurePage:()=>tD,ReportFailureType:()=>qI,ReportPreference:()=>Ls,ReportedIssue:()=>jh,ReportedIssueSeverity:()=>vh,Request:()=>vi,Response:()=>oD,ResponseFormat:()=>ky,ResponseFormatType:()=>wy,Result:()=>vr,ResultsNumberPublic:()=>qC,RetentionRulePagePublic:()=>cD,RetentionRulePublic:()=>No,RetentionRulePublicLevel:()=>iD,RetentionRulePublicRetention:()=>nD,RetentionRuleWrite:()=>Ka,RetentionRuleWriteRetention:()=>hl,RevokeRequest:()=>za,ScopedAnalyticsQueryRequest:()=>ln,ScoreCondition:()=>ey,ScoreConditionOperator:()=>Zh,ScoreConditionPublic:()=>O_,ScoreConditionPublicOperator:()=>H_,ScoreConditionWrite:()=>Lh,ScoreConditionWriteOperator:()=>Mh,ScoreName:()=>Wj,ScoreNamePublic:()=>Jj,ServiceTogglesConfig:()=>lD,Span:()=>Ps,SpanBatch:()=>Xie,SpanBatchUpdate:()=>on,SpanBatchWrite:()=>sn,SpanEnrichmentOptions:()=>Dy,SpanExperimentItemBulkWriteView:()=>Pb,SpanExperimentItemBulkWriteViewSource:()=>wb,SpanExperimentItemBulkWriteViewType:()=>kb,SpanFilter:()=>tr,SpanFilterOperator:()=>ow,SpanFilterPublic:()=>Ar,SpanFilterPublicOperator:()=>DR,SpanFilterWrite:()=>os,SpanFilterWriteOperator:()=>cP,SpanLlmAsJudgeCode:()=>Bn,SpanLlmAsJudgeCodePublic:()=>GA,SpanLlmAsJudgeCodeWrite:()=>mP,SpanPagePublic:()=>hD,SpanPublic:()=>Vs,SpanPublicSource:()=>mD,SpanPublicType:()=>uD,SpanSearchStreamRequestPublic:()=>pn,SpanSearchStreamRequestPublicExcludeItem:()=>jl,SpanSearchStreamRequestPublicType:()=>El,SpanSource:()=>HT,SpanType:()=>OT,SpanUpdate:()=>tn,SpanUpdateSource:()=>wx,SpanUpdateType:()=>kx,SpanUserDefinedMetricPythonCode:()=>Mn,SpanUserDefinedMetricPythonCodePublic:()=>KA,SpanUserDefinedMetricPythonCodeWrite:()=>fP,SpanWrite:()=>nn,SpanWriteSource:()=>zx,SpanWriteType:()=>vx,SpansCountResponse:()=>RD,StartMultipartUploadRequest:()=>Ni,StartMultipartUploadRequestEntityType:()=>Rc,StartMultipartUploadResponse:()=>xD,StreamOptions:()=>Py,StudioEvaluation:()=>GE,StudioEvaluationPublic:()=>sC,StudioEvaluationWrite:()=>_C,StudioLlmModel:()=>KE,StudioLlmModelPublic:()=>cC,StudioLlmModelWrite:()=>AC,StudioMessage:()=>XE,StudioMessagePublic:()=>uC,StudioMessageWrite:()=>vC,StudioMetric:()=>JE,StudioMetricPublic:()=>aC,StudioMetricWrite:()=>xC,StudioOptimizer:()=>QE,StudioOptimizerPublic:()=>mC,StudioOptimizerWrite:()=>zC,StudioPrompt:()=>qE,StudioPromptPublic:()=>fC,StudioPromptWrite:()=>jC,TokenRequest:()=>Sa,TokenResponse:()=>wD,TokenUsageNames:()=>Js,Tool:()=>Ty,ToolCall:()=>In,ToolCallType:()=>Rk,ToolType:()=>Sy,Trace:()=>zs,TraceBatch:()=>Zie,TraceBatchUpdate:()=>hn,TraceBatchWrite:()=>bn,TraceCountResponse:()=>AD,TraceEnrichmentOptions:()=>Ny,TraceExperimentItemBulkWriteView:()=>Tb,TraceExperimentItemBulkWriteViewSource:()=>Sb,TraceFilter:()=>Sr,TraceFilterOperator:()=>Qk,TraceFilterPublic:()=>Pr,TraceFilterPublicOperator:()=>NR,TraceFilterWrite:()=>Yn,TraceFilterWriteOperator:()=>FA,TracePagePublic:()=>jD,TracePublic:()=>Hs,TracePublicSource:()=>PD,TracePublicVisibilityMode:()=>SD,TraceSearchStreamRequestPublic:()=>Rn,TraceSearchStreamRequestPublicExcludeItem:()=>Fl,TraceSource:()=>ZT,TraceThread:()=>Gs,TraceThreadBatchIdentifier:()=>xn,TraceThreadBatchUpdate:()=>_n,TraceThreadFilter:()=>rr,TraceThreadFilterOperator:()=>$x,TraceThreadFilterPublic:()=>xt,TraceThreadFilterPublicOperator:()=>BR,TraceThreadFilterWrite:()=>is,TraceThreadFilterWriteOperator:()=>RP,TraceThreadIdentifier:()=>jm,TraceThreadLlmAsJudgeCode:()=>Wn,TraceThreadLlmAsJudgeCodePublic:()=>QA,TraceThreadLlmAsJudgeCodeWrite:()=>wP,TraceThreadPage:()=>DD,TraceThreadSearchStreamRequest:()=>kn,TraceThreadStatus:()=>ED,TraceThreadUpdate:()=>wn,TraceThreadUserDefinedMetricPythonCode:()=>Ln,TraceThreadUserDefinedMetricPythonCodePublic:()=>XA,TraceThreadUserDefinedMetricPythonCodeWrite:()=>PP,TraceUpdate:()=>fn,TraceUpdateSource:()=>Wx,TraceVisibilityMode:()=>ej,TraceWrite:()=>yn,TraceWriteSource:()=>Jx,UploadAttachmentRequestEntityType:()=>kc,Usage:()=>oS,UsageByWorkspaceProjectUserResponse:()=>FD,UserDefinedMetricPythonCode:()=>Vn,UserDefinedMetricPythonCodePublic:()=>qA,UserDefinedMetricPythonCodeWrite:()=>OP,ValidatedToken:()=>BD,ValueEntry:()=>Jb,ValueEntryCompare:()=>Dv,ValueEntryCompareSource:()=>Cv,ValueEntryExperimentItemBulkWriteView:()=>yb,ValueEntryExperimentItemBulkWriteViewSource:()=>fb,ValueEntryPublic:()=>Qj,ValueEntryPublicSource:()=>Kj,ValueEntrySource:()=>Lb,VideoUrl:()=>Lk,VideoUrlPublic:()=>fA,VideoUrlWrite:()=>SA,Webhook:()=>m_,WebhookExamples:()=>MD,WebhookPublic:()=>k_,WebhookTestResult:()=>VD,WebhookTestResultStatus:()=>WD,WebhookWrite:()=>N_,WelcomeWizardSubmission:()=>An,WelcomeWizardTracking:()=>JD,WorkspaceConfiguration:()=>Os,WorkspaceInfo:()=>Dk,WorkspaceMetricRequest:()=>qie,WorkspaceMetricResponse:()=>Ks,WorkspaceMetricsSummaryRequest:()=>Fo,WorkspaceMetricsSummaryResponse:()=>HD,WorkspaceNameHolder:()=>GD,WorkspaceProjectUserCount:()=>UD,WorkspaceSpanMetricRequest:()=>Pn,WorkspaceSpanMetricRequestInterval:()=>Wl,WorkspaceSpanMetricRequestMetricType:()=>Ll,WorkspaceSpansCount:()=>yD,WorkspaceTokenUsageNamesRequest:()=>zn,WorkspaceTraceCount:()=>_D,WorkspaceUserPermissions:()=>OD,agentConfigs:()=>ac,agentInsights:()=>cc,agentInsightsEnrollment:()=>lc,agentInsightsJobs:()=>dc,alerts:()=>gc,annotationQueues:()=>hc,assertionResults:()=>bc,attachments:()=>mo,chatCompletions:()=>zc,datasets:()=>ho,environments:()=>Ic,experiments:()=>Lc,feedbackDefinitions:()=>Jc,guardrails:()=>Hc,llmModels:()=>bo,llmProviderKey:()=>Kc,mcpOAuth:()=>$c,ollama:()=>Ro,optimizations:()=>Xc,pairing:()=>qc,projects:()=>al,prompts:()=>wt,reportFailures:()=>ul,reports:()=>fl,retentionRules:()=>yl,runners:()=>ur,spans:()=>Ul,systemAnalyticsQueries:()=>Nl,traces:()=>Bl,welcomeWizard:()=>Ml,workspaces:()=>Vl});var te=n(()=>{Z9();T3();});var Em,j3=n(()=>{Z();$();b();Q();q();J();te();oe();Em=class{constructor(o={}){this._options=M(o);}createAgentConfig(o,e){return P.fromPromise(this.__createAgentConfig(o,e))}async __createAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(o,e){return P.fromPromise(this.__updateAgentConfig(o,e))}async __updateAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(o,e,t={},i){return P.fromPromise(this.__createBlueprintFromMask(o,e,t,i))}async __createBlueprintFromMask(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/masks/${_.encodePathParam(e)}`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/agent-configs/blueprints/projects/{project_id}/masks/{mask_id}")}createOrUpdateEnvs(o,e){return P.fromPromise(this.__createOrUpdateEnvs(o,e))}async __createOrUpdateEnvs(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ai.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(o,e,t={},i){return P.fromPromise(this.__getBlueprintByEnv(o,e,t,i))}async __getBlueprintByEnv(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:zt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}setEnvByBlueprintName(o,e,t,i){return P.fromPromise(this.__setEnvByBlueprintName(o,e,t,i))}async __setEnvByBlueprintName(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ki.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}deleteEnv(o,e,t={},i){return P.fromPromise(this.__deleteEnv(o,e,t,i))}async __deleteEnv(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"DELETE",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===401?new O(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"DELETE","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}getBlueprintById(o,e={},t){return P.fromPromise(this.__getBlueprintById(o,e,t))}async __getBlueprintById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:zt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}")}getBlueprintByName(o,e,t={},i){return P.fromPromise(this.__getBlueprintByName(o,e,t,i))}async __getBlueprintByName(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/names/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:zt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/projects/{project_id}/names/{name}")}getBlueprintHistory(o,e={},t){return P.fromPromise(this.__getBlueprintHistory(o,e,t))}async __getBlueprintHistory(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/history/projects/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:az.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/history/projects/{project_id}")}getDeltaById(o,e={},t){return P.fromPromise(this.__getDeltaById(o,e,t))}async __getDeltaById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}/deltas`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:zt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}/deltas")}getLatestBlueprint(o,e={},t){return P.fromPromise(this.__getLatestBlueprint(o,e,t))}async __getLatestBlueprint(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/latest/projects/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:zt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/latest/projects/{project_id}")}removeConfigKeys(o,e){return P.fromPromise(this.__removeConfigKeys(o,e))}async __removeConfigKeys(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===401?new O(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var Cm,E3=n(()=>{Z();$();b();Q();q();J();te();oe();Cm=class{constructor(o={}){this._options=M(o);}findAgentInsightsIssues(o,e){return P.fromPromise(this.__findAgentInsightsIssues(o,e))}async __findAgentInsightsIssues(o,e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,fromDate:i,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=o,d={project_id:t,from_date:i,to_date:a,status:s!=null?pc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?sc.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l,page:m,size:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/agent-insights/issues"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Gw.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new N(g.error.body,g.rawResponse);case 401:throw new O(g.error.body,g.rawResponse);default:throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}return j(g.error,g.rawResponse,"GET","/v1/private/agent-insights/issues")}reportAgentInsightsIssues(o,e){return P.fromPromise(this.__reportAgentInsightsIssues(o,e))}async __reportAgentInsightsIssues(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-insights/issues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Si.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(o,e,t){return P.fromPromise(this.__getAgentInsightsIssueById(o,e,t))}async __getAgentInsightsIssueById(o,e,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,fromDate:a,toDate:s}=e,c={project_id:i,from_date:a,to_date:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Yw.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 401:throw new O(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/private/agent-insights/issues/{issue_id}")}updateAgentInsightsIssue(o,e,t){return P.fromPromise(this.__updateAgentInsightsIssue(o,e,t))}async __updateAgentInsightsIssue(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/issues/{issue_id}")}};});var Im,C3=n(()=>{Z();$();b();Q();q();J();te();Im=class{constructor(o={}){this._options=M(o);}enrolProjectsInAutoFirstRun(o,e){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(o,e))}async __enrolProjectsInAutoFirstRun(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/agent-insights/enrollment"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:oD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var Dm,I3=n(()=>{Z();$();b();Q();q();J();te();oe();Dm=class{constructor(o={}){this._options=M(o);}getAgentInsightsJob(o,e={},t){return P.fromPromise(this.__getAgentInsightsJob(o,e,t))}async __getAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/agent-insights/jobs/{projectId}")}createAgentInsightsJob(o,e={},t){return P.fromPromise(this.__createAgentInsightsJob(o,e,t))}async __createAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}")}updateAgentInsightsJob(o,e,t){return P.fromPromise(this.__updateAgentInsightsJob(o,e,t))}async __updateAgentInsightsJob(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/jobs/{projectId}")}triggerAgentInsightsJob(o,e={},t){return P.fromPromise(this.__triggerAgentInsightsJob(o,e,t))}async __triggerAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}/trigger`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}/trigger")}};});var Um,D3=n(()=>{Z();$();b();Q();q();J();te();oe();Um=class{constructor(o={}){this._options=M(o);}findAlerts(o={},e){return P.fromPromise(this.__findAlerts(o,e))}async __findAlerts(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,sorting:a,filters:s}=o,c={page:t,size:i,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Tn.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/alerts")}createAlert(o,e){return P.fromPromise(this.__createAlert(o,e))}async __createAlert(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(o,e){return P.fromPromise(this.__deleteAlertBatch(o,e))}async __deleteAlertBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(o,e={},t){return P.fromPromise(this.__getAlertById(o,e,t))}async __getAlertById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/alerts/{id}")}updateAlert(o,e,t){return P.fromPromise(this.__updateAlert(o,e,t))}async __updateAlert(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);case 422:throw new ae(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/alerts/{id}")}getWebhookExamples(o={},e){return P.fromPromise(this.__getWebhookExamples(o,e))}async __getWebhookExamples(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=o,i={alert_type:t!=null?uc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:MD.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/alerts/webhooks/examples")}testWebhook(o,e){return P.fromPromise(this.__testWebhook(o,e))}async __testWebhook(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:VD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var Nm,U3=n(()=>{Z();$();b();Q();q();J();te();oe();Nm=class{constructor(o={}){this._options=M(o);}addItemsToAnnotationQueue(o,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(o,e,t))}async __addItemsToAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Gl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/add")}findAnnotationQueues(o={},e){return P.fromPromise(this.__findAnnotationQueues(o,e))}async __findAnnotationQueues(o={},e){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:i,name:a,filters:s,sorting:c}=o,l={page:t,size:i,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:lk.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/annotation-queues")}createAnnotationQueue(o,e){return P.fromPromise(this.__createAnnotationQueue(o,e))}async __createAnnotationQueue(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(o,e){return P.fromPromise(this.__createAnnotationQueueBatch(o,e))}async __createAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ei.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(o,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(o,e))}async __deleteAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(o,e={},t){return P.fromPromise(this.__getAnnotationQueueById(o,e,t))}async __getAnnotationQueueById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{id}")}updateAnnotationQueue(o,e={},t){return P.fromPromise(this.__updateAnnotationQueue(o,e,t))}async __updateAnnotationQueue(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Di.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/annotation-queues/{id}")}getAnnotationQueueLocks(o,e={},t){return P.fromPromise(this.__getAnnotationQueueLocks(o,e,t))}async __getAnnotationQueueLocks(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/locks`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{queueId}/locks")}lockAnnotationQueueItem(o,e,t={},i){return P.fromPromise(this.__lockAnnotationQueueItem(o,e,t,i))}async __lockAnnotationQueueItem(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/${_.encodePathParam(e)}/lock`),method:"PUT",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:SE.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/annotation-queues/{queueId}/items/{itemId}/lock")}removeItemsFromAnnotationQueue(o,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(o,e,t))}async __removeItemsFromAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Gl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/delete")}searchAnnotationQueueItems(o,e,t){return P.fromPromise(this.__searchAnnotationQueueItems(o,e,t))}async __searchAnnotationQueueItems(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/search`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ci.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ik.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/search")}};});var Fm,N3=n(()=>{Z();$();b();Q();q();J();te();Fm=class{constructor(o={}){this._options=M(o);}storeAssertionsBatch(o,e){return P.fromPromise(this.__storeAssertionsBatch(o,e))}async __storeAssertionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ui.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/assertion-results")}};});var Bm,F3=n(()=>{Z();$();b();Q();q();J();te();oe();Bm=class{constructor(o={}){this._options=M(o);}attachmentList(o,e){return P.fromPromise(this.__attachmentList(o,e))}async __attachmentList(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,projectId:a,entityType:s,entityId:c,path:l}=o,m={page:t,size:i,project_id:a,entity_type:wc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Pk.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/list")}completeMultiPartUpload(o,e){return P.fromPromise(this.__completeMultiPartUpload(o,e))}async __completeMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(o,e){return P.fromPromise(this.__deleteAttachments(o,e))}async __deleteAttachments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(o,e){return P.fromPromise(this.__downloadAttachment(o,e))}async __downloadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{workspaceName:t,containerId:i,entityType:a,entityId:s,fileName:c,mimeType:l}=o,m={workspace_name:t,container_id:i,entity_type:_c.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:s,file_name:c,mime_type:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:d.body,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/download")}startMultiPartUpload(o,e){return P.fromPromise(this.__startMultiPartUpload(o,e))}async __startMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ni.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(o,e){return P.fromPromise(this.__uploadAttachment(o,e))}async __uploadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{fileName:t,projectName:i,mimeType:a,entityType:s,entityId:c,body:l}=o,m={file_name:t,project_name:i,mime_type:a,entity_type:kc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:mo.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"PUT","/v1/private/attachment/upload")}};});var Mm,B3=n(()=>{Z();$();b();Q();q();J();te();Mm=class{constructor(o={}){this._options=M(o);}findEvaluators(o={},e){return P.fromPromise(this.__findEvaluators(o,e))}async __findEvaluators(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{projectId:t,id:i,name:a,filters:s,sorting:c,page:l,size:m}=o,u={project_id:t,id:i,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:oP.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/automations/evaluators")}createAutomationRuleEvaluator(o,e){return P.fromPromise(this.__createAutomationRuleEvaluator(o,e))}async __createAutomationRuleEvaluator(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ez.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(o,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(o,e))}async __deleteAutomationRuleEvaluatorBatch(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:i}=o,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:de.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(o,e={},t){return P.fromPromise(this.__getEvaluatorById(o,e,t))}async __getEvaluatorById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:i}=e,a={project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:pP.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}")}updateAutomationRuleEvaluator(o,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(o,e,t))}async __updateAutomationRuleEvaluator(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:GP.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/automations/evaluators/{id}")}getEvaluatorLogsById(o,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(o,e,t))}async __getEvaluatorLogsById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:i}=e,a={size:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:IE.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}/logs")}};});var Wm,M3=n(()=>{Z();$();b();Q();q();J();te();Wm=class{constructor(o={}){this._options=M(o);}createChatCompletions(o={},e){return P.fromPromise(this.__createChatCompletions(o,e))}async __createChatCompletions(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Mi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:aS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/chat/completions")}};});var Lm,W3=n(()=>{Z();$();b();Q();q();J();te();oe();Lm=class{constructor(o={}){this._options=M(o);}access(o,e){return P.fromPromise(this.__access(o,e))}async __access(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ck.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(o){return P.fromPromise(this.__getWorkspaceName(o))}async __getWorkspaceName(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/auth/workspace"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:GD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 403:throw new fe(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/auth/workspace")}};});var Vm,L3=n(()=>{Z();$();b();Q();q();J();te();oe();Vm=class{constructor(o={}){this._options=M(o);}findDashboards(o={},e){return P.fromPromise(this.__findDashboards(o,e))}async __findDashboards(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/dashboards")}createDashboard(o,e){return P.fromPromise(this.__createDashboard(o,e))}async __createDashboard(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(o,e={},t){return P.fromPromise(this.__getDashboardById(o,e,t))}async __getDashboardById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/dashboards/{dashboardId}")}deleteDashboard(o,e={},t){return P.fromPromise(this.__deleteDashboard(o,e,t))}async __deleteDashboard(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/dashboards/{dashboardId}")}updateDashboard(o,e,t){return P.fromPromise(this.__updateDashboard(o,e,t))}async __updateDashboard(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ps.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(o,e){return P.fromPromise(this.__deleteDashboardsBatch(o,e))}async __deleteDashboardsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards/delete-batch")}};});var Jm,V3=n(()=>{Z();$();b();Mr();Q();q();J();te();oe();Jm=class{constructor(o={}){this._options=M(o);}applyDatasetItemChanges(o,e,t){return P.fromPromise(this.__applyDatasetItemChanges(o,e,t))}async __applyDatasetItemChanges(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:i,body:a}=e,s={override:i},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:yv.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:$r.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new X(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"POST","/v1/private/datasets/{id}/items/changes")}batchUpdateDatasetItems(o,e){return P.fromPromise(this.__batchUpdateDatasetItems(o,e))}async __batchUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(o={},e){return P.fromPromise(this.__findDatasets(o,e))}async __findDatasets(o={},e){var y,w,A,C,I,D,F,B,Y,ne,we;let{page:t,size:i,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=o,f={page:t,size:i,with_experiments_only:a,with_optimizations_only:s,prompt_id:c,project_id:l,name:m,sorting:u,filters:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((B=(F=e==null?void 0:e.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?B:60)*1e3,maxRetries:(ne=e==null?void 0:e.maxRetries)!=null?ne:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:Rs.parseOrThrow(h.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:h.rawResponse};if(h.error.reason==="status-code")throw new k({statusCode:h.error.statusCode,body:h.error.body,rawResponse:h.rawResponse});return j(h.error,h.rawResponse,"GET","/v1/private/datasets")}createDataset(o,e){return P.fromPromise(this.__createDataset(o,e))}async __createDataset(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ta.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(o,e){return P.fromPromise(this.__createOrUpdateDatasetItems(o,e))}async __createOrUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:$i.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(o,e){return P.fromPromise(this.__createDatasetItemsFromCsv(o,e))}async __createDatasetItemsFromCsv(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await sh();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId);let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-csv")}createDatasetItemsFromJson(o,e){return P.fromPromise(this.__createDatasetItemsFromJson(o,e))}async __createDatasetItemsFromJson(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await sh();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId),t.append("format",Cc.jsonOrThrow(o.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-json"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-json")}createDatasetItemsFromSpans(o,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(o,e,t))}async __createDatasetItemsFromSpans(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-spans`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(o,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(o,e,t))}async __createDatasetItemsFromTraces(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-traces`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Li.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(o,e={},t){return P.fromPromise(this.__getDatasetById(o,e,t))}async __getDatasetById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Eo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}")}updateDataset(o,e,t){return P.fromPromise(this.__updateDataset(o,e,t))}async __updateDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Xi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(o,e={},t){return P.fromPromise(this.__deleteDataset(o,e,t))}async __deleteDataset(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/datasets/{id}")}deleteDatasetByName(o,e){return P.fromPromise(this.__deleteDatasetByName(o,e))}async __deleteDatasetByName(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(o={},e){return P.fromPromise(this.__deleteDatasetItems(o,e))}async __deleteDatasetItems(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Yi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(o,e){return P.fromPromise(this.__deleteDatasetsBatch(o,e))}async __deleteDatasetsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(o,e={},t){return P.fromPromise(this.__downloadDatasetExport(o,e,t))}async __downloadDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/download`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,responseType:"streaming",timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:a.body,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}/download")}expandDataset(o,e,t){return P.fromPromise(this.__expandDataset(o,e,t))}async __expandDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/expansions`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hv.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/expansions")}findDatasetItemsWithExperimentItems(o,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(o,e,t))}async __findDatasetItemsWithExperimentItems(o,e,t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:i,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Kv.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(o,e){return P.fromPromise(this.__getDatasetByIdentifier(o,e))}async __getDatasetByIdentifier(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Hi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Eo.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(o,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(o,e,t))}async __getDatasetExperimentItemsStats(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:i,filters:a}=e,s={experiment_ids:i,filters:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/stats`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Yr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/stats")}getDatasetExportJob(o,e={},t){return P.fromPromise(this.__getDatasetExportJob(o,e,t))}async __getDatasetExportJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}")}getDatasetExportJobs(o){return P.fromPromise(this.__getDatasetExportJobs(o))}async __getDatasetExportJobs(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ho.getDatasetExportJobs.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/datasets/export-jobs")}getDatasetItemById(o,e={},t){return P.fromPromise(this.__getDatasetItemById(o,e,t))}async __getDatasetItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ys.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/items/{itemId}")}patchDatasetItem(o,e,t){return P.fromPromise(this.__patchDatasetItem(o,e,t))}async __patchDatasetItem(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ki.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/items/{itemId}")}getDatasetItems(o,e={},t){return P.fromPromise(this.__getDatasetItems(o,e,t))}async __getDatasetItems(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,version:s,filters:c,truncate:l}=e,m={page:i,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:nT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/datasets/{id}/items")}getDatasetItemsOutputColumns(o,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(o,e,t))}async __getDatasetItemsOutputColumns(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:i}=e,a={experiment_ids:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/output/columns`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:FC.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/output/columns")}markDatasetExportJobViewed(o,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(o,e,t))}async __markDatasetExportJobViewed(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/mark-viewed`),method:"PUT",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/export-jobs/{jobId}/mark-viewed")}startDatasetExport(o,e={},t){return P.fromPromise(this.__startDatasetExport(o,e,t))}async __startDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/export`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(o,e){return P.fromPromise(this.__streamDatasetItems(o,e))}async __streamDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(o,e={},t){return P.fromPromise(this.__compareDatasetVersions(o,e,t))}async __compareDatasetVersions(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/diff`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hT.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}/versions/diff")}createVersionTag(o,e,t,i){return P.fromPromise(this.__createVersionTag(o,e,t,i))}async __createVersionTag(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ea.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/datasets/{id}/versions/hash/{versionHash}/tags")}deleteVersionTag(o,e,t,i={},a){return P.fromPromise(this.__deleteVersionTag(o,e,t,i,a))}async __deleteVersionTag(o,e,t,i={},a){var l,m,u,d,f,g,h,y,w,A,C;let s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=a==null?void 0:a.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),a==null?void 0:a.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(o,e={},t){return P.fromPromise(this.__listDatasetVersions(o,e,t))}async __listDatasetVersions(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:bT.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw l.error.statusCode===400?new N(l.error.body,l.rawResponse):new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/versions")}restoreDatasetVersion(o,e,t){return P.fromPromise(this.__restoreDatasetVersion(o,e,t))}async __restoreDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/restore`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:$r.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/restore")}retrieveDatasetVersion(o,e,t){return P.fromPromise(this.__retrieveDatasetVersion(o,e,t))}async __retrieveDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/retrieve`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:$r.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(o,e,t={},i){return P.fromPromise(this.__updateDatasetVersion(o,e,t,i))}async __updateDatasetVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ra.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Hm,J3=n(()=>{Z();$();b();Q();q();J();te();oe();Hm=class{constructor(o={}){this._options=M(o);}findEnvironments(o){return P.fromPromise(this.__findEnvironments(o))}async __findEnvironments(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/environments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_T.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/environments")}createEnvironment(o,e){return P.fromPromise(this.__createEnvironment(o,e))}async __createEnvironment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(o,e){return P.fromPromise(this.__deleteEnvironmentsBatch(o,e))}async __deleteEnvironmentsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(o,e={},t){return P.fromPromise(this.__getEnvironmentById(o,e,t))}async __getEnvironmentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ws.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/environments/{id}")}updateEnvironment(o,e={},t){return P.fromPromise(this.__updateEnvironment(o,e,t))}async __updateEnvironment(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:oa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/environments/{id}")}};});var Gm,H3=n(()=>{Z();$();b();Q();q();J();te();oe();Gm=class{constructor(o={}){this._options=M(o);}batchUpdateExperiments(o,e){return P.fromPromise(this.__batchUpdateExperiments(o,e))}async __batchUpdateExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/experiments/batch")}findExperiments(o={},e){return P.fromPromise(this.__findExperiments(o,e))}async __findExperiments(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Br,ci;let{page:t,size:i,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=o,A={page:t,size:i,datasetId:a,optimization_id:s,types:c,name:l,dataset_deleted:m,prompt_id:u,project_id:d,project_deleted:f,sorting:g,filters:h,experiment_ids:y,force_sorting:w},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Br=e==null?void 0:e.maxRetries)!=null?Br:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ci=this._options)==null?void 0:ci.fetch,logging:this._options.logging});if(I.ok)return {data:Ts.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw I.error.statusCode===400?new N(I.error.body,I.rawResponse):new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/experiments")}createExperiment(o,e){return P.fromPromise(this.__createExperiment(o,e))}async __createExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(o,e){return P.fromPromise(this.__createExperimentItems(o,e))}async __createExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(o,e){return P.fromPromise(this.__deleteExperimentItems(o,e))}async __deleteExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(o,e){return P.fromPromise(this.__deleteExperimentsById(o,e))}async __deleteExperimentsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(o,e){return P.fromPromise(this.__executeExperiment(o,e))}async __executeExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ca.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:IT.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(o,e){return P.fromPromise(this.__experimentItemsBulk(o,e))}async __experimentItemsBulk(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(o={},e){return P.fromPromise(this.__findFeedbackScoreNames(o,e))}async __findFeedbackScoreNames(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:i}=o,a={experiment_ids:t,project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Qr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/experiments/feedback-scores/names")}findExperimentGroups(o={},e){return P.fromPromise(this.__findExperimentGroups(o,e))}async __findExperimentGroups(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:JT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups")}findExperimentGroupsAggregations(o={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(o,e))}async __findExperimentGroupsAggregations(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:NT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups/aggregations")}finishExperiments(o,e){return P.fromPromise(this.__finishExperiments(o,e))}async __finishExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(o,e={},t){return P.fromPromise(this.__getExperimentById(o,e,t))}async __getExperimentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/{id}")}updateExperiment(o,e,t){return P.fromPromise(this.__updateExperiment(o,e,t))}async __updateExperiment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/experiments/{id}")}getExperimentItemById(o,e={},t){return P.fromPromise(this.__getExperimentItemById(o,e,t))}async __getExperimentItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:hs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/items/{id}")}streamExperimentItems(o,e){return P.fromPromise(this.__streamExperimentItems(o,e))}async __streamExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(o,e){return P.fromPromise(this.__streamExperiments(o,e))}async __streamExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ya.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/stream")}};});var Om,G3=n(()=>{Z();$();b();Q();q();J();te();oe();Om=class{constructor(o={}){this._options=M(o);}findFeedbackDefinitions(o={},e){return P.fromPromise(this.__findFeedbackDefinitions(o,e))}async __findFeedbackDefinitions(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,type:s}=o,c={page:t,size:i,name:a,type:s!=null?Vc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Ej.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/feedback-definitions")}createFeedbackDefinition(o,e){return P.fromPromise(this.__createFeedbackDefinition(o,e))}async __createFeedbackDefinition(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pj.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(o,e,t))}async __getFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ij.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/feedback-definitions/{id}")}updateFeedbackDefinition(o,e,t){return P.fromPromise(this.__updateFeedbackDefinition(o,e,t))}async __updateFeedbackDefinition(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:tE.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(o,e,t))}async __deleteFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionsBatch(o,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(o,e))}async __deleteFeedbackDefinitionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Km,O3=n(()=>{Z();$();b();Q();q();J();te();Km=class{constructor(o={}){this._options=M(o);}createGuardrails(o,e){return P.fromPromise(this.__createGuardrails(o,e))}async __createGuardrails(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/guardrails")}};});var $m,K3=n(()=>{Z();$();b();Q();q();J();te();oe();$m=class{constructor(o={}){this._options=M(o);}findInsightsViews(o={},e){return P.fromPromise(this.__findInsightsViews(o,e))}async __findInsightsViews(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/insights-views")}createInsightsView(o,e){return P.fromPromise(this.__createInsightsView(o,e))}async __createInsightsView(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(o,e={},t){return P.fromPromise(this.__getInsightsViewById(o,e,t))}async __getInsightsViewById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/insights-views/{insightsViewId}")}deleteInsightsView(o,e={},t){return P.fromPromise(this.__deleteInsightsView(o,e,t))}async __deleteInsightsView(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/insights-views/{insightsViewId}")}updateInsightsView(o,e,t){return P.fromPromise(this.__updateInsightsView(o,e,t))}async __updateInsightsView(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ps.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(o,e){return P.fromPromise(this.__deleteInsightsViewsBatch(o,e))}async __deleteInsightsViewsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views/delete-batch")}};});var Qm,$3=n(()=>{Z();$();b();Q();q();J();te();Qm=class{constructor(o={}){this._options=M(o);}getLlmModels(o){return P.fromPromise(this.__getLlmModels(o))}async __getLlmModels(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm/models"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:bo.getLlmModels.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models")}};});var Ym,Q3=n(()=>{Z();$();b();Q();q();J();te();oe();Ym=class{constructor(o={}){this._options=M(o);}deleteLlmProviderApiKeysBatch(o,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(o,e))}async __deleteLlmProviderApiKeysBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(o){return P.fromPromise(this.__findLlmProviderKeys(o))}async __findLlmProviderKeys(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:KI.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm-provider-key")}storeLlmProviderApiKey(o,e){return P.fromPromise(this.__storeLlmProviderApiKey(o,e))}async __storeLlmProviderApiKey(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(o,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(o,e,t))}async __getLlmProviderApiKeyById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ms.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/llm-provider-key/{id}")}updateLlmProviderApiKey(o,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(o,e,t))}async __updateLlmProviderApiKey(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:wa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/llm-provider-key/{id}")}testLlmProviderAuthConfig(o={},e){return P.fromPromise(this.__testLlmProviderAuthConfig(o,e))}async __testLlmProviderAuthConfig(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/auth-config/test"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Xm,Y3=n(()=>{Z();$();b();Q();q();J();te();oe();Xm=class{constructor(o={}){this._options=M(o);}evaluateSpans(o,e){return P.fromPromise(this.__evaluateSpans(o,e))}async __evaluateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(o,e){return P.fromPromise(this.__evaluateThreads(o,e))}async __evaluateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(o,e){return P.fromPromise(this.__evaluateTraces(o,e))}async __evaluateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Is.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ds.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Zm,X3=n(()=>{Z();$();b();Q();q();J();te();oe();Zm=class{constructor(o={}){this._options=M(o);}authorize(o,e){return P.fromPromise(this.__authorize(o,e))}async __authorize(o,e){var g,h,y,w,A,C,I,D,F,B,Y;let{clientId:t,redirectUri:i,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=o,u={client_id:t,redirect_uri:i,response_type:a,code_challenge:s,code_challenge_method:c,resource:l,state:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"oauth/authorize"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/oauth/authorize")}consent(o,e){return P.fromPromise(this.__consent(o,e))}async __consent(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/authorize"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(o,e){return P.fromPromise(this.__getAuthorizeContext(o,e))}async __getAuthorizeContext(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:i}=o,a={client_id:t,redirect_uri:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"oauth/authorize/context"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Nk.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/oauth/authorize/context")}getOAuthAuthorizationServerMetadata(o){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(o))}async __getOAuthAuthorizationServerMetadata(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,".well-known/oauth-authorization-server"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ik.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/.well-known/oauth-authorization-server")}registerOAuthClient(o,e){return P.fromPromise(this.__registerOAuthClient(o,e))}async __registerOAuthClient(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/register"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Aa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:_S.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===429?new Qe(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/register")}revoke(o={},e){return P.fromPromise(this.__revoke(o,e))}async __revoke(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/revoke"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:za.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/revoke")}token(o={},e){return P.fromPromise(this.__token(o,e))}async __token(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/token"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:Sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/token")}validateOAuthToken(o){return P.fromPromise(this.__validateOAuthToken(o))}async __validateOAuthToken(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"opik/auth-oauth"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:BD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/opik/auth-oauth")}};});var qm,Z3=n(()=>{Z();$();b();Q();q();J();te();oe();qm=class{constructor(o={}){this._options=M(o);}listModels(o,e){return P.fromPromise(this.__listModels(o,e))}async __listModels(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ro.listModels.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 500:throw new mt(i.error.body,i.rawResponse);case 503:throw new io(Io.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/models")}testConnection(o,e){return P.fromPromise(this.__testConnection(o,e))}async __testConnection(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Am.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 502:throw new ui(Am.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 503:throw new io(Io.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var ed,q3=n(()=>{Z();$();b();Q();q();J();oe();ed=class{constructor(o={}){this._options=M(o);}downloadOllieState(o){return P.fromPromise(this.__downloadOllieState(o))}async __downloadOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,responseType:"streaming",timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 404:throw new U(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/ollie/state")}replaceOllieState(o,e){return P.fromPromise(this.__replaceOllieState(o,e))}async __replaceOllieState(o,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await hi.toBinaryUploadRequest(o),i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,"v1/private/ollie/state"),method:"PUT",headers:i,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/ollie/state")}deleteOllieState(o){return P.fromPromise(this.__deleteOllieState(o))}async __deleteOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/ollie/state")}};});var rd,e8=n(()=>{Z();$();b();Q();q();J();rd=class{constructor(o={}){this._options=M(o);}receiveProtobufTraces(o){return P.fromPromise(this.__receiveProtobufTraces(o))}async __receiveProtobufTraces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/v1/private/otel/v1/traces")}};});var td,r8=n(()=>{Z();$();b();Q();q();J();te();oe();td=class{constructor(o={}){this._options=M(o);}findOptimizations(o={},e){return P.fromPromise(this.__findOptimizations(o,e))}async __findOptimizations(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:t,size:i,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=o,d={page:t,size:i,dataset_id:a,name:s,dataset_name:c,dataset_deleted:l,project_id:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Ns.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/optimizations")}createOptimization(o,e){return P.fromPromise(this.__createOptimization(o,e))}async __createOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(o,e){return P.fromPromise(this.__upsertOptimization(o,e))}async __upsertOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(o,e){return P.fromPromise(this.__deleteOptimizationsById(o,e))}async __deleteOptimizationsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Co.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(o,e={},t){return P.fromPromise(this.__getOptimizationById(o,e,t))}async __getOptimizationById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Us.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/{id}")}updateOptimizationsById(o,e={},t){return P.fromPromise(this.__updateOptimizationsById(o,e,t))}async __updateOptimizationsById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/optimizations/{id}")}getStudioOptimizationLogs(o,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(o,e,t))}async __getStudioOptimizationLogs(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/studio/${_.encodePathParam(o)}/logs`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:DC.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/studio/{id}/logs")}};});var od,t8=n(()=>{Z();$();b();Q();q();J();te();oe();od=class{constructor(o={}){this._options=M(o);}activatePairingSession(o,e,t){return P.fromPromise(this.__activatePairingSession(o,e,t))}async __activatePairingSession(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/pairing/sessions/${_.encodePathParam(o)}/activate`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ta.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/pairing/sessions/{sessionId}/activate")}createPairingSession(o,e){return P.fromPromise(this.__createPairingSession(o,e))}async __createPairingSession(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ja.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:HS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 429:throw new Qe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/pairing/sessions")}};});var id,o8=n(()=>{Z();$();b();Q();q();J();te();oe();id=class{constructor(o={}){this._options=M(o);}findAlertsByProject(o,e={},t){return P.fromPromise(this.__findAlertsByProject(o,e,t))}async __findAlertsByProject(o,e={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:i,size:a,sorting:s,filters:c}=e,l={page:i,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=t==null?void 0:t.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),t==null?void 0:t.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,`v1/private/projects/${_.encodePathParam(o)}/alerts`),method:"GET",headers:m,queryParameters:{...l,...t==null?void 0:t.queryParams},timeoutMs:((C=(A=t==null?void 0:t.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=t==null?void 0:t.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:Tn.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw u.error.statusCode===400?new N(u.error.body,u.rawResponse):new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/projects/{projectId}/alerts")}findDashboardsByProject(o,e={},t){return P.fromPromise(this.__findDashboardsByProject(o,e,t))}async __findDashboardsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/dashboards`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Ft.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/dashboards")}findDatasetsByProject(o,e={},t){return P.fromPromise(this.__findDatasetsByProject(o,e,t))}async __findDatasetsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,d={page:i,size:a,with_experiments_only:s,with_optimizations_only:c,name:l,sorting:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Rs.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/datasets")}findExperimentsByProject(o,e={},t){return P.fromPromise(this.__findExperimentsByProject(o,e,t))}async __findExperimentsByProject(o,e={},t){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:i,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,y={page:i,size:a,datasetId:s,optimization_id:c,types:l,name:m,dataset_deleted:u,sorting:d,filters:f,experiment_ids:g,force_sorting:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=t==null?void 0:t.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),t==null?void 0:t.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,`v1/private/projects/${_.encodePathParam(o)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ne=t==null?void 0:t.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=t==null?void 0:t.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:Ts.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw A.error.statusCode===400?new N(A.error.body,A.rawResponse):new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/projects/{projectId}/experiments")}findOptimizationsByProject(o,e={},t){return P.fromPromise(this.__findOptimizationsByProject(o,e,t))}async __findOptimizationsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,d={page:i,size:a,dataset_id:s,dataset_name:c,name:l,dataset_deleted:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Ns.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/optimizations")}getPromptsByProject(o,e={},t){return P.fromPromise(this.__getPromptsByProject(o,e,t))}async __getPromptsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/prompts`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Bs.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/prompts")}findProjects(o={},e){return P.fromPromise(this.__findProjects(o,e))}async __findProjects(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,sorting:s}=o,c={page:t,size:i,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:aI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/projects")}createProject(o,e){return P.fromPromise(this.__createProject(o,e))}async __createProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Na.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects")}getProjectById(o,e={},t){return P.fromPromise(this.__getProjectById(o,e,t))}async __getProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Fs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}")}deleteProjectById(o,e={},t){return P.fromPromise(this.__deleteProjectById(o,e,t))}async __deleteProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/projects/{id}")}updateProject(o,e={},t){return P.fromPromise(this.__updateProject(o,e,t))}async __updateProject(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ua.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/projects/{id}")}deleteProjectsBatch(o,e){return P.fromPromise(this.__deleteProjectsBatch(o,e))}async __deleteProjectsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(o={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(o,e))}async __findFeedbackScoreNamesByProjectIds(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=o,i={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vj.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/projects/feedback-scores/names")}findTokenUsageNames(o,e={},t){return P.fromPromise(this.__findTokenUsageNames(o,e,t))}async __findTokenUsageNames(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/token-usage/names`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Js.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}/token-usage/names")}getProjectKpiCards(o,e,t){return P.fromPromise(this.__getProjectKpiCards(o,e,t))}async __getProjectKpiCards(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/kpi-cards`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ea.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:bE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/kpi-cards")}getProjectMetrics(o,e={},t){return P.fromPromise(this.__getProjectMetrics(o,e,t))}async __getProjectMetrics(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/metrics`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:rI.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/metrics")}getProjectStats(o={},e){return P.fromPromise(this.__getProjectStats(o,e))}async __getProjectStats(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{page:t,size:i,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=o,u={page:t,size:i,name:a,filters:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),sorting:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/projects/stats"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:mI.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/projects/stats")}retrieveProject(o,e){return P.fromPromise(this.__retrieveProject(o,e))}async __retrieveProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:$C.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(o,e={},t){return P.fromPromise(this.__getRecentActivity(o,e,t))}async __getRecentActivity(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/activities`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:ZI.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 500:throw new mt(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/activities")}};});var ad,i8=n(()=>{Z();$();b();Q();q();J();te();oe();ad=class{constructor(o={}){this._options=M(o);}getPrompts(o={},e){return P.fromPromise(this.__getPrompts(o,e))}async __getPrompts(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Bs.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts")}createPrompt(o,e){return P.fromPromise(this.__createPrompt(o,e))}async __createPrompt(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(o,e){return P.fromPromise(this.__createPromptVersion(o,e))}async __createPromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(o,e){return P.fromPromise(this.__updatePromptVersions(o,e))}async __updatePromptVersions(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(o,e={},t){return P.fromPromise(this.__getPromptById(o,e,t))}async __getPromptById(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:i,environment:a}=e,s={mask_id:i,environment:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:vm.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/prompts/{id}")}updatePrompt(o,e,t){return P.fromPromise(this.__updatePrompt(o,e,t))}async __updatePrompt(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ma.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/prompts/{id}")}deletePrompt(o,e={},t){return P.fromPromise(this.__deletePrompt(o,e,t))}async __deletePrompt(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/prompts/{id}")}deletePromptsBatch(o,e){return P.fromPromise(this.__deletePromptsBatch(o,e))}async __deletePromptsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(o,e={},t){return P.fromPromise(this.__getPromptByCommit(o,e,t))}async __getPromptByCommit(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/by-commit/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vm.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/prompts/by-commit/{commit}")}getPromptVersionById(o,e={},t){return P.fromPromise(this.__getPromptVersionById(o,e,t))}async __getPromptVersionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:De.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/prompts/versions/{versionId}")}getPromptVersionByNumber(o,e,t={},i){return P.fromPromise(this.__getPromptVersionByNumber(o,e,t,i))}async __getPromptVersionByNumber(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/by-number/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"GET","/v1/private/prompts/{promptId}/versions/by-number/{versionNumber}")}getPromptVersions(o,e={},t){return P.fromPromise(this.__getPromptVersions(o,e,t))}async __getPromptVersions(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,search:s,sorting:c,filters:l}=e,m={page:i,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:FI.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts/{id}/versions")}getPromptsByCommits(o,e){return P.fromPromise(this.__getPromptsByCommits(o,e))}async __getPromptsByCommits(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:La.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wt.getPromptsByCommits.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(o,e,t={},i){return P.fromPromise(this.__restorePromptVersion(o,e,t,i))}async __restorePromptVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/restore`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/prompts/{promptId}/versions/{versionId}/restore")}retrievePromptVersion(o,e){return P.fromPromise(this.__retrievePromptVersion(o,e))}async __retrievePromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(o,e){return P.fromPromise(this.__retrievePromptVersionsByIds(o,e))}async __retrievePromptVersionsByIds(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve-by-ids"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ja.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:wt.retrievePromptVersionsByIds.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(o,e,t){return P.fromPromise(this.__setPromptVersionEnvironment(o,e,t))}async __setPromptVersionEnvironment(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}/environments`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/prompts/versions/{versionId}/environments")}};});var nd,a8=n(()=>{Z();$();b();Q();q();J();oe();nd=class{constructor(o={}){this._options=M(o);}datasetsRedirect(o,e){return P.fromPromise(this.__datasetsRedirect(o,e))}async __datasetsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:i,path:a}=o,s={dataset_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/datasets")}experimentsRedirect(o,e){return P.fromPromise(this.__experimentsRedirect(o,e))}async __experimentsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:i,workspaceName:a,path:s}=o,c={dataset_id:t,experiment_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/experiments")}optimizationsRedirect(o,e){return P.fromPromise(this.__optimizationsRedirect(o,e))}async __optimizationsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:i,workspaceName:a,path:s}=o,c={dataset_id:t,optimization_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/optimizations")}projectsRedirect(o,e){return P.fromPromise(this.__projectsRedirect(o,e))}async __projectsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:i,path:a}=o,s={trace_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/projects")}};});var sd,n8=n(()=>{Z();$();b();Q();q();J();te();oe();sd=class{constructor(o={}){this._options=M(o);}findReportFailures(o,e){return P.fromPromise(this.__findReportFailures(o,e))}async __findReportFailures(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:i,page:a,size:s}=o,c={type:dl.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/report-failures"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:tD.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===401?new O(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/report-failures")}createReportFailure(o,e){return P.fromPromise(this.__createReportFailure(o,e))}async __createReportFailure(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/report-failures"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ws.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/report-failures")}};});var pd,s8=n(()=>{Z();$();b();Q();q();J();te();oe();pd=class{constructor(o={}){this._options=M(o);}completeReport(o,e,t,i){return P.fromPromise(this.__completeReport(o,e,t,i))}async __completeReport(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/${_.encodePathParam(e)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Oa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/projects/{projectId}/reports/{reportId}/complete")}generateReport(o,e={},t){return P.fromPromise(this.__generateReport(o,e,t))}async __generateReport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/generate`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:oE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{projectId}/reports/generate")}getReportPreference(o,e={},t){return P.fromPromise(this.__getReportPreference(o,e,t))}async __getReportPreference(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ls.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{projectId}/reports/preferences")}updateReportPreference(o,e,t){return P.fromPromise(this.__updateReportPreference(o,e,t))}async __updateReportPreference(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ls.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Ls.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/projects/{projectId}/reports/preferences")}getReports(o,e={},t){return P.fromPromise(this.__getReports(o,e,t))}async __getReports(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:WE.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/reports")}};});var cd,p8=n(()=>{Z();$();b();Q();q();J();te();oe();cd=class{constructor(o={}){this._options=M(o);}findRetentionRules(o={},e){return P.fromPromise(this.__findRetentionRules(o,e))}async __findRetentionRules(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:i,includeInactive:a}=o,s={page:t,size:i,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:cD.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/retention/rules")}createRetentionRule(o,e){return P.fromPromise(this.__createRetentionRule(o,e))}async __createRetentionRule(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:No.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(o,e={},t){return P.fromPromise(this.__getRetentionRuleById(o,e,t))}async __getRetentionRuleById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:No.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/retention/rules/{ruleId}")}deactivateRetentionRule(o,e={},t){return P.fromPromise(this.__deactivateRetentionRule(o,e,t))}async __deactivateRetentionRule(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/retention/rules/{ruleId}")}};});var ld,c8=n(()=>{Z();$();b();Q();q();J();te();oe();ld=class{constructor(o={}){this._options=M(o);}getJobLogs(o,e={},t){return P.fromPromise(this.__getJobLogs(o,e,t))}async __getJobLogs(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:i}=e,a={offset:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:ur.getJobLogs.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}/logs")}appendJobLogs(o,e,t){return P.fromPromise(this.__appendJobLogs(o,e,t))}async __appendJobLogs(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.appendJobLogs.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/logs")}cancelJob(o,e={},t){return P.fromPromise(this.__cancelJob(o,e,t))}async __cancelJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/cancel`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/cancel")}createBridgeCommand(o,e,t){return P.fromPromise(this.__createBridgeCommand(o,e,t))}async __createBridgeCommand(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ya.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:jz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands")}createJob(o,e){return P.fromPromise(this.__createJob(o,e))}async __createJob(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Za.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new U(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(o,e={},t){return P.fromPromise(this.__getRunner(o,e,t))}async __getRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/{runnerId}")}disconnectRunner(o,e={},t){return P.fromPromise(this.__disconnectRunner(o,e,t))}async __disconnectRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/local-runners/{runnerId}")}getBridgeCommand(o,e,t={},i){return P.fromPromise(this.__getBridgeCommand(o,e,t,i))}async __getBridgeCommand(o,e,t={},i){var u,d,f,g,h,y,w,A,C,I,D;let{wait:a,timeout:s}=t,c={wait:a,timeout:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=i==null?void 0:i.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),i==null?void 0:i.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}`),method:"GET",headers:l,queryParameters:{...c,...i==null?void 0:i.queryParams},timeoutMs:((A=(w=i==null?void 0:i.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=i==null?void 0:i.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Az.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}")}getJob(o,e={},t){return P.fromPromise(this.__getJob(o,e,t))}async __getJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:_t.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}")}heartbeat(o,e={},t){return P.fromPromise(this.__heartbeat(o,e,t))}async __heartbeat(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/heartbeats`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:AE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 410:throw new lt(Io.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/heartbeats")}listJobs(o,e={},t){return P.fromPromise(this.__listJobs(o,e,t))}async __listJobs(o,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,page:a,size:s}=e,c={project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:PE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/jobs")}listRunners(o,e){return P.fromPromise(this.__listRunners(o,e))}async __listRunners(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:i,page:a,size:s}=o,c={project_id:t,status:i!=null?Tl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:zE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners")}nextBridgeCommands(o,e={},t){return P.fromPromise(this.__nextBridgeCommands(o,e,t))}async __nextBridgeCommands(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/next`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$a.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Tz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/next")}nextJob(o,e={},t){return P.fromPromise(this.__nextJob(o,e,t))}async __nextJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs/next`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ur.nextJob.Response.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/jobs/next")}patchChecklist(o,e,t){return P.fromPromise(this.__patchChecklist(o,e,t))}async __patchChecklist(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.patchChecklist.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/local-runners/{runnerId}/checklist")}registerAgents(o,e,t){return P.fromPromise(this.__registerAgents(o,e,t))}async __registerAgents(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.registerAgents.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/local-runners/{runnerId}/agents")}reportBridgeResult(o,e,t,i){return P.fromPromise(this.__reportBridgeResult(o,e,t,i))}async __reportBridgeResult(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Qa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}/results")}reportJobResult(o,e,t){return P.fromPromise(this.__reportJobResult(o,e,t))}async __reportJobResult(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/results`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:en.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/results")}};});var md,l8=n(()=>{Z();$();b();Q();q();J();te();md=class{constructor(o={}){this._options=M(o);}getServiceToggles(o){return P.fromPromise(this.__getServiceToggles(o))}async __getServiceToggles(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/toggles"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:lD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/toggles")}};});var dd,m8=n(()=>{Z();$();b();Q();q();J();te();oe();dd=class{constructor(o={}){this._options=M(o);}addSpanComment(o,e,t){return P.fromPromise(this.__addSpanComment(o,e,t))}async __addSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/comments")}addSpanFeedbackScore(o,e,t){return P.fromPromise(this.__addSpanFeedbackScore(o,e,t))}async __addSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/spans/{id}/feedback-scores")}createSpans(o,e){return P.fromPromise(this.__createSpans(o,e))}async __createSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(o,e){return P.fromPromise(this.__batchUpdateSpans(o,e))}async __batchUpdateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:on.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(o={},e){return P.fromPromise(this.__getSpansByProject(o,e))}async __getSpansByProject(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Br,ci;let{page:t,size:i,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=o,A={page:t,size:i,project_name:a,project_id:s,trace_id:c,type:l!=null?Dl.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:m,truncate:u,strip_attachments:d,sorting:f,exclude:g,search:h,from_time:y==null?void 0:y.toISOString(),to_time:w==null?void 0:w.toISOString()},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Br=e==null?void 0:e.maxRetries)!=null?Br:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ci=this._options)==null?void 0:ci.fetch,logging:this._options.logging});if(I.ok)return {data:hD.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/spans")}createSpan(o,e){return P.fromPromise(this.__createSpan(o,e))}async __createSpan(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:nn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans")}getSpanById(o,e={},t){return P.fromPromise(this.__getSpanById(o,e,t))}async __getSpanById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vs.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/{id}")}deleteSpanById(o,e={},t){return P.fromPromise(this.__deleteSpanById(o,e,t))}async __deleteSpanById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new Lr(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/spans/{id}")}updateSpan(o,e,t){return P.fromPromise(this.__updateSpan(o,e,t))}async __updateSpan(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:tn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/{id}")}deleteSpanComments(o,e){return P.fromPromise(this.__deleteSpanComments(o,e))}async __deleteSpanComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(o,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(o,e,t))}async __deleteSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:xs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/feedback-scores/delete")}findFeedbackScoreNames1(o={},e){return P.fromPromise(this.__findFeedbackScoreNames1(o,e))}async __findFeedbackScoreNames1(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:i}=o,a={project_id:t,type:i!=null?Cl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Qr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/feedback-scores/names")}getSpanComment(o,e,t={},i){return P.fromPromise(this.__getSpanComment(o,e,t,i))}async __getSpanComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/spans/{spanId}/comments/{commentId}")}getSpanStats(o={},e){return P.fromPromise(this.__getSpanStats(o,e))}async __getSpanStats(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,projectName:i,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=o,d={project_id:t,project_name:i,trace_id:a,type:s!=null?Il.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:c,search:l,from_time:m==null?void 0:m.toISOString(),to_time:u==null?void 0:u.toISOString()},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Yr.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/spans/stats")}scoreBatchOfSpans(o,e){return P.fromPromise(this.__scoreBatchOfSpans(o,e))}async __scoreBatchOfSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(o={},e){return P.fromPromise(this.__searchSpans(o,e))}async __searchSpans(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:i,source:a}=o,s={project_id:t,project_name:i,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/spans/exists"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:As.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/spans/exists")}updateSpanComment(o,e,t){return P.fromPromise(this.__updateSpanComment(o,e,t))}async __updateSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/comments/{commentId}")}};});var ud,d8=n(()=>{Z();$();b();Q();q();J();te();oe();ud=class{constructor(o={}){this._options=M(o);}executeAnalyticsQuery(o,e,t){return P.fromPromise(this.__executeAnalyticsQuery(o,e,t))}async __executeAnalyticsQuery(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/internal/analytics-queries/projects/${_.encodePathParam(o)}`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:cn.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Hl.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 501:throw new Lr(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/internal/analytics-queries/projects/{projectId}")}executeScopedAnalyticsQuery(o,e){return P.fromPromise(this.__executeScopedAnalyticsQuery(o,e))}async __executeScopedAnalyticsQuery(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ln.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hl.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 501:throw new Lr(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/internal/analytics-queries")}};});var gd,u8=n(()=>{Z();$();b();Q();q();J();te();gd=class{constructor(o={}){this._options=M(o);}getDatasetBiInfo(o){return P.fromPromise(this.__getDatasetBiInfo(o))}async __getDatasetBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-datasets")}getExperimentBiInfo(o){return P.fromPromise(this.__getExperimentBiInfo(o))}async __getExperimentBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-experiments")}getSpansBiInfo(o){return P.fromPromise(this.__getSpansBiInfo(o))}async __getSpansBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-spans")}getSpansCountBreakdownForWorkspaces(o){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(o))}async __getSpansCountBreakdownForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts-breakdown"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:FD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts-breakdown")}getSpansCountForWorkspaces(o){return P.fromPromise(this.__getSpansCountForWorkspaces(o))}async __getSpansCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:RD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts")}getTracesBiInfo(o){return P.fromPromise(this.__getTracesBiInfo(o))}async __getTracesBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-traces")}getTracesCountForWorkspaces(o){return P.fromPromise(this.__getTracesCountForWorkspaces(o))}async __getTracesCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:AD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-trace-counts")}};});var fd,g8=n(()=>{Z();$();b();Q();q();J();te();oe();fd=class{constructor(o={}){this._options=M(o);}addThreadComment(o,e,t){return P.fromPromise(this.__addThreadComment(o,e,t))}async __addThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/threads/{id}/comments")}addTraceComment(o,e,t){return P.fromPromise(this.__addTraceComment(o,e,t))}async __addTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/comments")}addTraceFeedbackScore(o,e,t){return P.fromPromise(this.__addTraceFeedbackScore(o,e,t))}async __addTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/traces/{id}/feedback-scores")}createTraces(o,e){return P.fromPromise(this.__createTraces(o,e))}async __createTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(o,e){return P.fromPromise(this.__batchUpdateTraces(o,e))}async __batchUpdateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(o,e){return P.fromPromise(this.__batchUpdateThreads(o,e))}async __batchUpdateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_n.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(o={},e){return P.fromPromise(this.__closeTraceThread(o,e))}async __closeTraceThread(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(o={},e){return P.fromPromise(this.__getTracesByProject(o,e))}async __getTracesByProject(o={},e){var I,D,F,B,Y,ne,we,je,Ee,Ce,Br;let{page:t,size:i,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=o,w={page:t,size:i,project_name:a,project_id:s,filters:c,truncate:l,strip_attachments:m,sorting:u,exclude:d,search:f,from_time:g==null?void 0:g.toISOString(),to_time:h==null?void 0:h.toISOString(),annotation_queue_id:y},A=z((I=this._options)==null?void 0:I.headers,T({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),e==null?void 0:e.headers),C=await S({url:_.join((Y=(B=await x.get(this._options.baseUrl))!=null?B:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...e==null?void 0:e.queryParams},timeoutMs:((je=(we=e==null?void 0:e.timeoutInSeconds)!=null?we:(ne=this._options)==null?void 0:ne.timeoutInSeconds)!=null?je:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Br=this._options)==null?void 0:Br.fetch,logging:this._options.logging});if(C.ok)return {data:jD.parseOrThrow(C.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:C.rawResponse};if(C.error.reason==="status-code")throw new k({statusCode:C.error.statusCode,body:C.error.body,rawResponse:C.rawResponse});return j(C.error,C.rawResponse,"GET","/v1/private/traces")}createTrace(o,e){return P.fromPromise(this.__createTrace(o,e))}async __createTrace(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces")}getTraceById(o,e={},t){return P.fromPromise(this.__getTraceById(o,e,t))}async __getTraceById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Hs.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/traces/{id}")}deleteTraceById(o,e={},t){return P.fromPromise(this.__deleteTraceById(o,e,t))}async __deleteTraceById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/traces/{id}")}updateTrace(o,e,t){return P.fromPromise(this.__updateTrace(o,e,t))}async __updateTrace(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/{id}")}deleteThreadComments(o,e){return P.fromPromise(this.__deleteThreadComments(o,e))}async __deleteThreadComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(o,e){return P.fromPromise(this.__deleteThreadFeedbackScores(o,e))}async __deleteThreadFeedbackScores(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:dn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(o,e){return P.fromPromise(this.__deleteTraceComments(o,e))}async __deleteTraceComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(o,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(o,e,t))}async __deleteTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:xs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/feedback-scores/delete")}deleteTraceThreads(o,e){return P.fromPromise(this.__deleteTraceThreads(o,e))}async __deleteTraceThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:un.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(o,e){return P.fromPromise(this.__deleteTraces(o,e))}async __deleteTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(o={},e){return P.fromPromise(this.__findFeedbackScoreNames2(o,e))}async __findFeedbackScoreNames2(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Qr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/feedback-scores/names")}findTraceThreadsFeedbackScoreNames(o={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(o,e))}async __findTraceThreadsFeedbackScoreNames(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Qr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/feedback-scores/names")}getTraceStats(o={},e){return P.fromPromise(this.__getTraceStats(o,e))}async __getTraceStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Yr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(o,e,t={},i){return P.fromPromise(this.__getThreadComment(o,e,t,i))}async __getThreadComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/{threadId}/comments/{commentId}")}getTraceThreadStats(o={},e){return P.fromPromise(this.__getTraceThreadStats(o,e))}async __getTraceThreadStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Yr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/threads/stats")}getTraceComment(o,e,t={},i){return P.fromPromise(this.__getTraceComment(o,e,t,i))}async __getTraceComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/{traceId}/comments/{commentId}")}getTraceThread(o,e){return P.fromPromise(this.__getTraceThread(o,e))}async __getTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Gs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(o={},e){return P.fromPromise(this.__getTraceThreads(o,e))}async __getTraceThreads(o={},e){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:t,size:i,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g,annotationQueueId:h}=o,y={page:t,size:i,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString(),annotation_queue_id:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,"v1/private/traces/threads"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ne=e==null?void 0:e.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:DD.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(o,e){return P.fromPromise(this.__openTraceThread(o,e))}async __openTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(o,e){return P.fromPromise(this.__scoreBatchOfThreads(o,e))}async __scoreBatchOfThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:gn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(o,e){return P.fromPromise(this.__scoreBatchOfTraces(o,e))}async __scoreBatchOfTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(o={},e){return P.fromPromise(this.__searchTraceThreads(o,e))}async __searchTraceThreads(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(o={},e){return P.fromPromise(this.__searchTraces(o,e))}async __searchTraces(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Rn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/traces/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:i,source:a,threadOnly:s}=o,c={project_id:t,project_name:i,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/traces/exists"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:As.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/traces/exists")}updateThread(o,e,t){return P.fromPromise(this.__updateThread(o,e,t))}async __updateThread(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:wn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/{threadModelId}")}updateThreadComment(o,e,t){return P.fromPromise(this.__updateThreadComment(o,e,t))}async __updateThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/comments/{commentId}")}updateTraceComment(o,e,t){return P.fromPromise(this.__updateTraceComment(o,e,t))}async __updateTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/comments/{commentId}")}};});var hd,f8=n(()=>{Z();$();b();Q();q();J();te();hd=class{constructor(o={}){this._options=M(o);}getWelcomeWizardStatus(o){return P.fromPromise(this.__getWelcomeWizardStatus(o))}async __getWelcomeWizardStatus(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:JD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/welcome-wizard")}submitWelcomeWizard(o={},e){return P.fromPromise(this.__submitWelcomeWizard(o,e))}async __submitWelcomeWizard(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:An.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/welcome-wizard")}};});var yd,h8=n(()=>{Z();$();b();Q();q();J();te();oe();yd=class{constructor(o={}){this._options=M(o);}getWorkspaceUserPermissions(o){return P.fromPromise(this.__getWorkspaceUserPermissions(o))}async __getWorkspaceUserPermissions(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:OD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new N(t.error.body,t.rawResponse);case 401:throw new O(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/workspace-permissions")}};});var bd,y8=n(()=>{Z();$();b();Q();q();J();te();oe();bd=class{constructor(o={}){this._options=M(o);}costsSummary(o,e){return P.fromPromise(this.__costsSummary(o,e))}async __costsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(o){return P.fromPromise(this.__getWorkspaceConfiguration(o))}async __getWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Os.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/workspaces/configurations")}upsertWorkspaceConfiguration(o,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(o,e))}async __upsertWorkspaceConfiguration(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Os.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Os.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(o){return P.fromPromise(this.__deleteWorkspaceConfiguration(o))}async __deleteWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/workspaces/configurations")}getCost(o,e){return P.fromPromise(this.__getCost(o,e))}async __getCost(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(o,e){return P.fromPromise(this.__getMetric(o,e))}async __getMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(o,e){return P.fromPromise(this.__getWorkspaceSpanMetric(o,e))}async __getWorkspaceSpanMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ks.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(o={},e){return P.fromPromise(this.__getWorkspaceTokenUsageNames(o,e))}async __getWorkspaceTokenUsageNames(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/token-usage/names"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Js.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(o,e){return P.fromPromise(this.__metricsSummary(o,e))}async __metricsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:HD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var $s,b8=n(()=>{j3();E3();C3();I3();D3();U3();N3();F3();B3();M3();W3();L3();V3();J3();H3();G3();O3();K3();$3();Q3();Y3();X3();Z3();q3();e8();r8();t8();o8();i8();a8();n8();s8();p8();c8();l8();m8();d8();u8();g8();f8();h8();y8();Z();$();b();Q();q();J();$s=class{constructor(o={}){this._options=M(o);}get mcpOAuth(){var o;return (o=this._mcpOAuth)!=null?o:this._mcpOAuth=new Zm(this._options)}get agentInsightsEnrollment(){var o;return (o=this._agentInsightsEnrollment)!=null?o:this._agentInsightsEnrollment=new Im(this._options)}get systemAnalyticsQueries(){var o;return (o=this._systemAnalyticsQueries)!=null?o:this._systemAnalyticsQueries=new ud(this._options)}get systemUsage(){var o;return (o=this._systemUsage)!=null?o:this._systemUsage=new gd(this._options)}get agentConfigs(){var o;return (o=this._agentConfigs)!=null?o:this._agentConfigs=new Em(this._options)}get agentInsightsJobs(){var o;return (o=this._agentInsightsJobs)!=null?o:this._agentInsightsJobs=new Dm(this._options)}get agentInsights(){var o;return (o=this._agentInsights)!=null?o:this._agentInsights=new Cm(this._options)}get alerts(){var o;return (o=this._alerts)!=null?o:this._alerts=new Um(this._options)}get annotationQueues(){var o;return (o=this._annotationQueues)!=null?o:this._annotationQueues=new Nm(this._options)}get assertionResults(){var o;return (o=this._assertionResults)!=null?o:this._assertionResults=new Fm(this._options)}get attachments(){var o;return (o=this._attachments)!=null?o:this._attachments=new Bm(this._options)}get check(){var o;return (o=this._check)!=null?o:this._check=new Lm(this._options)}get automationRuleEvaluators(){var o;return (o=this._automationRuleEvaluators)!=null?o:this._automationRuleEvaluators=new Mm(this._options)}get chatCompletions(){var o;return (o=this._chatCompletions)!=null?o:this._chatCompletions=new Wm(this._options)}get dashboards(){var o;return (o=this._dashboards)!=null?o:this._dashboards=new Vm(this._options)}get datasets(){var o;return (o=this._datasets)!=null?o:this._datasets=new Jm(this._options)}get environments(){var o;return (o=this._environments)!=null?o:this._environments=new Hm(this._options)}get experiments(){var o;return (o=this._experiments)!=null?o:this._experiments=new Gm(this._options)}get feedbackDefinitions(){var o;return (o=this._feedbackDefinitions)!=null?o:this._feedbackDefinitions=new Om(this._options)}get guardrails(){var o;return (o=this._guardrails)!=null?o:this._guardrails=new Km(this._options)}get insightsViews(){var o;return (o=this._insightsViews)!=null?o:this._insightsViews=new $m(this._options)}get llmModels(){var o;return (o=this._llmModels)!=null?o:this._llmModels=new Qm(this._options)}get llmProviderKey(){var o;return (o=this._llmProviderKey)!=null?o:this._llmProviderKey=new Ym(this._options)}get runners(){var o;return (o=this._runners)!=null?o:this._runners=new ld(this._options)}get manualEvaluation(){var o;return (o=this._manualEvaluation)!=null?o:this._manualEvaluation=new Xm(this._options)}get ollama(){var o;return (o=this._ollama)!=null?o:this._ollama=new qm(this._options)}get ollieState(){var o;return (o=this._ollieState)!=null?o:this._ollieState=new ed(this._options)}get openTelemetryIngestion(){var o;return (o=this._openTelemetryIngestion)!=null?o:this._openTelemetryIngestion=new rd(this._options)}get optimizations(){var o;return (o=this._optimizations)!=null?o:this._optimizations=new td(this._options)}get pairing(){var o;return (o=this._pairing)!=null?o:this._pairing=new od(this._options)}get projects(){var o;return (o=this._projects)!=null?o:this._projects=new id(this._options)}get prompts(){var o;return (o=this._prompts)!=null?o:this._prompts=new ad(this._options)}get reportFailures(){var o;return (o=this._reportFailures)!=null?o:this._reportFailures=new sd(this._options)}get reports(){var o;return (o=this._reports)!=null?o:this._reports=new pd(this._options)}get retentionRules(){var o;return (o=this._retentionRules)!=null?o:this._retentionRules=new cd(this._options)}get serviceToggles(){var o;return (o=this._serviceToggles)!=null?o:this._serviceToggles=new md(this._options)}get spans(){var o;return (o=this._spans)!=null?o:this._spans=new dd(this._options)}get traces(){var o;return (o=this._traces)!=null?o:this._traces=new fd(this._options)}get welcomeWizard(){var o;return (o=this._welcomeWizard)!=null?o:this._welcomeWizard=new hd(this._options)}get workspacePermissions(){var o;return (o=this._workspacePermissions)!=null?o:this._workspacePermissions=new yd(this._options)}get workspaces(){var o;return (o=this._workspaces)!=null?o:this._workspaces=new bd(this._options)}get redirect(){var o;return (o=this._redirect)!=null?o:this._redirect=new nd(this._options)}isAlive(o){return P.fromPromise(this.__isAlive(o))}async __isAlive(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ping"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ping")}version(o){return P.fromPromise(this.__version(o))}async __version(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ver"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ver")}};});var R8=n(()=>{});var x8,w8=n(()=>{Yp();(e=>(e.LogLevel=Ve,e.ConsoleLogger=dt))(x8||(x8={}));});var _8=n(()=>{R8();w8();});var k8=n(()=>{_8();});var Tr=n(()=>{oe();b8();Q();J();k8();te();});exports.generateId=void 0;var ir=n(()=>{exports.generateId=()=>uuid.v7();});function rae(p){return p.templateStructure==="text"}function tae(p){return p.templateStructure==="chat"}var jr,Rd=n(()=>{jr=class{static serializePromptToInfoDict(o){let e;return rae(o)?e=o.prompt:tae(o)?e=o.messages:e="",{name:o.name,...o.id&&{id:o.id},template_structure:o.templateStructure,version:{...o.versionId&&{id:o.versionId},...o.commit&&{commit:o.commit},template:e}}}static normalizeMetadata(o){if(!o)return {};if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{let e=JSON.parse(o);if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}catch{}return null}static promptAlreadyInjected(o,e,t){let i=this.normalizeMetadata(o);return i===null?true:(Array.isArray(i.opik_prompts)?i.opik_prompts:[]).some(s=>{var c;return s.id===e&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(o,e,t,i){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(o))!=null?m:{},c=(u=this.normalizeMetadata(e))!=null?u:{},l=i&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(o,e){var s,c;let{prompts:t,appendPrompts:i,...a}=o;if(!t||t.length===0){if(a.metadata&&e){let l=(s=this.normalizeMetadata(e))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(e,a.metadata,t,i!=null?i:false)}}static processTraceUpdate(o,e){return this.processUpdate(o,e)}static processSpanUpdate(o,e){return this.processUpdate(o,e)}};});var xd,A8=n(()=>{oo();ir();re();Rd();xd=class p{constructor(o,e){this.data=o;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.spanFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=o=>{var i;let e=jr.processSpanUpdate(o,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return Le()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=o=>{var c,l;let e=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(l=this.data.environment)!=null?l:""}" from the parent span will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var wd,P8=n(()=>{oo();ir();re();A8();Rd();wd=class{constructor(o,e){this.data=o;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.traceFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=o=>{var c,l,m;let e=(l=(c=this.data.projectName)!=null?c:o.projectName)!=null?l:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(m=this.data.environment)!=null?m:""}" from the parent trace will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new xd(a,this.opik);return this.spans.push(s),s};this.update=o=>{var i;let e=jr.processTraceUpdate(o,this.data.metadata),t={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return Le()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var z8,Qs,oae,iae,S8,v8,T8,j8,KD=n(()=>{z8={REDIRECT_BASE:"v1/session/redirect",EXPERIMENTS:"api/v1/session/redirect/experiments/",PROJECTS:"api/v1/session/redirect/projects/",DATASETS:"api/v1/session/redirect/datasets/",PROJECT_BY_NAME:"redirect/projects"},Qs={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},oae=p=>Object.entries(p).map(([o,e])=>`${o}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),iae=p=>p.replace(/\/api\/?$/,""),S8=p=>Buffer.from(p).toString("base64"),v8=(p,o,e)=>{let t=oae(e),i=iae(p),a=i.endsWith("/")?i:`${i}/`,s=o.startsWith("/")?o.slice(1):o;return `${a}${s}?${t}`},T8=({datasetId:p,experimentId:o,baseUrl:e})=>v8(e,z8.EXPERIMENTS,{[Qs.EXPERIMENT_ID]:o,[Qs.DATASET_ID]:p,[Qs.PATH]:S8(e)}),j8=(p,o)=>v8(o,z8.PROJECTS,{[Qs.TRACE_ID]:p,[Qs.PATH]:S8(o)});});var aae,_d,Ys,Ue,Mt=n(()=>{re();aae=300,_d=100,Ys=class{constructor({action:o,batchSize:e=_d,delay:t,enableBatch:i,name:a="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=(o,e)=>{if(this.queue.set(o,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(o,e)=>{let t=this.queue.get(o);t&&(this.queue.set(o,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let o=new Map(this.queue);this.queue.clear(),exports.logger.debug(`Adding ${o.size} items to ${this.name} promise:`,o),this.promise=this.promise.finally(()=>(exports.logger.debug(`Flushing ${this.name}:`,o),this.action(o))).catch(e=>{exports.logger.error(`Failed to flush ${this.name}:`,e,o);}),await this.promise;};this.action=o,this.batchSize=e,this.delay=t,this.enableBatch=i,this.name=a;}},Ue=class{constructor({delay:o=aae,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:i=true,createBatchSize:a=_d,updateBatchSize:s=_d,deleteBatchSize:c=_d,name:l="BatchQueue"}={}){this.create=o=>{let e=this.getId(o);this.createQueue.add(e,o);};this.get=async o=>{let e=this.createQueue.queue.get(o);return e||this.getEntity(o)};this.update=(o,e)=>{if(this.createQueue.queue.get(o)){this.createQueue.update(o,e);return}let i=this.updateQueue.queue.get(o);this.updateQueue.add(o,{...i,...e});};this.delete=o=>{if(this.createQueue.queue.has(o)){this.createQueue.queue.delete(o);return}this.deleteQueue.add(o);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new Ys({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:o,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new Ys({action:async m=>{await this.createQueue.flush();let u=Array.from(m.entries());for(let[d,f]of u)await this.updateEntity(d,f);},delay:o,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new Ys({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:o,enableBatch:i,batchSize:c,name:`${l}:deleteQueue`});}};});var nae,kd,E8=n(()=>{Sp();re();Mt();nae="suite_assertion",kd=class extends Ue{constructor(e,t,i="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${i}`});this.api=e;this.entityType=i;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,exports.logger.warn('Opik backend does not support PUT /v1/private/assertion-results yet \u2014 falling back to the legacy feedback-scores path with categoryName="suite_assertion". Upgrade the Opik backend to a version that includes OPIK-6048 to enable native assertion-results ingestion.'),await this.writeViaLegacyFeedbackScores(e);return}throw t}}async writeViaLegacyFeedbackScores(e){let t=e.map(i=>({id:i.entityId,name:i.name,value:i.status==="passed"?1:0,categoryName:nae,reason:i.reason,source:i.source,projectName:i.projectName,projectId:i.projectId}));await this.api.traces.scoreBatchOfTraces({scores:t},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(){throw new Error("Not implemented")}};});var Ad,sae,C8,pae,cae,Bo,$D=n(()=>{re();Ad=["input","output"],sae=1024*1024,C8=p=>({opik_truncated:true,reason:Number.isFinite(p)?`<omitted_due_to_size_${Math.round(p)}MB_error_code_413_400>`:"<omitted_unserializable_error_code_413_400>"}),pae=p=>{try{let o=JSON.stringify(p);return o?Buffer.byteLength(o,"utf8")/sae:0}catch{return 1/0}},cae=(p,o)=>{let e={};for(let s of Ad)p[s]!=null&&(e[s]=pae(p[s]));if(Object.keys(e).length===0)return {result:p,truncated:[]};let t={};for(let s of Ad)e[s]!==void 0&&e[s]>o&&(t[s]=C8(e[s]));if(Ad.reduce((s,c)=>{var l;return s+(t[c]?0:(l=e[c])!=null?l:0)},0)>o)for(let s of Ad)e[s]!==void 0&&t[s]===void 0&&(t[s]=C8(e[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},Bo=(p,o,e="span",t)=>{if(!o||o<=0)return p;let{result:i,truncated:a}=cae(p,o);if(a.length>0){let s=e.charAt(0).toUpperCase()+e.slice(1);exports.logger.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${o} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return i};});var Xr,lae,mae,dae,uae,gae,fae,hae,yae,I8,bae,D8,U8=n(()=>{Xr=(p,o,e=0)=>{if(p.length<e+o.length)return false;for(let t=0;t<o.length;t++)if(p[e+t]!==o[t])return false;return true},lae=[137,80,78,71,13,10,26,10],mae=[255,216,255],dae=[71,73,70,56,55,97],uae=[71,73,70,56,57,97],gae=[82,73,70,70],fae=[87,69,66,80],hae=[37,80,68,70],yae=[102,116,121,112],I8=p=>{if(Xr(p,lae))return "image/png";if(Xr(p,mae)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(Xr(p,dae)||Xr(p,uae))return "image/gif";if(Xr(p,gae)&&Xr(p,fae,8))return "image/webp";if(Xr(p,hae))return "application/pdf";if(Xr(p,yae,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let e=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(e.startsWith("{")||e.startsWith("["))return "application/json"}catch{}return null},bae={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","application/pdf":"pdf","image/svg+xml":"svg","video/mp4":"mp4","application/json":"json"},D8=p=>{var o;return (o=bae[p])!=null?o:"bin"};});var Rae,xae,wae,N8,_ae,kae,Aae,QD,F8,B8=n(()=>{U8();Rae=["input","output","metadata"],xae=(p,o)=>{let e=Math.floor(Math.random()*99999999)+1,t=D8(o);return `${p}-attachment-${e}-${Date.now()}-sdk.${t}`},wae=p=>{let o=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,e=Buffer.from(o,"base64");return e.length>0?e:null},N8=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,_ae=61,kae=/data:[^,]*;base64,$/,Aae=(p,o,e,t)=>{if(p.length<t)return p;let i=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!N8(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&N8(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===_ae&&u<2;)m++,u++;if(m-l>=t){let f=wae(p.slice(l,m)),g=f?I8(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&kae.test(p.slice(y,l))&&(h=y);let w=xae(o,g);i.push(p.slice(a,h)),i.push(`[${w}]`),a=m,e.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(i.push(p.slice(a)),i.join("")):p},QD=(p,o,e,t,i)=>{if(typeof p=="string")return Aae(p,o,e,t);if(Array.isArray(p)){if(i.has(p))return p;i.add(p);let a=false,s=p.map(c=>{let l=QD(c,o,e,t,i);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(i.has(p))return p;i.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=QD(l,o,e,t,i);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},F8=(p,o)=>{let e=Math.max(4,Math.floor(o/4)*4),t=[],i={};for(let a of Rae){let s=p[a];if(s==null)continue;let c=QD(s,a,t,e,new WeakSet);c!==s&&(i[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...i},attachments:t}};});var Pae,M8,W8,L8=n(()=>{Pae="BEMinIO",M8=async(p,o,e)=>{let t=await fetch(p,{method:"PUT",body:o,headers:e});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},W8=async(p,o,e,t)=>{let{data:i,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(i.length/5242880)),l=Buffer.from(o.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:e.entityType,entityId:e.entityId,path:l,projectName:e.projectName},p.requestOptions);if(m.uploadId===Pae){let d={"Content-Type":s,"Comet-Workspace":o.workspaceName,...o.extraHeaders};o.apiKey&&(d.authorization=o.apiKey),await M8(m.preSignUrls[0],i,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=i.subarray(f,f+5242880),h=await M8(m.preSignUrls[d],g);if(!h)throw new Error(`attachment upload part ${d+1} returned no ETag; cannot complete multipart upload`);u.push({eTag:h,partNumber:d+1});}await p.attachments.completeMultiPartUpload({fileName:a,entityType:e.entityType,entityId:e.entityId,fileSize:i.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:e.projectName},p.requestOptions);};});var Pd,YD=n(()=>{re();B8();L8();Pd=async(p,o,e,t)=>{let i;try{i=F8(t,o.minSizeBytes);}catch(a){return exports.logger.warn(`Attachment extraction skipped for ${e.entityType} '${e.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return i.attachments.length===0?t:(await Promise.all(i.attachments.map(a=>W8(p,o,e,a).catch(s=>{exports.logger.warn(`Failed to upload extracted attachment '${a.fileName}' for ${e.entityType} '${e.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),i.result)};});var zd,V8=n(()=>{Mt();$D();ct();YD();zd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Pd(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(Bo(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=Bo(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"span",e);await this.api.spans.updateSpan(e,{body:a},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var Sd,J8=n(()=>{Mt();Sd=class extends Ue{constructor(e,t){super({delay:t,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 t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var vd,H8=n(()=>{Mt();$D();ct();YD();vd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Pd(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(Bo(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=Bo(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"trace",e);await this.api.traces.updateTrace(e,{body:a},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var Td,G8=n(()=>{Mt();Td=class extends Ue{constructor(e,t){super({delay:t,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 t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var jd,O8=n(()=>{Tr();jd=class extends $s{constructor(e){var i;let t={...e==null?void 0:e.headers,...(i=e==null?void 0:e.requestOptions)==null?void 0:i.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var Ed,K8=n(()=>{Mt();Ed=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function $8(){return XD||(XD=await zae__default.default()),XD}var XD,Q8=n(()=>{XD=null;});var Mo,Cd=n(()=>{oe();ir();Q8();Mo=class p{constructor(o,e){let{id:t,traceId:i,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=o;this.id=t||exports.generateId(),this.traceId=i,this.spanId=a,this.source=s||If.Sdk,this.description=c!=null?c:e,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(o=false){return o?{...this.data,id:this.id}:{...this.data}}async contentHash(){let o={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(o.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(o.executionPolicy=this.executionPolicy);let e=Sae__default.default(o);return (await $8()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(o){return new p({id:o.id,traceId:o.traceId,spanId:o.spanId,source:o.source,...o.evaluators&&{evaluators:o.evaluators},...o.executionPolicy&&{executionPolicy:o.executionPolicy},...o.data},o.description)}};});async function Ne(p,o,e){var c;if(e===0)return [];let t=new util.TextDecoder("utf-8"),i=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
|
|
4
4
|
`);a=(c=d.pop())!=null?c:"";for(let f of d)if(!(!f.trim()||f==="{}"||f==="[]"||f==="null"))try{let g=JSON.parse(f),h=o.parse(g,{unrecognizedObjectKeys:"strip"});if(h.ok){if(i.push(h.value),e!==void 0&&i.length>=e)return s.releaseLock(),i}else exports.logger.error("Error parsing experiment item:",h.errors);}catch(g){exports.logger.error("Error parsing JSON line:",g instanceof Error?g.message:String(g));}}if(a.trim()&&a!=="{}"&&a!=="[]"&&a!=="null")try{let l=JSON.parse(a),m=o.parse(l,{unrecognizedObjectKeys:"strip"});m.ok?i.push(m.value):exports.logger.error("Error parsing experiment item:",m.errors);}catch(l){exports.logger.error("Error parsing remaining buffer:",l instanceof Error?l.message:String(l));}}catch(l){exports.logger.error("Error processing stream:",l instanceof Error?l.message:String(l));}finally{s.releaseLock();}return i}function ar(p,o){let e=[];for(let t=0;t<p.length;t+=o.maxBatchSize)e.push(p.slice(t,t+o.maxBatchSize));return e}var Zr=n(()=>{re();});async function Wo(p,o){let{datasetName:e,projectName:t,datasetVersion:i,nbSamples:a,lastRetrievedId:s}=o;if(a===0)return [];let c=[],l=a,m=s;for(;;){let u=Math.min(l!=null?l:Y8,Y8),d=await p.api.datasets.streamDatasetItems({datasetName:e,projectName:t,lastRetrievedId:m,steamLimit:u,datasetVersion:i}),f=await Ne(d,G.DatasetItemPublic,u);if(f.length===0)break;let g=f.map(h=>Mo.fromApiModel(h));if(c.push(...g),m=f[f.length-1].id,l!==void 0&&(l-=f.length,l<=0)||f.length<u)break}return c}var Y8,ZD=n(()=>{Cd();Zr();Tr();Y8=2e3;});exports.DatasetVersion=void 0;var Id=n(()=>{ZD();exports.DatasetVersion=class{constructor(o,e,t,i){this.datasetName=o,this.datasetId=e,this.versionInfo=t,this.opik=i;}get name(){return this.datasetName}get id(){return this.datasetId}get versionId(){return this.versionInfo.id}get versionHash(){return this.versionInfo.versionHash}get versionName(){return this.versionInfo.versionName}get tags(){return this.versionInfo.tags}get isLatest(){return this.versionInfo.isLatest}get itemsTotal(){return this.versionInfo.itemsTotal}get itemsAdded(){return this.versionInfo.itemsAdded}get itemsModified(){return this.versionInfo.itemsModified}get itemsDeleted(){return this.versionInfo.itemsDeleted}get changeDescription(){return this.versionInfo.changeDescription}get createdAt(){return this.versionInfo.createdAt}get createdBy(){return this.versionInfo.createdBy}getVersionInfo(){return this.versionInfo}async getItems(o,e){return (await Wo(this.opik,{datasetName:this.datasetName,datasetVersion:this.versionInfo.versionHash,nbSamples:o,lastRetrievedId:e})).map(i=>i.getContent(true))}async toJson(o={}){let t=(await this.getItems()).map(i=>{let a={...i};for(let[s,c]of Object.entries(o))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return Sae__default.default(t)}};});var ke,Wt=n(()=>{re();ke=class extends Error{constructor(o){var e;super(o.message),this.name=this.constructor.name,this.code=o.code,this.statusCode=o.statusCode,this.details=o.details,this.originalError=o.originalError,exports.logger.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 X8=n(()=>{});var qD,eU=n(()=>{qD={DATASET_NOT_FOUND:p=>`Dataset with name '${p}' not found`,DATASET_ITEM_NOT_FOUND:p=>`Dataset item with id '${p}' not found`,DATASET_ITEM_MISSING_ID:p=>`Item at index ${p} is missing an ID required for update`,INVALID_JSON_FORMAT:p=>`Invalid JSON format${p?": "+p:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(p,o)=>`Item at position ${p} is not an object (${o})`,INSERTION_FAILED:p=>`Failed to insert items from JSON: ${p}`,DATASET_JSON_PARSE_ERROR:p=>`Failed to parse JSON input: ${p}`,DATASET_VERSION_NOT_FOUND:(p,o)=>`Dataset version '${p}' not found in dataset '${o}'`};});var Z8,Dd;exports.DatasetVersionNotFoundError=void 0;var rU=n(()=>{eU();Wt();Z8={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID",DATASET_VERSION_NOT_FOUND:"DATASET_VERSION_NOT_FOUND"},Dd=class extends ke{constructor(o){super({message:qD.DATASET_ITEM_MISSING_ID(o),code:Z8.DATASET_ITEM_MISSING_ID});}},exports.DatasetVersionNotFoundError=class extends ke{constructor(o,e){super({message:qD.DATASET_VERSION_NOT_FOUND(o,e),code:Z8.DATASET_VERSION_NOT_FOUND});}};});var q8=n(()=>{eU();rU();});var jae,Ud,eZ=n(()=>{Wt();jae={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},Ud=class extends ke{constructor(o){super({message:o,code:jae.SEARCH_TIMEOUT});}};});var rZ=n(()=>{});var tZ=n(()=>{eZ();rZ();});var Nd,Fd,Lo,qs=n(()=>{Nd=class extends Error{constructor(o){super(o),this.name="AnnotationQueueError";}},Fd=class extends Nd{constructor(o){super(`Annotation queue with ID '${o}' not found`),this.name="AnnotationQueueNotFoundError";}},Lo=class extends Nd{constructor(o,e){let t=e!==void 0?` at index ${e}`:"";super(`${o} object${t} has no ID`),this.name="AnnotationQueueItemMissingIdError";}};});exports.ConfigNotFoundError=void 0;exports.ConfigMismatchError=void 0;var Bd=n(()=>{Wt();exports.ConfigNotFoundError=class extends ke{constructor(o){super({message:o,code:"CONFIG_NOT_FOUND"}),this.name="ConfigNotFoundError";}},exports.ConfigMismatchError=class extends ke{constructor(o){super({message:o,code:"CONFIG_MISMATCH"}),this.name="ConfigMismatchError";}};});var Md,Wd,Ld,tU=n(()=>{Md=class extends Error{constructor(o){super(o),this.name="EnvironmentError";}},Wd=class extends Md{constructor(o){super(`Environment '${o}' already exists in this workspace.`),this.name="EnvironmentAlreadyExistsError";}},Ld=class extends Md{constructor(o){super(o),this.name="EnvironmentConfigurationError";}};});var oU=n(()=>{Wt();X8();q8();tZ();qs();Bd();tU();});var Vd,oZ=n(()=>{Vd={JSON_NOT_ARRAY:p=>`JSON input must be an array of objects${p?` (${p})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(p,o)=>`Item at position ${p} is not an object (${o})`};});var iU,Jd,Hd,Gd,iZ=n(()=>{Wt();oZ();iU={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Jd=class extends ke{constructor(o){let e=o instanceof Error?o:new Error(String(o));super({message:Vd.JSON_PARSE_ERROR,code:iU.JSON_PARSE_ERROR,originalError:e});}},Hd=class extends ke{constructor(o){super({message:Vd.JSON_NOT_ARRAY(o),code:iU.JSON_NOT_ARRAY});}},Gd=class extends ke{constructor(o,e){super({message:Vd.JSON_ITEM_NOT_OBJECT(o,e),code:iU.JSON_ITEM_NOT_OBJECT});}};});exports.Dataset=void 0;var Od=n(()=>{ir();Cd();Id();ZD();Zr();re();oU();iZ();J();exports.Dataset=class{constructor({name:o,description:e,id:t,projectName:i},a){this.opik=a;this.idToHash=new Map;this.hashes=new Set;this.id=t||exports.generateId(),this.name=o,this.description=e,this.projectName=i;}async insert(o){if(!o||o.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(o),t=ar(e,{maxBatchSize:1e3}),i=exports.generateId();try{let a=0;for(let s of t)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:s,batchGroupId:i,projectName:this.projectName}),a+=s.length,exports.logger.info(`Inserted ${Math.min(a,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(a){throw exports.logger.error(`Error inserting items into dataset: ${a instanceof Error?a.message:String(a)}`),a}this.cachedItemsCount=void 0;}async update(o){if(!(!o||o.length===0)){for(let e=0;e<o.length;e++)if(!o[e].id)throw new Dd(e);await this.insert(o);}}async delete(o){if(!o||o.length===0){exports.logger.info("No item IDs provided for deletion");return}let e=ar(o,{maxBatchSize:100}),t=exports.generateId();for await(let i of e){exports.logger.debug("Deleting dataset items batch",{batchSize:i.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:i,batchGroupId:t});for(let a of i)if(this.idToHash.has(a)){let s=this.idToHash.get(a);this.hashes.delete(s),this.idToHash.delete(a);}}this.cachedItemsCount=void 0;}async clear(){let e=(await this.getItems()).map(t=>t.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getTags(){var e;return (e=(await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName})).tags)!=null?e:[]}async getItemsCount(){if(this.cachedItemsCount===void 0){let o=await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName});this.cachedItemsCount=o.datasetItemsCount;}return this.cachedItemsCount}async getItems(o,e){return (await Wo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:e})).map(i=>i.getContent(true))}async getRawItems(o,e){return Wo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:e})}async insertFromJson(o,e={},t=[]){let i;try{i=JSON.parse(o);}catch(s){throw new Jd(s)}if(!Array.isArray(i))throw new Hd(typeof i);if(i.length===0)return;for(let s=0;s<i.length;s++){let c=i[s];if(typeof c!="object"||c===null)throw new Gd(s,typeof c)}let a=i.map(s=>{let c=s,l={};for(let[m,u]of Object.entries(c)){if(t.includes(m))continue;let d=e[m]||m;l[d]=u;}return l});await this.insert(a);}async toJson(o={}){let t=(await this.getItems()).map(i=>{let a={...i};for(let[s,c]of Object.entries(o))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return Sae__default.default(t)}async getDeduplicatedItems(o){let e=[];for(let t of o){let i=new Mo(t),a=await i.contentHash();if(this.hashes.has(a)){exports.logger.debug("Duplicate item found - skipping",{contentHash:a,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(a),this.idToHash.set(i.id,a);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){exports.logger.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let o=await Wo(this.opik,{datasetName:this.name,projectName:this.projectName});this.clearHashState();for(let e of o){let t=await e.contentHash();this.idToHash.set(e.id,t),this.hashes.add(t);}exports.logger.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:o.length});}catch(o){if(o instanceof k&&o.statusCode===404){exports.logger.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw o}}async getVersionView(o){let e=await this.findVersionByName(o);if(!e)throw new exports.DatasetVersionNotFoundError(o,this.name);return new exports.DatasetVersion(this.name,this.id,e,this.opik)}async getCurrentVersionName(){let o=await this.getVersionInfo();return o==null?void 0:o.versionName}async getVersionInfo(){var o;try{let t=(o=(await this.opik.api.datasets.listDatasetVersions(this.id,{page:1,size:1})).content)!=null?o:[];return t.length===0?void 0:t[0]}catch(e){if(e instanceof k&&e.statusCode===404)return;throw e}}async findVersionByName(o){try{return await this.opik.api.datasets.retrieveDatasetVersion(this.id,{versionName:o})}catch(e){if(e instanceof k&&e.statusCode===404)return;throw e}}};});var aU,Lt,aZ=n(()=>{aU=class extends Error{constructor(o){super(o),this.name="DatasetError";}},Lt=class extends aU{constructor(o){super(`Dataset with name '${o}' not found`),this.name="DatasetNotFoundError";}};});var nU=n(()=>{Od();Cd();Id();aZ();});var ep,Kd,sU=n(()=>{ep=class{constructor(o){if(!o.datasetItemId)throw new Error("datasetItemId is required");if(!o.traceId)throw new Error("traceId is required");this.datasetItemId=o.datasetItemId,this.traceId=o.traceId,this.projectName=o.projectName;}},Kd=class p{constructor(o){this.id=o.id,this.datasetItemId=o.datasetItemId,this.traceId=o.traceId,this.datasetItemData=o.datasetItemData,this.evaluationTaskOutput=o.evaluationTaskOutput,this.feedbackScores=[...o.feedbackScores];}static fromRestExperimentItemCompare(o){var t,i;let e=(i=(t=o.feedbackScores)==null?void 0:t.map(a=>({categoryName:a.categoryName,name:a.name,reason:a.reason,value:a.value,source:a.source})))!=null?i:[];return new p({id:o.id,traceId:o.traceId,datasetItemId:o.datasetItemId,datasetItemData:o.input,evaluationTaskOutput:o.output,feedbackScores:e})}};});var Cr,$d=n(()=>{ir();sU();Zr();re();Tr();KD();ct();Cr=class{constructor({id:o,name:e,datasetName:t,prompts:i,tags:a,projectName:s},c){this.opik=c;this.id=o||exports.generateId(),this._name=e,this.datasetName=t,this.prompts=i,this.tags=a,this.projectName=s;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let o=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=o.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(o){if(o.length===0)return;let e=o.map(i=>({id:exports.generateId(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId,projectName:i.projectName})),t=ar(e,{maxBatchSize:50});try{for(let i of t)await this.opik.api.experiments.createExperimentItems({experimentItems:i});exports.logger.debug(`Inserted ${o.length} items into experiment ${this.id}`);}catch(i){throw exports.logger.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(o){let e=[],{maxResults:i,truncate:a=false}=o||{},s,c=true;try{for(;c&&!(i!==void 0&&e.length>=i);){let l=i?Math.min(i-e.length,2e3):2e3,m=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:l,lastRetrievedId:s,truncate:a});try{let u=await Ne(m,G.ExperimentItemCompare,l);if(u.length===0){c=!1;break}for(let d of u){let f=Kd.fromRestExperimentItemCompare(d);if(e.push(f),i!==void 0&&e.length>=i){c=!1;break}}s=u[u.length-1].id;}catch(u){exports.logger.error("Error parsing experiment item: "+(u instanceof Error?u.message:String(u))),c=!1;break}}}catch(l){throw exports.logger.error("Error retrieving experiment items: "+(l instanceof Error?l.message:String(l))),l}return exports.logger.info(`Retrieved ${e.length} items${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){if(!this.datasetName)throw new Error("Cannot get URL: the associated dataset has been deleted or is unavailable");let o=await this.opik.getDataset(this.datasetName,this.projectName),e=this.opik.config.apiUrl||Ke.apiUrl;return T8({datasetId:o.id,experimentId:this.id,baseUrl:e})}};});var Qd,pU=n(()=>{$d();Qd=class extends Cr{constructor(o,e){super(o,e),this.passRate=o.passRate,this.passedCount=o.passedCount,this.totalCount=o.totalCount,this.assertionScores=o.assertionScores;}};});var Yd,cU=n(()=>{Yd={EXPERIMENT_NOT_FOUND:p=>`Experiment with name '${p}' not found`,INVALID_CONFIG_TYPE:p=>`experimentConfig must be a plain object, but ${p} 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:
|
|
5
5
|
1. Use prompts parameter: buildMetadataAndPromptVersions(config, [prompt1, prompt2])
|
|
6
6
|
2. Use config only: buildMetadataAndPromptVersions({ ...config, prompts: {...} })
|
|
@@ -118,7 +118,7 @@ ${e}
|
|
|
118
118
|
Analyze the following text and provide your verdict score, and reason in the specified JSON format:
|
|
119
119
|
|
|
120
120
|
${p}
|
|
121
|
-
`}var nq=n(()=>{});var Uu,Ae,Nu,st=n(()=>{Uu=class p extends Error{constructor(o){super(o),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Ae=class p extends Uu{constructor(e,t){super(e);this.cause=t;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Nu=class p extends Uu{constructor(e,t){super(e);this.cause=t;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}};});function cr(p){try{return JSON.parse(p)}catch{return qne(p)}}function qne(p){try{let o=p.indexOf("{"),e=p.lastIndexOf("}");if(o===-1||e===-1||o>=e)throw new Error("No valid JSON object found in content");let t=p.substring(o,e+1);return JSON.parse(t)}catch(o){let e=o instanceof Error?o.message:String(o);throw new Nu(`Failed to extract JSON from content: ${e}`,o instanceof Error?o:void 0)}}var ii=n(()=>{st();});function sq(p,o){try{let e=cr(p),t=
|
|
121
|
+
`}var nq=n(()=>{});var Uu,Ae,Nu,st=n(()=>{Uu=class p extends Error{constructor(o){super(o),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Ae=class p extends Uu{constructor(e,t){super(e);this.cause=t;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Nu=class p extends Uu{constructor(e,t){super(e);this.cause=t;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}};});function cr(p){try{return JSON.parse(p)}catch{return qne(p)}}function qne(p){try{let o=p.indexOf("{"),e=p.lastIndexOf("}");if(o===-1||e===-1||o>=e)throw new Error("No valid JSON object found in content");let t=p.substring(o,e+1);return JSON.parse(t)}catch(o){let e=o instanceof Error?o.message:String(o);throw new Nu(`Failed to extract JSON from content: ${e}`,o instanceof Error?o:void 0)}}var ii=n(()=>{st();});function sq(p,o){try{let e=cr(p),t=e.score;if(t==null)throw new Error(`Moderation score is required but got ${t}`);let i=Number(t);if(isNaN(i)||i<0||i>1)throw new Error(`Moderation score must be between 0.0 and 1.0, got ${i}`);return {name:o,value:i,reason:String(e.reason||"")}}catch(e){let t=e instanceof Error?e.message:String(e);throw exports.logger.error(`Failed to parse model output: ${t}`),new Ae("Failed to calculate moderation score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var pq=n(()=>{st();ii();re();});var ese,rse;exports.Moderation=void 0;var cq=n(()=>{eo();nq();pq();ese=zod.z.object({output:zod.z.string()}),rse=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),exports.Moderation=class extends exports.BaseLLMJudgeMetric{constructor(e){var i,a;let t=(i=e==null?void 0:e.name)!=null?i:"moderation_metric";super(t,{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=ese;this.fewShotExamples=(a=e==null?void 0:e.fewShotExamples)!=null?a:[];}async score(e){let{output:t}=e,i=aq(t,this.fewShotExamples),a=this.buildModelOptions(),s=await this.model.generateString(i,rse,a);return sq(s,this.name)}};});var lq=n(()=>{cq();});function mq(p,o){return `
|
|
122
122
|
You are an impartial judge tasked with evaluating the quality and usefulness of AI-generated responses.
|
|
123
123
|
Your evaluation should consider the following key factors:
|
|
124
124
|
- Helpfulness: How well does it solve the user's problem?
|
|
@@ -154,7 +154,7 @@ ${p}
|
|
|
154
154
|
AI Response: ${o}
|
|
155
155
|
|
|
156
156
|
Provide your evaluation in the specified JSON format.
|
|
157
|
-
`}var dq=n(()=>{});function uq(p,o){try{let e=cr(p),t=
|
|
157
|
+
`}var dq=n(()=>{});function uq(p,o){try{let e=cr(p),t=e.score;if(t==null)throw new Error(`Usefulness score is required but got ${t}`);let i=Number(t);if(isNaN(i)||i<0||i>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${i}`);return {name:o,value:i,reason:String(e.reason||"")}}catch(e){let t=e instanceof Error?e.message:String(e);throw exports.logger.error(`Failed to parse model output: ${t}`),new Ae("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var gq=n(()=>{st();ii();re();});var tse,ose;exports.Usefulness=void 0;var fq=n(()=>{eo();dq();gq();tse=zod.z.object({input:zod.z.string(),output:zod.z.string()}),ose=zod.z.object({score:zod.z.number(),reason:zod.z.string()}),exports.Usefulness=class extends exports.BaseLLMJudgeMetric{constructor(e){var i;let t=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(t,{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=tse;}async score(e){let{input:t,output:i}=e,a=mq(t,i),s=this.buildModelOptions(),c=await this.model.generateString(a,ose,s);return uq(c,this.name)}};});var hq=n(()=>{fq();});function yq(p,o){return p.length===0?"":`
|
|
158
158
|
|
|
159
159
|
EXAMPLES:
|
|
160
160
|
|