opik 2.3.0 → 2.3.1

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'),WB=require('fs'),VB=require('os'),Poe=require('path'),zoe=require('ini');require('dotenv/config');var uuid=require('uuid'),crypto=require('crypto'),rle=require('xxhash-wasm'),tle=require('fast-json-stable-stringify'),util=require('util'),lle=require('mustache'),bre=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),kle=require('fast-deep-equal'),async_hooks=require('async_hooks'),Fp=require('chalk'),eme=require('boxen'),zod=require('zod'),tme=require('ora'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),ai$1=require('ai');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var WB__default=/*#__PURE__*/_interopDefault(WB);var VB__default=/*#__PURE__*/_interopDefault(VB);var Poe__default=/*#__PURE__*/_interopDefault(Poe);var zoe__default=/*#__PURE__*/_interopDefault(zoe);var rle__default=/*#__PURE__*/_interopDefault(rle);var tle__default=/*#__PURE__*/_interopDefault(tle);var lle__default=/*#__PURE__*/_interopDefault(lle);var bre__default=/*#__PURE__*/_interopDefault(bre);var kle__default=/*#__PURE__*/_interopDefault(kle);var Fp__default=/*#__PURE__*/_interopDefault(Fp);var eme__default=/*#__PURE__*/_interopDefault(eme);var tme__default=/*#__PURE__*/_interopDefault(tme);var doe=Object.create;var si=Object.defineProperty;var IB=Object.getOwnPropertyDescriptor;var uoe=Object.getOwnPropertyNames;var goe=Object.prototype.hasOwnProperty;var DB=(p,i)=>(i=Symbol[p])?i:Symbol.for("Symbol."+p),bo=p=>{throw TypeError(p)};var foe=(p,i,r)=>i in p?si(p,i,{enumerable:true,configurable:true,writable:true,value:r}):p[i]=r;var n=(p,i)=>()=>(p&&(i=p(p=0)),i);var L=(p,i)=>{for(var r in i)si(p,r,{get:i[r],enumerable:true});},hoe=(p,i,r,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of uoe(i))!goe.call(p,o)&&o!==r&&si(p,o,{get:()=>i[o],enumerable:!(t=IB(i,o))||t.enumerable});return p};var yoe=p=>hoe(si({},"__esModule",{value:true}),p);var UB=p=>{var i;return [,,,doe((i=void 0)!=null?i:null)]},NB=["class","method","getter","setter","accessor","field","value","get","set"],yo=p=>p!==void 0&&typeof p!="function"?bo("Function expected"):p,boe=(p,i,r,t,o)=>({kind:NB[p],name:i,metadata:t,addInitializer:a=>r._?bo("Already initialized"):o.push(yo(a||null))}),Og=(p,i)=>foe(i,DB("metadata"),p[3]),FB=(p,i,r,t)=>{for(var o=0,a=p[i>>1],s=a&&a.length;o<s;o++)a[o].call(r);return t},BB=(p,i,r,t,o,a)=>{var c,l,m,u,d=i&7,f=false,g=false,h=2,y=NB[d+5],A=p[h]||(p[h]=[]),C=((o=o.prototype),IB(o,r));for(var I=t.length-1;I>=0;I--)m=boe(d,r,l={},p[3],A),(m.static=f,m.private=g,u=m.access={has:D=>r in D},(u.get=D=>D[r]),d>2),c=(0, t[I])(C[y],m),l._=1,yo(c)&&(C[y]=c);return C&&si(o,r,C),o};function Kp(p,i=p){return ansiEscapes.link(i,p)}var koe;exports.logger=void 0;exports.setLoggerLevel=void 0;exports.disableLogger=void 0;var ae=n(()=>{koe={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=koe[p];},exports.disableLogger=()=>{exports.logger.settings.minLevel=100;};exports.setLoggerLevel(process.env.OPIK_LOG_LEVEL||"INFO");});function Qg(p){return Object.fromEntries(Object.entries(p).filter(([,i])=>i!==void 0))}function Qp(p){if(p!==void 0)return ["1","true","yes"].includes(String(p).toLowerCase())}function voe(){return Qg({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:Qp(process.env.OPIK_HOLD_UNTIL_FLUSH),trackDisable:Qp(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:Qp(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 Toe(p){return p.replace(/^~(?=$|\/|\\)/,VB__default.default.homedir())}function joe(){let p=process.env.OPIK_CONFIG_PATH||Soe,i=Toe(p);if(!WB__default.default.existsSync(i)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${i}`);return {}}try{let r=zoe__default.default.parse(WB__default.default.readFileSync(i,"utf8"));return r.opik?Qg({apiKey:r.opik.api_key,apiUrl:r.opik.url_override,projectName:r.opik.project_name,workspaceName:r.opik.workspace,trackDisable:Qp(r.opik.track_disable)}):{}}catch(r){return exports.logger.error(`Error loading config file ${i}: ${r}`),{}}}function $p(p){let i=voe(),r=joe(),{headers:t,...o}=p||{};return Coe({...Ye,...r,...i,...Qg(o)})}function Coe(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");if(p.trackDisable)return p;let i=Eoe(p.apiUrl);if(i&&!p.apiKey)throw new Error("OPIK_API_KEY is not set");if(i&&!p.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return p}function Eoe(p){return new URL(p).hostname.endsWith("comet.com")}var Soe,Ye,dt=n(()=>{ae();Soe=Poe__default.default.join(VB__default.default.homedir(),".opik.config"),Ye={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 Ioe(p){Yg.setTracingActive(p);}function Ge(){return Yg.isTracingActive()}function Doe(){Yg.resetToConfigDefault();}var $g,Yg,pi=n(()=>{dt();$g=class{constructor(){this.tracingActive=null;}setTracingActive(i){this.tracingActive=i;}resetToConfigDefault(){this.tracingActive=null;}isTracingActive(){if(this.tracingActive!==null)return this.tracingActive;try{return this.tracingActive=!$p().trackDisable,this.tracingActive}catch{return true}}},Yg=new $g;});function Ro(p,i){return JSON.parse(p,i)}var Xe,Lr=n(()=>{Xe=(p,i,r)=>JSON.stringify(p,i,r);});function Uoe({message:p,statusCode:i,body:r}){let t=[];return p!=null&&t.push(p),i!=null&&t.push(`Status code: ${i.toString()}`),r!=null&&t.push(`Body: ${Xe(r,void 0,2)}`),t.join(`
2
2
  `)}var k,Yp=n(()=>{Lr();k=class extends Error{constructor({message:i,statusCode:r,body:t,rawResponse:o}){super(Uoe({message:i,statusCode:r,body:t})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=r,this.body=t,this.rawResponse=o;}};});var Jr,LB=n(()=>{Jr=class extends Error{constructor(i){super(i),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var J=n(()=>{Yp();LB();});var xo,JB=n(()=>{J();xo=class extends k{constructor(i,r){super({message:"BadGatewayError",statusCode:502,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var N,GB=n(()=>{J();N=class extends k{constructor(i,r){super({message:"BadRequestError",statusCode:400,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var X,HB=n(()=>{J();X=class extends k{constructor(i,r){super({message:"ConflictError",statusCode:409,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var se,OB=n(()=>{J();se=class extends k{constructor(i,r){super({message:"ForbiddenError",statusCode:403,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ut,Xg=n(()=>{J();ut=class extends k{constructor(i,r){super({message:"GoneError",statusCode:410,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var gt,KB=n(()=>{J();gt=class extends k{constructor(i,r){super({message:"InternalServerError",statusCode:500,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var U,QB=n(()=>{J();U=class extends k{constructor(i,r){super({message:"NotFoundError",statusCode:404,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Se,$B=n(()=>{J();Se=class extends k{constructor(i,r){super({message:"NotImplementedError",statusCode:501,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Ue,YB=n(()=>{J();Ue=class extends k{constructor(i,r){super({message:"ServiceUnavailableError",statusCode:503,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var fe,XB=n(()=>{J();fe=class extends k{constructor(i,r){super({message:"TooManyRequestsError",statusCode:429,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var K,ZB=n(()=>{J();K=class extends k{constructor(i,r){super({message:"UnauthorizedError",statusCode:401,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var O,qB=n(()=>{J();O=class extends k{constructor(i,r){super({message:"UnprocessableEntityError",statusCode:422,body:i,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var eM=n(()=>{JB();GB();HB();OB();Xg();KB();QB();$B();YB();XB();ZB();qB();});var Zg=n(()=>{});var rM=n(()=>{Zg();});var qg={};var tM=n(()=>{rM();});var ef=n(()=>{});var iM=n(()=>{ef();});var oM,aM=n(()=>{oM={Open:"open",Resolved:"resolved",Closed:"closed"};});var nM,sM=n(()=>{nM={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var pM,cM=n(()=>{pM={Open:"open",Resolved:"resolved",Closed:"closed"};});var rf=n(()=>{aM();sM();cM();});var Xp={};L(Xp,{AgentInsightsIssueUpdateStatus:()=>oM,FindAgentInsightsIssuesRequestSeverity:()=>nM,FindAgentInsightsIssuesRequestStatus:()=>pM});var lM=n(()=>{iM();rf();});var tf=n(()=>{});var mM=n(()=>{tf();});var of={};var dM=n(()=>{mM();});var af=n(()=>{});var uM=n(()=>{af();});var gM,fM=n(()=>{gM={Enabled:"enabled",Disabled:"disabled"};});var nf=n(()=>{fM();});var Zp={};L(Zp,{AgentInsightsJobUpdateStatus:()=>gM});var hM=n(()=>{uM();nf();});var sf=n(()=>{});var yM=n(()=>{sf();});var bM,RM=n(()=>{bM={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var pf=n(()=>{RM();});var qp={};L(qp,{GetWebhookExamplesRequestAlertType:()=>bM});var xM=n(()=>{yM();pf();});var cf=n(()=>{});var wM=n(()=>{cf();});var lf={};var _M=n(()=>{wM();});var mf=n(()=>{});var kM=n(()=>{mf();});var AM,PM=n(()=>{AM={Trace:"TRACE",Span:"SPAN",Thread:"THREAD"};});var df=n(()=>{PM();});var ec={};L(ec,{AssertionResultBatchEntityType:()=>AM});var zM=n(()=>{kM();df();});var uf=n(()=>{});var SM=n(()=>{uf();});var vM,TM=n(()=>{vM={Trace:"trace",Span:"span"};});var jM,CM=n(()=>{jM={Trace:"trace",Span:"span"};});var EM,IM=n(()=>{EM={Trace:"trace",Span:"span"};});var DM,UM=n(()=>{DM={Trace:"trace",Span:"span"};});var gf=n(()=>{TM();CM();IM();UM();});var rc={};L(rc,{AttachmentListRequestEntityType:()=>vM,DownloadAttachmentRequestEntityType:()=>jM,StartMultipartUploadRequestEntityType:()=>EM,UploadAttachmentRequestEntityType:()=>DM});var NM=n(()=>{SM();gf();});var ff=n(()=>{});var FM=n(()=>{ff();});var hf={};var BM=n(()=>{FM();});var yf=n(()=>{});var MM=n(()=>{yf();});var bf={};var WM=n(()=>{MM();});var VM=n(()=>{});var Rf={};var LM=n(()=>{VM();});var xf=n(()=>{});var JM=n(()=>{xf();});var wf={};var GM=n(()=>{JM();});var _f=n(()=>{});var HM=n(()=>{_f();});var kf={};var OM=n(()=>{HM();});var Af=n(()=>{});var KM=n(()=>{Af();});var QM,$M=n(()=>{QM={Json:"json",Jsonl:"jsonl"};});var YM,XM=n(()=>{YM={Private:"private",Public:"public"};});var tc,Pf=n(()=>{tc={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var ZM,qM=n(()=>{ZM={Private:"private",Public:"public"};});var zf=n(()=>{$M();XM();Pf();qM();});var ic={};L(ic,{CreateDatasetItemsFromJsonRequestFormat:()=>QM,DatasetUpdateVisibility:()=>YM,DatasetWriteType:()=>tc,DatasetWriteVisibility:()=>ZM});var eW=n(()=>{KM();zf();});var Sf=n(()=>{});var rW=n(()=>{Sf();});var vf={};var tW=n(()=>{rW();});var Tf=n(()=>{});var iW=n(()=>{Tf();});var oc,jf=n(()=>{oc={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var oW,aW=n(()=>{oW={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var nW,sW=n(()=>{nW={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var Cf=n(()=>{jf();aW();sW();});var ac={};L(ac,{ExperimentWriteEvaluationMethod:()=>oc,ExperimentWriteStatus:()=>oW,ExperimentWriteType:()=>nW});var pW=n(()=>{iW();Cf();});var Ef=n(()=>{});var cW=n(()=>{Ef();});var lW,mW=n(()=>{lW={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};});var If=n(()=>{mW();});var nc={};L(nc,{FindFeedbackDefinitionsRequestType:()=>lW});var dW=n(()=>{cW();If();});var Df=n(()=>{});var uW=n(()=>{Df();});var gW,fW=n(()=>{gW={OnRequest:"on_request",Global:"global"};});var Uf=n(()=>{fW();});var sc={};L(sc,{FindGuardrailPoliciesRequestExecutionScope:()=>gW});var hW=n(()=>{uW();Uf();});var Nf=n(()=>{});var yW=n(()=>{Nf();});var Ff={};var bW=n(()=>{yW();});var Bf=n(()=>{});var RW=n(()=>{Bf();});var Mf={};var xW=n(()=>{RW();});var wW=n(()=>{});var Wf={};var _W=n(()=>{wW();});var Vf=n(()=>{});var kW=n(()=>{Vf();});var AW,PW=n(()=>{AW={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var Lf=n(()=>{PW();});var pc={};L(pc,{ProviderApiKeyWriteProvider:()=>AW});var zW=n(()=>{kW();Lf();});var SW=n(()=>{});var Jf={};var vW=n(()=>{SW();});var Gf=n(()=>{});var TW=n(()=>{Gf();});var Hf={};var jW=n(()=>{TW();});var CW=n(()=>{});var Of={};var EW=n(()=>{CW();});var IW=n(()=>{});var Kf={};var DW=n(()=>{IW();});var UW=n(()=>{});var Qf={};var NW=n(()=>{UW();});var $f=n(()=>{});var FW=n(()=>{$f();});var BW,MW=n(()=>{BW={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var Yf=n(()=>{MW();});var cc={};L(cc,{OptimizationUpdateStatus:()=>BW});var WW=n(()=>{FW();Yf();});var Xf=n(()=>{});var VW=n(()=>{Xf();});var LW,JW=n(()=>{LW={Connect:"connect",Endpoint:"endpoint"};});var Zf=n(()=>{JW();});var lc={};L(lc,{CreateSessionRequestType:()=>LW});var GW=n(()=>{VW();Zf();});var qf=n(()=>{});var HW=n(()=>{qf();});var OW,KW=n(()=>{OW={Traces:"traces",Spans:"spans",Threads:"threads"};});var QW,$W=n(()=>{QW={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var YW,XW=n(()=>{YW={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 ZW,qW=n(()=>{ZW={Private:"private",Public:"public"};});var eV,rV=n(()=>{eV={Private:"private",Public:"public"};});var eh=n(()=>{KW();$W();XW();qW();rV();});var mc={};L(mc,{KpiCardRequestEntityType:()=>OW,ProjectMetricRequestPublicInterval:()=>QW,ProjectMetricRequestPublicMetricType:()=>YW,ProjectUpdateVisibility:()=>ZW,ProjectWriteVisibility:()=>eV});var tV=n(()=>{HW();eh();});var rh=n(()=>{});var iV=n(()=>{rh();});var oV,aV=n(()=>{oV={Text:"text",Chat:"chat"};});var nV,sV=n(()=>{nV={Text:"text",Chat:"chat"};});var pV,cV=n(()=>{pV={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var th=n(()=>{aV();sV();cV();});var dc={};L(dc,{CreatePromptVersionDetailTemplateStructure:()=>oV,PromptWriteTemplateStructure:()=>nV,PromptWriteType:()=>pV});var lV=n(()=>{iV();th();});var ih=n(()=>{});var mV=n(()=>{ih();});var oh={};var dV=n(()=>{mV();});var ah=n(()=>{});var uV=n(()=>{ah();});var gV,fV=n(()=>{gV={AgentInsights:"agent_insights"};});var nh=n(()=>{fV();});var uc={};L(uc,{FindReportFailuresRequestType:()=>gV});var hV=n(()=>{uV();nh();});var sh=n(()=>{});var yV=n(()=>{sh();});var bV,RV=n(()=>{bV={Pending:"pending",Completed:"completed",Failed:"failed"};});var ph=n(()=>{RV();});var gc={};L(gc,{ReportCompleteRequestStatus:()=>bV});var xV=n(()=>{yV();ph();});var ch=n(()=>{});var wV=n(()=>{ch();});var _V,kV=n(()=>{_V={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var lh=n(()=>{kV();});var fc={};L(fc,{RetentionRuleWriteRetention:()=>_V});var AV=n(()=>{wV();lh();});var mh=n(()=>{});var PV=n(()=>{mh();});var zV,SV=n(()=>{zV={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var vV,TV=n(()=>{vV={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var jV,CV=n(()=>{jV={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var EV,IV=n(()=>{EV={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var dh=n(()=>{SV();TV();CV();IV();});var hc={};L(hc,{BridgeCommandResultRequestStatus:()=>zV,BridgeCommandSubmitRequestType:()=>vV,ListRunnersRequestStatus:()=>jV,LocalRunnerJobResultRequestStatus:()=>EV});var DV=n(()=>{PV();dh();});var UV=n(()=>{});var uh={};var NV=n(()=>{UV();});var gh=n(()=>{});var FV=n(()=>{gh();});var BV,MV=n(()=>{BV={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var WV,VV=n(()=>{WV={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var LV,JV=n(()=>{LV={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var GV,HV=n(()=>{GV={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 OV,KV=n(()=>{OV={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var fh=n(()=>{MV();VV();JV();HV();KV();});var yc={};L(yc,{FindFeedbackScoreNames1RequestType:()=>BV,GetSpanStatsRequestType:()=>WV,GetSpansByProjectRequestType:()=>LV,SpanSearchStreamRequestPublicExcludeItem:()=>GV,SpanSearchStreamRequestPublicType:()=>OV});var QV=n(()=>{FV();fh();});var hh=n(()=>{});var $V=n(()=>{hh();});var yh={};var YV=n(()=>{$V();});var bh=n(()=>{});var XV=n(()=>{bh();});var Rh={};var ZV=n(()=>{XV();});var xh=n(()=>{});var qV=n(()=>{xh();});var e0,r0=n(()=>{e0={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",AnnotationQueues:"annotation_queues",Source:"source",Environment:"environment"};});var wh=n(()=>{r0();});var bc={};L(bc,{TraceSearchStreamRequestPublicExcludeItem:()=>e0});var t0=n(()=>{qV();wh();});var _h=n(()=>{});var i0=n(()=>{_h();});var o0,a0=n(()=>{o0={Widget:"widget"};});var n0,s0=n(()=>{n0={User:"user",Ollie:"ollie",Agent:"agent"};});var p0,c0=n(()=>{p0={Html:"html"};});var l0,m0=n(()=>{l0={User:"user",Ollie:"ollie",Agent:"agent"};});var d0,u0=n(()=>{d0={Html:"html"};});var kh=n(()=>{a0();s0();c0();m0();u0();});var Rc={};L(Rc,{ViewCreateArea:()=>o0,ViewCreateAuthor:()=>n0,ViewCreateType:()=>p0,ViewVersionCreateAuthor:()=>l0,ViewVersionCreateType:()=>d0});var g0=n(()=>{i0();kh();});var Ah=n(()=>{});var f0=n(()=>{Ah();});var Ph={};var h0=n(()=>{f0();});var y0=n(()=>{});var zh={};var b0=n(()=>{y0();});var Sh=n(()=>{});var R0=n(()=>{Sh();});var x0,w0=n(()=>{x0={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var _0,k0=n(()=>{_0={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 vh=n(()=>{w0();k0();});var xc={};L(xc,{WorkspaceSpanMetricRequestInterval:()=>x0,WorkspaceSpanMetricRequestMetricType:()=>_0});var A0=n(()=>{R0();vh();});var P0=n(()=>{Zg();tM();ef();lM();rf();tf();dM();af();hM();nf();sf();xM();pf();cf();_M();mf();zM();df();uf();NM();gf();ff();BM();yf();WM();LM();xf();GM();_f();OM();Af();eW();zf();Sf();tW();Tf();pW();Cf();Ef();dW();If();Df();hW();Uf();Nf();bW();Bf();xW();_W();Vf();zW();Lf();vW();Gf();jW();EW();DW();NW();$f();WW();Yf();Xf();GW();Zf();qf();tV();eh();rh();lV();th();ih();dV();ah();hV();nh();sh();xV();ph();ch();AV();lh();mh();DV();dh();NV();gh();QV();fh();hh();YV();bh();ZV();xh();t0();wh();_h();g0();kh();Ah();h0();b0();Sh();A0();vh();});var z0=n(()=>{});var S0=n(()=>{});var Noe,v0=n(()=>{Noe={Blueprint:"blueprint",Mask:"mask"};});var T0=n(()=>{});var Foe,j0=n(()=>{Foe={Blueprint:"blueprint",Mask:"mask"};});var C0=n(()=>{});var wo,E0=n(()=>{wo={Blueprint:"blueprint",Mask:"mask"};});var I0=n(()=>{});var D0=n(()=>{});var U0=n(()=>{});var Boe,N0=n(()=>{Boe={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var F0=n(()=>{});var Moe,B0=n(()=>{Moe={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var M0=n(()=>{});var Woe,W0=n(()=>{Woe={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var V0=n(()=>{});var L0=n(()=>{});var J0=n(()=>{});var Voe,G0=n(()=>{Voe={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Loe,H0=n(()=>{Loe={Open:"open",Resolved:"resolved",Closed:"closed"};});var O0=n(()=>{});var Joe,K0=n(()=>{Joe={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Goe,Q0=n(()=>{Goe={Open:"open",Resolved:"resolved",Closed:"closed"};});var $0=n(()=>{});var Hoe,Y0=n(()=>{Hoe={Enabled:"enabled",Disabled:"disabled"};});var X0=n(()=>{});var Z0=n(()=>{});var Ooe,q0=n(()=>{Ooe={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var eL=n(()=>{});var rL=n(()=>{});var Koe,tL=n(()=>{Koe={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var iL=n(()=>{});var oL=n(()=>{});var aL=n(()=>{});var Qoe,nL=n(()=>{Qoe={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var $oe,sL=n(()=>{$oe={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var pL=n(()=>{});var Yoe,cL=n(()=>{Yoe={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var Xoe,lL=n(()=>{Xoe={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 mL=n(()=>{});var Zoe,dL=n(()=>{Zoe={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 uL=n(()=>{});var qoe,gL=n(()=>{qoe={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 fL=n(()=>{});var eae,hL=n(()=>{eae={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var yL=n(()=>{});var bL=n(()=>{});var RL=n(()=>{});var xL=n(()=>{});var wL=n(()=>{});var _L=n(()=>{});var kL=n(()=>{});var AL=n(()=>{});var PL=n(()=>{});var zL=n(()=>{});var SL=n(()=>{});var rae,vL=n(()=>{rae={Manual:"manual",Automated:"automated"};});var TL=n(()=>{});var jL=n(()=>{});var CL=n(()=>{});var tae,EL=n(()=>{tae={Trace:"trace",Thread:"thread"};});var IL=n(()=>{});var DL=n(()=>{});var UL=n(()=>{});var NL=n(()=>{});var iae,FL=n(()=>{iae={Trace:"trace",Thread:"thread"};});var BL=n(()=>{});var oae,ML=n(()=>{oae={Trace:"trace",Thread:"thread"};});var WL=n(()=>{});var VL=n(()=>{});var aae,LL=n(()=>{aae={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var nae,JL=n(()=>{nae={Passed:"passed",Failed:"failed"};});var GL=n(()=>{});var HL=n(()=>{});var OL=n(()=>{});var KL=n(()=>{});var sae,QL=n(()=>{sae={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};});var $L=n(()=>{});var YL=n(()=>{});var XL=n(()=>{});var ZL=n(()=>{});var qL=n(()=>{});var eJ=n(()=>{});var rJ=n(()=>{});var tJ=n(()=>{});var iJ=n(()=>{});var pae,oJ=n(()=>{pae={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var aJ=n(()=>{});var nJ=n(()=>{});var sJ=n(()=>{});var pJ=n(()=>{});var cae,cJ=n(()=>{cae={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var lae,lJ=n(()=>{lae={Production:"production",Experiment:"experiment",Both:"both"};});var mJ=n(()=>{});var dJ=n(()=>{});var mae,uJ=n(()=>{mae={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var dae,gJ=n(()=>{dae={Production:"production",Experiment:"experiment",Both:"both"};});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 uae,SJ=n(()=>{uae={Production:"production",Experiment:"experiment",Both:"both"};});var vJ=n(()=>{});var gae,TJ=n(()=>{gae={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var jJ=n(()=>{});var CJ=n(()=>{});var EJ=n(()=>{});var IJ=n(()=>{});var DJ=n(()=>{});var fae,UJ=n(()=>{fae={Production:"production",Experiment:"experiment",Both:"both"};});var NJ=n(()=>{});var FJ=n(()=>{});var BJ=n(()=>{});var MJ=n(()=>{});var WJ=n(()=>{});var hae,VJ=n(()=>{hae={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var yae,LJ=n(()=>{yae={Production:"production",Experiment:"experiment",Both:"both"};});var JJ=n(()=>{});var GJ=n(()=>{});var HJ=n(()=>{});var OJ=n(()=>{});var KJ=n(()=>{});var QJ=n(()=>{});var $J=n(()=>{});var YJ=n(()=>{});var XJ=n(()=>{});var ZJ=n(()=>{});var qJ=n(()=>{});var eG=n(()=>{});var rG=n(()=>{});var tG=n(()=>{});var bae,iG=n(()=>{bae={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var oG=n(()=>{});var Rae,aG=n(()=>{Rae={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var nG=n(()=>{});var sG=n(()=>{});var pG=n(()=>{});var xae,cG=n(()=>{xae={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var wae,lG=n(()=>{wae={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var mG=n(()=>{});var _ae,dG=n(()=>{_ae={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});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 kae,AG=n(()=>{kae={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var PG=n(()=>{});var Aae,zG=n(()=>{Aae={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var Pae,SG=n(()=>{Pae={Passed:"passed",Failed:"failed"};});var zae,vG=n(()=>{zae={Passed:"passed",Failed:"failed"};});var TG=n(()=>{});var jG=n(()=>{});var CG=n(()=>{});var EG=n(()=>{});var IG=n(()=>{});var DG=n(()=>{});var UG=n(()=>{});var Sae,NG=n(()=>{Sae={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var FG=n(()=>{});var vae,BG=n(()=>{vae={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var Tae,MG=n(()=>{Tae={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var WG=n(()=>{});var VG=n(()=>{});var LG=n(()=>{});var JG=n(()=>{});var jae,GG=n(()=>{jae={Trace:"trace",Span:"span"};});var HG=n(()=>{});var OG=n(()=>{});var KG=n(()=>{});var QG=n(()=>{});var $G=n(()=>{});var YG=n(()=>{});var XG=n(()=>{});var ZG=n(()=>{});var qG=n(()=>{});var e1=n(()=>{});var r1=n(()=>{});var t1=n(()=>{});var i1=n(()=>{});var o1=n(()=>{});var a1=n(()=>{});var Cae,n1=n(()=>{Cae={Workspace:"workspace",Insights:"insights"};});var Eae,s1=n(()=>{Eae={MultiProject:"multi_project",Experiments:"experiments"};});var p1=n(()=>{});var c1=n(()=>{});var Iae,l1=n(()=>{Iae={MultiProject:"multi_project",Experiments:"experiments"};});var m1=n(()=>{});var d1=n(()=>{});var Dae,u1=n(()=>{Dae={MultiProject:"multi_project",Experiments:"experiments"};});var g1=n(()=>{});var f1=n(()=>{});var h1=n(()=>{});var y1=n(()=>{});var b1=n(()=>{});var R1=n(()=>{});var Uae,x1=n(()=>{Uae={Pending:"PENDING",Processing:"PROCESSING",Completed:"COMPLETED",Failed:"FAILED"};});var w1=n(()=>{});var _1=n(()=>{});var k1=n(()=>{});var A1=n(()=>{});var Nae,P1=n(()=>{Nae={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var z1=n(()=>{});var Fae,S1=n(()=>{Fae={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 v1=n(()=>{});var T1=n(()=>{});var j1=n(()=>{});var Bae,C1=n(()=>{Bae={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var Mae,E1=n(()=>{Mae={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var I1=n(()=>{});var D1=n(()=>{});var Th,U1=n(()=>{Th={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var N1=n(()=>{});var F1=n(()=>{});var Wae,B1=n(()=>{Wae={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var jh,M1=n(()=>{jh={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var Vae,W1=n(()=>{Vae={Private:"private",Public:"public"};});var Lae,V1=n(()=>{Lae={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Jae,L1=n(()=>{Jae={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var J1=n(()=>{});var G1=n(()=>{});var H1=n(()=>{});var O1=n(()=>{});var K1=n(()=>{});var Q1=n(()=>{});var Gae,$1=n(()=>{Gae={Private:"private",Public:"public"};});var Y1=n(()=>{});var Hae,X1=n(()=>{Hae={Trace:"trace",Span:"span"};});var Z1=n(()=>{});var q1=n(()=>{});var eH=n(()=>{});var rH=n(()=>{});var tH=n(()=>{});var iH=n(()=>{});var oH=n(()=>{});var aH=n(()=>{});var nH=n(()=>{});var sH=n(()=>{});var pH=n(()=>{});var cH=n(()=>{});var lH=n(()=>{});var mH=n(()=>{});var dH=n(()=>{});var uH=n(()=>{});var gH=n(()=>{});var fH=n(()=>{});var hH=n(()=>{});var yH=n(()=>{});var bH=n(()=>{});var Oae,RH=n(()=>{Oae={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var xH=n(()=>{});var Ch,Eh=n(()=>{Ch={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var Kae,wH=n(()=>{Kae={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var _H=n(()=>{});var Ih,Dh=n(()=>{Ih={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var kH=n(()=>{});var AH=n(()=>{});var PH=n(()=>{});var zH=n(()=>{});var SH=n(()=>{});var vH=n(()=>{});var Qae,TH=n(()=>{Qae={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var jH=n(()=>{});var CH=n(()=>{});var EH=n(()=>{});var IH=n(()=>{});var DH=n(()=>{});var UH=n(()=>{});var NH=n(()=>{});var FH=n(()=>{});var BH=n(()=>{});var $ae,MH=n(()=>{$ae={Passed:"passed",Failed:"failed"};});var Yae,WH=n(()=>{Yae={Default:"default",Hidden:"hidden"};});var VH=n(()=>{});var Xae,LH=n(()=>{Xae={Default:"default",Hidden:"hidden"};});var JH=n(()=>{});var GH=n(()=>{});var Zae,HH=n(()=>{Zae={Passed:"passed",Failed:"failed"};});var qae,OH=n(()=>{qae={Default:"default",Hidden:"hidden"};});var KH=n(()=>{});var QH=n(()=>{});var ene,$H=n(()=>{ene={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var rne,YH=n(()=>{rne={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var tne,XH=n(()=>{tne={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var ZH=n(()=>{});var qH=n(()=>{});var ine,eO=n(()=>{ine={Passed:"passed",Failed:"failed"};});var rO=n(()=>{});var one,tO=n(()=>{one={Passed:"passed",Failed:"failed"};});var ane,iO=n(()=>{ane={Passed:"passed",Failed:"failed"};});var oO=n(()=>{});var aO=n(()=>{});var nO=n(()=>{});var nne,sO=n(()=>{nne={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var Uh,pO=n(()=>{Uh={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var cO=n(()=>{});var sne,lO=n(()=>{sne={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var pne,mO=n(()=>{pne={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var dO=n(()=>{});var uO=n(()=>{});var gO=n(()=>{});var fO=n(()=>{});var hO=n(()=>{});var yO=n(()=>{});var bO=n(()=>{});var RO=n(()=>{});var xO=n(()=>{});var wO=n(()=>{});var _O=n(()=>{});var kO=n(()=>{});var Nh,Fh=n(()=>{Nh={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var AO=n(()=>{});var cne,PO=n(()=>{cne={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var zO=n(()=>{});var lne,SO=n(()=>{lne={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var vO=n(()=>{});var mne,TO=n(()=>{mne={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var jO=n(()=>{});var CO=n(()=>{});var EO=n(()=>{});var dne,IO=n(()=>{dne={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var une,DO=n(()=>{une={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var UO=n(()=>{});var NO=n(()=>{});var FO=n(()=>{});var BO=n(()=>{});var MO=n(()=>{});var WO=n(()=>{});var VO=n(()=>{});var LO=n(()=>{});var JO=n(()=>{});var GO=n(()=>{});var HO=n(()=>{});var gne,OO=n(()=>{gne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var KO=n(()=>{});var fne,QO=n(()=>{fne={OnRequest:"on_request",Global:"global"};});var $O=n(()=>{});var YO=n(()=>{});var hne,XO=n(()=>{hne={OnRequest:"on_request",Global:"global"};});var ZO=n(()=>{});var qO=n(()=>{});var yne,eK=n(()=>{yne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var bne,rK=n(()=>{bne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var tK=n(()=>{});var Rne,iK=n(()=>{Rne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var oK=n(()=>{});var xne,aK=n(()=>{xne={OnRequest:"on_request",Global:"global"};});var wne,nK=n(()=>{wne={Passed:"passed",Failed:"failed"};});var sK=n(()=>{});var pK=n(()=>{});var cK=n(()=>{});var lK=n(()=>{});var _ne,mK=n(()=>{_ne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var kne,dK=n(()=>{kne={Passed:"passed",Failed:"failed"};});var uK=n(()=>{});var gK=n(()=>{});var fK=n(()=>{});var hK=n(()=>{});var yK=n(()=>{});var bK=n(()=>{});var RK=n(()=>{});var xK=n(()=>{});var wK=n(()=>{});var _K=n(()=>{});var kK=n(()=>{});var AK=n(()=>{});var PK=n(()=>{});var zK=n(()=>{});var SK=n(()=>{});var vK=n(()=>{});var TK=n(()=>{});var Ane,jK=n(()=>{Ane={Count:"count",Errors:"errors",AvgDuration:"avg_duration",TotalCost:"total_cost"};});var CK=n(()=>{});var EK=n(()=>{});var IK=n(()=>{});var DK=n(()=>{});var UK=n(()=>{});var NK=n(()=>{});var FK=n(()=>{});var BK=n(()=>{});var Pne,MK=n(()=>{Pne={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var zne,WK=n(()=>{zne={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var VK=n(()=>{});var Sne,LK=n(()=>{Sne={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var JK=n(()=>{});var vne,GK=n(()=>{vne={Decisions:"decisions"};});var HK=n(()=>{});var Tne,OK=n(()=>{Tne={Decisions:"decisions"};});var KK=n(()=>{});var jne,QK=n(()=>{jne={Decisions:"decisions"};});var $K=n(()=>{});var YK=n(()=>{});var Cne,XK=n(()=>{Cne={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var Ene,ZK=n(()=>{Ene={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var qK=n(()=>{});var Ine,eQ=n(()=>{Ine={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var rQ=n(()=>{});var tQ=n(()=>{});var iQ=n(()=>{});var oQ=n(()=>{});var aQ=n(()=>{});var Dne,nQ=n(()=>{Dne={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var sQ=n(()=>{});var pQ=n(()=>{});var Une,cQ=n(()=>{Une={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var Nne,lQ=n(()=>{Nne={Connect:"connect",Endpoint:"endpoint"};});var mQ=n(()=>{});var dQ=n(()=>{});var uQ=n(()=>{});var Fne,gQ=n(()=>{Fne={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};});var fQ=n(()=>{});var hQ=n(()=>{});var yQ=n(()=>{});var bQ=n(()=>{});var Bne,RQ=n(()=>{Bne={Trace:"trace",Thread:"thread",Span:"span"};});var xQ=n(()=>{});var wQ=n(()=>{});var _Q=n(()=>{});var kQ=n(()=>{});var AQ=n(()=>{});var PQ=n(()=>{});var zQ=n(()=>{});var SQ=n(()=>{});var vQ=n(()=>{});var TQ=n(()=>{});var jQ=n(()=>{});var CQ=n(()=>{});var EQ=n(()=>{});var IQ=n(()=>{});var DQ=n(()=>{});var UQ=n(()=>{});var NQ=n(()=>{});var FQ=n(()=>{});var BQ=n(()=>{});var Mne,MQ=n(()=>{Mne={Pending:"pending",Completed:"completed",Failed:"failed"};});var WQ=n(()=>{});var VQ=n(()=>{});var LQ=n(()=>{});var Wne,JQ=n(()=>{Wne={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var Vne,GQ=n(()=>{Vne={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var HQ=n(()=>{});var OQ=n(()=>{});var KQ=n(()=>{});var QQ=n(()=>{});var $Q=n(()=>{});var Lne,YQ=n(()=>{Lne={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var XQ=n(()=>{});var ZQ=n(()=>{});var ci,Bh=n(()=>{ci={Required:"required",Optional:"optional"};});var qQ=n(()=>{});var e$=n(()=>{});var r$=n(()=>{});var t$=n(()=>{});var i$=n(()=>{});var o$=n(()=>{});var a$=n(()=>{});var Jne,n$=n(()=>{Jne={Private:"private",Public:"public"};});var s$=n(()=>{});var Gne,p$=n(()=>{Gne={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var Hne,c$=n(()=>{Hne={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 l$=n(()=>{});var m$=n(()=>{});var One,d$=n(()=>{One={Private:"private",Public:"public"};});var u$=n(()=>{});var g$=n(()=>{});var f$=n(()=>{});var h$=n(()=>{});var y$=n(()=>{});var b$=n(()=>{});var Kne,R$=n(()=>{Kne={Private:"private",Public:"public"};});var x$=n(()=>{});var w$=n(()=>{});var _$=n(()=>{});var Qne,k$=n(()=>{Qne={Text:"text",Chat:"chat"};});var A$=n(()=>{});var P$=n(()=>{});var $ne,z$=n(()=>{$ne={Text:"text",Chat:"chat"};});var Yne,S$=n(()=>{Yne={Text:"text",Chat:"chat"};});var v$=n(()=>{});var Xne,T$=n(()=>{Xne={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var j$=n(()=>{});var C$=n(()=>{});var E$=n(()=>{});var Zne,I$=n(()=>{Zne={Text:"text",Chat:"chat"};});var qne,D$=n(()=>{qne={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var ese,U$=n(()=>{ese={PromptVersion:"prompt_version",Mask:"mask"};});var N$=n(()=>{});var F$=n(()=>{});var B$=n(()=>{});var M$=n(()=>{});var W$=n(()=>{});var rse,V$=n(()=>{rse={Text:"text",Chat:"chat"};});var tse,L$=n(()=>{tse={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var ise,J$=n(()=>{ise={PromptVersion:"prompt_version",Mask:"mask"};});var ose,G$=n(()=>{ose={Text:"text",Chat:"chat"};});var ase,H$=n(()=>{ase={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var O$=n(()=>{});var nse,K$=n(()=>{nse={PromptVersion:"prompt_version",Mask:"mask"};});var Q$=n(()=>{});var $$=n(()=>{});var sse,Y$=n(()=>{sse={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var X$=n(()=>{});var pse,Z$=n(()=>{pse={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var q$=n(()=>{});var e4=n(()=>{});var cse,r4=n(()=>{cse={Form:"form",Json:"json",Basic:"basic"};});var lse,t4=n(()=>{lse={Form:"form",Json:"json",Basic:"basic"};});var i4=n(()=>{});var mse,o4=n(()=>{mse={Form:"form",Json:"json",Basic:"basic"};});var a4=n(()=>{});var dse,n4=n(()=>{dse={TraceDaily:"trace_daily",Experiment:"experiment",DatasetVersion:"dataset_version",TestSuiteVersion:"test_suite_version",AlertEvent:"alert_event",Optimization:"optimization",PromptVersion:"prompt_version"};});var s4=n(()=>{});var p4=n(()=>{});var use,c4=n(()=>{use={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var l4=n(()=>{});var m4=n(()=>{});var gse,d4=n(()=>{gse={AgentInsights:"agent_insights"};});var u4=n(()=>{});var g4=n(()=>{});var f4=n(()=>{});var fse,h4=n(()=>{fse={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};});var y4=n(()=>{});var b4=n(()=>{});var R4=n(()=>{});var x4=n(()=>{});var hse,w4=n(()=>{hse={Organization:"organization",Workspace:"workspace",Project:"project"};});var yse,_4=n(()=>{yse={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var k4=n(()=>{});var bse,A4=n(()=>{bse={GreaterThan:">",LessThan:"<",EqualTo:"="};});var P4=n(()=>{});var Rse,z4=n(()=>{Rse={GreaterThan:">",LessThan:"<",EqualTo:"="};});var S4=n(()=>{});var xse,v4=n(()=>{xse={GreaterThan:">",LessThan:"<",EqualTo:"="};});var T4=n(()=>{});var j4=n(()=>{});var C4=n(()=>{});var E4=n(()=>{});var I4=n(()=>{});var D4=n(()=>{});var U4=n(()=>{});var wse,N4=n(()=>{wse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var _se,F4=n(()=>{_se={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var B4=n(()=>{});var kse,M4=n(()=>{kse={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 W4=n(()=>{});var Ase,V4=n(()=>{Ase={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 L4=n(()=>{});var Pse,J4=n(()=>{Pse={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 G4=n(()=>{});var H4=n(()=>{});var O4=n(()=>{});var K4=n(()=>{});var Q4=n(()=>{});var zse,$4=n(()=>{zse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Sse,Y4=n(()=>{Sse={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var vse,X4=n(()=>{vse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Z4=n(()=>{});exports.OpikSpanType=void 0;var Mh=n(()=>{exports.OpikSpanType={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var q4=n(()=>{});var Tse,e6=n(()=>{Tse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var jse,r6=n(()=>{jse={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var t6=n(()=>{});var i6=n(()=>{});var o6=n(()=>{});var a6=n(()=>{});var Cse,n6=n(()=>{Cse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Ese,s6=n(()=>{Ese={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var p6=n(()=>{});var c6=n(()=>{});var l6=n(()=>{});var m6=n(()=>{});var d6=n(()=>{});var u6=n(()=>{});var g6=n(()=>{});var f6=n(()=>{});var h6=n(()=>{});var y6=n(()=>{});var b6=n(()=>{});var R6=n(()=>{});var x6=n(()=>{});var w6=n(()=>{});var _6=n(()=>{});var k6=n(()=>{});var A6=n(()=>{});var P6=n(()=>{});var z6=n(()=>{});var S6=n(()=>{});var v6=n(()=>{});var T6=n(()=>{});var j6=n(()=>{});var C6=n(()=>{});var Ise,E6=n(()=>{Ise={Function:"function"};});var I6=n(()=>{});var Dse,D6=n(()=>{Dse={EffortNoneOnly:"effortNoneOnly",Refused:"refused"};});var Use,U6=n(()=>{Use={Function:"function"};});var N6=n(()=>{});var F6=n(()=>{});var B6=n(()=>{});var M6=n(()=>{});var W6=n(()=>{});var Nse,V6=n(()=>{Nse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var L6=n(()=>{});var Fse,J6=n(()=>{Fse={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 G6=n(()=>{});var Bse,H6=n(()=>{Bse={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 O6=n(()=>{});var Mse,K6=n(()=>{Mse={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 Q6=n(()=>{});var $6=n(()=>{});var Wse,Y6=n(()=>{Wse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Vse,X6=n(()=>{Vse={Default:"default",Hidden:"hidden"};});var Lse,Z6=n(()=>{Lse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var q6=n(()=>{});var e2=n(()=>{});var Jse,r2=n(()=>{Jse={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 t2=n(()=>{});var Gse,i2=n(()=>{Gse={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 o2=n(()=>{});var Hse,a2=n(()=>{Hse={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 n2=n(()=>{});var s2=n(()=>{});var p2=n(()=>{});var c2=n(()=>{});var l2=n(()=>{});var Ose,m2=n(()=>{Ose={Active:"active",Inactive:"inactive"};});var d2=n(()=>{});var u2=n(()=>{});var g2=n(()=>{});var f2=n(()=>{});var h2=n(()=>{});var Kse,y2=n(()=>{Kse={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Qse,b2=n(()=>{Qse={Default:"default",Hidden:"hidden"};});var R2=n(()=>{});var $se,x2=n(()=>{$se={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var w2=n(()=>{});var _2=n(()=>{});var k2=n(()=>{});var A2=n(()=>{});var P2=n(()=>{});var z2=n(()=>{});var S2=n(()=>{});var v2=n(()=>{});var Yse,T2=n(()=>{Yse={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var j2=n(()=>{});var Xse,C2=n(()=>{Xse={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var E2=n(()=>{});var I2=n(()=>{});var Zse,D2=n(()=>{Zse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var U2=n(()=>{});var qse,N2=n(()=>{qse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var F2=n(()=>{});var epe,B2=n(()=>{epe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var rpe,M2=n(()=>{rpe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var W2=n(()=>{});var V2=n(()=>{});var L2=n(()=>{});var J2=n(()=>{});var tpe,G2=n(()=>{tpe={Widget:"widget"};});var H2=n(()=>{});var ipe,O2=n(()=>{ipe={Query:"query"};});var K2=n(()=>{});var ope,Q2=n(()=>{ope={User:"user",Ollie:"ollie",Agent:"agent"};});var $2=n(()=>{});var Y2=n(()=>{});var ape,X2=n(()=>{ape={User:"user",Ollie:"ollie",Agent:"agent"};});var npe,Z2=n(()=>{npe={Html:"html"};});var q2=n(()=>{});var eY=n(()=>{});var rY=n(()=>{});var tY=n(()=>{});var spe,iY=n(()=>{spe={Success:"success",Failure:"failure"};});var oY=n(()=>{});var aY=n(()=>{});var nY=n(()=>{});var sY=n(()=>{});var pY=n(()=>{});var cY=n(()=>{});var lY=n(()=>{});var mY=n(()=>{});var dY=n(()=>{});var uY=n(()=>{});var gY=n(()=>{});var fY=n(()=>{});var hY=n(()=>{});var yY=n(()=>{});var Wh=n(()=>{z0();S0();v0();T0();j0();C0();E0();I0();D0();U0();N0();F0();B0();M0();W0();V0();L0();J0();G0();H0();O0();K0();Q0();$0();Y0();X0();Z0();q0();eL();rL();tL();iL();oL();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();CL();EL();IL();DL();UL();NL();FL();BL();ML();WL();VL();LL();JL();GL();HL();OL();KL();QL();$L();YL();XL();ZL();qL();eJ();rJ();tJ();iJ();oJ();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();jJ();CJ();EJ();IJ();DJ();UJ();NJ();FJ();BJ();MJ();WJ();VJ();LJ();JJ();GJ();HJ();OJ();KJ();QJ();$J();YJ();XJ();ZJ();qJ();eG();rG();tG();iG();oG();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();CG();EG();IG();DG();UG();NG();FG();BG();MG();WG();VG();LG();JG();GG();HG();OG();KG();QG();$G();YG();XG();ZG();qG();e1();r1();t1();i1();o1();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();C1();E1();I1();D1();U1();N1();F1();B1();M1();W1();V1();L1();J1();G1();H1();O1();K1();Q1();$1();Y1();X1();Z1();q1();eH();rH();tH();iH();oH();aH();nH();sH();pH();cH();lH();mH();dH();uH();gH();fH();hH();yH();bH();RH();xH();Eh();wH();_H();Dh();kH();AH();PH();zH();SH();vH();TH();jH();CH();EH();IH();DH();UH();NH();FH();BH();MH();WH();VH();LH();JH();GH();HH();OH();KH();QH();$H();YH();XH();ZH();qH();eO();rO();tO();iO();oO();aO();nO();sO();pO();cO();lO();mO();dO();uO();gO();fO();hO();yO();bO();RO();xO();wO();_O();kO();Fh();AO();PO();zO();SO();vO();TO();jO();CO();EO();IO();DO();UO();NO();FO();BO();MO();WO();VO();LO();JO();GO();HO();OO();KO();QO();$O();YO();XO();ZO();qO();eK();rK();tK();iK();oK();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();CK();EK();IK();DK();UK();NK();FK();BK();MK();WK();VK();LK();JK();GK();HK();OK();KK();QK();$K();YK();XK();ZK();qK();eQ();rQ();tQ();iQ();oQ();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();CQ();EQ();IQ();DQ();UQ();NQ();FQ();BQ();MQ();WQ();VQ();LQ();JQ();GQ();HQ();OQ();KQ();QQ();$Q();YQ();XQ();ZQ();Bh();qQ();e$();r$();t$();i$();o$();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$();C$();E$();I$();D$();U$();N$();F$();B$();M$();W$();V$();L$();J$();G$();H$();O$();K$();Q$();$$();Y$();X$();Z$();q$();e4();r4();t4();i4();o4();a4();n4();s4();p4();c4();l4();m4();d4();u4();g4();f4();h4();y4();b4();R4();x4();w4();_4();k4();A4();P4();z4();S4();v4();T4();j4();C4();E4();I4();D4();U4();N4();F4();B4();M4();W4();V4();L4();J4();G4();H4();O4();K4();Q4();$4();Y4();X4();Z4();Mh();q4();e6();r6();t6();i6();o6();a6();n6();s6();p6();c6();l6();m6();d6();u6();g6();f6();h6();y6();b6();R6();x6();w6();_6();k6();A6();P6();z6();S6();v6();T6();j6();C6();E6();I6();D6();U6();N6();F6();B6();M6();W6();V6();L6();J6();G6();H6();O6();K6();Q6();$6();Y6();X6();Z6();q6();e2();r2();t2();i2();o2();a2();n2();s2();p2();c2();l2();m2();d2();u2();g2();f2();h2();y2();b2();R2();x2();w2();_2();k2();A2();P2();z2();S2();v2();T2();j2();C2();E2();I2();D2();U2();N2();F2();B2();M2();W2();V2();L2();J2();G2();H2();O2();K2();Q2();$2();Y2();X2();Z2();q2();eY();rY();tY();iY();oY();aY();nY();sY();pY();cY();lY();mY();dY();uY();gY();fY();hY();yY();});var oe={};L(oe,{AgentBlueprintHistoryType:()=>Noe,AgentBlueprintPublicType:()=>Foe,AgentBlueprintWriteType:()=>wo,AgentConfigValueHistoryType:()=>Boe,AgentConfigValuePublicType:()=>Moe,AgentConfigValueWriteType:()=>Woe,AgentInsightsIssueSeverity:()=>Voe,AgentInsightsIssueStatus:()=>Loe,AgentInsightsIssueUpdateStatus:()=>oM,AgentInsightsIssueWithDetailsSeverity:()=>Joe,AgentInsightsIssueWithDetailsStatus:()=>Goe,AgentInsightsJobStatus:()=>Hoe,AgentInsightsJobUpdateStatus:()=>gM,AlertAlertType:()=>Ooe,AlertPublicAlertType:()=>Koe,AlertTriggerConfigPublicType:()=>Qoe,AlertTriggerConfigType:()=>$oe,AlertTriggerConfigWriteType:()=>Yoe,AlertTriggerEventType:()=>Xoe,AlertTriggerPublicEventType:()=>Zoe,AlertTriggerWriteEventType:()=>qoe,AlertWriteAlertType:()=>eae,AnnotationQueueItemPublicSource:()=>rae,AnnotationQueuePublicScope:()=>tae,AnnotationQueueScope:()=>iae,AnnotationQueueWriteScope:()=>oae,AssertionResultBatchEntityType:()=>AM,AssertionResultBatchItemSource:()=>aae,AssertionResultBatchItemStatus:()=>nae,AssistantMessageRole:()=>sae,AttachmentListRequestEntityType:()=>vM,AutomationRuleEvaluatorAction:()=>pae,AutomationRuleEvaluatorObjectObjectPublicAction:()=>cae,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>lae,AutomationRuleEvaluatorPublicAction:()=>mae,AutomationRuleEvaluatorPublicTriggerScope:()=>dae,AutomationRuleEvaluatorTriggerScope:()=>uae,AutomationRuleEvaluatorUpdateAction:()=>gae,AutomationRuleEvaluatorUpdateTriggerScope:()=>fae,AutomationRuleEvaluatorWriteAction:()=>hae,AutomationRuleEvaluatorWriteTriggerScope:()=>yae,BadGatewayError:()=>xo,BadRequestError:()=>N,BreakdownConfigField:()=>bae,BreakdownConfigPublicField:()=>Rae,BridgeCommandItemType:()=>xae,BridgeCommandResultRequestStatus:()=>zV,BridgeCommandStatus:()=>wae,BridgeCommandSubmitRequestType:()=>vV,BridgeCommandType:()=>_ae,CheckName:()=>kae,CheckPublicName:()=>Aae,CheckPublicResult:()=>Pae,CheckResult:()=>zae,ColumnCompareTypesItem:()=>Sae,ColumnPublicTypesItem:()=>vae,ColumnTypesItem:()=>Tae,CompleteMultipartUploadRequestEntityType:()=>jae,ConflictError:()=>X,CreateDatasetItemsFromJsonRequestFormat:()=>QM,CreatePromptVersionDetailTemplateStructure:()=>oV,CreateSessionRequestType:()=>LW,DashboardPublicScope:()=>Cae,DashboardPublicType:()=>Eae,DashboardUpdatePublicType:()=>Iae,DashboardWriteType:()=>Dae,DatasetExportJobPublicStatus:()=>Uae,DatasetItemCompareSource:()=>Nae,DatasetItemFilterOperator:()=>Fae,DatasetItemPublicSource:()=>Bae,DatasetItemSource:()=>Mae,DatasetItemWriteSource:()=>Th,DatasetPublicStatus:()=>Wae,DatasetPublicType:()=>jh,DatasetPublicVisibility:()=>Vae,DatasetStatus:()=>Lae,DatasetType:()=>Jae,DatasetUpdateVisibility:()=>YM,DatasetVisibility:()=>Gae,DatasetWriteType:()=>tc,DatasetWriteVisibility:()=>ZM,DeleteAttachmentsRequestEntityType:()=>Hae,DownloadAttachmentRequestEntityType:()=>jM,EvaluatorItemCompareType:()=>Oae,EvaluatorItemPublicType:()=>Ch,EvaluatorItemType:()=>Kae,EvaluatorItemWriteType:()=>Ih,ExperimentEvaluationMethod:()=>Qae,ExperimentItemCompareStatus:()=>$ae,ExperimentItemCompareTraceVisibilityMode:()=>Yae,ExperimentItemPublicTraceVisibilityMode:()=>Xae,ExperimentItemStatus:()=>Zae,ExperimentItemTraceVisibilityMode:()=>qae,ExperimentPublicEvaluationMethod:()=>ene,ExperimentPublicStatus:()=>rne,ExperimentPublicType:()=>tne,ExperimentRunSummaryCompareStatus:()=>ine,ExperimentRunSummaryPublicStatus:()=>one,ExperimentRunSummaryStatus:()=>ane,ExperimentStatus:()=>nne,ExperimentType:()=>Uh,ExperimentUpdateStatus:()=>sne,ExperimentUpdateType:()=>pne,ExperimentWriteEvaluationMethod:()=>oc,ExperimentWriteStatus:()=>oW,ExperimentWriteType:()=>nW,FeedbackScoreBatchItemSource:()=>Nh,FeedbackScoreBatchItemThreadSource:()=>cne,FeedbackScoreCompareSource:()=>lne,FeedbackScoreExperimentItemBulkWriteViewSource:()=>mne,FeedbackScorePublicSource:()=>dne,FeedbackScoreSource:()=>une,FindAgentInsightsIssuesRequestSeverity:()=>nM,FindAgentInsightsIssuesRequestStatus:()=>pM,FindFeedbackDefinitionsRequestType:()=>lW,FindFeedbackScoreNames1RequestType:()=>BV,FindGuardrailPoliciesRequestExecutionScope:()=>gW,FindReportFailuresRequestType:()=>gV,ForbiddenError:()=>se,GetSpanStatsRequestType:()=>WV,GetSpansByProjectRequestType:()=>LV,GetWebhookExamplesRequestAlertType:()=>bM,GoneError:()=>ut,GuardrailName:()=>gne,GuardrailPolicyExecutionScope:()=>fne,GuardrailPolicyPublicExecutionScope:()=>hne,GuardrailPolicyRulePublicType:()=>yne,GuardrailPolicyRuleType:()=>bne,GuardrailPolicyRuleWriteType:()=>Rne,GuardrailPolicyWriteExecutionScope:()=>xne,GuardrailResult:()=>wne,GuardrailWriteName:()=>_ne,GuardrailWriteResult:()=>kne,InternalServerError:()=>gt,KpiCardRequestEntityType:()=>OW,KpiMetricType:()=>Ane,ListRunnersRequestStatus:()=>jV,LlmAsJudgeMessagePublicRole:()=>Pne,LlmAsJudgeMessageRole:()=>zne,LlmAsJudgeMessageWriteRole:()=>Sne,LlmAsJudgeModelParametersApi:()=>vne,LlmAsJudgeModelParametersPublicApi:()=>Tne,LlmAsJudgeModelParametersWriteApi:()=>jne,LlmAsJudgeOutputSchemaPublicType:()=>Cne,LlmAsJudgeOutputSchemaType:()=>Ene,LlmAsJudgeOutputSchemaWriteType:()=>Ine,LocalRunnerJobResultRequestStatus:()=>EV,LocalRunnerJobStatus:()=>Dne,LocalRunnerStatus:()=>Une,LocalRunnerType:()=>Nne,LogItemLevel:()=>Fne,ManualEvaluationRequestEntityType:()=>Bne,NotFoundError:()=>U,NotImplementedError:()=>Se,OllieReportStatus:()=>Mne,OptimizationPublicStatus:()=>Wne,OptimizationStatus:()=>Vne,OptimizationUpdateStatus:()=>BW,OptimizationWriteStatus:()=>Lne,ParamPresence:()=>ci,ProjectDetailedVisibility:()=>Jne,ProjectMetricRequestPublicInterval:()=>QW,ProjectMetricRequestPublicMetricType:()=>YW,ProjectMetricResponsePublicInterval:()=>Gne,ProjectMetricResponsePublicMetricType:()=>Hne,ProjectPublicVisibility:()=>One,ProjectUpdateVisibility:()=>ZW,ProjectVisibility:()=>Kne,ProjectWriteVisibility:()=>eV,PromptDetailTemplateStructure:()=>Qne,PromptPublicTemplateStructure:()=>$ne,PromptTemplateStructure:()=>Yne,PromptType:()=>Xne,PromptVersionDetailTemplateStructure:()=>Zne,PromptVersionDetailType:()=>qne,PromptVersionDetailVersionType:()=>ese,PromptVersionPublicTemplateStructure:()=>rse,PromptVersionPublicType:()=>tse,PromptVersionPublicVersionType:()=>ise,PromptVersionTemplateStructure:()=>ose,PromptVersionType:()=>ase,PromptVersionVersionType:()=>nse,PromptWriteTemplateStructure:()=>nV,PromptWriteType:()=>pV,ProviderApiKeyProvider:()=>sse,ProviderApiKeyPublicProvider:()=>pse,ProviderApiKeyWriteProvider:()=>AW,ProviderAuthConfigPublicSendAs:()=>cse,ProviderAuthConfigSendAs:()=>lse,ProviderAuthConfigWriteSendAs:()=>mse,RecentActivityItemPublicType:()=>dse,ReportCompleteRequestStatus:()=>bV,ReportFailureType:()=>gse,ReportedIssueSeverity:()=>use,ResponseFormatType:()=>fse,RetentionRulePublicLevel:()=>hse,RetentionRulePublicRetention:()=>yse,RetentionRuleWriteRetention:()=>_V,ScoreConditionOperator:()=>bse,ScoreConditionPublicOperator:()=>Rse,ScoreConditionWriteOperator:()=>xse,ServiceUnavailableError:()=>Ue,SpanExperimentItemBulkWriteViewSource:()=>wse,SpanExperimentItemBulkWriteViewType:()=>_se,SpanFilterOperator:()=>kse,SpanFilterPublicOperator:()=>Ase,SpanFilterWriteOperator:()=>Pse,SpanPublicSource:()=>zse,SpanPublicType:()=>Sse,SpanSearchStreamRequestPublicExcludeItem:()=>GV,SpanSearchStreamRequestPublicType:()=>OV,SpanSource:()=>vse,SpanType:()=>exports.OpikSpanType,SpanUpdateSource:()=>Tse,SpanUpdateType:()=>jse,SpanWriteSource:()=>Cse,SpanWriteType:()=>Ese,StartMultipartUploadRequestEntityType:()=>EM,TooManyRequestsError:()=>fe,ToolCallType:()=>Ise,ToolType:()=>Use,ToolsParamChatCompletions:()=>Dse,TraceExperimentItemBulkWriteViewSource:()=>Nse,TraceFilterOperator:()=>Fse,TraceFilterPublicOperator:()=>Bse,TraceFilterWriteOperator:()=>Mse,TracePublicSource:()=>Wse,TracePublicVisibilityMode:()=>Vse,TraceSearchStreamRequestPublicExcludeItem:()=>e0,TraceSource:()=>Lse,TraceThreadFilterOperator:()=>Jse,TraceThreadFilterPublicOperator:()=>Gse,TraceThreadFilterWriteOperator:()=>Hse,TraceThreadStatus:()=>Ose,TraceUpdateSource:()=>Kse,TraceVisibilityMode:()=>Qse,TraceWriteSource:()=>$se,UnauthorizedError:()=>K,UnprocessableEntityError:()=>O,UploadAttachmentRequestEntityType:()=>DM,ValidationDescriptorType:()=>Yse,ValidationResultType:()=>Xse,ValueEntryCompareSource:()=>Zse,ValueEntryExperimentItemBulkWriteViewSource:()=>qse,ValueEntryPublicSource:()=>epe,ValueEntrySource:()=>rpe,ViewArea:()=>tpe,ViewCreateArea:()=>o0,ViewCreateAuthor:()=>n0,ViewCreateType:()=>p0,ViewInputKind:()=>ipe,ViewVersionAuthor:()=>ope,ViewVersionCreateAuthor:()=>l0,ViewVersionCreateType:()=>d0,ViewVersionSummaryAuthor:()=>ape,ViewVersionType:()=>npe,WebhookTestResultStatus:()=>spe,WorkspaceSpanMetricRequestInterval:()=>x0,WorkspaceSpanMetricRequestMetricType:()=>_0,agentConfigs:()=>qg,agentInsights:()=>Xp,agentInsightsEnrollment:()=>of,agentInsightsJobs:()=>Zp,alerts:()=>qp,annotationQueues:()=>lf,assertionResults:()=>ec,attachments:()=>rc,automationRuleEvaluators:()=>hf,chatCompletions:()=>bf,check:()=>Rf,dashboardSavedQueries:()=>wf,dashboards:()=>kf,datasets:()=>ic,environments:()=>vf,experiments:()=>ac,feedbackDefinitions:()=>nc,guardrailPolicies:()=>sc,guardrails:()=>Ff,insightsViews:()=>Mf,llmModels:()=>Wf,llmProviderKey:()=>pc,manualEvaluation:()=>Jf,mcpOAuth:()=>Hf,ollama:()=>Of,ollieState:()=>Kf,openTelemetryIngestion:()=>Qf,optimizations:()=>cc,pairing:()=>lc,projects:()=>mc,prompts:()=>dc,redirect:()=>oh,reportFailures:()=>uc,reports:()=>gc,retentionRules:()=>fc,runners:()=>hc,serviceToggles:()=>uh,spans:()=>yc,systemAnalyticsQueries:()=>yh,systemUsage:()=>Rh,traces:()=>bc,views:()=>Rc,welcomeWizard:()=>Ph,workspacePermissions:()=>zh,workspaces:()=>xc});var ee=n(()=>{eM();P0();Wh();});function z(...p){let i={};for(let[r,t]of p.filter(o=>o!=null).flatMap(o=>Object.entries(o))){let o=r.toLowerCase();t!=null?i[o]=t:o in i&&delete i[o];}return i}function T(...p){let i={};for(let[r,t]of p.filter(o=>o!=null).flatMap(o=>Object.entries(o))){let o=r.toLowerCase();t!=null&&(i[o]=t);}return i}var Q=n(()=>{});var Vh,Lh=n(()=>{Vh={get:async(p,i)=>typeof p=="function"?p(i):p};});function Jh(p){return p==null?ppe:p instanceof li?p:(p=p!=null?p:{},(p.level)!=null||(p.level=He.Info),(p.logger)!=null||(p.logger=new ft),(p.silent)!=null||(p.silent=true),new li(p))}var He,bY,ft,li,ppe,wc=n(()=>{He={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},bY={[He.Debug]:1,[He.Info]:2,[He.Warn]:3,[He.Error]:4},ft=class{debug(i,...r){console.debug(i,...r);}info(i,...r){console.info(i,...r);}warn(i,...r){console.warn(i,...r);}error(i,...r){console.error(i,...r);}},li=class{constructor(i){this.level=bY[i.level],this.logger=i.logger,this.silent=i.silent;}shouldLog(i){return !this.silent&&this.level<=bY[i]}isDebug(){return this.shouldLog(He.Debug)}debug(i,...r){this.isDebug()&&this.logger.debug(i,...r);}isInfo(){return this.shouldLog(He.Info)}info(i,...r){this.isInfo()&&this.logger.info(i,...r);}isWarn(){return this.shouldLog(He.Warn)}warn(i,...r){this.isWarn()&&this.logger.warn(i,...r);}isError(){return this.shouldLog(He.Error)}error(i,...r){this.isError()&&this.logger.error(i,...r);}};ppe=new li({level:He.Info,logger:new ft,silent:true});});function RY(p,i){if(p===void 0||p===null)return "";let r=String(p);return i?encodeURIComponent(r):r}function Gh(p,i="",r){let t=[];for(let[o,a]of Object.entries(p)){let s=i?`${i}[${o}]`:o;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=r.arrayFormat==="indices"?`${s}[${c}]`:s;t.push(...Gh(l,m,r));}else {let m=r.arrayFormat==="indices"?`${s}[${c}]`:s,u=r.encode?encodeURIComponent(m):m;t.push(`${u}=${RY(l,r.encode)}`);}}}else if(typeof a=="object"&&a!==null){if(Object.keys(a).length===0)continue;t.push(...Gh(a,s,r));}else {let c=r.encode?encodeURIComponent(s):s;t.push(`${c}=${RY(a,r.encode)}`);}}return t}function ht(p,i){return p==null||typeof p!="object"?"":Gh(p,"",{...lpe,...i}).join("&")}var lpe,_o=n(()=>{lpe={arrayFormat:"indices",encode:true};});function xY(p,i){let r=ht(i,{arrayFormat:"repeat"});return r?`${p}?${r}`:p}var wY=n(()=>{_o();});function _Y(p){let i={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"&&(i.bytes=p.bytes.bind(p)),i}var kY=n(()=>{});async function _c(p,i){switch(i){case "binary-response":return _Y(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 r=await p.text();if(r.length>0)try{return Ro(r)}catch{return {ok:false,error:{reason:"non-json",statusCode:p.status,rawBody:r}}}}var Hh=n(()=>{Lr();kY();});async function AY(p){var r,t,o;let i=(r=p.headers.get("Content-Type"))==null?void 0:r.toLowerCase();if(i==null||i.length===0)return _c(p);switch(i.indexOf(";")!==-1&&(i=(o=(t=i.split(";")[0])==null?void 0:t.trim())!=null?o:""),i){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?Ro(a):void 0}default:if(i.startsWith("application/vnd.")&&i.endsWith("+json")){let a=await p.text();return a.length>0?Ro(a):void 0}return await p.text()}}var PY=n(()=>{Lr();Hh();});async function zY(){return fetch}var SY=n(()=>{});async function vY({body:p,type:i}){return i==="form"?ht(p,{arrayFormat:"repeat",encode:true}):i.includes("json")?Xe(p):p}var TY=n(()=>{Lr();_o();});var Gr,Oh=n(()=>{typeof globalThis.Headers!="undefined"?Gr=globalThis.Headers:Gr=class jY{constructor(i){if(this.headers=new Map,i)if(i instanceof jY)i.forEach((r,t)=>this.append(t,r));else if(Array.isArray(i))for(let[r,t]of i)if(typeof r=="string"&&typeof t=="string")this.append(r,t);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[r,t]of Object.entries(i))if(typeof t=="string")this.append(r,t);else throw new TypeError("Header values must be strings")}append(i,r){let t=i.toLowerCase(),o=this.headers.get(t)||[];this.headers.set(t,[...o,r]);}delete(i){let r=i.toLowerCase();this.headers.delete(r);}get(i){let r=i.toLowerCase(),t=this.headers.get(r);return t?t.join(", "):null}has(i){let r=i.toLowerCase();return this.headers.has(r)}set(i,r){let t=i.toLowerCase();this.headers.set(t,[r]);}forEach(i,r){let t=r?i.bind(r):i;this.headers.forEach((o,a)=>t(o.join(", "),a,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[i,r]of this.headers.entries())yield [i,r.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let i of this.headers.values())yield i.join(", ");}[Symbol.iterator](){return this.entries()}};});function CY(p){let i=new AbortController,r=setTimeout(()=>i.abort(mpe),p);return {signal:i.signal,abortId:r}}function EY(...p){let i=p.length===1&&Array.isArray(p[0])?p[0]:p,r=new AbortController;for(let t of i){if(t.aborted){r.abort(t==null?void 0:t.reason);break}t.addEventListener("abort",()=>r.abort(t==null?void 0:t.reason),{signal:r.signal});}return r.signal}var mpe,IY=n(()=>{mpe="timeout";});var DY,UY=n(()=>{IY();DY=async(p,i,r,t,o,a,s,c,l)=>{let m=[],u;if(a!=null){let{signal:g,abortId:h}=CY(a);u=h,m.push(g);}s!=null&&m.push(s);let d=EY(m),f=await p(i,{method:r,headers:t,body:o,signal:d,credentials:c?"include":void 0,duplex:l});return u!=null&&clearTimeout(u),f};});function Pc(p){return {headers:p.headers,redirected:p.redirected,status:p.status,statusText:p.statusText,type:p.type,url:p.url}}var kc,Ac,Kh=n(()=>{Oh();kc={headers:new Gr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Ac={headers:new Gr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};});function dpe(p){let i=1+Math.random()*.2;return p*i}function upe(p){let i=1+(Math.random()-.5)*.2;return p*i}function gpe(p,i){let r=p.headers.get("Retry-After");if(r){let o=parseInt(r,10);if(!Number.isNaN(o)&&o>0)return Math.min(o*1e3,6e4);let a=new Date(r);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 o=parseInt(t,10);if(!Number.isNaN(o)){let a=o*1e3-Date.now();if(a>0)return dpe(Math.min(a,6e4))}}return upe(Math.min(1e3*2**i,6e4))}async function NY(p,i=2){let r=await p();for(let t=0;t<i&&([408,429].includes(r.status)||r.status>=500);++t){let o=gpe(r,t);await new Promise(a=>setTimeout(a,o)),r=await p();}return r}var FY=n(()=>{});function Qh(p){let i={};for(let[r,t]of p instanceof Gr?p.entries():Object.entries(p))fpe.has(r.toLowerCase())?i[r]="[REDACTED]":i[r]=t;return i}function hpe(p){if(p==null)return p;let i={};for(let[r,t]of Object.entries(p))$h.has(r.toLowerCase())?i[r]="[REDACTED]":i[r]=t;return i}function yt(p){let i=p.indexOf("://");if(i===-1)return p;let r=i+3,t=p.indexOf("/",r),o=p.indexOf("?",r),a=p.indexOf("#",r),s=Math.min(t===-1?p.length:t,o===-1?p.length:o,a===-1?p.length:a),c=-1;for(let h=r;h<s;h++)p[h]==="@"&&(c=h);if(c!==-1&&(p=`${p.slice(0,r)}[REDACTED]@${p.slice(c+1)}`),o=p.indexOf("?"),o===-1)return p;a=p.indexOf("#",o);let l=a!==-1?a:p.length,m=p.slice(o+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=$h.has(w.toLowerCase());if(!A&&w.includes("%"))try{let C=decodeURIComponent(w);A=$h.has(C.toLowerCase());}catch{}f.push(A?`${w}=[REDACTED]`:h);}return p.slice(0,o+1)+f.join("&")+p.slice(l)}async function ype(p){var r;let i=new Gr;if(i.set("Accept",p.responseType==="json"?"application/json":p.responseType==="text"?"text/plain":"*/*"),p.body!==void 0&&p.contentType!=null&&i.set("Content-Type",p.contentType),p.headers==null)return i;for(let[t,o]of Object.entries(p.headers)){let a=await Vh.get(o,{endpointMetadata:(r=p.endpointMetadata)!=null?r:{}});if(typeof a=="string"){i.set(t,a);continue}a!=null&&i.set(t,`${a}`);}return i}async function bpe(p){var s,c,l;let i=xY(p.url,p.queryParameters),r=await vY({body:p.body,type:(s=p.requestType)!=null?s:"other"}),t=(c=p.fetchFn)!=null?c:await zY(),o=await ype(p),a=Jh(p.logging);if(a.isDebug()){let m={method:p.method,url:yt(i),headers:Qh(o),queryParameters:hpe(p.queryParameters),hasBody:r!=null};a.debug("Making HTTP request",m);}try{let m=await NY(async()=>DY(t,i,p.method,o,r,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:yt(i),statusCode:m.status,responseHeaders:Qh(m.headers)};a.debug("HTTP request succeeded",d);}return {ok:!0,body:await _c(m,p.responseType),headers:m.headers,rawResponse:Pc(m)}}else {if(a.isError()){let u={method:p.method,url:yt(i),statusCode:m.status,responseHeaders:Qh(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 AY(m)},rawResponse:Pc(m)}}}catch(m){if((l=p.abortSignal)!=null&&l.aborted){if(a.isError()){let u={method:p.method,url:yt(i)};a.error("HTTP request was aborted",u);}return {ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:kc}}else if(m instanceof Error&&m.name==="AbortError"){if(a.isError()){let u={method:p.method,url:yt(i),timeoutMs:p.timeoutMs};a.error("HTTP request timed out",u);}return {ok:false,error:{reason:"timeout"},rawResponse:kc}}else if(m instanceof Error){if(a.isError()){let u={method:p.method,url:yt(i),errorMessage:m.message};a.error("HTTP request failed with error",u);}return {ok:false,error:{reason:"unknown",errorMessage:m.message},rawResponse:Ac}}if(a.isError()){let u={method:p.method,url:yt(i),error:Xe(m)};a.error("HTTP request failed with unknown error",u);}return {ok:false,error:{reason:"unknown",errorMessage:Xe(m)},rawResponse:Ac}}}var fpe,$h,S,BY=n(()=>{Lr();wc();wY();Lh();PY();SY();TY();Hh();Oh();UY();Kh();FY();fpe=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"]);$h=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=bpe;});var MY=n(()=>{});var P,WY=n(()=>{P=class p extends Promise{constructor(i){super(r=>{r(void 0);}),this.innerPromise=i;}static fromFunction(i,...r){return new p(i(...r))}static interceptFunction(i){return (...r)=>p.fromPromise(i(...r))}static fromPromise(i){return new p(i)}static fromExecutor(i){let r=new Promise(i);return new p(r)}static fromResult(i){let r=Promise.resolve(i);return new p(r)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:i})=>i)),this.unwrappedPromise}then(i,r){return this.unwrap().then(i,r)}catch(i){return this.unwrap().catch(i)}finally(i){return this.unwrap().finally(i)}async withRawResponse(){return await this.innerPromise}};});var x,VY=n(()=>{x={get:async p=>typeof p=="function"?p():p};});var LY=n(()=>{Lh();BY();MY();WY();Kh();VY();});async function Rpe(p){let{data:i,filename:r,contentLength:t,contentType:o}=await Xh(p),a={body:i,headers:{}};return r&&(a.headers["Content-Disposition"]=`attachment; filename="${r}"`),o&&(a.headers["Content-Type"]=o),t!=null&&(a.headers["Content-Length"]=t.toString()),a}async function Yh(p){let{data:i,filename:r,contentType:t}=await Xh(p,{noSniffFileSize:true});return {data:i,filename:r,contentType:t}}async function Xh(p,{noSniffFileSize:i}={}){var r,t,o,a,s;if(xpe(p))return Xh({data:p},{noSniffFileSize:i});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=(r=p.contentLength)!=null?r:i===true?void 0:await JY(p.path),u=(t=p.filename)!=null?t:GY(p.path);return {data:l,filename:u,contentType:p.contentType,contentLength:m}}if("data"in p){let c=p.data,l=(o=p.contentLength)!=null?o:await _pe(c,{noSniffFileSize:i}),m=(a=p.filename)!=null?a:wpe(c);return {data:c,filename:m,contentType:(s=p.contentType)!=null?s:kpe(c),contentLength:l}}throw new Error(`Invalid FileUpload of type ${typeof p}: ${JSON.stringify(p)}`)}function xpe(p){return OY(p)||KY(p)||QY(p)||Spe(p)||Zh(p)||qh(p)||Ppe(p)||zpe(p)}async function JY(p){try{let i=await import('fs');return !i||!i.promises||!i.promises.stat?void 0:(await i.promises.stat(p)).size}catch{return}}function wpe(p){if(Ape(p))return p.name;if(HY(p))return GY(p.path.toString())}async function _pe(p,{noSniffFileSize:i}={}){if(OY(p))return p.length;if(KY(p)||QY(p))return p.byteLength;if(Zh(p)||qh(p))return p.size;if(i!==true&&HY(p))return await JY(p.path.toString())}function kpe(p){if(Zh(p)||qh(p))return p.type}function GY(p){let i=p.lastIndexOf("/"),r=p.lastIndexOf("\\"),t=Math.max(i,r);return t>=0?p.substring(t+1):p}function Ape(p){return typeof p=="object"&&p!=null&&"name"in p}function HY(p){return typeof p=="object"&&p!=null&&"path"in p}function Ppe(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function zpe(p){return typeof p=="object"&&p!=null&&"getReader"in p}function OY(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function KY(p){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(p)}function QY(p){return typeof ArrayBuffer!="undefined"&&p instanceof ArrayBuffer}function Spe(p){return typeof Uint8Array!="undefined"&&p instanceof Uint8Array}function Zh(p){return typeof Blob!="undefined"&&p instanceof Blob}function qh(p){return typeof File!="undefined"&&p instanceof File}var $Y=n(()=>{});var YY=n(()=>{});var ko={};L(ko,{toBinaryUploadRequest:()=>Rpe,toMultipartDataPart:()=>Yh});var ey=n(()=>{$Y();YY();});var XY=n(()=>{_o();});function vpe(){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 mi,ZY=n(()=>{mi=vpe();});var ry=n(()=>{ZY();});async function iy(){return new ty}function Tpe(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function qY(p){return typeof p=="object"&&p!=null&&"getReader"in p}function jpe(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function Cpe(p){return ArrayBuffer.isView(p)}async function Epe(p){if(mi.type==="node"){let{Readable:i}=await import('stream');if(p instanceof i){let r=[];for await(let t of p)r.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(r)}}if(qY(p)){let i=p.getReader(),r=[];try{for(;;){let{done:s,value:c}=await i.read();if(s)break;r.push(c);}}finally{i.releaseLock();}let t=r.reduce((s,c)=>s+c.length,0),o=new Uint8Array(t),a=0;for(let s of r)o.set(s,a),a+=s.length;return Buffer.from(o)}throw new Error(`Unsupported stream type: ${typeof p}. Expected Node.js Readable stream or Web ReadableStream.`)}async function Ipe(p,i){if(Tpe(p)||qY(p)){let r=await Epe(p);return new Blob([r],{type:i})}return p instanceof Blob?p:jpe(p)?new Blob([p],{type:i}):p instanceof ArrayBuffer?new Blob([p],{type:i}):Cpe(p)?new Blob([p],{type:i}):typeof p=="string"?new Blob([p],{type:i}):typeof p=="object"&&p!==null?new Blob([Xe(p)],{type:i!=null?i:"application/json"}):new Blob([String(p)],{type:i})}var ty,e9=n(()=>{ey();Lr();ry();ty=class{constructor(){this.fd=new FormData;}async setup(){}append(i,r){this.fd.append(i,String(r));}async appendFile(i,r){let{data:t,filename:o,contentType:a}=await Yh(r),s=await Ipe(t,a);o?this.fd.append(i,s,o):this.fd.append(i,s);}getRequest(){return {body:this.fd,headers:{},duplex:"half"}}};});var r9=n(()=>{XY();e9();});var Ao={};L(Ao,{ConsoleLogger:()=>ft,LogLevel:()=>He,Logger:()=>li,createLogger:()=>Jh});var t9=n(()=>{wc();});var re,be=n(()=>{re={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 ce(p,i){return `Expected ${i}. Received ${Dpe(p)}.`}function Dpe(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 ve=n(()=>{});function Re(p){return {...p,json:i9(p.json),parse:i9(p.parse)}}function i9(p){return (i,r)=>{let t=p(i,r),{skipValidation:o=false}=r!=null?r:{};return !t.ok&&o?(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:i}):t}}var gr=n(()=>{});function zc(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var oy=n(()=>{});var di,ay=n(()=>{oy();di=class p extends Error{constructor(r){super(r.map(zc).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});var ui,ny=n(()=>{oy();ui=class p extends Error{constructor(r){super(r.map(zc).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});function le(p){return {nullable:()=>Upe(p),optional:()=>sy(p),optionalNullable:()=>Npe(p),transform:i=>py(p,i),parseOrThrow:(i,r)=>{let t=p.parse(i,r);if(t.ok)return t.value;throw new ui(t.errors)},jsonOrThrow:(i,r)=>{let t=p.json(i,r);if(t.ok)return t.value;throw new di(t.errors)}}}function Upe(p){let i={parse:(r,t)=>r==null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r==null?{ok:true,value:null}:p.json(r,t),getType:()=>re.NULLABLE};return {...i,...le(i)}}function sy(p){let i={parse:(r,t)=>r==null?{ok:true,value:void 0}:p.parse(r,t),json:(r,t)=>t!=null&&t.omitUndefined&&r===void 0?{ok:true,value:void 0}:r==null?{ok:true,value:null}:p.json(r,t),getType:()=>re.OPTIONAL};return {...i,...le(i)}}function Npe(p){let i={parse:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.json(r,t),getType:()=>re.OPTIONAL_NULLABLE};return {...i,...le(i)}}function py(p,i){let r={parse:(t,o)=>{let a=p.parse(t,o);return a.ok?{ok:true,value:i.transform(a.value)}:a},json:(t,o)=>{let a=i.untransform(t);return p.json(a,o)},getType:()=>p.getType()};return {...r,...le(r)}}var o9=n(()=>{be();ay();ny();});var Ne=n(()=>{o9();ay();ny();});function a9(){let p={parse:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i=="bigint"?{ok:true,value:i}:typeof i=="number"?{ok:true,value:BigInt(i)}:{ok:false,errors:[{path:r,message:ce(i,"bigint | number")}]},json:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i!="bigint"?{ok:false,errors:[{path:r,message:ce(i,"bigint")}]}:{ok:true,value:i},getType:()=>re.BIGINT};return {...Re(p),...le(p)}}var n9=n(()=>{be();ve();gr();Ne();});var s9=n(()=>{n9();});function p9(){let p={parse:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i!="string"?{ok:false,errors:[{path:r,message:ce(i,"string")}]}:Fpe.test(i)?{ok:true,value:new Date(i)}:{ok:false,errors:[{path:r,message:ce(i,"ISO 8601 date string")}]},json:(i,{breadcrumbsPrefix:r=[]}={})=>i instanceof Date?{ok:true,value:i.toISOString()}:{ok:false,errors:[{path:r,message:ce(i,"Date object")}]},getType:()=>re.DATE};return {...Re(p),...le(p)}}var Fpe,c9=n(()=>{be();ve();gr();Ne();Fpe=/^([+-]?\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 l9=n(()=>{c9();});function xe(p,i){return ()=>{let r={parse:i,json:i,getType:()=>p};return {...Re(r),...le(r)}}}var fr=n(()=>{Ne();gr();});function Sc(p){let i=new Set(p);return xe(re.ENUM,(t,{allowUnrecognizedEnumValues:o,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:ce(t,"string")}]}:!i.has(t)&&!o?{ok:false,errors:[{path:a,message:ce(t,"enum")}]}:{ok:true,value:t})()}var m9=n(()=>{be();fr();ve();});var cy=n(()=>{m9();});function d9(p){let i=ly(p);return {...i,...le(i)}}function ly(p){return {parse:(i,r)=>gi(p).parse(i,r),json:(i,r)=>gi(p).json(i,r),getType:()=>gi(p).getType()}}function gi(p){let i=p;return i.__zurg_memoized==null&&(i.__zurg_memoized=p()),i.__zurg_memoized}var my=n(()=>{Ne();});function Po(p){return Object.entries(p)}var dy=n(()=>{});function zo(p,i){let r=new Set(i);return Object.entries(p).reduce((t,[o,a])=>(r.has(o)&&(t[o]=a),t),{})}var uy=n(()=>{});function kr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let i=p;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(p)===i}var So=n(()=>{});function vo(p){return Object.keys(p)}var gy=n(()=>{});function u9(p,i){let r=[],t=[];for(let o of p)i(o)?r.push(o):t.push(o);return [r,t]}var g9=n(()=>{});function rr(p){return {withParsedProperties:i=>fy(p,i)}}function fy(p,i){let r={parse:(t,o)=>{let a=p.parse(t,o);if(!a.ok)return a;let s=Object.entries(i).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,o)=>{var c;if(!kr(t))return {ok:false,errors:[{path:(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],message:ce(t,"object")}]};let a=new Set(Object.keys(i)),s=zo(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,o)},getType:()=>p.getType()};return {...r,...le(r),...rr(r)}}var f9=n(()=>{uy();ve();So();Ne();});var To=n(()=>{f9();});function h9(p,i){return {rawKey:p,valueSchema:i,isProperty:true}}function Hr(p){return p.isProperty}var hy=n(()=>{});function vc(p){let i={_getRawProperties:()=>Object.entries(p).map(([r,t])=>Hr(t)?t.rawKey:r),_getParsedProperties:()=>vo(p),parse:(r,t)=>{let o={},a=[];for(let[s,c]of Po(p)){let l=Hr(c)?c.rawKey:s,m=Hr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};o[l]=u,R9(m)&&a.push(l);}return y9({value:r,requiredKeys:a,getProperty:s=>{let c=o[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:(r,t)=>{let o=[];for(let[a,s]of Po(p)){let c=Hr(s)?s.valueSchema:s;R9(c)&&o.push(a);}return y9({value:r,requiredKeys:o,getProperty:a=>{let s=p[a];if(s!=null)return Hr(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:()=>re.OBJECT};return {...Re(i),...le(i),...rr(i),...bt(i)}}function y9({value:p,requiredKeys:i,getProperty:r,unrecognizedObjectKeys:t="fail",skipValidation:o=false,breadcrumbsPrefix:a=[]}){if(!kr(p))return {ok:false,errors:[{path:a,message:ce(p,"object")}]};let s=new Set(i),c=[],l={};for(let[m,u]of Object.entries(p)){let d=r(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(...i.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||o?{ok:true,value:l}:{ok:false,errors:c}}function bt(p){return {extend:i=>{let r={_getParsedProperties:()=>[...p._getParsedProperties(),...i._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...i._getRawProperties()],parse:(t,o)=>b9({extensionKeys:i._getRawProperties(),value:t,transformBase:a=>p.parse(a,o),transformExtension:a=>i.parse(a,o),breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),json:(t,o)=>b9({extensionKeys:i._getParsedProperties(),value:t,transformBase:a=>p.json(a,o),transformExtension:a=>i.json(a,o),breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),getType:()=>re.OBJECT};return {...r,...le(r),...rr(r),...bt(r)}},passthrough:()=>{let i=new Set(p._getRawProperties()),r=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(o,a)=>{let s=p.parse(o,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof o=="object"&&o!=null)for(let[l,m]of Object.entries(o))i.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(o,a)=>{let s=p.json(o,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof o=="object"&&o!=null)for(let[l,m]of Object.entries(o))r.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>re.OBJECT};return {...t,...le(t),...rr(t),...bt(t)}}}}function b9({extensionKeys:p,value:i,transformBase:r,transformExtension:t,breadcrumbsPrefix:o=[]}){if(!kr(i))return {ok:false,errors:[{path:o,message:ce(i,"object")}]};let a=new Set(p),[s,c]=u9(vo(i),u=>a.has(u)),l=r(zo(i,c)),m=t(zo(i,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 R9(p){return !Bpe(p)}function Bpe(p){switch(p.getType()){case re.ANY:case re.UNKNOWN:case re.OPTIONAL:case re.OPTIONAL_NULLABLE:return true;default:return false}}var yy=n(()=>{be();dy();uy();ve();So();gy();gr();g9();To();Ne();hy();});function x9(p){return vc(p)}var w9=n(()=>{yy();});var by=n(()=>{yy();w9();hy();});function _9(p){let i={...ly(p),_getRawProperties:()=>gi(p)._getRawProperties(),_getParsedProperties:()=>gi(p)._getParsedProperties()};return {...i,...le(i),...rr(i),...bt(i)}}var k9=n(()=>{by();To();Ne();my();});var A9=n(()=>{my();k9();});function Tc(p){let i={parse:(r,t)=>P9(r,(o,a)=>{var s;return p.parse(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(r,t)=>P9(r,(o,a)=>{var s;return p.json(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>re.LIST};return {...Re(i),...le(i)}}function P9(p,i){return Array.isArray(p)?p.map((t,o)=>i(t,o)).reduce((t,o)=>{if(t.ok&&o.ok)return {ok:true,value:[...t.value,o.value]};let a=[];return t.ok||a.push(...t.errors),o.ok||a.push(...o.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:ce(p,"list"),path:[]}]}}var z9=n(()=>{be();ve();gr();Ne();});var Ry=n(()=>{z9();});function S9(p){return xe(re.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`${p.toString()}`)}]})()}var v9=n(()=>{be();fr();ve();});function T9(p){return xe(re.STRING_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`"${p}"`)}]})()}var j9=n(()=>{be();fr();ve();});var C9=n(()=>{v9();j9();});var E9,I9=n(()=>{be();fr();E9=xe(re.ANY,p=>({ok:true,value:p}));});var D9,U9=n(()=>{be();fr();ve();D9=xe(re.BOOLEAN,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"boolean")}]});});var N9,F9=n(()=>{be();fr();N9=xe(re.NEVER,(p,{breadcrumbsPrefix:i=[]}={})=>({ok:false,errors:[{path:i,message:"Expected never"}]}));});var B9,M9=n(()=>{be();fr();ve();B9=xe(re.NUMBER,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"number")}]});});var W9,V9=n(()=>{be();fr();ve();W9=xe(re.STRING,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"string")}]});});var L9,J9=n(()=>{be();fr();L9=xe(re.UNKNOWN,p=>({ok:true,value:p}));});var G9=n(()=>{I9();U9();F9();M9();V9();J9();});function O9(p,i){let r={parse:(t,o)=>H9({value:t,isKeyNumeric:p.getType()===re.NUMBER,transformKey:a=>{var s;return p.parse(a,{...o,breadcrumbsPrefix:[...(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return i.parse(a,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),json:(t,o)=>H9({value:t,isKeyNumeric:p.getType()===re.NUMBER,transformKey:a=>{var s;return p.json(a,{...o,breadcrumbsPrefix:[...(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return i.json(a,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),getType:()=>re.RECORD};return {...Re(r),...le(r)}}function H9({value:p,isKeyNumeric:i,transformKey:r,transformValue:t,breadcrumbsPrefix:o=[]}){return kr(p)?Po(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(i){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=r(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:o,message:ce(p,"object")}]}}var K9=n(()=>{be();dy();ve();So();gr();Ne();});var Q9=n(()=>{K9();});function $9(p){let i=Tc(p),r={parse:(t,o)=>{let a=i.parse(t,o);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,o)=>{var s;return t instanceof Set?i.json([...t],o):{ok:false,errors:[{path:(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],message:ce(t,"Set")}]}},getType:()=>re.SET};return {...Re(r),...le(r)}}var Y9=n(()=>{be();ve();gr();Ry();Ne();});var X9=n(()=>{Y9();});function q9(p){let i={parse:(r,t)=>Z9((o,a)=>o.parse(r,a),p,t),json:(r,t)=>Z9((o,a)=>o.json(r,a),p,t),getType:()=>re.UNDISCRIMINATED_UNION};return {...Re(i),...le(i)}}function Z9(p,i,r){let t=[];for(let[o,a]of i.entries()){let s=p(a,{...r,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${o}] ${c.message}`});}return {ok:false,errors:t}}var eX=n(()=>{be();gr();Ne();});var rX=n(()=>{eX();});function tX(p,i){return {parsedDiscriminant:p,rawDiscriminant:i}}var iX=n(()=>{});function aX(p,i){let r=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,o=Sc(vo(i)),a={parse:(s,c)=>oX({value:s,discriminant:r,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return o.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],r]})},getAdditionalPropertiesSchema:l=>i[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)=>oX({value:s,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:l=>{var m;return o.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>i[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>re.UNION};return {...Re(a),...le(a),...rr(a)}}function oX({value:p,discriminant:i,transformedDiscriminant:r,transformDiscriminantValue:t,getAdditionalPropertiesSchema:o,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!kr(p))return {ok:false,errors:[{path:c,message:ce(p,"object")}]};let{[i]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${i}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=o(u.value);if(d==null)return a?{ok:true,value:{[r]:u.value,...m}}:{ok:false,errors:[{path:[...c,i],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[r]:l,...f.value}}:f}var nX=n(()=>{be();ve();So();gy();gr();cy();To();Ne();});var sX=n(()=>{iX();nX();});var pX=n(()=>{s9();l9();cy();A9();Ry();C9();by();To();G9();Q9();Ne();X9();rX();sX();});var e={};L(e,{JsonError:()=>di,ParseError:()=>ui,any:()=>E9,bigint:()=>a9,boolean:()=>D9,booleanLiteral:()=>S9,date:()=>p9,discriminant:()=>tX,enum_:()=>Sc,getObjectLikeUtils:()=>rr,getObjectUtils:()=>bt,getSchemaUtils:()=>le,isProperty:()=>Hr,lazy:()=>d9,lazyObject:()=>_9,list:()=>Tc,never:()=>N9,number:()=>B9,object:()=>vc,objectWithoutOptionalProperties:()=>x9,optional:()=>sy,property:()=>h9,record:()=>O9,set:()=>$9,string:()=>W9,stringLiteral:()=>T9,transform:()=>py,undiscriminatedUnion:()=>q9,union:()=>aX,unknown:()=>L9,withParsedProperties:()=>fy});var cX=n(()=>{pX();});function lX(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 mX=n(()=>{});function uX(p,...i){if(!p)return "";if(i.length===0)return p;if(p.includes("://")){let r;try{r=new URL(p);}catch{return dX(p,...i)}let t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=fX(a);s&&(r.pathname=gX(r.pathname,s));}return o&&!r.pathname.endsWith("/")&&(r.pathname+="/"),r.toString()}return dX(p,...i)}function dX(p,...i){if(i.length===0)return p;let r=p,t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=fX(a);s&&(r=gX(r,s));}return o&&!r.endsWith("/")&&(r+="/"),r}function gX(p,i){return p.endsWith("/")?p+i:`${p}/${i}`}function fX(p){if(!p)return p;let i=0,r=p.length;return p.startsWith("/")&&(i=1),p.endsWith("/")&&(r=p.length-1),i===0&&r===p.length?p:p.slice(i,r)}var hX=n(()=>{});var _={};L(_,{encodePathParam:()=>lX,join:()=>uX,toQueryString:()=>ht});var yX=n(()=>{mX();hX();_o();});var b=n(()=>{LY();ey();r9();t9();ry();cX();yX();});function B(p){let i=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":mi.type,"X-Fern-Runtime-Version":mi.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:Ao.createLogger(p==null?void 0:p.logging),headers:i}}var Z=n(()=>{Q();b();});var v,$=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,i,r,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:i});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:i});case "timeout":throw new Jr(`Timeout exceeded when calling ${r} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:i});default:throw new k({message:"Unknown error",rawResponse:i})}}var q=n(()=>{J();});var jo,bX=n(()=>{b();jo=e.object({blueprintName:e.property("blueprint_name",e.string())});});var xy,wy=n(()=>{b();xy=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),envName:e.property("env_name",e.string()),blueprintId:e.property("blueprint_id",e.string()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),endedAt:e.property("ended_at",e.date().optional())});});var Co,RX=n(()=>{b();wy();Co=e.object({projectId:e.property("project_id",e.string()),envs:e.list(xy)});});var Eo,xX=n(()=>{b();Eo=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),keys:e.list(e.string())});});var _y=n(()=>{bX();RX();xX();});var wX=n(()=>{_y();});var jc={};L(jc,{AgentConfigEnvSetByName:()=>jo,AgentConfigEnvUpdate:()=>Co,AgentConfigRemoveValues:()=>Eo});var _X=n(()=>{wX();});var Cc,ky=n(()=>{b();Cc=e.enum_(["open","resolved","closed"]);});var Io,kX=n(()=>{b();ky();Io=e.object({projectId:e.property("project_id",e.string()),status:Cc,closeNote:e.property("close_note",e.string().optional())});});var V,ne=n(()=>{b();V=e.record(e.string(),e.unknown());});var Ay,Py=n(()=>{b();Ay=e.enum_(["critical","high","medium","low"]);});var zy,Sy=n(()=>{b();ne();Py();zy=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),tracesQuery:e.property("traces_query",e.string().optional()),severity:Ay,count:e.number(),totalCount:e.property("total_count",e.number()),usersImpacted:e.property("users_impacted",e.number()),totalUsers:e.property("total_users",e.number()),metadata:V.optional()});});var Do,AX=n(()=>{b();Sy();Do=e.object({projectId:e.property("project_id",e.string()),reportDay:e.property("report_day",e.string()),issues:e.list(zy)});});var vy=n(()=>{kX();AX();});var PX=n(()=>{vy();});var Ec,zX=n(()=>{b();Ec=e.enum_(["critical","high","medium","low"]);});var Ic,SX=n(()=>{b();Ic=e.enum_(["open","resolved","closed"]);});var Ty=n(()=>{ky();zX();SX();});var Dc={};L(Dc,{AgentInsightsIssueUpdate:()=>Io,AgentInsightsIssueUpdateStatus:()=>Cc,AgentInsightsReport:()=>Do,FindAgentInsightsIssuesRequestSeverity:()=>Ec,FindAgentInsightsIssuesRequestStatus:()=>Ic});var vX=n(()=>{PX();Ty();});var Uo,TX=n(()=>{b();Uo=e.object({enrolled:e.boolean(),projectIds:e.property("project_ids",e.list(e.string()))});});var jy=n(()=>{TX();});var jX=n(()=>{jy();});var Uc={};L(Uc,{Request:()=>Uo});var CX=n(()=>{jX();});var No,EX=n(()=>{b();No=e.object({guidance:e.string()});});var Nc,Cy=n(()=>{b();Nc=e.enum_(["enabled","disabled"]);});var Fo,IX=n(()=>{b();Cy();Fo=e.object({status:Nc});});var Ey=n(()=>{EX();IX();});var DX=n(()=>{Ey();});var Iy=n(()=>{Cy();});var Fc={};L(Fc,{AgentInsightsGuidanceUpdate:()=>No,AgentInsightsJobUpdate:()=>Fo,AgentInsightsJobUpdateStatus:()=>Nc});var UX=n(()=>{DX();Iy();});var Bc,NX=n(()=>{b();Bc=e.enum_(["general","slack","pagerduty"]);});var Dy=n(()=>{NX();});var Mc={};L(Mc,{GetWebhookExamplesRequestAlertType:()=>Bc});var FX=n(()=>{Dy();});var Uy,Ny=n(()=>{b();Uy=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var Fy,By=n(()=>{b();Fy=e.enum_([">","<","="]);});var My,Wy=n(()=>{b();By();My=e.object({scoreName:e.property("score_name",e.string()),operator:Fy,value:e.number()});});var Vy,Ly=n(()=>{b();Wy();Vy=e.object({conditions:e.list(My)});});var Jy,Gy=n(()=>{b();Ly();Jy=e.object({groups:e.list(Vy)});});var Hy,Oy=n(()=>{b();Gy();Hy=e.object({enabled:e.boolean().optional(),conditions:Jy.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var Ky,Qy=n(()=>{b();Ky=e.enum_(["trace","thread"]);});var Bo,$y=n(()=>{b();Ny();Oy();Qy();Bo=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:Ky,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Hy.optional(),annotatorView:e.property("annotator_view",Uy.optional())});});var Mo,BX=n(()=>{b();$y();Mo=e.object({annotationQueues:e.property("annotation_queues",e.list(Bo))});});var Wo,MX=n(()=>{b();Wo=e.object({ids:e.list(e.string())});});var Vo,Wc=n(()=>{b();Vo=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var Yy,Xy=n(()=>{b();Yy=e.enum_([">","<","="]);});var Zy,qy=n(()=>{b();Xy();Zy=e.object({scoreName:e.property("score_name",e.string()),operator:Yy,value:e.number()});});var eb,rb=n(()=>{b();qy();eb=e.object({conditions:e.list(Zy)});});var tb,ib=n(()=>{b();rb();tb=e.object({groups:e.list(eb)});});var Lo,Vc=n(()=>{b();ib();Lo=e.object({enabled:e.boolean().optional(),conditions:tb.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var Jo,WX=n(()=>{b();Wc();Vc();Jo=e.object({name:e.string().optional(),description:e.string().optional(),instructions:e.string().optional(),commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Lo.optional(),annotatorView:e.property("annotator_view",Vo.optional())});});var ob=n(()=>{BX();MX();WX();});var VX=n(()=>{ob();});var Lc={};L(Lc,{AnnotationQueueBatchWrite:()=>Mo,AnnotationQueueItemIdsPublic:()=>Wo,AnnotationQueueUpdate:()=>Jo});var LX=n(()=>{VX();});var ab,nb=n(()=>{b();ab=e.enum_(["ui","sdk","online_scoring"]);});var sb,pb=n(()=>{b();sb=e.enum_(["passed","failed"]);});var cb,lb=n(()=>{b();nb();pb();cb=e.object({entityId:e.property("entity_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),status:sb,reason:e.string().optional(),source:ab});});var Jc,mb=n(()=>{b();Jc=e.enum_(["TRACE","SPAN","THREAD"]);});var Go,JX=n(()=>{b();lb();mb();Go=e.object({entityType:e.property("entity_type",Jc),assertionResults:e.property("assertion_results",e.list(cb))});});var db=n(()=>{JX();});var GX=n(()=>{db();});var ub=n(()=>{mb();});var Gc={};L(Gc,{AssertionResultBatch:()=>Go,AssertionResultBatchEntityType:()=>Jc});var HX=n(()=>{GX();ub();});var Hc,gb=n(()=>{b();Hc=e.enum_(["trace","span"]);});var Ho,OX=n(()=>{b();gb();Ho=e.object({fileName:e.property("file_name",e.string()),numOfFileParts:e.property("num_of_file_parts",e.number()),mimeType:e.property("mime_type",e.string().optional()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",Hc),entityId:e.property("entity_id",e.string()),path:e.string()});});var fb=n(()=>{OX();});var Oc={};L(Oc,{Request:()=>Mpe});var Mpe,KX=n(()=>{b();Mpe=e.record(e.string(),e.unknown());});var QX=n(()=>{fb();KX();});var Kc,$X=n(()=>{b();Kc=e.enum_(["trace","span"]);});var Qc,YX=n(()=>{b();Qc=e.enum_(["trace","span"]);});var $c,XX=n(()=>{b();$c=e.enum_(["trace","span"]);});var hb=n(()=>{$X();YX();gb();XX();});var fi={};L(fi,{AttachmentListRequestEntityType:()=>Kc,DownloadAttachmentRequestEntityType:()=>Qc,StartMultipartUploadRequest:()=>Ho,StartMultipartUploadRequestEntityType:()=>Hc,UploadAttachmentRequestEntityType:()=>$c,uploadAttachment:()=>Oc});var ZX=n(()=>{QX();hb();});var Oo,Yc=n(()=>{b();Oo=e.object({name:e.string().optional(),description:e.string().optional(),strict:e.boolean().optional(),parameters:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var Ar,hi=n(()=>{b();Ar=e.object({name:e.string().optional(),arguments:e.string().optional()});});var Ko,Xc=n(()=>{b();ne();Ko=e.object({role:e.string(),content:V});});var yb,bb=n(()=>{b();yb=e.object({mode:e.string().optional(),ttl:e.string().optional()});});var Rb,xb=n(()=>{b();Rb=e.object({name:e.string().optional(),strict:e.boolean().optional(),schema:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var wb,_b=n(()=>{b();wb=e.enum_(["text","json_object","json_schema"]);});var kb,Ab=n(()=>{b();xb();_b();kb=e.object({type:wb.optional(),jsonSchema:Rb.optional()});});var Pb,zb=n(()=>{b();Pb=e.object({includeUsage:e.boolean().optional()});});var Sb,vb=n(()=>{b();Sb=e.enum_(["function"]);});var Tb,jb=n(()=>{b();Yc();vb();Tb=e.object({type:Sb.optional(),function:Oo.optional()});});var Qo,qX=n(()=>{b();Yc();hi();Xc();bb();Ab();zb();jb();Qo=e.object({model:e.string().optional(),messages:e.list(Ko).optional(),temperature:e.number().optional(),topP:e.number().optional(),n:e.number().optional(),stream:e.boolean().optional(),streamOptions:Pb.optional(),stop:e.list(e.string()).optional(),maxTokens:e.number().optional(),maxCompletionTokens:e.number().optional(),presencePenalty:e.number().optional(),frequencyPenalty:e.number().optional(),logitBias:e.record(e.string(),e.number()).optional(),user:e.string().optional(),responseFormat:kb.optional(),seed:e.number().optional(),tools:e.list(Tb).optional(),toolChoice:e.record(e.string(),e.unknown()).optional(),parallelToolCalls:e.boolean().optional(),store:e.boolean().optional(),metadata:e.record(e.string(),e.string()).optional(),reasoningEffort:e.string().optional(),serviceTier:e.string().optional(),promptCacheKey:e.string().optional(),promptCacheOptions:yb.optional(),logprobs:e.boolean().optional(),topLogprobs:e.number().optional(),functions:e.list(Oo).optional(),functionCall:Ar.optional()});});var Cb=n(()=>{qX();});var e5=n(()=>{Cb();});var Zc={};L(Zc,{ChatCompletionRequest:()=>Qo});var r5=n(()=>{e5();});var Eb,Ib=n(()=>{b();Eb=e.enum_(["llm_judge","code_metric"]);});var Pr,yi=n(()=>{b();Ib();ne();Pr=e.object({name:e.string(),type:Eb,config:V});});var tr,Rt=n(()=>{b();tr=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var Db,Ub=n(()=>{b();Db=e.object({includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var $o,t5=n(()=>{b();yi();Rt();Ub();$o=e.object({spanIds:e.property("span_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",Db),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var Nb,Fb=n(()=>{b();Nb=e.object({includeSpans:e.boolean().optional(),includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var Yo,i5=n(()=>{b();yi();Rt();Fb();Yo=e.object({traceIds:e.property("trace_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",Nb),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var Xo,o5=n(()=>{b();Xo=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var Zo,a5=n(()=>{b();Zo=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),projectName:e.property("project_name",e.string().optional()),datasetVersions:e.property("dataset_versions",e.list(e.string()).optional()),filters:e.string().optional(),limit:e.number().optional(),lastRetrievedExperimentId:e.property("last_retrieved_experiment_id",e.string().optional()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional()});});var qo,n5=n(()=>{b();qo=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var ea,s5=n(()=>{b();ea=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var Bb,Mb=n(()=>{b();Bb=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ra,qc=n(()=>{b();Mb();ra=e.object({field:e.string().optional(),operator:Bb.optional(),key:e.string().optional(),value:e.string().optional()});});var Wb,Vb=n(()=>{b();yi();Rt();ne();Wb=e.object({input:e.string().optional(),expectedOutput:e.property("expected_output",e.string().optional()),metadata:V.optional(),data:V.optional(),description:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),clearExecutionPolicy:e.property("clear_execution_policy",e.boolean().optional())});});var ta,p5=n(()=>{b();qc();Vb();ta=e.object({ids:e.list(e.string()).optional(),filters:e.list(ra).optional(),datasetId:e.property("dataset_id",e.string().optional()),update:Wb,mergeTags:e.property("merge_tags",e.boolean().optional())});});var Lb,Jb=n(()=>{b();Lb=e.enum_(["manual","trace","span","sdk"]);});var Gb,Hb=n(()=>{b();Gb=e.enum_(["llm_judge","code_metric"]);});var Te,zr=n(()=>{b();Te=e.record(e.string(),e.unknown());});var Ob,Kb=n(()=>{b();Hb();zr();Ob=e.object({name:e.string(),type:Gb,config:Te});});var Qb,$b=n(()=>{b();Qb=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var ia,Yb=n(()=>{b();Jb();Kb();$b();ne();ia=e.object({id:e.string().optional(),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:Lb,data:V,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Ob).optional(),executionPolicy:e.property("execution_policy",Qb.optional())});});var oa,c5=n(()=>{b();Yb();oa=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(ia),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var aa,l5=n(()=>{b();aa=e.object({datasetName:e.property("dataset_name",e.string()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),steamLimit:e.property("steam_limit",e.number().optional()),datasetVersion:e.property("dataset_version",e.string().optional()),projectName:e.property("project_name",e.string().optional()),filters:e.string().optional()});});var na,m5=n(()=>{b();qc();na=e.object({itemIds:e.property("item_ids",e.list(e.string()).optional()),datasetId:e.property("dataset_id",e.string().optional()),filters:e.list(ra).optional(),batchGroupId:e.property("batch_group_id",e.string().optional())});});var el,Xb=n(()=>{b();el=e.enum_(["private","public"]);});var sa,d5=n(()=>{b();Xb();sa=e.object({name:e.string(),description:e.string().optional(),visibility:el.optional(),tags:e.list(e.string()).optional()});});var pa,u5=n(()=>{b();pa=e.object({versionRef:e.property("version_ref",e.string())});});var ca,g5=n(()=>{b();ca=e.object({versionName:e.property("version_name",e.string())});});var la,f5=n(()=>{b();la=e.object({tag:e.string()});});var ma,h5=n(()=>{b();ma=e.object({changeDescription:e.property("change_description",e.string().optional()),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional())});});var rl,Zb=n(()=>{b();rl=e.enum_(["dataset","evaluation_suite"]);});var tl,qb=n(()=>{b();tl=e.enum_(["private","public"]);});var da,y5=n(()=>{b();Zb();qb();da=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:rl.optional(),visibility:tl.optional(),tags:e.list(e.string()).optional(),description:e.string().optional()});});var eR=n(()=>{t5();i5();o5();a5();n5();s5();p5();c5();l5();m5();d5();u5();g5();f5();h5();y5();});var rR,tR=n(()=>{b();rR=e.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var bi,iR=n(()=>{b();tR();bi=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),status:rR.optional(),filePath:e.property("file_path",e.string().optional()),errorMessage:e.property("error_message",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional()),viewedAt:e.property("viewed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var il={};L(il,{Response:()=>Wpe});var Wpe,b5=n(()=>{b();iR();Wpe=e.list(bi);});var R5=n(()=>{b5();eR();});var ol,x5=n(()=>{b();ol=e.enum_(["json","jsonl"]);});var oR=n(()=>{x5();Xb();Zb();qb();});var Ri={};L(Ri,{CreateDatasetItemsFromJsonRequestFormat:()=>ol,CreateDatasetItemsFromSpansRequest:()=>$o,CreateDatasetItemsFromTracesRequest:()=>Yo,DatasetExpansionWrite:()=>Xo,DatasetExperimentItemStreamRequest:()=>Zo,DatasetIdentifier:()=>qo,DatasetIdentifierPublic:()=>ea,DatasetItemBatchUpdate:()=>ta,DatasetItemBatchWrite:()=>oa,DatasetItemStreamRequest:()=>aa,DatasetItemsDelete:()=>na,DatasetUpdate:()=>sa,DatasetUpdateVisibility:()=>el,DatasetVersionRestorePublic:()=>pa,DatasetVersionRetrieveRequestPublic:()=>ca,DatasetVersionTag:()=>la,DatasetVersionUpdatePublic:()=>ma,DatasetWrite:()=>da,DatasetWriteType:()=>rl,DatasetWriteVisibility:()=>tl,getDatasetExportJobs:()=>il});var w5=n(()=>{R5();oR();});var ua,_5=n(()=>{b();ua=e.object({name:e.string().optional(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var ga,k5=n(()=>{b();ga=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var aR=n(()=>{_5();k5();});var A5=n(()=>{aR();});var al={};L(al,{EnvironmentUpdate:()=>ua,EnvironmentWrite:()=>ga});var P5=n(()=>{A5();});var fa,nl=n(()=>{b();fa=e.object({name:e.string(),value:e.number()});});var nR,sR=n(()=>{b();nR=e.enum_(["running","completed","cancelled","failed"]);});var pR,cR=n(()=>{b();pR=e.enum_(["regular","trial","mini-batch","mutation"]);});var ha,lR=n(()=>{b();nl();sR();cR();ne();ha=e.object({name:e.string().optional(),metadata:V.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),type:pR.optional(),status:nR.optional(),experimentScores:e.property("experiment_scores",e.list(fa).optional())});});var ya,z5=n(()=>{b();lR();ya=e.object({ids:e.list(e.string()),update:ha,mergeTags:e.property("merge_tags",e.boolean().optional())});});var Or,ba=n(()=>{b();Or=e.object({id:e.string(),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var mR,dR=n(()=>{b();ne();Xc();ba();mR=e.object({model:e.string(),messages:e.list(Ko),configs:e.record(e.string(),V).optional(),promptVersions:e.property("prompt_versions",e.list(Or).optional()),experimentName:e.property("experiment_name",e.string().optional())});});var Ra,S5=n(()=>{b();dR();ba();Ra=e.object({datasetName:e.property("dataset_name",e.string()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),prompts:e.list(mR),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),datasetId:e.property("dataset_id",e.string()),versionHash:e.property("version_hash",e.string().optional()),promptVersions:e.property("prompt_versions",e.list(Or).optional()),selectedRuleIds:e.property("selected_rule_ids",e.list(e.string()).optional()),filters:e.string().optional()});});var uR,gR=n(()=>{b();uR=e.enum_(["ui","sdk","online_scoring"]);});var fR,hR=n(()=>{b();fR=e.enum_(["ui","sdk","online_scoring"]);});var yR,bR=n(()=>{b();hR();yR=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:fR.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var RR,xR=n(()=>{b();gR();bR();RR=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:uR,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),yR).optional())});});var ir,xa=n(()=>{b();ir=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var wa,sl=n(()=>{b();wa=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var wR,_R=n(()=>{b();wR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kR,AR=n(()=>{b();kR=e.enum_(["general","tool","llm","guardrail"]);});var PR,zR=n(()=>{b();sl();xa();_R();AR();PR=e.object({id:e.string().optional(),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:kR.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:ir.optional(),output:ir.optional(),metadata:ir.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",wa.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:wR.optional(),environment:e.string().optional()});});var SR,vR=n(()=>{b();SR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var TR,jR=n(()=>{b();sl();xa();vR();TR=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:ir.optional(),output:ir.optional(),metadata:ir.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",wa.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:SR.optional(),environment:e.string().optional()});});var CR,ER=n(()=>{b();xR();xa();zR();jR();CR=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",ir.optional()),trace:TR.optional(),spans:e.list(PR).optional(),feedbackScores:e.property("feedback_scores",e.list(RR).optional())});});var _a,v5=n(()=>{b();ER();_a=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(CR)});});var ka,T5=n(()=>{b();ka=e.object({experimentName:e.property("experiment_name",e.string()),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),projectName:e.property("project_name",e.string().optional())});});var IR,DR=n(()=>{b();IR=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var he,xt=n(()=>{b();he=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var UR,NR=n(()=>{b();UR=e.enum_(["passed","failed"]);});var FR,BR=n(()=>{b();FR=e.enum_(["default","hidden"]);});var MR,WR=n(()=>{b();MR=e.enum_(["ui","sdk","online_scoring"]);});var VR,LR=n(()=>{b();VR=e.enum_(["ui","sdk","online_scoring"]);});var JR,GR=n(()=>{b();LR();JR=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:VR.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var ze,wt=n(()=>{b();WR();GR();ze=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:MR,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),JR).optional())});});var me,Ze=n(()=>{b();me=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Aa,pl=n(()=>{b();DR();xt();Rt();NR();BR();wt();Ze();Aa=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),input:me.optional(),output:me.optional(),traceMetadata:e.property("trace_metadata",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",FR.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",tr.optional()),assertionResults:e.property("assertion_results",e.list(IR).optional()),status:UR.optional()});});var Pa,j5=n(()=>{b();pl();Pa=e.object({experimentItems:e.property("experiment_items",e.list(Aa))});});var za,C5=n(()=>{b();za=e.object({ids:e.list(e.string())});});var Sa,E5=n(()=>{b();Sa=e.object({name:e.string(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var HR,OR=n(()=>{b();HR=e.object({name:e.string(),value:e.number()});});var Oe,xi=n(()=>{b();Oe=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var cl,KR=n(()=>{b();cl=e.object({id:e.string()});});var ll,QR=n(()=>{b();ll=e.enum_(["dataset","evaluation_suite"]);});var ml,$R=n(()=>{b();ml=e.enum_(["running","completed","cancelled","failed"]);});var dl,YR=n(()=>{b();dl=e.enum_(["regular","trial","mini-batch","mutation"]);});var va,I5=n(()=>{b();OR();xi();KR();QR();$R();YR();va=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:Oe.optional(),tags:e.list(e.string()).optional(),type:dl.optional(),evaluationMethod:e.property("evaluation_method",ll.optional()),optimizationId:e.property("optimization_id",e.string().optional()),status:ml.optional(),experimentScores:e.property("experiment_scores",e.list(HR).optional()),promptVersion:e.property("prompt_version",cl.optional()),promptVersions:e.property("prompt_versions",e.list(cl).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional())});});var Ta,D5=n(()=>{b();Ta=e.object({ids:e.list(e.string())});});var XR=n(()=>{z5();S5();v5();T5();j5();C5();E5();I5();D5();});var U5=n(()=>{XR();});var ZR=n(()=>{QR();$R();YR();});var ul={};L(ul,{ExperimentBatchUpdate:()=>ya,ExperimentExecutionRequest:()=>Ra,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>_a,ExperimentItemStreamRequest:()=>ka,ExperimentItemsBatch:()=>Pa,ExperimentItemsDelete:()=>za,ExperimentStreamRequestPublic:()=>Sa,ExperimentWrite:()=>va,ExperimentWriteEvaluationMethod:()=>ll,ExperimentWriteStatus:()=>ml,ExperimentWriteType:()=>dl,IdsHolder:()=>Ta});var N5=n(()=>{U5();ZR();});var gl,F5=n(()=>{b();gl=e.enum_(["numerical","categorical","boolean"]);});var qR=n(()=>{F5();});var fl={};L(fl,{FindFeedbackDefinitionsRequestType:()=>gl});var B5=n(()=>{qR();});var hl,M5=n(()=>{b();hl=e.enum_(["on_request","global"]);});var ex=n(()=>{M5();});var yl={};L(yl,{FindGuardrailPoliciesRequestExecutionScope:()=>hl});var W5=n(()=>{ex();});var rx,tx=n(()=>{b();rx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var ix,ox=n(()=>{b();ix=e.enum_(["passed","failed"]);});var ax,nx=n(()=>{b();tx();ox();ne();ax=e.object({entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:rx,result:ix,config:V,details:V});});var ja,V5=n(()=>{b();nx();ja=e.object({guardrails:e.list(ax)});});var sx,px=n(()=>{b();sx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var cx,lx=n(()=>{b();ne();px();cx=e.object({type:sx,config:V});});var Ca,L5=n(()=>{b();lx();Ca=e.object({text:e.string(),validations:e.list(cx)});});var mx=n(()=>{V5();L5();});var J5=n(()=>{mx();});var bl={};L(bl,{GuardrailBatchWrite:()=>ja,GuardrailsValidationRequest:()=>Ca});var G5=n(()=>{J5();});var Rl={};L(Rl,{Response:()=>Vpe});var Vpe,H5=n(()=>{b();ie();Vpe=e.record(e.string(),e.lazyObject(()=>Ea));});var xl={};L(xl,{Response:()=>Lpe});var Lpe,O5=n(()=>{b();Lpe=e.string();});var K5=n(()=>{H5();O5();});var _t={};L(_t,{getLlmModelProfiles:()=>Rl,getLlmModels:()=>xl});var Q5=n(()=>{K5();});var dx,ux=n(()=>{b();dx=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var gx,fx=n(()=>{b();gx=e.enum_(["form","json","basic"]);});var kt,Ia=n(()=>{b();ux();fx();kt=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",gx.optional()),credentials:e.list(dx).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var Da,$5=n(()=>{b();Ia();Da=e.object({apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",kt.optional())});});var hx,yx=n(()=>{b();hx=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var bx,Rx=n(()=>{b();bx=e.enum_(["form","json","basic"]);});var xx,wx=n(()=>{b();yx();Rx();xx=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",bx.optional()),credentials:e.list(hx).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var wl,_x=n(()=>{b();wl=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Ua,Y5=n(()=>{b();wx();_x();Ua=e.object({provider:wl,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",xx.optional())});});var Na,X5=n(()=>{b();Ia();Na=e.object({providerId:e.property("provider_id",e.string().optional()),authConfig:e.property("auth_config",kt.optional())});});var kx=n(()=>{$5();Y5();X5();});var Z5=n(()=>{kx();});var Ax=n(()=>{_x();});var _l={};L(_l,{ProviderApiKeyUpdate:()=>Da,ProviderApiKeyWrite:()=>Ua,ProviderApiKeyWriteProvider:()=>wl,ProviderAuthCheck:()=>Na});var q5=n(()=>{Z5();Ax();});var Fa,e3=n(()=>{b();Fa=e.object({clientName:e.property("client_name",e.string()),redirectUris:e.property("redirect_uris",e.list(e.string())),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional())});});var Ba,r3=n(()=>{b();Ba=e.object({clientId:e.property("client_id",e.string()),redirectUri:e.property("redirect_uri",e.string()),codeChallenge:e.property("code_challenge",e.string()),codeChallengeMethod:e.property("code_challenge_method",e.string()),resource:e.string(),state:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),csrf:e.string().optional()});});var Ma,t3=n(()=>{b();Ma=e.object({token:e.string().optional(),clientId:e.property("client_id",e.string().optional())});});var Wa,i3=n(()=>{b();Wa=e.object({grantType:e.property("grant_type",e.string().optional()),code:e.string().optional(),redirectUri:e.property("redirect_uri",e.string().optional()),clientId:e.property("client_id",e.string().optional()),codeVerifier:e.property("code_verifier",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional())});});var Px=n(()=>{e3();r3();t3();i3();});var o3=n(()=>{Px();});var kl={};L(kl,{ClientRegistrationRequest:()=>Fa,ConsentRequest:()=>Ba,RevokeRequest:()=>Ma,TokenRequest:()=>Wa});var a3=n(()=>{o3();});var zx,Sx=n(()=>{b();zx=e.object({name:e.string(),size:e.number().optional(),digest:e.string().optional(),modifiedAt:e.property("modified_at",e.date().optional())});});var Al={};L(Al,{Response:()=>Jpe});var Jpe,n3=n(()=>{b();Sx();Jpe=e.list(zx);});var s3=n(()=>{n3();});var wi={};L(wi,{listModels:()=>Al});var p3=n(()=>{s3();});var Ke,Kr=n(()=>{b();Ke=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Pl,vx=n(()=>{b();Pl=e.enum_(["running","completed","cancelled","initialized","error"]);});var Va,c3=n(()=>{b();Kr();Ze();vx();Va=e.object({name:e.string().optional(),status:Pl.optional(),errorInfo:e.property("error_info",Ke.optional()),metadata:me.optional()});});var Tx=n(()=>{c3();});var l3=n(()=>{Tx();});var jx=n(()=>{vx();});var zl={};L(zl,{OptimizationUpdate:()=>Va,OptimizationUpdateStatus:()=>Pl});var m3=n(()=>{l3();jx();});var La,d3=n(()=>{b();La=e.object({runnerName:e.property("runner_name",e.string()),hmac:e.string()});});var Sl,Cx=n(()=>{b();Sl=e.enum_(["connect","endpoint"]);});var Ja,u3=n(()=>{b();Cx();Ja=e.object({projectId:e.property("project_id",e.string()),activationKey:e.property("activation_key",e.string()),ttlSeconds:e.property("ttl_seconds",e.number().optional()),type:Sl});});var Ex=n(()=>{d3();u3();});var g3=n(()=>{Ex();});var Ix=n(()=>{Cx();});var vl={};L(vl,{ActivateRequest:()=>La,CreateSessionRequest:()=>Ja,CreateSessionRequestType:()=>Sl});var f3=n(()=>{g3();Ix();});var Tl,Dx=n(()=>{b();Tl=e.enum_(["traces","spans","threads"]);});var Ga,h3=n(()=>{b();Dx();Ga=e.object({entityType:e.property("entity_type",Tl),filters:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional())});});var Ux,Nx=n(()=>{b();Ux=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var Fx,Bx=n(()=>{b();Nx();Fx=e.object({field:Ux.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var Mx,Wx=n(()=>{b();Mx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,_i=n(()=>{b();Wx();Sr=e.object({field:e.string().optional(),operator:Mx.optional(),key:e.string().optional(),value:e.string().optional()});});var Vx,Lx=n(()=>{b();Vx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var vr,ki=n(()=>{b();Lx();vr=e.object({field:e.string().optional(),operator:Vx.optional(),key:e.string().optional(),value:e.string().optional()});});var Jx,Gx=n(()=>{b();Jx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var At,Ha=n(()=>{b();Gx();At=e.object({field:e.string().optional(),operator:Jx.optional(),key:e.string().optional(),value:e.string().optional()});});var jl,Hx=n(()=>{b();jl=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Cl,Ox=n(()=>{b();Cl=e.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 Oa,y3=n(()=>{b();Bx();_i();ki();Ha();Hx();Ox();Oa=e.object({metricType:e.property("metric_type",Cl.optional()),interval:jl.optional(),intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional()),spanFilters:e.property("span_filters",e.list(Sr).optional()),traceFilters:e.property("trace_filters",e.list(vr).optional()),threadFilters:e.property("thread_filters",e.list(At).optional()),breakdown:Fx.optional()});});var Ka,b3=n(()=>{b();Ka=e.object({name:e.string(),includeStats:e.boolean().optional()});});var El,Kx=n(()=>{b();El=e.enum_(["private","public"]);});var Qa,R3=n(()=>{b();Kx();Qa=e.object({name:e.string().optional(),description:e.string().optional(),visibility:El.optional()});});var Il,Qx=n(()=>{b();Il=e.enum_(["private","public"]);});var $a,x3=n(()=>{b();Qx();$a=e.object({name:e.string(),visibility:Il.optional(),description:e.string().optional()});});var $x=n(()=>{h3();y3();b3();R3();x3();});var w3=n(()=>{$x();});var Yx=n(()=>{Dx();Hx();Ox();Kx();Qx();});var Dl={};L(Dl,{KpiCardRequest:()=>Ga,KpiCardRequestEntityType:()=>Tl,ProjectMetricRequestPublic:()=>Oa,ProjectMetricRequestPublicInterval:()=>jl,ProjectMetricRequestPublicMetricType:()=>Cl,ProjectRetrieveDetailed:()=>Ka,ProjectUpdate:()=>Qa,ProjectUpdateVisibility:()=>El,ProjectWrite:()=>$a,ProjectWriteVisibility:()=>Il});var _3=n(()=>{w3();Yx();});var Xx,Zx=n(()=>{b();Xx=e.record(e.string(),e.unknown());});var qx,ew=n(()=>{b();qx=e.enum_(["text","chat"]);});var rw,tw=n(()=>{b();rw=e.enum_(["mustache","jinja2","python"]);});var iw,ow=n(()=>{b();iw=e.enum_(["prompt_version","mask"]);});var Fe,Ya=n(()=>{b();Zx();ew();tw();ow();Fe=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:Xx.optional(),type:rw.optional(),versionType:e.property("version_type",iw.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",qx.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Ul,aw=n(()=>{b();Ul=e.enum_(["text","chat"]);});var Xa,k3=n(()=>{b();Ya();aw();Xa=e.object({name:e.string(),version:Fe,templateStructure:e.property("template_structure",Ul.optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var Za,A3=n(()=>{b();Za=e.object({name:e.string(),description:e.string().optional(),tags:e.list(e.string()).optional()});});var nw,sw=n(()=>{b();nw=e.object({tags:e.list(e.string()).optional()});});var qa,P3=n(()=>{b();sw();qa=e.object({ids:e.list(e.string()),update:nw,mergeTags:e.property("merge_tags",e.boolean().optional())});});var en,z3=n(()=>{b();en=e.object({commits:e.list(e.string())});});var rn,S3=n(()=>{b();rn=e.object({environments:e.list(e.string())});});var tn,v3=n(()=>{b();tn=e.object({ids:e.list(e.string())});});var on,T3=n(()=>{b();on=e.object({name:e.string(),commit:e.string().optional(),environment:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var Nl,pw=n(()=>{b();Nl=e.enum_(["text","chat"]);});var Fl,cw=n(()=>{b();Fl=e.enum_(["mustache","jinja2","python"]);});var an,j3=n(()=>{b();zr();pw();cw();an=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:Te.optional(),changeDescription:e.property("change_description",e.string().optional()),type:Fl.optional(),templateStructure:e.property("template_structure",Nl.optional()),tags:e.list(e.string()).optional()});});var lw=n(()=>{k3();A3();P3();z3();S3();v3();T3();j3();});var Ai,Bl=n(()=>{b();Ai=e.object({promptVersionId:e.property("prompt_version_id",e.string().optional()),commit:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var Ml={};L(Ml,{Response:()=>Gpe});var Gpe,C3=n(()=>{b();Bl();Gpe=e.list(Ai);});var Wl={};L(Wl,{Response:()=>Hpe});var Hpe,E3=n(()=>{b();Ya();Hpe=e.list(Fe);});var I3=n(()=>{C3();lw();E3();});var mw=n(()=>{aw();pw();cw();});var Pt={};L(Pt,{CreatePromptVersionDetail:()=>Xa,CreatePromptVersionDetailTemplateStructure:()=>Ul,PromptUpdatable:()=>Za,PromptVersionBatchUpdate:()=>qa,PromptVersionCommitsRequestPublic:()=>en,PromptVersionEnvironmentUpdate:()=>rn,PromptVersionIdsRequestDetail:()=>tn,PromptVersionRetrieveDetail:()=>on,PromptWrite:()=>an,PromptWriteTemplateStructure:()=>Nl,PromptWriteType:()=>Fl,getPromptsByCommits:()=>Ml,retrievePromptVersionsByIds:()=>Wl});var D3=n(()=>{I3();mw();});var Vl,U3=n(()=>{b();Vl=e.enum_(["agent_insights"]);});var dw=n(()=>{U3();});var Ll={};L(Ll,{FindReportFailuresRequestType:()=>Vl});var N3=n(()=>{dw();});var Jl,uw=n(()=>{b();Jl=e.enum_(["pending","completed","failed"]);});var nn,F3=n(()=>{b();ne();uw();nn=e.object({content:e.string().optional(),status:Jl,sessionId:e.property("session_id",e.string().optional()),recommendedActions:e.property("recommended_actions",V.optional()),failureReason:e.property("failure_reason",e.string().optional())});});var gw=n(()=>{F3();});var B3=n(()=>{gw();});var fw=n(()=>{uw();});var Gl={};L(Gl,{ReportCompleteRequest:()=>nn,ReportCompleteRequestStatus:()=>Jl});var M3=n(()=>{B3();fw();});var Hl,hw=n(()=>{b();Hl=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var sn,W3=n(()=>{b();hw();sn=e.object({projectId:e.property("project_id",e.string().optional()),organizationLevel:e.property("organization_level",e.boolean().optional()),retention:Hl,applyToPast:e.property("apply_to_past",e.boolean().optional())});});var yw=n(()=>{W3();});var V3=n(()=>{yw();});var bw=n(()=>{hw();});var Ol={};L(Ol,{RetentionRuleWrite:()=>sn,RetentionRuleWriteRetention:()=>Hl});var L3=n(()=>{V3();bw();});var pn,J3=n(()=>{b();pn=e.object({maxCommands:e.property("max_commands",e.number().optional())});});var Kl,Rw=n(()=>{b();Kl=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var cn,G3=n(()=>{b();ne();Rw();cn=e.object({status:Kl,result:V.optional(),error:V.optional(),durationMs:e.property("duration_ms",e.number().optional())});});var Ql,xw=n(()=>{b();Ql=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var ln,H3=n(()=>{b();ne();xw();ln=e.object({type:Ql,args:V,timeoutSeconds:e.property("timeout_seconds",e.number().optional())});});var mn,$l=n(()=>{b();mn=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetItemVersionId:e.property("dataset_item_version_id",e.string().optional()),datasetItemId:e.property("dataset_item_id",e.string().optional())});});var dn,O3=n(()=>{b();ne();$l();dn=e.object({agentName:e.property("agent_name",e.string()),inputs:V.optional(),projectId:e.property("project_id",e.string()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:mn.optional()});});var un,K3=n(()=>{b();un=e.object({capabilities:e.list(e.string()).optional()});});var Yl,ww=n(()=>{b();Yl=e.enum_(["pending","running","completed","failed","cancelled"]);});var gn,Q3=n(()=>{b();ne();ww();gn=e.object({status:Yl,result:V.optional(),error:e.string().optional(),traceId:e.property("trace_id",e.string().optional())});});var _w=n(()=>{J3();G3();H3();O3();K3();Q3();});var fn,Xl=n(()=>{b();fn=e.object({stream:e.string(),text:e.string()});});var Zl={};L(Zl,{Request:()=>Ope});var Ope,$3=n(()=>{b();Xl();Ope=e.list(fn);});var ql={};L(ql,{Response:()=>Kpe});var Kpe,Y3=n(()=>{b();Xl();Kpe=e.list(fn);});var kw,Aw=n(()=>{b();kw=e.enum_(["pending","running","completed","failed","cancelled"]);});var zt,em=n(()=>{b();ne();$l();Aw();zt=e.object({id:e.string().optional(),runnerId:e.property("runner_id",e.string().optional()),agentName:e.property("agent_name",e.string().optional()),status:kw.optional(),inputs:V.optional(),result:V.optional(),error:e.string().optional(),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:mn.optional(),timeout:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),startedAt:e.property("started_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional())});});var rm={};L(rm,{Response:()=>Qpe});var Qpe,X3=n(()=>{em();Qpe=zt.nullable();});var tm={};L(tm,{Request:()=>$pe});var $pe,Z3=n(()=>{b();$pe=e.record(e.string(),e.unknown());});var im={};L(im,{Request:()=>Ype});var Ype,q3=n(()=>{b();Ype=e.record(e.string(),e.unknown());});var e8=n(()=>{$3();Y3();X3();Z3();q3();_w();});var om,r8=n(()=>{b();om=e.enum_(["pairing","connected","disconnected"]);});var Pw=n(()=>{Rw();xw();r8();ww();});var hr={};L(hr,{BridgeCommandNextRequest:()=>pn,BridgeCommandResultRequest:()=>cn,BridgeCommandResultRequestStatus:()=>Kl,BridgeCommandSubmitRequest:()=>ln,BridgeCommandSubmitRequestType:()=>Ql,CreateLocalRunnerJobRequest:()=>dn,ListRunnersRequestStatus:()=>om,LocalRunnerHeartbeatRequest:()=>un,LocalRunnerJobResultRequest:()=>gn,LocalRunnerJobResultRequestStatus:()=>Yl,appendJobLogs:()=>Zl,getJobLogs:()=>ql,nextJob:()=>rm,patchChecklist:()=>tm,registerAgents:()=>im});var t8=n(()=>{e8();Pw();});var zw,Sw=n(()=>{b();zw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vw,Tw=n(()=>{b();vw=e.enum_(["general","tool","llm","guardrail"]);});var hn,jw=n(()=>{b();Kr();Ze();Sw();Tw();hn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:vw.optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),usage:e.record(e.string(),e.number()).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),errorInfo:e.property("error_info",Ke.optional()),ttft:e.number().optional(),source:zw.optional(),environment:e.string().optional()});});var yn,i8=n(()=>{b();jw();yn=e.object({ids:e.list(e.string()),update:hn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var St,bn=n(()=>{b();St=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Cw,Ew=n(()=>{b();Cw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Iw,Dw=n(()=>{b();Iw=e.enum_(["general","tool","llm","guardrail"]);});var Rn,Uw=n(()=>{b();bn();xi();Ew();Dw();Rn=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:Iw.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Oe.optional(),output:Oe.optional(),metadata:Oe.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:Cw.optional(),environment:e.string().optional()});});var xn,o8=n(()=>{b();Uw();xn=e.object({spans:e.list(Rn)});});var am,Nw=n(()=>{b();am=e.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 nm,Fw=n(()=>{b();nm=e.enum_(["general","tool","llm","guardrail"]);});var wn,a8=n(()=>{b();_i();Nw();Fw();wn=e.object({traceId:e.property("trace_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),type:nm.optional(),filters:e.list(Sr).optional(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),exclude:e.list(am).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var Bw=n(()=>{i8();o8();a8();});var n8=n(()=>{Bw();});var sm,s8=n(()=>{b();sm=e.enum_(["general","tool","llm","guardrail"]);});var pm,p8=n(()=>{b();pm=e.enum_(["general","tool","llm","guardrail"]);});var cm,c8=n(()=>{b();cm=e.enum_(["general","tool","llm","guardrail"]);});var Mw=n(()=>{s8();p8();c8();Nw();Fw();});var lm={};L(lm,{FindFeedbackScoreNames1RequestType:()=>sm,GetSpanStatsRequestType:()=>pm,GetSpansByProjectRequestType:()=>cm,SpanBatchUpdate:()=>yn,SpanBatchWrite:()=>xn,SpanSearchStreamRequestPublic:()=>wn,SpanSearchStreamRequestPublicExcludeItem:()=>am,SpanSearchStreamRequestPublicType:()=>nm});var l8=n(()=>{n8();Mw();});var _n,m8=n(()=>{b();_n=e.object({query:e.string()});});var kn,d8=n(()=>{b();kn=e.object({query:e.string(),projectId:e.property("project_id",e.string().optional())});});var Ww=n(()=>{m8();d8();});var u8=n(()=>{Ww();});var mm={};L(mm,{AnalyticsQueryRequest:()=>_n,ScopedAnalyticsQueryRequest:()=>kn});var g8=n(()=>{u8();});var An,f8=n(()=>{b();An=e.object({workspaceIds:e.property("workspace_ids",e.list(e.string())),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),limit:e.number().optional()});});var Vw=n(()=>{f8();});var h8=n(()=>{Vw();});var dm={};L(dm,{UsageProjectsRequest:()=>An});var y8=n(()=>{h8();});var Pn,b8=n(()=>{b();Pn=e.object({ids:e.list(e.string()),projectId:e.property("project_id",e.string().optional())});});var zn,R8=n(()=>{b();zn=e.object({projectName:e.property("project_name",e.string()),threadId:e.property("thread_id",e.string()),names:e.list(e.string()),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Sn,x8=n(()=>{b();Sn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()))});});var Lw,Jw=n(()=>{b();Lw=e.enum_(["ui","sdk","online_scoring"]);});var Gw,Hw=n(()=>{b();Jw();Gw=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:Lw,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),threadId:e.property("thread_id",e.string())});});var vn,w8=n(()=>{b();Hw();vn=e.object({scores:e.list(Gw)});});var Ow,Kw=n(()=>{b();Ow=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Tn,Qw=n(()=>{b();Kr();Ze();Kw();Tn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),errorInfo:e.property("error_info",Ke.optional()),threadId:e.property("thread_id",e.string().optional()),ttft:e.number().optional(),source:Ow.optional(),environment:e.string().optional()});});var jn,_8=n(()=>{b();Qw();jn=e.object({ids:e.list(e.string()),update:Tn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var $w,Yw=n(()=>{b();$w=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Cn,Xw=n(()=>{b();bn();xi();Yw();Cn=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Oe.optional(),output:Oe.optional(),metadata:Oe.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:$w.optional(),environment:e.string().optional()});});var En,k8=n(()=>{b();Xw();En=e.object({traces:e.list(Cn)});});var um,Zw=n(()=>{b();um=e.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","annotation_queues","source","environment"]);});var In,A8=n(()=>{b();ki();Zw();In=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(vr).optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),exclude:e.list(um).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var Dn,P8=n(()=>{b();Dn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()).optional())});});var Un,qw=n(()=>{b();Un=e.object({tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional())});});var Nn,z8=n(()=>{b();qw();Nn=e.object({ids:e.list(e.string()),update:Un,mergeTags:e.property("merge_tags",e.boolean().optional())});});var e_,r_=n(()=>{b();e_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var or,vt=n(()=>{b();r_();or=e.object({field:e.string().optional(),operator:e_.optional(),key:e.string().optional(),value:e.string().optional()});});var Fn,S8=n(()=>{b();vt();Fn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(or).optional(),lastRetrievedThreadModelId:e.property("last_retrieved_thread_model_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var t_=n(()=>{b8();R8();x8();w8();_8();k8();A8();P8();z8();S8();});var v8=n(()=>{t_();});var i_=n(()=>{Zw();});var gm={};L(gm,{BatchDeleteByProject:()=>Pn,DeleteThreadFeedbackScores:()=>zn,DeleteTraceThreads:()=>Sn,FeedbackScoreBatchThread:()=>vn,TraceBatchUpdate:()=>jn,TraceBatchWrite:()=>En,TraceSearchStreamRequestPublic:()=>In,TraceSearchStreamRequestPublicExcludeItem:()=>um,TraceThreadBatchIdentifier:()=>Dn,TraceThreadBatchUpdate:()=>Nn,TraceThreadSearchStreamRequest:()=>Fn});var T8=n(()=>{v8();i_();});var o_,a_=n(()=>{b();o_=e.enum_(["query"]);});var Tt,Bn=n(()=>{b();a_();Tt=e.object({kind:o_,queryId:e.property("query_id",e.string()),columns:e.record(e.string(),e.string()).optional()});});var fm,n_=n(()=>{b();fm=e.enum_(["widget"]);});var hm,s_=n(()=>{b();hm=e.enum_(["user","ollie","agent"]);});var ym,p_=n(()=>{b();ym=e.enum_(["html"]);});var Mn,j8=n(()=>{b();Bn();n_();s_();p_();Mn=e.object({area:fm,name:e.string(),description:e.string().optional(),summary:e.string().optional(),author:hm.optional(),type:ym,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),Tt),html:e.string()});});var Wn,C8=n(()=>{b();Wn=e.object({version:e.number()});});var Vn,E8=n(()=>{b();Vn=e.object({name:e.string().optional(),description:e.string().optional()});});var bm,c_=n(()=>{b();bm=e.enum_(["user","ollie","agent"]);});var Rm,l_=n(()=>{b();Rm=e.enum_(["html"]);});var Ln,I8=n(()=>{b();Bn();c_();l_();Ln=e.object({summary:e.string().optional(),author:bm.optional(),type:Rm,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),Tt),html:e.string()});});var m_=n(()=>{j8();C8();E8();I8();});var D8=n(()=>{m_();});var d_=n(()=>{n_();s_();p_();c_();l_();});var xm={};L(xm,{ViewCreate:()=>Mn,ViewCreateArea:()=>fm,ViewCreateAuthor:()=>hm,ViewCreateType:()=>ym,ViewCurrentVersion:()=>Wn,ViewUpdate:()=>Vn,ViewVersionCreate:()=>Ln,ViewVersionCreateAuthor:()=>bm,ViewVersionCreateType:()=>Rm});var U8=n(()=>{D8();d_();});var Jn,N8=n(()=>{b();Jn=e.object({role:e.string().optional(),integrations:e.list(e.string()).optional(),email:e.string().optional(),joinBetaProgram:e.property("join_beta_program",e.boolean().optional())});});var u_=n(()=>{N8();});var F8=n(()=>{u_();});var wm={};L(wm,{WelcomeWizardSubmission:()=>Jn});var B8=n(()=>{F8();});var g_,f_=n(()=>{b();g_=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var h_,y_=n(()=>{b();f_();h_=e.object({field:g_.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var b_,R_=n(()=>{b();b_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ar,jt=n(()=>{b();R_();ar=e.object({field:e.string().optional(),operator:b_.optional(),key:e.string().optional(),value:e.string().optional()});});var _m,x_=n(()=>{b();_m=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var km,w_=n(()=>{b();km=e.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 Gn,M8=n(()=>{b();y_();jt();x_();w_();Gn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),metricType:e.property("metric_type",km.optional()),interval:_m.optional(),breakdown:h_.optional(),filters:e.list(ar).optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var Hn,W8=n(()=>{b();Hn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional())});});var __=n(()=>{M8();W8();});var V8=n(()=>{__();});var k_=n(()=>{x_();w_();});var Am={};L(Am,{WorkspaceSpanMetricRequest:()=>Gn,WorkspaceSpanMetricRequestInterval:()=>_m,WorkspaceSpanMetricRequestMetricType:()=>km,WorkspaceTokenUsageNamesRequest:()=>Hn});var L8=n(()=>{V8();k_();});var J8=n(()=>{_y();_X();vy();vX();Ty();jy();CX();Ey();UX();Iy();FX();Dy();ob();LX();db();HX();ub();fb();ZX();hb();Cb();r5();eR();w5();oR();aR();P5();XR();N5();ZR();B5();qR();W5();ex();mx();G5();Q5();kx();q5();Ax();Px();a3();p3();Tx();m3();jx();Ex();f3();Ix();$x();_3();Yx();lw();D3();mw();N3();dw();gw();M3();fw();yw();L3();bw();_w();t8();Pw();Bw();l8();Mw();Ww();g8();Vw();y8();t_();T8();i_();m_();U8();d_();u_();B8();__();L8();k_();});var A_,P_=n(()=>{b();A_=e.enum_(["required","optional"]);});var z_,S_=n(()=>{b();P_();z_=e.object({name:e.string(),type:e.string(),presence:A_.optional()});});var v_,T_=n(()=>{b();S_();v_=e.object({name:e.string().optional(),description:e.string().optional(),language:e.string().optional(),executable:e.string().optional(),sourceFile:e.property("source_file",e.string().optional()),params:e.list(z_).optional(),timeout:e.number().optional()});});var j_,C_=n(()=>{b();j_=e.enum_(["blueprint","mask"]);});var E_,I_=n(()=>{b();E_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var D_,U_=n(()=>{b();I_();D_=e.object({key:e.string(),value:e.string().optional(),type:E_,description:e.string().optional()});});var N_,F_=n(()=>{b();C_();U_();N_=e.object({id:e.string().optional(),name:e.string().optional(),type:j_,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(D_)});});var B_,M_=n(()=>{b();B_=e.enum_(["blueprint","mask"]);});var W_,V_=n(()=>{b();W_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var L_,J_=n(()=>{b();V_();L_=e.object({key:e.string(),value:e.string().optional(),type:W_,description:e.string().optional()});});var Ct,G8=n(()=>{b();M_();J_();Ct=e.object({id:e.string().optional(),name:e.string().optional(),type:B_,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(L_)});});var G_,H_=n(()=>{b();G_=e.enum_(["blueprint","mask"]);});var O_,K_=n(()=>{b();O_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Q_,$_=n(()=>{b();K_();Q_=e.object({key:e.string(),value:e.string().optional(),type:O_,description:e.string().optional()});});var Y_,X_=n(()=>{b();H_();$_();Y_=e.object({id:e.string().optional(),type:G_,description:e.string().optional(),values:e.list(Q_)});});var Pm,H8=n(()=>{b();X_();Pm=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),id:e.string().optional(),blueprint:Y_});});var Z_,q_=n(()=>{b();Z_=e.enum_(["critical","high","medium","low"]);});var ek,rk=n(()=>{b();ek=e.enum_(["open","resolved","closed"]);});var tk,ik=n(()=>{b();q_();rk();tk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:ek.optional(),severity:Z_.optional(),tracesQuery:e.property("traces_query",e.string().optional()),totalOccurrences:e.property("total_occurrences",e.number().optional()),latestCount:e.property("latest_count",e.number().optional()),total:e.number().optional(),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),firstSeen:e.property("first_seen",e.string().optional()),lastSeen:e.property("last_seen",e.string().optional()),daysReported:e.property("days_reported",e.number().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var ok,ak=n(()=>{b();ne();ok=e.object({reportDay:e.property("report_day",e.string().optional()),count:e.number().optional(),totalCount:e.property("total_count",e.number().optional()),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),metadata:V.optional()});});var nk,O8=n(()=>{b();ik();nk=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(tk).optional()});});var sk,pk=n(()=>{b();sk=e.enum_(["critical","high","medium","low"]);});var ck,lk=n(()=>{b();ck=e.enum_(["open","resolved","closed"]);});var mk,K8=n(()=>{b();ak();pk();lk();mk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:ck.optional(),severity:sk.optional(),tracesQuery:e.property("traces_query",e.string().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),details:e.list(ok).optional()});});var dk,uk=n(()=>{b();dk=e.enum_(["enabled","disabled"]);});var Pi,Q8=n(()=>{b();uk();Pi=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:dk.optional(),autoFirstRunEnrolled:e.property("auto_first_run_enrolled",e.boolean().optional()),autoFirstRunAt:e.property("auto_first_run_at",e.date().optional()),lastScanAt:e.property("last_scan_at",e.date().optional()),lastFailureReason:e.property("last_failure_reason",e.string().optional()),lastFailureDetail:e.property("last_failure_detail",e.string().optional()),lastFailedAt:e.property("last_failed_at",e.date().optional()),guidance:e.string().optional(),guidanceUpdatedBy:e.property("guidance_updated_by",e.string().optional()),guidanceUpdatedAt:e.property("guidance_updated_at",e.date().optional()),guidanceVersion:e.property("guidance_version",e.number().optional()),resultsGuidanceVersion:e.property("results_guidance_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var je,Qr=n(()=>{b();je=e.object({name:e.string(),value:e.number()});});var Tr,zi=n(()=>{b();Tr=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var gk,fk=n(()=>{b();Qr();zi();gk=e.object({experimentCount:e.property("experiment_count",e.number().optional()),traceCount:e.property("trace_count",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),duration:Tr.optional(),feedbackScores:e.property("feedback_scores",e.list(je).optional()),experimentScores:e.property("experiment_scores",e.list(je).optional()),passRateAvg:e.property("pass_rate_avg",e.number().optional()),passedCountSum:e.property("passed_count_sum",e.number().optional()),totalCountSum:e.property("total_count_sum",e.number().optional())});});var hk,yk=n(()=>{b();hk=e.enum_(["general","slack","pagerduty"]);});var bk,Rk=n(()=>{b();bk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var xk,wk=n(()=>{b();Rk();xk=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:bk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var _k,kk=n(()=>{b();_k=e.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 Ak,Pk=n(()=>{b();wk();kk();Ak=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",_k),triggerConfigs:e.property("trigger_configs",e.list(xk).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var zk,Sk=n(()=>{b();zk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Xpe,$8=n(()=>{b();yk();Pk();Sk();Xpe=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",hk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:zk,triggers:e.list(Ak).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var vk,Tk=n(()=>{b();vk=e.enum_(["general","slack","pagerduty"]);});var jk,Ck=n(()=>{b();jk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Ek,Ik=n(()=>{b();Ck();Ek=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:jk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Dk,Uk=n(()=>{b();Dk=e.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 Nk,Fk=n(()=>{b();Ik();Uk();Nk=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",Dk),triggerConfigs:e.property("trigger_configs",e.list(Ek).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Bk,Mk=n(()=>{b();Bk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var On,Wk=n(()=>{b();Tk();Fk();Mk();On=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",vk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:Bk,triggers:e.list(Nk).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var Kn,Y8=n(()=>{b();Wk();Kn=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(On).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Vk,Lk=n(()=>{b();Vk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Jk,Gk=n(()=>{b();Lk();Jk=e.object({id:e.string().optional(),type:Vk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional())});});var Hk,Ok=n(()=>{b();Hk=e.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 Kk,Qk=n(()=>{b();Gk();Ok();Kk=e.object({id:e.string().optional(),eventType:e.property("event_type",Hk),triggerConfigs:e.property("trigger_configs",e.list(Jk).optional())});});var $k,Yk=n(()=>{b();$k=e.enum_(["general","slack","pagerduty"]);});var Xk,Zk=n(()=>{b();Xk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional()});});var Qn,X8=n(()=>{b();Qk();Yk();Zk();Qn=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",$k.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:Xk,triggers:e.list(Kk).optional(),projectId:e.property("project_id",e.string().optional())});});var $r,Z8=n(()=>{b();ne();$r=e.object({results:e.list(V).optional()});});var qk,eA=n(()=>{b();qk=e.object({username:e.string().optional(),status:e.number().optional()});});var rA,tA=n(()=>{b();rA=e.enum_(["trace","thread"]);});var iA,oA=n(()=>{b();Wc();Vc();eA();tA();Qr();iA=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:rA,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Lo.optional(),annotatorView:e.property("annotator_view",Vo.optional()),reviewers:e.list(qk).optional(),feedbackScores:e.property("feedback_scores",e.list(je).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var aA,nA=n(()=>{b();aA=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var sA,pA=n(()=>{b();sA=e.enum_([">","<","="]);});var cA,lA=n(()=>{b();pA();cA=e.object({scoreName:e.property("score_name",e.string()),operator:sA,value:e.number()});});var mA,dA=n(()=>{b();lA();mA=e.object({conditions:e.list(cA)});});var uA,gA=n(()=>{b();dA();uA=e.object({groups:e.list(mA)});});var fA,hA=n(()=>{b();gA();fA=e.object({enabled:e.boolean().optional(),conditions:uA.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional())});});var Zpe,q8=n(()=>{b();oA();Zpe=e.object({annotationQueues:e.property("annotation_queues",e.list(iA))});});var zm,eZ=n(()=>{b();zm=e.object({ids:e.list(e.string())});});var yA,bA=n(()=>{b();yA=e.enum_(["manual","automated"]);});var RA,xA=n(()=>{b();bA();RA=e.object({id:e.string().optional(),source:yA.optional()});});var wA,rZ=n(()=>{b();xA();wA=e.object({content:e.list(RA).optional()});});var _A,kA=n(()=>{b();_A=e.enum_(["trace","thread"]);});var AA,PA=n(()=>{b();AA=e.object({username:e.string().optional(),status:e.number().optional()});});var Yr,$n=n(()=>{b();Yr=e.object({name:e.string(),value:e.number()});});var Yn,zA=n(()=>{b();nA();hA();kA();PA();$n();Yn=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:_A,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:fA.optional(),annotatorView:e.property("annotator_view",aA.optional()),reviewers:e.list(AA).optional(),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var SA,tZ=n(()=>{b();zA();SA=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Yn).optional(),sortableBy:e.list(e.string()).optional()});});var Xn,Sm=n(()=>{b();Xn=e.object({id:e.string(),name:e.string()});});var vA,TA=n(()=>{b();vA=e.object({id:e.string(),name:e.string()});});var jA,CA=n(()=>{b();jA=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var EA,IA=n(()=>{b();EA=e.object({name:e.string(),value:e.number()});});var DA,UA=n(()=>{b();DA=e.object({name:e.string(),value:e.number()});});var NA,FA=n(()=>{b();NA=e.enum_(["system","user","assistant","tool","function"]);});var BA,MA=n(()=>{b();BA=e.enum_(["function"]);});var Zn,vm=n(()=>{b();hi();MA();Zn=e.object({id:e.string().optional(),index:e.number().optional(),type:BA.optional(),function:Ar.optional()});});var WA,VA=n(()=>{b();FA();hi();vm();WA=e.object({role:NA.optional(),content:e.string().optional(),reasoningContent:e.string().optional(),name:e.string().optional(),toolCalls:e.list(Zn).optional(),refusal:e.string().optional(),functionCall:Ar.optional()});});var LA,JA=n(()=>{b();LA=e.object({link:e.string().optional(),fileName:e.property("file_name",e.string()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string())});});var GA,iZ=n(()=>{b();JA();GA=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(LA).optional(),sortableBy:e.list(e.string()).optional()});});var HA,OA=n(()=>{b();HA=e.object({url:e.string()});});var KA,QA=n(()=>{b();KA=e.object({url:e.string()});});var $A,YA=n(()=>{b();$A=e.object({url:e.string()});});var XA,oZ=n(()=>{b();XA=e.record(e.string(),e.unknown());});var ZA,aZ=n(()=>{b();ZA=e.object({issuer:e.string().optional(),authorizationEndpoint:e.property("authorization_endpoint",e.string().optional()),tokenEndpoint:e.property("token_endpoint",e.string().optional()),revocationEndpoint:e.property("revocation_endpoint",e.string().optional()),registrationEndpoint:e.property("registration_endpoint",e.string().optional()),responseTypesSupported:e.property("response_types_supported",e.list(e.string()).optional()),grantTypesSupported:e.property("grant_types_supported",e.list(e.string()).optional()),codeChallengeMethodsSupported:e.property("code_challenge_methods_supported",e.list(e.string()).optional()),tokenEndpointAuthMethodsSupported:e.property("token_endpoint_auth_methods_supported",e.list(e.string()).optional())});});var qA,eP=n(()=>{b();qA=e.object({id:e.string().optional(),name:e.string().optional(),isDefault:e.property("is_default",e.boolean().optional())});});var rP,nZ=n(()=>{b();eP();rP=e.object({clientName:e.property("client_name",e.string().optional()),clientLogoUri:e.property("client_logo_uri",e.string().optional()),workspaces:e.list(qA).optional(),csrfToken:e.property("csrf_token",e.string().optional())});});var tP,iP=n(()=>{b();tP=e.enum_(["evaluator","annotation_queue_router"]);});var oP,aP=n(()=>{b();oP=e.object({url:e.string(),detail:e.string().optional()});});var nP,sP=n(()=>{b();nP=e.object({url:e.string()});});var pP,cP=n(()=>{b();OA();aP();sP();pP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",oP.optional()),videoUrl:e.property("video_url",nP.optional()),audioUrl:e.property("audio_url",HA.optional())});});var lP,mP=n(()=>{b();lP=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Et,qn=n(()=>{b();cP();mP();Et=e.object({role:lP,content:e.string().optional(),contentArray:e.property("content_array",e.list(pP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var dP,uP=n(()=>{b();dP=e.enum_(["decisions"]);});var It,es=n(()=>{b();ne();uP();It=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",V.optional()),api:dP.optional()});});var gP,fP=n(()=>{b();gP=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Dt,rs=n(()=>{b();fP();Dt=e.object({name:e.string(),type:gP,description:e.string()});});var ts,Tm=n(()=>{b();qn();es();rs();ts=e.object({model:It,messages:e.list(Et),variables:e.record(e.string(),e.string()),schema:e.list(Dt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var hP,yP=n(()=>{b();hP=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var jr,Si=n(()=>{b();yP();jr=e.object({field:e.string().optional(),operator:hP.optional(),key:e.string().optional(),value:e.string().optional()});});var bP,RP=n(()=>{b();Tm();Si();bP=e.object({filters:e.list(jr).optional(),code:ts.optional()});});var is,jm=n(()=>{b();qn();es();rs();is=e.object({model:It,messages:e.list(Et),variables:e.record(e.string(),e.string()),schema:e.list(Dt)});});var xP,wP=n(()=>{b();jt();jm();xP=e.object({filters:e.list(ar).optional(),code:is.optional()});});var os,Cm=n(()=>{b();os=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var _P,kP=n(()=>{b();jt();Cm();_P=e.object({filters:e.list(ar).optional(),code:os.optional()});});var as,Em=n(()=>{b();qn();es();rs();as=e.object({model:It,messages:e.list(Et),schema:e.list(Dt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var AP,PP=n(()=>{b();vt();Em();AP=e.object({filters:e.list(or).optional(),code:as.optional()});});var ns,Im=n(()=>{b();ns=e.object({metric:e.string()});});var zP,SP=n(()=>{b();vt();Im();zP=e.object({filters:e.list(or).optional(),code:ns.optional()});});var vP,TP=n(()=>{b();vP=e.enum_(["production","experiment","both"]);});var ss,Dm=n(()=>{b();ss=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var jP,CP=n(()=>{b();Si();Dm();jP=e.object({filters:e.list(jr).optional(),code:ss.optional()});});var EP,IP=n(()=>{b();EP=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var vi,qpe,sZ=n(()=>{b();iP();RP();wP();kP();PP();SP();TP();CP();IP();vi=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(EP).optional(),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",vP.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:tP}),qpe=e.union("type",{llm_as_judge:bP.extend(vi),user_defined_metric_python:jP.extend(vi),trace_thread_llm_as_judge:AP.extend(vi),trace_thread_user_defined_metric_python:zP.extend(vi),span_llm_as_judge:xP.extend(vi),span_user_defined_metric_python:_P.extend(vi)}).transform({transform:p=>p,untransform:p=>p});});var DP,UP=n(()=>{b();DP=e.object({url:e.string(),detail:e.string().optional()});});var NP,FP=n(()=>{b();NP=e.object({url:e.string()});});var BP,MP=n(()=>{b();QA();UP();FP();BP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",DP.optional()),videoUrl:e.property("video_url",NP.optional()),audioUrl:e.property("audio_url",KA.optional())});});var WP,VP=n(()=>{b();WP=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Ut,ps=n(()=>{b();MP();VP();Ut=e.object({role:WP,content:e.string().optional(),contentArray:e.property("content_array",e.list(BP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var ke,yr=n(()=>{b();ke=e.record(e.string(),e.unknown());});var LP,JP=n(()=>{b();LP=e.enum_(["decisions"]);});var Nt,cs=n(()=>{b();yr();JP();Nt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",ke.optional()),api:LP.optional()});});var GP,HP=n(()=>{b();GP=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ft,ls=n(()=>{b();HP();Ft=e.object({name:e.string(),type:GP,description:e.string()});});var OP,KP=n(()=>{b();ps();cs();ls();OP=e.object({model:Nt,messages:e.list(Ut),variables:e.record(e.string(),e.string()),schema:e.list(Ft),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var ms,Um=n(()=>{b();KP();ki();ms=e.object({filters:e.list(vr).optional(),code:OP.optional()});});var QP,$P=n(()=>{b();QP=e.object({url:e.string(),detail:e.string().optional()});});var YP,XP=n(()=>{b();YP=e.object({url:e.string()});});var ZP,qP=n(()=>{b();YA();$P();XP();ZP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",QP.optional()),videoUrl:e.property("video_url",YP.optional()),audioUrl:e.property("audio_url",$A.optional())});});var ez,rz=n(()=>{b();ez=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Bt,ds=n(()=>{b();qP();rz();Bt=e.object({role:ez,content:e.string().optional(),contentArray:e.property("content_array",e.list(ZP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var tz,iz=n(()=>{b();tz=e.enum_(["decisions"]);});var Mt,us=n(()=>{b();zr();iz();Mt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",Te.optional()),api:tz.optional()});});var oz,az=n(()=>{b();oz=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Wt,gs=n(()=>{b();az();Wt=e.object({name:e.string(),type:oz,description:e.string()});});var nz,sz=n(()=>{b();ds();us();gs();nz=e.object({model:Mt,messages:e.list(Bt),variables:e.record(e.string(),e.string()),schema:e.list(Wt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var pz,cz=n(()=>{b();pz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var fs,Nm=n(()=>{b();cz();fs=e.object({field:e.string().optional(),operator:pz.optional(),key:e.string().optional(),value:e.string().optional()});});var lz,mz=n(()=>{b();sz();Nm();lz=e.object({filters:e.list(fs).optional(),code:nz.optional()});});var dz,uz=n(()=>{b();dz=e.enum_(["evaluator","annotation_queue_router"]);});var gz,fz=n(()=>{b();gz=e.enum_(["production","experiment","both"]);});var hz,yz=n(()=>{b();ps();cs();ls();hz=e.object({model:Nt,messages:e.list(Ut),variables:e.record(e.string(),e.string()),schema:e.list(Ft)});});var hs,Fm=n(()=>{b();_i();yz();hs=e.object({filters:e.list(Sr).optional(),code:hz.optional()});});var bz,Rz=n(()=>{b();bz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var ys,Bm=n(()=>{b();_i();Rz();ys=e.object({filters:e.list(Sr).optional(),code:bz.optional()});});var xz,wz=n(()=>{b();ps();cs();ls();xz=e.object({model:Nt,messages:e.list(Ut),schema:e.list(Ft),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var bs,Mm=n(()=>{b();Ha();wz();bs=e.object({filters:e.list(At).optional(),code:xz.optional()});});var _z,kz=n(()=>{b();_z=e.object({metric:e.string()});});var Rs,Wm=n(()=>{b();Ha();kz();Rs=e.object({filters:e.list(At).optional(),code:_z.optional()});});var Az,Pz=n(()=>{b();Az=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var xs,Vm=n(()=>{b();ki();Pz();xs=e.object({filters:e.list(vr).optional(),code:Az.optional()});});var ws,Lm=n(()=>{b();ws=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var Ti,zz,Sz=n(()=>{b();Um();uz();fz();Fm();Bm();Mm();Wm();Vm();Lm();Ti=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ws).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",gz.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:dz}),zz=e.union("type",{llm_as_judge:ms.extend(Ti),user_defined_metric_python:xs.extend(Ti),trace_thread_llm_as_judge:bs.extend(Ti),trace_thread_user_defined_metric_python:Rs.extend(Ti),span_llm_as_judge:hs.extend(Ti),span_user_defined_metric_python:ys.extend(Ti)}).transform({transform:p=>p,untransform:p=>p});});var vz,pZ=n(()=>{b();Sz();vz=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(zz).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Tz,jz=n(()=>{b();Tz=e.enum_(["evaluator","annotation_queue_router"]);});var Cz,Ez=n(()=>{b();Cz=e.enum_(["production","experiment","both"]);});var ji,Iz,cZ=n(()=>{b();Um();jz();Ez();Fm();Bm();Mm();Wm();Vm();Lm();ji=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ws).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",Cz.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:Tz}),Iz=e.union("type",{llm_as_judge:ms.extend(ji),user_defined_metric_python:xs.extend(ji),trace_thread_llm_as_judge:bs.extend(ji),trace_thread_user_defined_metric_python:Rs.extend(ji),span_llm_as_judge:hs.extend(ji),span_user_defined_metric_python:ys.extend(ji)}).transform({transform:p=>p,untransform:p=>p});});var Dz,Uz=n(()=>{b();Dz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var _s,Jm=n(()=>{b();Uz();_s=e.object({field:e.string().optional(),operator:Dz.optional(),key:e.string().optional(),value:e.string().optional()});});var Nz,Fz=n(()=>{b();ds();us();gs();Nz=e.object({model:Mt,messages:e.list(Bt),variables:e.record(e.string(),e.string()),schema:e.list(Wt)});});var Bz,Mz=n(()=>{b();Jm();Fz();Bz=e.object({filters:e.list(_s).optional(),code:Nz.optional()});});var Wz,Vz=n(()=>{b();Wz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var Lz,Jz=n(()=>{b();Jm();Vz();Lz=e.object({filters:e.list(_s).optional(),code:Wz.optional()});});var Gz,Hz=n(()=>{b();Gz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ks,Gm=n(()=>{b();Hz();ks=e.object({field:e.string().optional(),operator:Gz.optional(),key:e.string().optional(),value:e.string().optional()});});var Oz,Kz=n(()=>{b();ds();us();gs();Oz=e.object({model:Mt,messages:e.list(Bt),schema:e.list(Wt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var Qz,$z=n(()=>{b();Gm();Kz();Qz=e.object({filters:e.list(ks).optional(),code:Oz.optional()});});var Yz,Xz=n(()=>{b();Yz=e.object({metric:e.string()});});var Zz,qz=n(()=>{b();Gm();Xz();Zz=e.object({filters:e.list(ks).optional(),code:Yz.optional()});});var eS,rS=n(()=>{b();eS=e.enum_(["evaluator","annotation_queue_router"]);});var tS,iS=n(()=>{b();Tm();Si();tS=e.object({filters:e.list(jr).optional(),code:ts.optional()});});var oS,aS=n(()=>{b();jt();jm();oS=e.object({filters:e.list(ar).optional(),code:is.optional()});});var nS,sS=n(()=>{b();jt();Cm();nS=e.object({filters:e.list(ar).optional(),code:os.optional()});});var pS,cS=n(()=>{b();vt();Em();pS=e.object({filters:e.list(or).optional(),code:as.optional()});});var lS,mS=n(()=>{b();vt();Im();lS=e.object({filters:e.list(or).optional(),code:ns.optional()});});var dS,uS=n(()=>{b();dS=e.enum_(["production","experiment","both"]);});var gS,fS=n(()=>{b();Si();Dm();gS=e.object({filters:e.list(jr).optional(),code:ss.optional()});});var Ci,hS,lZ=n(()=>{b();rS();iS();aS();sS();cS();mS();uS();fS();Ci=e.object({name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",dS.optional()),projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),action:eS}),hS=e.union("type",{llm_as_judge:tS.extend(Ci),user_defined_metric_python:gS.extend(Ci),trace_thread_llm_as_judge:pS.extend(Ci),trace_thread_user_defined_metric_python:lS.extend(Ci),span_llm_as_judge:oS.extend(Ci),span_user_defined_metric_python:nS.extend(Ci)}).transform({transform:p=>p,untransform:p=>p});});var yS,bS=n(()=>{b();yS=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var RS,xS=n(()=>{b();Nm();bS();RS=e.object({filters:e.list(fs).optional(),code:yS.optional()});});var wS,_S=n(()=>{b();wS=e.enum_(["evaluator","annotation_queue_router"]);});var kS,AS=n(()=>{b();kS=e.enum_(["production","experiment","both"]);});var Ei,PS,mZ=n(()=>{b();mz();Mz();Jz();$z();qz();xS();_S();AS();Ei=e.object({projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",kS.optional()),action:wS}),PS=e.union("type",{llm_as_judge:lz.extend(Ei),user_defined_metric_python:RS.extend(Ei),trace_thread_llm_as_judge:Qz.extend(Ei),trace_thread_user_defined_metric_python:Zz.extend(Ei),span_llm_as_judge:Bz.extend(Ei),span_user_defined_metric_python:Lz.extend(Ei)}).transform({transform:p=>p,untransform:p=>p});});var zS,SS=n(()=>{b();zS=e.object({value:e.number().optional()});});var ue,dZ=n(()=>{b();ue=e.object({ids:e.list(e.string())});});var vS,TS=n(()=>{b();vS=e.object({workspaceId:e.property("workspace_id",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var Ii,uZ=n(()=>{b();TS();Ii=e.object({biInformation:e.property("bi_information",e.list(vS).optional())});});var jS,gZ=n(()=>{b();F_();jS=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(N_).optional()});});var CS,ES=n(()=>{b();CS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var IS,DS=n(()=>{b();ES();IS=e.object({details:CS.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var US,NS=n(()=>{b();US=e.object({trueLabel:e.string(),falseLabel:e.string()});});var FS,BS=n(()=>{b();NS();FS=e.object({details:US.optional()});});var MS,WS=n(()=>{b();MS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var As,Hm=n(()=>{b();WS();As=e.object({details:MS.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var VS,LS=n(()=>{b();VS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var JS,GS=n(()=>{b();LS();JS=e.object({details:VS.optional()});});var HS,OS=n(()=>{b();HS=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var KS,QS=n(()=>{b();KS=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var $S,fZ=n(()=>{b();OS();QS();ne();$S=e.object({commandId:e.property("command_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional()),type:KS.optional(),status:HS.optional(),args:V.optional(),result:V.optional(),error:V.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional()),pickedUpAt:e.property("picked_up_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional()),durationMs:e.property("duration_ms",e.number().optional())});});var YS,XS=n(()=>{b();YS=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var ZS,qS=n(()=>{b();XS();ne();ZS=e.object({commandId:e.property("command_id",e.string().optional()),type:YS.optional(),args:V.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional())});});var ev,hZ=n(()=>{b();qS();ev=e.object({commands:e.list(ZS).optional()});});var rv,yZ=n(()=>{b();rv=e.object({commandId:e.property("command_id",e.string().optional())});});var tv,iv=n(()=>{b();tv=e.object({categories:e.record(e.string(),e.number())});});var ov,av=n(()=>{b();iv();ov=e.object({details:tv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var nv,sv=n(()=>{b();nv=e.object({categories:e.record(e.string(),e.number())});});var pv,cv=n(()=>{b();sv();pv=e.object({details:nv.optional()});});var lv,mv=n(()=>{b();lv=e.object({categories:e.record(e.string(),e.number())});});var Ps,Om=n(()=>{b();mv();Ps=e.object({details:lv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var dv,uv=n(()=>{b();dv=e.object({categories:e.record(e.string(),e.number())});});var gv,fv=n(()=>{b();uv();gv=e.object({details:dv.optional()});});var hv,yv=n(()=>{b();hi();vm();hv=e.object({role:e.string().optional(),content:e.string().optional(),reasoningContent:e.string().optional(),toolCalls:e.list(Zn).optional(),functionCall:Ar.optional()});});var bv,Rv=n(()=>{b();bv=e.object({token:e.string().optional(),logprob:e.number().optional(),bytes:e.list(e.number()).optional()});});var xv,wv=n(()=>{b();Rv();xv=e.object({content:e.list(bv).optional()});});var _v,kv=n(()=>{b();VA();yv();wv();_v=e.object({index:e.number().optional(),message:WA.optional(),delta:hv.optional(),finishReason:e.string().optional(),logprobs:xv.optional()});});var Av,Pv=n(()=>{b();Av=e.object({reasoningTokens:e.number().optional()});});var zv,Sv=n(()=>{b();zv=e.object({cachedTokens:e.number().optional(),cacheWriteTokens:e.number().optional()});});var vv,Tv=n(()=>{b();Pv();Sv();vv=e.object({totalTokens:e.number().optional(),promptTokens:e.number().optional(),promptTokensDetails:zv.optional(),completionTokens:e.number().optional(),completionTokensDetails:Av.optional()});});var jv,bZ=n(()=>{b();kv();Tv();jv=e.object({id:e.string().optional(),created:e.number().optional(),model:e.string().optional(),choices:e.list(_v).optional(),usage:vv.optional(),systemFingerprint:e.string().optional(),serviceTier:e.string().optional()});});var Cv,Ev=n(()=>{b();Cv=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var Iv,Dv=n(()=>{b();Iv=e.enum_(["passed","failed"]);});var Uv,Nv=n(()=>{b();Ev();Dv();Uv=e.object({name:Cv.optional(),result:Iv.optional()});});var Fv,Bv=n(()=>{b();Fv=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var Mv,Wv=n(()=>{b();Mv=e.enum_(["passed","failed"]);});var Vv,Lv=n(()=>{b();Bv();Wv();Vv=e.object({name:Fv.optional(),result:Mv.optional()});});var Jv,Gv=n(()=>{b();Jv=e.object({typeName:e.string().optional()});});var ece,RZ=n(()=>{b();Gv();ece=e.object({type:Jv.optional(),closed:e.boolean().optional()});});var Hv,Ov=n(()=>{b();Hv=e.object({typeName:e.string().optional()});});var rce,xZ=n(()=>{b();Ov();rce=e.object({type:Hv.optional(),closed:e.boolean().optional()});});var Kv,wZ=n(()=>{b();Kv=e.object({clientId:e.property("client_id",e.string().optional()),clientIdIssuedAt:e.property("client_id_issued_at",e.number().optional()),clientName:e.property("client_name",e.string().optional()),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional()),redirectUris:e.property("redirect_uris",e.list(e.string()).optional()),tokenEndpointAuthMethod:e.property("token_endpoint_auth_method",e.string().optional()),grantTypes:e.property("grant_types",e.list(e.string()).optional()),responseTypes:e.property("response_types",e.list(e.string()).optional())});});var Qv,$v=n(()=>{b();Qv=e.enum_(["string","number","object","boolean","array","null"]);});var Yv,Xv=n(()=>{b();$v();Yv=e.object({name:e.string().optional(),types:e.list(Qv).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var Zv,qv=n(()=>{b();Zv=e.enum_(["string","number","object","boolean","array","null"]);});var eT,rT=n(()=>{b();qv();eT=e.object({name:e.string().optional(),types:e.list(Zv).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var tT,iT=n(()=>{b();tT=e.enum_(["string","number","object","boolean","array","null"]);});var oT,aT=n(()=>{b();iT();oT=e.object({name:e.string().optional(),types:e.list(tT).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var nT,sT=n(()=>{b();nT=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Vt,zs=n(()=>{b();Vt=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var pT,cT=n(()=>{b();pT=e.enum_(["trace","span"]);});var lT,mT=n(()=>{b();lT=e.object({eTag:e.property("e_tag",e.string()),partNumber:e.property("part_number",e.number())});});var Km,_Z=n(()=>{b();cT();mT();Km=e.object({fileName:e.property("file_name",e.string()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",pT),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string().optional()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string().optional()),uploadId:e.property("upload_id",e.string()),uploadedFileParts:e.property("uploaded_file_parts",e.list(lT))});});var dT,kZ=n(()=>{b();dT=e.object({redirectTo:e.property("redirect_to",e.string().optional())});});var uT,gT=n(()=>{b();uT=e.object({value:e.number().optional()});});var fT,AZ=n(()=>{b();fT=e.object({sessionId:e.property("session_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional())});});var hT,yT=n(()=>{b();hT=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var bT,RT=n(()=>{b();bT=e.enum_(["workspace","insights"]);});var xT,wT=n(()=>{b();xT=e.enum_(["multi_project","experiments"]);});var nr,_T=n(()=>{b();RT();wT();yr();nr=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),type:xT.optional(),scope:bT.optional(),description:e.string().optional(),config:ke,createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var Lt,PZ=n(()=>{b();_T();Lt=e.object({content:e.list(nr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Ss,zZ=n(()=>{b();Ss=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sql:e.string(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var kT,AT=n(()=>{b();kT=e.enum_(["multi_project","experiments"]);});var vs,SZ=n(()=>{b();AT();yr();vs=e.object({name:e.string().optional(),type:kT.optional(),description:e.string().optional(),config:ke.optional()});});var Ts,vZ=n(()=>{b();Ts=e.object({intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional())});});var PT,zT=n(()=>{b();PT=e.enum_(["multi_project","experiments"]);});var js,TZ=n(()=>{b();zT();zr();js=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string(),type:PT.optional(),description:e.string().optional(),config:Te});});var tce,jZ=n(()=>{b();tce=e.object({time:e.date(),value:e.number().optional()});});var ST,vT=n(()=>{b();ST=e.object({time:e.date(),value:e.number().optional()});});var TT,jT=n(()=>{b();TT=e.enum_(["unknown","processing","completed","failed"]);});var CT,ET=n(()=>{b();CT=e.enum_(["dataset","evaluation_suite"]);});var Cs,Qm=n(()=>{b();Cs=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var IT,DT=n(()=>{b();IT=e.enum_(["private","public"]);});var ice,CZ=n(()=>{b();jT();ET();Qm();DT();ice=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:CT.optional(),visibility:IT.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:TT.optional(),latestVersion:e.property("latest_version",Cs.optional())});});var oce,EZ=n(()=>{b();oce=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var UT,NT=n(()=>{b();UT=e.enum_(["manual","trace","span","sdk"]);});var FT,BT=n(()=>{b();FT=e.enum_(["passed","failed"]);});var MT,WT=n(()=>{b();BT();MT=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:FT.optional()});});var Es,$m=n(()=>{b();NT();yi();Rt();pl();WT();ne();Es=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:UT,data:V,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),experimentItems:e.property("experiment_items",e.list(Aa).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),MT).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var VT,IZ=n(()=>{b();$m();VT=e.object({generatedSamples:e.property("generated_samples",e.list(Es).optional()),model:e.string().optional(),totalGenerated:e.property("total_generated",e.number().optional()),generationTime:e.property("generation_time",e.date().optional())});});var ace,DZ=n(()=>{b();$m();ace=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(Es),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var LT,UZ=n(()=>{b();LT=e.record(e.string(),e.unknown());});var JT,GT=n(()=>{b();JT=e.enum_(["manual","trace","span","sdk"]);});var HT,OT=n(()=>{b();HT=e.enum_(["llm_judge","code_metric"]);});var KT,QT=n(()=>{b();KT=e.record(e.string(),e.unknown());});var $T,YT=n(()=>{b();OT();QT();$T=e.object({name:e.string(),type:HT,config:KT});});var Is,Ym=n(()=>{b();Is=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var XT,ZT=n(()=>{b();XT=e.enum_(["passed","failed"]);});var qT,ej=n(()=>{b();qT=e.enum_(["default","hidden"]);});var rj,tj=n(()=>{b();rj=e.enum_(["ui","sdk","online_scoring"]);});var ij,oj=n(()=>{b();ij=e.enum_(["ui","sdk","online_scoring"]);});var aj,nj=n(()=>{b();oj();aj=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:ij.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var sj,pj=n(()=>{b();tj();nj();sj=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:rj,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),aj).optional())});});var Ds,cj=n(()=>{b();Ds=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var lj,mj=n(()=>{b();CA();sT();Ym();ZT();ej();pj();cj();lj=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),input:Ds.optional(),output:Ds.optional(),traceMetadata:e.property("trace_metadata",Ds.optional()),feedbackScores:e.property("feedback_scores",e.list(sj).optional()),comments:e.list(nT).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",qT.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",Is.optional()),assertionResults:e.property("assertion_results",e.list(jA).optional()),status:XT.optional()});});var dj,uj=n(()=>{b();dj=e.enum_(["passed","failed"]);});var gj,fj=n(()=>{b();uj();gj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:dj.optional()});});var hj,yj=n(()=>{b();GT();YT();Ym();mj();fj();ne();hj=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:JT,data:V,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list($T).optional(),executionPolicy:e.property("execution_policy",Is.optional()),experimentItems:e.property("experiment_items",e.list(lj).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),gj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var bj,NZ=n(()=>{b();rT();yj();bj=e.object({content:e.list(hj).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(eT).optional(),sortableBy:e.list(e.string()).optional()});});var Rj,xj=n(()=>{b();Rj=e.enum_(["manual","trace","span","sdk"]);});var wj,_j=n(()=>{b();wj=e.enum_(["llm_judge","code_metric"]);});var Us,Xm=n(()=>{b();_j();yr();Us=e.object({name:e.string(),type:wj,config:ke});});var Ns,Zm=n(()=>{b();Ns=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var kj,Aj=n(()=>{b();kj=e.enum_(["default","hidden"]);});var Fs,Pj=n(()=>{b();Aj();Fs=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",kj.optional())});});var zj,Sj=n(()=>{b();zj=e.enum_(["passed","failed"]);});var vj,Tj=n(()=>{b();Sj();vj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:zj.optional()});});var Bs,jj=n(()=>{b();xj();Xm();Zm();Pj();Tj();ne();Bs=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:Rj,data:V,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Us).optional(),executionPolicy:e.property("execution_policy",Ns.optional()),experimentItems:e.property("experiment_items",e.list(Fs).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),vj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Cj,FZ=n(()=>{b();aT();jj();Cj=e.object({content:e.list(Bs).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(oT).optional(),sortableBy:e.list(e.string()).optional()});});var Ej,Ij=n(()=>{b();Ej=e.enum_(["unknown","processing","completed","failed"]);});var Dj,Uj=n(()=>{b();Dj=e.enum_(["dataset","evaluation_suite"]);});var Nj,Fj=n(()=>{b();Nj=e.enum_(["private","public"]);});var Ms,qm=n(()=>{b();Ms=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var Di,Bj=n(()=>{b();Ij();Uj();Fj();qm();Di=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),type:Dj.optional(),visibility:Nj.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:Ej.optional(),latestVersion:e.property("latest_version",Ms.optional())});});var Ws,BZ=n(()=>{b();Bj();Ws=e.object({content:e.list(Di).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.list(e.string()).optional()});});var Mj,Wj=n(()=>{b();Mj=e.object({itemsAdded:e.number().optional(),itemsModified:e.number().optional(),itemsDeleted:e.number().optional(),itemsUnchanged:e.number().optional()});});var Vj,MZ=n(()=>{b();Wj();Vj=e.object({fromVersion:e.property("from_version",e.string().optional()),toVersion:e.property("to_version",e.string().optional()),statistics:Mj.optional()});});var Cr,Lj=n(()=>{b();Xm();Zm();Cr=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),versionHash:e.property("version_hash",e.string().optional()),tags:e.list(e.string()).optional(),isLatest:e.property("is_latest",e.boolean().optional()),versionName:e.property("version_name",e.string().optional()),itemsTotal:e.property("items_total",e.number().optional()),itemsAdded:e.property("items_added",e.number().optional()),itemsModified:e.property("items_modified",e.number().optional()),itemsDeleted:e.property("items_deleted",e.number().optional()),changeDescription:e.property("change_description",e.string().optional()),metadata:e.record(e.string(),e.string()).optional(),evaluators:e.list(Us).optional(),executionPolicy:e.property("execution_policy",Ns.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Jj,WZ=n(()=>{b();Lj();Jj=e.object({content:e.list(Cr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var Gj,Hj=n(()=>{b();Gj=e.enum_(["trace","span"]);});var nce,VZ=n(()=>{b();Hj();nce=e.object({fileNames:e.property("file_names",e.list(e.string())),entityType:e.property("entity_type",Gj),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string())});});var Vs,LZ=n(()=>{b();Vs=e.object({name:e.string(),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Ui,JZ=n(()=>{b();Ui=e.object({ids:e.list(e.string())});});var Oj,Kj=n(()=>{b();Oj=e.object({accepted:e.boolean().optional(),levels:e.list(e.string()).optional(),default:e.string().optional()});});var sce,GZ=n(()=>{b();sce=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Ls,Qj=n(()=>{b();Ls=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var $j,HZ=n(()=>{b();Qj();$j=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Ls).optional(),sortableBy:e.list(e.string()).optional()});});var Js,ed=n(()=>{b();Js=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var Yj,Xj=n(()=>{b();Yj=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var Jt,Gs=n(()=>{b();Jt=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Zj,OZ=n(()=>{b();Zj=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var pce,KZ=n(()=>{b();pce=e.object({errors:e.list(e.string()).optional()});});var cce,QZ=n(()=>{b();cce=e.object({errors:e.list(e.string()).optional()});});var lce,$Z=n(()=>{b();lce=e.object({errors:e.list(e.string()).optional()});});var mce,YZ=n(()=>{b();mce=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var dce,XZ=n(()=>{b();dce=e.object({errors:e.list(e.string()).optional()});});var Hs,ZZ=n(()=>{b();Hs=e.object({exists:e.boolean().optional()});});var qj,eC=n(()=>{b();qj=e.enum_(["dataset","evaluation_suite"]);});var rC,tC=n(()=>{b();rC=e.enum_(["running","completed","cancelled","failed"]);});var iC,oC=n(()=>{b();iC=e.enum_(["regular","trial","mini-batch","mutation"]);});var uce,qZ=n(()=>{b();IA();xt();Qm();eC();nl();tC();oC();Qr();Ze();zi();ba();uce=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),type:iC.optional(),evaluationMethod:e.property("evaluation_method",qj.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),comments:e.list(he).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:rC.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(fa).optional()),promptVersion:e.property("prompt_version",Or.optional()),promptVersions:e.property("prompt_versions",e.list(Or).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Cs.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(EA).optional())});});var aC,nC=n(()=>{b();aC=e.object({experimentId:e.property("experiment_id",e.string().optional()),promptIndex:e.property("prompt_index",e.number().optional()),totalItems:e.property("total_items",e.number().optional())});});var sC,e7=n(()=>{b();nC();sC=e.object({experiments:e.list(aC).optional(),totalItems:e.property("total_items",e.number().optional())});});var pC,cC=n(()=>{b();fk();pC=e.object({label:e.string().optional(),aggregations:gk.optional()});});var lC,r7=n(()=>{b();cC();lC=e.object({content:e.record(e.string(),pC).optional()});});var mC,dC=n(()=>{b();mC=e.object({label:e.string().optional()});});var uC,gC=n(()=>{b();uC=e.object({groupSorting:e.property("group_sorting",e.list(e.string()).optional())});});var fC,hC=n(()=>{b();gC();fC=e.object({groupsDetails:e.property("groups_details",e.list(uC).optional())});});var yC,t7=n(()=>{b();dC();hC();yC=e.object({content:e.record(e.string(),mC).optional(),details:fC.optional()});});var bC,RC=n(()=>{b();bC=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xC,wC=n(()=>{b();xC=e.enum_(["general","tool","llm","guardrail"]);});var Os,rd=n(()=>{b();xt();Kr();wt();Ze();RC();wC();Os=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:xC.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Ke.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:bC.optional(),environment:e.string().optional()});});var _C,kC=n(()=>{b();_C=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var AC,PC=n(()=>{b();Nv();AC=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(Uv).optional()});});var zC,SC=n(()=>{b();zC=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vC,TC=n(()=>{b();vC=e.enum_(["default","hidden"]);});var Ks,td=n(()=>{b();Sm();xt();Kr();kC();wt();PC();Ze();SC();TC();Ks=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Ke.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(AC).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",vC.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:_C.optional(),annotationQueues:e.property("annotation_queues",e.list(Xn).optional()),source:zC.optional(),environment:e.string().optional()});});var jC,CC=n(()=>{b();wt();Ze();rd();td();jC=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",me.optional()),trace:Ks.optional(),spans:e.list(Os).optional(),feedbackScores:e.property("feedback_scores",e.list(ze).optional())});});var gce,i7=n(()=>{b();CC();gce=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(jC)});});var EC,IC=n(()=>{b();EC=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var DC,UC=n(()=>{b();DC=e.enum_(["dataset","evaluation_suite"]);});var NC,FC=n(()=>{b();NC=e.enum_(["running","completed","cancelled","failed"]);});var BC,MC=n(()=>{b();BC=e.enum_(["regular","trial","mini-batch","mutation"]);});var WC,VC=n(()=>{b();WC=e.object({name:e.string(),value:e.number()});});var Qe,Ni=n(()=>{b();Qe=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Qs,id=n(()=>{b();Qs=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var $s,LC=n(()=>{b();UA();zs();qm();UC();FC();MC();VC();$n();Ni();id();Bl();$s=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),type:BC.optional(),evaluationMethod:e.property("evaluation_method",DC.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),comments:e.list(Vt).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Qs.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:NC.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(WC).optional()),promptVersion:e.property("prompt_version",Ai.optional()),promptVersions:e.property("prompt_versions",e.list(Ai).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Ms.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(DA).optional())});});var Ys,o7=n(()=>{b();LC();Ys=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list($s).optional(),sortableBy:e.list(e.string()).optional()});});var fce,a7=n(()=>{ne();fce=V;});var JC,GC=n(()=>{b();JC=e.object({max:e.number(),min:e.number()});});var HC,OC=n(()=>{b();GC();HC=e.object({details:JC.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var KC,hce,n7=n(()=>{b();DS();av();OC();KC=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),hce=e.union("type",{numerical:HC.extend(KC),categorical:ov.extend(KC),boolean:IS.extend(KC)}).transform({transform:p=>p,untransform:p=>p});});var QC,$C=n(()=>{b();QC=e.object({max:e.number(),min:e.number()});});var YC,XC=n(()=>{b();$C();YC=e.object({details:QC.optional()});});var ZC,qC,s7=n(()=>{b();BS();cv();XC();ZC=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),qC=e.union("type",{numerical:YC.extend(ZC),categorical:pv.extend(ZC),boolean:FS.extend(ZC)}).transform({transform:p=>p,untransform:p=>p});});var eE,rE=n(()=>{b();eE=e.object({max:e.number(),min:e.number()});});var Xs,od=n(()=>{b();rE();Xs=e.object({details:eE.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var tE,iE,oE=n(()=>{b();Hm();Om();od();tE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),iE=e.union("type",{numerical:Xs.extend(tE),categorical:Ps.extend(tE),boolean:As.extend(tE)}).transform({transform:p=>p,untransform:p=>p});});var aE,p7=n(()=>{b();oE();aE=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(iE).optional()});});var nE,sE,c7=n(()=>{b();Hm();Om();od();nE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),sE=e.union("type",{numerical:Xs.extend(nE),categorical:Ps.extend(nE),boolean:As.extend(nE)}).transform({transform:p=>p,untransform:p=>p});});var pE,cE=n(()=>{b();pE=e.object({name:e.string(),value:e.number()});});var lE,mE=n(()=>{b();lE=e.enum_(["ui","sdk","online_scoring"]);});var dE,uE=n(()=>{b();mE();dE=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:lE,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),id:e.string()});});var Zs,l7=n(()=>{b();uE();Zs=e.object({scores:e.list(dE)});});var gE,fE=n(()=>{b();gE=e.object({name:e.string().optional(),type:e.string().optional()});});var hE,m7=n(()=>{b();fE();hE=e.object({scores:e.list(gE).optional()});});var yE,bE=n(()=>{b();yE=e.object({name:e.string().optional(),type:e.string().optional()});});var Xr,d7=n(()=>{b();bE();Xr=e.object({scores:e.list(yE).optional()});});var RE,xE=n(()=>{b();RE=e.enum_(["ui","sdk","online_scoring"]);});var wE,_E=n(()=>{b();wE=e.enum_(["ui","sdk","online_scoring"]);});var kE,AE=n(()=>{b();_E();kE=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:wE.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var Fi,ad=n(()=>{b();xE();AE();Fi=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:RE,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),kE).optional())});});var PE,zE=n(()=>{b();PE=e.object({max:e.number(),min:e.number()});});var SE,vE=n(()=>{b();zE();SE=e.object({details:PE.optional()});});var TE,jE,u7=n(()=>{b();GS();fv();vE();TE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),jE=e.union("type",{numerical:SE.extend(TE),categorical:gv.extend(TE),boolean:JS.extend(TE)}).transform({transform:p=>p,untransform:p=>p});});var Bi,nd=n(()=>{b();Bi=e.object({accepted:e.boolean().optional()});});var CE,g7=n(()=>{b();CE=e.object({reportId:e.string().optional()});});var EE,IE=n(()=>{b();EE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var DE,UE=n(()=>{b();DE=e.enum_(["passed","failed"]);});var NE,FE=n(()=>{b();IE();UE();ne();NE=e.object({id:e.string().optional(),entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:EE,result:DE,config:V,details:V});});var yce,f7=n(()=>{b();FE();yce=e.object({guardrails:e.list(NE)});});var BE,ME=n(()=>{b();BE=e.enum_(["on_request","global"]);});var WE,VE=n(()=>{b();WE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var LE,JE=n(()=>{b();VE();ne();LE=e.object({type:WE,config:V});});var bce,h7=n(()=>{b();ME();JE();bce=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",BE.optional()),rules:e.list(LE),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var GE,HE=n(()=>{b();GE=e.enum_(["on_request","global"]);});var OE,KE=n(()=>{b();OE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var QE,$E=n(()=>{b();KE();ne();QE=e.object({type:OE,config:V});});var qs,YE=n(()=>{b();HE();$E();qs=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",GE.optional()),rules:e.list(QE),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var XE,y7=n(()=>{b();YE();XE=e.object({content:e.list(qs).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var ZE,qE=n(()=>{b();ZE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var eI,rI=n(()=>{b();qE();ne();eI=e.object({type:ZE,config:V});});var tI,iI=n(()=>{b();tI=e.enum_(["on_request","global"]);});var sd,b7=n(()=>{b();rI();iI();sd=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",tI.optional()),rules:e.list(eI)});});var oI,aI=n(()=>{b();Lv();oI=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(Vv).optional()});});var nI,sI=n(()=>{b();nI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var pI,cI=n(()=>{b();ne();sI();pI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),type:nI,validationConfig:e.property("validation_config",V),validationDetails:e.property("validation_details",V),error:e.string().optional()});});var lI,R7=n(()=>{b();cI();lI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),validations:e.list(pI)});});var mI,dI=n(()=>{b();mI=e.object({activeLocks:e.property("active_locks",e.number().optional()),lockedBy:e.property("locked_by",e.list(e.string()).optional())});});var uI,gI=n(()=>{b();uI=e.enum_(["count","errors","avg_duration","total_cost"]);});var fI,hI=n(()=>{b();gI();fI=e.object({type:uI.optional(),currentValue:e.property("current_value",e.number().optional()),previousValue:e.property("previous_value",e.number().optional())});});var yI,x7=n(()=>{b();hI();yI=e.object({stats:e.list(fI).optional()});});var bI,RI=n(()=>{b();bI=e.enum_(["pairing","connected","disconnected"]);});var xI,wI=n(()=>{b();xI=e.enum_(["connect","endpoint"]);});var ep,_I=n(()=>{b();T_();ne();RI();wI();ep=e.object({id:e.string().optional(),name:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:bI.optional(),connectedAt:e.property("connected_at",e.date().optional()),agents:e.list(v_).optional(),capabilities:e.list(e.string()).optional(),checklist:V.optional(),type:xI.optional()});});var kI,w7=n(()=>{b();kI=e.object({cancelledJobIds:e.property("cancelled_job_ids",e.list(e.string()).optional())});});var AI,_7=n(()=>{b();em();AI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(zt).optional()});});var PI,k7=n(()=>{b();_I();PI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ep).optional()});});var zI,A7=n(()=>{b();zI=e.object({acquired:e.boolean().optional(),itemId:e.property("item_id",e.string().optional()),lockedBy:e.property("locked_by",e.string().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var SI,P7=n(()=>{b();dI();SI=e.object({locks:e.record(e.string(),mI).optional()});});var vI,TI=n(()=>{b();vI=e.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var jI,CI=n(()=>{b();TI();jI=e.object({timestamp:e.date().optional(),ruleId:e.property("rule_id",e.string().optional()),level:vI.optional(),message:e.string().optional(),markers:e.record(e.string(),e.string()).optional()});});var EI,z7=n(()=>{b();CI();EI=e.object({content:e.list(jI).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var II,DI=n(()=>{b();II=e.enum_(["trace","thread","span"]);});var rp,S7=n(()=>{b();DI();rp=e.object({projectId:e.property("project_id",e.string()),entityIds:e.property("entity_ids",e.list(e.string())),ruleIds:e.property("rule_ids",e.list(e.string())),entityType:e.property("entity_type",II)});});var tp,v7=n(()=>{b();tp=e.object({entitiesQueued:e.property("entities_queued",e.number().optional()),rulesApplied:e.property("rules_applied",e.number().optional())});});var Zr,UI=n(()=>{b();Zr=e.object({accepted:e.boolean().optional(),min:e.number().optional(),max:e.number().optional(),default:e.number().optional()});});var NI,FI=n(()=>{b();NI=e.enum_(["effortNoneOnly","refused"]);});var BI,MI=n(()=>{b();nd();FI();BI=e.object({chatCompletions:NI.optional(),forcedChoice:Bi.optional()});});var Ea,T7=n(()=>{b();ie();Kj();nd();UI();MI();Ea=e.object({temperature:Zr.optional(),topP:Zr.optional(),topK:Zr.optional(),frequencyPenalty:Zr.optional(),presencePenalty:Zr.optional(),maxOutputTokens:Zr.optional(),stop:Bi.optional(),seed:Bi.optional(),effort:Oj.optional(),tools:BI.optional(),samplingExclusive:e.boolean().optional(),thinksByDefault:e.boolean().optional(),onlyRoute:e.string().optional(),routes:e.record(e.string(),e.lazyObject(()=>Ea)).optional()});});var Rce,j7=n(()=>{b();Rce=e.object({error:e.string().optional(),errorDescription:e.property("error_description",e.string().optional())});});var pd,C7=n(()=>{b();pd=e.object({connected:e.boolean().optional(),version:e.string().optional(),errorMessage:e.property("error_message",e.string().optional())});});var cd,E7=n(()=>{b();cd=e.object({baseUrl:e.property("base_url",e.string()),apiKey:e.property("api_key",e.string().optional())});});var WI,VI=n(()=>{b();WI=e.enum_(["pending","completed","failed"]);});var LI,JI=n(()=>{b();ne();VI();LI=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sessionId:e.property("session_id",e.string().optional()),content:e.string().optional(),recommendedActions:e.property("recommended_actions",V.optional()),status:WI.optional(),failureReason:e.property("failure_reason",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var GI,I7=n(()=>{b();JI();GI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(LI).optional()});});var HI,OI=n(()=>{b();HI=e.enum_(["running","completed","cancelled","initialized","error"]);});var KI,QI=n(()=>{b();ne();KI=e.object({type:e.string(),parameters:V.optional()});});var $I,YI=n(()=>{b();QI();$I=e.object({metrics:e.list(KI)});});var XI,ZI=n(()=>{b();ne();XI=e.object({model:e.string(),parameters:V.optional()});});var qI,eD=n(()=>{b();ne();qI=e.object({type:e.string(),parameters:V.optional()});});var rD,tD=n(()=>{b();rD=e.object({role:e.string(),content:e.string()});});var iD,oD=n(()=>{b();tD();iD=e.object({messages:e.list(rD)});});var aD,nD=n(()=>{b();YI();ZI();eD();oD();aD=e.object({datasetName:e.property("dataset_name",e.string()),prompt:iD,llmModel:e.property("llm_model",XI),evaluation:$I,optimizer:qI});});var xce,D7=n(()=>{b();Kr();Qr();Ze();OI();nD();xce=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:HI,metadata:me.optional(),studioConfig:e.property("studio_config",aD.optional()),errorInfo:e.property("error_info",Ke.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),experimentScores:e.property("experiment_scores",e.list(je).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var sD,pD=n(()=>{b();sD=e.enum_(["running","completed","cancelled","initialized","error"]);});var cD,lD=n(()=>{b();yr();cD=e.object({type:e.string(),parameters:ke.optional()});});var mD,dD=n(()=>{b();lD();mD=e.object({metrics:e.list(cD)});});var uD,gD=n(()=>{b();yr();uD=e.object({model:e.string(),parameters:ke.optional()});});var fD,hD=n(()=>{b();yr();fD=e.object({type:e.string(),parameters:ke.optional()});});var yD,bD=n(()=>{b();yD=e.object({role:e.string(),content:e.string()});});var RD,xD=n(()=>{b();bD();RD=e.object({messages:e.list(yD)});});var wD,_D=n(()=>{b();dD();gD();hD();xD();wD=e.object({datasetName:e.property("dataset_name",e.string()),prompt:RD,llmModel:e.property("llm_model",uD),evaluation:mD,optimizer:fD});});var ip,kD=n(()=>{b();Gs();$n();Ni();pD();_D();ip=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:sD,metadata:Qe.optional(),studioConfig:e.property("studio_config",wD.optional()),errorInfo:e.property("error_info",Jt.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),experimentScores:e.property("experiment_scores",e.list(Yr).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var op,U7=n(()=>{b();kD();op=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ip).optional(),sortableBy:e.list(e.string()).optional()});});var AD,PD=n(()=>{b();zr();AD=e.object({type:e.string(),parameters:Te.optional()});});var zD,SD=n(()=>{b();PD();zD=e.object({metrics:e.list(AD)});});var vD,TD=n(()=>{b();zr();vD=e.object({model:e.string(),parameters:Te.optional()});});var jD,CD=n(()=>{b();zr();jD=e.object({type:e.string(),parameters:Te.optional()});});var ED,ID=n(()=>{b();ED=e.object({role:e.string(),content:e.string()});});var DD,UD=n(()=>{b();ID();DD=e.object({messages:e.list(ED)});});var ND,FD=n(()=>{b();SD();TD();CD();UD();ND=e.object({datasetName:e.property("dataset_name",e.string()),prompt:DD,llmModel:e.property("llm_model",vD),evaluation:zD,optimizer:jD});});var BD,N7=n(()=>{b();BD=e.object({url:e.string().optional(),lastModified:e.property("last_modified",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var MD,WD=n(()=>{b();MD=e.enum_(["running","completed","cancelled","initialized","error"]);});var ld,F7=n(()=>{b();bn();xi();FD();WD();ld=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:MD,metadata:Oe.optional(),studioConfig:e.property("studio_config",ND.optional()),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var VD,B7=n(()=>{b();Xv();VD=e.object({columns:e.list(Yv).optional()});});var LD,JD=n(()=>{b();id();LD=e.object({value:Qs.optional()});});var GD,HD=n(()=>{b();GD=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var OD,KD=n(()=>{b();OD=e.object({permissionName:e.string().optional(),permissionValue:e.string().optional()});});var QD,$D=n(()=>{b();QD=e.enum_(["private","public"]);});var wce,M7=n(()=>{b();ed();Qr();zi();$D();wce=e.object({id:e.string().optional(),name:e.string(),visibility:QD.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Js.optional())});});var YD,XD=n(()=>{b();YD=e.enum_(["private","public"]);});var ZD,W7=n(()=>{b();Xj();cE();HD();XD();ZD=e.object({id:e.string().optional(),name:e.string(),visibility:YD.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(pE).optional()),duration:GD.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Yj.optional())});});var qD,eU=n(()=>{b();qD=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var rU,tU=n(()=>{b();rU=e.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 iU,oU=n(()=>{b();vT();iU=e.object({name:e.string().optional(),data:e.list(ST).optional()});});var aU,V7=n(()=>{b();eU();tU();oU();aU=e.object({projectId:e.property("project_id",e.string().optional()),metricType:e.property("metric_type",rU.optional()),interval:qD.optional(),results:e.list(iU).optional()});});var nU,sU=n(()=>{b();nU=e.enum_(["private","public"]);});var ap,pU=n(()=>{b();sU();ap=e.object({id:e.string().optional(),name:e.string(),visibility:nU.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional())});});var cU,L7=n(()=>{b();pU();cU=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ap).optional(),sortableBy:e.list(e.string()).optional()});});var lU,mU,dU=n(()=>{b();SS();gT();JD();lU=e.object({name:e.string().optional()}),mU=e.union("type",{PERCENTAGE:LD.extend(lU),COUNT:uT.extend(lU),AVG:zS.extend(lU)}).transform({transform:p=>p,untransform:p=>p});});var qr,J7=n(()=>{b();dU();qr=e.object({stats:e.list(mU).optional()});});var uU,gU=n(()=>{b();ed();Qr();zi();uU=e.object({projectId:e.property("project_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Js.optional())});});var fU,G7=n(()=>{b();gU();fU=e.object({content:e.list(uU).optional()});});var hU,yU=n(()=>{b();hU=e.enum_(["text","chat"]);});var bU,RU=n(()=>{b();bU=e.enum_(["mustache","jinja2","python"]);});var xU,wU=n(()=>{b();xU=e.enum_(["text","chat"]);});var _U,kU=n(()=>{b();_U=e.enum_(["mustache","jinja2","python"]);});var AU,PU=n(()=>{b();AU=e.enum_(["prompt_version","mask"]);});var md,zU=n(()=>{b();ne();wU();kU();PU();md=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:V.optional(),type:_U.optional(),versionType:e.property("version_type",AU.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",xU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var _ce,H7=n(()=>{b();ne();yU();RU();zU();_ce=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:V.optional(),changeDescription:e.property("change_description",e.string().optional()),type:bU.optional(),templateStructure:e.property("template_structure",hU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",md.optional()),requestedVersion:e.property("requested_version",md.optional())});});var SU,vU=n(()=>{b();SU=e.enum_(["text","chat"]);});var dd,O7=n(()=>{b();vU();Ya();dd=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",SU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",Fe.optional()),requestedVersion:e.property("requested_version",Fe.optional())});});var TU,jU=n(()=>{b();TU=e.enum_(["text","chat"]);});var CU,EU=n(()=>{b();jU();CU=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",TU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional())});});var np,K7=n(()=>{b();EU();np=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(CU).optional(),sortableBy:e.list(e.string()).optional()});});var IU,DU=n(()=>{b();IU=e.enum_(["text","chat"]);});var UU,NU=n(()=>{b();UU=e.enum_(["mustache","jinja2","python"]);});var FU,BU=n(()=>{b();FU=e.enum_(["prompt_version","mask"]);});var MU,WU=n(()=>{b();yr();DU();NU();BU();MU=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:ke.optional(),type:UU.optional(),versionType:e.property("version_type",FU.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),templateStructure:e.property("template_structure",IU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var VU,Q7=n(()=>{b();WU();VU=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(MU).optional(),sortableBy:e.list(e.string()).optional()});});var LU,JU=n(()=>{b();LU=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var kce,$7=n(()=>{b();JU();Ia();kce=e.object({id:e.string().optional(),provider:LU,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",kt.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var GU,HU=n(()=>{b();GU=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var OU,KU=n(()=>{b();OU=e.enum_(["form","json","basic"]);});var QU,$U=n(()=>{b();yT();KU();QU=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",OU.optional()),credentials:e.list(hT).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var sp,YU=n(()=>{b();HU();$U();sp=e.object({id:e.string().optional(),provider:GU,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",QU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var XU,Y7=n(()=>{b();YU();XU=e.object({size:e.number().optional(),total:e.number().optional(),content:e.list(sp).optional(),sortableBy:e.list(e.string()).optional()});});var ZU,qU=n(()=>{b();ZU=e.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var eN,rN=n(()=>{b();qU();eN=e.object({type:ZU.optional(),id:e.string().optional(),name:e.string().optional(),resourceId:e.property("resource_id",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional())});});var tN,X7=n(()=>{b();rN();tN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(eN).optional()});});var iN,oN=n(()=>{b();iN=e.enum_(["agent_insights"]);});var pp,aN=n(()=>{b();oN();pp=e.object({id:e.string().optional(),type:iN,projectId:e.property("project_id",e.string()),reason:e.string(),detail:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var nN,Z7=n(()=>{b();aN();nN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(pp).optional()});});var cp,q7=n(()=>{b();cp=e.object({projectId:e.property("project_id",e.string().optional()),enabled:e.boolean().optional(),scheduleTime:e.property("schedule_time",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var sN,eq=n(()=>{b();sN=e.object({enrolled:e.number().optional(),cleared:e.number().optional(),unknownProjectIds:e.property("unknown_project_ids",e.list(e.string()).optional()),alreadyRunProjectIds:e.property("already_run_project_ids",e.list(e.string()).optional()),resetProjectIds:e.property("reset_project_ids",e.list(e.string()).optional())});});var Er,ud=n(()=>{b();Er=e.object({name:e.string().optional(),current:e.number().optional(),previous:e.number().optional()});});var pN,cN=n(()=>{b();pN=e.enum_(["organization","workspace","project"]);});var lN,mN=n(()=>{b();lN=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Mi,dN=n(()=>{b();cN();mN();Mi=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),level:pN.optional(),retention:lN,applyToPast:e.property("apply_to_past",e.boolean().optional()),enabled:e.boolean().optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),catchUpCursor:e.property("catch_up_cursor",e.string().optional()),catchUpDone:e.property("catch_up_done",e.boolean().optional())});});var uN,rq=n(()=>{b();dN();uN=e.object({content:e.list(Mi).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var gN,tq=n(()=>{b();gN=e.object({pythonEvaluatorEnabled:e.boolean(),traceThreadPythonEvaluatorEnabled:e.boolean(),spanLlmAsJudgeEnabled:e.boolean(),spanUserDefinedMetricPythonEnabled:e.boolean(),guardrailsEnabled:e.boolean(),guardrailsValidationsEnabled:e.boolean(),opikAiEnabled:e.property("opikAIEnabled",e.boolean()),alertsEnabled:e.boolean(),welcomeWizardEnabled:e.boolean(),exportEnabled:e.boolean(),costIntelligenceEnabled:e.boolean(),modelPricesEnabled:e.boolean(),datasetVersioningEnabled:e.boolean(),datasetExportEnabled:e.boolean(),demoDataEnabled:e.boolean(),openaiProviderEnabled:e.boolean(),anthropicProviderEnabled:e.boolean(),geminiProviderEnabled:e.boolean(),openrouterProviderEnabled:e.boolean(),vertexaiProviderEnabled:e.boolean(),bedrockProviderEnabled:e.boolean(),customllmProviderEnabled:e.boolean(),ollamaProviderEnabled:e.boolean(),ollieEnabled:e.boolean(),agentInsightsEnabled:e.boolean(),agentInsightsGuidanceEnabled:e.boolean(),projectHomepageEnabled:e.boolean(),annotationQueueAutomationEnabled:e.boolean(),eventBridgeAlertsEnabled:e.boolean(),defaultPageSize:e.number().optional(),customChartsEnabledForWorkspace:e.boolean().optional()});});var Ace,iq=n(()=>{b();rd();Ace=e.object({spans:e.list(Os)});});var fN,hN=n(()=>{b();fN=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var yN,bN=n(()=>{b();yN=e.enum_(["general","tool","llm","guardrail"]);});var lp,RN=n(()=>{b();zs();Gs();ad();Ni();hN();bN();lp=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:yN.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Jt.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Fi).optional()),comments:e.list(Vt).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:fN.optional(),environment:e.string().optional()});});var xN,oq=n(()=>{b();RN();xN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(lp).optional(),sortableBy:e.list(e.string()).optional()});});var wN,_N=n(()=>{b();wN=e.object({workspace:e.string().optional(),spanCount:e.property("span_count",e.number().optional())});});var kN,aq=n(()=>{b();_N();kN=e.object({workspacesSpansCount:e.property("workspaces_spans_count",e.list(wN).optional())});});var AN,nq=n(()=>{b();AN=e.object({uploadId:e.property("upload_id",e.string()),preSignUrls:e.property("pre_sign_urls",e.list(e.string()))});});var PN,sq=n(()=>{b();PN=e.object({accessToken:e.property("access_token",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional()),tokenType:e.property("token_type",e.string().optional()),expiresIn:e.property("expires_in",e.number().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional())});});var mp,pq=n(()=>{b();mp=e.object({names:e.list(e.string()).optional()});});var Pce,cq=n(()=>{b();td();Pce=e.object({traces:e.list(Ks)});});var zN,SN=n(()=>{b();zN=e.object({workspace:e.string().optional(),traceCount:e.property("trace_count",e.number().optional())});});var vN,lq=n(()=>{b();SN();vN=e.object({workspacesTracesCount:e.property("workspaces_traces_count",e.list(zN).optional())});});var TN,jN=n(()=>{b();TN=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var CN,EN=n(()=>{b();CN=e.enum_(["default","hidden"]);});var dp,IN=n(()=>{b();TA();zs();Gs();IC();ad();aI();Ni();jN();EN();dp=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Jt.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Fi).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(Fi).optional()),comments:e.list(Vt).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(oI).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",CN.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:EC.optional(),annotationQueues:e.property("annotation_queues",e.list(vA).optional()),source:TN.optional(),environment:e.string().optional()});});var DN,mq=n(()=>{b();IN();DN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(dp).optional(),sortableBy:e.list(e.string()).optional()});});var UN,NN=n(()=>{b();UN=e.enum_(["active","inactive"]);});var up,FN=n(()=>{b();Sm();xt();wt();Ze();NN();up=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),threadModelId:e.property("thread_model_id",e.string().optional()),startTime:e.property("start_time",e.date().optional()),endTime:e.property("end_time",e.date().optional()),duration:e.number().optional(),firstMessage:e.property("first_message",me.optional()),lastMessage:e.property("last_message",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),status:UN.optional(),numberOfMessages:e.property("number_of_messages",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),comments:e.list(he).optional(),tags:e.list(e.string()).optional(),annotationQueues:e.property("annotation_queues",e.list(Xn).optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),environment:e.string().optional()});});var gd,dq=n(()=>{b();gd=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string()),truncate:e.boolean().optional()});});var BN,uq=n(()=>{b();FN();BN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(up).optional(),sortableBy:e.list(e.string()).optional()});});var MN,WN=n(()=>{b();MN=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var VN,gq=n(()=>{b();WN();VN=e.object({breakdown:e.list(MN).optional()});});var LN,JN=n(()=>{b();LN=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional()});});var GN,fq=n(()=>{b();JN();GN=e.object({projects:e.list(LN).optional()});});var HN,hq=n(()=>{b();HN=e.object({userName:e.property("user_name",e.string().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),resource:e.string().optional(),expiresAt:e.property("expires_at",e.date().optional())});});var ON,KN=n(()=>{b();ON=e.enum_(["widget"]);});var QN,$N=n(()=>{b();QN=e.enum_(["user","ollie","agent"]);});var YN,XN=n(()=>{b();YN=e.enum_(["html"]);});var Wi,ZN=n(()=>{b();Bn();$N();XN();Wi=e.object({viewId:e.property("view_id",e.string().optional()),version:e.number().optional(),author:QN.optional(),summary:e.string().optional(),type:YN.optional(),engineVersion:e.property("engine_version",e.number().optional()),inputs:e.record(e.string(),Tt).optional(),libraries:e.list(e.string()).optional(),html:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Vi,yq=n(()=>{b();KN();ZN();Vi=e.object({id:e.string().optional(),area:ON.optional(),name:e.string().optional(),description:e.string().optional(),currentVersion:e.property("current_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),version:Wi.optional()});});var qN,eF=n(()=>{b();qN=e.enum_(["user","ollie","agent"]);});var rF,tF=n(()=>{b();eF();rF=e.object({version:e.number().optional(),author:qN.optional(),summary:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var iF,bq=n(()=>{b();tF();iF=e.object({content:e.list(rF).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var oF,Rq=n(()=>{b();oF=e.object({responseExamples:e.property("response_examples",e.record(e.string(),e.record(e.string(),e.unknown())).optional())});});var aF,nF=n(()=>{b();aF=e.enum_(["success","failure"]);});var sF,xq=n(()=>{b();nF();sF=e.object({status:aF.optional(),statusCode:e.property("status_code",e.number().optional()),requestBody:e.property("request_body",e.string().optional()),errorMessage:e.property("error_message",e.string().optional())});});var pF,wq=n(()=>{b();pF=e.object({completed:e.boolean().optional()});});var gp,_q=n(()=>{b();gp=e.object({timeoutToMarkThreadAsInactive:e.property("timeout_to_mark_thread_as_inactive",e.string().optional()),truncationOnTables:e.property("truncation_on_tables",e.boolean().optional()),colorMap:e.property("color_map",e.record(e.string(),e.string()).optional())});});var zce,kq=n(()=>{b();zce=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var fp,Aq=n(()=>{b();ud();fp=e.object({results:e.list(Er).optional()});});var Li,Pq=n(()=>{b();Li=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var cF,zq=n(()=>{b();ud();cF=e.object({results:e.list(Er).optional()});});var lF,Sq=n(()=>{b();lF=e.object({workspaceName:e.property("workspace_name",e.string().optional())});});var mF,vq=n(()=>{b();KD();mF=e.object({userName:e.string().optional(),workspaceName:e.string().optional(),permissions:e.list(OD).optional()});});var Tq=n(()=>{T_();F_();C_();G8();M_();X_();H_();H8();wy();U_();I_();J_();V_();$_();K_();ik();ak();O8();q_();rk();K8();pk();lk();Q8();uk();fk();$8();yk();Y8();Wk();Tk();Pk();wk();Ik();Ck();Rk();Gk();Lk();kk();Fk();Uk();Qk();Ok();X8();Yk();Z8();oA();Wc();nA();Ny();Vc();hA();Oy();q8();eZ();xA();bA();rZ();tZ();zA();kA();Sm();TA();eA();PA();tA();$y();Qy();DR();lb();nb();pb();CA();IA();UA();VA();FA();JA();iZ();OA();QA();YA();oZ();aZ();nZ();sZ();iP();RP();Um();mz();Sz();uz();fz();pZ();cZ();jz();Ez();wP();Fm();Mz();kP();Bm();Jz();PP();Mm();$z();SP();Wm();qz();TP();lZ();rS();iS();aS();sS();cS();mS();uS();fS();CP();Vm();xS();mZ();_S();AS();SS();dZ();TS();uZ();gZ();DS();BS();Hm();GS();ES();NS();WS();LS();y_();f_();Bx();Nx();fZ();hZ();qS();XS();OS();yZ();QS();av();cv();Om();fv();iv();sv();mv();uv();kv();bZ();Nv();Ev();Lv();Bv();Wv();Dv();RZ();xZ();Ov();Gv();wZ();Xv();rT();qv();aT();iT();$v();xt();sT();zs();_Z();cT();Pv();rb();dA();Ly();ib();gA();Gy();kZ();gT();AZ();ux();yT();yx();PZ();_T();RT();wT();zZ();SZ();AT();vZ();TZ();zT();jZ();vT();CZ();EZ();IZ();iR();tR();$m();DZ();UZ();yj();GT();qc();Mb();NZ();FZ();jj();xj();NT();Vb();Yb();Jb();BZ();Bj();Ij();Uj();Fj();jT();ET();MZ();Wj();WZ();Lj();Qm();qm();DT();VZ();Hj();LZ();JZ();yv();Kj();GZ();HZ();Qj();ed();Xj();Kr();sl();Gs();bn();OZ();KZ();QZ();$Z();YZ();XZ();yi();YT();OT();Xm();_j();Ib();Kb();Hb();Rt();Ym();Zm();$b();ZZ();qZ();eC();e7();r7();t7();nC();pl();CC();ER();i7();mj();ZT();ej();Pj();Aj();kC();IC();NR();BR();o7();LC();UC();FC();MC();WT();fj();uj();Tj();Sj();BT();nl();VC();OR();tC();oC();lR();sR();cR();a7();n7();s7();p7();oE();c7();wt();Qr();cE();$n();l7();uE();mE();Hw();Jw();pj();tj();xR();gR();m7();d7();ad();xE();WR();u7();nd();Yc();hi();g7();dC();cC();gC();hC();FE();f7();IE();h7();ME();y7();YE();HE();JE();$E();KE();VE();rI();qE();b7();iI();UE();PC();aI();R7();nx();tx();ox();aP();UP();$P();dI();Ze();cj();xa();Ni();xi();ne();QT();Zx();yr();zr();xb();x7();hI();gI();Tm();KP();sz();qn();cP();MP();qP();ps();VP();mP();ds();rz();es();uP();cs();JP();us();iz();rs();ls();HP();fP();gs();az();_I();w7();em();$l();_7();Aw();Xl();k7();RI();wI();A7();P7();CI();TI();z7();Rv();wv();S7();DI();v7();Xc();T7();mT();UI();OC();XC();od();vE();GC();$C();rE();zE();j7();C7();E7();Sx();JI();I7();VI();D7();U7();kD();pD();OI();nD();_D();FD();N7();F7();WD();B7();S_();P_();JD();zi();HD();id();KD();M7();W7();XD();V7();eU();tU();L7();pU();sU();IP();Lm();dU();J7();G7();gU();$D();H7();bb();O7();vU();K7();EU();jU();yU();Sv();RU();dR();zU();Ya();ew();tw();ow();ba();Bl();KR();Q7();WU();DU();NU();BU();wU();kU();sw();PU();$7();Y7();JU();YU();HU();Ia();$U();KU();fx();wx();Rx();rN();qU();X7();Sy();Py();aN();Z7();oN();q7();eq();Ab();_b();ud();oU();rq();dN();cN();mN();qy();Xy();lA();pA();Wy();By();fE();bE();tq();rd();iq();Ub();zR();_R();AR();jt();R_();_i();Wx();Jm();Uz();jm();yz();Fz();oq();RN();hN();bN();RC();aq();wC();jw();Sw();Tw();Cm();Rz();Vz();Uw();Ew();Dw();nq();zb();YI();dD();SD();ZI();gD();TD();tD();bD();ID();QI();lD();PD();eD();hD();CD();oD();xD();UD();sq();pq();jb();vm();MA();MI();FI();vb();td();cq();lq();Fb();jR();vR();Si();yP();ki();Lx();Nm();cz();mq();IN();jN();EN();SC();FN();vt();r_();Ha();Gx();Gm();Hz();dq();Em();wz();Kz();uq();NN();qw();Im();kz();Xz();Qw();Kw();TC();Xw();Yw();Tv();gq();fq();Dm();Pz();bS();hq();lx();px();cI();sI();GR();nj();oj();bR();hR();AE();_E();LR();sP();FP();XP();yq();KN();Bn();a_();ZN();$N();bq();tF();eF();XN();Sk();Rq();Mk();xq();nF();Zk();wq();_q();eP();kq();Aq();Pq();zq();Sq();JN();WN();_N();SN();vq();});var G={};L(G,{ActivateRequest:()=>La,Agent:()=>v_,AgentBlueprintHistory:()=>N_,AgentBlueprintHistoryType:()=>j_,AgentBlueprintPublic:()=>Ct,AgentBlueprintPublicType:()=>B_,AgentBlueprintWrite:()=>Y_,AgentBlueprintWriteType:()=>G_,AgentConfigCreateWrite:()=>Pm,AgentConfigEnv:()=>xy,AgentConfigEnvSetByName:()=>jo,AgentConfigEnvUpdate:()=>Co,AgentConfigRemoveValues:()=>Eo,AgentConfigValueHistory:()=>D_,AgentConfigValueHistoryType:()=>E_,AgentConfigValuePublic:()=>L_,AgentConfigValuePublicType:()=>W_,AgentConfigValueWrite:()=>Q_,AgentConfigValueWriteType:()=>O_,AgentInsightsGuidanceUpdate:()=>No,AgentInsightsIssue:()=>tk,AgentInsightsIssueDetail:()=>ok,AgentInsightsIssuePage:()=>nk,AgentInsightsIssueSeverity:()=>Z_,AgentInsightsIssueStatus:()=>ek,AgentInsightsIssueUpdate:()=>Io,AgentInsightsIssueUpdateStatus:()=>Cc,AgentInsightsIssueWithDetails:()=>mk,AgentInsightsIssueWithDetailsSeverity:()=>sk,AgentInsightsIssueWithDetailsStatus:()=>ck,AgentInsightsJob:()=>Pi,AgentInsightsJobStatus:()=>dk,AgentInsightsJobUpdate:()=>Fo,AgentInsightsJobUpdateStatus:()=>Nc,AgentInsightsReport:()=>Do,AggregationData:()=>gk,Alert:()=>Xpe,AlertAlertType:()=>hk,AlertPagePublic:()=>Kn,AlertPublic:()=>On,AlertPublicAlertType:()=>vk,AlertTrigger:()=>Ak,AlertTriggerConfig:()=>xk,AlertTriggerConfigPublic:()=>Ek,AlertTriggerConfigPublicType:()=>jk,AlertTriggerConfigType:()=>bk,AlertTriggerConfigWrite:()=>Jk,AlertTriggerConfigWriteType:()=>Vk,AlertTriggerEventType:()=>_k,AlertTriggerPublic:()=>Nk,AlertTriggerPublicEventType:()=>Dk,AlertTriggerWrite:()=>Kk,AlertTriggerWriteEventType:()=>Hk,AlertWrite:()=>Qn,AlertWriteAlertType:()=>$k,AnalyticsQueryRequest:()=>_n,AnalyticsQueryResponse:()=>$r,AnnotationQueue:()=>iA,AnnotationQueueAnnotatorView:()=>Vo,AnnotationQueueAnnotatorViewPublic:()=>aA,AnnotationQueueAnnotatorViewWrite:()=>Uy,AnnotationQueueAutomation:()=>Lo,AnnotationQueueAutomationPublic:()=>fA,AnnotationQueueAutomationWrite:()=>Hy,AnnotationQueueBatch:()=>Zpe,AnnotationQueueBatchWrite:()=>Mo,AnnotationQueueItemIds:()=>zm,AnnotationQueueItemIdsPublic:()=>Wo,AnnotationQueueItemPublic:()=>RA,AnnotationQueueItemPublicSource:()=>yA,AnnotationQueueItemsPublic:()=>wA,AnnotationQueuePagePublic:()=>SA,AnnotationQueuePublic:()=>Yn,AnnotationQueuePublicScope:()=>_A,AnnotationQueueReference:()=>Xn,AnnotationQueueReferencePublic:()=>vA,AnnotationQueueReviewer:()=>qk,AnnotationQueueReviewerPublic:()=>AA,AnnotationQueueScope:()=>rA,AnnotationQueueUpdate:()=>Jo,AnnotationQueueWrite:()=>Bo,AnnotationQueueWriteScope:()=>Ky,AssertionResult:()=>IR,AssertionResultBatch:()=>Go,AssertionResultBatchEntityType:()=>Jc,AssertionResultBatchItem:()=>cb,AssertionResultBatchItemSource:()=>ab,AssertionResultBatchItemStatus:()=>sb,AssertionResultCompare:()=>jA,AssertionScoreAverage:()=>EA,AssertionScoreAveragePublic:()=>DA,AssistantMessage:()=>WA,AssistantMessageRole:()=>NA,Attachment:()=>LA,AttachmentListRequestEntityType:()=>Kc,AttachmentPage:()=>GA,AudioUrl:()=>HA,AudioUrlPublic:()=>KA,AudioUrlWrite:()=>$A,AuthDetailsHolder:()=>XA,AuthorizationServerMetadata:()=>ZA,AuthorizeContext:()=>rP,AutomationRuleEvaluator:()=>qpe,AutomationRuleEvaluatorAction:()=>tP,AutomationRuleEvaluatorLlmAsJudge:()=>bP,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ms,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>lz,AutomationRuleEvaluatorObjectObjectPublic:()=>zz,AutomationRuleEvaluatorObjectObjectPublicAction:()=>dz,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>gz,AutomationRuleEvaluatorPagePublic:()=>vz,AutomationRuleEvaluatorPublic:()=>Iz,AutomationRuleEvaluatorPublicAction:()=>Tz,AutomationRuleEvaluatorPublicTriggerScope:()=>Cz,AutomationRuleEvaluatorSpanLlmAsJudge:()=>xP,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>hs,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>Bz,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>_P,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>ys,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Lz,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>AP,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>bs,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Qz,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>zP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Rs,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Zz,AutomationRuleEvaluatorTriggerScope:()=>vP,AutomationRuleEvaluatorUpdate:()=>hS,AutomationRuleEvaluatorUpdateAction:()=>eS,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>tS,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>oS,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>nS,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>pS,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>lS,AutomationRuleEvaluatorUpdateTriggerScope:()=>dS,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>gS,AutomationRuleEvaluatorUserDefinedMetricPython:()=>jP,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>xs,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>RS,AutomationRuleEvaluatorWrite:()=>PS,AutomationRuleEvaluatorWriteAction:()=>wS,AutomationRuleEvaluatorWriteTriggerScope:()=>kS,AvgValueStatPublic:()=>zS,BatchDelete:()=>ue,BatchDeleteByProject:()=>Pn,BiInformation:()=>vS,BiInformationResponse:()=>Ii,BlueprintPageHistory:()=>jS,BooleanFeedbackDefinition:()=>IS,BooleanFeedbackDefinitionCreate:()=>FS,BooleanFeedbackDefinitionPublic:()=>As,BooleanFeedbackDefinitionUpdate:()=>JS,BooleanFeedbackDetail:()=>CS,BooleanFeedbackDetailCreate:()=>US,BooleanFeedbackDetailPublic:()=>MS,BooleanFeedbackDetailUpdate:()=>VS,BreakdownConfig:()=>h_,BreakdownConfigField:()=>g_,BreakdownConfigPublic:()=>Fx,BreakdownConfigPublicField:()=>Ux,BridgeCommand:()=>$S,BridgeCommandBatchResponse:()=>ev,BridgeCommandItem:()=>ZS,BridgeCommandItemType:()=>YS,BridgeCommandNextRequest:()=>pn,BridgeCommandResultRequest:()=>cn,BridgeCommandResultRequestStatus:()=>Kl,BridgeCommandStatus:()=>HS,BridgeCommandSubmitRequest:()=>ln,BridgeCommandSubmitRequestType:()=>Ql,BridgeCommandSubmitResponse:()=>rv,BridgeCommandType:()=>KS,CategoricalFeedbackDefinition:()=>ov,CategoricalFeedbackDefinitionCreate:()=>pv,CategoricalFeedbackDefinitionPublic:()=>Ps,CategoricalFeedbackDefinitionUpdate:()=>gv,CategoricalFeedbackDetail:()=>tv,CategoricalFeedbackDetailCreate:()=>nv,CategoricalFeedbackDetailPublic:()=>lv,CategoricalFeedbackDetailUpdate:()=>dv,ChatCompletionChoice:()=>_v,ChatCompletionRequest:()=>Qo,ChatCompletionResponse:()=>jv,Check:()=>Uv,CheckName:()=>Cv,CheckPublic:()=>Vv,CheckPublicName:()=>Fv,CheckPublicResult:()=>Mv,CheckResult:()=>Iv,ChunkedOutputJsonNode:()=>ece,ChunkedOutputJsonNodePublic:()=>rce,ChunkedOutputJsonNodePublicType:()=>Hv,ChunkedOutputJsonNodeType:()=>Jv,ClientRegistrationRequest:()=>Fa,ClientRegistrationResponse:()=>Kv,Column:()=>Yv,ColumnCompare:()=>eT,ColumnCompareTypesItem:()=>Zv,ColumnPublic:()=>oT,ColumnPublicTypesItem:()=>tT,ColumnTypesItem:()=>Qv,Comment:()=>he,CommentCompare:()=>nT,CommentPublic:()=>Vt,CompleteMultipartUploadRequest:()=>Km,CompleteMultipartUploadRequestEntityType:()=>pT,CompletionTokensDetails:()=>Av,ConditionGroup:()=>eb,ConditionGroupPublic:()=>mA,ConditionGroupWrite:()=>Vy,Conditions:()=>tb,ConditionsPublic:()=>uA,ConditionsWrite:()=>Jy,ConsentRequest:()=>Ba,ConsentResponse:()=>dT,CountValueStatPublic:()=>uT,CreateDatasetItemsFromJsonRequestFormat:()=>ol,CreateDatasetItemsFromSpansRequest:()=>$o,CreateDatasetItemsFromTracesRequest:()=>Yo,CreateLocalRunnerJobRequest:()=>dn,CreatePromptVersionDetail:()=>Xa,CreatePromptVersionDetailTemplateStructure:()=>Ul,CreateSessionRequest:()=>Ja,CreateSessionRequestType:()=>Sl,CreateSessionResponse:()=>fT,Credential:()=>dx,CredentialPublic:()=>hT,CredentialWrite:()=>hx,DashboardPagePublic:()=>Lt,DashboardPublic:()=>nr,DashboardPublicScope:()=>bT,DashboardPublicType:()=>xT,DashboardSavedQuery:()=>Ss,DashboardUpdatePublic:()=>vs,DashboardUpdatePublicType:()=>kT,DashboardWidgetQueryRequest:()=>Ts,DashboardWrite:()=>js,DashboardWriteType:()=>PT,DataPointDouble:()=>tce,DataPointNumberPublic:()=>ST,Dataset:()=>ice,DatasetExpansion:()=>oce,DatasetExpansionResponse:()=>VT,DatasetExpansionWrite:()=>Xo,DatasetExperimentItemStreamRequest:()=>Zo,DatasetExportJobPublic:()=>bi,DatasetExportJobPublicStatus:()=>rR,DatasetIdentifier:()=>qo,DatasetIdentifierPublic:()=>ea,DatasetItem:()=>Es,DatasetItemBatch:()=>ace,DatasetItemBatchUpdate:()=>ta,DatasetItemBatchWrite:()=>oa,DatasetItemChangesPublic:()=>LT,DatasetItemCompare:()=>hj,DatasetItemCompareSource:()=>JT,DatasetItemFilter:()=>ra,DatasetItemFilterOperator:()=>Bb,DatasetItemPageCompare:()=>bj,DatasetItemPagePublic:()=>Cj,DatasetItemPublic:()=>Bs,DatasetItemPublicSource:()=>Rj,DatasetItemSource:()=>UT,DatasetItemStreamRequest:()=>aa,DatasetItemUpdate:()=>Wb,DatasetItemWrite:()=>ia,DatasetItemWriteSource:()=>Lb,DatasetItemsDelete:()=>na,DatasetPagePublic:()=>Ws,DatasetPublic:()=>Di,DatasetPublicStatus:()=>Ej,DatasetPublicType:()=>Dj,DatasetPublicVisibility:()=>Nj,DatasetStatus:()=>TT,DatasetType:()=>CT,DatasetUpdate:()=>sa,DatasetUpdateVisibility:()=>el,DatasetVersionDiff:()=>Vj,DatasetVersionDiffStats:()=>Mj,DatasetVersionPagePublic:()=>Jj,DatasetVersionPublic:()=>Cr,DatasetVersionRestorePublic:()=>pa,DatasetVersionRetrieveRequestPublic:()=>ca,DatasetVersionSummary:()=>Cs,DatasetVersionSummaryPublic:()=>Ms,DatasetVersionTag:()=>la,DatasetVersionUpdatePublic:()=>ma,DatasetVisibility:()=>IT,DatasetWrite:()=>da,DatasetWriteType:()=>rl,DatasetWriteVisibility:()=>tl,DeleteAttachmentsRequest:()=>nce,DeleteAttachmentsRequestEntityType:()=>Gj,DeleteFeedbackScore:()=>Vs,DeleteIdsHolder:()=>Ui,DeleteThreadFeedbackScores:()=>zn,DeleteTraceThreads:()=>Sn,Delta:()=>hv,DownloadAttachmentRequestEntityType:()=>Qc,EffortParam:()=>Oj,Environment:()=>sce,EnvironmentPagePublic:()=>$j,EnvironmentPublic:()=>Ls,EnvironmentUpdate:()=>ua,EnvironmentWrite:()=>ga,ErrorCountWithDeviation:()=>Js,ErrorCountWithDeviationDetailed:()=>Yj,ErrorInfo:()=>Ke,ErrorInfoExperimentItemBulkWriteView:()=>wa,ErrorInfoPublic:()=>Jt,ErrorInfoWrite:()=>St,ErrorMessage:()=>Zj,ErrorMessageDetail:()=>pce,ErrorMessageDetailed:()=>cce,ErrorMessageHistory:()=>lce,ErrorMessagePublic:()=>mce,ErrorMessageWrite:()=>dce,EvaluatorItem:()=>Pr,EvaluatorItemCompare:()=>$T,EvaluatorItemCompareType:()=>HT,EvaluatorItemPublic:()=>Us,EvaluatorItemPublicType:()=>wj,EvaluatorItemType:()=>Eb,EvaluatorItemWrite:()=>Ob,EvaluatorItemWriteType:()=>Gb,ExecutionPolicy:()=>tr,ExecutionPolicyCompare:()=>Is,ExecutionPolicyPublic:()=>Ns,ExecutionPolicyWrite:()=>Qb,ExistenceResponse:()=>Hs,Experiment:()=>uce,ExperimentBatchUpdate:()=>ya,ExperimentEvaluationMethod:()=>qj,ExperimentExecutionRequest:()=>Ra,ExperimentExecutionResponse:()=>sC,ExperimentGroupAggregationsResponse:()=>lC,ExperimentGroupResponse:()=>yC,ExperimentInfo:()=>aC,ExperimentItem:()=>Aa,ExperimentItemBulkRecord:()=>jC,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>CR,ExperimentItemBulkUpload:()=>gce,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>_a,ExperimentItemCompare:()=>lj,ExperimentItemCompareStatus:()=>XT,ExperimentItemCompareTraceVisibilityMode:()=>qT,ExperimentItemPublic:()=>Fs,ExperimentItemPublicTraceVisibilityMode:()=>kj,ExperimentItemReference:()=>_C,ExperimentItemReferencePublic:()=>EC,ExperimentItemStatus:()=>UR,ExperimentItemStreamRequest:()=>ka,ExperimentItemTraceVisibilityMode:()=>FR,ExperimentItemsBatch:()=>Pa,ExperimentItemsDelete:()=>za,ExperimentPagePublic:()=>Ys,ExperimentPublic:()=>$s,ExperimentPublicEvaluationMethod:()=>DC,ExperimentPublicStatus:()=>NC,ExperimentPublicType:()=>BC,ExperimentRunSummary:()=>MT,ExperimentRunSummaryCompare:()=>gj,ExperimentRunSummaryCompareStatus:()=>dj,ExperimentRunSummaryPublic:()=>vj,ExperimentRunSummaryPublicStatus:()=>zj,ExperimentRunSummaryStatus:()=>FT,ExperimentScore:()=>fa,ExperimentScorePublic:()=>WC,ExperimentScoreWrite:()=>HR,ExperimentStatus:()=>rC,ExperimentStreamRequestPublic:()=>Sa,ExperimentType:()=>iC,ExperimentUpdate:()=>ha,ExperimentUpdateStatus:()=>nR,ExperimentUpdateType:()=>pR,ExperimentWrite:()=>va,ExperimentWriteEvaluationMethod:()=>ll,ExperimentWriteStatus:()=>ml,ExperimentWriteType:()=>dl,ExportTraceServiceRequest:()=>fce,Feedback:()=>hce,FeedbackCreate:()=>qC,FeedbackDefinitionPagePublic:()=>aE,FeedbackObjectPublic:()=>iE,FeedbackPublic:()=>sE,FeedbackScore:()=>ze,FeedbackScoreAverage:()=>je,FeedbackScoreAverageDetailed:()=>pE,FeedbackScoreAveragePublic:()=>Yr,FeedbackScoreBatch:()=>Zs,FeedbackScoreBatchItem:()=>dE,FeedbackScoreBatchItemSource:()=>lE,FeedbackScoreBatchItemThread:()=>Gw,FeedbackScoreBatchItemThreadSource:()=>Lw,FeedbackScoreBatchThread:()=>vn,FeedbackScoreCompare:()=>sj,FeedbackScoreCompareSource:()=>rj,FeedbackScoreExperimentItemBulkWriteView:()=>RR,FeedbackScoreExperimentItemBulkWriteViewSource:()=>uR,FeedbackScoreNames:()=>hE,FeedbackScoreNamesPublic:()=>Xr,FeedbackScorePublic:()=>Fi,FeedbackScorePublicSource:()=>RE,FeedbackScoreSource:()=>MR,FeedbackUpdate:()=>jE,FindAgentInsightsIssuesRequestSeverity:()=>Ec,FindAgentInsightsIssuesRequestStatus:()=>Ic,FindFeedbackDefinitionsRequestType:()=>gl,FindFeedbackScoreNames1RequestType:()=>sm,FindGuardrailPoliciesRequestExecutionScope:()=>hl,FindReportFailuresRequestType:()=>Vl,FlagParam:()=>Bi,Function:()=>Oo,FunctionCall:()=>Ar,GenerateReportResponse:()=>CE,GetSpanStatsRequestType:()=>pm,GetSpansByProjectRequestType:()=>cm,GetWebhookExamplesRequestAlertType:()=>Bc,GroupContent:()=>mC,GroupContentWithAggregations:()=>pC,GroupDetail:()=>uC,GroupDetails:()=>fC,Guardrail:()=>NE,GuardrailBatch:()=>yce,GuardrailBatchWrite:()=>ja,GuardrailName:()=>EE,GuardrailPolicy:()=>bce,GuardrailPolicyExecutionScope:()=>BE,GuardrailPolicyPagePublic:()=>XE,GuardrailPolicyPublic:()=>qs,GuardrailPolicyPublicExecutionScope:()=>GE,GuardrailPolicyRule:()=>LE,GuardrailPolicyRulePublic:()=>QE,GuardrailPolicyRulePublicType:()=>OE,GuardrailPolicyRuleType:()=>WE,GuardrailPolicyRuleWrite:()=>eI,GuardrailPolicyRuleWriteType:()=>ZE,GuardrailPolicyWrite:()=>sd,GuardrailPolicyWriteExecutionScope:()=>tI,GuardrailResult:()=>DE,GuardrailWrite:()=>ax,GuardrailWriteName:()=>rx,GuardrailWriteResult:()=>ix,GuardrailsValidation:()=>AC,GuardrailsValidationPublic:()=>oI,GuardrailsValidationRequest:()=>Ca,GuardrailsValidationResponse:()=>lI,IdsHolder:()=>Ta,ImageUrl:()=>oP,ImageUrlPublic:()=>DP,ImageUrlWrite:()=>QP,ItemLockInfo:()=>mI,JsonListString:()=>me,JsonListStringCompare:()=>Ds,JsonListStringExperimentItemBulkWriteView:()=>ir,JsonListStringPublic:()=>Qe,JsonListStringWrite:()=>Oe,JsonNode:()=>V,JsonNodeCompare:()=>KT,JsonNodeDetail:()=>Xx,JsonNodePublic:()=>ke,JsonNodeWrite:()=>Te,JsonSchema:()=>Rb,KpiCardRequest:()=>Ga,KpiCardRequestEntityType:()=>Tl,KpiCardResponse:()=>yI,KpiMetric:()=>fI,KpiMetricType:()=>uI,ListRunnersRequestStatus:()=>om,LlmAsJudgeCode:()=>ts,LlmAsJudgeCodePublic:()=>OP,LlmAsJudgeCodeWrite:()=>nz,LlmAsJudgeMessage:()=>Et,LlmAsJudgeMessageContent:()=>pP,LlmAsJudgeMessageContentPublic:()=>BP,LlmAsJudgeMessageContentWrite:()=>ZP,LlmAsJudgeMessagePublic:()=>Ut,LlmAsJudgeMessagePublicRole:()=>WP,LlmAsJudgeMessageRole:()=>lP,LlmAsJudgeMessageWrite:()=>Bt,LlmAsJudgeMessageWriteRole:()=>ez,LlmAsJudgeModelParameters:()=>It,LlmAsJudgeModelParametersApi:()=>dP,LlmAsJudgeModelParametersPublic:()=>Nt,LlmAsJudgeModelParametersPublicApi:()=>LP,LlmAsJudgeModelParametersWrite:()=>Mt,LlmAsJudgeModelParametersWriteApi:()=>tz,LlmAsJudgeOutputSchema:()=>Dt,LlmAsJudgeOutputSchemaPublic:()=>Ft,LlmAsJudgeOutputSchemaPublicType:()=>GP,LlmAsJudgeOutputSchemaType:()=>gP,LlmAsJudgeOutputSchemaWrite:()=>Wt,LlmAsJudgeOutputSchemaWriteType:()=>oz,LocalRunner:()=>ep,LocalRunnerHeartbeatRequest:()=>un,LocalRunnerHeartbeatResponse:()=>kI,LocalRunnerJob:()=>zt,LocalRunnerJobMetadata:()=>mn,LocalRunnerJobPage:()=>AI,LocalRunnerJobResultRequest:()=>gn,LocalRunnerJobResultRequestStatus:()=>Yl,LocalRunnerJobStatus:()=>kw,LocalRunnerLogEntry:()=>fn,LocalRunnerPage:()=>PI,LocalRunnerStatus:()=>bI,LocalRunnerType:()=>xI,LockResponse:()=>zI,LocksResponse:()=>SI,LogItem:()=>jI,LogItemLevel:()=>vI,LogPage:()=>EI,LogProb:()=>bv,LogProbs:()=>xv,ManualEvaluationRequest:()=>rp,ManualEvaluationRequestEntityType:()=>II,ManualEvaluationResponse:()=>tp,Message:()=>Ko,ModelParams:()=>Ea,MultipartUploadPart:()=>lT,NumberParam:()=>Zr,NumericalFeedbackDefinition:()=>HC,NumericalFeedbackDefinitionCreate:()=>YC,NumericalFeedbackDefinitionPublic:()=>Xs,NumericalFeedbackDefinitionUpdate:()=>SE,NumericalFeedbackDetail:()=>JC,NumericalFeedbackDetailCreate:()=>QC,NumericalFeedbackDetailPublic:()=>eE,NumericalFeedbackDetailUpdate:()=>PE,OAuthError:()=>Rce,OllamaConnectionTestResponse:()=>pd,OllamaInstanceBaseUrlRequest:()=>cd,OllamaModel:()=>zx,OllieReport:()=>LI,OllieReportPage:()=>GI,OllieReportStatus:()=>WI,Optimization:()=>xce,OptimizationPagePublic:()=>op,OptimizationPublic:()=>ip,OptimizationPublicStatus:()=>sD,OptimizationStatus:()=>HI,OptimizationStudioConfig:()=>aD,OptimizationStudioConfigPublic:()=>wD,OptimizationStudioConfigWrite:()=>ND,OptimizationStudioLog:()=>BD,OptimizationUpdate:()=>Va,OptimizationUpdateStatus:()=>Pl,OptimizationWrite:()=>ld,OptimizationWriteStatus:()=>MD,PageColumns:()=>VD,Param:()=>z_,ParamPresence:()=>A_,PercentageValueStatPublic:()=>LD,PercentageValues:()=>Tr,PercentageValuesDetailed:()=>GD,PercentageValuesPublic:()=>Qs,Permission:()=>OD,Project:()=>wce,ProjectDetailed:()=>ZD,ProjectDetailedVisibility:()=>YD,ProjectMetricRequestPublic:()=>Oa,ProjectMetricRequestPublicInterval:()=>jl,ProjectMetricRequestPublicMetricType:()=>Cl,ProjectMetricResponsePublic:()=>aU,ProjectMetricResponsePublicInterval:()=>qD,ProjectMetricResponsePublicMetricType:()=>rU,ProjectPagePublic:()=>cU,ProjectPublic:()=>ap,ProjectPublicVisibility:()=>nU,ProjectReference:()=>EP,ProjectReferencePublic:()=>ws,ProjectRetrieveDetailed:()=>Ka,ProjectStatItemObjectPublic:()=>mU,ProjectStatsPublic:()=>qr,ProjectStatsSummary:()=>fU,ProjectStatsSummaryItem:()=>uU,ProjectUpdate:()=>Qa,ProjectUpdateVisibility:()=>El,ProjectVisibility:()=>QD,ProjectWrite:()=>$a,ProjectWriteVisibility:()=>Il,Prompt:()=>_ce,PromptCacheOptions:()=>yb,PromptDetail:()=>dd,PromptDetailTemplateStructure:()=>SU,PromptPagePublic:()=>np,PromptPublic:()=>CU,PromptPublicTemplateStructure:()=>TU,PromptTemplateStructure:()=>hU,PromptTokensDetails:()=>zv,PromptType:()=>bU,PromptUpdatable:()=>Za,PromptVariant:()=>mR,PromptVersion:()=>md,PromptVersionBatchUpdate:()=>qa,PromptVersionCommitsRequestPublic:()=>en,PromptVersionDetail:()=>Fe,PromptVersionDetailTemplateStructure:()=>qx,PromptVersionDetailType:()=>rw,PromptVersionDetailVersionType:()=>iw,PromptVersionEnvironmentUpdate:()=>rn,PromptVersionIdsRequestDetail:()=>tn,PromptVersionLink:()=>Or,PromptVersionLinkPublic:()=>Ai,PromptVersionLinkWrite:()=>cl,PromptVersionPagePublic:()=>VU,PromptVersionPublic:()=>MU,PromptVersionPublicTemplateStructure:()=>IU,PromptVersionPublicType:()=>UU,PromptVersionPublicVersionType:()=>FU,PromptVersionRetrieveDetail:()=>on,PromptVersionTemplateStructure:()=>xU,PromptVersionType:()=>_U,PromptVersionUpdate:()=>nw,PromptVersionVersionType:()=>AU,PromptWrite:()=>an,PromptWriteTemplateStructure:()=>Nl,PromptWriteType:()=>Fl,ProviderApiKey:()=>kce,ProviderApiKeyPagePublic:()=>XU,ProviderApiKeyProvider:()=>LU,ProviderApiKeyPublic:()=>sp,ProviderApiKeyPublicProvider:()=>GU,ProviderApiKeyUpdate:()=>Da,ProviderApiKeyWrite:()=>Ua,ProviderApiKeyWriteProvider:()=>wl,ProviderAuthCheck:()=>Na,ProviderAuthConfig:()=>kt,ProviderAuthConfigPublic:()=>QU,ProviderAuthConfigPublicSendAs:()=>OU,ProviderAuthConfigSendAs:()=>gx,ProviderAuthConfigWrite:()=>xx,ProviderAuthConfigWriteSendAs:()=>bx,RecentActivityItemPublic:()=>eN,RecentActivityItemPublicType:()=>ZU,RecentActivityPagePublic:()=>tN,ReportCompleteRequest:()=>nn,ReportCompleteRequestStatus:()=>Jl,ReportFailure:()=>pp,ReportFailurePage:()=>nN,ReportFailureType:()=>iN,ReportPreference:()=>cp,ReportedIssue:()=>zy,ReportedIssueSeverity:()=>Ay,Request:()=>Uo,Response:()=>sN,ResponseFormat:()=>kb,ResponseFormatType:()=>wb,Result:()=>Er,ResultsNumberPublic:()=>iU,RetentionRulePagePublic:()=>uN,RetentionRulePublic:()=>Mi,RetentionRulePublicLevel:()=>pN,RetentionRulePublicRetention:()=>lN,RetentionRuleWrite:()=>sn,RetentionRuleWriteRetention:()=>Hl,RevokeRequest:()=>Ma,ScopedAnalyticsQueryRequest:()=>kn,ScoreCondition:()=>Zy,ScoreConditionOperator:()=>Yy,ScoreConditionPublic:()=>cA,ScoreConditionPublicOperator:()=>sA,ScoreConditionWrite:()=>My,ScoreConditionWriteOperator:()=>Fy,ScoreName:()=>gE,ScoreNamePublic:()=>yE,ServiceTogglesConfig:()=>gN,Span:()=>Os,SpanBatch:()=>Ace,SpanBatchUpdate:()=>yn,SpanBatchWrite:()=>xn,SpanEnrichmentOptions:()=>Db,SpanExperimentItemBulkWriteView:()=>PR,SpanExperimentItemBulkWriteViewSource:()=>wR,SpanExperimentItemBulkWriteViewType:()=>kR,SpanFilter:()=>ar,SpanFilterOperator:()=>b_,SpanFilterPublic:()=>Sr,SpanFilterPublicOperator:()=>Mx,SpanFilterWrite:()=>_s,SpanFilterWriteOperator:()=>Dz,SpanLlmAsJudgeCode:()=>is,SpanLlmAsJudgeCodePublic:()=>hz,SpanLlmAsJudgeCodeWrite:()=>Nz,SpanPagePublic:()=>xN,SpanPublic:()=>lp,SpanPublicSource:()=>fN,SpanPublicType:()=>yN,SpanSearchStreamRequestPublic:()=>wn,SpanSearchStreamRequestPublicExcludeItem:()=>am,SpanSearchStreamRequestPublicType:()=>nm,SpanSource:()=>bC,SpanType:()=>xC,SpanUpdate:()=>hn,SpanUpdateSource:()=>zw,SpanUpdateType:()=>vw,SpanUserDefinedMetricPythonCode:()=>os,SpanUserDefinedMetricPythonCodePublic:()=>bz,SpanUserDefinedMetricPythonCodeWrite:()=>Wz,SpanWrite:()=>Rn,SpanWriteSource:()=>Cw,SpanWriteType:()=>Iw,SpansCountResponse:()=>kN,StartMultipartUploadRequest:()=>Ho,StartMultipartUploadRequestEntityType:()=>Hc,StartMultipartUploadResponse:()=>AN,StreamOptions:()=>Pb,StudioEvaluation:()=>$I,StudioEvaluationPublic:()=>mD,StudioEvaluationWrite:()=>zD,StudioLlmModel:()=>XI,StudioLlmModelPublic:()=>uD,StudioLlmModelWrite:()=>vD,StudioMessage:()=>rD,StudioMessagePublic:()=>yD,StudioMessageWrite:()=>ED,StudioMetric:()=>KI,StudioMetricPublic:()=>cD,StudioMetricWrite:()=>AD,StudioOptimizer:()=>qI,StudioOptimizerPublic:()=>fD,StudioOptimizerWrite:()=>jD,StudioPrompt:()=>iD,StudioPromptPublic:()=>RD,StudioPromptWrite:()=>DD,TokenRequest:()=>Wa,TokenResponse:()=>PN,TokenUsageNames:()=>mp,Tool:()=>Tb,ToolCall:()=>Zn,ToolCallType:()=>BA,ToolType:()=>Sb,ToolsParam:()=>BI,ToolsParamChatCompletions:()=>NI,Trace:()=>Ks,TraceBatch:()=>Pce,TraceBatchUpdate:()=>jn,TraceBatchWrite:()=>En,TraceCountResponse:()=>vN,TraceEnrichmentOptions:()=>Nb,TraceExperimentItemBulkWriteView:()=>TR,TraceExperimentItemBulkWriteViewSource:()=>SR,TraceFilter:()=>jr,TraceFilterOperator:()=>hP,TraceFilterPublic:()=>vr,TraceFilterPublicOperator:()=>Vx,TraceFilterWrite:()=>fs,TraceFilterWriteOperator:()=>pz,TracePagePublic:()=>DN,TracePublic:()=>dp,TracePublicSource:()=>TN,TracePublicVisibilityMode:()=>CN,TraceSearchStreamRequestPublic:()=>In,TraceSearchStreamRequestPublicExcludeItem:()=>um,TraceSource:()=>zC,TraceThread:()=>up,TraceThreadBatchIdentifier:()=>Dn,TraceThreadBatchUpdate:()=>Nn,TraceThreadFilter:()=>or,TraceThreadFilterOperator:()=>e_,TraceThreadFilterPublic:()=>At,TraceThreadFilterPublicOperator:()=>Jx,TraceThreadFilterWrite:()=>ks,TraceThreadFilterWriteOperator:()=>Gz,TraceThreadIdentifier:()=>gd,TraceThreadLlmAsJudgeCode:()=>as,TraceThreadLlmAsJudgeCodePublic:()=>xz,TraceThreadLlmAsJudgeCodeWrite:()=>Oz,TraceThreadPage:()=>BN,TraceThreadSearchStreamRequest:()=>Fn,TraceThreadStatus:()=>UN,TraceThreadUpdate:()=>Un,TraceThreadUserDefinedMetricPythonCode:()=>ns,TraceThreadUserDefinedMetricPythonCodePublic:()=>_z,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Yz,TraceUpdate:()=>Tn,TraceUpdateSource:()=>Ow,TraceVisibilityMode:()=>vC,TraceWrite:()=>Cn,TraceWriteSource:()=>$w,UploadAttachmentRequestEntityType:()=>$c,Usage:()=>vv,UsageByWorkspaceProjectUserResponse:()=>VN,UsageProjectsRequest:()=>An,UsageProjectsResponse:()=>GN,UserDefinedMetricPythonCode:()=>ss,UserDefinedMetricPythonCodePublic:()=>Az,UserDefinedMetricPythonCodeWrite:()=>yS,ValidatedToken:()=>HN,ValidationDescriptor:()=>cx,ValidationDescriptorType:()=>sx,ValidationResult:()=>pI,ValidationResultType:()=>nI,ValueEntry:()=>JR,ValueEntryCompare:()=>aj,ValueEntryCompareSource:()=>ij,ValueEntryExperimentItemBulkWriteView:()=>yR,ValueEntryExperimentItemBulkWriteViewSource:()=>fR,ValueEntryPublic:()=>kE,ValueEntryPublicSource:()=>wE,ValueEntrySource:()=>VR,VideoUrl:()=>nP,VideoUrlPublic:()=>NP,VideoUrlWrite:()=>YP,View:()=>Vi,ViewArea:()=>ON,ViewCreate:()=>Mn,ViewCreateArea:()=>fm,ViewCreateAuthor:()=>hm,ViewCreateType:()=>ym,ViewCurrentVersion:()=>Wn,ViewInput:()=>Tt,ViewInputKind:()=>o_,ViewUpdate:()=>Vn,ViewVersion:()=>Wi,ViewVersionAuthor:()=>QN,ViewVersionCreate:()=>Ln,ViewVersionCreateAuthor:()=>bm,ViewVersionCreateType:()=>Rm,ViewVersionPage:()=>iF,ViewVersionSummary:()=>rF,ViewVersionSummaryAuthor:()=>qN,ViewVersionType:()=>YN,Webhook:()=>zk,WebhookExamples:()=>oF,WebhookPublic:()=>Bk,WebhookTestResult:()=>sF,WebhookTestResultStatus:()=>aF,WebhookWrite:()=>Xk,WelcomeWizardSubmission:()=>Jn,WelcomeWizardTracking:()=>pF,WorkspaceConfiguration:()=>gp,WorkspaceInfo:()=>qA,WorkspaceMetricRequest:()=>zce,WorkspaceMetricResponse:()=>fp,WorkspaceMetricsSummaryRequest:()=>Li,WorkspaceMetricsSummaryResponse:()=>cF,WorkspaceNameHolder:()=>lF,WorkspaceProjectName:()=>LN,WorkspaceProjectUserCount:()=>MN,WorkspaceSpanMetricRequest:()=>Gn,WorkspaceSpanMetricRequestInterval:()=>_m,WorkspaceSpanMetricRequestMetricType:()=>km,WorkspaceSpansCount:()=>wN,WorkspaceTokenUsageNamesRequest:()=>Hn,WorkspaceTraceCount:()=>zN,WorkspaceUserPermissions:()=>mF,agentConfigs:()=>jc,agentInsights:()=>Dc,agentInsightsEnrollment:()=>Uc,agentInsightsJobs:()=>Fc,alerts:()=>Mc,annotationQueues:()=>Lc,assertionResults:()=>Gc,attachments:()=>fi,chatCompletions:()=>Zc,datasets:()=>Ri,environments:()=>al,experiments:()=>ul,feedbackDefinitions:()=>fl,guardrailPolicies:()=>yl,guardrails:()=>bl,llmModels:()=>_t,llmProviderKey:()=>_l,mcpOAuth:()=>kl,ollama:()=>wi,optimizations:()=>zl,pairing:()=>vl,projects:()=>Dl,prompts:()=>Pt,reportFailures:()=>Ll,reports:()=>Gl,retentionRules:()=>Ol,runners:()=>hr,spans:()=>lm,systemAnalyticsQueries:()=>mm,systemUsage:()=>dm,traces:()=>gm,views:()=>xm,welcomeWizard:()=>wm,workspaces:()=>Am});var ie=n(()=>{J8();Tq();});var fd,jq=n(()=>{Z();Q();b();$();q();J();ie();ee();fd=class{constructor(i={}){this._options=B(i);}createAgentConfig(i,r){return P.fromPromise(this.__createAgentConfig(i,r))}async __createAgentConfig(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pm.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(i,r){return P.fromPromise(this.__updateAgentConfig(i,r))}async __updateAgentConfig(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pm.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(i,r,t={},o){return P.fromPromise(this.__createBlueprintFromMask(i,r,t,o))}async __createBlueprintFromMask(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/masks/${_.encodePathParam(r)}`),method:"POST",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r){return P.fromPromise(this.__createOrUpdateEnvs(i,r))}async __createOrUpdateEnvs(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Co.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(i,r,t={},o){return P.fromPromise(this.__getBlueprintByEnv(i,r,t,o))}async __getBlueprintByEnv(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"GET",headers:c,queryParameters:{...s,...o==null?void 0:o.queryParams},timeoutMs:((w=(y=o==null?void 0:o.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=o==null?void 0:o.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ct.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 K(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(i,r,t,o){return P.fromPromise(this.__setEnvByBlueprintName(i,r,t,o))}async __setEnvByBlueprintName(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r,t={},o){return P.fromPromise(this.__deleteEnv(i,r,t,o))}async __deleteEnv(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"DELETE",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r={},t){return P.fromPromise(this.__getBlueprintById(i,r,t))}async __getBlueprintById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=r,a={mask_id:o},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(i)}`),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:Ct.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 K(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(i,r,t={},o){return P.fromPromise(this.__getBlueprintByName(i,r,t,o))}async __getBlueprintByName(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),o==null?void 0:o.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(i)}/names/${_.encodePathParam(r)}`),method:"GET",headers:c,queryParameters:{...s,...o==null?void 0:o.queryParams},timeoutMs:((w=(y=o==null?void 0:o.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=o==null?void 0:o.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ct.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 K(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(i,r={},t){return P.fromPromise(this.__getBlueprintHistory(i,r,t))}async __getBlueprintHistory(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}`),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:jS.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 K(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(i,r={},t){return P.fromPromise(this.__getDeltaById(i,r,t))}async __getDeltaById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/deltas`),method:"GET",headers:o,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:Ct.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 K(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(i,r={},t){return P.fromPromise(this.__getLatestBlueprint(i,r,t))}async __getLatestBlueprint(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=r,a={mask_id:o},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(i)}`),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:Ct.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 K(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(i,r){return P.fromPromise(this.__removeConfigKeys(i,r))}async __removeConfigKeys(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Eo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===401?new K(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var hd,Cq=n(()=>{Z();Q();b();$();q();J();ie();ee();hd=class{constructor(i={}){this._options=B(i);}findAgentInsightsIssues(i,r){return P.fromPromise(this.__findAgentInsightsIssues(i,r))}async __findAgentInsightsIssues(i,r){var h,y,w,A,C,I,D,F,M,Y,pe;let{projectId:t,fromDate:o,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=i,d={project_id:t,from_date:o,to_date:a,status:s!=null?Ic.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?Ec.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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:nk.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 K(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(i,r){return P.fromPromise(this.__reportAgentInsightsIssues(i,r))}async __reportAgentInsightsIssues(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Do.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(i,r,t){return P.fromPromise(this.__getAgentInsightsIssueById(i,r,t))}async __getAgentInsightsIssueById(i,r,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,fromDate:a,toDate:s}=r,c={project_id:o,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(i)}`),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:mk.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 K(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(i,r,t){return P.fromPromise(this.__updateAgentInsightsIssue(i,r,t))}async __updateAgentInsightsIssue(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Io.jsonOrThrow(r,{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 K(a.error.body,a.rawResponse);case 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new O(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 yd,Eq=n(()=>{Z();Q();b();$();q();J();ie();yd=class{constructor(i={}){this._options=B(i);}enrolProjectsInAutoFirstRun(i,r){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(i,r))}async __enrolProjectsInAutoFirstRun(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Uo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var bd,Iq=n(()=>{Z();Q();b();$();q();J();ie();ee();bd=class{constructor(i={}){this._options=B(i);}getAgentInsightsJob(i,r={},t){return P.fromPromise(this.__getAgentInsightsJob(i,r,t))}async __getAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Pi.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(i,r={},t){return P.fromPromise(this.__createAgentInsightsJob(i,r,t))}async __createAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"POST",headers:o,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:Pi.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(i,r,t){return P.fromPromise(this.__updateAgentInsightsJob(i,r,t))}async __updateAgentInsightsJob(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Fo.jsonOrThrow(r,{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:Pi.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(i,r={},t){return P.fromPromise(this.__triggerAgentInsightsJob(i,r,t))}async __triggerAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/trigger`),method:"POST",headers:o,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")}updateAgentInsightsGuidance(i,r,t){return P.fromPromise(this.__updateAgentInsightsGuidance(i,r,t))}async __updateAgentInsightsGuidance(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/guidance`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:No.jsonOrThrow(r,{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:Pi.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 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new O(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/agent-insights/jobs/{projectId}/guidance")}};});var Rd,Dq=n(()=>{Z();Q();b();$();q();J();ie();ee();Rd=class{constructor(i={}){this._options=B(i);}findAlerts(i={},r){return P.fromPromise(this.__findAlerts(i,r))}async __findAlerts(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,sorting:a,filters:s}=i,c={page:t,size:o,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Kn.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(i,r){return P.fromPromise(this.__createAlert(i,r))}async __createAlert(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(i,r){return P.fromPromise(this.__deleteAlertBatch(i,r))}async __deleteAlertBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(i,r={},t){return P.fromPromise(this.__getAlertById(i,r,t))}async __getAlertById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:On.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(i,r,t){return P.fromPromise(this.__updateAlert(i,r,t))}async __updateAlert(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qn.jsonOrThrow(o,{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 O(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(i={},r){return P.fromPromise(this.__getWebhookExamples(i,r))}async __getWebhookExamples(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=i,o={alert_type:t!=null?Bc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:oF.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(i,r){return P.fromPromise(this.__testWebhook(i,r))}async __testWebhook(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sF.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var xd,Uq=n(()=>{Z();Q();b();$();q();J();ie();ee();xd=class{constructor(i={}){this._options=B(i);}addItemsToAnnotationQueue(i,r,t){return P.fromPromise(this.__addItemsToAnnotationQueue(i,r,t))}async __addItemsToAnnotationQueue(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{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(i={},r){return P.fromPromise(this.__findAnnotationQueues(i,r))}async __findAnnotationQueues(i={},r){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:o,name:a,filters:s,sorting:c}=i,l={page:t,size:o,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=r==null?void 0:r.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((C=(A=r==null?void 0:r.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=r==null?void 0:r.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:SA.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(i,r){return P.fromPromise(this.__createAnnotationQueue(i,r))}async __createAnnotationQueue(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Bo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(i,r){return P.fromPromise(this.__createAnnotationQueueBatch(i,r))}async __createAnnotationQueueBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Mo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(i,r){return P.fromPromise(this.__deleteAnnotationQueueBatch(i,r))}async __deleteAnnotationQueueBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(i,r={},t){return P.fromPromise(this.__getAnnotationQueueById(i,r,t))}async __getAnnotationQueueById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Yn.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(i,r={},t){return P.fromPromise(this.__updateAnnotationQueue(i,r,t))}async __updateAnnotationQueue(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Jo.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getAnnotationQueueLocks(i,r,t))}async __getAnnotationQueueLocks(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/locks`),method:"GET",headers:o,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:SI.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(i,r,t={},o){return P.fromPromise(this.__lockAnnotationQueueItem(i,r,t,o))}async __lockAnnotationQueueItem(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/items/${_.encodePathParam(r)}/lock`),method:"PUT",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:zI.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(i,r,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(i,r,t))}async __removeItemsFromAnnotationQueue(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__searchAnnotationQueueItems(i,r,t))}async __searchAnnotationQueueItems(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/search`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wo.jsonOrThrow(r,{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:wA.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 wd,Nq=n(()=>{Z();Q();b();$();q();J();ie();wd=class{constructor(i={}){this._options=B(i);}storeAssertionsBatch(i,r){return P.fromPromise(this.__storeAssertionsBatch(i,r))}async __storeAssertionsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Go.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/assertion-results")}};});var _d,Fq=n(()=>{Z();Q();b();$();q();J();ie();ee();_d=class{constructor(i={}){this._options=B(i);}attachmentList(i,r){return P.fromPromise(this.__attachmentList(i,r))}async __attachmentList(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,projectId:a,entityType:s,entityId:c,path:l}=i,m={page:t,size:o,project_id:a,entity_type:Kc.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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:GA.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 K(d.error.body,d.rawResponse);case 403:throw new se(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(i,r){return P.fromPromise(this.__completeMultiPartUpload(i,r))}async __completeMultiPartUpload(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Km.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(i,r){return P.fromPromise(this.__deleteAttachments(i,r))}async __deleteAttachments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Km.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(i,r){return P.fromPromise(this.__downloadAttachment(i,r))}async __downloadAttachment(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{workspaceName:t,containerId:o,entityType:a,entityId:s,fileName:c,mimeType:l}=i,m={workspace_name:t,container_id:o,entity_type:Qc.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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},responseType:"streaming",timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.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 K(d.error.body,d.rawResponse);case 403:throw new se(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(i,r){return P.fromPromise(this.__startMultiPartUpload(i,r))}async __startMultiPartUpload(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:AN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(i,r){return P.fromPromise(this.__uploadAttachment(i,r))}async __uploadAttachment(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{fileName:t,projectName:o,mimeType:a,entityType:s,entityId:c,body:l}=i,m={file_name:t,project_name:o,mime_type:a,entity_type:$c.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},requestType:"json",body:fi.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.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 K(d.error.body,d.rawResponse);case 403:throw new se(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 kd,Bq=n(()=>{Z();Q();b();$();q();J();ie();ee();kd=class{constructor(i={}){this._options=B(i);}findEvaluators(i={},r){return P.fromPromise(this.__findEvaluators(i,r))}async __findEvaluators(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{projectId:t,id:o,name:a,filters:s,sorting:c,page:l,size:m}=i,u={project_id:t,id:o,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:vz.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(i,r){return P.fromPromise(this.__createAutomationRuleEvaluator(i,r))}async __createAutomationRuleEvaluator(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:PS.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(i,r){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(i,r))}async __deleteAutomationRuleEvaluatorBatch(i,r){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:o}=i,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},requestType:"json",body:ue.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r={},t){return P.fromPromise(this.__getEvaluatorById(i,r,t))}async __getEvaluatorById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:o}=r,a={project_id:o},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(i)}`),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:Iz.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(i,r,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(i,r,t))}async __updateAutomationRuleEvaluator(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hS.jsonOrThrow(o,{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===409?new X(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/automations/evaluators/{id}")}getEvaluatorLogsById(i,r={},t){return P.fromPromise(this.__getEvaluatorLogsById(i,r,t))}async __getEvaluatorLogsById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:o}=r,a={size:o},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(i)}/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:EI.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 Ad,Mq=n(()=>{Z();Q();b();$();q();J();ie();Ad=class{constructor(i={}){this._options=B(i);}createChatCompletions(i={},r){return P.fromPromise(this.__createChatCompletions(i,r))}async __createChatCompletions(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:jv.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/chat/completions")}};});var Pd,Wq=n(()=>{Z();Q();b();$();q();J();ie();ee();Pd=class{constructor(i={}){this._options=B(i);}access(i,r){return P.fromPromise(this.__access(i,r))}async __access(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:XA.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(i){return P.fromPromise(this.__getWorkspaceName(i))}async __getWorkspaceName(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:lF.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 K(t.error.body,t.rawResponse);case 403:throw new se(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 zd,Vq=n(()=>{Z();Q();b();$();q();J();ie();ee();zd=class{constructor(i={}){this._options=B(i);}createDashboardSavedQuery(i,r){return P.fromPromise(this.__createDashboardSavedQuery(i,r))}async __createDashboardSavedQuery(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/dashboard-saved-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ss.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ss.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 501:throw new Se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/internal/dashboard-saved-queries")}getDashboardSavedQuery(i,r={},t){return P.fromPromise(this.__getDashboardSavedQuery(i,r,t))}async __getDashboardSavedQuery(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/dashboard-saved-queries/${_.encodePathParam(i)}`),method:"GET",headers:o,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:Ss.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 501:throw new Se(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/internal/dashboard-saved-queries/{id}")}};});var Sd,Lq=n(()=>{Z();Q();b();$();q();J();ie();ee();Sd=class{constructor(i={}){this._options=B(i);}findDashboards(i={},r){return P.fromPromise(this.__findDashboards(i,r))}async __findDashboards(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r){return P.fromPromise(this.__createDashboard(i,r))}async __createDashboard(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:js.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(i,r={},t){return P.fromPromise(this.__getDashboardById(i,r,t))}async __getDashboardById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:nr.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(i,r={},t){return P.fromPromise(this.__deleteDashboard(i,r,t))}async __deleteDashboard(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateDashboard(i,r,t))}async __updateDashboard(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{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:nr.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,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(i,r){return P.fromPromise(this.__deleteDashboardsBatch(i,r))}async __deleteDashboardsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/dashboards/delete-batch")}runDashboardWidgetQuery(i,r,t,o){return P.fromPromise(this.__runDashboardWidgetQuery(i,r,t,o))}async __runDashboardWidgetQuery(i,r,t,o){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=o==null?void 0:o.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),o==null?void 0:o.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/dashboards/${_.encodePathParam(i)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ts.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=o==null?void 0:o.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=o==null?void 0:o.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.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 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new O(c.error.body,c.rawResponse);case 429:throw new fe(c.error.body,c.rawResponse);case 501:throw new Se(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,"POST","/v1/private/dashboards/{dashboardId}/widgets/{widgetId}/query")}};});var vd,Jq=n(()=>{Z();Q();b();Lr();$();q();J();ie();ee();vd=class{constructor(i={}){this._options=B(i);}applyDatasetItemChanges(i,r,t){return P.fromPromise(this.__applyDatasetItemChanges(i,r,t))}async __applyDatasetItemChanges(i,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:o,body:a}=r,s={override:o},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(i)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:LT.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:Cr.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(i,r){return P.fromPromise(this.__batchUpdateDatasetItems(i,r))}async __batchUpdateDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ta.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(i={},r){return P.fromPromise(this.__findDatasets(i,r))}async __findDatasets(i={},r){var y,w,A,C,I,D,F,M,Y,pe,ye;let{page:t,size:o,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=i,f={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((M=(F=r==null?void 0:r.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=r==null?void 0:r.maxRetries)!=null?pe:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ye=this._options)==null?void 0:ye.fetch,logging:this._options.logging});if(h.ok)return {data:Ws.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(i,r){return P.fromPromise(this.__createDataset(i,r))}async __createDataset(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:da.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(i,r){return P.fromPromise(this.__createOrUpdateDatasetItems(i,r))}async __createOrUpdateDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(i,r){return P.fromPromise(this.__createDatasetItemsFromCsv(i,r))}async __createDatasetItemsFromCsv(i,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await iy();t.append("file",Xe(i.file)),t.append("dataset_id",i.datasetId);let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),r==null?void 0:r.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:r==null?void 0:r.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__createDatasetItemsFromJson(i,r))}async __createDatasetItemsFromJson(i,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await iy();t.append("file",Xe(i.file)),t.append("dataset_id",i.datasetId),t.append("format",ol.jsonOrThrow(i.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),r==null?void 0:r.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:r==null?void 0:r.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r,t){return P.fromPromise(this.__createDatasetItemsFromSpans(i,r,t))}async __createDatasetItemsFromSpans(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/from-spans`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$o.jsonOrThrow(r,{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(i,r,t){return P.fromPromise(this.__createDatasetItemsFromTraces(i,r,t))}async __createDatasetItemsFromTraces(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/from-traces`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Yo.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getDatasetById(i,r,t))}async __getDatasetById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Di.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(i,r,t){return P.fromPromise(this.__updateDataset(i,r,t))}async __updateDataset(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sa.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__deleteDataset(i,r,t))}async __deleteDataset(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deleteDatasetByName(i,r))}async __deleteDatasetByName(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(i={},r){return P.fromPromise(this.__deleteDatasetItems(i,r))}async __deleteDatasetItems(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(i,r){return P.fromPromise(this.__deleteDatasetsBatch(i,r))}async __deleteDatasetsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(i,r={},t){return P.fromPromise(this.__downloadDatasetExport(i,r,t))}async __downloadDatasetExport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/download`),method:"GET",headers:o,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(i,r,t){return P.fromPromise(this.__expandDataset(i,r,t))}async __expandDataset(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/expansions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Xo.jsonOrThrow(r,{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:VT.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(i,r={},t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(i,r,t))}async __findDatasetItemsWithExperimentItems(i,r={},t){var y,w,A,C,I,D,F,M,Y,pe,ye;let{page:o,size:a,experimentIds:s,datasetVersions:c,filters:l,sorting:m,search:u,truncate:d}=r,f={page:o,size:a,experiment_ids:s,dataset_versions:c,filters:l,sorting:m,search:u,truncate:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=t==null?void 0:t.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),t==null?void 0:t.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/${_.encodePathParam(i)}/items/experiments/items`),method:"GET",headers:g,queryParameters:{...f,...t==null?void 0:t.queryParams},timeoutMs:((M=(F=t==null?void 0:t.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=t==null?void 0:t.maxRetries)!=null?pe:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ye=this._options)==null?void 0:ye.fetch,logging:this._options.logging});if(h.ok)return {data:bj.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/{id}/items/experiments/items")}getDatasetByIdentifier(i,r){return P.fromPromise(this.__getDatasetByIdentifier(i,r))}async __getDatasetByIdentifier(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ea.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Di.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(i,r,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(i,r,t))}async __getDatasetExperimentItemsStats(i,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:o,filters:a}=r,s={experiment_ids:o,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(i)}/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:qr.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(i,r={},t){return P.fromPromise(this.__getDatasetExportJob(i,r,t))}async __getDatasetExportJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:bi.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(i){return P.fromPromise(this.__getDatasetExportJobs(i))}async __getDatasetExportJobs(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ri.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(i,r={},t){return P.fromPromise(this.__getDatasetItemById(i,r,t))}async __getDatasetItemById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Bs.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(i,r,t){return P.fromPromise(this.__patchDatasetItem(i,r,t))}async __patchDatasetItem(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__getDatasetItems(i,r,t))}async __getDatasetItems(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,version:s,filters:c,truncate:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Cj.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(i,r={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(i,r,t))}async __getDatasetItemsOutputColumns(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:o}=r,a={experiment_ids:o},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(i)}/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:VD.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(i,r={},t){return P.fromPromise(this.__markDatasetExportJobViewed(i,r,t))}async __markDatasetExportJobViewed(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/mark-viewed`),method:"PUT",headers:o,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(i,r={},t){return P.fromPromise(this.__startDatasetExport(i,r,t))}async __startDatasetExport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/export`),method:"POST",headers:o,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:bi.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")}streamDatasetExperimentItems(i={},r){return P.fromPromise(this.__streamDatasetExperimentItems(i,r))}async __streamDatasetExperimentItems(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/experiments/items/stream")}streamDatasetItems(i,r){return P.fromPromise(this.__streamDatasetItems(i,r))}async __streamDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:aa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(i,r={},t){return P.fromPromise(this.__compareDatasetVersions(i,r,t))}async __compareDatasetVersions(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/diff`),method:"GET",headers:o,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:Vj.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(i,r,t,o){return P.fromPromise(this.__createVersionTag(i,r,t,o))}async __createVersionTag(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:la.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r,t,o={},a){return P.fromPromise(this.__deleteVersionTag(i,r,t,o,a))}async __deleteVersionTag(i,r,t,o={},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(i)}/versions/${_.encodePathParam(r)}/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}")}getDatasetVersionByHash(i,r,t={},o){return P.fromPromise(this.__getDatasetVersionByHash(i,r,t,o))}async __getDatasetVersionByHash(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Cr.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/datasets/{id}/versions/hash/{versionHash}")}updateDatasetVersion(i,r,t={},o){return P.fromPromise(this.__updateDatasetVersion(i,r,t,o))}async __updateDatasetVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:ma.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Cr.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}")}listDatasetVersions(i,r={},t){return P.fromPromise(this.__listDatasetVersions(i,r,t))}async __listDatasetVersions(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:Jj.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(i,r,t){return P.fromPromise(this.__restoreDatasetVersion(i,r,t))}async __restoreDatasetVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/restore`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:pa.jsonOrThrow(r,{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:Cr.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(i,r,t){return P.fromPromise(this.__retrieveDatasetVersion(i,r,t))}async __retrieveDatasetVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/retrieve`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ca.jsonOrThrow(r,{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:Cr.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")}};});var Td,Gq=n(()=>{Z();Q();b();$();q();J();ie();ee();Td=class{constructor(i={}){this._options=B(i);}findEnvironments(i){return P.fromPromise(this.__findEnvironments(i))}async __findEnvironments(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:$j.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(i,r){return P.fromPromise(this.__createEnvironment(i,r))}async __createEnvironment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ga.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(i,r){return P.fromPromise(this.__deleteEnvironmentsBatch(i,r))}async __deleteEnvironmentsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(i,r={},t){return P.fromPromise(this.__getEnvironmentById(i,r,t))}async __getEnvironmentById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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 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(i,r={},t){return P.fromPromise(this.__updateEnvironment(i,r,t))}async __updateEnvironment(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ua.jsonOrThrow(r,{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 jd,Hq=n(()=>{Z();Q();b();$();q();J();ie();ee();jd=class{constructor(i={}){this._options=B(i);}batchUpdateExperiments(i,r){return P.fromPromise(this.__batchUpdateExperiments(i,r))}async __batchUpdateExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ya.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/experiments/batch")}cancelExperiments(i,r){return P.fromPromise(this.__cancelExperiments(i,r))}async __cancelExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/cancel"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ta.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 403:throw new se(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/experiments/cancel")}findExperiments(i={},r){return P.fromPromise(this.__findExperiments(i,r))}async __findExperiments(i={},r){var D,F,M,Y,pe,ye,Ee,Ie,De,er,ho;let{page:t,size:o,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=i,A={page:t,size:o,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":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ie=(Ee=r==null?void 0:r.timeoutInSeconds)!=null?Ee:(ye=this._options)==null?void 0:ye.timeoutInSeconds)!=null?Ie:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(De=this._options)==null?void 0:De.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ho=this._options)==null?void 0:ho.fetch,logging:this._options.logging});if(I.ok)return {data:Ys.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(i,r){return P.fromPromise(this.__createExperiment(i,r))}async __createExperiment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(i,r){return P.fromPromise(this.__createExperimentItems(i,r))}async __createExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(i,r){return P.fromPromise(this.__deleteExperimentItems(i,r))}async __deleteExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:za.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(i,r){return P.fromPromise(this.__deleteExperimentsById(i,r))}async __deleteExperimentsById(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(i,r){return P.fromPromise(this.__executeExperiment(i,r))}async __executeExperiment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ra.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sC.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(i,r){return P.fromPromise(this.__experimentItemsBulk(i,r))}async __experimentItemsBulk(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:_a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(i={},r){return P.fromPromise(this.__findFeedbackScoreNames(i,r))}async __findFeedbackScoreNames(i={},r){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:o}=i,a={experiment_ids:t,project_id:o},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__findExperimentGroups(i,r))}async __findExperimentGroups(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{groups:t,types:o,name:a,projectId:s,projectDeleted:c,filters:l}=i,m={groups:t,types:o,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:yC.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(i={},r){return P.fromPromise(this.__findExperimentGroupsAggregations(i,r))}async __findExperimentGroupsAggregations(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{groups:t,types:o,name:a,projectId:s,projectDeleted:c,filters:l}=i,m={groups:t,types:o,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:lC.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(i,r){return P.fromPromise(this.__finishExperiments(i,r))}async __finishExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(i,r={},t){return P.fromPromise(this.__getExperimentById(i,r,t))}async __getExperimentById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:$s.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(i,r,t){return P.fromPromise(this.__updateExperiment(i,r,t))}async __updateExperiment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__getExperimentItemById(i,r,t))}async __getExperimentItemById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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 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(i,r){return P.fromPromise(this.__streamExperimentItems(i,r))}async __streamExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(i,r){return P.fromPromise(this.__streamExperiments(i,r))}async __streamExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Sa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/stream")}};});var Cd,Oq=n(()=>{Z();Q();b();$();q();J();ie();ee();Cd=class{constructor(i={}){this._options=B(i);}findFeedbackDefinitions(i={},r){return P.fromPromise(this.__findFeedbackDefinitions(i,r))}async __findFeedbackDefinitions(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,name:a,type:s}=i,c={page:t,size:o,name:a,type:s!=null?gl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:aE.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(i,r){return P.fromPromise(this.__createFeedbackDefinition(i,r))}async __createFeedbackDefinition(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qC.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(i,r={},t){return P.fromPromise(this.__getFeedbackDefinitionById(i,r,t))}async __getFeedbackDefinitionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:sE.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(i,r,t){return P.fromPromise(this.__updateFeedbackDefinition(i,r,t))}async __updateFeedbackDefinition(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:jE.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(i,r,t))}async __deleteFeedbackDefinitionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(i,r))}async __deleteFeedbackDefinitionsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Ed,Kq=n(()=>{Z();Q();b();$();q();J();ie();ee();Ed=class{constructor(i={}){this._options=B(i);}findGuardrailPolicies(i={},r){return P.fromPromise(this.__findGuardrailPolicies(i,r))}async __findGuardrailPolicies(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,names:s,executionScope:c,sorting:l}=i,m={page:t,size:o,name:a,names:s,execution_scope:c!=null?hl.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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/guardrails/policies"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:XE.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 400:throw new N(d.error.body,d.rawResponse);case 403:throw new se(d.error.body,d.rawResponse);case 503:throw new Ue(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/guardrails/policies")}createGuardrailPolicy(i,r){return P.fromPromise(this.__createGuardrailPolicy(i,r))}async __createGuardrailPolicy(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/policies"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:sd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/guardrails/policies")}getGuardrailPolicyById(i,r={},t){return P.fromPromise(this.__getGuardrailPolicyById(i,r,t))}async __getGuardrailPolicyById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/guardrails/policies/${_.encodePathParam(i)}`),method:"GET",headers:o,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:qs.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 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 503:throw new Ue(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/guardrails/policies/{id}")}updateGuardrailPolicy(i,r,t){return P.fromPromise(this.__updateGuardrailPolicy(i,r,t))}async __updateGuardrailPolicy(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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/guardrails/policies/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sd.jsonOrThrow(o,{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 403:throw new se(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);case 422:throw new O(s.error.body,s.rawResponse);case 429:throw new fe(s.error.body,s.rawResponse);case 503:throw new Ue(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/guardrails/policies/{id}")}deleteGuardrailPolicy(i,r={},t){return P.fromPromise(this.__deleteGuardrailPolicy(i,r,t))}async __deleteGuardrailPolicy(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/guardrails/policies/${_.encodePathParam(i)}`),method:"DELETE",headers:o,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")switch(a.error.statusCode){case 403:throw new se(a.error.body,a.rawResponse);case 503:throw new Ue(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,"DELETE","/v1/private/guardrails/policies/{id}")}};});var Id,Qq=n(()=>{Z();Q();b();$();q();J();ie();ee();Id=class{constructor(i={}){this._options=B(i);}createGuardrails(i,r){return P.fromPromise(this.__createGuardrails(i,r))}async __createGuardrails(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/guardrails")}validateGuardrails(i,r){return P.fromPromise(this.__validateGuardrails(i,r))}async __validateGuardrails(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/validations"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ca.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:lI.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/guardrails/validations")}};});var Dd,$q=n(()=>{Z();Q();b();$();q();J();ie();ee();Dd=class{constructor(i={}){this._options=B(i);}findInsightsViews(i={},r){return P.fromPromise(this.__findInsightsViews(i,r))}async __findInsightsViews(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r){return P.fromPromise(this.__createInsightsView(i,r))}async __createInsightsView(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:js.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(i,r={},t){return P.fromPromise(this.__getInsightsViewById(i,r,t))}async __getInsightsViewById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:nr.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(i,r={},t){return P.fromPromise(this.__deleteInsightsView(i,r,t))}async __deleteInsightsView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateInsightsView(i,r,t))}async __updateInsightsView(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{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:nr.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,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(i,r){return P.fromPromise(this.__deleteInsightsViewsBatch(i,r))}async __deleteInsightsViewsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/insights-views/delete-batch")}runInsightsViewWidgetQuery(i,r,t,o){return P.fromPromise(this.__runInsightsViewWidgetQuery(i,r,t,o))}async __runInsightsViewWidgetQuery(i,r,t,o){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=o==null?void 0:o.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),o==null?void 0:o.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/insights-views/${_.encodePathParam(i)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ts.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=o==null?void 0:o.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=o==null?void 0:o.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.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 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new O(c.error.body,c.rawResponse);case 429:throw new fe(c.error.body,c.rawResponse);case 501:throw new Se(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,"POST","/v1/private/insights-views/{insightsViewId}/widgets/{widgetId}/query")}};});var Ud,Yq=n(()=>{Z();Q();b();$();q();J();ie();Ud=class{constructor(i={}){this._options=B(i);}getLlmModels(i){return P.fromPromise(this.__getLlmModels(i))}async __getLlmModels(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_t.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")}getLlmModelProfiles(i){return P.fromPromise(this.__getLlmModelProfiles(i))}async __getLlmModelProfiles(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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/profiles"),method:"GET",headers:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_t.getLlmModelProfiles.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/profiles")}};});var Nd,Xq=n(()=>{Z();Q();b();$();q();J();ie();ee();Nd=class{constructor(i={}){this._options=B(i);}deleteLlmProviderApiKeysBatch(i,r){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(i,r))}async __deleteLlmProviderApiKeysBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(i){return P.fromPromise(this.__findLlmProviderKeys(i))}async __findLlmProviderKeys(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:XU.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(i,r){return P.fromPromise(this.__storeLlmProviderApiKey(i,r))}async __storeLlmProviderApiKey(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ua.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(i,r={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(i,r,t))}async __getLlmProviderApiKeyById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:sp.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(i,r={},t){return P.fromPromise(this.__updateLlmProviderApiKey(i,r,t))}async __updateLlmProviderApiKey(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Da.jsonOrThrow(r,{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 K(a.error.body,a.rawResponse);case 403:throw new se(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(i={},r){return P.fromPromise(this.__testLlmProviderAuthConfig(i,r))}async __testLlmProviderAuthConfig(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Fd,Zq=n(()=>{Z();Q();b();$();q();J();ie();ee();Fd=class{constructor(i={}){this._options=B(i);}evaluateSpans(i,r){return P.fromPromise(this.__evaluateSpans(i,r))}async __evaluateSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(i,r){return P.fromPromise(this.__evaluateThreads(i,r))}async __evaluateThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(i,r){return P.fromPromise(this.__evaluateTraces(i,r))}async __evaluateTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Bd,qq=n(()=>{Z();Q();b();$();q();J();ie();ee();Bd=class{constructor(i={}){this._options=B(i);}authorize(i,r){return P.fromPromise(this.__authorize(i,r))}async __authorize(i,r){var g,h,y,w,A,C,I,D,F,M,Y;let{clientId:t,redirectUri:o,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=i,u={client_id:t,redirect_uri:o,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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__consent(i,r))}async __consent(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ba.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:dT.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(i,r){return P.fromPromise(this.__getAuthorizeContext(i,r))}async __getAuthorizeContext(i,r){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:o}=i,a={client_id:t,redirect_uri:o},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:rP.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(i){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(i))}async __getOAuthAuthorizationServerMetadata(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ZA.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(i,r){return P.fromPromise(this.__registerOAuthClient(i,r))}async __registerOAuthClient(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Kv.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===429?new fe(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/register")}revoke(i={},r){return P.fromPromise(this.__revoke(i,r))}async __revoke(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"form",body:Ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/revoke")}token(i={},r){return P.fromPromise(this.__token(i,r))}async __token(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"form",body:Wa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:PN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/token")}validateOAuthToken(i){return P.fromPromise(this.__validateOAuthToken(i))}async __validateOAuthToken(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:HN.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 K(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 Md,eee=n(()=>{Z();Q();b();$();q();J();ie();ee();Md=class{constructor(i={}){this._options=B(i);}listModels(i,r){return P.fromPromise(this.__listModels(i,r))}async __listModels(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:cd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:wi.listModels.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 500:throw new gt(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/ollama/models")}testConnection(i,r){return P.fromPromise(this.__testConnection(i,r))}async __testConnection(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:cd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:pd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 502:throw new xo(pd.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var Wd,ree=n(()=>{Z();Q();b();$();q();J();ee();Wd=class{constructor(i={}){this._options=B(i);}downloadOllieState(i){return P.fromPromise(this.__downloadOllieState(i))}async __downloadOllieState(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,responseType:"streaming",timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 K(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(i,r){return P.fromPromise(this.__replaceOllieState(i,r))}async __replaceOllieState(i,r){var s,c,l,m,u,d,f,g,h,y,w;let t=await ko.toBinaryUploadRequest(i),o=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=r==null?void 0:r.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,r==null?void 0:r.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:o,contentType:"application/gzip",queryParameters:r==null?void 0:r.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=r==null?void 0:r.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=r==null?void 0:r.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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 K(a.error.body,a.rawResponse);case 429: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,"PUT","/v1/private/ollie/state")}deleteOllieState(i){return P.fromPromise(this.__deleteOllieState(i))}async __deleteOllieState(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 K(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 Vd,tee=n(()=>{Z();Q();b();$();q();J();Vd=class{constructor(i={}){this._options=B(i);}receiveProtobufTraces(i){return P.fromPromise(this.__receiveProtobufTraces(i))}async __receiveProtobufTraces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 Ld,iee=n(()=>{Z();Q();b();$();q();J();ie();ee();Ld=class{constructor(i={}){this._options=B(i);}findOptimizations(i={},r){return P.fromPromise(this.__findOptimizations(i,r))}async __findOptimizations(i={},r){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:t,size:o,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=i,d={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:op.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(i,r){return P.fromPromise(this.__createOptimization(i,r))}async __createOptimization(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ld.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(i,r){return P.fromPromise(this.__upsertOptimization(i,r))}async __upsertOptimization(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ld.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(i,r){return P.fromPromise(this.__deleteOptimizationsById(i,r))}async __deleteOptimizationsById(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(i,r={},t){return P.fromPromise(this.__getOptimizationById(i,r,t))}async __getOptimizationById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ip.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(i,r={},t){return P.fromPromise(this.__updateOptimizationsById(i,r,t))}async __updateOptimizationsById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Va.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getStudioOptimizationLogs(i,r,t))}async __getStudioOptimizationLogs(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/logs`),method:"GET",headers:o,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:BD.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 Jd,oee=n(()=>{Z();Q();b();$();q();J();ie();ee();Jd=class{constructor(i={}){this._options=B(i);}activatePairingSession(i,r,t){return P.fromPromise(this.__activatePairingSession(i,r,t))}async __activatePairingSession(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/activate`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:La.jsonOrThrow(r,{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 se(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 O(a.error.body,a.rawResponse);case 429: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/pairing/sessions/{sessionId}/activate")}createPairingSession(i,r){return P.fromPromise(this.__createPairingSession(i,r))}async __createPairingSession(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fT.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/pairing/sessions")}};});var Gd,aee=n(()=>{Z();Q();b();$();q();J();ie();ee();Gd=class{constructor(i={}){this._options=B(i);}findAlertsByProject(i,r={},t){return P.fromPromise(this.__findAlertsByProject(i,r,t))}async __findAlertsByProject(i,r={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:o,size:a,sorting:s,filters:c}=r,l={page:o,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(i)}/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:Kn.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(i,r={},t){return P.fromPromise(this.__findDashboardsByProject(i,r,t))}async __findDashboardsByProject(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,name:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r={},t){return P.fromPromise(this.__findDatasetsByProject(i,r,t))}async __findDatasetsByProject(i,r={},t){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:o,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=r,d={page:o,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(i)}/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:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:Ws.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(i,r={},t){return P.fromPromise(this.__findExperimentsByProject(i,r,t))}async __findExperimentsByProject(i,r={},t){var C,I,D,F,M,Y,pe,ye,Ee,Ie,De;let{page:o,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=r,y={page:o,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((M=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?M:v.Default,`v1/private/projects/${_.encodePathParam(i)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((ye=(pe=t==null?void 0:t.timeoutInSeconds)!=null?pe:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?ye:60)*1e3,maxRetries:(Ie=t==null?void 0:t.maxRetries)!=null?Ie:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(De=this._options)==null?void 0:De.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 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(i,r={},t){return P.fromPromise(this.__findOptimizationsByProject(i,r,t))}async __findOptimizationsByProject(i,r={},t){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:o,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=r,d={page:o,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(i)}/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:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:op.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(i,r={},t){return P.fromPromise(this.__getPromptsByProject(i,r,t))}async __getPromptsByProject(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,name:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:np.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(i={},r){return P.fromPromise(this.__findProjects(i,r))}async __findProjects(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,name:a,sorting:s}=i,c={page:t,size:o,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:cU.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(i,r){return P.fromPromise(this.__createProject(i,r))}async __createProject(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:$a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/projects")}getProjectById(i,r={},t){return P.fromPromise(this.__getProjectById(i,r,t))}async __getProjectById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ap.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(i,r={},t){return P.fromPromise(this.__deleteProjectById(i,r,t))}async __deleteProjectById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r={},t){return P.fromPromise(this.__updateProject(i,r,t))}async __updateProject(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qa.jsonOrThrow(r,{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 O(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(i,r){return P.fromPromise(this.__deleteProjectsBatch(i,r))}async __deleteProjectsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(i={},r){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(i,r))}async __findFeedbackScoreNamesByProjectIds(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=i,o={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:hE.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(i,r={},t){return P.fromPromise(this.__findTokenUsageNames(i,r,t))}async __findTokenUsageNames(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/token-usage/names`),method:"GET",headers:o,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:mp.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(i,r,t){return P.fromPromise(this.__getProjectKpiCards(i,r,t))}async __getProjectKpiCards(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/kpi-cards`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ga.jsonOrThrow(r,{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:yI.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(i,r={},t){return P.fromPromise(this.__getProjectMetrics(i,r,t))}async __getProjectMetrics(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/metrics`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Oa.jsonOrThrow(r,{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:aU.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(i={},r){return P.fromPromise(this.__getProjectStats(i,r))}async __getProjectStats(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{page:t,size:o,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=i,u={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:fU.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(i,r){return P.fromPromise(this.__retrieveProject(i,r))}async __retrieveProject(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ZD.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(i,r={},t){return P.fromPromise(this.__getRecentActivity(i,r,t))}async __getRecentActivity(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:tN.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 gt(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 Hd,nee=n(()=>{Z();Q();b();$();q();J();ie();ee();Hd=class{constructor(i={}){this._options=B(i);}getPrompts(i={},r){return P.fromPromise(this.__getPrompts(i,r))}async __getPrompts(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:np.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(i,r){return P.fromPromise(this.__createPrompt(i,r))}async __createPrompt(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:an.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(i,r){return P.fromPromise(this.__createPromptVersion(i,r))}async __createPromptVersion(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Xa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Fe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(i,r){return P.fromPromise(this.__updatePromptVersions(i,r))}async __updatePromptVersions(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(i,r={},t){return P.fromPromise(this.__getPromptById(i,r,t))}async __getPromptById(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:o,environment:a}=r,s={mask_id:o,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(i)}`),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:dd.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(i,r,t){return P.fromPromise(this.__updatePrompt(i,r,t))}async __updatePrompt(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Za.jsonOrThrow(r,{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 O(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(i,r={},t){return P.fromPromise(this.__deletePrompt(i,r,t))}async __deletePrompt(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deletePromptsBatch(i,r))}async __deletePromptsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(i,r={},t){return P.fromPromise(this.__getPromptByCommit(i,r,t))}async __getPromptByCommit(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:dd.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(i,r={},t){return P.fromPromise(this.__getPromptVersionById(i,r,t))}async __getPromptVersionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Fe.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(i,r,t={},o){return P.fromPromise(this.__getPromptVersionByNumber(i,r,t,o))}async __getPromptVersionByNumber(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/by-number/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Fe.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(i,r={},t){return P.fromPromise(this.__getPromptVersions(i,r,t))}async __getPromptVersions(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,search:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:VU.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(i,r){return P.fromPromise(this.__getPromptsByCommits(i,r))}async __getPromptsByCommits(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:en.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Pt.getPromptsByCommits.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(i,r,t={},o){return P.fromPromise(this.__restorePromptVersion(i,r,t,o))}async __restorePromptVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/${_.encodePathParam(r)}/restore`),method:"POST",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Fe.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(i,r){return P.fromPromise(this.__retrievePromptVersion(i,r))}async __retrievePromptVersion(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:on.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Fe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(i,r){return P.fromPromise(this.__retrievePromptVersionsByIds(i,r))}async __retrievePromptVersionsByIds(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:tn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Pt.retrievePromptVersionsByIds.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(i,r,t){return P.fromPromise(this.__setPromptVersionEnvironment(i,r,t))}async __setPromptVersionEnvironment(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/environments`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:rn.jsonOrThrow(r,{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 Od,see=n(()=>{Z();Q();b();$();q();J();ee();Od=class{constructor(i={}){this._options=B(i);}datasetsRedirect(i,r){return P.fromPromise(this.__datasetsRedirect(i,r))}async __datasetsRedirect(i,r){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:o,path:a}=i,s={dataset_id:t,workspace_name:o,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__experimentsRedirect(i,r))}async __experimentsRedirect(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:o,workspaceName:a,path:s}=i,c={dataset_id:t,experiment_id:o,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__optimizationsRedirect(i,r))}async __optimizationsRedirect(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:o,workspaceName:a,path:s}=i,c={dataset_id:t,optimization_id:o,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__projectsRedirect(i,r))}async __projectsRedirect(i,r){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:o,path:a}=i,s={trace_id:t,workspace_name:o,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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 Kd,pee=n(()=>{Z();Q();b();$();q();J();ie();ee();Kd=class{constructor(i={}){this._options=B(i);}findReportFailures(i,r){return P.fromPromise(this.__findReportFailures(i,r))}async __findReportFailures(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:o,page:a,size:s}=i,c={type:Vl.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:o,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:nN.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 K(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(i,r){return P.fromPromise(this.__createReportFailure(i,r))}async __createReportFailure(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:pp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/report-failures")}};});var Qd,cee=n(()=>{Z();Q();b();$();q();J();ie();ee();Qd=class{constructor(i={}){this._options=B(i);}completeReport(i,r,t,o){return P.fromPromise(this.__completeReport(i,r,t,o))}async __completeReport(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/reports/${_.encodePathParam(r)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:nn.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r={},t){return P.fromPromise(this.__generateReport(i,r,t))}async __generateReport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/reports/generate`),method:"POST",headers:o,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:CE.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 K(a.error.body,a.rawResponse);case 403:throw new se(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(i,r={},t){return P.fromPromise(this.__getReportPreference(i,r,t))}async __getReportPreference(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/reports/preferences`),method:"GET",headers:o,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:cp.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(i,r,t){return P.fromPromise(this.__updateReportPreference(i,r,t))}async __updateReportPreference(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:cp.jsonOrThrow(o,{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:cp.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(i,r={},t){return P.fromPromise(this.__getReports(i,r,t))}async __getReports(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:GI.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 $d,lee=n(()=>{Z();Q();b();$();q();J();ie();ee();$d=class{constructor(i={}){this._options=B(i);}findRetentionRules(i={},r){return P.fromPromise(this.__findRetentionRules(i,r))}async __findRetentionRules(i={},r){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:o,includeInactive:a}=i,s={page:t,size:o,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:uN.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(i,r){return P.fromPromise(this.__createRetentionRule(i,r))}async __createRetentionRule(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Mi.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(i,r={},t){return P.fromPromise(this.__getRetentionRuleById(i,r,t))}async __getRetentionRuleById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Mi.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(i,r={},t){return P.fromPromise(this.__deactivateRetentionRule(i,r,t))}async __deactivateRetentionRule(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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 Yd,mee=n(()=>{Z();Q();b();$();q();J();ie();ee();Yd=class{constructor(i={}){this._options=B(i);}getJobLogs(i,r={},t){return P.fromPromise(this.__getJobLogs(i,r,t))}async __getJobLogs(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:o}=r,a={offset:o},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(i)}/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:hr.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(i,r,t){return P.fromPromise(this.__appendJobLogs(i,r,t))}async __appendJobLogs(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.appendJobLogs.Request.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__cancelJob(i,r,t))}async __cancelJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/cancel`),method:"POST",headers:o,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(i,r,t){return P.fromPromise(this.__createBridgeCommand(i,r,t))}async __createBridgeCommand(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/bridge/commands`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ln.jsonOrThrow(r,{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:rv.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 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/local-runners/{runnerId}/bridge/commands")}createJob(i,r){return P.fromPromise(this.__createJob(i,r))}async __createJob(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new U(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(i,r={},t){return P.fromPromise(this.__getRunner(i,r,t))}async __getRunner(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ep.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(i,r={},t){return P.fromPromise(this.__disconnectRunner(i,r,t))}async __disconnectRunner(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t={},o){return P.fromPromise(this.__getBridgeCommand(i,r,t,o))}async __getBridgeCommand(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),o==null?void 0:o.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(i)}/bridge/commands/${_.encodePathParam(r)}`),method:"GET",headers:l,queryParameters:{...c,...o==null?void 0:o.queryParams},timeoutMs:((A=(w=o==null?void 0:o.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=o==null?void 0:o.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:$S.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(i,r={},t){return P.fromPromise(this.__getJob(i,r,t))}async __getJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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")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(i,r={},t){return P.fromPromise(this.__heartbeat(i,r,t))}async __heartbeat(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/heartbeats`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:un.jsonOrThrow(r,{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:kI.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 ut(Zj.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(i,r={},t){return P.fromPromise(this.__listJobs(i,r,t))}async __listJobs(i,r={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,page:a,size:s}=r,c={project_id:o,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(i)}/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:AI.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(i,r){return P.fromPromise(this.__listRunners(i,r))}async __listRunners(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:o,page:a,size:s}=i,c={project_id:t,status:o!=null?om.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:PI.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(i,r={},t){return P.fromPromise(this.__nextBridgeCommands(i,r,t))}async __nextBridgeCommands(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/bridge/commands/next`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:pn.jsonOrThrow(r,{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:ev.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(i,r={},t){return P.fromPromise(this.__nextJob(i,r,t))}async __nextJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/jobs/next`),method:"POST",headers:o,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:hr.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(i,r,t){return P.fromPromise(this.__patchChecklist(i,r,t))}async __patchChecklist(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.patchChecklist.Request.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__registerAgents(i,r,t))}async __registerAgents(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.registerAgents.Request.jsonOrThrow(o,{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(i,r,t,o){return P.fromPromise(this.__reportBridgeResult(i,r,t,o))}async __reportBridgeResult(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/bridge/commands/${_.encodePathParam(r)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:cn.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r,t){return P.fromPromise(this.__reportJobResult(i,r,t))}async __reportJobResult(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/results`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:gn.jsonOrThrow(r,{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 Xd,dee=n(()=>{Z();Q();b();$();q();J();ie();Xd=class{constructor(i={}){this._options=B(i);}getServiceToggles(i){return P.fromPromise(this.__getServiceToggles(i))}async __getServiceToggles(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:gN.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 Zd,uee=n(()=>{Z();Q();b();$();q();J();ie();ee();Zd=class{constructor(i={}){this._options=B(i);}addSpanComment(i,r,t){return P.fromPromise(this.__addSpanComment(i,r,t))}async __addSpanComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addSpanFeedbackScore(i,r,t))}async __addSpanFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ze.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__createSpans(i,r))}async __createSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:xn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(i,r){return P.fromPromise(this.__batchUpdateSpans(i,r))}async __batchUpdateSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:yn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(i={},r){return P.fromPromise(this.__getSpansByProject(i,r))}async __getSpansByProject(i={},r){var D,F,M,Y,pe,ye,Ee,Ie,De,er,ho;let{page:t,size:o,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=i,A={page:t,size:o,project_name:a,project_id:s,trace_id:c,type:l!=null?cm.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":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ie=(Ee=r==null?void 0:r.timeoutInSeconds)!=null?Ee:(ye=this._options)==null?void 0:ye.timeoutInSeconds)!=null?Ie:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(De=this._options)==null?void 0:De.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ho=this._options)==null?void 0:ho.fetch,logging:this._options.logging});if(I.ok)return {data:xN.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(i,r){return P.fromPromise(this.__createSpan(i,r))}async __createSpan(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Rn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans")}getSpanById(i,r={},t){return P.fromPromise(this.__getSpanById(i,r,t))}async __getSpanById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=r,a={strip_attachments:o},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(i)}`),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:lp.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(i,r={},t){return P.fromPromise(this.__deleteSpanById(i,r,t))}async __deleteSpanById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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 Se(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(i,r,t){return P.fromPromise(this.__updateSpan(i,r,t))}async __updateSpan(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteSpanComments(i,r))}async __deleteSpanComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(i,r,t){return P.fromPromise(this.__deleteSpanFeedbackScore(i,r,t))}async __deleteSpanFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vs.jsonOrThrow(o,{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(i={},r){return P.fromPromise(this.__findFeedbackScoreNames1(i,r))}async __findFeedbackScoreNames1(i={},r){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:o}=i,a={project_id:t,type:o!=null?sm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.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(i,r,t={},o){return P.fromPromise(this.__getSpanComment(i,r,t,o))}async __getSpanComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i={},r){return P.fromPromise(this.__getSpanStats(i,r))}async __getSpanStats(i={},r){var h,y,w,A,C,I,D,F,M,Y,pe;let{projectId:t,projectName:o,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=i,d={project_id:t,project_name:o,trace_id:a,type:s!=null?pm.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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:qr.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(i,r){return P.fromPromise(this.__scoreBatchOfSpans(i,r))}async __scoreBatchOfSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Zs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(i={},r){return P.fromPromise(this.__searchSpans(i,r))}async __searchSpans(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:wn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/search")}exist(i={},r){return P.fromPromise(this.__exist(i,r))}async __exist(i={},r){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:o,source:a}=i,s={project_id:t,project_name:o,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Hs.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(i,r,t){return P.fromPromise(this.__updateSpanComment(i,r,t))}async __updateSpanComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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 qd,gee=n(()=>{Z();Q();b();$();q();J();ie();ee();qd=class{constructor(i={}){this._options=B(i);}executeAnalyticsQuery(i,r,t){return P.fromPromise(this.__executeAnalyticsQuery(i,r,t))}async __executeAnalyticsQuery(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:_n.jsonOrThrow(r,{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 422:throw new O(a.error.body,a.rawResponse);case 501:throw new Se(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(i,r){return P.fromPromise(this.__executeScopedAnalyticsQuery(i,r))}async __executeScopedAnalyticsQuery(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:$r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 501:throw new Se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/internal/analytics-queries")}};});var eu,fee=n(()=>{Z();Q();b();$();q();J();ie();ee();eu=class{constructor(i={}){this._options=B(i);}findUsageProjects(i,r){return P.fromPromise(this.__findUsageProjects(i,r))}async __findUsageProjects(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/usage/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:An.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:GN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/internal/usage/projects")}getDatasetBiInfo(i){return P.fromPromise(this.__getDatasetBiInfo(i))}async __getDatasetBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getExperimentBiInfo(i))}async __getExperimentBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getSpansBiInfo(i))}async __getSpansBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(i))}async __getSpansCountBreakdownForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:VN.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(i){return P.fromPromise(this.__getSpansCountForWorkspaces(i))}async __getSpansCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:kN.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(i){return P.fromPromise(this.__getTracesBiInfo(i))}async __getTracesBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getTracesCountForWorkspaces(i))}async __getTracesCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vN.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 ru,hee=n(()=>{Z();Q();b();$();q();J();ie();ee();ru=class{constructor(i={}){this._options=B(i);}addThreadComment(i,r,t){return P.fromPromise(this.__addThreadComment(i,r,t))}async __addThreadComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addTraceComment(i,r,t))}async __addTraceComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addTraceFeedbackScore(i,r,t))}async __addTraceFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ze.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__createTraces(i,r))}async __createTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:En.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(i,r){return P.fromPromise(this.__batchUpdateTraces(i,r))}async __batchUpdateTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(i,r){return P.fromPromise(this.__batchUpdateThreads(i,r))}async __batchUpdateThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Nn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(i={},r){return P.fromPromise(this.__closeTraceThread(i,r))}async __closeTraceThread(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(i={},r){return P.fromPromise(this.__getTracesByProject(i,r))}async __getTracesByProject(i={},r){var I,D,F,M,Y,pe,ye,Ee,Ie,De,er;let{page:t,size:o,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=i,w={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((Y=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((Ee=(ye=r==null?void 0:r.timeoutInSeconds)!=null?ye:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(De=r==null?void 0:r.maxRetries)!=null?De:(Ie=this._options)==null?void 0:Ie.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:DN.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(i,r){return P.fromPromise(this.__createTrace(i,r))}async __createTrace(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Cn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces")}getTraceById(i,r={},t){return P.fromPromise(this.__getTraceById(i,r,t))}async __getTraceById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=r,a={strip_attachments:o},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(i)}`),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:dp.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(i,r={},t){return P.fromPromise(this.__deleteTraceById(i,r,t))}async __deleteTraceById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateTrace(i,r,t))}async __updateTrace(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Tn.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteThreadComments(i,r))}async __deleteThreadComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(i,r){return P.fromPromise(this.__deleteThreadFeedbackScores(i,r))}async __deleteThreadFeedbackScores(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:zn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(i,r){return P.fromPromise(this.__deleteTraceComments(i,r))}async __deleteTraceComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(i,r,t){return P.fromPromise(this.__deleteTraceFeedbackScore(i,r,t))}async __deleteTraceFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vs.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteTraceThreads(i,r))}async __deleteTraceThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(i,r){return P.fromPromise(this.__deleteTraces(i,r))}async __deleteTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(i={},r){return P.fromPromise(this.__findFeedbackScoreNames2(i,r))}async __findFeedbackScoreNames2(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=i,o={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(i,r))}async __findTraceThreadsFeedbackScoreNames(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=i,o={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__getTraceStats(i,r))}async __getTraceStats(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{projectId:t,projectName:o,filters:a,search:s,fromTime:c,toTime:l,annotationQueueId:m}=i,u={project_id:t,project_name:o,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),annotation_queue_id:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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/traces/stats"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:qr.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/traces/stats")}getThreadComment(i,r,t={},o){return P.fromPromise(this.__getThreadComment(i,r,t,o))}async __getThreadComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i={},r){return P.fromPromise(this.__getTraceThreadStats(i,r))}async __getTraceThreadStats(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{projectId:t,projectName:o,filters:a,search:s,fromTime:c,toTime:l}=i,m={project_id:t,project_name:o,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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:qr.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(i,r,t={},o){return P.fromPromise(this.__getTraceComment(i,r,t,o))}async __getTraceComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i,r){return P.fromPromise(this.__getTraceThread(i,r))}async __getTraceThread(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:up.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(i={},r){return P.fromPromise(this.__getTraceThreads(i,r))}async __getTraceThreads(i={},r){var I,D,F,M,Y,pe,ye,Ee,Ie,De,er;let{page:t,size:o,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=i,w={page:t,size:o,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters: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=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((Y=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces/threads"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((Ee=(ye=r==null?void 0:r.timeoutInSeconds)!=null?ye:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(De=r==null?void 0:r.maxRetries)!=null?De:(Ie=this._options)==null?void 0:Ie.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:BN.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/threads")}openTraceThread(i,r){return P.fromPromise(this.__openTraceThread(i,r))}async __openTraceThread(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(i,r){return P.fromPromise(this.__scoreBatchOfThreads(i,r))}async __scoreBatchOfThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:vn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(i,r){return P.fromPromise(this.__scoreBatchOfTraces(i,r))}async __scoreBatchOfTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Zs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(i={},r){return P.fromPromise(this.__searchTraceThreads(i,r))}async __searchTraceThreads(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Fn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(i={},r){return P.fromPromise(this.__searchTraces(i,r))}async __searchTraces(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:In.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/traces/search")}exist(i={},r){return P.fromPromise(this.__exist(i,r))}async __exist(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:o,source:a,threadOnly:s}=i,c={project_id:t,project_name:o,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Hs.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(i,r,t){return P.fromPromise(this.__updateThread(i,r,t))}async __updateThread(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Un.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__updateThreadComment(i,r,t))}async __updateThreadComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__updateTraceComment(i,r,t))}async __updateTraceComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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 tu,yee=n(()=>{Z();Q();b();$();q();J();ie();ee();tu=class{constructor(i={}){this._options=B(i);}createView(i,r){return P.fromPromise(this.__createView(i,r))}async __createView(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/views"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Mn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Vi.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/views")}getViewVersions(i,r={},t){return P.fromPromise(this.__getViewVersions(i,r,t))}async __getViewVersions(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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/views/${_.encodePathParam(i)}/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:iF.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===404?new U(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/views/{id}/versions")}createViewVersion(i,r,t){return P.fromPromise(this.__createViewVersion(i,r,t))}async __createViewVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}/versions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ln.jsonOrThrow(r,{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:Wi.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 422:throw new O(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/views/{id}/versions")}getViewById(i,r={},t){return P.fromPromise(this.__getViewById(i,r,t))}async __getViewById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"GET",headers:o,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:Vi.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/views/{id}")}deleteView(i,r={},t){return P.fromPromise(this.__deleteView(i,r,t))}async __deleteView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"DELETE",headers:o,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/views/{id}")}updateView(i,r={},t){return P.fromPromise(this.__updateView(i,r,t))}async __updateView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vn.jsonOrThrow(r,{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:Vi.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/views/{id}")}getViewVersion(i,r,t={},o){return P.fromPromise(this.__getViewVersion(i,r,t,o))}async __getViewVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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/views/${_.encodePathParam(i)}/versions/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Wi.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/views/{id}/versions/{version}")}deleteViewVersion(i,r,t={},o){return P.fromPromise(this.__deleteViewVersion(i,r,t,o))}async __deleteViewVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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/views/${_.encodePathParam(i)}/versions/${_.encodePathParam(r)}`),method:"DELETE",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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,"DELETE","/v1/private/views/{id}/versions/{version}")}setViewCurrentVersion(i,r,t){return P.fromPromise(this.__setViewCurrentVersion(i,r,t))}async __setViewCurrentVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}/current`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wn.jsonOrThrow(r,{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:Vi.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,"PUT","/v1/private/views/{id}/current")}};});var iu,bee=n(()=>{Z();Q();b();$();q();J();ie();iu=class{constructor(i={}){this._options=B(i);}getWelcomeWizardStatus(i){return P.fromPromise(this.__getWelcomeWizardStatus(i))}async __getWelcomeWizardStatus(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:pF.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(i={},r){return P.fromPromise(this.__submitWelcomeWizard(i,r))}async __submitWelcomeWizard(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/welcome-wizard")}};});var ou,Ree=n(()=>{Z();Q();b();$();q();J();ie();ee();ou=class{constructor(i={}){this._options=B(i);}getWorkspaceUserPermissions(i){return P.fromPromise(this.__getWorkspaceUserPermissions(i))}async __getWorkspaceUserPermissions(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:mF.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 K(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 au,xee=n(()=>{Z();Q();b();$();q();J();ie();ee();au=class{constructor(i={}){this._options=B(i);}costsSummary(i,r){return P.fromPromise(this.__costsSummary(i,r))}async __costsSummary(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(i){return P.fromPromise(this.__getWorkspaceConfiguration(i))}async __getWorkspaceConfiguration(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:gp.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(i,r){return P.fromPromise(this.__upsertWorkspaceConfiguration(i,r))}async __upsertWorkspaceConfiguration(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:gp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(i){return P.fromPromise(this.__deleteWorkspaceConfiguration(i))}async __deleteWorkspaceConfiguration(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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(i,r){return P.fromPromise(this.__getCost(i,r))}async __getCost(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(i,r){return P.fromPromise(this.__getMetric(i,r))}async __getMetric(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(i,r){return P.fromPromise(this.__getWorkspaceSpanMetric(i,r))}async __getWorkspaceSpanMetric(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Gn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(i={},r){return P.fromPromise(this.__getWorkspaceTokenUsageNames(i,r))}async __getWorkspaceTokenUsageNames(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Hn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:mp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(i,r){return P.fromPromise(this.__metricsSummary(i,r))}async __metricsSummary(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:cF.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var hp,wee=n(()=>{jq();Cq();Eq();Iq();Dq();Uq();Nq();Fq();Bq();Mq();Wq();Vq();Lq();Jq();Gq();Hq();Oq();Kq();Qq();$q();Yq();Xq();Zq();qq();eee();ree();tee();iee();oee();aee();nee();see();pee();cee();lee();mee();dee();uee();gee();fee();hee();yee();bee();Ree();xee();Z();Q();b();$();q();J();hp=class{constructor(i={}){this._options=B(i);}get mcpOAuth(){var i;return (i=this._mcpOAuth)!=null?i:this._mcpOAuth=new Bd(this._options)}get agentInsightsEnrollment(){var i;return (i=this._agentInsightsEnrollment)!=null?i:this._agentInsightsEnrollment=new yd(this._options)}get systemAnalyticsQueries(){var i;return (i=this._systemAnalyticsQueries)!=null?i:this._systemAnalyticsQueries=new qd(this._options)}get dashboardSavedQueries(){var i;return (i=this._dashboardSavedQueries)!=null?i:this._dashboardSavedQueries=new zd(this._options)}get systemUsage(){var i;return (i=this._systemUsage)!=null?i:this._systemUsage=new eu(this._options)}get agentConfigs(){var i;return (i=this._agentConfigs)!=null?i:this._agentConfigs=new fd(this._options)}get agentInsightsJobs(){var i;return (i=this._agentInsightsJobs)!=null?i:this._agentInsightsJobs=new bd(this._options)}get agentInsights(){var i;return (i=this._agentInsights)!=null?i:this._agentInsights=new hd(this._options)}get alerts(){var i;return (i=this._alerts)!=null?i:this._alerts=new Rd(this._options)}get annotationQueues(){var i;return (i=this._annotationQueues)!=null?i:this._annotationQueues=new xd(this._options)}get assertionResults(){var i;return (i=this._assertionResults)!=null?i:this._assertionResults=new wd(this._options)}get attachments(){var i;return (i=this._attachments)!=null?i:this._attachments=new _d(this._options)}get check(){var i;return (i=this._check)!=null?i:this._check=new Pd(this._options)}get automationRuleEvaluators(){var i;return (i=this._automationRuleEvaluators)!=null?i:this._automationRuleEvaluators=new kd(this._options)}get chatCompletions(){var i;return (i=this._chatCompletions)!=null?i:this._chatCompletions=new Ad(this._options)}get dashboards(){var i;return (i=this._dashboards)!=null?i:this._dashboards=new Sd(this._options)}get datasets(){var i;return (i=this._datasets)!=null?i:this._datasets=new vd(this._options)}get environments(){var i;return (i=this._environments)!=null?i:this._environments=new Td(this._options)}get experiments(){var i;return (i=this._experiments)!=null?i:this._experiments=new jd(this._options)}get feedbackDefinitions(){var i;return (i=this._feedbackDefinitions)!=null?i:this._feedbackDefinitions=new Cd(this._options)}get guardrailPolicies(){var i;return (i=this._guardrailPolicies)!=null?i:this._guardrailPolicies=new Ed(this._options)}get guardrails(){var i;return (i=this._guardrails)!=null?i:this._guardrails=new Id(this._options)}get insightsViews(){var i;return (i=this._insightsViews)!=null?i:this._insightsViews=new Dd(this._options)}get llmModels(){var i;return (i=this._llmModels)!=null?i:this._llmModels=new Ud(this._options)}get llmProviderKey(){var i;return (i=this._llmProviderKey)!=null?i:this._llmProviderKey=new Nd(this._options)}get runners(){var i;return (i=this._runners)!=null?i:this._runners=new Yd(this._options)}get manualEvaluation(){var i;return (i=this._manualEvaluation)!=null?i:this._manualEvaluation=new Fd(this._options)}get ollama(){var i;return (i=this._ollama)!=null?i:this._ollama=new Md(this._options)}get ollieState(){var i;return (i=this._ollieState)!=null?i:this._ollieState=new Wd(this._options)}get openTelemetryIngestion(){var i;return (i=this._openTelemetryIngestion)!=null?i:this._openTelemetryIngestion=new Vd(this._options)}get optimizations(){var i;return (i=this._optimizations)!=null?i:this._optimizations=new Ld(this._options)}get pairing(){var i;return (i=this._pairing)!=null?i:this._pairing=new Jd(this._options)}get projects(){var i;return (i=this._projects)!=null?i:this._projects=new Gd(this._options)}get prompts(){var i;return (i=this._prompts)!=null?i:this._prompts=new Hd(this._options)}get reportFailures(){var i;return (i=this._reportFailures)!=null?i:this._reportFailures=new Kd(this._options)}get reports(){var i;return (i=this._reports)!=null?i:this._reports=new Qd(this._options)}get retentionRules(){var i;return (i=this._retentionRules)!=null?i:this._retentionRules=new $d(this._options)}get serviceToggles(){var i;return (i=this._serviceToggles)!=null?i:this._serviceToggles=new Xd(this._options)}get spans(){var i;return (i=this._spans)!=null?i:this._spans=new Zd(this._options)}get traces(){var i;return (i=this._traces)!=null?i:this._traces=new ru(this._options)}get views(){var i;return (i=this._views)!=null?i:this._views=new tu(this._options)}get welcomeWizard(){var i;return (i=this._welcomeWizard)!=null?i:this._welcomeWizard=new iu(this._options)}get workspacePermissions(){var i;return (i=this._workspacePermissions)!=null?i:this._workspacePermissions=new ou(this._options)}get workspaces(){var i;return (i=this._workspaces)!=null?i:this._workspaces=new au(this._options)}get redirect(){var i;return (i=this._redirect)!=null?i:this._redirect=new Od(this._options)}isAlive(i){return P.fromPromise(this.__isAlive(i))}async __isAlive(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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(i){return P.fromPromise(this.__version(i))}async __version(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 _ee=n(()=>{});var kee,Aee=n(()=>{wc();(r=>(r.LogLevel=He,r.ConsoleLogger=ft))(kee||(kee={}));});var Pee=n(()=>{_ee();Aee();});var zee=n(()=>{Pee();});var Ir=n(()=>{ee();wee();$();J();zee();ie();});exports.generateId=void 0;var sr=n(()=>{exports.generateId=()=>uuid.v7();});function vce(p){return p.templateStructure==="text"}function Tce(p){return p.templateStructure==="chat"}var Dr,nu=n(()=>{Dr=class{static serializePromptToInfoDict(i){let r;return vce(i)?r=i.prompt:Tce(i)?r=i.messages:r="",{name:i.name,...i.id&&{id:i.id},template_structure:i.templateStructure,version:{...i.versionId&&{id:i.versionId},...i.commit&&{commit:i.commit},template:r}}}static normalizeMetadata(i){if(!i)return {};if(typeof i=="object"&&!Array.isArray(i))return i;if(typeof i=="string")try{let r=JSON.parse(i);if(typeof r=="object"&&r!==null&&!Array.isArray(r))return r}catch{}return null}static promptAlreadyInjected(i,r,t){let o=this.normalizeMetadata(i);return o===null?true:(Array.isArray(o.opik_prompts)?o.opik_prompts:[]).some(s=>{var c;return s.id===r&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(i,r,t,o){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(i))!=null?m:{},c=(u=this.normalizeMetadata(r))!=null?u:{},l=o&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(i,r){var s,c;let{prompts:t,appendPrompts:o,...a}=i;if(!t||t.length===0){if(a.metadata&&r){let l=(s=this.normalizeMetadata(r))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(r,a.metadata,t,o!=null?o:false)}}static processTraceUpdate(i,r){return this.processUpdate(i,r)}static processSpanUpdate(i,r){return this.processUpdate(i,r)}};});var su,See=n(()=>{pi();sr();ae();nu();su=class p{constructor(i,r){this.data=i;this.opik=r;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var r;Ge()&&this.opik.spanFeedbackScoresBatchQueue.create({...i,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=i=>{var o;let r=Dr.processSpanUpdate(i,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...r};return Ge()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=i=>{var c,l;let r=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...o}=i;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,...o,projectName:r,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Ge()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var pu,vee=n(()=>{pi();sr();ae();See();nu();pu=class{constructor(i,r){this.data=i;this.opik=r;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var r;Ge()&&this.opik.traceFeedbackScoresBatchQueue.create({...i,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=i=>{var c,l,m;let r=(l=(c=this.data.projectName)!=null?c:i.projectName)!=null?l:this.opik.config.projectName,{environment:t,...o}=i;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,...o,projectName:r,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Ge()&&this.opik.spanBatchQueue.create(a);let s=new su(a,this.opik);return this.spans.push(s),s};this.update=i=>{var o;let r=Dr.processTraceUpdate(i,this.data.metadata),t={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...r};return Ge()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var Tee,yp,jce,Cce,jee,Cee,Eee,Iee,dF=n(()=>{Tee={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"},yp={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},jce=p=>Object.entries(p).map(([i,r])=>`${i}=${encodeURIComponent(r)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Cce=p=>p.replace(/\/api\/?$/,""),jee=p=>Buffer.from(p).toString("base64"),Cee=(p,i,r)=>{let t=jce(r),o=Cce(p),a=o.endsWith("/")?o:`${o}/`,s=i.startsWith("/")?i.slice(1):i;return `${a}${s}?${t}`},Eee=({datasetId:p,experimentId:i,baseUrl:r})=>Cee(r,Tee.EXPERIMENTS,{[yp.EXPERIMENT_ID]:i,[yp.DATASET_ID]:p,[yp.PATH]:jee(r)}),Iee=(p,i)=>Cee(i,Tee.PROJECTS,{[yp.TRACE_ID]:p,[yp.PATH]:jee(i)});});var Ece,cu,bp,Be,Gt=n(()=>{ae();Ece=300,cu=100,bp=class{constructor({action:i,batchSize:r=cu,delay:t,enableBatch:o,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=(i,r)=>{if(this.queue.set(i,r),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(i,r)=>{let t=this.queue.get(i);t&&(this.queue.set(i,{...t,...r}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let i=new Map(this.queue);this.queue.clear(),exports.logger.debug(`Adding ${i.size} items to ${this.name} promise:`,i),this.promise=this.promise.finally(()=>(exports.logger.debug(`Flushing ${this.name}:`,i),this.action(i))).catch(r=>{exports.logger.error(`Failed to flush ${this.name}:`,r,i);}),await this.promise;};this.action=i,this.batchSize=r,this.delay=t,this.enableBatch=o,this.name=a;}},Be=class{constructor({delay:i=Ece,enableCreateBatch:r=true,enableUpdateBatch:t=false,enableDeleteBatch:o=true,createBatchSize:a=cu,updateBatchSize:s=cu,deleteBatchSize:c=cu,name:l="BatchQueue"}={}){this.create=i=>{let r=this.getId(i);this.createQueue.add(r,i);};this.get=async i=>{let r=this.createQueue.queue.get(i);return r||this.getEntity(i)};this.update=(i,r)=>{if(this.createQueue.queue.get(i)){this.createQueue.update(i,r);return}let o=this.updateQueue.queue.get(i);this.updateQueue.add(i,{...o,...r});};this.delete=i=>{if(this.createQueue.queue.has(i)){this.createQueue.queue.delete(i);return}this.deleteQueue.add(i);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new bp({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:i,enableBatch:r,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new bp({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:i,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new bp({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:i,enableBatch:o,batchSize:c,name:`${l}:deleteQueue`});}};});var Ice,lu,Dee=n(()=>{Yp();ae();Gt();Ice="suite_assertion",lu=class extends Be{constructor(r,t,o="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${o}`});this.api=r;this.entityType=o;this.useLegacyFallback=false;}getId(r){return {entityId:r.entityId,name:r.name}}async createEntities(r){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(r);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:r},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(r);return}throw t}}async writeViaLegacyFeedbackScores(r){let t=r.map(o=>({id:o.entityId,name:o.name,value:o.status==="passed"?1:0,categoryName:Ice,reason:o.reason,source:o.source,projectName:o.projectName,projectId:o.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 mu,Dce,Uee,Uce,Nce,Ji,uF=n(()=>{ae();mu=["input","output"],Dce=1024*1024,Uee=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>"}),Uce=p=>{try{let i=JSON.stringify(p);return i?Buffer.byteLength(i,"utf8")/Dce:0}catch{return 1/0}},Nce=(p,i)=>{let r={};for(let s of mu)p[s]!=null&&(r[s]=Uce(p[s]));if(Object.keys(r).length===0)return {result:p,truncated:[]};let t={};for(let s of mu)r[s]!==void 0&&r[s]>i&&(t[s]=Uee(r[s]));if(mu.reduce((s,c)=>{var l;return s+(t[c]?0:(l=r[c])!=null?l:0)},0)>i)for(let s of mu)r[s]!==void 0&&t[s]===void 0&&(t[s]=Uee(r[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},Ji=(p,i,r="span",t)=>{if(!i||i<=0)return p;let{result:o,truncated:a}=Nce(p,i);if(a.length>0){let s=r.charAt(0).toUpperCase()+r.slice(1);exports.logger.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${i} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return o};});var et,Fce,Bce,Mce,Wce,Vce,Lce,Jce,Gce,Nee,Hce,Fee,Bee=n(()=>{et=(p,i,r=0)=>{if(p.length<r+i.length)return false;for(let t=0;t<i.length;t++)if(p[r+t]!==i[t])return false;return true},Fce=[137,80,78,71,13,10,26,10],Bce=[255,216,255],Mce=[71,73,70,56,55,97],Wce=[71,73,70,56,57,97],Vce=[82,73,70,70],Lce=[87,69,66,80],Jce=[37,80,68,70],Gce=[102,116,121,112],Nee=p=>{if(et(p,Fce))return "image/png";if(et(p,Bce)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(et(p,Mce)||et(p,Wce))return "image/gif";if(et(p,Vce)&&et(p,Lce,8))return "image/webp";if(et(p,Jce))return "application/pdf";if(et(p,Gce,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let r=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(r.startsWith("{")||r.startsWith("["))return "application/json"}catch{}return null},Hce={"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"},Fee=p=>{var i;return (i=Hce[p])!=null?i:"bin"};});var Oce,Kce,Qce,Mee,$ce,Yce,Xce,gF,Wee,Vee=n(()=>{Bee();Oce=["input","output","metadata"],Kce=(p,i)=>{let r=Math.floor(Math.random()*99999999)+1,t=Fee(i);return `${p}-attachment-${r}-${Date.now()}-sdk.${t}`},Qce=p=>{let i=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,r=Buffer.from(i,"base64");return r.length>0?r:null},Mee=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,$ce=61,Yce=/data:[^,]*;base64,$/,Xce=(p,i,r,t)=>{if(p.length<t)return p;let o=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!Mee(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&Mee(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===$ce&&u<2;)m++,u++;if(m-l>=t){let f=Qce(p.slice(l,m)),g=f?Nee(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&Yce.test(p.slice(y,l))&&(h=y);let w=Kce(i,g);o.push(p.slice(a,h)),o.push(`[${w}]`),a=m,r.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(o.push(p.slice(a)),o.join("")):p},gF=(p,i,r,t,o)=>{if(typeof p=="string")return Xce(p,i,r,t);if(Array.isArray(p)){if(o.has(p))return p;o.add(p);let a=false,s=p.map(c=>{let l=gF(c,i,r,t,o);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(o.has(p))return p;o.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=gF(l,i,r,t,o);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},Wee=(p,i)=>{let r=Math.max(4,Math.floor(i/4)*4),t=[],o={};for(let a of Oce){let s=p[a];if(s==null)continue;let c=gF(s,a,t,r,new WeakSet);c!==s&&(o[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...o},attachments:t}};});var Zce,Lee,Jee,Gee=n(()=>{Zce="BEMinIO",Lee=async(p,i,r)=>{let t=await fetch(p,{method:"PUT",body:i,headers:r});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},Jee=async(p,i,r,t)=>{let{data:o,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(o.length/5242880)),l=Buffer.from(i.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:r.entityType,entityId:r.entityId,path:l,projectName:r.projectName},p.requestOptions);if(m.uploadId===Zce){let d={"Content-Type":s,"Comet-Workspace":i.workspaceName,...i.extraHeaders};i.apiKey&&(d.authorization=i.apiKey),await Lee(m.preSignUrls[0],o,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=o.subarray(f,f+5242880),h=await Lee(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:r.entityType,entityId:r.entityId,fileSize:o.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:r.projectName},p.requestOptions);};});var du,fF=n(()=>{ae();Vee();Gee();du=async(p,i,r,t)=>{let o;try{o=Wee(t,i.minSizeBytes);}catch(a){return exports.logger.warn(`Attachment extraction skipped for ${r.entityType} '${r.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return o.attachments.length===0?t:(await Promise.all(o.attachments.map(a=>Jee(p,i,r,a).catch(s=>{exports.logger.warn(`Failed to upload extracted attachment '${a.fileName}' for ${r.entityType} '${r.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),o.result)};});var uu,Hee=n(()=>{Gt();uF();dt();fF();uu=class extends Be{constructor(r,t,o,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=r;this.maxPayloadSizeMb=o;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?du(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var o;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ji(s,(o=this.maxPayloadSizeMb)!=null?o:Ye.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(r){return await this.api.spans.getSpanById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let o=await this.extractAttachments(t,r),a=Ji(o,(s=this.maxPayloadSizeMb)!=null?s:Ye.maxPayloadSizeMb,"span",r);await this.api.spans.updateSpan(r,{body:a},this.api.requestOptions);}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var gu,Oee=n(()=>{Gt();gu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.spans.scoreBatchOfSpans({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var fu,Kee=n(()=>{Gt();uF();dt();fF();fu=class extends Be{constructor(r,t,o,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=r;this.maxPayloadSizeMb=o;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?du(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var o;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ji(s,(o=this.maxPayloadSizeMb)!=null?o:Ye.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(r){return await this.api.traces.getTraceById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let o=await this.extractAttachments(t,r),a=Ji(o,(s=this.maxPayloadSizeMb)!=null?s:Ye.maxPayloadSizeMb,"trace",r);await this.api.traces.updateTrace(r,{body:a},this.api.requestOptions);}async deleteEntities(r){await this.api.traces.deleteTraces({ids:r},this.api.requestOptions);}};});var hu,Qee=n(()=>{Gt();hu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.traces.scoreBatchOfTraces({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});function Xee(){return crypto.createHash("sha256").update(VB__default.default.hostname()+ele()).digest("hex")}function ele(p=process.env){for(let i of ["LOGNAME","USER","LNAME","USERNAME"])if(p[i])return p[i];try{return VB__default.default.userInfo().username}catch{return "unknown"}}var Yee,Zee=n(()=>{Yee="X-Opik-Client-Id";});var yu,qee=n(()=>{Ir();Zee();yu=class extends hp{constructor(r){var o;let t={[Yee]:Xee(),...r==null?void 0:r.headers,...(o=r==null?void 0:r.requestOptions)==null?void 0:o.headers};(r==null?void 0:r.apiKey)!==void 0&&(t.authorization=r.apiKey);super({...r,headers:t});this.setHeaders=r=>{this.requestOptions.headers=r;};this.requestOptions=(r==null?void 0:r.requestOptions)||{};}};});var bu,ere=n(()=>{Gt();bu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=r;}getId(r){return r.id||""}async createEntities(r){for(let t of r)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(r){try{return await this.api.datasets.getDatasetById(r,this.api.requestOptions)}catch{return}}async updateEntity(r,t){await this.api.datasets.updateDataset(r,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(r){await this.api.datasets.deleteDatasetsBatch({ids:r},this.api.requestOptions);}};});async function rre(){return hF||(hF=await rle__default.default()),hF}var hF,tre=n(()=>{hF=null;});var Gi,Ru=n(()=>{ee();sr();tre();Gi=class p{constructor(i,r){let{id:t,traceId:o,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=i;this.id=t||exports.generateId(),this.traceId=o,this.spanId=a,this.source=s||Th.Sdk,this.description=c!=null?c:r,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(i=false){return i?{...this.data,id:this.id}:{...this.data}}async contentHash(){let i={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(i.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(i.executionPolicy=this.executionPolicy);let r=tle__default.default(i);return (await rre()).h32(r,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(i){return new p({id:i.id,traceId:i.traceId,spanId:i.spanId,source:i.source,...i.evaluators&&{evaluators:i.evaluators},...i.executionPolicy&&{executionPolicy:i.executionPolicy},...i.data},i.description)}};});async function ole(p,i,r,t){var l;if(r===0)return [];let o=new util.TextDecoder("utf-8"),a=[],s="",c=p.getReader();try{for(;;){let{done:m,value:u}=await c.read();if(m)break;let d=u;s+=o.decode(d,{stream:!0});let f=s.split(`
3
+ `)),{ok:true,value:i}):t}}var gr=n(()=>{});function zc(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var oy=n(()=>{});var di,ay=n(()=>{oy();di=class p extends Error{constructor(r){super(r.map(zc).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});var ui,ny=n(()=>{oy();ui=class p extends Error{constructor(r){super(r.map(zc).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});function le(p){return {nullable:()=>Upe(p),optional:()=>sy(p),optionalNullable:()=>Npe(p),transform:i=>py(p,i),parseOrThrow:(i,r)=>{let t=p.parse(i,r);if(t.ok)return t.value;throw new ui(t.errors)},jsonOrThrow:(i,r)=>{let t=p.json(i,r);if(t.ok)return t.value;throw new di(t.errors)}}}function Upe(p){let i={parse:(r,t)=>r==null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r==null?{ok:true,value:null}:p.json(r,t),getType:()=>re.NULLABLE};return {...i,...le(i)}}function sy(p){let i={parse:(r,t)=>r==null?{ok:true,value:void 0}:p.parse(r,t),json:(r,t)=>t!=null&&t.omitUndefined&&r===void 0?{ok:true,value:void 0}:r==null?{ok:true,value:null}:p.json(r,t),getType:()=>re.OPTIONAL};return {...i,...le(i)}}function Npe(p){let i={parse:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.json(r,t),getType:()=>re.OPTIONAL_NULLABLE};return {...i,...le(i)}}function py(p,i){let r={parse:(t,o)=>{let a=p.parse(t,o);return a.ok?{ok:true,value:i.transform(a.value)}:a},json:(t,o)=>{let a=i.untransform(t);return p.json(a,o)},getType:()=>p.getType()};return {...r,...le(r)}}var o9=n(()=>{be();ay();ny();});var Ne=n(()=>{o9();ay();ny();});function a9(){let p={parse:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i=="bigint"?{ok:true,value:i}:typeof i=="number"?{ok:true,value:BigInt(i)}:{ok:false,errors:[{path:r,message:ce(i,"bigint | number")}]},json:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i!="bigint"?{ok:false,errors:[{path:r,message:ce(i,"bigint")}]}:{ok:true,value:i},getType:()=>re.BIGINT};return {...Re(p),...le(p)}}var n9=n(()=>{be();ve();gr();Ne();});var s9=n(()=>{n9();});function p9(){let p={parse:(i,{breadcrumbsPrefix:r=[]}={})=>typeof i!="string"?{ok:false,errors:[{path:r,message:ce(i,"string")}]}:Fpe.test(i)?{ok:true,value:new Date(i)}:{ok:false,errors:[{path:r,message:ce(i,"ISO 8601 date string")}]},json:(i,{breadcrumbsPrefix:r=[]}={})=>i instanceof Date?{ok:true,value:i.toISOString()}:{ok:false,errors:[{path:r,message:ce(i,"Date object")}]},getType:()=>re.DATE};return {...Re(p),...le(p)}}var Fpe,c9=n(()=>{be();ve();gr();Ne();Fpe=/^([+-]?\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 l9=n(()=>{c9();});function xe(p,i){return ()=>{let r={parse:i,json:i,getType:()=>p};return {...Re(r),...le(r)}}}var fr=n(()=>{Ne();gr();});function Sc(p){let i=new Set(p);return xe(re.ENUM,(t,{allowUnrecognizedEnumValues:o,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:ce(t,"string")}]}:!i.has(t)&&!o?{ok:false,errors:[{path:a,message:ce(t,"enum")}]}:{ok:true,value:t})()}var m9=n(()=>{be();fr();ve();});var cy=n(()=>{m9();});function d9(p){let i=ly(p);return {...i,...le(i)}}function ly(p){return {parse:(i,r)=>gi(p).parse(i,r),json:(i,r)=>gi(p).json(i,r),getType:()=>gi(p).getType()}}function gi(p){let i=p;return i.__zurg_memoized==null&&(i.__zurg_memoized=p()),i.__zurg_memoized}var my=n(()=>{Ne();});function Po(p){return Object.entries(p)}var dy=n(()=>{});function zo(p,i){let r=new Set(i);return Object.entries(p).reduce((t,[o,a])=>(r.has(o)&&(t[o]=a),t),{})}var uy=n(()=>{});function kr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let i=p;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(p)===i}var So=n(()=>{});function vo(p){return Object.keys(p)}var gy=n(()=>{});function u9(p,i){let r=[],t=[];for(let o of p)i(o)?r.push(o):t.push(o);return [r,t]}var g9=n(()=>{});function rr(p){return {withParsedProperties:i=>fy(p,i)}}function fy(p,i){let r={parse:(t,o)=>{let a=p.parse(t,o);if(!a.ok)return a;let s=Object.entries(i).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,o)=>{var c;if(!kr(t))return {ok:false,errors:[{path:(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],message:ce(t,"object")}]};let a=new Set(Object.keys(i)),s=zo(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,o)},getType:()=>p.getType()};return {...r,...le(r),...rr(r)}}var f9=n(()=>{uy();ve();So();Ne();});var To=n(()=>{f9();});function h9(p,i){return {rawKey:p,valueSchema:i,isProperty:true}}function Hr(p){return p.isProperty}var hy=n(()=>{});function vc(p){let i={_getRawProperties:()=>Object.entries(p).map(([r,t])=>Hr(t)?t.rawKey:r),_getParsedProperties:()=>vo(p),parse:(r,t)=>{let o={},a=[];for(let[s,c]of Po(p)){let l=Hr(c)?c.rawKey:s,m=Hr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};o[l]=u,R9(m)&&a.push(l);}return y9({value:r,requiredKeys:a,getProperty:s=>{let c=o[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:(r,t)=>{let o=[];for(let[a,s]of Po(p)){let c=Hr(s)?s.valueSchema:s;R9(c)&&o.push(a);}return y9({value:r,requiredKeys:o,getProperty:a=>{let s=p[a];if(s!=null)return Hr(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:()=>re.OBJECT};return {...Re(i),...le(i),...rr(i),...bt(i)}}function y9({value:p,requiredKeys:i,getProperty:r,unrecognizedObjectKeys:t="fail",skipValidation:o=false,breadcrumbsPrefix:a=[]}){if(!kr(p))return {ok:false,errors:[{path:a,message:ce(p,"object")}]};let s=new Set(i),c=[],l={};for(let[m,u]of Object.entries(p)){let d=r(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(...i.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||o?{ok:true,value:l}:{ok:false,errors:c}}function bt(p){return {extend:i=>{let r={_getParsedProperties:()=>[...p._getParsedProperties(),...i._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...i._getRawProperties()],parse:(t,o)=>b9({extensionKeys:i._getRawProperties(),value:t,transformBase:a=>p.parse(a,o),transformExtension:a=>i.parse(a,o),breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),json:(t,o)=>b9({extensionKeys:i._getParsedProperties(),value:t,transformBase:a=>p.json(a,o),transformExtension:a=>i.json(a,o),breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),getType:()=>re.OBJECT};return {...r,...le(r),...rr(r),...bt(r)}},passthrough:()=>{let i=new Set(p._getRawProperties()),r=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(o,a)=>{let s=p.parse(o,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof o=="object"&&o!=null)for(let[l,m]of Object.entries(o))i.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(o,a)=>{let s=p.json(o,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof o=="object"&&o!=null)for(let[l,m]of Object.entries(o))r.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>re.OBJECT};return {...t,...le(t),...rr(t),...bt(t)}}}}function b9({extensionKeys:p,value:i,transformBase:r,transformExtension:t,breadcrumbsPrefix:o=[]}){if(!kr(i))return {ok:false,errors:[{path:o,message:ce(i,"object")}]};let a=new Set(p),[s,c]=u9(vo(i),u=>a.has(u)),l=r(zo(i,c)),m=t(zo(i,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 R9(p){return !Bpe(p)}function Bpe(p){switch(p.getType()){case re.ANY:case re.UNKNOWN:case re.OPTIONAL:case re.OPTIONAL_NULLABLE:return true;default:return false}}var yy=n(()=>{be();dy();uy();ve();So();gy();gr();g9();To();Ne();hy();});function x9(p){return vc(p)}var w9=n(()=>{yy();});var by=n(()=>{yy();w9();hy();});function _9(p){let i={...ly(p),_getRawProperties:()=>gi(p)._getRawProperties(),_getParsedProperties:()=>gi(p)._getParsedProperties()};return {...i,...le(i),...rr(i),...bt(i)}}var k9=n(()=>{by();To();Ne();my();});var A9=n(()=>{my();k9();});function Tc(p){let i={parse:(r,t)=>P9(r,(o,a)=>{var s;return p.parse(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(r,t)=>P9(r,(o,a)=>{var s;return p.json(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>re.LIST};return {...Re(i),...le(i)}}function P9(p,i){return Array.isArray(p)?p.map((t,o)=>i(t,o)).reduce((t,o)=>{if(t.ok&&o.ok)return {ok:true,value:[...t.value,o.value]};let a=[];return t.ok||a.push(...t.errors),o.ok||a.push(...o.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:ce(p,"list"),path:[]}]}}var z9=n(()=>{be();ve();gr();Ne();});var Ry=n(()=>{z9();});function S9(p){return xe(re.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`${p.toString()}`)}]})()}var v9=n(()=>{be();fr();ve();});function T9(p){return xe(re.STRING_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`"${p}"`)}]})()}var j9=n(()=>{be();fr();ve();});var C9=n(()=>{v9();j9();});var E9,I9=n(()=>{be();fr();E9=xe(re.ANY,p=>({ok:true,value:p}));});var D9,U9=n(()=>{be();fr();ve();D9=xe(re.BOOLEAN,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"boolean")}]});});var N9,F9=n(()=>{be();fr();N9=xe(re.NEVER,(p,{breadcrumbsPrefix:i=[]}={})=>({ok:false,errors:[{path:i,message:"Expected never"}]}));});var B9,M9=n(()=>{be();fr();ve();B9=xe(re.NUMBER,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"number")}]});});var W9,V9=n(()=>{be();fr();ve();W9=xe(re.STRING,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:ce(p,"string")}]});});var L9,J9=n(()=>{be();fr();L9=xe(re.UNKNOWN,p=>({ok:true,value:p}));});var G9=n(()=>{I9();U9();F9();M9();V9();J9();});function O9(p,i){let r={parse:(t,o)=>H9({value:t,isKeyNumeric:p.getType()===re.NUMBER,transformKey:a=>{var s;return p.parse(a,{...o,breadcrumbsPrefix:[...(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return i.parse(a,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),json:(t,o)=>H9({value:t,isKeyNumeric:p.getType()===re.NUMBER,transformKey:a=>{var s;return p.json(a,{...o,breadcrumbsPrefix:[...(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return i.json(a,{...o,breadcrumbsPrefix:[...(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:o==null?void 0:o.breadcrumbsPrefix}),getType:()=>re.RECORD};return {...Re(r),...le(r)}}function H9({value:p,isKeyNumeric:i,transformKey:r,transformValue:t,breadcrumbsPrefix:o=[]}){return kr(p)?Po(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(i){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=r(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:o,message:ce(p,"object")}]}}var K9=n(()=>{be();dy();ve();So();gr();Ne();});var Q9=n(()=>{K9();});function $9(p){let i=Tc(p),r={parse:(t,o)=>{let a=i.parse(t,o);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,o)=>{var s;return t instanceof Set?i.json([...t],o):{ok:false,errors:[{path:(s=o==null?void 0:o.breadcrumbsPrefix)!=null?s:[],message:ce(t,"Set")}]}},getType:()=>re.SET};return {...Re(r),...le(r)}}var Y9=n(()=>{be();ve();gr();Ry();Ne();});var X9=n(()=>{Y9();});function q9(p){let i={parse:(r,t)=>Z9((o,a)=>o.parse(r,a),p,t),json:(r,t)=>Z9((o,a)=>o.json(r,a),p,t),getType:()=>re.UNDISCRIMINATED_UNION};return {...Re(i),...le(i)}}function Z9(p,i,r){let t=[];for(let[o,a]of i.entries()){let s=p(a,{...r,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${o}] ${c.message}`});}return {ok:false,errors:t}}var eX=n(()=>{be();gr();Ne();});var rX=n(()=>{eX();});function tX(p,i){return {parsedDiscriminant:p,rawDiscriminant:i}}var iX=n(()=>{});function aX(p,i){let r=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,o=Sc(vo(i)),a={parse:(s,c)=>oX({value:s,discriminant:r,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return o.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],r]})},getAdditionalPropertiesSchema:l=>i[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)=>oX({value:s,discriminant:t,transformedDiscriminant:r,transformDiscriminantValue:l=>{var m;return o.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>i[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>re.UNION};return {...Re(a),...le(a),...rr(a)}}function oX({value:p,discriminant:i,transformedDiscriminant:r,transformDiscriminantValue:t,getAdditionalPropertiesSchema:o,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!kr(p))return {ok:false,errors:[{path:c,message:ce(p,"object")}]};let{[i]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${i}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=o(u.value);if(d==null)return a?{ok:true,value:{[r]:u.value,...m}}:{ok:false,errors:[{path:[...c,i],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[r]:l,...f.value}}:f}var nX=n(()=>{be();ve();So();gy();gr();cy();To();Ne();});var sX=n(()=>{iX();nX();});var pX=n(()=>{s9();l9();cy();A9();Ry();C9();by();To();G9();Q9();Ne();X9();rX();sX();});var e={};L(e,{JsonError:()=>di,ParseError:()=>ui,any:()=>E9,bigint:()=>a9,boolean:()=>D9,booleanLiteral:()=>S9,date:()=>p9,discriminant:()=>tX,enum_:()=>Sc,getObjectLikeUtils:()=>rr,getObjectUtils:()=>bt,getSchemaUtils:()=>le,isProperty:()=>Hr,lazy:()=>d9,lazyObject:()=>_9,list:()=>Tc,never:()=>N9,number:()=>B9,object:()=>vc,objectWithoutOptionalProperties:()=>x9,optional:()=>sy,property:()=>h9,record:()=>O9,set:()=>$9,string:()=>W9,stringLiteral:()=>T9,transform:()=>py,undiscriminatedUnion:()=>q9,union:()=>aX,unknown:()=>L9,withParsedProperties:()=>fy});var cX=n(()=>{pX();});function lX(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 mX=n(()=>{});function uX(p,...i){if(!p)return "";if(i.length===0)return p;if(p.includes("://")){let r;try{r=new URL(p);}catch{return dX(p,...i)}let t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=fX(a);s&&(r.pathname=gX(r.pathname,s));}return o&&!r.pathname.endsWith("/")&&(r.pathname+="/"),r.toString()}return dX(p,...i)}function dX(p,...i){if(i.length===0)return p;let r=p,t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=fX(a);s&&(r=gX(r,s));}return o&&!r.endsWith("/")&&(r+="/"),r}function gX(p,i){return p.endsWith("/")?p+i:`${p}/${i}`}function fX(p){if(!p)return p;let i=0,r=p.length;return p.startsWith("/")&&(i=1),p.endsWith("/")&&(r=p.length-1),i===0&&r===p.length?p:p.slice(i,r)}var hX=n(()=>{});var _={};L(_,{encodePathParam:()=>lX,join:()=>uX,toQueryString:()=>ht});var yX=n(()=>{mX();hX();_o();});var b=n(()=>{LY();ey();r9();t9();ry();cX();yX();});function B(p){let i=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":mi.type,"X-Fern-Runtime-Version":mi.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:Ao.createLogger(p==null?void 0:p.logging),headers:i}}var Z=n(()=>{Q();b();});var v,$=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,i,r,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:i});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:i});case "timeout":throw new Jr(`Timeout exceeded when calling ${r} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:i});default:throw new k({message:"Unknown error",rawResponse:i})}}var q=n(()=>{J();});var jo,bX=n(()=>{b();jo=e.object({blueprintName:e.property("blueprint_name",e.string())});});var xy,wy=n(()=>{b();xy=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),envName:e.property("env_name",e.string()),blueprintId:e.property("blueprint_id",e.string()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),endedAt:e.property("ended_at",e.date().optional())});});var Co,RX=n(()=>{b();wy();Co=e.object({projectId:e.property("project_id",e.string()),envs:e.list(xy)});});var Eo,xX=n(()=>{b();Eo=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),keys:e.list(e.string())});});var _y=n(()=>{bX();RX();xX();});var wX=n(()=>{_y();});var jc={};L(jc,{AgentConfigEnvSetByName:()=>jo,AgentConfigEnvUpdate:()=>Co,AgentConfigRemoveValues:()=>Eo});var _X=n(()=>{wX();});var Cc,ky=n(()=>{b();Cc=e.enum_(["open","resolved","closed"]);});var Io,kX=n(()=>{b();ky();Io=e.object({projectId:e.property("project_id",e.string()),status:Cc,closeNote:e.property("close_note",e.string().optional())});});var W,ne=n(()=>{b();W=e.record(e.string(),e.unknown());});var Ay,Py=n(()=>{b();Ay=e.enum_(["critical","high","medium","low"]);});var zy,Sy=n(()=>{b();ne();Py();zy=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),tracesQuery:e.property("traces_query",e.string().optional()),severity:Ay,count:e.number(),totalCount:e.property("total_count",e.number()),usersImpacted:e.property("users_impacted",e.number()),totalUsers:e.property("total_users",e.number()),metadata:W.optional()});});var Do,AX=n(()=>{b();Sy();Do=e.object({projectId:e.property("project_id",e.string()),reportDay:e.property("report_day",e.string()),issues:e.list(zy)});});var vy=n(()=>{kX();AX();});var PX=n(()=>{vy();});var Ec,zX=n(()=>{b();Ec=e.enum_(["critical","high","medium","low"]);});var Ic,SX=n(()=>{b();Ic=e.enum_(["open","resolved","closed"]);});var Ty=n(()=>{ky();zX();SX();});var Dc={};L(Dc,{AgentInsightsIssueUpdate:()=>Io,AgentInsightsIssueUpdateStatus:()=>Cc,AgentInsightsReport:()=>Do,FindAgentInsightsIssuesRequestSeverity:()=>Ec,FindAgentInsightsIssuesRequestStatus:()=>Ic});var vX=n(()=>{PX();Ty();});var Uo,TX=n(()=>{b();Uo=e.object({enrolled:e.boolean(),projectIds:e.property("project_ids",e.list(e.string()))});});var jy=n(()=>{TX();});var jX=n(()=>{jy();});var Uc={};L(Uc,{Request:()=>Uo});var CX=n(()=>{jX();});var No,EX=n(()=>{b();No=e.object({guidance:e.string()});});var Nc,Cy=n(()=>{b();Nc=e.enum_(["enabled","disabled"]);});var Fo,IX=n(()=>{b();Cy();Fo=e.object({status:Nc});});var Ey=n(()=>{EX();IX();});var DX=n(()=>{Ey();});var Iy=n(()=>{Cy();});var Fc={};L(Fc,{AgentInsightsGuidanceUpdate:()=>No,AgentInsightsJobUpdate:()=>Fo,AgentInsightsJobUpdateStatus:()=>Nc});var UX=n(()=>{DX();Iy();});var Bc,NX=n(()=>{b();Bc=e.enum_(["general","slack","pagerduty"]);});var Dy=n(()=>{NX();});var Mc={};L(Mc,{GetWebhookExamplesRequestAlertType:()=>Bc});var FX=n(()=>{Dy();});var Uy,Ny=n(()=>{b();Uy=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var Fy,By=n(()=>{b();Fy=e.enum_([">","<","="]);});var My,Wy=n(()=>{b();By();My=e.object({scoreName:e.property("score_name",e.string()),operator:Fy,value:e.number()});});var Vy,Ly=n(()=>{b();Wy();Vy=e.object({conditions:e.list(My)});});var Jy,Gy=n(()=>{b();Ly();Jy=e.object({groups:e.list(Vy)});});var Hy,Oy=n(()=>{b();Gy();Hy=e.object({enabled:e.boolean().optional(),conditions:Jy.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var Ky,Qy=n(()=>{b();Ky=e.enum_(["trace","thread"]);});var Bo,$y=n(()=>{b();Ny();Oy();Qy();Bo=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:Ky,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Hy.optional(),annotatorView:e.property("annotator_view",Uy.optional())});});var Mo,BX=n(()=>{b();$y();Mo=e.object({annotationQueues:e.property("annotation_queues",e.list(Bo))});});var Wo,MX=n(()=>{b();Wo=e.object({ids:e.list(e.string())});});var Vo,Wc=n(()=>{b();Vo=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var Yy,Xy=n(()=>{b();Yy=e.enum_([">","<","="]);});var Zy,qy=n(()=>{b();Xy();Zy=e.object({scoreName:e.property("score_name",e.string()),operator:Yy,value:e.number()});});var eb,rb=n(()=>{b();qy();eb=e.object({conditions:e.list(Zy)});});var tb,ib=n(()=>{b();rb();tb=e.object({groups:e.list(eb)});});var Lo,Vc=n(()=>{b();ib();Lo=e.object({enabled:e.boolean().optional(),conditions:tb.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var Jo,WX=n(()=>{b();Wc();Vc();Jo=e.object({name:e.string().optional(),description:e.string().optional(),instructions:e.string().optional(),commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Lo.optional(),annotatorView:e.property("annotator_view",Vo.optional())});});var ob=n(()=>{BX();MX();WX();});var VX=n(()=>{ob();});var Lc={};L(Lc,{AnnotationQueueBatchWrite:()=>Mo,AnnotationQueueItemIdsPublic:()=>Wo,AnnotationQueueUpdate:()=>Jo});var LX=n(()=>{VX();});var ab,nb=n(()=>{b();ab=e.enum_(["ui","sdk","online_scoring"]);});var sb,pb=n(()=>{b();sb=e.enum_(["passed","failed"]);});var cb,lb=n(()=>{b();nb();pb();cb=e.object({entityId:e.property("entity_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),status:sb,reason:e.string().optional(),source:ab});});var Jc,mb=n(()=>{b();Jc=e.enum_(["TRACE","SPAN","THREAD"]);});var Go,JX=n(()=>{b();lb();mb();Go=e.object({entityType:e.property("entity_type",Jc),assertionResults:e.property("assertion_results",e.list(cb))});});var db=n(()=>{JX();});var GX=n(()=>{db();});var ub=n(()=>{mb();});var Gc={};L(Gc,{AssertionResultBatch:()=>Go,AssertionResultBatchEntityType:()=>Jc});var HX=n(()=>{GX();ub();});var Hc,gb=n(()=>{b();Hc=e.enum_(["trace","span"]);});var Ho,OX=n(()=>{b();gb();Ho=e.object({fileName:e.property("file_name",e.string()),numOfFileParts:e.property("num_of_file_parts",e.number()),mimeType:e.property("mime_type",e.string().optional()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",Hc),entityId:e.property("entity_id",e.string()),path:e.string()});});var fb=n(()=>{OX();});var Oc={};L(Oc,{Request:()=>Mpe});var Mpe,KX=n(()=>{b();Mpe=e.record(e.string(),e.unknown());});var QX=n(()=>{fb();KX();});var Kc,$X=n(()=>{b();Kc=e.enum_(["trace","span"]);});var Qc,YX=n(()=>{b();Qc=e.enum_(["trace","span"]);});var $c,XX=n(()=>{b();$c=e.enum_(["trace","span"]);});var hb=n(()=>{$X();YX();gb();XX();});var fi={};L(fi,{AttachmentListRequestEntityType:()=>Kc,DownloadAttachmentRequestEntityType:()=>Qc,StartMultipartUploadRequest:()=>Ho,StartMultipartUploadRequestEntityType:()=>Hc,UploadAttachmentRequestEntityType:()=>$c,uploadAttachment:()=>Oc});var ZX=n(()=>{QX();hb();});var Oo,Yc=n(()=>{b();Oo=e.object({name:e.string().optional(),description:e.string().optional(),strict:e.boolean().optional(),parameters:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var Ar,hi=n(()=>{b();Ar=e.object({name:e.string().optional(),arguments:e.string().optional()});});var Ko,Xc=n(()=>{b();ne();Ko=e.object({role:e.string(),content:W});});var yb,bb=n(()=>{b();yb=e.object({mode:e.string().optional(),ttl:e.string().optional()});});var Rb,xb=n(()=>{b();Rb=e.object({name:e.string().optional(),strict:e.boolean().optional(),schema:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var wb,_b=n(()=>{b();wb=e.enum_(["text","json_object","json_schema"]);});var kb,Ab=n(()=>{b();xb();_b();kb=e.object({type:wb.optional(),jsonSchema:Rb.optional()});});var Pb,zb=n(()=>{b();Pb=e.object({includeUsage:e.boolean().optional()});});var Sb,vb=n(()=>{b();Sb=e.enum_(["function"]);});var Tb,jb=n(()=>{b();Yc();vb();Tb=e.object({type:Sb.optional(),function:Oo.optional()});});var Qo,qX=n(()=>{b();Yc();hi();Xc();bb();Ab();zb();jb();Qo=e.object({model:e.string().optional(),messages:e.list(Ko).optional(),temperature:e.number().optional(),topP:e.number().optional(),n:e.number().optional(),stream:e.boolean().optional(),streamOptions:Pb.optional(),stop:e.list(e.string()).optional(),maxTokens:e.number().optional(),maxCompletionTokens:e.number().optional(),presencePenalty:e.number().optional(),frequencyPenalty:e.number().optional(),logitBias:e.record(e.string(),e.number()).optional(),user:e.string().optional(),responseFormat:kb.optional(),seed:e.number().optional(),tools:e.list(Tb).optional(),toolChoice:e.record(e.string(),e.unknown()).optional(),parallelToolCalls:e.boolean().optional(),store:e.boolean().optional(),metadata:e.record(e.string(),e.string()).optional(),reasoningEffort:e.string().optional(),serviceTier:e.string().optional(),promptCacheKey:e.string().optional(),promptCacheOptions:yb.optional(),logprobs:e.boolean().optional(),topLogprobs:e.number().optional(),functions:e.list(Oo).optional(),functionCall:Ar.optional()});});var Cb=n(()=>{qX();});var e5=n(()=>{Cb();});var Zc={};L(Zc,{ChatCompletionRequest:()=>Qo});var r5=n(()=>{e5();});var Eb,Ib=n(()=>{b();Eb=e.enum_(["llm_judge","code_metric"]);});var Pr,yi=n(()=>{b();Ib();ne();Pr=e.object({name:e.string(),type:Eb,config:W});});var tr,Rt=n(()=>{b();tr=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var Db,Ub=n(()=>{b();Db=e.object({includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var $o,t5=n(()=>{b();yi();Rt();Ub();$o=e.object({spanIds:e.property("span_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",Db),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var Nb,Fb=n(()=>{b();Nb=e.object({includeSpans:e.boolean().optional(),includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var Yo,i5=n(()=>{b();yi();Rt();Fb();Yo=e.object({traceIds:e.property("trace_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",Nb),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var Xo,o5=n(()=>{b();Xo=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var Zo,a5=n(()=>{b();Zo=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),projectName:e.property("project_name",e.string().optional()),datasetVersions:e.property("dataset_versions",e.list(e.string()).optional()),filters:e.string().optional(),limit:e.number().optional(),lastRetrievedExperimentId:e.property("last_retrieved_experiment_id",e.string().optional()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional()});});var qo,n5=n(()=>{b();qo=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var ea,s5=n(()=>{b();ea=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var Bb,Mb=n(()=>{b();Bb=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ra,qc=n(()=>{b();Mb();ra=e.object({field:e.string().optional(),operator:Bb.optional(),key:e.string().optional(),value:e.string().optional()});});var Wb,Vb=n(()=>{b();yi();Rt();ne();Wb=e.object({input:e.string().optional(),expectedOutput:e.property("expected_output",e.string().optional()),metadata:W.optional(),data:W.optional(),description:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),clearExecutionPolicy:e.property("clear_execution_policy",e.boolean().optional())});});var ta,p5=n(()=>{b();qc();Vb();ta=e.object({ids:e.list(e.string()).optional(),filters:e.list(ra).optional(),datasetId:e.property("dataset_id",e.string().optional()),update:Wb,mergeTags:e.property("merge_tags",e.boolean().optional())});});var Lb,Jb=n(()=>{b();Lb=e.enum_(["manual","trace","span","sdk"]);});var Gb,Hb=n(()=>{b();Gb=e.enum_(["llm_judge","code_metric"]);});var Te,zr=n(()=>{b();Te=e.record(e.string(),e.unknown());});var Ob,Kb=n(()=>{b();Hb();zr();Ob=e.object({name:e.string(),type:Gb,config:Te});});var Qb,$b=n(()=>{b();Qb=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var ia,Yb=n(()=>{b();Jb();Kb();$b();ne();ia=e.object({id:e.string().optional(),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:Lb,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Ob).optional(),executionPolicy:e.property("execution_policy",Qb.optional())});});var oa,c5=n(()=>{b();Yb();oa=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(ia),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var aa,l5=n(()=>{b();aa=e.object({datasetName:e.property("dataset_name",e.string()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),steamLimit:e.property("steam_limit",e.number().optional()),datasetVersion:e.property("dataset_version",e.string().optional()),projectName:e.property("project_name",e.string().optional()),filters:e.string().optional()});});var na,m5=n(()=>{b();qc();na=e.object({itemIds:e.property("item_ids",e.list(e.string()).optional()),datasetId:e.property("dataset_id",e.string().optional()),filters:e.list(ra).optional(),batchGroupId:e.property("batch_group_id",e.string().optional())});});var el,Xb=n(()=>{b();el=e.enum_(["private","public"]);});var sa,d5=n(()=>{b();Xb();sa=e.object({name:e.string(),description:e.string().optional(),visibility:el.optional(),tags:e.list(e.string()).optional()});});var pa,u5=n(()=>{b();pa=e.object({versionRef:e.property("version_ref",e.string())});});var ca,g5=n(()=>{b();ca=e.object({versionName:e.property("version_name",e.string())});});var la,f5=n(()=>{b();la=e.object({tag:e.string()});});var ma,h5=n(()=>{b();ma=e.object({changeDescription:e.property("change_description",e.string().optional()),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional())});});var rl,Zb=n(()=>{b();rl=e.enum_(["dataset","evaluation_suite"]);});var tl,qb=n(()=>{b();tl=e.enum_(["private","public"]);});var da,y5=n(()=>{b();Zb();qb();da=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:rl.optional(),visibility:tl.optional(),tags:e.list(e.string()).optional(),description:e.string().optional()});});var eR=n(()=>{t5();i5();o5();a5();n5();s5();p5();c5();l5();m5();d5();u5();g5();f5();h5();y5();});var rR,tR=n(()=>{b();rR=e.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var bi,iR=n(()=>{b();tR();bi=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),status:rR.optional(),filePath:e.property("file_path",e.string().optional()),errorMessage:e.property("error_message",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional()),viewedAt:e.property("viewed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var il={};L(il,{Response:()=>Wpe});var Wpe,b5=n(()=>{b();iR();Wpe=e.list(bi);});var R5=n(()=>{b5();eR();});var ol,x5=n(()=>{b();ol=e.enum_(["json","jsonl"]);});var oR=n(()=>{x5();Xb();Zb();qb();});var Ri={};L(Ri,{CreateDatasetItemsFromJsonRequestFormat:()=>ol,CreateDatasetItemsFromSpansRequest:()=>$o,CreateDatasetItemsFromTracesRequest:()=>Yo,DatasetExpansionWrite:()=>Xo,DatasetExperimentItemStreamRequest:()=>Zo,DatasetIdentifier:()=>qo,DatasetIdentifierPublic:()=>ea,DatasetItemBatchUpdate:()=>ta,DatasetItemBatchWrite:()=>oa,DatasetItemStreamRequest:()=>aa,DatasetItemsDelete:()=>na,DatasetUpdate:()=>sa,DatasetUpdateVisibility:()=>el,DatasetVersionRestorePublic:()=>pa,DatasetVersionRetrieveRequestPublic:()=>ca,DatasetVersionTag:()=>la,DatasetVersionUpdatePublic:()=>ma,DatasetWrite:()=>da,DatasetWriteType:()=>rl,DatasetWriteVisibility:()=>tl,getDatasetExportJobs:()=>il});var w5=n(()=>{R5();oR();});var ua,_5=n(()=>{b();ua=e.object({name:e.string().optional(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var ga,k5=n(()=>{b();ga=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var aR=n(()=>{_5();k5();});var A5=n(()=>{aR();});var al={};L(al,{EnvironmentUpdate:()=>ua,EnvironmentWrite:()=>ga});var P5=n(()=>{A5();});var fa,nl=n(()=>{b();fa=e.object({name:e.string(),value:e.number()});});var nR,sR=n(()=>{b();nR=e.enum_(["running","completed","cancelled","failed"]);});var pR,cR=n(()=>{b();pR=e.enum_(["regular","trial","mini-batch","mutation"]);});var ha,lR=n(()=>{b();nl();sR();cR();ne();ha=e.object({name:e.string().optional(),metadata:W.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),type:pR.optional(),status:nR.optional(),experimentScores:e.property("experiment_scores",e.list(fa).optional())});});var ya,z5=n(()=>{b();lR();ya=e.object({ids:e.list(e.string()),update:ha,mergeTags:e.property("merge_tags",e.boolean().optional())});});var Or,ba=n(()=>{b();Or=e.object({id:e.string(),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var mR,dR=n(()=>{b();ne();Xc();ba();mR=e.object({model:e.string(),messages:e.list(Ko),configs:e.record(e.string(),W).optional(),promptVersions:e.property("prompt_versions",e.list(Or).optional()),experimentName:e.property("experiment_name",e.string().optional())});});var Ra,S5=n(()=>{b();dR();ba();Ra=e.object({datasetName:e.property("dataset_name",e.string()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),prompts:e.list(mR),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),datasetId:e.property("dataset_id",e.string()),versionHash:e.property("version_hash",e.string().optional()),promptVersions:e.property("prompt_versions",e.list(Or).optional()),selectedRuleIds:e.property("selected_rule_ids",e.list(e.string()).optional()),filters:e.string().optional()});});var uR,gR=n(()=>{b();uR=e.enum_(["ui","sdk","online_scoring"]);});var fR,hR=n(()=>{b();fR=e.enum_(["ui","sdk","online_scoring"]);});var yR,bR=n(()=>{b();hR();yR=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:fR.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var RR,xR=n(()=>{b();gR();bR();RR=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:uR,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),yR).optional())});});var ir,xa=n(()=>{b();ir=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var wa,sl=n(()=>{b();wa=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var wR,_R=n(()=>{b();wR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var kR,AR=n(()=>{b();kR=e.enum_(["general","tool","llm","guardrail"]);});var PR,zR=n(()=>{b();sl();xa();_R();AR();PR=e.object({id:e.string().optional(),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:kR.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:ir.optional(),output:ir.optional(),metadata:ir.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",wa.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:wR.optional(),environment:e.string().optional()});});var SR,vR=n(()=>{b();SR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var TR,jR=n(()=>{b();sl();xa();vR();TR=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:ir.optional(),output:ir.optional(),metadata:ir.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",wa.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:SR.optional(),environment:e.string().optional()});});var CR,ER=n(()=>{b();xR();xa();zR();jR();CR=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",ir.optional()),trace:TR.optional(),spans:e.list(PR).optional(),feedbackScores:e.property("feedback_scores",e.list(RR).optional())});});var _a,v5=n(()=>{b();ER();_a=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(CR)});});var ka,T5=n(()=>{b();ka=e.object({experimentName:e.property("experiment_name",e.string()),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),projectName:e.property("project_name",e.string().optional())});});var IR,DR=n(()=>{b();IR=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var he,xt=n(()=>{b();he=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var UR,NR=n(()=>{b();UR=e.enum_(["passed","failed"]);});var FR,BR=n(()=>{b();FR=e.enum_(["default","hidden"]);});var MR,WR=n(()=>{b();MR=e.enum_(["ui","sdk","online_scoring"]);});var VR,LR=n(()=>{b();VR=e.enum_(["ui","sdk","online_scoring"]);});var JR,GR=n(()=>{b();LR();JR=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:VR.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var ze,wt=n(()=>{b();WR();GR();ze=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:MR,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),JR).optional())});});var me,Ze=n(()=>{b();me=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Aa,pl=n(()=>{b();DR();xt();Rt();NR();BR();wt();Ze();ne();Aa=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),input:me.optional(),output:me.optional(),traceMetadata:e.property("trace_metadata",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",FR.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",tr.optional()),assertionResults:e.property("assertion_results",e.list(IR).optional()),status:UR.optional(),datasetItemData:e.property("dataset_item_data",W.optional())});});var Pa,j5=n(()=>{b();pl();Pa=e.object({experimentItems:e.property("experiment_items",e.list(Aa))});});var za,C5=n(()=>{b();za=e.object({ids:e.list(e.string())});});var Sa,E5=n(()=>{b();Sa=e.object({name:e.string(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var HR,OR=n(()=>{b();HR=e.object({name:e.string(),value:e.number()});});var Oe,xi=n(()=>{b();Oe=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var cl,KR=n(()=>{b();cl=e.object({id:e.string()});});var ll,QR=n(()=>{b();ll=e.enum_(["dataset","evaluation_suite"]);});var ml,$R=n(()=>{b();ml=e.enum_(["running","completed","cancelled","failed"]);});var dl,YR=n(()=>{b();dl=e.enum_(["regular","trial","mini-batch","mutation"]);});var va,I5=n(()=>{b();OR();xi();KR();QR();$R();YR();va=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:Oe.optional(),tags:e.list(e.string()).optional(),type:dl.optional(),evaluationMethod:e.property("evaluation_method",ll.optional()),optimizationId:e.property("optimization_id",e.string().optional()),status:ml.optional(),experimentScores:e.property("experiment_scores",e.list(HR).optional()),promptVersion:e.property("prompt_version",cl.optional()),promptVersions:e.property("prompt_versions",e.list(cl).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional())});});var Ta,D5=n(()=>{b();Ta=e.object({ids:e.list(e.string())});});var XR=n(()=>{z5();S5();v5();T5();j5();C5();E5();I5();D5();});var U5=n(()=>{XR();});var ZR=n(()=>{QR();$R();YR();});var ul={};L(ul,{ExperimentBatchUpdate:()=>ya,ExperimentExecutionRequest:()=>Ra,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>_a,ExperimentItemStreamRequest:()=>ka,ExperimentItemsBatch:()=>Pa,ExperimentItemsDelete:()=>za,ExperimentStreamRequestPublic:()=>Sa,ExperimentWrite:()=>va,ExperimentWriteEvaluationMethod:()=>ll,ExperimentWriteStatus:()=>ml,ExperimentWriteType:()=>dl,IdsHolder:()=>Ta});var N5=n(()=>{U5();ZR();});var gl,F5=n(()=>{b();gl=e.enum_(["numerical","categorical","boolean"]);});var qR=n(()=>{F5();});var fl={};L(fl,{FindFeedbackDefinitionsRequestType:()=>gl});var B5=n(()=>{qR();});var hl,M5=n(()=>{b();hl=e.enum_(["on_request","global"]);});var ex=n(()=>{M5();});var yl={};L(yl,{FindGuardrailPoliciesRequestExecutionScope:()=>hl});var W5=n(()=>{ex();});var rx,tx=n(()=>{b();rx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var ix,ox=n(()=>{b();ix=e.enum_(["passed","failed"]);});var ax,nx=n(()=>{b();tx();ox();ne();ax=e.object({entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:rx,result:ix,config:W,details:W});});var ja,V5=n(()=>{b();nx();ja=e.object({guardrails:e.list(ax)});});var sx,px=n(()=>{b();sx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var cx,lx=n(()=>{b();ne();px();cx=e.object({type:sx,config:W});});var Ca,L5=n(()=>{b();lx();Ca=e.object({text:e.string(),validations:e.list(cx)});});var mx=n(()=>{V5();L5();});var J5=n(()=>{mx();});var bl={};L(bl,{GuardrailBatchWrite:()=>ja,GuardrailsValidationRequest:()=>Ca});var G5=n(()=>{J5();});var Rl={};L(Rl,{Response:()=>Vpe});var Vpe,H5=n(()=>{b();ie();Vpe=e.record(e.string(),e.lazyObject(()=>Ea));});var xl={};L(xl,{Response:()=>Lpe});var Lpe,O5=n(()=>{b();Lpe=e.string();});var K5=n(()=>{H5();O5();});var _t={};L(_t,{getLlmModelProfiles:()=>Rl,getLlmModels:()=>xl});var Q5=n(()=>{K5();});var dx,ux=n(()=>{b();dx=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var gx,fx=n(()=>{b();gx=e.enum_(["form","json","basic"]);});var kt,Ia=n(()=>{b();ux();fx();kt=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",gx.optional()),credentials:e.list(dx).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var Da,$5=n(()=>{b();Ia();Da=e.object({apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",kt.optional())});});var hx,yx=n(()=>{b();hx=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var bx,Rx=n(()=>{b();bx=e.enum_(["form","json","basic"]);});var xx,wx=n(()=>{b();yx();Rx();xx=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",bx.optional()),credentials:e.list(hx).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var wl,_x=n(()=>{b();wl=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Ua,Y5=n(()=>{b();wx();_x();Ua=e.object({provider:wl,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",xx.optional())});});var Na,X5=n(()=>{b();Ia();Na=e.object({providerId:e.property("provider_id",e.string().optional()),authConfig:e.property("auth_config",kt.optional())});});var kx=n(()=>{$5();Y5();X5();});var Z5=n(()=>{kx();});var Ax=n(()=>{_x();});var _l={};L(_l,{ProviderApiKeyUpdate:()=>Da,ProviderApiKeyWrite:()=>Ua,ProviderApiKeyWriteProvider:()=>wl,ProviderAuthCheck:()=>Na});var q5=n(()=>{Z5();Ax();});var Fa,e3=n(()=>{b();Fa=e.object({clientName:e.property("client_name",e.string()),redirectUris:e.property("redirect_uris",e.list(e.string())),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional())});});var Ba,r3=n(()=>{b();Ba=e.object({clientId:e.property("client_id",e.string()),redirectUri:e.property("redirect_uri",e.string()),codeChallenge:e.property("code_challenge",e.string()),codeChallengeMethod:e.property("code_challenge_method",e.string()),resource:e.string(),state:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),csrf:e.string().optional()});});var Ma,t3=n(()=>{b();Ma=e.object({token:e.string().optional(),clientId:e.property("client_id",e.string().optional())});});var Wa,i3=n(()=>{b();Wa=e.object({grantType:e.property("grant_type",e.string().optional()),code:e.string().optional(),redirectUri:e.property("redirect_uri",e.string().optional()),clientId:e.property("client_id",e.string().optional()),codeVerifier:e.property("code_verifier",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional())});});var Px=n(()=>{e3();r3();t3();i3();});var o3=n(()=>{Px();});var kl={};L(kl,{ClientRegistrationRequest:()=>Fa,ConsentRequest:()=>Ba,RevokeRequest:()=>Ma,TokenRequest:()=>Wa});var a3=n(()=>{o3();});var zx,Sx=n(()=>{b();zx=e.object({name:e.string(),size:e.number().optional(),digest:e.string().optional(),modifiedAt:e.property("modified_at",e.date().optional())});});var Al={};L(Al,{Response:()=>Jpe});var Jpe,n3=n(()=>{b();Sx();Jpe=e.list(zx);});var s3=n(()=>{n3();});var wi={};L(wi,{listModels:()=>Al});var p3=n(()=>{s3();});var Ke,Kr=n(()=>{b();Ke=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Pl,vx=n(()=>{b();Pl=e.enum_(["running","completed","cancelled","initialized","error"]);});var Va,c3=n(()=>{b();Kr();Ze();vx();Va=e.object({name:e.string().optional(),status:Pl.optional(),errorInfo:e.property("error_info",Ke.optional()),metadata:me.optional()});});var Tx=n(()=>{c3();});var l3=n(()=>{Tx();});var jx=n(()=>{vx();});var zl={};L(zl,{OptimizationUpdate:()=>Va,OptimizationUpdateStatus:()=>Pl});var m3=n(()=>{l3();jx();});var La,d3=n(()=>{b();La=e.object({runnerName:e.property("runner_name",e.string()),hmac:e.string()});});var Sl,Cx=n(()=>{b();Sl=e.enum_(["connect","endpoint"]);});var Ja,u3=n(()=>{b();Cx();Ja=e.object({projectId:e.property("project_id",e.string()),activationKey:e.property("activation_key",e.string()),ttlSeconds:e.property("ttl_seconds",e.number().optional()),type:Sl});});var Ex=n(()=>{d3();u3();});var g3=n(()=>{Ex();});var Ix=n(()=>{Cx();});var vl={};L(vl,{ActivateRequest:()=>La,CreateSessionRequest:()=>Ja,CreateSessionRequestType:()=>Sl});var f3=n(()=>{g3();Ix();});var Tl,Dx=n(()=>{b();Tl=e.enum_(["traces","spans","threads"]);});var Ga,h3=n(()=>{b();Dx();Ga=e.object({entityType:e.property("entity_type",Tl),filters:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional())});});var Ux,Nx=n(()=>{b();Ux=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var Fx,Bx=n(()=>{b();Nx();Fx=e.object({field:Ux.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var Mx,Wx=n(()=>{b();Mx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,_i=n(()=>{b();Wx();Sr=e.object({field:e.string().optional(),operator:Mx.optional(),key:e.string().optional(),value:e.string().optional()});});var Vx,Lx=n(()=>{b();Vx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var vr,ki=n(()=>{b();Lx();vr=e.object({field:e.string().optional(),operator:Vx.optional(),key:e.string().optional(),value:e.string().optional()});});var Jx,Gx=n(()=>{b();Jx=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var At,Ha=n(()=>{b();Gx();At=e.object({field:e.string().optional(),operator:Jx.optional(),key:e.string().optional(),value:e.string().optional()});});var jl,Hx=n(()=>{b();jl=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Cl,Ox=n(()=>{b();Cl=e.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 Oa,y3=n(()=>{b();Bx();_i();ki();Ha();Hx();Ox();Oa=e.object({metricType:e.property("metric_type",Cl.optional()),interval:jl.optional(),intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional()),spanFilters:e.property("span_filters",e.list(Sr).optional()),traceFilters:e.property("trace_filters",e.list(vr).optional()),threadFilters:e.property("thread_filters",e.list(At).optional()),breakdown:Fx.optional()});});var Ka,b3=n(()=>{b();Ka=e.object({name:e.string(),includeStats:e.boolean().optional()});});var El,Kx=n(()=>{b();El=e.enum_(["private","public"]);});var Qa,R3=n(()=>{b();Kx();Qa=e.object({name:e.string().optional(),description:e.string().optional(),visibility:El.optional()});});var Il,Qx=n(()=>{b();Il=e.enum_(["private","public"]);});var $a,x3=n(()=>{b();Qx();$a=e.object({name:e.string(),visibility:Il.optional(),description:e.string().optional()});});var $x=n(()=>{h3();y3();b3();R3();x3();});var w3=n(()=>{$x();});var Yx=n(()=>{Dx();Hx();Ox();Kx();Qx();});var Dl={};L(Dl,{KpiCardRequest:()=>Ga,KpiCardRequestEntityType:()=>Tl,ProjectMetricRequestPublic:()=>Oa,ProjectMetricRequestPublicInterval:()=>jl,ProjectMetricRequestPublicMetricType:()=>Cl,ProjectRetrieveDetailed:()=>Ka,ProjectUpdate:()=>Qa,ProjectUpdateVisibility:()=>El,ProjectWrite:()=>$a,ProjectWriteVisibility:()=>Il});var _3=n(()=>{w3();Yx();});var Xx,Zx=n(()=>{b();Xx=e.record(e.string(),e.unknown());});var qx,ew=n(()=>{b();qx=e.enum_(["text","chat"]);});var rw,tw=n(()=>{b();rw=e.enum_(["mustache","jinja2","python"]);});var iw,ow=n(()=>{b();iw=e.enum_(["prompt_version","mask"]);});var Fe,Ya=n(()=>{b();Zx();ew();tw();ow();Fe=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:Xx.optional(),type:rw.optional(),versionType:e.property("version_type",iw.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",qx.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Ul,aw=n(()=>{b();Ul=e.enum_(["text","chat"]);});var Xa,k3=n(()=>{b();Ya();aw();Xa=e.object({name:e.string(),version:Fe,templateStructure:e.property("template_structure",Ul.optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var Za,A3=n(()=>{b();Za=e.object({name:e.string(),description:e.string().optional(),tags:e.list(e.string()).optional()});});var nw,sw=n(()=>{b();nw=e.object({tags:e.list(e.string()).optional()});});var qa,P3=n(()=>{b();sw();qa=e.object({ids:e.list(e.string()),update:nw,mergeTags:e.property("merge_tags",e.boolean().optional())});});var en,z3=n(()=>{b();en=e.object({commits:e.list(e.string())});});var rn,S3=n(()=>{b();rn=e.object({environments:e.list(e.string())});});var tn,v3=n(()=>{b();tn=e.object({ids:e.list(e.string())});});var on,T3=n(()=>{b();on=e.object({name:e.string(),commit:e.string().optional(),environment:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var Nl,pw=n(()=>{b();Nl=e.enum_(["text","chat"]);});var Fl,cw=n(()=>{b();Fl=e.enum_(["mustache","jinja2","python"]);});var an,j3=n(()=>{b();zr();pw();cw();an=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:Te.optional(),changeDescription:e.property("change_description",e.string().optional()),type:Fl.optional(),templateStructure:e.property("template_structure",Nl.optional()),tags:e.list(e.string()).optional()});});var lw=n(()=>{k3();A3();P3();z3();S3();v3();T3();j3();});var Ai,Bl=n(()=>{b();Ai=e.object({promptVersionId:e.property("prompt_version_id",e.string().optional()),commit:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var Ml={};L(Ml,{Response:()=>Gpe});var Gpe,C3=n(()=>{b();Bl();Gpe=e.list(Ai);});var Wl={};L(Wl,{Response:()=>Hpe});var Hpe,E3=n(()=>{b();Ya();Hpe=e.list(Fe);});var I3=n(()=>{C3();lw();E3();});var mw=n(()=>{aw();pw();cw();});var Pt={};L(Pt,{CreatePromptVersionDetail:()=>Xa,CreatePromptVersionDetailTemplateStructure:()=>Ul,PromptUpdatable:()=>Za,PromptVersionBatchUpdate:()=>qa,PromptVersionCommitsRequestPublic:()=>en,PromptVersionEnvironmentUpdate:()=>rn,PromptVersionIdsRequestDetail:()=>tn,PromptVersionRetrieveDetail:()=>on,PromptWrite:()=>an,PromptWriteTemplateStructure:()=>Nl,PromptWriteType:()=>Fl,getPromptsByCommits:()=>Ml,retrievePromptVersionsByIds:()=>Wl});var D3=n(()=>{I3();mw();});var Vl,U3=n(()=>{b();Vl=e.enum_(["agent_insights"]);});var dw=n(()=>{U3();});var Ll={};L(Ll,{FindReportFailuresRequestType:()=>Vl});var N3=n(()=>{dw();});var Jl,uw=n(()=>{b();Jl=e.enum_(["pending","completed","failed"]);});var nn,F3=n(()=>{b();ne();uw();nn=e.object({content:e.string().optional(),status:Jl,sessionId:e.property("session_id",e.string().optional()),recommendedActions:e.property("recommended_actions",W.optional()),failureReason:e.property("failure_reason",e.string().optional())});});var gw=n(()=>{F3();});var B3=n(()=>{gw();});var fw=n(()=>{uw();});var Gl={};L(Gl,{ReportCompleteRequest:()=>nn,ReportCompleteRequestStatus:()=>Jl});var M3=n(()=>{B3();fw();});var Hl,hw=n(()=>{b();Hl=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var sn,W3=n(()=>{b();hw();sn=e.object({projectId:e.property("project_id",e.string().optional()),organizationLevel:e.property("organization_level",e.boolean().optional()),retention:Hl,applyToPast:e.property("apply_to_past",e.boolean().optional())});});var yw=n(()=>{W3();});var V3=n(()=>{yw();});var bw=n(()=>{hw();});var Ol={};L(Ol,{RetentionRuleWrite:()=>sn,RetentionRuleWriteRetention:()=>Hl});var L3=n(()=>{V3();bw();});var pn,J3=n(()=>{b();pn=e.object({maxCommands:e.property("max_commands",e.number().optional())});});var Kl,Rw=n(()=>{b();Kl=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var cn,G3=n(()=>{b();ne();Rw();cn=e.object({status:Kl,result:W.optional(),error:W.optional(),durationMs:e.property("duration_ms",e.number().optional())});});var Ql,xw=n(()=>{b();Ql=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var ln,H3=n(()=>{b();ne();xw();ln=e.object({type:Ql,args:W,timeoutSeconds:e.property("timeout_seconds",e.number().optional())});});var mn,$l=n(()=>{b();mn=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetItemVersionId:e.property("dataset_item_version_id",e.string().optional()),datasetItemId:e.property("dataset_item_id",e.string().optional())});});var dn,O3=n(()=>{b();ne();$l();dn=e.object({agentName:e.property("agent_name",e.string()),inputs:W.optional(),projectId:e.property("project_id",e.string()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:mn.optional()});});var un,K3=n(()=>{b();un=e.object({capabilities:e.list(e.string()).optional()});});var Yl,ww=n(()=>{b();Yl=e.enum_(["pending","running","completed","failed","cancelled"]);});var gn,Q3=n(()=>{b();ne();ww();gn=e.object({status:Yl,result:W.optional(),error:e.string().optional(),traceId:e.property("trace_id",e.string().optional())});});var _w=n(()=>{J3();G3();H3();O3();K3();Q3();});var fn,Xl=n(()=>{b();fn=e.object({stream:e.string(),text:e.string()});});var Zl={};L(Zl,{Request:()=>Ope});var Ope,$3=n(()=>{b();Xl();Ope=e.list(fn);});var ql={};L(ql,{Response:()=>Kpe});var Kpe,Y3=n(()=>{b();Xl();Kpe=e.list(fn);});var kw,Aw=n(()=>{b();kw=e.enum_(["pending","running","completed","failed","cancelled"]);});var zt,em=n(()=>{b();ne();$l();Aw();zt=e.object({id:e.string().optional(),runnerId:e.property("runner_id",e.string().optional()),agentName:e.property("agent_name",e.string().optional()),status:kw.optional(),inputs:W.optional(),result:W.optional(),error:e.string().optional(),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:mn.optional(),timeout:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),startedAt:e.property("started_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional())});});var rm={};L(rm,{Response:()=>Qpe});var Qpe,X3=n(()=>{em();Qpe=zt.nullable();});var tm={};L(tm,{Request:()=>$pe});var $pe,Z3=n(()=>{b();$pe=e.record(e.string(),e.unknown());});var im={};L(im,{Request:()=>Ype});var Ype,q3=n(()=>{b();Ype=e.record(e.string(),e.unknown());});var e8=n(()=>{$3();Y3();X3();Z3();q3();_w();});var om,r8=n(()=>{b();om=e.enum_(["pairing","connected","disconnected"]);});var Pw=n(()=>{Rw();xw();r8();ww();});var hr={};L(hr,{BridgeCommandNextRequest:()=>pn,BridgeCommandResultRequest:()=>cn,BridgeCommandResultRequestStatus:()=>Kl,BridgeCommandSubmitRequest:()=>ln,BridgeCommandSubmitRequestType:()=>Ql,CreateLocalRunnerJobRequest:()=>dn,ListRunnersRequestStatus:()=>om,LocalRunnerHeartbeatRequest:()=>un,LocalRunnerJobResultRequest:()=>gn,LocalRunnerJobResultRequestStatus:()=>Yl,appendJobLogs:()=>Zl,getJobLogs:()=>ql,nextJob:()=>rm,patchChecklist:()=>tm,registerAgents:()=>im});var t8=n(()=>{e8();Pw();});var zw,Sw=n(()=>{b();zw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vw,Tw=n(()=>{b();vw=e.enum_(["general","tool","llm","guardrail"]);});var hn,jw=n(()=>{b();Kr();Ze();Sw();Tw();hn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:vw.optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),usage:e.record(e.string(),e.number()).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),errorInfo:e.property("error_info",Ke.optional()),ttft:e.number().optional(),source:zw.optional(),environment:e.string().optional()});});var yn,i8=n(()=>{b();jw();yn=e.object({ids:e.list(e.string()),update:hn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var St,bn=n(()=>{b();St=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Cw,Ew=n(()=>{b();Cw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Iw,Dw=n(()=>{b();Iw=e.enum_(["general","tool","llm","guardrail"]);});var Rn,Uw=n(()=>{b();bn();xi();Ew();Dw();Rn=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:Iw.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Oe.optional(),output:Oe.optional(),metadata:Oe.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:Cw.optional(),environment:e.string().optional()});});var xn,o8=n(()=>{b();Uw();xn=e.object({spans:e.list(Rn)});});var am,Nw=n(()=>{b();am=e.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 nm,Fw=n(()=>{b();nm=e.enum_(["general","tool","llm","guardrail"]);});var wn,a8=n(()=>{b();_i();Nw();Fw();wn=e.object({traceId:e.property("trace_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),type:nm.optional(),filters:e.list(Sr).optional(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),exclude:e.list(am).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var Bw=n(()=>{i8();o8();a8();});var n8=n(()=>{Bw();});var sm,s8=n(()=>{b();sm=e.enum_(["general","tool","llm","guardrail"]);});var pm,p8=n(()=>{b();pm=e.enum_(["general","tool","llm","guardrail"]);});var cm,c8=n(()=>{b();cm=e.enum_(["general","tool","llm","guardrail"]);});var Mw=n(()=>{s8();p8();c8();Nw();Fw();});var lm={};L(lm,{FindFeedbackScoreNames1RequestType:()=>sm,GetSpanStatsRequestType:()=>pm,GetSpansByProjectRequestType:()=>cm,SpanBatchUpdate:()=>yn,SpanBatchWrite:()=>xn,SpanSearchStreamRequestPublic:()=>wn,SpanSearchStreamRequestPublicExcludeItem:()=>am,SpanSearchStreamRequestPublicType:()=>nm});var l8=n(()=>{n8();Mw();});var _n,m8=n(()=>{b();_n=e.object({query:e.string()});});var kn,d8=n(()=>{b();kn=e.object({query:e.string(),projectId:e.property("project_id",e.string().optional())});});var Ww=n(()=>{m8();d8();});var u8=n(()=>{Ww();});var mm={};L(mm,{AnalyticsQueryRequest:()=>_n,ScopedAnalyticsQueryRequest:()=>kn});var g8=n(()=>{u8();});var An,f8=n(()=>{b();An=e.object({workspaceIds:e.property("workspace_ids",e.list(e.string())),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),limit:e.number().optional()});});var Vw=n(()=>{f8();});var h8=n(()=>{Vw();});var dm={};L(dm,{UsageProjectsRequest:()=>An});var y8=n(()=>{h8();});var Pn,b8=n(()=>{b();Pn=e.object({ids:e.list(e.string()),projectId:e.property("project_id",e.string().optional())});});var zn,R8=n(()=>{b();zn=e.object({projectName:e.property("project_name",e.string()),threadId:e.property("thread_id",e.string()),names:e.list(e.string()),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Sn,x8=n(()=>{b();Sn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()))});});var Lw,Jw=n(()=>{b();Lw=e.enum_(["ui","sdk","online_scoring"]);});var Gw,Hw=n(()=>{b();Jw();Gw=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:Lw,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),threadId:e.property("thread_id",e.string())});});var vn,w8=n(()=>{b();Hw();vn=e.object({scores:e.list(Gw)});});var Ow,Kw=n(()=>{b();Ow=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Tn,Qw=n(()=>{b();Kr();Ze();Kw();Tn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),errorInfo:e.property("error_info",Ke.optional()),threadId:e.property("thread_id",e.string().optional()),ttft:e.number().optional(),source:Ow.optional(),environment:e.string().optional()});});var jn,_8=n(()=>{b();Qw();jn=e.object({ids:e.list(e.string()),update:Tn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var $w,Yw=n(()=>{b();$w=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Cn,Xw=n(()=>{b();bn();xi();Yw();Cn=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Oe.optional(),output:Oe.optional(),metadata:Oe.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:$w.optional(),environment:e.string().optional()});});var En,k8=n(()=>{b();Xw();En=e.object({traces:e.list(Cn)});});var um,Zw=n(()=>{b();um=e.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","annotation_queues","source","environment"]);});var In,A8=n(()=>{b();ki();Zw();In=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(vr).optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),exclude:e.list(um).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var Dn,P8=n(()=>{b();Dn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()).optional())});});var Un,qw=n(()=>{b();Un=e.object({tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional())});});var Nn,z8=n(()=>{b();qw();Nn=e.object({ids:e.list(e.string()),update:Un,mergeTags:e.property("merge_tags",e.boolean().optional())});});var e_,r_=n(()=>{b();e_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var or,vt=n(()=>{b();r_();or=e.object({field:e.string().optional(),operator:e_.optional(),key:e.string().optional(),value:e.string().optional()});});var Fn,S8=n(()=>{b();vt();Fn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(or).optional(),lastRetrievedThreadModelId:e.property("last_retrieved_thread_model_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var t_=n(()=>{b8();R8();x8();w8();_8();k8();A8();P8();z8();S8();});var v8=n(()=>{t_();});var i_=n(()=>{Zw();});var gm={};L(gm,{BatchDeleteByProject:()=>Pn,DeleteThreadFeedbackScores:()=>zn,DeleteTraceThreads:()=>Sn,FeedbackScoreBatchThread:()=>vn,TraceBatchUpdate:()=>jn,TraceBatchWrite:()=>En,TraceSearchStreamRequestPublic:()=>In,TraceSearchStreamRequestPublicExcludeItem:()=>um,TraceThreadBatchIdentifier:()=>Dn,TraceThreadBatchUpdate:()=>Nn,TraceThreadSearchStreamRequest:()=>Fn});var T8=n(()=>{v8();i_();});var o_,a_=n(()=>{b();o_=e.enum_(["query"]);});var Tt,Bn=n(()=>{b();a_();Tt=e.object({kind:o_,queryId:e.property("query_id",e.string()),columns:e.record(e.string(),e.string()).optional()});});var fm,n_=n(()=>{b();fm=e.enum_(["widget"]);});var hm,s_=n(()=>{b();hm=e.enum_(["user","ollie","agent"]);});var ym,p_=n(()=>{b();ym=e.enum_(["html"]);});var Mn,j8=n(()=>{b();Bn();n_();s_();p_();Mn=e.object({area:fm,name:e.string(),description:e.string().optional(),summary:e.string().optional(),author:hm.optional(),type:ym,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),Tt),html:e.string()});});var Wn,C8=n(()=>{b();Wn=e.object({version:e.number()});});var Vn,E8=n(()=>{b();Vn=e.object({name:e.string().optional(),description:e.string().optional()});});var bm,c_=n(()=>{b();bm=e.enum_(["user","ollie","agent"]);});var Rm,l_=n(()=>{b();Rm=e.enum_(["html"]);});var Ln,I8=n(()=>{b();Bn();c_();l_();Ln=e.object({summary:e.string().optional(),author:bm.optional(),type:Rm,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),Tt),html:e.string()});});var m_=n(()=>{j8();C8();E8();I8();});var D8=n(()=>{m_();});var d_=n(()=>{n_();s_();p_();c_();l_();});var xm={};L(xm,{ViewCreate:()=>Mn,ViewCreateArea:()=>fm,ViewCreateAuthor:()=>hm,ViewCreateType:()=>ym,ViewCurrentVersion:()=>Wn,ViewUpdate:()=>Vn,ViewVersionCreate:()=>Ln,ViewVersionCreateAuthor:()=>bm,ViewVersionCreateType:()=>Rm});var U8=n(()=>{D8();d_();});var Jn,N8=n(()=>{b();Jn=e.object({role:e.string().optional(),integrations:e.list(e.string()).optional(),email:e.string().optional(),joinBetaProgram:e.property("join_beta_program",e.boolean().optional())});});var u_=n(()=>{N8();});var F8=n(()=>{u_();});var wm={};L(wm,{WelcomeWizardSubmission:()=>Jn});var B8=n(()=>{F8();});var g_,f_=n(()=>{b();g_=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var h_,y_=n(()=>{b();f_();h_=e.object({field:g_.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var b_,R_=n(()=>{b();b_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ar,jt=n(()=>{b();R_();ar=e.object({field:e.string().optional(),operator:b_.optional(),key:e.string().optional(),value:e.string().optional()});});var _m,x_=n(()=>{b();_m=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var km,w_=n(()=>{b();km=e.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 Gn,M8=n(()=>{b();y_();jt();x_();w_();Gn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),metricType:e.property("metric_type",km.optional()),interval:_m.optional(),breakdown:h_.optional(),filters:e.list(ar).optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var Hn,W8=n(()=>{b();Hn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional())});});var __=n(()=>{M8();W8();});var V8=n(()=>{__();});var k_=n(()=>{x_();w_();});var Am={};L(Am,{WorkspaceSpanMetricRequest:()=>Gn,WorkspaceSpanMetricRequestInterval:()=>_m,WorkspaceSpanMetricRequestMetricType:()=>km,WorkspaceTokenUsageNamesRequest:()=>Hn});var L8=n(()=>{V8();k_();});var J8=n(()=>{_y();_X();vy();vX();Ty();jy();CX();Ey();UX();Iy();FX();Dy();ob();LX();db();HX();ub();fb();ZX();hb();Cb();r5();eR();w5();oR();aR();P5();XR();N5();ZR();B5();qR();W5();ex();mx();G5();Q5();kx();q5();Ax();Px();a3();p3();Tx();m3();jx();Ex();f3();Ix();$x();_3();Yx();lw();D3();mw();N3();dw();gw();M3();fw();yw();L3();bw();_w();t8();Pw();Bw();l8();Mw();Ww();g8();Vw();y8();t_();T8();i_();m_();U8();d_();u_();B8();__();L8();k_();});var A_,P_=n(()=>{b();A_=e.enum_(["required","optional"]);});var z_,S_=n(()=>{b();P_();z_=e.object({name:e.string(),type:e.string(),presence:A_.optional()});});var v_,T_=n(()=>{b();S_();v_=e.object({name:e.string().optional(),description:e.string().optional(),language:e.string().optional(),executable:e.string().optional(),sourceFile:e.property("source_file",e.string().optional()),params:e.list(z_).optional(),timeout:e.number().optional()});});var j_,C_=n(()=>{b();j_=e.enum_(["blueprint","mask"]);});var E_,I_=n(()=>{b();E_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var D_,U_=n(()=>{b();I_();D_=e.object({key:e.string(),value:e.string().optional(),type:E_,description:e.string().optional()});});var N_,F_=n(()=>{b();C_();U_();N_=e.object({id:e.string().optional(),name:e.string().optional(),type:j_,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(D_)});});var B_,M_=n(()=>{b();B_=e.enum_(["blueprint","mask"]);});var W_,V_=n(()=>{b();W_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var L_,J_=n(()=>{b();V_();L_=e.object({key:e.string(),value:e.string().optional(),type:W_,description:e.string().optional()});});var Ct,G8=n(()=>{b();M_();J_();Ct=e.object({id:e.string().optional(),name:e.string().optional(),type:B_,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(L_)});});var G_,H_=n(()=>{b();G_=e.enum_(["blueprint","mask"]);});var O_,K_=n(()=>{b();O_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Q_,$_=n(()=>{b();K_();Q_=e.object({key:e.string(),value:e.string().optional(),type:O_,description:e.string().optional()});});var Y_,X_=n(()=>{b();H_();$_();Y_=e.object({id:e.string().optional(),type:G_,description:e.string().optional(),values:e.list(Q_)});});var Pm,H8=n(()=>{b();X_();Pm=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),id:e.string().optional(),blueprint:Y_});});var Z_,q_=n(()=>{b();Z_=e.enum_(["critical","high","medium","low"]);});var ek,rk=n(()=>{b();ek=e.enum_(["open","resolved","closed"]);});var tk,ik=n(()=>{b();q_();rk();tk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:ek.optional(),severity:Z_.optional(),tracesQuery:e.property("traces_query",e.string().optional()),totalOccurrences:e.property("total_occurrences",e.number().optional()),latestCount:e.property("latest_count",e.number().optional()),total:e.number().optional(),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),firstSeen:e.property("first_seen",e.string().optional()),lastSeen:e.property("last_seen",e.string().optional()),daysReported:e.property("days_reported",e.number().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var ok,ak=n(()=>{b();ne();ok=e.object({reportDay:e.property("report_day",e.string().optional()),count:e.number().optional(),totalCount:e.property("total_count",e.number().optional()),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),metadata:W.optional()});});var nk,O8=n(()=>{b();ik();nk=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(tk).optional()});});var sk,pk=n(()=>{b();sk=e.enum_(["critical","high","medium","low"]);});var ck,lk=n(()=>{b();ck=e.enum_(["open","resolved","closed"]);});var mk,K8=n(()=>{b();ak();pk();lk();mk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:ck.optional(),severity:sk.optional(),tracesQuery:e.property("traces_query",e.string().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),details:e.list(ok).optional()});});var dk,uk=n(()=>{b();dk=e.enum_(["enabled","disabled"]);});var Pi,Q8=n(()=>{b();uk();Pi=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:dk.optional(),autoFirstRunEnrolled:e.property("auto_first_run_enrolled",e.boolean().optional()),autoFirstRunAt:e.property("auto_first_run_at",e.date().optional()),lastScanAt:e.property("last_scan_at",e.date().optional()),lastFailureReason:e.property("last_failure_reason",e.string().optional()),lastFailureDetail:e.property("last_failure_detail",e.string().optional()),lastFailedAt:e.property("last_failed_at",e.date().optional()),guidance:e.string().optional(),guidanceUpdatedBy:e.property("guidance_updated_by",e.string().optional()),guidanceUpdatedAt:e.property("guidance_updated_at",e.date().optional()),guidanceVersion:e.property("guidance_version",e.number().optional()),resultsGuidanceVersion:e.property("results_guidance_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var je,Qr=n(()=>{b();je=e.object({name:e.string(),value:e.number()});});var Tr,zi=n(()=>{b();Tr=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var gk,fk=n(()=>{b();Qr();zi();gk=e.object({experimentCount:e.property("experiment_count",e.number().optional()),traceCount:e.property("trace_count",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),duration:Tr.optional(),feedbackScores:e.property("feedback_scores",e.list(je).optional()),experimentScores:e.property("experiment_scores",e.list(je).optional()),passRateAvg:e.property("pass_rate_avg",e.number().optional()),passedCountSum:e.property("passed_count_sum",e.number().optional()),totalCountSum:e.property("total_count_sum",e.number().optional())});});var hk,yk=n(()=>{b();hk=e.enum_(["general","slack","pagerduty"]);});var bk,Rk=n(()=>{b();bk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var xk,wk=n(()=>{b();Rk();xk=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:bk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var _k,kk=n(()=>{b();_k=e.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 Ak,Pk=n(()=>{b();wk();kk();Ak=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",_k),triggerConfigs:e.property("trigger_configs",e.list(xk).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var zk,Sk=n(()=>{b();zk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Xpe,$8=n(()=>{b();yk();Pk();Sk();Xpe=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",hk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:zk,triggers:e.list(Ak).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var vk,Tk=n(()=>{b();vk=e.enum_(["general","slack","pagerduty"]);});var jk,Ck=n(()=>{b();jk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Ek,Ik=n(()=>{b();Ck();Ek=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:jk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Dk,Uk=n(()=>{b();Dk=e.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 Nk,Fk=n(()=>{b();Ik();Uk();Nk=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",Dk),triggerConfigs:e.property("trigger_configs",e.list(Ek).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Bk,Mk=n(()=>{b();Bk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var On,Wk=n(()=>{b();Tk();Fk();Mk();On=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",vk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:Bk,triggers:e.list(Nk).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var Kn,Y8=n(()=>{b();Wk();Kn=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(On).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Vk,Lk=n(()=>{b();Vk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Jk,Gk=n(()=>{b();Lk();Jk=e.object({id:e.string().optional(),type:Vk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional())});});var Hk,Ok=n(()=>{b();Hk=e.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 Kk,Qk=n(()=>{b();Gk();Ok();Kk=e.object({id:e.string().optional(),eventType:e.property("event_type",Hk),triggerConfigs:e.property("trigger_configs",e.list(Jk).optional())});});var $k,Yk=n(()=>{b();$k=e.enum_(["general","slack","pagerduty"]);});var Xk,Zk=n(()=>{b();Xk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional()});});var Qn,X8=n(()=>{b();Qk();Yk();Zk();Qn=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",$k.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:Xk,triggers:e.list(Kk).optional(),projectId:e.property("project_id",e.string().optional())});});var $r,Z8=n(()=>{b();ne();$r=e.object({results:e.list(W).optional()});});var qk,eA=n(()=>{b();qk=e.object({username:e.string().optional(),status:e.number().optional()});});var rA,tA=n(()=>{b();rA=e.enum_(["trace","thread"]);});var iA,oA=n(()=>{b();Wc();Vc();eA();tA();Qr();iA=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:rA,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Lo.optional(),annotatorView:e.property("annotator_view",Vo.optional()),reviewers:e.list(qk).optional(),feedbackScores:e.property("feedback_scores",e.list(je).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var aA,nA=n(()=>{b();aA=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var sA,pA=n(()=>{b();sA=e.enum_([">","<","="]);});var cA,lA=n(()=>{b();pA();cA=e.object({scoreName:e.property("score_name",e.string()),operator:sA,value:e.number()});});var mA,dA=n(()=>{b();lA();mA=e.object({conditions:e.list(cA)});});var uA,gA=n(()=>{b();dA();uA=e.object({groups:e.list(mA)});});var fA,hA=n(()=>{b();gA();fA=e.object({enabled:e.boolean().optional(),conditions:uA.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional())});});var Zpe,q8=n(()=>{b();oA();Zpe=e.object({annotationQueues:e.property("annotation_queues",e.list(iA))});});var zm,eZ=n(()=>{b();zm=e.object({ids:e.list(e.string())});});var yA,bA=n(()=>{b();yA=e.enum_(["manual","automated"]);});var RA,xA=n(()=>{b();bA();RA=e.object({id:e.string().optional(),source:yA.optional()});});var wA,rZ=n(()=>{b();xA();wA=e.object({content:e.list(RA).optional()});});var _A,kA=n(()=>{b();_A=e.enum_(["trace","thread"]);});var AA,PA=n(()=>{b();AA=e.object({username:e.string().optional(),status:e.number().optional()});});var Yr,$n=n(()=>{b();Yr=e.object({name:e.string(),value:e.number()});});var Yn,zA=n(()=>{b();nA();hA();kA();PA();$n();Yn=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:_A,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:fA.optional(),annotatorView:e.property("annotator_view",aA.optional()),reviewers:e.list(AA).optional(),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var SA,tZ=n(()=>{b();zA();SA=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Yn).optional(),sortableBy:e.list(e.string()).optional()});});var Xn,Sm=n(()=>{b();Xn=e.object({id:e.string(),name:e.string()});});var vA,TA=n(()=>{b();vA=e.object({id:e.string(),name:e.string()});});var jA,CA=n(()=>{b();jA=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var EA,IA=n(()=>{b();EA=e.object({name:e.string(),value:e.number()});});var DA,UA=n(()=>{b();DA=e.object({name:e.string(),value:e.number()});});var NA,FA=n(()=>{b();NA=e.enum_(["system","user","assistant","tool","function"]);});var BA,MA=n(()=>{b();BA=e.enum_(["function"]);});var Zn,vm=n(()=>{b();hi();MA();Zn=e.object({id:e.string().optional(),index:e.number().optional(),type:BA.optional(),function:Ar.optional()});});var WA,VA=n(()=>{b();FA();hi();vm();WA=e.object({role:NA.optional(),content:e.string().optional(),reasoningContent:e.string().optional(),name:e.string().optional(),toolCalls:e.list(Zn).optional(),refusal:e.string().optional(),functionCall:Ar.optional()});});var LA,JA=n(()=>{b();LA=e.object({link:e.string().optional(),fileName:e.property("file_name",e.string()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string())});});var GA,iZ=n(()=>{b();JA();GA=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(LA).optional(),sortableBy:e.list(e.string()).optional()});});var HA,OA=n(()=>{b();HA=e.object({url:e.string()});});var KA,QA=n(()=>{b();KA=e.object({url:e.string()});});var $A,YA=n(()=>{b();$A=e.object({url:e.string()});});var XA,oZ=n(()=>{b();XA=e.record(e.string(),e.unknown());});var ZA,aZ=n(()=>{b();ZA=e.object({issuer:e.string().optional(),authorizationEndpoint:e.property("authorization_endpoint",e.string().optional()),tokenEndpoint:e.property("token_endpoint",e.string().optional()),revocationEndpoint:e.property("revocation_endpoint",e.string().optional()),registrationEndpoint:e.property("registration_endpoint",e.string().optional()),responseTypesSupported:e.property("response_types_supported",e.list(e.string()).optional()),grantTypesSupported:e.property("grant_types_supported",e.list(e.string()).optional()),codeChallengeMethodsSupported:e.property("code_challenge_methods_supported",e.list(e.string()).optional()),tokenEndpointAuthMethodsSupported:e.property("token_endpoint_auth_methods_supported",e.list(e.string()).optional())});});var qA,eP=n(()=>{b();qA=e.object({id:e.string().optional(),name:e.string().optional(),isDefault:e.property("is_default",e.boolean().optional())});});var rP,nZ=n(()=>{b();eP();rP=e.object({clientName:e.property("client_name",e.string().optional()),clientLogoUri:e.property("client_logo_uri",e.string().optional()),workspaces:e.list(qA).optional(),csrfToken:e.property("csrf_token",e.string().optional())});});var tP,iP=n(()=>{b();tP=e.enum_(["evaluator","annotation_queue_router"]);});var oP,aP=n(()=>{b();oP=e.object({url:e.string(),detail:e.string().optional()});});var nP,sP=n(()=>{b();nP=e.object({url:e.string()});});var pP,cP=n(()=>{b();OA();aP();sP();pP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",oP.optional()),videoUrl:e.property("video_url",nP.optional()),audioUrl:e.property("audio_url",HA.optional())});});var lP,mP=n(()=>{b();lP=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Et,qn=n(()=>{b();cP();mP();Et=e.object({role:lP,content:e.string().optional(),contentArray:e.property("content_array",e.list(pP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var dP,uP=n(()=>{b();dP=e.enum_(["decisions"]);});var It,es=n(()=>{b();ne();uP();It=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",W.optional()),api:dP.optional()});});var gP,fP=n(()=>{b();gP=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Dt,rs=n(()=>{b();fP();Dt=e.object({name:e.string(),type:gP,description:e.string()});});var ts,Tm=n(()=>{b();qn();es();rs();ts=e.object({model:It,messages:e.list(Et),variables:e.record(e.string(),e.string()),schema:e.list(Dt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var hP,yP=n(()=>{b();hP=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var jr,Si=n(()=>{b();yP();jr=e.object({field:e.string().optional(),operator:hP.optional(),key:e.string().optional(),value:e.string().optional()});});var bP,RP=n(()=>{b();Tm();Si();bP=e.object({filters:e.list(jr).optional(),code:ts.optional()});});var is,jm=n(()=>{b();qn();es();rs();is=e.object({model:It,messages:e.list(Et),variables:e.record(e.string(),e.string()),schema:e.list(Dt)});});var xP,wP=n(()=>{b();jt();jm();xP=e.object({filters:e.list(ar).optional(),code:is.optional()});});var os,Cm=n(()=>{b();os=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var _P,kP=n(()=>{b();jt();Cm();_P=e.object({filters:e.list(ar).optional(),code:os.optional()});});var as,Em=n(()=>{b();qn();es();rs();as=e.object({model:It,messages:e.list(Et),schema:e.list(Dt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var AP,PP=n(()=>{b();vt();Em();AP=e.object({filters:e.list(or).optional(),code:as.optional()});});var ns,Im=n(()=>{b();ns=e.object({metric:e.string()});});var zP,SP=n(()=>{b();vt();Im();zP=e.object({filters:e.list(or).optional(),code:ns.optional()});});var vP,TP=n(()=>{b();vP=e.enum_(["production","experiment","both"]);});var ss,Dm=n(()=>{b();ss=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var jP,CP=n(()=>{b();Si();Dm();jP=e.object({filters:e.list(jr).optional(),code:ss.optional()});});var EP,IP=n(()=>{b();EP=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var vi,qpe,sZ=n(()=>{b();iP();RP();wP();kP();PP();SP();TP();CP();IP();vi=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(EP).optional(),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",vP.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:tP}),qpe=e.union("type",{llm_as_judge:bP.extend(vi),user_defined_metric_python:jP.extend(vi),trace_thread_llm_as_judge:AP.extend(vi),trace_thread_user_defined_metric_python:zP.extend(vi),span_llm_as_judge:xP.extend(vi),span_user_defined_metric_python:_P.extend(vi)}).transform({transform:p=>p,untransform:p=>p});});var DP,UP=n(()=>{b();DP=e.object({url:e.string(),detail:e.string().optional()});});var NP,FP=n(()=>{b();NP=e.object({url:e.string()});});var BP,MP=n(()=>{b();QA();UP();FP();BP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",DP.optional()),videoUrl:e.property("video_url",NP.optional()),audioUrl:e.property("audio_url",KA.optional())});});var WP,VP=n(()=>{b();WP=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Ut,ps=n(()=>{b();MP();VP();Ut=e.object({role:WP,content:e.string().optional(),contentArray:e.property("content_array",e.list(BP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var ke,yr=n(()=>{b();ke=e.record(e.string(),e.unknown());});var LP,JP=n(()=>{b();LP=e.enum_(["decisions"]);});var Nt,cs=n(()=>{b();yr();JP();Nt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",ke.optional()),api:LP.optional()});});var GP,HP=n(()=>{b();GP=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ft,ls=n(()=>{b();HP();Ft=e.object({name:e.string(),type:GP,description:e.string()});});var OP,KP=n(()=>{b();ps();cs();ls();OP=e.object({model:Nt,messages:e.list(Ut),variables:e.record(e.string(),e.string()),schema:e.list(Ft),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var ms,Um=n(()=>{b();KP();ki();ms=e.object({filters:e.list(vr).optional(),code:OP.optional()});});var QP,$P=n(()=>{b();QP=e.object({url:e.string(),detail:e.string().optional()});});var YP,XP=n(()=>{b();YP=e.object({url:e.string()});});var ZP,qP=n(()=>{b();YA();$P();XP();ZP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",QP.optional()),videoUrl:e.property("video_url",YP.optional()),audioUrl:e.property("audio_url",$A.optional())});});var ez,rz=n(()=>{b();ez=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Bt,ds=n(()=>{b();qP();rz();Bt=e.object({role:ez,content:e.string().optional(),contentArray:e.property("content_array",e.list(ZP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var tz,iz=n(()=>{b();tz=e.enum_(["decisions"]);});var Mt,us=n(()=>{b();zr();iz();Mt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",Te.optional()),api:tz.optional()});});var oz,az=n(()=>{b();oz=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Wt,gs=n(()=>{b();az();Wt=e.object({name:e.string(),type:oz,description:e.string()});});var nz,sz=n(()=>{b();ds();us();gs();nz=e.object({model:Mt,messages:e.list(Bt),variables:e.record(e.string(),e.string()),schema:e.list(Wt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var pz,cz=n(()=>{b();pz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var fs,Nm=n(()=>{b();cz();fs=e.object({field:e.string().optional(),operator:pz.optional(),key:e.string().optional(),value:e.string().optional()});});var lz,mz=n(()=>{b();sz();Nm();lz=e.object({filters:e.list(fs).optional(),code:nz.optional()});});var dz,uz=n(()=>{b();dz=e.enum_(["evaluator","annotation_queue_router"]);});var gz,fz=n(()=>{b();gz=e.enum_(["production","experiment","both"]);});var hz,yz=n(()=>{b();ps();cs();ls();hz=e.object({model:Nt,messages:e.list(Ut),variables:e.record(e.string(),e.string()),schema:e.list(Ft)});});var hs,Fm=n(()=>{b();_i();yz();hs=e.object({filters:e.list(Sr).optional(),code:hz.optional()});});var bz,Rz=n(()=>{b();bz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var ys,Bm=n(()=>{b();_i();Rz();ys=e.object({filters:e.list(Sr).optional(),code:bz.optional()});});var xz,wz=n(()=>{b();ps();cs();ls();xz=e.object({model:Nt,messages:e.list(Ut),schema:e.list(Ft),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var bs,Mm=n(()=>{b();Ha();wz();bs=e.object({filters:e.list(At).optional(),code:xz.optional()});});var _z,kz=n(()=>{b();_z=e.object({metric:e.string()});});var Rs,Wm=n(()=>{b();Ha();kz();Rs=e.object({filters:e.list(At).optional(),code:_z.optional()});});var Az,Pz=n(()=>{b();Az=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var xs,Vm=n(()=>{b();ki();Pz();xs=e.object({filters:e.list(vr).optional(),code:Az.optional()});});var ws,Lm=n(()=>{b();ws=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var Ti,zz,Sz=n(()=>{b();Um();uz();fz();Fm();Bm();Mm();Wm();Vm();Lm();Ti=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ws).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",gz.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:dz}),zz=e.union("type",{llm_as_judge:ms.extend(Ti),user_defined_metric_python:xs.extend(Ti),trace_thread_llm_as_judge:bs.extend(Ti),trace_thread_user_defined_metric_python:Rs.extend(Ti),span_llm_as_judge:hs.extend(Ti),span_user_defined_metric_python:ys.extend(Ti)}).transform({transform:p=>p,untransform:p=>p});});var vz,pZ=n(()=>{b();Sz();vz=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(zz).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Tz,jz=n(()=>{b();Tz=e.enum_(["evaluator","annotation_queue_router"]);});var Cz,Ez=n(()=>{b();Cz=e.enum_(["production","experiment","both"]);});var ji,Iz,cZ=n(()=>{b();Um();jz();Ez();Fm();Bm();Mm();Wm();Vm();Lm();ji=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ws).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",Cz.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:Tz}),Iz=e.union("type",{llm_as_judge:ms.extend(ji),user_defined_metric_python:xs.extend(ji),trace_thread_llm_as_judge:bs.extend(ji),trace_thread_user_defined_metric_python:Rs.extend(ji),span_llm_as_judge:hs.extend(ji),span_user_defined_metric_python:ys.extend(ji)}).transform({transform:p=>p,untransform:p=>p});});var Dz,Uz=n(()=>{b();Dz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var _s,Jm=n(()=>{b();Uz();_s=e.object({field:e.string().optional(),operator:Dz.optional(),key:e.string().optional(),value:e.string().optional()});});var Nz,Fz=n(()=>{b();ds();us();gs();Nz=e.object({model:Mt,messages:e.list(Bt),variables:e.record(e.string(),e.string()),schema:e.list(Wt)});});var Bz,Mz=n(()=>{b();Jm();Fz();Bz=e.object({filters:e.list(_s).optional(),code:Nz.optional()});});var Wz,Vz=n(()=>{b();Wz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var Lz,Jz=n(()=>{b();Jm();Vz();Lz=e.object({filters:e.list(_s).optional(),code:Wz.optional()});});var Gz,Hz=n(()=>{b();Gz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ks,Gm=n(()=>{b();Hz();ks=e.object({field:e.string().optional(),operator:Gz.optional(),key:e.string().optional(),value:e.string().optional()});});var Oz,Kz=n(()=>{b();ds();us();gs();Oz=e.object({model:Mt,messages:e.list(Bt),schema:e.list(Wt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var Qz,$z=n(()=>{b();Gm();Kz();Qz=e.object({filters:e.list(ks).optional(),code:Oz.optional()});});var Yz,Xz=n(()=>{b();Yz=e.object({metric:e.string()});});var Zz,qz=n(()=>{b();Gm();Xz();Zz=e.object({filters:e.list(ks).optional(),code:Yz.optional()});});var eS,rS=n(()=>{b();eS=e.enum_(["evaluator","annotation_queue_router"]);});var tS,iS=n(()=>{b();Tm();Si();tS=e.object({filters:e.list(jr).optional(),code:ts.optional()});});var oS,aS=n(()=>{b();jt();jm();oS=e.object({filters:e.list(ar).optional(),code:is.optional()});});var nS,sS=n(()=>{b();jt();Cm();nS=e.object({filters:e.list(ar).optional(),code:os.optional()});});var pS,cS=n(()=>{b();vt();Em();pS=e.object({filters:e.list(or).optional(),code:as.optional()});});var lS,mS=n(()=>{b();vt();Im();lS=e.object({filters:e.list(or).optional(),code:ns.optional()});});var dS,uS=n(()=>{b();dS=e.enum_(["production","experiment","both"]);});var gS,fS=n(()=>{b();Si();Dm();gS=e.object({filters:e.list(jr).optional(),code:ss.optional()});});var Ci,hS,lZ=n(()=>{b();rS();iS();aS();sS();cS();mS();uS();fS();Ci=e.object({name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",dS.optional()),projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),action:eS}),hS=e.union("type",{llm_as_judge:tS.extend(Ci),user_defined_metric_python:gS.extend(Ci),trace_thread_llm_as_judge:pS.extend(Ci),trace_thread_user_defined_metric_python:lS.extend(Ci),span_llm_as_judge:oS.extend(Ci),span_user_defined_metric_python:nS.extend(Ci)}).transform({transform:p=>p,untransform:p=>p});});var yS,bS=n(()=>{b();yS=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var RS,xS=n(()=>{b();Nm();bS();RS=e.object({filters:e.list(fs).optional(),code:yS.optional()});});var wS,_S=n(()=>{b();wS=e.enum_(["evaluator","annotation_queue_router"]);});var kS,AS=n(()=>{b();kS=e.enum_(["production","experiment","both"]);});var Ei,PS,mZ=n(()=>{b();mz();Mz();Jz();$z();qz();xS();_S();AS();Ei=e.object({projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",kS.optional()),action:wS}),PS=e.union("type",{llm_as_judge:lz.extend(Ei),user_defined_metric_python:RS.extend(Ei),trace_thread_llm_as_judge:Qz.extend(Ei),trace_thread_user_defined_metric_python:Zz.extend(Ei),span_llm_as_judge:Bz.extend(Ei),span_user_defined_metric_python:Lz.extend(Ei)}).transform({transform:p=>p,untransform:p=>p});});var zS,SS=n(()=>{b();zS=e.object({value:e.number().optional()});});var ue,dZ=n(()=>{b();ue=e.object({ids:e.list(e.string())});});var vS,TS=n(()=>{b();vS=e.object({workspaceId:e.property("workspace_id",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var Ii,uZ=n(()=>{b();TS();Ii=e.object({biInformation:e.property("bi_information",e.list(vS).optional())});});var jS,gZ=n(()=>{b();F_();jS=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(N_).optional()});});var CS,ES=n(()=>{b();CS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var IS,DS=n(()=>{b();ES();IS=e.object({details:CS.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var US,NS=n(()=>{b();US=e.object({trueLabel:e.string(),falseLabel:e.string()});});var FS,BS=n(()=>{b();NS();FS=e.object({details:US.optional()});});var MS,WS=n(()=>{b();MS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var As,Hm=n(()=>{b();WS();As=e.object({details:MS.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var VS,LS=n(()=>{b();VS=e.object({trueLabel:e.string(),falseLabel:e.string()});});var JS,GS=n(()=>{b();LS();JS=e.object({details:VS.optional()});});var HS,OS=n(()=>{b();HS=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var KS,QS=n(()=>{b();KS=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var $S,fZ=n(()=>{b();OS();QS();ne();$S=e.object({commandId:e.property("command_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional()),type:KS.optional(),status:HS.optional(),args:W.optional(),result:W.optional(),error:W.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional()),pickedUpAt:e.property("picked_up_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional()),durationMs:e.property("duration_ms",e.number().optional())});});var YS,XS=n(()=>{b();YS=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var ZS,qS=n(()=>{b();XS();ne();ZS=e.object({commandId:e.property("command_id",e.string().optional()),type:YS.optional(),args:W.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional())});});var ev,hZ=n(()=>{b();qS();ev=e.object({commands:e.list(ZS).optional()});});var rv,yZ=n(()=>{b();rv=e.object({commandId:e.property("command_id",e.string().optional())});});var tv,iv=n(()=>{b();tv=e.object({categories:e.record(e.string(),e.number())});});var ov,av=n(()=>{b();iv();ov=e.object({details:tv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var nv,sv=n(()=>{b();nv=e.object({categories:e.record(e.string(),e.number())});});var pv,cv=n(()=>{b();sv();pv=e.object({details:nv.optional()});});var lv,mv=n(()=>{b();lv=e.object({categories:e.record(e.string(),e.number())});});var Ps,Om=n(()=>{b();mv();Ps=e.object({details:lv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var dv,uv=n(()=>{b();dv=e.object({categories:e.record(e.string(),e.number())});});var gv,fv=n(()=>{b();uv();gv=e.object({details:dv.optional()});});var hv,yv=n(()=>{b();hi();vm();hv=e.object({role:e.string().optional(),content:e.string().optional(),reasoningContent:e.string().optional(),toolCalls:e.list(Zn).optional(),functionCall:Ar.optional()});});var bv,Rv=n(()=>{b();bv=e.object({token:e.string().optional(),logprob:e.number().optional(),bytes:e.list(e.number()).optional()});});var xv,wv=n(()=>{b();Rv();xv=e.object({content:e.list(bv).optional()});});var _v,kv=n(()=>{b();VA();yv();wv();_v=e.object({index:e.number().optional(),message:WA.optional(),delta:hv.optional(),finishReason:e.string().optional(),logprobs:xv.optional()});});var Av,Pv=n(()=>{b();Av=e.object({reasoningTokens:e.number().optional()});});var zv,Sv=n(()=>{b();zv=e.object({cachedTokens:e.number().optional(),cacheWriteTokens:e.number().optional()});});var vv,Tv=n(()=>{b();Pv();Sv();vv=e.object({totalTokens:e.number().optional(),promptTokens:e.number().optional(),promptTokensDetails:zv.optional(),completionTokens:e.number().optional(),completionTokensDetails:Av.optional()});});var jv,bZ=n(()=>{b();kv();Tv();jv=e.object({id:e.string().optional(),created:e.number().optional(),model:e.string().optional(),choices:e.list(_v).optional(),usage:vv.optional(),systemFingerprint:e.string().optional(),serviceTier:e.string().optional()});});var Cv,Ev=n(()=>{b();Cv=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var Iv,Dv=n(()=>{b();Iv=e.enum_(["passed","failed"]);});var Uv,Nv=n(()=>{b();Ev();Dv();Uv=e.object({name:Cv.optional(),result:Iv.optional()});});var Fv,Bv=n(()=>{b();Fv=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var Mv,Wv=n(()=>{b();Mv=e.enum_(["passed","failed"]);});var Vv,Lv=n(()=>{b();Bv();Wv();Vv=e.object({name:Fv.optional(),result:Mv.optional()});});var Jv,Gv=n(()=>{b();Jv=e.object({typeName:e.string().optional()});});var ece,RZ=n(()=>{b();Gv();ece=e.object({type:Jv.optional(),closed:e.boolean().optional()});});var Hv,Ov=n(()=>{b();Hv=e.object({typeName:e.string().optional()});});var rce,xZ=n(()=>{b();Ov();rce=e.object({type:Hv.optional(),closed:e.boolean().optional()});});var Kv,wZ=n(()=>{b();Kv=e.object({clientId:e.property("client_id",e.string().optional()),clientIdIssuedAt:e.property("client_id_issued_at",e.number().optional()),clientName:e.property("client_name",e.string().optional()),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional()),redirectUris:e.property("redirect_uris",e.list(e.string()).optional()),tokenEndpointAuthMethod:e.property("token_endpoint_auth_method",e.string().optional()),grantTypes:e.property("grant_types",e.list(e.string()).optional()),responseTypes:e.property("response_types",e.list(e.string()).optional())});});var Qv,$v=n(()=>{b();Qv=e.enum_(["string","number","object","boolean","array","null"]);});var Yv,Xv=n(()=>{b();$v();Yv=e.object({name:e.string().optional(),types:e.list(Qv).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var Zv,qv=n(()=>{b();Zv=e.enum_(["string","number","object","boolean","array","null"]);});var eT,rT=n(()=>{b();qv();eT=e.object({name:e.string().optional(),types:e.list(Zv).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var tT,iT=n(()=>{b();tT=e.enum_(["string","number","object","boolean","array","null"]);});var oT,aT=n(()=>{b();iT();oT=e.object({name:e.string().optional(),types:e.list(tT).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var nT,sT=n(()=>{b();nT=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Vt,zs=n(()=>{b();Vt=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var pT,cT=n(()=>{b();pT=e.enum_(["trace","span"]);});var lT,mT=n(()=>{b();lT=e.object({eTag:e.property("e_tag",e.string()),partNumber:e.property("part_number",e.number())});});var Km,_Z=n(()=>{b();cT();mT();Km=e.object({fileName:e.property("file_name",e.string()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",pT),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string().optional()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string().optional()),uploadId:e.property("upload_id",e.string()),uploadedFileParts:e.property("uploaded_file_parts",e.list(lT))});});var dT,kZ=n(()=>{b();dT=e.object({redirectTo:e.property("redirect_to",e.string().optional())});});var uT,gT=n(()=>{b();uT=e.object({value:e.number().optional()});});var fT,AZ=n(()=>{b();fT=e.object({sessionId:e.property("session_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional())});});var hT,yT=n(()=>{b();hT=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var bT,RT=n(()=>{b();bT=e.enum_(["workspace","insights"]);});var xT,wT=n(()=>{b();xT=e.enum_(["multi_project","experiments"]);});var nr,_T=n(()=>{b();RT();wT();yr();nr=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),type:xT.optional(),scope:bT.optional(),description:e.string().optional(),config:ke,createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var Lt,PZ=n(()=>{b();_T();Lt=e.object({content:e.list(nr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Ss,zZ=n(()=>{b();Ss=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sql:e.string(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var kT,AT=n(()=>{b();kT=e.enum_(["multi_project","experiments"]);});var vs,SZ=n(()=>{b();AT();yr();vs=e.object({name:e.string().optional(),type:kT.optional(),description:e.string().optional(),config:ke.optional()});});var Ts,vZ=n(()=>{b();Ts=e.object({intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional())});});var PT,zT=n(()=>{b();PT=e.enum_(["multi_project","experiments"]);});var js,TZ=n(()=>{b();zT();zr();js=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string(),type:PT.optional(),description:e.string().optional(),config:Te});});var tce,jZ=n(()=>{b();tce=e.object({time:e.date(),value:e.number().optional()});});var ST,vT=n(()=>{b();ST=e.object({time:e.date(),value:e.number().optional()});});var TT,jT=n(()=>{b();TT=e.enum_(["unknown","processing","completed","failed"]);});var CT,ET=n(()=>{b();CT=e.enum_(["dataset","evaluation_suite"]);});var Cs,Qm=n(()=>{b();Cs=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var IT,DT=n(()=>{b();IT=e.enum_(["private","public"]);});var ice,CZ=n(()=>{b();jT();ET();Qm();DT();ice=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:CT.optional(),visibility:IT.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:TT.optional(),latestVersion:e.property("latest_version",Cs.optional())});});var oce,EZ=n(()=>{b();oce=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var UT,NT=n(()=>{b();UT=e.enum_(["manual","trace","span","sdk"]);});var FT,BT=n(()=>{b();FT=e.enum_(["passed","failed"]);});var MT,WT=n(()=>{b();BT();MT=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:FT.optional()});});var Es,$m=n(()=>{b();NT();yi();Rt();pl();WT();ne();Es=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:UT,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Pr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),experimentItems:e.property("experiment_items",e.list(Aa).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),MT).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var VT,IZ=n(()=>{b();$m();VT=e.object({generatedSamples:e.property("generated_samples",e.list(Es).optional()),model:e.string().optional(),totalGenerated:e.property("total_generated",e.number().optional()),generationTime:e.property("generation_time",e.date().optional())});});var ace,DZ=n(()=>{b();$m();ace=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(Es),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var LT,UZ=n(()=>{b();LT=e.record(e.string(),e.unknown());});var JT,GT=n(()=>{b();JT=e.enum_(["manual","trace","span","sdk"]);});var HT,OT=n(()=>{b();HT=e.enum_(["llm_judge","code_metric"]);});var KT,QT=n(()=>{b();KT=e.record(e.string(),e.unknown());});var $T,YT=n(()=>{b();OT();QT();$T=e.object({name:e.string(),type:HT,config:KT});});var Is,Ym=n(()=>{b();Is=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var XT,ZT=n(()=>{b();XT=e.enum_(["passed","failed"]);});var qT,ej=n(()=>{b();qT=e.enum_(["default","hidden"]);});var rj,tj=n(()=>{b();rj=e.enum_(["ui","sdk","online_scoring"]);});var ij,oj=n(()=>{b();ij=e.enum_(["ui","sdk","online_scoring"]);});var aj,nj=n(()=>{b();oj();aj=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:ij.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var sj,pj=n(()=>{b();tj();nj();sj=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:rj,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),aj).optional())});});var Ds,cj=n(()=>{b();Ds=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var lj,mj=n(()=>{b();CA();sT();Ym();ZT();ej();pj();cj();ne();lj=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),input:Ds.optional(),output:Ds.optional(),traceMetadata:e.property("trace_metadata",Ds.optional()),feedbackScores:e.property("feedback_scores",e.list(sj).optional()),comments:e.list(nT).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",qT.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",Is.optional()),assertionResults:e.property("assertion_results",e.list(jA).optional()),status:XT.optional(),datasetItemData:e.property("dataset_item_data",W.optional())});});var dj,uj=n(()=>{b();dj=e.enum_(["passed","failed"]);});var gj,fj=n(()=>{b();uj();gj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:dj.optional()});});var hj,yj=n(()=>{b();GT();YT();Ym();mj();fj();ne();hj=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:JT,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list($T).optional(),executionPolicy:e.property("execution_policy",Is.optional()),experimentItems:e.property("experiment_items",e.list(lj).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),gj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var bj,NZ=n(()=>{b();rT();yj();bj=e.object({content:e.list(hj).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(eT).optional(),sortableBy:e.list(e.string()).optional()});});var Rj,xj=n(()=>{b();Rj=e.enum_(["manual","trace","span","sdk"]);});var wj,_j=n(()=>{b();wj=e.enum_(["llm_judge","code_metric"]);});var Us,Xm=n(()=>{b();_j();yr();Us=e.object({name:e.string(),type:wj,config:ke});});var Ns,Zm=n(()=>{b();Ns=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var kj,Aj=n(()=>{b();kj=e.enum_(["default","hidden"]);});var Fs,Pj=n(()=>{b();Aj();Fs=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",kj.optional())});});var zj,Sj=n(()=>{b();zj=e.enum_(["passed","failed"]);});var vj,Tj=n(()=>{b();Sj();vj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:zj.optional()});});var Bs,jj=n(()=>{b();xj();Xm();Zm();Pj();Tj();ne();Bs=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:Rj,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Us).optional(),executionPolicy:e.property("execution_policy",Ns.optional()),experimentItems:e.property("experiment_items",e.list(Fs).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),vj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Cj,FZ=n(()=>{b();aT();jj();Cj=e.object({content:e.list(Bs).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(oT).optional(),sortableBy:e.list(e.string()).optional()});});var Ej,Ij=n(()=>{b();Ej=e.enum_(["unknown","processing","completed","failed"]);});var Dj,Uj=n(()=>{b();Dj=e.enum_(["dataset","evaluation_suite"]);});var Nj,Fj=n(()=>{b();Nj=e.enum_(["private","public"]);});var Ms,qm=n(()=>{b();Ms=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var Di,Bj=n(()=>{b();Ij();Uj();Fj();qm();Di=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),type:Dj.optional(),visibility:Nj.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:Ej.optional(),latestVersion:e.property("latest_version",Ms.optional())});});var Ws,BZ=n(()=>{b();Bj();Ws=e.object({content:e.list(Di).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.list(e.string()).optional()});});var Mj,Wj=n(()=>{b();Mj=e.object({itemsAdded:e.number().optional(),itemsModified:e.number().optional(),itemsDeleted:e.number().optional(),itemsUnchanged:e.number().optional()});});var Vj,MZ=n(()=>{b();Wj();Vj=e.object({fromVersion:e.property("from_version",e.string().optional()),toVersion:e.property("to_version",e.string().optional()),statistics:Mj.optional()});});var Cr,Lj=n(()=>{b();Xm();Zm();Cr=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),versionHash:e.property("version_hash",e.string().optional()),tags:e.list(e.string()).optional(),isLatest:e.property("is_latest",e.boolean().optional()),versionName:e.property("version_name",e.string().optional()),itemsTotal:e.property("items_total",e.number().optional()),itemsAdded:e.property("items_added",e.number().optional()),itemsModified:e.property("items_modified",e.number().optional()),itemsDeleted:e.property("items_deleted",e.number().optional()),changeDescription:e.property("change_description",e.string().optional()),metadata:e.record(e.string(),e.string()).optional(),evaluators:e.list(Us).optional(),executionPolicy:e.property("execution_policy",Ns.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Jj,WZ=n(()=>{b();Lj();Jj=e.object({content:e.list(Cr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var Gj,Hj=n(()=>{b();Gj=e.enum_(["trace","span"]);});var nce,VZ=n(()=>{b();Hj();nce=e.object({fileNames:e.property("file_names",e.list(e.string())),entityType:e.property("entity_type",Gj),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string())});});var Vs,LZ=n(()=>{b();Vs=e.object({name:e.string(),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Ui,JZ=n(()=>{b();Ui=e.object({ids:e.list(e.string())});});var Oj,Kj=n(()=>{b();Oj=e.object({accepted:e.boolean().optional(),levels:e.list(e.string()).optional(),default:e.string().optional()});});var sce,GZ=n(()=>{b();sce=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Ls,Qj=n(()=>{b();Ls=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var $j,HZ=n(()=>{b();Qj();$j=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Ls).optional(),sortableBy:e.list(e.string()).optional()});});var Js,ed=n(()=>{b();Js=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var Yj,Xj=n(()=>{b();Yj=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var Jt,Gs=n(()=>{b();Jt=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Zj,OZ=n(()=>{b();Zj=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var pce,KZ=n(()=>{b();pce=e.object({errors:e.list(e.string()).optional()});});var cce,QZ=n(()=>{b();cce=e.object({errors:e.list(e.string()).optional()});});var lce,$Z=n(()=>{b();lce=e.object({errors:e.list(e.string()).optional()});});var mce,YZ=n(()=>{b();mce=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var dce,XZ=n(()=>{b();dce=e.object({errors:e.list(e.string()).optional()});});var Hs,ZZ=n(()=>{b();Hs=e.object({exists:e.boolean().optional()});});var qj,eC=n(()=>{b();qj=e.enum_(["dataset","evaluation_suite"]);});var rC,tC=n(()=>{b();rC=e.enum_(["running","completed","cancelled","failed"]);});var iC,oC=n(()=>{b();iC=e.enum_(["regular","trial","mini-batch","mutation"]);});var uce,qZ=n(()=>{b();IA();xt();Qm();eC();nl();tC();oC();Qr();Ze();zi();ba();uce=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),type:iC.optional(),evaluationMethod:e.property("evaluation_method",qj.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),comments:e.list(he).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:rC.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(fa).optional()),promptVersion:e.property("prompt_version",Or.optional()),promptVersions:e.property("prompt_versions",e.list(Or).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Cs.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(EA).optional())});});var aC,nC=n(()=>{b();aC=e.object({experimentId:e.property("experiment_id",e.string().optional()),promptIndex:e.property("prompt_index",e.number().optional()),totalItems:e.property("total_items",e.number().optional())});});var sC,e7=n(()=>{b();nC();sC=e.object({experiments:e.list(aC).optional(),totalItems:e.property("total_items",e.number().optional())});});var pC,cC=n(()=>{b();fk();pC=e.object({label:e.string().optional(),aggregations:gk.optional()});});var lC,r7=n(()=>{b();cC();lC=e.object({content:e.record(e.string(),pC).optional()});});var mC,dC=n(()=>{b();mC=e.object({label:e.string().optional()});});var uC,gC=n(()=>{b();uC=e.object({groupSorting:e.property("group_sorting",e.list(e.string()).optional())});});var fC,hC=n(()=>{b();gC();fC=e.object({groupsDetails:e.property("groups_details",e.list(uC).optional())});});var yC,t7=n(()=>{b();dC();hC();yC=e.object({content:e.record(e.string(),mC).optional(),details:fC.optional()});});var bC,RC=n(()=>{b();bC=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xC,wC=n(()=>{b();xC=e.enum_(["general","tool","llm","guardrail"]);});var Os,rd=n(()=>{b();xt();Kr();wt();Ze();RC();wC();Os=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:xC.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Ke.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:bC.optional(),environment:e.string().optional()});});var _C,kC=n(()=>{b();_C=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var AC,PC=n(()=>{b();Nv();AC=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(Uv).optional()});});var zC,SC=n(()=>{b();zC=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var vC,TC=n(()=>{b();vC=e.enum_(["default","hidden"]);});var Ks,td=n(()=>{b();Sm();xt();Kr();kC();wt();PC();Ze();SC();TC();Ks=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Ke.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(ze).optional()),comments:e.list(he).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(AC).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",vC.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:_C.optional(),annotationQueues:e.property("annotation_queues",e.list(Xn).optional()),source:zC.optional(),environment:e.string().optional()});});var jC,CC=n(()=>{b();wt();Ze();rd();td();jC=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",me.optional()),trace:Ks.optional(),spans:e.list(Os).optional(),feedbackScores:e.property("feedback_scores",e.list(ze).optional())});});var gce,i7=n(()=>{b();CC();gce=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(jC)});});var EC,IC=n(()=>{b();EC=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var DC,UC=n(()=>{b();DC=e.enum_(["dataset","evaluation_suite"]);});var NC,FC=n(()=>{b();NC=e.enum_(["running","completed","cancelled","failed"]);});var BC,MC=n(()=>{b();BC=e.enum_(["regular","trial","mini-batch","mutation"]);});var WC,VC=n(()=>{b();WC=e.object({name:e.string(),value:e.number()});});var Qe,Ni=n(()=>{b();Qe=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Qs,id=n(()=>{b();Qs=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var $s,LC=n(()=>{b();UA();zs();qm();UC();FC();MC();VC();$n();Ni();id();Bl();$s=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),type:BC.optional(),evaluationMethod:e.property("evaluation_method",DC.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),comments:e.list(Vt).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Qs.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:NC.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(WC).optional()),promptVersion:e.property("prompt_version",Ai.optional()),promptVersions:e.property("prompt_versions",e.list(Ai).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Ms.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(DA).optional())});});var Ys,o7=n(()=>{b();LC();Ys=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list($s).optional(),sortableBy:e.list(e.string()).optional()});});var fce,a7=n(()=>{ne();fce=W;});var JC,GC=n(()=>{b();JC=e.object({max:e.number(),min:e.number()});});var HC,OC=n(()=>{b();GC();HC=e.object({details:JC.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var KC,hce,n7=n(()=>{b();DS();av();OC();KC=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),hce=e.union("type",{numerical:HC.extend(KC),categorical:ov.extend(KC),boolean:IS.extend(KC)}).transform({transform:p=>p,untransform:p=>p});});var QC,$C=n(()=>{b();QC=e.object({max:e.number(),min:e.number()});});var YC,XC=n(()=>{b();$C();YC=e.object({details:QC.optional()});});var ZC,qC,s7=n(()=>{b();BS();cv();XC();ZC=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),qC=e.union("type",{numerical:YC.extend(ZC),categorical:pv.extend(ZC),boolean:FS.extend(ZC)}).transform({transform:p=>p,untransform:p=>p});});var eE,rE=n(()=>{b();eE=e.object({max:e.number(),min:e.number()});});var Xs,od=n(()=>{b();rE();Xs=e.object({details:eE.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var tE,iE,oE=n(()=>{b();Hm();Om();od();tE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),iE=e.union("type",{numerical:Xs.extend(tE),categorical:Ps.extend(tE),boolean:As.extend(tE)}).transform({transform:p=>p,untransform:p=>p});});var aE,p7=n(()=>{b();oE();aE=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(iE).optional()});});var nE,sE,c7=n(()=>{b();Hm();Om();od();nE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),sE=e.union("type",{numerical:Xs.extend(nE),categorical:Ps.extend(nE),boolean:As.extend(nE)}).transform({transform:p=>p,untransform:p=>p});});var pE,cE=n(()=>{b();pE=e.object({name:e.string(),value:e.number()});});var lE,mE=n(()=>{b();lE=e.enum_(["ui","sdk","online_scoring"]);});var dE,uE=n(()=>{b();mE();dE=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:lE,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),id:e.string()});});var Zs,l7=n(()=>{b();uE();Zs=e.object({scores:e.list(dE)});});var gE,fE=n(()=>{b();gE=e.object({name:e.string().optional(),type:e.string().optional()});});var hE,m7=n(()=>{b();fE();hE=e.object({scores:e.list(gE).optional()});});var yE,bE=n(()=>{b();yE=e.object({name:e.string().optional(),type:e.string().optional()});});var Xr,d7=n(()=>{b();bE();Xr=e.object({scores:e.list(yE).optional()});});var RE,xE=n(()=>{b();RE=e.enum_(["ui","sdk","online_scoring"]);});var wE,_E=n(()=>{b();wE=e.enum_(["ui","sdk","online_scoring"]);});var kE,AE=n(()=>{b();_E();kE=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:wE.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var Fi,ad=n(()=>{b();xE();AE();Fi=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:RE,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),kE).optional())});});var PE,zE=n(()=>{b();PE=e.object({max:e.number(),min:e.number()});});var SE,vE=n(()=>{b();zE();SE=e.object({details:PE.optional()});});var TE,jE,u7=n(()=>{b();GS();fv();vE();TE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),jE=e.union("type",{numerical:SE.extend(TE),categorical:gv.extend(TE),boolean:JS.extend(TE)}).transform({transform:p=>p,untransform:p=>p});});var Bi,nd=n(()=>{b();Bi=e.object({accepted:e.boolean().optional()});});var CE,g7=n(()=>{b();CE=e.object({reportId:e.string().optional()});});var EE,IE=n(()=>{b();EE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var DE,UE=n(()=>{b();DE=e.enum_(["passed","failed"]);});var NE,FE=n(()=>{b();IE();UE();ne();NE=e.object({id:e.string().optional(),entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:EE,result:DE,config:W,details:W});});var yce,f7=n(()=>{b();FE();yce=e.object({guardrails:e.list(NE)});});var BE,ME=n(()=>{b();BE=e.enum_(["on_request","global"]);});var WE,VE=n(()=>{b();WE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var LE,JE=n(()=>{b();VE();ne();LE=e.object({type:WE,config:W});});var bce,h7=n(()=>{b();ME();JE();bce=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",BE.optional()),rules:e.list(LE),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var GE,HE=n(()=>{b();GE=e.enum_(["on_request","global"]);});var OE,KE=n(()=>{b();OE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var QE,$E=n(()=>{b();KE();ne();QE=e.object({type:OE,config:W});});var qs,YE=n(()=>{b();HE();$E();qs=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",GE.optional()),rules:e.list(QE),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var XE,y7=n(()=>{b();YE();XE=e.object({content:e.list(qs).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var ZE,qE=n(()=>{b();ZE=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var eI,rI=n(()=>{b();qE();ne();eI=e.object({type:ZE,config:W});});var tI,iI=n(()=>{b();tI=e.enum_(["on_request","global"]);});var sd,b7=n(()=>{b();rI();iI();sd=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",tI.optional()),rules:e.list(eI)});});var oI,aI=n(()=>{b();Lv();oI=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(Vv).optional()});});var nI,sI=n(()=>{b();nI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var pI,cI=n(()=>{b();ne();sI();pI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),type:nI,validationConfig:e.property("validation_config",W),validationDetails:e.property("validation_details",W),error:e.string().optional()});});var lI,R7=n(()=>{b();cI();lI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),validations:e.list(pI)});});var mI,dI=n(()=>{b();mI=e.object({activeLocks:e.property("active_locks",e.number().optional()),lockedBy:e.property("locked_by",e.list(e.string()).optional())});});var uI,gI=n(()=>{b();uI=e.enum_(["count","errors","avg_duration","total_cost"]);});var fI,hI=n(()=>{b();gI();fI=e.object({type:uI.optional(),currentValue:e.property("current_value",e.number().optional()),previousValue:e.property("previous_value",e.number().optional())});});var yI,x7=n(()=>{b();hI();yI=e.object({stats:e.list(fI).optional()});});var bI,RI=n(()=>{b();bI=e.enum_(["pairing","connected","disconnected"]);});var xI,wI=n(()=>{b();xI=e.enum_(["connect","endpoint"]);});var ep,_I=n(()=>{b();T_();ne();RI();wI();ep=e.object({id:e.string().optional(),name:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:bI.optional(),connectedAt:e.property("connected_at",e.date().optional()),agents:e.list(v_).optional(),capabilities:e.list(e.string()).optional(),checklist:W.optional(),type:xI.optional()});});var kI,w7=n(()=>{b();kI=e.object({cancelledJobIds:e.property("cancelled_job_ids",e.list(e.string()).optional())});});var AI,_7=n(()=>{b();em();AI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(zt).optional()});});var PI,k7=n(()=>{b();_I();PI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ep).optional()});});var zI,A7=n(()=>{b();zI=e.object({acquired:e.boolean().optional(),itemId:e.property("item_id",e.string().optional()),lockedBy:e.property("locked_by",e.string().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var SI,P7=n(()=>{b();dI();SI=e.object({locks:e.record(e.string(),mI).optional()});});var vI,TI=n(()=>{b();vI=e.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var jI,CI=n(()=>{b();TI();jI=e.object({timestamp:e.date().optional(),ruleId:e.property("rule_id",e.string().optional()),level:vI.optional(),message:e.string().optional(),markers:e.record(e.string(),e.string()).optional()});});var EI,z7=n(()=>{b();CI();EI=e.object({content:e.list(jI).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var II,DI=n(()=>{b();II=e.enum_(["trace","thread","span"]);});var rp,S7=n(()=>{b();DI();rp=e.object({projectId:e.property("project_id",e.string()),entityIds:e.property("entity_ids",e.list(e.string())),ruleIds:e.property("rule_ids",e.list(e.string())),entityType:e.property("entity_type",II)});});var tp,v7=n(()=>{b();tp=e.object({entitiesQueued:e.property("entities_queued",e.number().optional()),rulesApplied:e.property("rules_applied",e.number().optional())});});var Zr,UI=n(()=>{b();Zr=e.object({accepted:e.boolean().optional(),min:e.number().optional(),max:e.number().optional(),default:e.number().optional()});});var NI,FI=n(()=>{b();NI=e.enum_(["effortNoneOnly","refused"]);});var BI,MI=n(()=>{b();nd();FI();BI=e.object({chatCompletions:NI.optional(),forcedChoice:Bi.optional()});});var Ea,T7=n(()=>{b();ie();Kj();nd();UI();MI();Ea=e.object({temperature:Zr.optional(),topP:Zr.optional(),topK:Zr.optional(),frequencyPenalty:Zr.optional(),presencePenalty:Zr.optional(),maxOutputTokens:Zr.optional(),stop:Bi.optional(),seed:Bi.optional(),effort:Oj.optional(),tools:BI.optional(),samplingExclusive:e.boolean().optional(),thinksByDefault:e.boolean().optional(),onlyRoute:e.string().optional(),routes:e.record(e.string(),e.lazyObject(()=>Ea)).optional()});});var Rce,j7=n(()=>{b();Rce=e.object({error:e.string().optional(),errorDescription:e.property("error_description",e.string().optional())});});var pd,C7=n(()=>{b();pd=e.object({connected:e.boolean().optional(),version:e.string().optional(),errorMessage:e.property("error_message",e.string().optional())});});var cd,E7=n(()=>{b();cd=e.object({baseUrl:e.property("base_url",e.string()),apiKey:e.property("api_key",e.string().optional())});});var WI,VI=n(()=>{b();WI=e.enum_(["pending","completed","failed"]);});var LI,JI=n(()=>{b();ne();VI();LI=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sessionId:e.property("session_id",e.string().optional()),content:e.string().optional(),recommendedActions:e.property("recommended_actions",W.optional()),status:WI.optional(),failureReason:e.property("failure_reason",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var GI,I7=n(()=>{b();JI();GI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(LI).optional()});});var HI,OI=n(()=>{b();HI=e.enum_(["running","completed","cancelled","initialized","error"]);});var KI,QI=n(()=>{b();ne();KI=e.object({type:e.string(),parameters:W.optional()});});var $I,YI=n(()=>{b();QI();$I=e.object({metrics:e.list(KI)});});var XI,ZI=n(()=>{b();ne();XI=e.object({model:e.string(),parameters:W.optional()});});var qI,eD=n(()=>{b();ne();qI=e.object({type:e.string(),parameters:W.optional()});});var rD,tD=n(()=>{b();rD=e.object({role:e.string(),content:e.string()});});var iD,oD=n(()=>{b();tD();iD=e.object({messages:e.list(rD)});});var aD,nD=n(()=>{b();YI();ZI();eD();oD();aD=e.object({datasetName:e.property("dataset_name",e.string()),prompt:iD,llmModel:e.property("llm_model",XI),evaluation:$I,optimizer:qI});});var xce,D7=n(()=>{b();Kr();Qr();Ze();OI();nD();xce=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:HI,metadata:me.optional(),studioConfig:e.property("studio_config",aD.optional()),errorInfo:e.property("error_info",Ke.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),experimentScores:e.property("experiment_scores",e.list(je).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var sD,pD=n(()=>{b();sD=e.enum_(["running","completed","cancelled","initialized","error"]);});var cD,lD=n(()=>{b();yr();cD=e.object({type:e.string(),parameters:ke.optional()});});var mD,dD=n(()=>{b();lD();mD=e.object({metrics:e.list(cD)});});var uD,gD=n(()=>{b();yr();uD=e.object({model:e.string(),parameters:ke.optional()});});var fD,hD=n(()=>{b();yr();fD=e.object({type:e.string(),parameters:ke.optional()});});var yD,bD=n(()=>{b();yD=e.object({role:e.string(),content:e.string()});});var RD,xD=n(()=>{b();bD();RD=e.object({messages:e.list(yD)});});var wD,_D=n(()=>{b();dD();gD();hD();xD();wD=e.object({datasetName:e.property("dataset_name",e.string()),prompt:RD,llmModel:e.property("llm_model",uD),evaluation:mD,optimizer:fD});});var ip,kD=n(()=>{b();Gs();$n();Ni();pD();_D();ip=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:sD,metadata:Qe.optional(),studioConfig:e.property("studio_config",wD.optional()),errorInfo:e.property("error_info",Jt.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),experimentScores:e.property("experiment_scores",e.list(Yr).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var op,U7=n(()=>{b();kD();op=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ip).optional(),sortableBy:e.list(e.string()).optional()});});var AD,PD=n(()=>{b();zr();AD=e.object({type:e.string(),parameters:Te.optional()});});var zD,SD=n(()=>{b();PD();zD=e.object({metrics:e.list(AD)});});var vD,TD=n(()=>{b();zr();vD=e.object({model:e.string(),parameters:Te.optional()});});var jD,CD=n(()=>{b();zr();jD=e.object({type:e.string(),parameters:Te.optional()});});var ED,ID=n(()=>{b();ED=e.object({role:e.string(),content:e.string()});});var DD,UD=n(()=>{b();ID();DD=e.object({messages:e.list(ED)});});var ND,FD=n(()=>{b();SD();TD();CD();UD();ND=e.object({datasetName:e.property("dataset_name",e.string()),prompt:DD,llmModel:e.property("llm_model",vD),evaluation:zD,optimizer:jD});});var BD,N7=n(()=>{b();BD=e.object({url:e.string().optional(),lastModified:e.property("last_modified",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var MD,WD=n(()=>{b();MD=e.enum_(["running","completed","cancelled","initialized","error"]);});var ld,F7=n(()=>{b();bn();xi();FD();WD();ld=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:MD,metadata:Oe.optional(),studioConfig:e.property("studio_config",ND.optional()),errorInfo:e.property("error_info",St.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var VD,B7=n(()=>{b();Xv();VD=e.object({columns:e.list(Yv).optional()});});var LD,JD=n(()=>{b();id();LD=e.object({value:Qs.optional()});});var GD,HD=n(()=>{b();GD=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var OD,KD=n(()=>{b();OD=e.object({permissionName:e.string().optional(),permissionValue:e.string().optional()});});var QD,$D=n(()=>{b();QD=e.enum_(["private","public"]);});var wce,M7=n(()=>{b();ed();Qr();zi();$D();wce=e.object({id:e.string().optional(),name:e.string(),visibility:QD.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Js.optional())});});var YD,XD=n(()=>{b();YD=e.enum_(["private","public"]);});var ZD,W7=n(()=>{b();Xj();cE();HD();XD();ZD=e.object({id:e.string().optional(),name:e.string(),visibility:YD.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(pE).optional()),duration:GD.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Yj.optional())});});var qD,eU=n(()=>{b();qD=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var rU,tU=n(()=>{b();rU=e.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 iU,oU=n(()=>{b();vT();iU=e.object({name:e.string().optional(),data:e.list(ST).optional()});});var aU,V7=n(()=>{b();eU();tU();oU();aU=e.object({projectId:e.property("project_id",e.string().optional()),metricType:e.property("metric_type",rU.optional()),interval:qD.optional(),results:e.list(iU).optional()});});var nU,sU=n(()=>{b();nU=e.enum_(["private","public"]);});var ap,pU=n(()=>{b();sU();ap=e.object({id:e.string().optional(),name:e.string(),visibility:nU.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional())});});var cU,L7=n(()=>{b();pU();cU=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ap).optional(),sortableBy:e.list(e.string()).optional()});});var lU,mU,dU=n(()=>{b();SS();gT();JD();lU=e.object({name:e.string().optional()}),mU=e.union("type",{PERCENTAGE:LD.extend(lU),COUNT:uT.extend(lU),AVG:zS.extend(lU)}).transform({transform:p=>p,untransform:p=>p});});var qr,J7=n(()=>{b();dU();qr=e.object({stats:e.list(mU).optional()});});var uU,gU=n(()=>{b();ed();Qr();zi();uU=e.object({projectId:e.property("project_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(je).optional()),duration:Tr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Js.optional())});});var fU,G7=n(()=>{b();gU();fU=e.object({content:e.list(uU).optional()});});var hU,yU=n(()=>{b();hU=e.enum_(["text","chat"]);});var bU,RU=n(()=>{b();bU=e.enum_(["mustache","jinja2","python"]);});var xU,wU=n(()=>{b();xU=e.enum_(["text","chat"]);});var _U,kU=n(()=>{b();_U=e.enum_(["mustache","jinja2","python"]);});var AU,PU=n(()=>{b();AU=e.enum_(["prompt_version","mask"]);});var md,zU=n(()=>{b();ne();wU();kU();PU();md=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:W.optional(),type:_U.optional(),versionType:e.property("version_type",AU.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",xU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var _ce,H7=n(()=>{b();ne();yU();RU();zU();_ce=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:W.optional(),changeDescription:e.property("change_description",e.string().optional()),type:bU.optional(),templateStructure:e.property("template_structure",hU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",md.optional()),requestedVersion:e.property("requested_version",md.optional())});});var SU,vU=n(()=>{b();SU=e.enum_(["text","chat"]);});var dd,O7=n(()=>{b();vU();Ya();dd=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",SU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",Fe.optional()),requestedVersion:e.property("requested_version",Fe.optional())});});var TU,jU=n(()=>{b();TU=e.enum_(["text","chat"]);});var CU,EU=n(()=>{b();jU();CU=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",TU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional())});});var np,K7=n(()=>{b();EU();np=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(CU).optional(),sortableBy:e.list(e.string()).optional()});});var IU,DU=n(()=>{b();IU=e.enum_(["text","chat"]);});var UU,NU=n(()=>{b();UU=e.enum_(["mustache","jinja2","python"]);});var FU,BU=n(()=>{b();FU=e.enum_(["prompt_version","mask"]);});var MU,WU=n(()=>{b();yr();DU();NU();BU();MU=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:ke.optional(),type:UU.optional(),versionType:e.property("version_type",FU.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),templateStructure:e.property("template_structure",IU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var VU,Q7=n(()=>{b();WU();VU=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(MU).optional(),sortableBy:e.list(e.string()).optional()});});var LU,JU=n(()=>{b();LU=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var kce,$7=n(()=>{b();JU();Ia();kce=e.object({id:e.string().optional(),provider:LU,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",kt.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var GU,HU=n(()=>{b();GU=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var OU,KU=n(()=>{b();OU=e.enum_(["form","json","basic"]);});var QU,$U=n(()=>{b();yT();KU();QU=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",OU.optional()),credentials:e.list(hT).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var sp,YU=n(()=>{b();HU();$U();sp=e.object({id:e.string().optional(),provider:GU,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",QU.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var XU,Y7=n(()=>{b();YU();XU=e.object({size:e.number().optional(),total:e.number().optional(),content:e.list(sp).optional(),sortableBy:e.list(e.string()).optional()});});var ZU,qU=n(()=>{b();ZU=e.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var eN,rN=n(()=>{b();qU();eN=e.object({type:ZU.optional(),id:e.string().optional(),name:e.string().optional(),resourceId:e.property("resource_id",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional())});});var tN,X7=n(()=>{b();rN();tN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(eN).optional()});});var iN,oN=n(()=>{b();iN=e.enum_(["agent_insights"]);});var pp,aN=n(()=>{b();oN();pp=e.object({id:e.string().optional(),type:iN,projectId:e.property("project_id",e.string()),reason:e.string(),detail:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var nN,Z7=n(()=>{b();aN();nN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(pp).optional()});});var cp,q7=n(()=>{b();cp=e.object({projectId:e.property("project_id",e.string().optional()),enabled:e.boolean().optional(),scheduleTime:e.property("schedule_time",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var sN,eq=n(()=>{b();sN=e.object({enrolled:e.number().optional(),cleared:e.number().optional(),unknownProjectIds:e.property("unknown_project_ids",e.list(e.string()).optional()),alreadyRunProjectIds:e.property("already_run_project_ids",e.list(e.string()).optional()),resetProjectIds:e.property("reset_project_ids",e.list(e.string()).optional())});});var Er,ud=n(()=>{b();Er=e.object({name:e.string().optional(),current:e.number().optional(),previous:e.number().optional()});});var pN,cN=n(()=>{b();pN=e.enum_(["organization","workspace","project"]);});var lN,mN=n(()=>{b();lN=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Mi,dN=n(()=>{b();cN();mN();Mi=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),level:pN.optional(),retention:lN,applyToPast:e.property("apply_to_past",e.boolean().optional()),enabled:e.boolean().optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),catchUpCursor:e.property("catch_up_cursor",e.string().optional()),catchUpDone:e.property("catch_up_done",e.boolean().optional())});});var uN,rq=n(()=>{b();dN();uN=e.object({content:e.list(Mi).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var gN,tq=n(()=>{b();gN=e.object({pythonEvaluatorEnabled:e.boolean(),traceThreadPythonEvaluatorEnabled:e.boolean(),spanLlmAsJudgeEnabled:e.boolean(),spanUserDefinedMetricPythonEnabled:e.boolean(),guardrailsEnabled:e.boolean(),guardrailsValidationsEnabled:e.boolean(),opikAiEnabled:e.property("opikAIEnabled",e.boolean()),alertsEnabled:e.boolean(),welcomeWizardEnabled:e.boolean(),exportEnabled:e.boolean(),costIntelligenceEnabled:e.boolean(),modelPricesEnabled:e.boolean(),datasetVersioningEnabled:e.boolean(),datasetExportEnabled:e.boolean(),demoDataEnabled:e.boolean(),openaiProviderEnabled:e.boolean(),anthropicProviderEnabled:e.boolean(),geminiProviderEnabled:e.boolean(),openrouterProviderEnabled:e.boolean(),vertexaiProviderEnabled:e.boolean(),bedrockProviderEnabled:e.boolean(),customllmProviderEnabled:e.boolean(),ollamaProviderEnabled:e.boolean(),ollieEnabled:e.boolean(),agentInsightsEnabled:e.boolean(),agentInsightsGuidanceEnabled:e.boolean(),projectHomepageEnabled:e.boolean(),annotationQueueAutomationEnabled:e.boolean(),eventBridgeAlertsEnabled:e.boolean(),defaultPageSize:e.number().optional(),customChartsEnabledForWorkspace:e.boolean().optional()});});var Ace,iq=n(()=>{b();rd();Ace=e.object({spans:e.list(Os)});});var fN,hN=n(()=>{b();fN=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var yN,bN=n(()=>{b();yN=e.enum_(["general","tool","llm","guardrail"]);});var lp,RN=n(()=>{b();zs();Gs();ad();Ni();hN();bN();lp=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:yN.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Jt.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Fi).optional()),comments:e.list(Vt).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:fN.optional(),environment:e.string().optional()});});var xN,oq=n(()=>{b();RN();xN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(lp).optional(),sortableBy:e.list(e.string()).optional()});});var wN,_N=n(()=>{b();wN=e.object({workspace:e.string().optional(),spanCount:e.property("span_count",e.number().optional())});});var kN,aq=n(()=>{b();_N();kN=e.object({workspacesSpansCount:e.property("workspaces_spans_count",e.list(wN).optional())});});var AN,nq=n(()=>{b();AN=e.object({uploadId:e.property("upload_id",e.string()),preSignUrls:e.property("pre_sign_urls",e.list(e.string()))});});var PN,sq=n(()=>{b();PN=e.object({accessToken:e.property("access_token",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional()),tokenType:e.property("token_type",e.string().optional()),expiresIn:e.property("expires_in",e.number().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional())});});var mp,pq=n(()=>{b();mp=e.object({names:e.list(e.string()).optional()});});var Pce,cq=n(()=>{b();td();Pce=e.object({traces:e.list(Ks)});});var zN,SN=n(()=>{b();zN=e.object({workspace:e.string().optional(),traceCount:e.property("trace_count",e.number().optional())});});var vN,lq=n(()=>{b();SN();vN=e.object({workspacesTracesCount:e.property("workspaces_traces_count",e.list(zN).optional())});});var TN,jN=n(()=>{b();TN=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var CN,EN=n(()=>{b();CN=e.enum_(["default","hidden"]);});var dp,IN=n(()=>{b();TA();zs();Gs();IC();ad();aI();Ni();jN();EN();dp=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Jt.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Fi).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(Fi).optional()),comments:e.list(Vt).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(oI).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",CN.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:EC.optional(),annotationQueues:e.property("annotation_queues",e.list(vA).optional()),source:TN.optional(),environment:e.string().optional()});});var DN,mq=n(()=>{b();IN();DN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(dp).optional(),sortableBy:e.list(e.string()).optional()});});var UN,NN=n(()=>{b();UN=e.enum_(["active","inactive"]);});var up,FN=n(()=>{b();Sm();xt();wt();Ze();NN();up=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),threadModelId:e.property("thread_model_id",e.string().optional()),startTime:e.property("start_time",e.date().optional()),endTime:e.property("end_time",e.date().optional()),duration:e.number().optional(),firstMessage:e.property("first_message",me.optional()),lastMessage:e.property("last_message",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ze).optional()),status:UN.optional(),numberOfMessages:e.property("number_of_messages",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),comments:e.list(he).optional(),tags:e.list(e.string()).optional(),annotationQueues:e.property("annotation_queues",e.list(Xn).optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),environment:e.string().optional()});});var gd,dq=n(()=>{b();gd=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string()),truncate:e.boolean().optional()});});var BN,uq=n(()=>{b();FN();BN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(up).optional(),sortableBy:e.list(e.string()).optional()});});var MN,WN=n(()=>{b();MN=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var VN,gq=n(()=>{b();WN();VN=e.object({breakdown:e.list(MN).optional()});});var LN,JN=n(()=>{b();LN=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional()});});var GN,fq=n(()=>{b();JN();GN=e.object({projects:e.list(LN).optional()});});var HN,hq=n(()=>{b();HN=e.object({userName:e.property("user_name",e.string().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),resource:e.string().optional(),expiresAt:e.property("expires_at",e.date().optional())});});var ON,KN=n(()=>{b();ON=e.enum_(["widget"]);});var QN,$N=n(()=>{b();QN=e.enum_(["user","ollie","agent"]);});var YN,XN=n(()=>{b();YN=e.enum_(["html"]);});var Wi,ZN=n(()=>{b();Bn();$N();XN();Wi=e.object({viewId:e.property("view_id",e.string().optional()),version:e.number().optional(),author:QN.optional(),summary:e.string().optional(),type:YN.optional(),engineVersion:e.property("engine_version",e.number().optional()),inputs:e.record(e.string(),Tt).optional(),libraries:e.list(e.string()).optional(),html:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Vi,yq=n(()=>{b();KN();ZN();Vi=e.object({id:e.string().optional(),area:ON.optional(),name:e.string().optional(),description:e.string().optional(),currentVersion:e.property("current_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),version:Wi.optional()});});var qN,eF=n(()=>{b();qN=e.enum_(["user","ollie","agent"]);});var rF,tF=n(()=>{b();eF();rF=e.object({version:e.number().optional(),author:qN.optional(),summary:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var iF,bq=n(()=>{b();tF();iF=e.object({content:e.list(rF).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var oF,Rq=n(()=>{b();oF=e.object({responseExamples:e.property("response_examples",e.record(e.string(),e.record(e.string(),e.unknown())).optional())});});var aF,nF=n(()=>{b();aF=e.enum_(["success","failure"]);});var sF,xq=n(()=>{b();nF();sF=e.object({status:aF.optional(),statusCode:e.property("status_code",e.number().optional()),requestBody:e.property("request_body",e.string().optional()),errorMessage:e.property("error_message",e.string().optional())});});var pF,wq=n(()=>{b();pF=e.object({completed:e.boolean().optional()});});var gp,_q=n(()=>{b();gp=e.object({timeoutToMarkThreadAsInactive:e.property("timeout_to_mark_thread_as_inactive",e.string().optional()),truncationOnTables:e.property("truncation_on_tables",e.boolean().optional()),colorMap:e.property("color_map",e.record(e.string(),e.string()).optional())});});var zce,kq=n(()=>{b();zce=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var fp,Aq=n(()=>{b();ud();fp=e.object({results:e.list(Er).optional()});});var Li,Pq=n(()=>{b();Li=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var cF,zq=n(()=>{b();ud();cF=e.object({results:e.list(Er).optional()});});var lF,Sq=n(()=>{b();lF=e.object({workspaceName:e.property("workspace_name",e.string().optional())});});var mF,vq=n(()=>{b();KD();mF=e.object({userName:e.string().optional(),workspaceName:e.string().optional(),permissions:e.list(OD).optional()});});var Tq=n(()=>{T_();F_();C_();G8();M_();X_();H_();H8();wy();U_();I_();J_();V_();$_();K_();ik();ak();O8();q_();rk();K8();pk();lk();Q8();uk();fk();$8();yk();Y8();Wk();Tk();Pk();wk();Ik();Ck();Rk();Gk();Lk();kk();Fk();Uk();Qk();Ok();X8();Yk();Z8();oA();Wc();nA();Ny();Vc();hA();Oy();q8();eZ();xA();bA();rZ();tZ();zA();kA();Sm();TA();eA();PA();tA();$y();Qy();DR();lb();nb();pb();CA();IA();UA();VA();FA();JA();iZ();OA();QA();YA();oZ();aZ();nZ();sZ();iP();RP();Um();mz();Sz();uz();fz();pZ();cZ();jz();Ez();wP();Fm();Mz();kP();Bm();Jz();PP();Mm();$z();SP();Wm();qz();TP();lZ();rS();iS();aS();sS();cS();mS();uS();fS();CP();Vm();xS();mZ();_S();AS();SS();dZ();TS();uZ();gZ();DS();BS();Hm();GS();ES();NS();WS();LS();y_();f_();Bx();Nx();fZ();hZ();qS();XS();OS();yZ();QS();av();cv();Om();fv();iv();sv();mv();uv();kv();bZ();Nv();Ev();Lv();Bv();Wv();Dv();RZ();xZ();Ov();Gv();wZ();Xv();rT();qv();aT();iT();$v();xt();sT();zs();_Z();cT();Pv();rb();dA();Ly();ib();gA();Gy();kZ();gT();AZ();ux();yT();yx();PZ();_T();RT();wT();zZ();SZ();AT();vZ();TZ();zT();jZ();vT();CZ();EZ();IZ();iR();tR();$m();DZ();UZ();yj();GT();qc();Mb();NZ();FZ();jj();xj();NT();Vb();Yb();Jb();BZ();Bj();Ij();Uj();Fj();jT();ET();MZ();Wj();WZ();Lj();Qm();qm();DT();VZ();Hj();LZ();JZ();yv();Kj();GZ();HZ();Qj();ed();Xj();Kr();sl();Gs();bn();OZ();KZ();QZ();$Z();YZ();XZ();yi();YT();OT();Xm();_j();Ib();Kb();Hb();Rt();Ym();Zm();$b();ZZ();qZ();eC();e7();r7();t7();nC();pl();CC();ER();i7();mj();ZT();ej();Pj();Aj();kC();IC();NR();BR();o7();LC();UC();FC();MC();WT();fj();uj();Tj();Sj();BT();nl();VC();OR();tC();oC();lR();sR();cR();a7();n7();s7();p7();oE();c7();wt();Qr();cE();$n();l7();uE();mE();Hw();Jw();pj();tj();xR();gR();m7();d7();ad();xE();WR();u7();nd();Yc();hi();g7();dC();cC();gC();hC();FE();f7();IE();h7();ME();y7();YE();HE();JE();$E();KE();VE();rI();qE();b7();iI();UE();PC();aI();R7();nx();tx();ox();aP();UP();$P();dI();Ze();cj();xa();Ni();xi();ne();QT();Zx();yr();zr();xb();x7();hI();gI();Tm();KP();sz();qn();cP();MP();qP();ps();VP();mP();ds();rz();es();uP();cs();JP();us();iz();rs();ls();HP();fP();gs();az();_I();w7();em();$l();_7();Aw();Xl();k7();RI();wI();A7();P7();CI();TI();z7();Rv();wv();S7();DI();v7();Xc();T7();mT();UI();OC();XC();od();vE();GC();$C();rE();zE();j7();C7();E7();Sx();JI();I7();VI();D7();U7();kD();pD();OI();nD();_D();FD();N7();F7();WD();B7();S_();P_();JD();zi();HD();id();KD();M7();W7();XD();V7();eU();tU();L7();pU();sU();IP();Lm();dU();J7();G7();gU();$D();H7();bb();O7();vU();K7();EU();jU();yU();Sv();RU();dR();zU();Ya();ew();tw();ow();ba();Bl();KR();Q7();WU();DU();NU();BU();wU();kU();sw();PU();$7();Y7();JU();YU();HU();Ia();$U();KU();fx();wx();Rx();rN();qU();X7();Sy();Py();aN();Z7();oN();q7();eq();Ab();_b();ud();oU();rq();dN();cN();mN();qy();Xy();lA();pA();Wy();By();fE();bE();tq();rd();iq();Ub();zR();_R();AR();jt();R_();_i();Wx();Jm();Uz();jm();yz();Fz();oq();RN();hN();bN();RC();aq();wC();jw();Sw();Tw();Cm();Rz();Vz();Uw();Ew();Dw();nq();zb();YI();dD();SD();ZI();gD();TD();tD();bD();ID();QI();lD();PD();eD();hD();CD();oD();xD();UD();sq();pq();jb();vm();MA();MI();FI();vb();td();cq();lq();Fb();jR();vR();Si();yP();ki();Lx();Nm();cz();mq();IN();jN();EN();SC();FN();vt();r_();Ha();Gx();Gm();Hz();dq();Em();wz();Kz();uq();NN();qw();Im();kz();Xz();Qw();Kw();TC();Xw();Yw();Tv();gq();fq();Dm();Pz();bS();hq();lx();px();cI();sI();GR();nj();oj();bR();hR();AE();_E();LR();sP();FP();XP();yq();KN();Bn();a_();ZN();$N();bq();tF();eF();XN();Sk();Rq();Mk();xq();nF();Zk();wq();_q();eP();kq();Aq();Pq();zq();Sq();JN();WN();_N();SN();vq();});var G={};L(G,{ActivateRequest:()=>La,Agent:()=>v_,AgentBlueprintHistory:()=>N_,AgentBlueprintHistoryType:()=>j_,AgentBlueprintPublic:()=>Ct,AgentBlueprintPublicType:()=>B_,AgentBlueprintWrite:()=>Y_,AgentBlueprintWriteType:()=>G_,AgentConfigCreateWrite:()=>Pm,AgentConfigEnv:()=>xy,AgentConfigEnvSetByName:()=>jo,AgentConfigEnvUpdate:()=>Co,AgentConfigRemoveValues:()=>Eo,AgentConfigValueHistory:()=>D_,AgentConfigValueHistoryType:()=>E_,AgentConfigValuePublic:()=>L_,AgentConfigValuePublicType:()=>W_,AgentConfigValueWrite:()=>Q_,AgentConfigValueWriteType:()=>O_,AgentInsightsGuidanceUpdate:()=>No,AgentInsightsIssue:()=>tk,AgentInsightsIssueDetail:()=>ok,AgentInsightsIssuePage:()=>nk,AgentInsightsIssueSeverity:()=>Z_,AgentInsightsIssueStatus:()=>ek,AgentInsightsIssueUpdate:()=>Io,AgentInsightsIssueUpdateStatus:()=>Cc,AgentInsightsIssueWithDetails:()=>mk,AgentInsightsIssueWithDetailsSeverity:()=>sk,AgentInsightsIssueWithDetailsStatus:()=>ck,AgentInsightsJob:()=>Pi,AgentInsightsJobStatus:()=>dk,AgentInsightsJobUpdate:()=>Fo,AgentInsightsJobUpdateStatus:()=>Nc,AgentInsightsReport:()=>Do,AggregationData:()=>gk,Alert:()=>Xpe,AlertAlertType:()=>hk,AlertPagePublic:()=>Kn,AlertPublic:()=>On,AlertPublicAlertType:()=>vk,AlertTrigger:()=>Ak,AlertTriggerConfig:()=>xk,AlertTriggerConfigPublic:()=>Ek,AlertTriggerConfigPublicType:()=>jk,AlertTriggerConfigType:()=>bk,AlertTriggerConfigWrite:()=>Jk,AlertTriggerConfigWriteType:()=>Vk,AlertTriggerEventType:()=>_k,AlertTriggerPublic:()=>Nk,AlertTriggerPublicEventType:()=>Dk,AlertTriggerWrite:()=>Kk,AlertTriggerWriteEventType:()=>Hk,AlertWrite:()=>Qn,AlertWriteAlertType:()=>$k,AnalyticsQueryRequest:()=>_n,AnalyticsQueryResponse:()=>$r,AnnotationQueue:()=>iA,AnnotationQueueAnnotatorView:()=>Vo,AnnotationQueueAnnotatorViewPublic:()=>aA,AnnotationQueueAnnotatorViewWrite:()=>Uy,AnnotationQueueAutomation:()=>Lo,AnnotationQueueAutomationPublic:()=>fA,AnnotationQueueAutomationWrite:()=>Hy,AnnotationQueueBatch:()=>Zpe,AnnotationQueueBatchWrite:()=>Mo,AnnotationQueueItemIds:()=>zm,AnnotationQueueItemIdsPublic:()=>Wo,AnnotationQueueItemPublic:()=>RA,AnnotationQueueItemPublicSource:()=>yA,AnnotationQueueItemsPublic:()=>wA,AnnotationQueuePagePublic:()=>SA,AnnotationQueuePublic:()=>Yn,AnnotationQueuePublicScope:()=>_A,AnnotationQueueReference:()=>Xn,AnnotationQueueReferencePublic:()=>vA,AnnotationQueueReviewer:()=>qk,AnnotationQueueReviewerPublic:()=>AA,AnnotationQueueScope:()=>rA,AnnotationQueueUpdate:()=>Jo,AnnotationQueueWrite:()=>Bo,AnnotationQueueWriteScope:()=>Ky,AssertionResult:()=>IR,AssertionResultBatch:()=>Go,AssertionResultBatchEntityType:()=>Jc,AssertionResultBatchItem:()=>cb,AssertionResultBatchItemSource:()=>ab,AssertionResultBatchItemStatus:()=>sb,AssertionResultCompare:()=>jA,AssertionScoreAverage:()=>EA,AssertionScoreAveragePublic:()=>DA,AssistantMessage:()=>WA,AssistantMessageRole:()=>NA,Attachment:()=>LA,AttachmentListRequestEntityType:()=>Kc,AttachmentPage:()=>GA,AudioUrl:()=>HA,AudioUrlPublic:()=>KA,AudioUrlWrite:()=>$A,AuthDetailsHolder:()=>XA,AuthorizationServerMetadata:()=>ZA,AuthorizeContext:()=>rP,AutomationRuleEvaluator:()=>qpe,AutomationRuleEvaluatorAction:()=>tP,AutomationRuleEvaluatorLlmAsJudge:()=>bP,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ms,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>lz,AutomationRuleEvaluatorObjectObjectPublic:()=>zz,AutomationRuleEvaluatorObjectObjectPublicAction:()=>dz,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>gz,AutomationRuleEvaluatorPagePublic:()=>vz,AutomationRuleEvaluatorPublic:()=>Iz,AutomationRuleEvaluatorPublicAction:()=>Tz,AutomationRuleEvaluatorPublicTriggerScope:()=>Cz,AutomationRuleEvaluatorSpanLlmAsJudge:()=>xP,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>hs,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>Bz,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>_P,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>ys,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Lz,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>AP,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>bs,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Qz,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>zP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Rs,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Zz,AutomationRuleEvaluatorTriggerScope:()=>vP,AutomationRuleEvaluatorUpdate:()=>hS,AutomationRuleEvaluatorUpdateAction:()=>eS,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>tS,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>oS,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>nS,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>pS,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>lS,AutomationRuleEvaluatorUpdateTriggerScope:()=>dS,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>gS,AutomationRuleEvaluatorUserDefinedMetricPython:()=>jP,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>xs,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>RS,AutomationRuleEvaluatorWrite:()=>PS,AutomationRuleEvaluatorWriteAction:()=>wS,AutomationRuleEvaluatorWriteTriggerScope:()=>kS,AvgValueStatPublic:()=>zS,BatchDelete:()=>ue,BatchDeleteByProject:()=>Pn,BiInformation:()=>vS,BiInformationResponse:()=>Ii,BlueprintPageHistory:()=>jS,BooleanFeedbackDefinition:()=>IS,BooleanFeedbackDefinitionCreate:()=>FS,BooleanFeedbackDefinitionPublic:()=>As,BooleanFeedbackDefinitionUpdate:()=>JS,BooleanFeedbackDetail:()=>CS,BooleanFeedbackDetailCreate:()=>US,BooleanFeedbackDetailPublic:()=>MS,BooleanFeedbackDetailUpdate:()=>VS,BreakdownConfig:()=>h_,BreakdownConfigField:()=>g_,BreakdownConfigPublic:()=>Fx,BreakdownConfigPublicField:()=>Ux,BridgeCommand:()=>$S,BridgeCommandBatchResponse:()=>ev,BridgeCommandItem:()=>ZS,BridgeCommandItemType:()=>YS,BridgeCommandNextRequest:()=>pn,BridgeCommandResultRequest:()=>cn,BridgeCommandResultRequestStatus:()=>Kl,BridgeCommandStatus:()=>HS,BridgeCommandSubmitRequest:()=>ln,BridgeCommandSubmitRequestType:()=>Ql,BridgeCommandSubmitResponse:()=>rv,BridgeCommandType:()=>KS,CategoricalFeedbackDefinition:()=>ov,CategoricalFeedbackDefinitionCreate:()=>pv,CategoricalFeedbackDefinitionPublic:()=>Ps,CategoricalFeedbackDefinitionUpdate:()=>gv,CategoricalFeedbackDetail:()=>tv,CategoricalFeedbackDetailCreate:()=>nv,CategoricalFeedbackDetailPublic:()=>lv,CategoricalFeedbackDetailUpdate:()=>dv,ChatCompletionChoice:()=>_v,ChatCompletionRequest:()=>Qo,ChatCompletionResponse:()=>jv,Check:()=>Uv,CheckName:()=>Cv,CheckPublic:()=>Vv,CheckPublicName:()=>Fv,CheckPublicResult:()=>Mv,CheckResult:()=>Iv,ChunkedOutputJsonNode:()=>ece,ChunkedOutputJsonNodePublic:()=>rce,ChunkedOutputJsonNodePublicType:()=>Hv,ChunkedOutputJsonNodeType:()=>Jv,ClientRegistrationRequest:()=>Fa,ClientRegistrationResponse:()=>Kv,Column:()=>Yv,ColumnCompare:()=>eT,ColumnCompareTypesItem:()=>Zv,ColumnPublic:()=>oT,ColumnPublicTypesItem:()=>tT,ColumnTypesItem:()=>Qv,Comment:()=>he,CommentCompare:()=>nT,CommentPublic:()=>Vt,CompleteMultipartUploadRequest:()=>Km,CompleteMultipartUploadRequestEntityType:()=>pT,CompletionTokensDetails:()=>Av,ConditionGroup:()=>eb,ConditionGroupPublic:()=>mA,ConditionGroupWrite:()=>Vy,Conditions:()=>tb,ConditionsPublic:()=>uA,ConditionsWrite:()=>Jy,ConsentRequest:()=>Ba,ConsentResponse:()=>dT,CountValueStatPublic:()=>uT,CreateDatasetItemsFromJsonRequestFormat:()=>ol,CreateDatasetItemsFromSpansRequest:()=>$o,CreateDatasetItemsFromTracesRequest:()=>Yo,CreateLocalRunnerJobRequest:()=>dn,CreatePromptVersionDetail:()=>Xa,CreatePromptVersionDetailTemplateStructure:()=>Ul,CreateSessionRequest:()=>Ja,CreateSessionRequestType:()=>Sl,CreateSessionResponse:()=>fT,Credential:()=>dx,CredentialPublic:()=>hT,CredentialWrite:()=>hx,DashboardPagePublic:()=>Lt,DashboardPublic:()=>nr,DashboardPublicScope:()=>bT,DashboardPublicType:()=>xT,DashboardSavedQuery:()=>Ss,DashboardUpdatePublic:()=>vs,DashboardUpdatePublicType:()=>kT,DashboardWidgetQueryRequest:()=>Ts,DashboardWrite:()=>js,DashboardWriteType:()=>PT,DataPointDouble:()=>tce,DataPointNumberPublic:()=>ST,Dataset:()=>ice,DatasetExpansion:()=>oce,DatasetExpansionResponse:()=>VT,DatasetExpansionWrite:()=>Xo,DatasetExperimentItemStreamRequest:()=>Zo,DatasetExportJobPublic:()=>bi,DatasetExportJobPublicStatus:()=>rR,DatasetIdentifier:()=>qo,DatasetIdentifierPublic:()=>ea,DatasetItem:()=>Es,DatasetItemBatch:()=>ace,DatasetItemBatchUpdate:()=>ta,DatasetItemBatchWrite:()=>oa,DatasetItemChangesPublic:()=>LT,DatasetItemCompare:()=>hj,DatasetItemCompareSource:()=>JT,DatasetItemFilter:()=>ra,DatasetItemFilterOperator:()=>Bb,DatasetItemPageCompare:()=>bj,DatasetItemPagePublic:()=>Cj,DatasetItemPublic:()=>Bs,DatasetItemPublicSource:()=>Rj,DatasetItemSource:()=>UT,DatasetItemStreamRequest:()=>aa,DatasetItemUpdate:()=>Wb,DatasetItemWrite:()=>ia,DatasetItemWriteSource:()=>Lb,DatasetItemsDelete:()=>na,DatasetPagePublic:()=>Ws,DatasetPublic:()=>Di,DatasetPublicStatus:()=>Ej,DatasetPublicType:()=>Dj,DatasetPublicVisibility:()=>Nj,DatasetStatus:()=>TT,DatasetType:()=>CT,DatasetUpdate:()=>sa,DatasetUpdateVisibility:()=>el,DatasetVersionDiff:()=>Vj,DatasetVersionDiffStats:()=>Mj,DatasetVersionPagePublic:()=>Jj,DatasetVersionPublic:()=>Cr,DatasetVersionRestorePublic:()=>pa,DatasetVersionRetrieveRequestPublic:()=>ca,DatasetVersionSummary:()=>Cs,DatasetVersionSummaryPublic:()=>Ms,DatasetVersionTag:()=>la,DatasetVersionUpdatePublic:()=>ma,DatasetVisibility:()=>IT,DatasetWrite:()=>da,DatasetWriteType:()=>rl,DatasetWriteVisibility:()=>tl,DeleteAttachmentsRequest:()=>nce,DeleteAttachmentsRequestEntityType:()=>Gj,DeleteFeedbackScore:()=>Vs,DeleteIdsHolder:()=>Ui,DeleteThreadFeedbackScores:()=>zn,DeleteTraceThreads:()=>Sn,Delta:()=>hv,DownloadAttachmentRequestEntityType:()=>Qc,EffortParam:()=>Oj,Environment:()=>sce,EnvironmentPagePublic:()=>$j,EnvironmentPublic:()=>Ls,EnvironmentUpdate:()=>ua,EnvironmentWrite:()=>ga,ErrorCountWithDeviation:()=>Js,ErrorCountWithDeviationDetailed:()=>Yj,ErrorInfo:()=>Ke,ErrorInfoExperimentItemBulkWriteView:()=>wa,ErrorInfoPublic:()=>Jt,ErrorInfoWrite:()=>St,ErrorMessage:()=>Zj,ErrorMessageDetail:()=>pce,ErrorMessageDetailed:()=>cce,ErrorMessageHistory:()=>lce,ErrorMessagePublic:()=>mce,ErrorMessageWrite:()=>dce,EvaluatorItem:()=>Pr,EvaluatorItemCompare:()=>$T,EvaluatorItemCompareType:()=>HT,EvaluatorItemPublic:()=>Us,EvaluatorItemPublicType:()=>wj,EvaluatorItemType:()=>Eb,EvaluatorItemWrite:()=>Ob,EvaluatorItemWriteType:()=>Gb,ExecutionPolicy:()=>tr,ExecutionPolicyCompare:()=>Is,ExecutionPolicyPublic:()=>Ns,ExecutionPolicyWrite:()=>Qb,ExistenceResponse:()=>Hs,Experiment:()=>uce,ExperimentBatchUpdate:()=>ya,ExperimentEvaluationMethod:()=>qj,ExperimentExecutionRequest:()=>Ra,ExperimentExecutionResponse:()=>sC,ExperimentGroupAggregationsResponse:()=>lC,ExperimentGroupResponse:()=>yC,ExperimentInfo:()=>aC,ExperimentItem:()=>Aa,ExperimentItemBulkRecord:()=>jC,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>CR,ExperimentItemBulkUpload:()=>gce,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>_a,ExperimentItemCompare:()=>lj,ExperimentItemCompareStatus:()=>XT,ExperimentItemCompareTraceVisibilityMode:()=>qT,ExperimentItemPublic:()=>Fs,ExperimentItemPublicTraceVisibilityMode:()=>kj,ExperimentItemReference:()=>_C,ExperimentItemReferencePublic:()=>EC,ExperimentItemStatus:()=>UR,ExperimentItemStreamRequest:()=>ka,ExperimentItemTraceVisibilityMode:()=>FR,ExperimentItemsBatch:()=>Pa,ExperimentItemsDelete:()=>za,ExperimentPagePublic:()=>Ys,ExperimentPublic:()=>$s,ExperimentPublicEvaluationMethod:()=>DC,ExperimentPublicStatus:()=>NC,ExperimentPublicType:()=>BC,ExperimentRunSummary:()=>MT,ExperimentRunSummaryCompare:()=>gj,ExperimentRunSummaryCompareStatus:()=>dj,ExperimentRunSummaryPublic:()=>vj,ExperimentRunSummaryPublicStatus:()=>zj,ExperimentRunSummaryStatus:()=>FT,ExperimentScore:()=>fa,ExperimentScorePublic:()=>WC,ExperimentScoreWrite:()=>HR,ExperimentStatus:()=>rC,ExperimentStreamRequestPublic:()=>Sa,ExperimentType:()=>iC,ExperimentUpdate:()=>ha,ExperimentUpdateStatus:()=>nR,ExperimentUpdateType:()=>pR,ExperimentWrite:()=>va,ExperimentWriteEvaluationMethod:()=>ll,ExperimentWriteStatus:()=>ml,ExperimentWriteType:()=>dl,ExportTraceServiceRequest:()=>fce,Feedback:()=>hce,FeedbackCreate:()=>qC,FeedbackDefinitionPagePublic:()=>aE,FeedbackObjectPublic:()=>iE,FeedbackPublic:()=>sE,FeedbackScore:()=>ze,FeedbackScoreAverage:()=>je,FeedbackScoreAverageDetailed:()=>pE,FeedbackScoreAveragePublic:()=>Yr,FeedbackScoreBatch:()=>Zs,FeedbackScoreBatchItem:()=>dE,FeedbackScoreBatchItemSource:()=>lE,FeedbackScoreBatchItemThread:()=>Gw,FeedbackScoreBatchItemThreadSource:()=>Lw,FeedbackScoreBatchThread:()=>vn,FeedbackScoreCompare:()=>sj,FeedbackScoreCompareSource:()=>rj,FeedbackScoreExperimentItemBulkWriteView:()=>RR,FeedbackScoreExperimentItemBulkWriteViewSource:()=>uR,FeedbackScoreNames:()=>hE,FeedbackScoreNamesPublic:()=>Xr,FeedbackScorePublic:()=>Fi,FeedbackScorePublicSource:()=>RE,FeedbackScoreSource:()=>MR,FeedbackUpdate:()=>jE,FindAgentInsightsIssuesRequestSeverity:()=>Ec,FindAgentInsightsIssuesRequestStatus:()=>Ic,FindFeedbackDefinitionsRequestType:()=>gl,FindFeedbackScoreNames1RequestType:()=>sm,FindGuardrailPoliciesRequestExecutionScope:()=>hl,FindReportFailuresRequestType:()=>Vl,FlagParam:()=>Bi,Function:()=>Oo,FunctionCall:()=>Ar,GenerateReportResponse:()=>CE,GetSpanStatsRequestType:()=>pm,GetSpansByProjectRequestType:()=>cm,GetWebhookExamplesRequestAlertType:()=>Bc,GroupContent:()=>mC,GroupContentWithAggregations:()=>pC,GroupDetail:()=>uC,GroupDetails:()=>fC,Guardrail:()=>NE,GuardrailBatch:()=>yce,GuardrailBatchWrite:()=>ja,GuardrailName:()=>EE,GuardrailPolicy:()=>bce,GuardrailPolicyExecutionScope:()=>BE,GuardrailPolicyPagePublic:()=>XE,GuardrailPolicyPublic:()=>qs,GuardrailPolicyPublicExecutionScope:()=>GE,GuardrailPolicyRule:()=>LE,GuardrailPolicyRulePublic:()=>QE,GuardrailPolicyRulePublicType:()=>OE,GuardrailPolicyRuleType:()=>WE,GuardrailPolicyRuleWrite:()=>eI,GuardrailPolicyRuleWriteType:()=>ZE,GuardrailPolicyWrite:()=>sd,GuardrailPolicyWriteExecutionScope:()=>tI,GuardrailResult:()=>DE,GuardrailWrite:()=>ax,GuardrailWriteName:()=>rx,GuardrailWriteResult:()=>ix,GuardrailsValidation:()=>AC,GuardrailsValidationPublic:()=>oI,GuardrailsValidationRequest:()=>Ca,GuardrailsValidationResponse:()=>lI,IdsHolder:()=>Ta,ImageUrl:()=>oP,ImageUrlPublic:()=>DP,ImageUrlWrite:()=>QP,ItemLockInfo:()=>mI,JsonListString:()=>me,JsonListStringCompare:()=>Ds,JsonListStringExperimentItemBulkWriteView:()=>ir,JsonListStringPublic:()=>Qe,JsonListStringWrite:()=>Oe,JsonNode:()=>W,JsonNodeCompare:()=>KT,JsonNodeDetail:()=>Xx,JsonNodePublic:()=>ke,JsonNodeWrite:()=>Te,JsonSchema:()=>Rb,KpiCardRequest:()=>Ga,KpiCardRequestEntityType:()=>Tl,KpiCardResponse:()=>yI,KpiMetric:()=>fI,KpiMetricType:()=>uI,ListRunnersRequestStatus:()=>om,LlmAsJudgeCode:()=>ts,LlmAsJudgeCodePublic:()=>OP,LlmAsJudgeCodeWrite:()=>nz,LlmAsJudgeMessage:()=>Et,LlmAsJudgeMessageContent:()=>pP,LlmAsJudgeMessageContentPublic:()=>BP,LlmAsJudgeMessageContentWrite:()=>ZP,LlmAsJudgeMessagePublic:()=>Ut,LlmAsJudgeMessagePublicRole:()=>WP,LlmAsJudgeMessageRole:()=>lP,LlmAsJudgeMessageWrite:()=>Bt,LlmAsJudgeMessageWriteRole:()=>ez,LlmAsJudgeModelParameters:()=>It,LlmAsJudgeModelParametersApi:()=>dP,LlmAsJudgeModelParametersPublic:()=>Nt,LlmAsJudgeModelParametersPublicApi:()=>LP,LlmAsJudgeModelParametersWrite:()=>Mt,LlmAsJudgeModelParametersWriteApi:()=>tz,LlmAsJudgeOutputSchema:()=>Dt,LlmAsJudgeOutputSchemaPublic:()=>Ft,LlmAsJudgeOutputSchemaPublicType:()=>GP,LlmAsJudgeOutputSchemaType:()=>gP,LlmAsJudgeOutputSchemaWrite:()=>Wt,LlmAsJudgeOutputSchemaWriteType:()=>oz,LocalRunner:()=>ep,LocalRunnerHeartbeatRequest:()=>un,LocalRunnerHeartbeatResponse:()=>kI,LocalRunnerJob:()=>zt,LocalRunnerJobMetadata:()=>mn,LocalRunnerJobPage:()=>AI,LocalRunnerJobResultRequest:()=>gn,LocalRunnerJobResultRequestStatus:()=>Yl,LocalRunnerJobStatus:()=>kw,LocalRunnerLogEntry:()=>fn,LocalRunnerPage:()=>PI,LocalRunnerStatus:()=>bI,LocalRunnerType:()=>xI,LockResponse:()=>zI,LocksResponse:()=>SI,LogItem:()=>jI,LogItemLevel:()=>vI,LogPage:()=>EI,LogProb:()=>bv,LogProbs:()=>xv,ManualEvaluationRequest:()=>rp,ManualEvaluationRequestEntityType:()=>II,ManualEvaluationResponse:()=>tp,Message:()=>Ko,ModelParams:()=>Ea,MultipartUploadPart:()=>lT,NumberParam:()=>Zr,NumericalFeedbackDefinition:()=>HC,NumericalFeedbackDefinitionCreate:()=>YC,NumericalFeedbackDefinitionPublic:()=>Xs,NumericalFeedbackDefinitionUpdate:()=>SE,NumericalFeedbackDetail:()=>JC,NumericalFeedbackDetailCreate:()=>QC,NumericalFeedbackDetailPublic:()=>eE,NumericalFeedbackDetailUpdate:()=>PE,OAuthError:()=>Rce,OllamaConnectionTestResponse:()=>pd,OllamaInstanceBaseUrlRequest:()=>cd,OllamaModel:()=>zx,OllieReport:()=>LI,OllieReportPage:()=>GI,OllieReportStatus:()=>WI,Optimization:()=>xce,OptimizationPagePublic:()=>op,OptimizationPublic:()=>ip,OptimizationPublicStatus:()=>sD,OptimizationStatus:()=>HI,OptimizationStudioConfig:()=>aD,OptimizationStudioConfigPublic:()=>wD,OptimizationStudioConfigWrite:()=>ND,OptimizationStudioLog:()=>BD,OptimizationUpdate:()=>Va,OptimizationUpdateStatus:()=>Pl,OptimizationWrite:()=>ld,OptimizationWriteStatus:()=>MD,PageColumns:()=>VD,Param:()=>z_,ParamPresence:()=>A_,PercentageValueStatPublic:()=>LD,PercentageValues:()=>Tr,PercentageValuesDetailed:()=>GD,PercentageValuesPublic:()=>Qs,Permission:()=>OD,Project:()=>wce,ProjectDetailed:()=>ZD,ProjectDetailedVisibility:()=>YD,ProjectMetricRequestPublic:()=>Oa,ProjectMetricRequestPublicInterval:()=>jl,ProjectMetricRequestPublicMetricType:()=>Cl,ProjectMetricResponsePublic:()=>aU,ProjectMetricResponsePublicInterval:()=>qD,ProjectMetricResponsePublicMetricType:()=>rU,ProjectPagePublic:()=>cU,ProjectPublic:()=>ap,ProjectPublicVisibility:()=>nU,ProjectReference:()=>EP,ProjectReferencePublic:()=>ws,ProjectRetrieveDetailed:()=>Ka,ProjectStatItemObjectPublic:()=>mU,ProjectStatsPublic:()=>qr,ProjectStatsSummary:()=>fU,ProjectStatsSummaryItem:()=>uU,ProjectUpdate:()=>Qa,ProjectUpdateVisibility:()=>El,ProjectVisibility:()=>QD,ProjectWrite:()=>$a,ProjectWriteVisibility:()=>Il,Prompt:()=>_ce,PromptCacheOptions:()=>yb,PromptDetail:()=>dd,PromptDetailTemplateStructure:()=>SU,PromptPagePublic:()=>np,PromptPublic:()=>CU,PromptPublicTemplateStructure:()=>TU,PromptTemplateStructure:()=>hU,PromptTokensDetails:()=>zv,PromptType:()=>bU,PromptUpdatable:()=>Za,PromptVariant:()=>mR,PromptVersion:()=>md,PromptVersionBatchUpdate:()=>qa,PromptVersionCommitsRequestPublic:()=>en,PromptVersionDetail:()=>Fe,PromptVersionDetailTemplateStructure:()=>qx,PromptVersionDetailType:()=>rw,PromptVersionDetailVersionType:()=>iw,PromptVersionEnvironmentUpdate:()=>rn,PromptVersionIdsRequestDetail:()=>tn,PromptVersionLink:()=>Or,PromptVersionLinkPublic:()=>Ai,PromptVersionLinkWrite:()=>cl,PromptVersionPagePublic:()=>VU,PromptVersionPublic:()=>MU,PromptVersionPublicTemplateStructure:()=>IU,PromptVersionPublicType:()=>UU,PromptVersionPublicVersionType:()=>FU,PromptVersionRetrieveDetail:()=>on,PromptVersionTemplateStructure:()=>xU,PromptVersionType:()=>_U,PromptVersionUpdate:()=>nw,PromptVersionVersionType:()=>AU,PromptWrite:()=>an,PromptWriteTemplateStructure:()=>Nl,PromptWriteType:()=>Fl,ProviderApiKey:()=>kce,ProviderApiKeyPagePublic:()=>XU,ProviderApiKeyProvider:()=>LU,ProviderApiKeyPublic:()=>sp,ProviderApiKeyPublicProvider:()=>GU,ProviderApiKeyUpdate:()=>Da,ProviderApiKeyWrite:()=>Ua,ProviderApiKeyWriteProvider:()=>wl,ProviderAuthCheck:()=>Na,ProviderAuthConfig:()=>kt,ProviderAuthConfigPublic:()=>QU,ProviderAuthConfigPublicSendAs:()=>OU,ProviderAuthConfigSendAs:()=>gx,ProviderAuthConfigWrite:()=>xx,ProviderAuthConfigWriteSendAs:()=>bx,RecentActivityItemPublic:()=>eN,RecentActivityItemPublicType:()=>ZU,RecentActivityPagePublic:()=>tN,ReportCompleteRequest:()=>nn,ReportCompleteRequestStatus:()=>Jl,ReportFailure:()=>pp,ReportFailurePage:()=>nN,ReportFailureType:()=>iN,ReportPreference:()=>cp,ReportedIssue:()=>zy,ReportedIssueSeverity:()=>Ay,Request:()=>Uo,Response:()=>sN,ResponseFormat:()=>kb,ResponseFormatType:()=>wb,Result:()=>Er,ResultsNumberPublic:()=>iU,RetentionRulePagePublic:()=>uN,RetentionRulePublic:()=>Mi,RetentionRulePublicLevel:()=>pN,RetentionRulePublicRetention:()=>lN,RetentionRuleWrite:()=>sn,RetentionRuleWriteRetention:()=>Hl,RevokeRequest:()=>Ma,ScopedAnalyticsQueryRequest:()=>kn,ScoreCondition:()=>Zy,ScoreConditionOperator:()=>Yy,ScoreConditionPublic:()=>cA,ScoreConditionPublicOperator:()=>sA,ScoreConditionWrite:()=>My,ScoreConditionWriteOperator:()=>Fy,ScoreName:()=>gE,ScoreNamePublic:()=>yE,ServiceTogglesConfig:()=>gN,Span:()=>Os,SpanBatch:()=>Ace,SpanBatchUpdate:()=>yn,SpanBatchWrite:()=>xn,SpanEnrichmentOptions:()=>Db,SpanExperimentItemBulkWriteView:()=>PR,SpanExperimentItemBulkWriteViewSource:()=>wR,SpanExperimentItemBulkWriteViewType:()=>kR,SpanFilter:()=>ar,SpanFilterOperator:()=>b_,SpanFilterPublic:()=>Sr,SpanFilterPublicOperator:()=>Mx,SpanFilterWrite:()=>_s,SpanFilterWriteOperator:()=>Dz,SpanLlmAsJudgeCode:()=>is,SpanLlmAsJudgeCodePublic:()=>hz,SpanLlmAsJudgeCodeWrite:()=>Nz,SpanPagePublic:()=>xN,SpanPublic:()=>lp,SpanPublicSource:()=>fN,SpanPublicType:()=>yN,SpanSearchStreamRequestPublic:()=>wn,SpanSearchStreamRequestPublicExcludeItem:()=>am,SpanSearchStreamRequestPublicType:()=>nm,SpanSource:()=>bC,SpanType:()=>xC,SpanUpdate:()=>hn,SpanUpdateSource:()=>zw,SpanUpdateType:()=>vw,SpanUserDefinedMetricPythonCode:()=>os,SpanUserDefinedMetricPythonCodePublic:()=>bz,SpanUserDefinedMetricPythonCodeWrite:()=>Wz,SpanWrite:()=>Rn,SpanWriteSource:()=>Cw,SpanWriteType:()=>Iw,SpansCountResponse:()=>kN,StartMultipartUploadRequest:()=>Ho,StartMultipartUploadRequestEntityType:()=>Hc,StartMultipartUploadResponse:()=>AN,StreamOptions:()=>Pb,StudioEvaluation:()=>$I,StudioEvaluationPublic:()=>mD,StudioEvaluationWrite:()=>zD,StudioLlmModel:()=>XI,StudioLlmModelPublic:()=>uD,StudioLlmModelWrite:()=>vD,StudioMessage:()=>rD,StudioMessagePublic:()=>yD,StudioMessageWrite:()=>ED,StudioMetric:()=>KI,StudioMetricPublic:()=>cD,StudioMetricWrite:()=>AD,StudioOptimizer:()=>qI,StudioOptimizerPublic:()=>fD,StudioOptimizerWrite:()=>jD,StudioPrompt:()=>iD,StudioPromptPublic:()=>RD,StudioPromptWrite:()=>DD,TokenRequest:()=>Wa,TokenResponse:()=>PN,TokenUsageNames:()=>mp,Tool:()=>Tb,ToolCall:()=>Zn,ToolCallType:()=>BA,ToolType:()=>Sb,ToolsParam:()=>BI,ToolsParamChatCompletions:()=>NI,Trace:()=>Ks,TraceBatch:()=>Pce,TraceBatchUpdate:()=>jn,TraceBatchWrite:()=>En,TraceCountResponse:()=>vN,TraceEnrichmentOptions:()=>Nb,TraceExperimentItemBulkWriteView:()=>TR,TraceExperimentItemBulkWriteViewSource:()=>SR,TraceFilter:()=>jr,TraceFilterOperator:()=>hP,TraceFilterPublic:()=>vr,TraceFilterPublicOperator:()=>Vx,TraceFilterWrite:()=>fs,TraceFilterWriteOperator:()=>pz,TracePagePublic:()=>DN,TracePublic:()=>dp,TracePublicSource:()=>TN,TracePublicVisibilityMode:()=>CN,TraceSearchStreamRequestPublic:()=>In,TraceSearchStreamRequestPublicExcludeItem:()=>um,TraceSource:()=>zC,TraceThread:()=>up,TraceThreadBatchIdentifier:()=>Dn,TraceThreadBatchUpdate:()=>Nn,TraceThreadFilter:()=>or,TraceThreadFilterOperator:()=>e_,TraceThreadFilterPublic:()=>At,TraceThreadFilterPublicOperator:()=>Jx,TraceThreadFilterWrite:()=>ks,TraceThreadFilterWriteOperator:()=>Gz,TraceThreadIdentifier:()=>gd,TraceThreadLlmAsJudgeCode:()=>as,TraceThreadLlmAsJudgeCodePublic:()=>xz,TraceThreadLlmAsJudgeCodeWrite:()=>Oz,TraceThreadPage:()=>BN,TraceThreadSearchStreamRequest:()=>Fn,TraceThreadStatus:()=>UN,TraceThreadUpdate:()=>Un,TraceThreadUserDefinedMetricPythonCode:()=>ns,TraceThreadUserDefinedMetricPythonCodePublic:()=>_z,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Yz,TraceUpdate:()=>Tn,TraceUpdateSource:()=>Ow,TraceVisibilityMode:()=>vC,TraceWrite:()=>Cn,TraceWriteSource:()=>$w,UploadAttachmentRequestEntityType:()=>$c,Usage:()=>vv,UsageByWorkspaceProjectUserResponse:()=>VN,UsageProjectsRequest:()=>An,UsageProjectsResponse:()=>GN,UserDefinedMetricPythonCode:()=>ss,UserDefinedMetricPythonCodePublic:()=>Az,UserDefinedMetricPythonCodeWrite:()=>yS,ValidatedToken:()=>HN,ValidationDescriptor:()=>cx,ValidationDescriptorType:()=>sx,ValidationResult:()=>pI,ValidationResultType:()=>nI,ValueEntry:()=>JR,ValueEntryCompare:()=>aj,ValueEntryCompareSource:()=>ij,ValueEntryExperimentItemBulkWriteView:()=>yR,ValueEntryExperimentItemBulkWriteViewSource:()=>fR,ValueEntryPublic:()=>kE,ValueEntryPublicSource:()=>wE,ValueEntrySource:()=>VR,VideoUrl:()=>nP,VideoUrlPublic:()=>NP,VideoUrlWrite:()=>YP,View:()=>Vi,ViewArea:()=>ON,ViewCreate:()=>Mn,ViewCreateArea:()=>fm,ViewCreateAuthor:()=>hm,ViewCreateType:()=>ym,ViewCurrentVersion:()=>Wn,ViewInput:()=>Tt,ViewInputKind:()=>o_,ViewUpdate:()=>Vn,ViewVersion:()=>Wi,ViewVersionAuthor:()=>QN,ViewVersionCreate:()=>Ln,ViewVersionCreateAuthor:()=>bm,ViewVersionCreateType:()=>Rm,ViewVersionPage:()=>iF,ViewVersionSummary:()=>rF,ViewVersionSummaryAuthor:()=>qN,ViewVersionType:()=>YN,Webhook:()=>zk,WebhookExamples:()=>oF,WebhookPublic:()=>Bk,WebhookTestResult:()=>sF,WebhookTestResultStatus:()=>aF,WebhookWrite:()=>Xk,WelcomeWizardSubmission:()=>Jn,WelcomeWizardTracking:()=>pF,WorkspaceConfiguration:()=>gp,WorkspaceInfo:()=>qA,WorkspaceMetricRequest:()=>zce,WorkspaceMetricResponse:()=>fp,WorkspaceMetricsSummaryRequest:()=>Li,WorkspaceMetricsSummaryResponse:()=>cF,WorkspaceNameHolder:()=>lF,WorkspaceProjectName:()=>LN,WorkspaceProjectUserCount:()=>MN,WorkspaceSpanMetricRequest:()=>Gn,WorkspaceSpanMetricRequestInterval:()=>_m,WorkspaceSpanMetricRequestMetricType:()=>km,WorkspaceSpansCount:()=>wN,WorkspaceTokenUsageNamesRequest:()=>Hn,WorkspaceTraceCount:()=>zN,WorkspaceUserPermissions:()=>mF,agentConfigs:()=>jc,agentInsights:()=>Dc,agentInsightsEnrollment:()=>Uc,agentInsightsJobs:()=>Fc,alerts:()=>Mc,annotationQueues:()=>Lc,assertionResults:()=>Gc,attachments:()=>fi,chatCompletions:()=>Zc,datasets:()=>Ri,environments:()=>al,experiments:()=>ul,feedbackDefinitions:()=>fl,guardrailPolicies:()=>yl,guardrails:()=>bl,llmModels:()=>_t,llmProviderKey:()=>_l,mcpOAuth:()=>kl,ollama:()=>wi,optimizations:()=>zl,pairing:()=>vl,projects:()=>Dl,prompts:()=>Pt,reportFailures:()=>Ll,reports:()=>Gl,retentionRules:()=>Ol,runners:()=>hr,spans:()=>lm,systemAnalyticsQueries:()=>mm,systemUsage:()=>dm,traces:()=>gm,views:()=>xm,welcomeWizard:()=>wm,workspaces:()=>Am});var ie=n(()=>{J8();Tq();});var fd,jq=n(()=>{Z();Q();b();$();q();J();ie();ee();fd=class{constructor(i={}){this._options=B(i);}createAgentConfig(i,r){return P.fromPromise(this.__createAgentConfig(i,r))}async __createAgentConfig(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pm.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(i,r){return P.fromPromise(this.__updateAgentConfig(i,r))}async __updateAgentConfig(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pm.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(i,r,t={},o){return P.fromPromise(this.__createBlueprintFromMask(i,r,t,o))}async __createBlueprintFromMask(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/masks/${_.encodePathParam(r)}`),method:"POST",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r){return P.fromPromise(this.__createOrUpdateEnvs(i,r))}async __createOrUpdateEnvs(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Co.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(i,r,t={},o){return P.fromPromise(this.__getBlueprintByEnv(i,r,t,o))}async __getBlueprintByEnv(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"GET",headers:c,queryParameters:{...s,...o==null?void 0:o.queryParams},timeoutMs:((w=(y=o==null?void 0:o.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=o==null?void 0:o.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ct.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 K(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(i,r,t,o){return P.fromPromise(this.__setEnvByBlueprintName(i,r,t,o))}async __setEnvByBlueprintName(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:jo.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r,t={},o){return P.fromPromise(this.__deleteEnv(i,r,t,o))}async __deleteEnv(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/projects/${_.encodePathParam(r)}`),method:"DELETE",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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 K(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(i,r={},t){return P.fromPromise(this.__getBlueprintById(i,r,t))}async __getBlueprintById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=r,a={mask_id:o},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(i)}`),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:Ct.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 K(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(i,r,t={},o){return P.fromPromise(this.__getBlueprintByName(i,r,t,o))}async __getBlueprintByName(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),o==null?void 0:o.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(i)}/names/${_.encodePathParam(r)}`),method:"GET",headers:c,queryParameters:{...s,...o==null?void 0:o.queryParams},timeoutMs:((w=(y=o==null?void 0:o.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=o==null?void 0:o.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ct.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 K(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(i,r={},t){return P.fromPromise(this.__getBlueprintHistory(i,r,t))}async __getBlueprintHistory(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}`),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:jS.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 K(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(i,r={},t){return P.fromPromise(this.__getDeltaById(i,r,t))}async __getDeltaById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/deltas`),method:"GET",headers:o,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:Ct.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 K(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(i,r={},t){return P.fromPromise(this.__getLatestBlueprint(i,r,t))}async __getLatestBlueprint(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=r,a={mask_id:o},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(i)}`),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:Ct.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 K(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(i,r){return P.fromPromise(this.__removeConfigKeys(i,r))}async __removeConfigKeys(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Eo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===401?new K(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var hd,Cq=n(()=>{Z();Q();b();$();q();J();ie();ee();hd=class{constructor(i={}){this._options=B(i);}findAgentInsightsIssues(i,r){return P.fromPromise(this.__findAgentInsightsIssues(i,r))}async __findAgentInsightsIssues(i,r){var h,y,w,A,C,I,D,F,M,Y,pe;let{projectId:t,fromDate:o,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=i,d={project_id:t,from_date:o,to_date:a,status:s!=null?Ic.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?Ec.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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:nk.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 K(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(i,r){return P.fromPromise(this.__reportAgentInsightsIssues(i,r))}async __reportAgentInsightsIssues(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Do.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(i,r,t){return P.fromPromise(this.__getAgentInsightsIssueById(i,r,t))}async __getAgentInsightsIssueById(i,r,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,fromDate:a,toDate:s}=r,c={project_id:o,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(i)}`),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:mk.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 K(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(i,r,t){return P.fromPromise(this.__updateAgentInsightsIssue(i,r,t))}async __updateAgentInsightsIssue(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Io.jsonOrThrow(r,{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 K(a.error.body,a.rawResponse);case 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new O(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 yd,Eq=n(()=>{Z();Q();b();$();q();J();ie();yd=class{constructor(i={}){this._options=B(i);}enrolProjectsInAutoFirstRun(i,r){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(i,r))}async __enrolProjectsInAutoFirstRun(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Uo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var bd,Iq=n(()=>{Z();Q();b();$();q();J();ie();ee();bd=class{constructor(i={}){this._options=B(i);}getAgentInsightsJob(i,r={},t){return P.fromPromise(this.__getAgentInsightsJob(i,r,t))}async __getAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Pi.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(i,r={},t){return P.fromPromise(this.__createAgentInsightsJob(i,r,t))}async __createAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"POST",headers:o,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:Pi.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(i,r,t){return P.fromPromise(this.__updateAgentInsightsJob(i,r,t))}async __updateAgentInsightsJob(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Fo.jsonOrThrow(r,{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:Pi.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(i,r={},t){return P.fromPromise(this.__triggerAgentInsightsJob(i,r,t))}async __triggerAgentInsightsJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/trigger`),method:"POST",headers:o,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")}updateAgentInsightsGuidance(i,r,t){return P.fromPromise(this.__updateAgentInsightsGuidance(i,r,t))}async __updateAgentInsightsGuidance(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/guidance`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:No.jsonOrThrow(r,{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:Pi.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 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new O(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/agent-insights/jobs/{projectId}/guidance")}};});var Rd,Dq=n(()=>{Z();Q();b();$();q();J();ie();ee();Rd=class{constructor(i={}){this._options=B(i);}findAlerts(i={},r){return P.fromPromise(this.__findAlerts(i,r))}async __findAlerts(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,sorting:a,filters:s}=i,c={page:t,size:o,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Kn.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(i,r){return P.fromPromise(this.__createAlert(i,r))}async __createAlert(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(i,r){return P.fromPromise(this.__deleteAlertBatch(i,r))}async __deleteAlertBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(i,r={},t){return P.fromPromise(this.__getAlertById(i,r,t))}async __getAlertById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:On.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(i,r,t){return P.fromPromise(this.__updateAlert(i,r,t))}async __updateAlert(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qn.jsonOrThrow(o,{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 O(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(i={},r){return P.fromPromise(this.__getWebhookExamples(i,r))}async __getWebhookExamples(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=i,o={alert_type:t!=null?Bc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:oF.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(i,r){return P.fromPromise(this.__testWebhook(i,r))}async __testWebhook(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sF.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var xd,Uq=n(()=>{Z();Q();b();$();q();J();ie();ee();xd=class{constructor(i={}){this._options=B(i);}addItemsToAnnotationQueue(i,r,t){return P.fromPromise(this.__addItemsToAnnotationQueue(i,r,t))}async __addItemsToAnnotationQueue(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{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(i={},r){return P.fromPromise(this.__findAnnotationQueues(i,r))}async __findAnnotationQueues(i={},r){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:o,name:a,filters:s,sorting:c}=i,l={page:t,size:o,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=r==null?void 0:r.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((C=(A=r==null?void 0:r.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=r==null?void 0:r.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:SA.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(i,r){return P.fromPromise(this.__createAnnotationQueue(i,r))}async __createAnnotationQueue(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Bo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(i,r){return P.fromPromise(this.__createAnnotationQueueBatch(i,r))}async __createAnnotationQueueBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Mo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(i,r){return P.fromPromise(this.__deleteAnnotationQueueBatch(i,r))}async __deleteAnnotationQueueBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(i,r={},t){return P.fromPromise(this.__getAnnotationQueueById(i,r,t))}async __getAnnotationQueueById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Yn.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(i,r={},t){return P.fromPromise(this.__updateAnnotationQueue(i,r,t))}async __updateAnnotationQueue(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Jo.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getAnnotationQueueLocks(i,r,t))}async __getAnnotationQueueLocks(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/locks`),method:"GET",headers:o,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:SI.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(i,r,t={},o){return P.fromPromise(this.__lockAnnotationQueueItem(i,r,t,o))}async __lockAnnotationQueueItem(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/items/${_.encodePathParam(r)}/lock`),method:"PUT",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:zI.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(i,r,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(i,r,t))}async __removeItemsFromAnnotationQueue(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zm.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__searchAnnotationQueueItems(i,r,t))}async __searchAnnotationQueueItems(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/search`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wo.jsonOrThrow(r,{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:wA.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 wd,Nq=n(()=>{Z();Q();b();$();q();J();ie();wd=class{constructor(i={}){this._options=B(i);}storeAssertionsBatch(i,r){return P.fromPromise(this.__storeAssertionsBatch(i,r))}async __storeAssertionsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Go.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/assertion-results")}};});var _d,Fq=n(()=>{Z();Q();b();$();q();J();ie();ee();_d=class{constructor(i={}){this._options=B(i);}attachmentList(i,r){return P.fromPromise(this.__attachmentList(i,r))}async __attachmentList(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,projectId:a,entityType:s,entityId:c,path:l}=i,m={page:t,size:o,project_id:a,entity_type:Kc.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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:GA.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 K(d.error.body,d.rawResponse);case 403:throw new se(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(i,r){return P.fromPromise(this.__completeMultiPartUpload(i,r))}async __completeMultiPartUpload(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Km.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(i,r){return P.fromPromise(this.__deleteAttachments(i,r))}async __deleteAttachments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Km.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(i,r){return P.fromPromise(this.__downloadAttachment(i,r))}async __downloadAttachment(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{workspaceName:t,containerId:o,entityType:a,entityId:s,fileName:c,mimeType:l}=i,m={workspace_name:t,container_id:o,entity_type:Qc.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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},responseType:"streaming",timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.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 K(d.error.body,d.rawResponse);case 403:throw new se(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(i,r){return P.fromPromise(this.__startMultiPartUpload(i,r))}async __startMultiPartUpload(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:AN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(i,r){return P.fromPromise(this.__uploadAttachment(i,r))}async __uploadAttachment(i,r){var f,g,h,y,w,A,C,I,D,F,M;let{fileName:t,projectName:o,mimeType:a,entityType:s,entityId:c,body:l}=i,m={file_name:t,project_name:o,mime_type:a,entity_type:$c.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},requestType:"json",body:fi.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.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 K(d.error.body,d.rawResponse);case 403:throw new se(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 kd,Bq=n(()=>{Z();Q();b();$();q();J();ie();ee();kd=class{constructor(i={}){this._options=B(i);}findEvaluators(i={},r){return P.fromPromise(this.__findEvaluators(i,r))}async __findEvaluators(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{projectId:t,id:o,name:a,filters:s,sorting:c,page:l,size:m}=i,u={project_id:t,id:o,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:vz.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(i,r){return P.fromPromise(this.__createAutomationRuleEvaluator(i,r))}async __createAutomationRuleEvaluator(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:PS.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(i,r){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(i,r))}async __deleteAutomationRuleEvaluatorBatch(i,r){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:o}=i,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},requestType:"json",body:ue.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r={},t){return P.fromPromise(this.__getEvaluatorById(i,r,t))}async __getEvaluatorById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:o}=r,a={project_id:o},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(i)}`),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:Iz.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(i,r,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(i,r,t))}async __updateAutomationRuleEvaluator(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hS.jsonOrThrow(o,{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===409?new X(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/automations/evaluators/{id}")}getEvaluatorLogsById(i,r={},t){return P.fromPromise(this.__getEvaluatorLogsById(i,r,t))}async __getEvaluatorLogsById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:o}=r,a={size:o},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(i)}/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:EI.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 Ad,Mq=n(()=>{Z();Q();b();$();q();J();ie();Ad=class{constructor(i={}){this._options=B(i);}createChatCompletions(i={},r){return P.fromPromise(this.__createChatCompletions(i,r))}async __createChatCompletions(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:jv.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/chat/completions")}};});var Pd,Wq=n(()=>{Z();Q();b();$();q();J();ie();ee();Pd=class{constructor(i={}){this._options=B(i);}access(i,r){return P.fromPromise(this.__access(i,r))}async __access(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:XA.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(i){return P.fromPromise(this.__getWorkspaceName(i))}async __getWorkspaceName(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:lF.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 K(t.error.body,t.rawResponse);case 403:throw new se(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 zd,Vq=n(()=>{Z();Q();b();$();q();J();ie();ee();zd=class{constructor(i={}){this._options=B(i);}createDashboardSavedQuery(i,r){return P.fromPromise(this.__createDashboardSavedQuery(i,r))}async __createDashboardSavedQuery(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/dashboard-saved-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ss.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ss.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 501:throw new Se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/internal/dashboard-saved-queries")}getDashboardSavedQuery(i,r={},t){return P.fromPromise(this.__getDashboardSavedQuery(i,r,t))}async __getDashboardSavedQuery(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/dashboard-saved-queries/${_.encodePathParam(i)}`),method:"GET",headers:o,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:Ss.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 501:throw new Se(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/internal/dashboard-saved-queries/{id}")}};});var Sd,Lq=n(()=>{Z();Q();b();$();q();J();ie();ee();Sd=class{constructor(i={}){this._options=B(i);}findDashboards(i={},r){return P.fromPromise(this.__findDashboards(i,r))}async __findDashboards(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r){return P.fromPromise(this.__createDashboard(i,r))}async __createDashboard(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:js.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(i,r={},t){return P.fromPromise(this.__getDashboardById(i,r,t))}async __getDashboardById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:nr.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(i,r={},t){return P.fromPromise(this.__deleteDashboard(i,r,t))}async __deleteDashboard(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateDashboard(i,r,t))}async __updateDashboard(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{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:nr.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,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(i,r){return P.fromPromise(this.__deleteDashboardsBatch(i,r))}async __deleteDashboardsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/dashboards/delete-batch")}runDashboardWidgetQuery(i,r,t,o){return P.fromPromise(this.__runDashboardWidgetQuery(i,r,t,o))}async __runDashboardWidgetQuery(i,r,t,o){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=o==null?void 0:o.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),o==null?void 0:o.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/dashboards/${_.encodePathParam(i)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ts.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=o==null?void 0:o.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=o==null?void 0:o.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.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 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new O(c.error.body,c.rawResponse);case 429:throw new fe(c.error.body,c.rawResponse);case 501:throw new Se(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,"POST","/v1/private/dashboards/{dashboardId}/widgets/{widgetId}/query")}};});var vd,Jq=n(()=>{Z();Q();b();Lr();$();q();J();ie();ee();vd=class{constructor(i={}){this._options=B(i);}applyDatasetItemChanges(i,r,t){return P.fromPromise(this.__applyDatasetItemChanges(i,r,t))}async __applyDatasetItemChanges(i,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:o,body:a}=r,s={override:o},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(i)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:LT.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:Cr.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(i,r){return P.fromPromise(this.__batchUpdateDatasetItems(i,r))}async __batchUpdateDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ta.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(i={},r){return P.fromPromise(this.__findDatasets(i,r))}async __findDatasets(i={},r){var y,w,A,C,I,D,F,M,Y,pe,ye;let{page:t,size:o,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=i,f={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((M=(F=r==null?void 0:r.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=r==null?void 0:r.maxRetries)!=null?pe:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ye=this._options)==null?void 0:ye.fetch,logging:this._options.logging});if(h.ok)return {data:Ws.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(i,r){return P.fromPromise(this.__createDataset(i,r))}async __createDataset(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:da.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(i,r){return P.fromPromise(this.__createOrUpdateDatasetItems(i,r))}async __createOrUpdateDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(i,r){return P.fromPromise(this.__createDatasetItemsFromCsv(i,r))}async __createDatasetItemsFromCsv(i,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await iy();t.append("file",Xe(i.file)),t.append("dataset_id",i.datasetId);let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),r==null?void 0:r.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:r==null?void 0:r.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__createDatasetItemsFromJson(i,r))}async __createDatasetItemsFromJson(i,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await iy();t.append("file",Xe(i.file)),t.append("dataset_id",i.datasetId),t.append("format",ol.jsonOrThrow(i.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),r==null?void 0:r.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:r==null?void 0:r.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r,t){return P.fromPromise(this.__createDatasetItemsFromSpans(i,r,t))}async __createDatasetItemsFromSpans(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/from-spans`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$o.jsonOrThrow(r,{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(i,r,t){return P.fromPromise(this.__createDatasetItemsFromTraces(i,r,t))}async __createDatasetItemsFromTraces(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/items/from-traces`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Yo.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getDatasetById(i,r,t))}async __getDatasetById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Di.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(i,r,t){return P.fromPromise(this.__updateDataset(i,r,t))}async __updateDataset(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sa.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__deleteDataset(i,r,t))}async __deleteDataset(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deleteDatasetByName(i,r))}async __deleteDatasetByName(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(i={},r){return P.fromPromise(this.__deleteDatasetItems(i,r))}async __deleteDatasetItems(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(i,r){return P.fromPromise(this.__deleteDatasetsBatch(i,r))}async __deleteDatasetsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(i,r={},t){return P.fromPromise(this.__downloadDatasetExport(i,r,t))}async __downloadDatasetExport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/download`),method:"GET",headers:o,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(i,r,t){return P.fromPromise(this.__expandDataset(i,r,t))}async __expandDataset(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/expansions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Xo.jsonOrThrow(r,{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:VT.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(i,r={},t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(i,r,t))}async __findDatasetItemsWithExperimentItems(i,r={},t){var y,w,A,C,I,D,F,M,Y,pe,ye;let{page:o,size:a,experimentIds:s,datasetVersions:c,filters:l,sorting:m,search:u,truncate:d}=r,f={page:o,size:a,experiment_ids:s,dataset_versions:c,filters:l,sorting:m,search:u,truncate:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=t==null?void 0:t.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),t==null?void 0:t.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/${_.encodePathParam(i)}/items/experiments/items`),method:"GET",headers:g,queryParameters:{...f,...t==null?void 0:t.queryParams},timeoutMs:((M=(F=t==null?void 0:t.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=t==null?void 0:t.maxRetries)!=null?pe:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ye=this._options)==null?void 0:ye.fetch,logging:this._options.logging});if(h.ok)return {data:bj.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/{id}/items/experiments/items")}getDatasetByIdentifier(i,r){return P.fromPromise(this.__getDatasetByIdentifier(i,r))}async __getDatasetByIdentifier(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ea.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Di.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(i,r,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(i,r,t))}async __getDatasetExperimentItemsStats(i,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:o,filters:a}=r,s={experiment_ids:o,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(i)}/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:qr.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(i,r={},t){return P.fromPromise(this.__getDatasetExportJob(i,r,t))}async __getDatasetExportJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:bi.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(i){return P.fromPromise(this.__getDatasetExportJobs(i))}async __getDatasetExportJobs(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ri.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(i,r={},t){return P.fromPromise(this.__getDatasetItemById(i,r,t))}async __getDatasetItemById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Bs.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(i,r,t){return P.fromPromise(this.__patchDatasetItem(i,r,t))}async __patchDatasetItem(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__getDatasetItems(i,r,t))}async __getDatasetItems(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,version:s,filters:c,truncate:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Cj.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(i,r={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(i,r,t))}async __getDatasetItemsOutputColumns(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:o}=r,a={experiment_ids:o},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(i)}/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:VD.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(i,r={},t){return P.fromPromise(this.__markDatasetExportJobViewed(i,r,t))}async __markDatasetExportJobViewed(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/mark-viewed`),method:"PUT",headers:o,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(i,r={},t){return P.fromPromise(this.__startDatasetExport(i,r,t))}async __startDatasetExport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/export`),method:"POST",headers:o,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:bi.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")}streamDatasetExperimentItems(i={},r){return P.fromPromise(this.__streamDatasetExperimentItems(i,r))}async __streamDatasetExperimentItems(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/experiments/items/stream")}streamDatasetItems(i,r){return P.fromPromise(this.__streamDatasetItems(i,r))}async __streamDatasetItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:aa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(i,r={},t){return P.fromPromise(this.__compareDatasetVersions(i,r,t))}async __compareDatasetVersions(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/diff`),method:"GET",headers:o,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:Vj.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(i,r,t,o){return P.fromPromise(this.__createVersionTag(i,r,t,o))}async __createVersionTag(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:la.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r,t,o={},a){return P.fromPromise(this.__deleteVersionTag(i,r,t,o,a))}async __deleteVersionTag(i,r,t,o={},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(i)}/versions/${_.encodePathParam(r)}/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}")}getDatasetVersionByHash(i,r,t={},o){return P.fromPromise(this.__getDatasetVersionByHash(i,r,t,o))}async __getDatasetVersionByHash(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Cr.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/datasets/{id}/versions/hash/{versionHash}")}updateDatasetVersion(i,r,t={},o){return P.fromPromise(this.__updateDatasetVersion(i,r,t,o))}async __updateDatasetVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/hash/${_.encodePathParam(r)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:ma.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Cr.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}")}listDatasetVersions(i,r={},t){return P.fromPromise(this.__listDatasetVersions(i,r,t))}async __listDatasetVersions(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:Jj.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(i,r,t){return P.fromPromise(this.__restoreDatasetVersion(i,r,t))}async __restoreDatasetVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/restore`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:pa.jsonOrThrow(r,{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:Cr.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(i,r,t){return P.fromPromise(this.__retrieveDatasetVersion(i,r,t))}async __retrieveDatasetVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/versions/retrieve`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ca.jsonOrThrow(r,{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:Cr.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")}};});var Td,Gq=n(()=>{Z();Q();b();$();q();J();ie();ee();Td=class{constructor(i={}){this._options=B(i);}findEnvironments(i){return P.fromPromise(this.__findEnvironments(i))}async __findEnvironments(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:$j.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(i,r){return P.fromPromise(this.__createEnvironment(i,r))}async __createEnvironment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ga.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(i,r){return P.fromPromise(this.__deleteEnvironmentsBatch(i,r))}async __deleteEnvironmentsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(i,r={},t){return P.fromPromise(this.__getEnvironmentById(i,r,t))}async __getEnvironmentById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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 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(i,r={},t){return P.fromPromise(this.__updateEnvironment(i,r,t))}async __updateEnvironment(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ua.jsonOrThrow(r,{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 jd,Hq=n(()=>{Z();Q();b();$();q();J();ie();ee();jd=class{constructor(i={}){this._options=B(i);}batchUpdateExperiments(i,r){return P.fromPromise(this.__batchUpdateExperiments(i,r))}async __batchUpdateExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ya.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/experiments/batch")}cancelExperiments(i,r){return P.fromPromise(this.__cancelExperiments(i,r))}async __cancelExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/cancel"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ta.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 403:throw new se(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/experiments/cancel")}findExperiments(i={},r){return P.fromPromise(this.__findExperiments(i,r))}async __findExperiments(i={},r){var D,F,M,Y,pe,ye,Ee,Ie,De,er,ho;let{page:t,size:o,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=i,A={page:t,size:o,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":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ie=(Ee=r==null?void 0:r.timeoutInSeconds)!=null?Ee:(ye=this._options)==null?void 0:ye.timeoutInSeconds)!=null?Ie:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(De=this._options)==null?void 0:De.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ho=this._options)==null?void 0:ho.fetch,logging:this._options.logging});if(I.ok)return {data:Ys.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(i,r){return P.fromPromise(this.__createExperiment(i,r))}async __createExperiment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(i,r){return P.fromPromise(this.__createExperimentItems(i,r))}async __createExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(i,r){return P.fromPromise(this.__deleteExperimentItems(i,r))}async __deleteExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:za.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(i,r){return P.fromPromise(this.__deleteExperimentsById(i,r))}async __deleteExperimentsById(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(i,r){return P.fromPromise(this.__executeExperiment(i,r))}async __executeExperiment(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ra.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:sC.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(i,r){return P.fromPromise(this.__experimentItemsBulk(i,r))}async __experimentItemsBulk(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:_a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(i={},r){return P.fromPromise(this.__findFeedbackScoreNames(i,r))}async __findFeedbackScoreNames(i={},r){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:o}=i,a={experiment_ids:t,project_id:o},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__findExperimentGroups(i,r))}async __findExperimentGroups(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{groups:t,types:o,name:a,projectId:s,projectDeleted:c,filters:l}=i,m={groups:t,types:o,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:yC.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(i={},r){return P.fromPromise(this.__findExperimentGroupsAggregations(i,r))}async __findExperimentGroupsAggregations(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{groups:t,types:o,name:a,projectId:s,projectDeleted:c,filters:l}=i,m={groups:t,types:o,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:lC.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(i,r){return P.fromPromise(this.__finishExperiments(i,r))}async __finishExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(i,r={},t){return P.fromPromise(this.__getExperimentById(i,r,t))}async __getExperimentById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:$s.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(i,r,t){return P.fromPromise(this.__updateExperiment(i,r,t))}async __updateExperiment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__getExperimentItemById(i,r,t))}async __getExperimentItemById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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 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(i,r){return P.fromPromise(this.__streamExperimentItems(i,r))}async __streamExperimentItems(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(i,r){return P.fromPromise(this.__streamExperiments(i,r))}async __streamExperiments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Sa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/experiments/stream")}};});var Cd,Oq=n(()=>{Z();Q();b();$();q();J();ie();ee();Cd=class{constructor(i={}){this._options=B(i);}findFeedbackDefinitions(i={},r){return P.fromPromise(this.__findFeedbackDefinitions(i,r))}async __findFeedbackDefinitions(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,name:a,type:s}=i,c={page:t,size:o,name:a,type:s!=null?gl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:aE.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(i,r){return P.fromPromise(this.__createFeedbackDefinition(i,r))}async __createFeedbackDefinition(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qC.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(i,r={},t){return P.fromPromise(this.__getFeedbackDefinitionById(i,r,t))}async __getFeedbackDefinitionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:sE.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(i,r,t){return P.fromPromise(this.__updateFeedbackDefinition(i,r,t))}async __updateFeedbackDefinition(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:jE.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(i,r,t))}async __deleteFeedbackDefinitionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(i,r))}async __deleteFeedbackDefinitionsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Ed,Kq=n(()=>{Z();Q();b();$();q();J();ie();ee();Ed=class{constructor(i={}){this._options=B(i);}findGuardrailPolicies(i={},r){return P.fromPromise(this.__findGuardrailPolicies(i,r))}async __findGuardrailPolicies(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,names:s,executionScope:c,sorting:l}=i,m={page:t,size:o,name:a,names:s,execution_scope:c!=null?hl.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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/guardrails/policies"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:XE.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 400:throw new N(d.error.body,d.rawResponse);case 403:throw new se(d.error.body,d.rawResponse);case 503:throw new Ue(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/guardrails/policies")}createGuardrailPolicy(i,r){return P.fromPromise(this.__createGuardrailPolicy(i,r))}async __createGuardrailPolicy(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/policies"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:sd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/guardrails/policies")}getGuardrailPolicyById(i,r={},t){return P.fromPromise(this.__getGuardrailPolicyById(i,r,t))}async __getGuardrailPolicyById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/guardrails/policies/${_.encodePathParam(i)}`),method:"GET",headers:o,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:qs.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 403:throw new se(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 503:throw new Ue(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/guardrails/policies/{id}")}updateGuardrailPolicy(i,r,t){return P.fromPromise(this.__updateGuardrailPolicy(i,r,t))}async __updateGuardrailPolicy(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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/guardrails/policies/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sd.jsonOrThrow(o,{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 403:throw new se(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);case 422:throw new O(s.error.body,s.rawResponse);case 429:throw new fe(s.error.body,s.rawResponse);case 503:throw new Ue(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/guardrails/policies/{id}")}deleteGuardrailPolicy(i,r={},t){return P.fromPromise(this.__deleteGuardrailPolicy(i,r,t))}async __deleteGuardrailPolicy(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/guardrails/policies/${_.encodePathParam(i)}`),method:"DELETE",headers:o,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")switch(a.error.statusCode){case 403:throw new se(a.error.body,a.rawResponse);case 503:throw new Ue(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,"DELETE","/v1/private/guardrails/policies/{id}")}};});var Id,Qq=n(()=>{Z();Q();b();$();q();J();ie();ee();Id=class{constructor(i={}){this._options=B(i);}createGuardrails(i,r){return P.fromPromise(this.__createGuardrails(i,r))}async __createGuardrails(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/guardrails")}validateGuardrails(i,r){return P.fromPromise(this.__validateGuardrails(i,r))}async __validateGuardrails(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/validations"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ca.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:lI.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/guardrails/validations")}};});var Dd,$q=n(()=>{Z();Q();b();$();q();J();ie();ee();Dd=class{constructor(i={}){this._options=B(i);}findInsightsViews(i={},r){return P.fromPromise(this.__findInsightsViews(i,r))}async __findInsightsViews(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r){return P.fromPromise(this.__createInsightsView(i,r))}async __createInsightsView(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:js.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:nr.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(i,r={},t){return P.fromPromise(this.__getInsightsViewById(i,r,t))}async __getInsightsViewById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:nr.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(i,r={},t){return P.fromPromise(this.__deleteInsightsView(i,r,t))}async __deleteInsightsView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateInsightsView(i,r,t))}async __updateInsightsView(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{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:nr.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,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(i,r){return P.fromPromise(this.__deleteInsightsViewsBatch(i,r))}async __deleteInsightsViewsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/insights-views/delete-batch")}runInsightsViewWidgetQuery(i,r,t,o){return P.fromPromise(this.__runInsightsViewWidgetQuery(i,r,t,o))}async __runInsightsViewWidgetQuery(i,r,t,o){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=o==null?void 0:o.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),o==null?void 0:o.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/insights-views/${_.encodePathParam(i)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ts.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=o==null?void 0:o.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=o==null?void 0:o.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.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 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new O(c.error.body,c.rawResponse);case 429:throw new fe(c.error.body,c.rawResponse);case 501:throw new Se(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,"POST","/v1/private/insights-views/{insightsViewId}/widgets/{widgetId}/query")}};});var Ud,Yq=n(()=>{Z();Q();b();$();q();J();ie();Ud=class{constructor(i={}){this._options=B(i);}getLlmModels(i){return P.fromPromise(this.__getLlmModels(i))}async __getLlmModels(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_t.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")}getLlmModelProfiles(i){return P.fromPromise(this.__getLlmModelProfiles(i))}async __getLlmModelProfiles(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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/profiles"),method:"GET",headers:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:_t.getLlmModelProfiles.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/profiles")}};});var Nd,Xq=n(()=>{Z();Q();b();$();q();J();ie();ee();Nd=class{constructor(i={}){this._options=B(i);}deleteLlmProviderApiKeysBatch(i,r){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(i,r))}async __deleteLlmProviderApiKeysBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(i){return P.fromPromise(this.__findLlmProviderKeys(i))}async __findLlmProviderKeys(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:XU.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(i,r){return P.fromPromise(this.__storeLlmProviderApiKey(i,r))}async __storeLlmProviderApiKey(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ua.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new K(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(i,r={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(i,r,t))}async __getLlmProviderApiKeyById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:sp.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(i,r={},t){return P.fromPromise(this.__updateLlmProviderApiKey(i,r,t))}async __updateLlmProviderApiKey(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Da.jsonOrThrow(r,{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 K(a.error.body,a.rawResponse);case 403:throw new se(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(i={},r){return P.fromPromise(this.__testLlmProviderAuthConfig(i,r))}async __testLlmProviderAuthConfig(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 403:throw new se(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Fd,Zq=n(()=>{Z();Q();b();$();q();J();ie();ee();Fd=class{constructor(i={}){this._options=B(i);}evaluateSpans(i,r){return P.fromPromise(this.__evaluateSpans(i,r))}async __evaluateSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(i,r){return P.fromPromise(this.__evaluateThreads(i,r))}async __evaluateThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(i,r){return P.fromPromise(this.__evaluateTraces(i,r))}async __evaluateTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:tp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Bd,qq=n(()=>{Z();Q();b();$();q();J();ie();ee();Bd=class{constructor(i={}){this._options=B(i);}authorize(i,r){return P.fromPromise(this.__authorize(i,r))}async __authorize(i,r){var g,h,y,w,A,C,I,D,F,M,Y;let{clientId:t,redirectUri:o,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=i,u={client_id:t,redirect_uri:o,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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__consent(i,r))}async __consent(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ba.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:dT.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(i,r){return P.fromPromise(this.__getAuthorizeContext(i,r))}async __getAuthorizeContext(i,r){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:o}=i,a={client_id:t,redirect_uri:o},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:rP.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(i){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(i))}async __getOAuthAuthorizationServerMetadata(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ZA.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(i,r){return P.fromPromise(this.__registerOAuthClient(i,r))}async __registerOAuthClient(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Kv.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===429?new fe(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/register")}revoke(i={},r){return P.fromPromise(this.__revoke(i,r))}async __revoke(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"form",body:Ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/revoke")}token(i={},r){return P.fromPromise(this.__token(i,r))}async __token(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"form",body:Wa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:PN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/oauth/token")}validateOAuthToken(i){return P.fromPromise(this.__validateOAuthToken(i))}async __validateOAuthToken(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:HN.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 K(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 Md,eee=n(()=>{Z();Q();b();$();q();J();ie();ee();Md=class{constructor(i={}){this._options=B(i);}listModels(i,r){return P.fromPromise(this.__listModels(i,r))}async __listModels(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:cd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:wi.listModels.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 500:throw new gt(o.error.body,o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/ollama/models")}testConnection(i,r){return P.fromPromise(this.__testConnection(i,r))}async __testConnection(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:cd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:pd.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 422:throw new O(o.error.body,o.rawResponse);case 502:throw new xo(pd.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 503:throw new Ue(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var Wd,ree=n(()=>{Z();Q();b();$();q();J();ee();Wd=class{constructor(i={}){this._options=B(i);}downloadOllieState(i){return P.fromPromise(this.__downloadOllieState(i))}async __downloadOllieState(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,responseType:"streaming",timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 K(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(i,r){return P.fromPromise(this.__replaceOllieState(i,r))}async __replaceOllieState(i,r){var s,c,l,m,u,d,f,g,h,y,w;let t=await ko.toBinaryUploadRequest(i),o=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=r==null?void 0:r.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,r==null?void 0:r.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:o,contentType:"application/gzip",queryParameters:r==null?void 0:r.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=r==null?void 0:r.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=r==null?void 0:r.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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 K(a.error.body,a.rawResponse);case 429: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,"PUT","/v1/private/ollie/state")}deleteOllieState(i){return P.fromPromise(this.__deleteOllieState(i))}async __deleteOllieState(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 K(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 Vd,tee=n(()=>{Z();Q();b();$();q();J();Vd=class{constructor(i={}){this._options=B(i);}receiveProtobufTraces(i){return P.fromPromise(this.__receiveProtobufTraces(i))}async __receiveProtobufTraces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 Ld,iee=n(()=>{Z();Q();b();$();q();J();ie();ee();Ld=class{constructor(i={}){this._options=B(i);}findOptimizations(i={},r){return P.fromPromise(this.__findOptimizations(i,r))}async __findOptimizations(i={},r){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:t,size:o,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=i,d={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:op.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(i,r){return P.fromPromise(this.__createOptimization(i,r))}async __createOptimization(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ld.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(i,r){return P.fromPromise(this.__upsertOptimization(i,r))}async __upsertOptimization(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ld.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(i,r){return P.fromPromise(this.__deleteOptimizationsById(i,r))}async __deleteOptimizationsById(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ui.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(i,r={},t){return P.fromPromise(this.__getOptimizationById(i,r,t))}async __getOptimizationById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ip.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(i,r={},t){return P.fromPromise(this.__updateOptimizationsById(i,r,t))}async __updateOptimizationsById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Va.jsonOrThrow(r,{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(i,r={},t){return P.fromPromise(this.__getStudioOptimizationLogs(i,r,t))}async __getStudioOptimizationLogs(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/logs`),method:"GET",headers:o,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:BD.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 Jd,oee=n(()=>{Z();Q();b();$();q();J();ie();ee();Jd=class{constructor(i={}){this._options=B(i);}activatePairingSession(i,r,t){return P.fromPromise(this.__activatePairingSession(i,r,t))}async __activatePairingSession(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/activate`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:La.jsonOrThrow(r,{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 se(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 O(a.error.body,a.rawResponse);case 429: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/pairing/sessions/{sessionId}/activate")}createPairingSession(i,r){return P.fromPromise(this.__createPairingSession(i,r))}async __createPairingSession(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fT.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 429:throw new fe(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/pairing/sessions")}};});var Gd,aee=n(()=>{Z();Q();b();$();q();J();ie();ee();Gd=class{constructor(i={}){this._options=B(i);}findAlertsByProject(i,r={},t){return P.fromPromise(this.__findAlertsByProject(i,r,t))}async __findAlertsByProject(i,r={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:o,size:a,sorting:s,filters:c}=r,l={page:o,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(i)}/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:Kn.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(i,r={},t){return P.fromPromise(this.__findDashboardsByProject(i,r,t))}async __findDashboardsByProject(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,name:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Lt.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(i,r={},t){return P.fromPromise(this.__findDatasetsByProject(i,r,t))}async __findDatasetsByProject(i,r={},t){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:o,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=r,d={page:o,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(i)}/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:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:Ws.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(i,r={},t){return P.fromPromise(this.__findExperimentsByProject(i,r,t))}async __findExperimentsByProject(i,r={},t){var C,I,D,F,M,Y,pe,ye,Ee,Ie,De;let{page:o,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=r,y={page:o,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((M=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?M:v.Default,`v1/private/projects/${_.encodePathParam(i)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((ye=(pe=t==null?void 0:t.timeoutInSeconds)!=null?pe:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?ye:60)*1e3,maxRetries:(Ie=t==null?void 0:t.maxRetries)!=null?Ie:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(De=this._options)==null?void 0:De.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 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(i,r={},t){return P.fromPromise(this.__findOptimizationsByProject(i,r,t))}async __findOptimizationsByProject(i,r={},t){var h,y,w,A,C,I,D,F,M,Y,pe;let{page:o,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=r,d={page:o,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(i)}/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:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:op.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(i,r={},t){return P.fromPromise(this.__getPromptsByProject(i,r,t))}async __getPromptsByProject(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,name:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:np.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(i={},r){return P.fromPromise(this.__findProjects(i,r))}async __findProjects(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:o,name:a,sorting:s}=i,c={page:t,size:o,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:cU.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(i,r){return P.fromPromise(this.__createProject(i,r))}async __createProject(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:$a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/projects")}getProjectById(i,r={},t){return P.fromPromise(this.__getProjectById(i,r,t))}async __getProjectById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ap.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(i,r={},t){return P.fromPromise(this.__deleteProjectById(i,r,t))}async __deleteProjectById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r={},t){return P.fromPromise(this.__updateProject(i,r,t))}async __updateProject(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qa.jsonOrThrow(r,{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 O(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(i,r){return P.fromPromise(this.__deleteProjectsBatch(i,r))}async __deleteProjectsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(i={},r){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(i,r))}async __findFeedbackScoreNamesByProjectIds(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=i,o={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:hE.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(i,r={},t){return P.fromPromise(this.__findTokenUsageNames(i,r,t))}async __findTokenUsageNames(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/token-usage/names`),method:"GET",headers:o,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:mp.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(i,r,t){return P.fromPromise(this.__getProjectKpiCards(i,r,t))}async __getProjectKpiCards(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/kpi-cards`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ga.jsonOrThrow(r,{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:yI.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(i,r={},t){return P.fromPromise(this.__getProjectMetrics(i,r,t))}async __getProjectMetrics(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/metrics`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Oa.jsonOrThrow(r,{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:aU.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(i={},r){return P.fromPromise(this.__getProjectStats(i,r))}async __getProjectStats(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{page:t,size:o,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=i,u={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:fU.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(i,r){return P.fromPromise(this.__retrieveProject(i,r))}async __retrieveProject(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ZD.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(i,r={},t){return P.fromPromise(this.__getRecentActivity(i,r,t))}async __getRecentActivity(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:tN.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 gt(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 Hd,nee=n(()=>{Z();Q();b();$();q();J();ie();ee();Hd=class{constructor(i={}){this._options=B(i);}getPrompts(i={},r){return P.fromPromise(this.__getPrompts(i,r))}async __getPrompts(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:o,name:a,projectId:s,sorting:c,filters:l}=i,m={page:t,size:o,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:np.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(i,r){return P.fromPromise(this.__createPrompt(i,r))}async __createPrompt(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:an.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(i,r){return P.fromPromise(this.__createPromptVersion(i,r))}async __createPromptVersion(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Xa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Fe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(i,r){return P.fromPromise(this.__updatePromptVersions(i,r))}async __updatePromptVersions(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:qa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(i,r={},t){return P.fromPromise(this.__getPromptById(i,r,t))}async __getPromptById(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:o,environment:a}=r,s={mask_id:o,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(i)}`),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:dd.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(i,r,t){return P.fromPromise(this.__updatePrompt(i,r,t))}async __updatePrompt(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Za.jsonOrThrow(r,{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 O(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(i,r={},t){return P.fromPromise(this.__deletePrompt(i,r,t))}async __deletePrompt(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r){return P.fromPromise(this.__deletePromptsBatch(i,r))}async __deletePromptsBatch(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(i,r={},t){return P.fromPromise(this.__getPromptByCommit(i,r,t))}async __getPromptByCommit(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:dd.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(i,r={},t){return P.fromPromise(this.__getPromptVersionById(i,r,t))}async __getPromptVersionById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Fe.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(i,r,t={},o){return P.fromPromise(this.__getPromptVersionByNumber(i,r,t,o))}async __getPromptVersionByNumber(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/by-number/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Fe.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(i,r={},t){return P.fromPromise(this.__getPromptVersions(i,r,t))}async __getPromptVersions(i,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:o,size:a,search:s,sorting:c,filters:l}=r,m={page:o,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(i)}/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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:VU.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(i,r){return P.fromPromise(this.__getPromptsByCommits(i,r))}async __getPromptsByCommits(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:en.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Pt.getPromptsByCommits.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(i,r,t={},o){return P.fromPromise(this.__restorePromptVersion(i,r,t,o))}async __restorePromptVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/versions/${_.encodePathParam(r)}/restore`),method:"POST",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Fe.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(i,r){return P.fromPromise(this.__retrievePromptVersion(i,r))}async __retrievePromptVersion(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:on.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Fe.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(i,r){return P.fromPromise(this.__retrievePromptVersionsByIds(i,r))}async __retrievePromptVersionsByIds(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:tn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Pt.retrievePromptVersionsByIds.Response.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(i,r,t){return P.fromPromise(this.__setPromptVersionEnvironment(i,r,t))}async __setPromptVersionEnvironment(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/environments`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:rn.jsonOrThrow(r,{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 Od,see=n(()=>{Z();Q();b();$();q();J();ee();Od=class{constructor(i={}){this._options=B(i);}datasetsRedirect(i,r){return P.fromPromise(this.__datasetsRedirect(i,r))}async __datasetsRedirect(i,r){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:o,path:a}=i,s={dataset_id:t,workspace_name:o,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__experimentsRedirect(i,r))}async __experimentsRedirect(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:o,workspaceName:a,path:s}=i,c={dataset_id:t,experiment_id:o,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__optimizationsRedirect(i,r))}async __optimizationsRedirect(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:o,workspaceName:a,path:s}=i,c={dataset_id:t,optimization_id:o,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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(i,r){return P.fromPromise(this.__projectsRedirect(i,r))}async __projectsRedirect(i,r){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:o,path:a}=i,s={trace_id:t,workspace_name:o,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.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 Kd,pee=n(()=>{Z();Q();b();$();q();J();ie();ee();Kd=class{constructor(i={}){this._options=B(i);}findReportFailures(i,r){return P.fromPromise(this.__findReportFailures(i,r))}async __findReportFailures(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:o,page:a,size:s}=i,c={type:Vl.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:o,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:nN.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 K(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(i,r){return P.fromPromise(this.__createReportFailure(i,r))}async __createReportFailure(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:pp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/report-failures")}};});var Qd,cee=n(()=>{Z();Q();b();$();q();J();ie();ee();Qd=class{constructor(i={}){this._options=B(i);}completeReport(i,r,t,o){return P.fromPromise(this.__completeReport(i,r,t,o))}async __completeReport(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/reports/${_.encodePathParam(r)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:nn.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r={},t){return P.fromPromise(this.__generateReport(i,r,t))}async __generateReport(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/reports/generate`),method:"POST",headers:o,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:CE.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 K(a.error.body,a.rawResponse);case 403:throw new se(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(i,r={},t){return P.fromPromise(this.__getReportPreference(i,r,t))}async __getReportPreference(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/reports/preferences`),method:"GET",headers:o,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:cp.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(i,r,t){return P.fromPromise(this.__updateReportPreference(i,r,t))}async __updateReportPreference(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:cp.jsonOrThrow(o,{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:cp.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(i,r={},t){return P.fromPromise(this.__getReports(i,r,t))}async __getReports(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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(i)}/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:GI.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 $d,lee=n(()=>{Z();Q();b();$();q();J();ie();ee();$d=class{constructor(i={}){this._options=B(i);}findRetentionRules(i={},r){return P.fromPromise(this.__findRetentionRules(i,r))}async __findRetentionRules(i={},r){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:o,includeInactive:a}=i,s={page:t,size:o,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:uN.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(i,r){return P.fromPromise(this.__createRetentionRule(i,r))}async __createRetentionRule(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Mi.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(i,r={},t){return P.fromPromise(this.__getRetentionRuleById(i,r,t))}async __getRetentionRuleById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:Mi.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(i,r={},t){return P.fromPromise(this.__deactivateRetentionRule(i,r,t))}async __deactivateRetentionRule(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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 Yd,mee=n(()=>{Z();Q();b();$();q();J();ie();ee();Yd=class{constructor(i={}){this._options=B(i);}getJobLogs(i,r={},t){return P.fromPromise(this.__getJobLogs(i,r,t))}async __getJobLogs(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:o}=r,a={offset:o},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(i)}/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:hr.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(i,r,t){return P.fromPromise(this.__appendJobLogs(i,r,t))}async __appendJobLogs(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.appendJobLogs.Request.jsonOrThrow(o,{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(i,r={},t){return P.fromPromise(this.__cancelJob(i,r,t))}async __cancelJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/cancel`),method:"POST",headers:o,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(i,r,t){return P.fromPromise(this.__createBridgeCommand(i,r,t))}async __createBridgeCommand(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/bridge/commands`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ln.jsonOrThrow(r,{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:rv.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 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/local-runners/{runnerId}/bridge/commands")}createJob(i,r){return P.fromPromise(this.__createJob(i,r))}async __createJob(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 404:throw new U(o.error.body,o.rawResponse);case 409:throw new X(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(i,r={},t){return P.fromPromise(this.__getRunner(i,r,t))}async __getRunner(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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:ep.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(i,r={},t){return P.fromPromise(this.__disconnectRunner(i,r,t))}async __disconnectRunner(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t={},o){return P.fromPromise(this.__getBridgeCommand(i,r,t,o))}async __getBridgeCommand(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),o==null?void 0:o.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(i)}/bridge/commands/${_.encodePathParam(r)}`),method:"GET",headers:l,queryParameters:{...c,...o==null?void 0:o.queryParams},timeoutMs:((A=(w=o==null?void 0:o.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=o==null?void 0:o.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:$S.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(i,r={},t){return P.fromPromise(this.__getJob(i,r,t))}async __getJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"GET",headers:o,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")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(i,r={},t){return P.fromPromise(this.__heartbeat(i,r,t))}async __heartbeat(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/heartbeats`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:un.jsonOrThrow(r,{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:kI.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 ut(Zj.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(i,r={},t){return P.fromPromise(this.__listJobs(i,r,t))}async __listJobs(i,r={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,page:a,size:s}=r,c={project_id:o,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(i)}/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:AI.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(i,r){return P.fromPromise(this.__listRunners(i,r))}async __listRunners(i,r){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:o,page:a,size:s}=i,c={project_id:t,status:o!=null?om.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:PI.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(i,r={},t){return P.fromPromise(this.__nextBridgeCommands(i,r,t))}async __nextBridgeCommands(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/bridge/commands/next`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:pn.jsonOrThrow(r,{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:ev.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(i,r={},t){return P.fromPromise(this.__nextJob(i,r,t))}async __nextJob(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/jobs/next`),method:"POST",headers:o,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:hr.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(i,r,t){return P.fromPromise(this.__patchChecklist(i,r,t))}async __patchChecklist(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.patchChecklist.Request.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__registerAgents(i,r,t))}async __registerAgents(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.registerAgents.Request.jsonOrThrow(o,{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(i,r,t,o){return P.fromPromise(this.__reportBridgeResult(i,r,t,o))}async __reportBridgeResult(i,r,t,o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/bridge/commands/${_.encodePathParam(r)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:cn.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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(i,r,t){return P.fromPromise(this.__reportJobResult(i,r,t))}async __reportJobResult(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}/results`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:gn.jsonOrThrow(r,{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 Xd,dee=n(()=>{Z();Q();b();$();q();J();ie();Xd=class{constructor(i={}){this._options=B(i);}getServiceToggles(i){return P.fromPromise(this.__getServiceToggles(i))}async __getServiceToggles(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:gN.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 Zd,uee=n(()=>{Z();Q();b();$();q();J();ie();ee();Zd=class{constructor(i={}){this._options=B(i);}addSpanComment(i,r,t){return P.fromPromise(this.__addSpanComment(i,r,t))}async __addSpanComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addSpanFeedbackScore(i,r,t))}async __addSpanFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ze.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__createSpans(i,r))}async __createSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:xn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(i,r){return P.fromPromise(this.__batchUpdateSpans(i,r))}async __batchUpdateSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:yn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(i={},r){return P.fromPromise(this.__getSpansByProject(i,r))}async __getSpansByProject(i={},r){var D,F,M,Y,pe,ye,Ee,Ie,De,er,ho;let{page:t,size:o,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=i,A={page:t,size:o,project_name:a,project_id:s,trace_id:c,type:l!=null?cm.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":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ie=(Ee=r==null?void 0:r.timeoutInSeconds)!=null?Ee:(ye=this._options)==null?void 0:ye.timeoutInSeconds)!=null?Ie:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(De=this._options)==null?void 0:De.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(ho=this._options)==null?void 0:ho.fetch,logging:this._options.logging});if(I.ok)return {data:xN.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(i,r){return P.fromPromise(this.__createSpan(i,r))}async __createSpan(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Rn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?new X(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans")}getSpanById(i,r={},t){return P.fromPromise(this.__getSpanById(i,r,t))}async __getSpanById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=r,a={strip_attachments:o},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(i)}`),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:lp.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(i,r={},t){return P.fromPromise(this.__deleteSpanById(i,r,t))}async __deleteSpanById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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 Se(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(i,r,t){return P.fromPromise(this.__updateSpan(i,r,t))}async __updateSpan(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteSpanComments(i,r))}async __deleteSpanComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(i,r,t){return P.fromPromise(this.__deleteSpanFeedbackScore(i,r,t))}async __deleteSpanFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vs.jsonOrThrow(o,{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(i={},r){return P.fromPromise(this.__findFeedbackScoreNames1(i,r))}async __findFeedbackScoreNames1(i={},r){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:o}=i,a={project_id:t,type:o!=null?sm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.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(i,r,t={},o){return P.fromPromise(this.__getSpanComment(i,r,t,o))}async __getSpanComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i={},r){return P.fromPromise(this.__getSpanStats(i,r))}async __getSpanStats(i={},r){var h,y,w,A,C,I,D,F,M,Y,pe;let{projectId:t,projectName:o,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=i,d={project_id:t,project_name:o,trace_id:a,type:s!=null?pm.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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=r==null?void 0:r.maxRetries)!=null?Y:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:qr.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(i,r){return P.fromPromise(this.__scoreBatchOfSpans(i,r))}async __scoreBatchOfSpans(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Zs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(i={},r){return P.fromPromise(this.__searchSpans(i,r))}async __searchSpans(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:wn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/spans/search")}exist(i={},r){return P.fromPromise(this.__exist(i,r))}async __exist(i={},r){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:o,source:a}=i,s={project_id:t,project_name:o,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Hs.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(i,r,t){return P.fromPromise(this.__updateSpanComment(i,r,t))}async __updateSpanComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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 qd,gee=n(()=>{Z();Q();b();$();q();J();ie();ee();qd=class{constructor(i={}){this._options=B(i);}executeAnalyticsQuery(i,r,t){return P.fromPromise(this.__executeAnalyticsQuery(i,r,t))}async __executeAnalyticsQuery(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:_n.jsonOrThrow(r,{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 422:throw new O(a.error.body,a.rawResponse);case 501:throw new Se(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(i,r){return P.fromPromise(this.__executeScopedAnalyticsQuery(i,r))}async __executeScopedAnalyticsQuery(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:$r.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);case 501:throw new Se(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/internal/analytics-queries")}};});var eu,fee=n(()=>{Z();Q();b();$();q();J();ie();ee();eu=class{constructor(i={}){this._options=B(i);}findUsageProjects(i,r){return P.fromPromise(this.__findUsageProjects(i,r))}async __findUsageProjects(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/usage/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:An.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:GN.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/internal/usage/projects")}getDatasetBiInfo(i){return P.fromPromise(this.__getDatasetBiInfo(i))}async __getDatasetBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getExperimentBiInfo(i))}async __getExperimentBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getSpansBiInfo(i))}async __getSpansBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(i))}async __getSpansCountBreakdownForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:VN.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(i){return P.fromPromise(this.__getSpansCountForWorkspaces(i))}async __getSpansCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:kN.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(i){return P.fromPromise(this.__getTracesBiInfo(i))}async __getTracesBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Ii.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(i){return P.fromPromise(this.__getTracesCountForWorkspaces(i))}async __getTracesCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vN.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 ru,hee=n(()=>{Z();Q();b();$();q();J();ie();ee();ru=class{constructor(i={}){this._options=B(i);}addThreadComment(i,r,t){return P.fromPromise(this.__addThreadComment(i,r,t))}async __addThreadComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addTraceComment(i,r,t))}async __addTraceComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__addTraceFeedbackScore(i,r,t))}async __addTraceFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ze.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__createTraces(i,r))}async __createTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:En.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(i,r){return P.fromPromise(this.__batchUpdateTraces(i,r))}async __batchUpdateTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(i,r){return P.fromPromise(this.__batchUpdateThreads(i,r))}async __batchUpdateThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Nn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(i={},r){return P.fromPromise(this.__closeTraceThread(i,r))}async __closeTraceThread(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(i={},r){return P.fromPromise(this.__getTracesByProject(i,r))}async __getTracesByProject(i={},r){var I,D,F,M,Y,pe,ye,Ee,Ie,De,er;let{page:t,size:o,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=i,w={page:t,size:o,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=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((Y=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((Ee=(ye=r==null?void 0:r.timeoutInSeconds)!=null?ye:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(De=r==null?void 0:r.maxRetries)!=null?De:(Ie=this._options)==null?void 0:Ie.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:DN.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(i,r){return P.fromPromise(this.__createTrace(i,r))}async __createTrace(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Cn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces")}getTraceById(i,r={},t){return P.fromPromise(this.__getTraceById(i,r,t))}async __getTraceById(i,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=r,a={strip_attachments:o},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(i)}`),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:dp.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(i,r={},t){return P.fromPromise(this.__deleteTraceById(i,r,t))}async __deleteTraceById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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(i)}`),method:"DELETE",headers:o,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(i,r,t){return P.fromPromise(this.__updateTrace(i,r,t))}async __updateTrace(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Tn.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteThreadComments(i,r))}async __deleteThreadComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(i,r){return P.fromPromise(this.__deleteThreadFeedbackScores(i,r))}async __deleteThreadFeedbackScores(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:zn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(i,r){return P.fromPromise(this.__deleteTraceComments(i,r))}async __deleteTraceComments(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:ue.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(i,r,t){return P.fromPromise(this.__deleteTraceFeedbackScore(i,r,t))}async __deleteTraceFeedbackScore(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vs.jsonOrThrow(o,{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(i,r){return P.fromPromise(this.__deleteTraceThreads(i,r))}async __deleteTraceThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(i,r){return P.fromPromise(this.__deleteTraces(i,r))}async __deleteTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Pn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(i={},r){return P.fromPromise(this.__findFeedbackScoreNames2(i,r))}async __findFeedbackScoreNames2(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=i,o={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(i,r))}async __findTraceThreadsFeedbackScoreNames(i={},r){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=i,o={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.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:{...o,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.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(i={},r){return P.fromPromise(this.__getTraceStats(i,r))}async __getTraceStats(i={},r){var g,h,y,w,A,C,I,D,F,M,Y;let{projectId:t,projectName:o,filters:a,search:s,fromTime:c,toTime:l,annotationQueueId:m}=i,u={project_id:t,project_name:o,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),annotation_queue_id:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.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/traces/stats"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:qr.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/traces/stats")}getThreadComment(i,r,t={},o){return P.fromPromise(this.__getThreadComment(i,r,t,o))}async __getThreadComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i={},r){return P.fromPromise(this.__getTraceThreadStats(i,r))}async __getTraceThreadStats(i={},r){var f,g,h,y,w,A,C,I,D,F,M;let{projectId:t,projectName:o,filters:a,search:s,fromTime:c,toTime:l}=i,m={project_id:t,project_name:o,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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:qr.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(i,r,t={},o){return P.fromPromise(this.__getTraceComment(i,r,t,o))}async __getTraceComment(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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(i)}/comments/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:he.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(i,r){return P.fromPromise(this.__getTraceThread(i,r))}async __getTraceThread(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:up.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===404?new U(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(i={},r){return P.fromPromise(this.__getTraceThreads(i,r))}async __getTraceThreads(i={},r){var I,D,F,M,Y,pe,ye,Ee,Ie,De,er;let{page:t,size:o,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=i,w={page:t,size:o,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters: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=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((Y=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces/threads"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((Ee=(ye=r==null?void 0:r.timeoutInSeconds)!=null?ye:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(De=r==null?void 0:r.maxRetries)!=null?De:(Ie=this._options)==null?void 0:Ie.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:BN.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/threads")}openTraceThread(i,r){return P.fromPromise(this.__openTraceThread(i,r))}async __openTraceThread(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gd.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(i,r){return P.fromPromise(this.__scoreBatchOfThreads(i,r))}async __scoreBatchOfThreads(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:vn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(i,r){return P.fromPromise(this.__scoreBatchOfTraces(i,r))}async __scoreBatchOfTraces(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Zs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(i={},r){return P.fromPromise(this.__searchTraceThreads(i,r))}async __searchTraceThreads(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Fn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(i={},r){return P.fromPromise(this.__searchTraces(i,r))}async __searchTraces(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:In.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 401:throw new K(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"POST","/v1/private/traces/search")}exist(i={},r){return P.fromPromise(this.__exist(i,r))}async __exist(i={},r){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:o,source:a,threadOnly:s}=i,c={project_id:t,project_name:o,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.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,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Hs.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(i,r,t){return P.fromPromise(this.__updateThread(i,r,t))}async __updateThread(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Un.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__updateThreadComment(i,r,t))}async __updateThreadComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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(i,r,t){return P.fromPromise(this.__updateTraceComment(i,r,t))}async __updateTraceComment(i,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=r,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(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:he.jsonOrThrow(o,{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 tu,yee=n(()=>{Z();Q();b();$();q();J();ie();ee();tu=class{constructor(i={}){this._options=B(i);}createView(i,r){return P.fromPromise(this.__createView(i,r))}async __createView(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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/views"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Mn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Vi.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===422?new O(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/views")}getViewVersions(i,r={},t){return P.fromPromise(this.__getViewVersions(i,r,t))}async __getViewVersions(i,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=r,s={page:o,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/views/${_.encodePathParam(i)}/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:iF.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===404?new U(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/views/{id}/versions")}createViewVersion(i,r,t){return P.fromPromise(this.__createViewVersion(i,r,t))}async __createViewVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}/versions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ln.jsonOrThrow(r,{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:Wi.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 422:throw new O(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/views/{id}/versions")}getViewById(i,r={},t){return P.fromPromise(this.__getViewById(i,r,t))}async __getViewById(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"GET",headers:o,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:Vi.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/views/{id}")}deleteView(i,r={},t){return P.fromPromise(this.__deleteView(i,r,t))}async __deleteView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"DELETE",headers:o,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/views/{id}")}updateView(i,r={},t){return P.fromPromise(this.__updateView(i,r,t))}async __updateView(i,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Vn.jsonOrThrow(r,{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:Vi.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/views/{id}")}getViewVersion(i,r,t={},o){return P.fromPromise(this.__getViewVersion(i,r,t,o))}async __getViewVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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/views/${_.encodePathParam(i)}/versions/${_.encodePathParam(r)}`),method:"GET",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Wi.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/views/{id}/versions/{version}")}deleteViewVersion(i,r,t={},o){return P.fromPromise(this.__deleteViewVersion(i,r,t,o))}async __deleteViewVersion(i,r,t={},o){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=o==null?void 0:o.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),o==null?void 0:o.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/views/${_.encodePathParam(i)}/versions/${_.encodePathParam(r)}`),method:"DELETE",headers:a,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((h=(g=o==null?void 0:o.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=o==null?void 0:o.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.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,"DELETE","/v1/private/views/{id}/versions/{version}")}setViewCurrentVersion(i,r,t){return P.fromPromise(this.__setViewCurrentVersion(i,r,t))}async __setViewCurrentVersion(i,r,t){var s,c,l,m,u,d,f,g,h,y,w;let o=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/views/${_.encodePathParam(i)}/current`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wn.jsonOrThrow(r,{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:Vi.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,"PUT","/v1/private/views/{id}/current")}};});var iu,bee=n(()=>{Z();Q();b();$();q();J();ie();iu=class{constructor(i={}){this._options=B(i);}getWelcomeWizardStatus(i){return P.fromPromise(this.__getWelcomeWizardStatus(i))}async __getWelcomeWizardStatus(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:pF.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(i={},r){return P.fromPromise(this.__submitWelcomeWizard(i,r))}async __submitWelcomeWizard(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Jn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/welcome-wizard")}};});var ou,Ree=n(()=>{Z();Q();b();$();q();J();ie();ee();ou=class{constructor(i={}){this._options=B(i);}getWorkspaceUserPermissions(i){return P.fromPromise(this.__getWorkspaceUserPermissions(i))}async __getWorkspaceUserPermissions(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:mF.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 K(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 au,xee=n(()=>{Z();Q();b();$();q();J();ie();ee();au=class{constructor(i={}){this._options=B(i);}costsSummary(i,r){return P.fromPromise(this.__costsSummary(i,r))}async __costsSummary(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Er.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(i){return P.fromPromise(this.__getWorkspaceConfiguration(i))}async __getWorkspaceConfiguration(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:gp.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(i,r){return P.fromPromise(this.__upsertWorkspaceConfiguration(i,r))}async __upsertWorkspaceConfiguration(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:gp.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:gp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new N(o.error.body,o.rawResponse);case 422:throw new O(o.error.body,o.rawResponse);default:throw new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse})}return j(o.error,o.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(i){return P.fromPromise(this.__deleteWorkspaceConfiguration(i))}async __deleteWorkspaceConfiguration(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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(i,r){return P.fromPromise(this.__getCost(i,r))}async __getCost(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(i,r){return P.fromPromise(this.__getMetric(i,r))}async __getMetric(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(i,r){return P.fromPromise(this.__getWorkspaceSpanMetric(i,r))}async __getWorkspaceSpanMetric(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Gn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(i={},r){return P.fromPromise(this.__getWorkspaceTokenUsageNames(i,r))}async __getWorkspaceTokenUsageNames(i={},r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Hn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:mp.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(i,r){return P.fromPromise(this.__metricsSummary(i,r))}async __metricsSummary(i,r){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=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),o=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:r==null?void 0:r.queryParams,requestType:"json",body:Li.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:cF.parseOrThrow(o.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new N(o.error.body,o.rawResponse):new k({statusCode:o.error.statusCode,body:o.error.body,rawResponse:o.rawResponse});return j(o.error,o.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var hp,wee=n(()=>{jq();Cq();Eq();Iq();Dq();Uq();Nq();Fq();Bq();Mq();Wq();Vq();Lq();Jq();Gq();Hq();Oq();Kq();Qq();$q();Yq();Xq();Zq();qq();eee();ree();tee();iee();oee();aee();nee();see();pee();cee();lee();mee();dee();uee();gee();fee();hee();yee();bee();Ree();xee();Z();Q();b();$();q();J();hp=class{constructor(i={}){this._options=B(i);}get mcpOAuth(){var i;return (i=this._mcpOAuth)!=null?i:this._mcpOAuth=new Bd(this._options)}get agentInsightsEnrollment(){var i;return (i=this._agentInsightsEnrollment)!=null?i:this._agentInsightsEnrollment=new yd(this._options)}get systemAnalyticsQueries(){var i;return (i=this._systemAnalyticsQueries)!=null?i:this._systemAnalyticsQueries=new qd(this._options)}get dashboardSavedQueries(){var i;return (i=this._dashboardSavedQueries)!=null?i:this._dashboardSavedQueries=new zd(this._options)}get systemUsage(){var i;return (i=this._systemUsage)!=null?i:this._systemUsage=new eu(this._options)}get agentConfigs(){var i;return (i=this._agentConfigs)!=null?i:this._agentConfigs=new fd(this._options)}get agentInsightsJobs(){var i;return (i=this._agentInsightsJobs)!=null?i:this._agentInsightsJobs=new bd(this._options)}get agentInsights(){var i;return (i=this._agentInsights)!=null?i:this._agentInsights=new hd(this._options)}get alerts(){var i;return (i=this._alerts)!=null?i:this._alerts=new Rd(this._options)}get annotationQueues(){var i;return (i=this._annotationQueues)!=null?i:this._annotationQueues=new xd(this._options)}get assertionResults(){var i;return (i=this._assertionResults)!=null?i:this._assertionResults=new wd(this._options)}get attachments(){var i;return (i=this._attachments)!=null?i:this._attachments=new _d(this._options)}get check(){var i;return (i=this._check)!=null?i:this._check=new Pd(this._options)}get automationRuleEvaluators(){var i;return (i=this._automationRuleEvaluators)!=null?i:this._automationRuleEvaluators=new kd(this._options)}get chatCompletions(){var i;return (i=this._chatCompletions)!=null?i:this._chatCompletions=new Ad(this._options)}get dashboards(){var i;return (i=this._dashboards)!=null?i:this._dashboards=new Sd(this._options)}get datasets(){var i;return (i=this._datasets)!=null?i:this._datasets=new vd(this._options)}get environments(){var i;return (i=this._environments)!=null?i:this._environments=new Td(this._options)}get experiments(){var i;return (i=this._experiments)!=null?i:this._experiments=new jd(this._options)}get feedbackDefinitions(){var i;return (i=this._feedbackDefinitions)!=null?i:this._feedbackDefinitions=new Cd(this._options)}get guardrailPolicies(){var i;return (i=this._guardrailPolicies)!=null?i:this._guardrailPolicies=new Ed(this._options)}get guardrails(){var i;return (i=this._guardrails)!=null?i:this._guardrails=new Id(this._options)}get insightsViews(){var i;return (i=this._insightsViews)!=null?i:this._insightsViews=new Dd(this._options)}get llmModels(){var i;return (i=this._llmModels)!=null?i:this._llmModels=new Ud(this._options)}get llmProviderKey(){var i;return (i=this._llmProviderKey)!=null?i:this._llmProviderKey=new Nd(this._options)}get runners(){var i;return (i=this._runners)!=null?i:this._runners=new Yd(this._options)}get manualEvaluation(){var i;return (i=this._manualEvaluation)!=null?i:this._manualEvaluation=new Fd(this._options)}get ollama(){var i;return (i=this._ollama)!=null?i:this._ollama=new Md(this._options)}get ollieState(){var i;return (i=this._ollieState)!=null?i:this._ollieState=new Wd(this._options)}get openTelemetryIngestion(){var i;return (i=this._openTelemetryIngestion)!=null?i:this._openTelemetryIngestion=new Vd(this._options)}get optimizations(){var i;return (i=this._optimizations)!=null?i:this._optimizations=new Ld(this._options)}get pairing(){var i;return (i=this._pairing)!=null?i:this._pairing=new Jd(this._options)}get projects(){var i;return (i=this._projects)!=null?i:this._projects=new Gd(this._options)}get prompts(){var i;return (i=this._prompts)!=null?i:this._prompts=new Hd(this._options)}get reportFailures(){var i;return (i=this._reportFailures)!=null?i:this._reportFailures=new Kd(this._options)}get reports(){var i;return (i=this._reports)!=null?i:this._reports=new Qd(this._options)}get retentionRules(){var i;return (i=this._retentionRules)!=null?i:this._retentionRules=new $d(this._options)}get serviceToggles(){var i;return (i=this._serviceToggles)!=null?i:this._serviceToggles=new Xd(this._options)}get spans(){var i;return (i=this._spans)!=null?i:this._spans=new Zd(this._options)}get traces(){var i;return (i=this._traces)!=null?i:this._traces=new ru(this._options)}get views(){var i;return (i=this._views)!=null?i:this._views=new tu(this._options)}get welcomeWizard(){var i;return (i=this._welcomeWizard)!=null?i:this._welcomeWizard=new iu(this._options)}get workspacePermissions(){var i;return (i=this._workspacePermissions)!=null?i:this._workspacePermissions=new ou(this._options)}get workspaces(){var i;return (i=this._workspaces)!=null?i:this._workspaces=new au(this._options)}get redirect(){var i;return (i=this._redirect)!=null?i:this._redirect=new Od(this._options)}isAlive(i){return P.fromPromise(this.__isAlive(i))}async __isAlive(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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(i){return P.fromPromise(this.__version(i))}async __version(i){var o,a,s,c,l,m,u,d,f,g,h;let r=z((o=this._options)==null?void 0:o.headers,T({"Comet-Workspace":(s=i==null?void 0:i.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),i==null?void 0:i.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:r,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((d=(u=i==null?void 0:i.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=i==null?void 0:i.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.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 _ee=n(()=>{});var kee,Aee=n(()=>{wc();(r=>(r.LogLevel=He,r.ConsoleLogger=ft))(kee||(kee={}));});var Pee=n(()=>{_ee();Aee();});var zee=n(()=>{Pee();});var Ir=n(()=>{ee();wee();$();J();zee();ie();});exports.generateId=void 0;var sr=n(()=>{exports.generateId=()=>uuid.v7();});function vce(p){return p.templateStructure==="text"}function Tce(p){return p.templateStructure==="chat"}var Dr,nu=n(()=>{Dr=class{static serializePromptToInfoDict(i){let r;return vce(i)?r=i.prompt:Tce(i)?r=i.messages:r="",{name:i.name,...i.id&&{id:i.id},template_structure:i.templateStructure,version:{...i.versionId&&{id:i.versionId},...i.commit&&{commit:i.commit},template:r}}}static normalizeMetadata(i){if(!i)return {};if(typeof i=="object"&&!Array.isArray(i))return i;if(typeof i=="string")try{let r=JSON.parse(i);if(typeof r=="object"&&r!==null&&!Array.isArray(r))return r}catch{}return null}static promptAlreadyInjected(i,r,t){let o=this.normalizeMetadata(i);return o===null?true:(Array.isArray(o.opik_prompts)?o.opik_prompts:[]).some(s=>{var c;return s.id===r&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(i,r,t,o){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(i))!=null?m:{},c=(u=this.normalizeMetadata(r))!=null?u:{},l=o&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(i,r){var s,c;let{prompts:t,appendPrompts:o,...a}=i;if(!t||t.length===0){if(a.metadata&&r){let l=(s=this.normalizeMetadata(r))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(r,a.metadata,t,o!=null?o:false)}}static processTraceUpdate(i,r){return this.processUpdate(i,r)}static processSpanUpdate(i,r){return this.processUpdate(i,r)}};});var su,See=n(()=>{pi();sr();ae();nu();su=class p{constructor(i,r){this.data=i;this.opik=r;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var r;Ge()&&this.opik.spanFeedbackScoresBatchQueue.create({...i,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=i=>{var o;let r=Dr.processSpanUpdate(i,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,traceId:this.data.traceId,...r};return Ge()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=i=>{var c,l;let r=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...o}=i;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,...o,projectName:r,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Ge()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var pu,vee=n(()=>{pi();sr();ae();See();nu();pu=class{constructor(i,r){this.data=i;this.opik=r;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var r;Ge()&&this.opik.traceFeedbackScoresBatchQueue.create({...i,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=i=>{var c,l,m;let r=(l=(c=this.data.projectName)!=null?c:i.projectName)!=null?l:this.opik.config.projectName,{environment:t,...o}=i;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,...o,projectName:r,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Ge()&&this.opik.spanBatchQueue.create(a);let s=new su(a,this.opik);return this.spans.push(s),s};this.update=i=>{var o;let r=Dr.processTraceUpdate(i,this.data.metadata),t={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...r};return Ge()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var Tee,yp,jce,Cce,jee,Cee,Eee,Iee,dF=n(()=>{Tee={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"},yp={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},jce=p=>Object.entries(p).map(([i,r])=>`${i}=${encodeURIComponent(r)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Cce=p=>p.replace(/\/api\/?$/,""),jee=p=>Buffer.from(p).toString("base64"),Cee=(p,i,r)=>{let t=jce(r),o=Cce(p),a=o.endsWith("/")?o:`${o}/`,s=i.startsWith("/")?i.slice(1):i;return `${a}${s}?${t}`},Eee=({datasetId:p,experimentId:i,baseUrl:r})=>Cee(r,Tee.EXPERIMENTS,{[yp.EXPERIMENT_ID]:i,[yp.DATASET_ID]:p,[yp.PATH]:jee(r)}),Iee=(p,i)=>Cee(i,Tee.PROJECTS,{[yp.TRACE_ID]:p,[yp.PATH]:jee(i)});});var Ece,cu,bp,Be,Gt=n(()=>{ae();Ece=300,cu=100,bp=class{constructor({action:i,batchSize:r=cu,delay:t,enableBatch:o,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=(i,r)=>{if(this.queue.set(i,r),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(i,r)=>{let t=this.queue.get(i);t&&(this.queue.set(i,{...t,...r}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let i=new Map(this.queue);this.queue.clear(),exports.logger.debug(`Adding ${i.size} items to ${this.name} promise:`,i),this.promise=this.promise.finally(()=>(exports.logger.debug(`Flushing ${this.name}:`,i),this.action(i))).catch(r=>{exports.logger.error(`Failed to flush ${this.name}:`,r,i);}),await this.promise;};this.action=i,this.batchSize=r,this.delay=t,this.enableBatch=o,this.name=a;}},Be=class{constructor({delay:i=Ece,enableCreateBatch:r=true,enableUpdateBatch:t=false,enableDeleteBatch:o=true,createBatchSize:a=cu,updateBatchSize:s=cu,deleteBatchSize:c=cu,name:l="BatchQueue"}={}){this.create=i=>{let r=this.getId(i);this.createQueue.add(r,i);};this.get=async i=>{let r=this.createQueue.queue.get(i);return r||this.getEntity(i)};this.update=(i,r)=>{if(this.createQueue.queue.get(i)){this.createQueue.update(i,r);return}let o=this.updateQueue.queue.get(i);this.updateQueue.add(i,{...o,...r});};this.delete=i=>{if(this.createQueue.queue.has(i)){this.createQueue.queue.delete(i);return}this.deleteQueue.add(i);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new bp({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:i,enableBatch:r,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new bp({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:i,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new bp({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:i,enableBatch:o,batchSize:c,name:`${l}:deleteQueue`});}};});var Ice,lu,Dee=n(()=>{Yp();ae();Gt();Ice="suite_assertion",lu=class extends Be{constructor(r,t,o="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${o}`});this.api=r;this.entityType=o;this.useLegacyFallback=false;}getId(r){return {entityId:r.entityId,name:r.name}}async createEntities(r){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(r);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:r},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(r);return}throw t}}async writeViaLegacyFeedbackScores(r){let t=r.map(o=>({id:o.entityId,name:o.name,value:o.status==="passed"?1:0,categoryName:Ice,reason:o.reason,source:o.source,projectName:o.projectName,projectId:o.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 mu,Dce,Uee,Uce,Nce,Ji,uF=n(()=>{ae();mu=["input","output"],Dce=1024*1024,Uee=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>"}),Uce=p=>{try{let i=JSON.stringify(p);return i?Buffer.byteLength(i,"utf8")/Dce:0}catch{return 1/0}},Nce=(p,i)=>{let r={};for(let s of mu)p[s]!=null&&(r[s]=Uce(p[s]));if(Object.keys(r).length===0)return {result:p,truncated:[]};let t={};for(let s of mu)r[s]!==void 0&&r[s]>i&&(t[s]=Uee(r[s]));if(mu.reduce((s,c)=>{var l;return s+(t[c]?0:(l=r[c])!=null?l:0)},0)>i)for(let s of mu)r[s]!==void 0&&t[s]===void 0&&(t[s]=Uee(r[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},Ji=(p,i,r="span",t)=>{if(!i||i<=0)return p;let{result:o,truncated:a}=Nce(p,i);if(a.length>0){let s=r.charAt(0).toUpperCase()+r.slice(1);exports.logger.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${i} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return o};});var et,Fce,Bce,Mce,Wce,Vce,Lce,Jce,Gce,Nee,Hce,Fee,Bee=n(()=>{et=(p,i,r=0)=>{if(p.length<r+i.length)return false;for(let t=0;t<i.length;t++)if(p[r+t]!==i[t])return false;return true},Fce=[137,80,78,71,13,10,26,10],Bce=[255,216,255],Mce=[71,73,70,56,55,97],Wce=[71,73,70,56,57,97],Vce=[82,73,70,70],Lce=[87,69,66,80],Jce=[37,80,68,70],Gce=[102,116,121,112],Nee=p=>{if(et(p,Fce))return "image/png";if(et(p,Bce)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(et(p,Mce)||et(p,Wce))return "image/gif";if(et(p,Vce)&&et(p,Lce,8))return "image/webp";if(et(p,Jce))return "application/pdf";if(et(p,Gce,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let r=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(r.startsWith("{")||r.startsWith("["))return "application/json"}catch{}return null},Hce={"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"},Fee=p=>{var i;return (i=Hce[p])!=null?i:"bin"};});var Oce,Kce,Qce,Mee,$ce,Yce,Xce,gF,Wee,Vee=n(()=>{Bee();Oce=["input","output","metadata"],Kce=(p,i)=>{let r=Math.floor(Math.random()*99999999)+1,t=Fee(i);return `${p}-attachment-${r}-${Date.now()}-sdk.${t}`},Qce=p=>{let i=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,r=Buffer.from(i,"base64");return r.length>0?r:null},Mee=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,$ce=61,Yce=/data:[^,]*;base64,$/,Xce=(p,i,r,t)=>{if(p.length<t)return p;let o=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!Mee(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&Mee(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===$ce&&u<2;)m++,u++;if(m-l>=t){let f=Qce(p.slice(l,m)),g=f?Nee(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&Yce.test(p.slice(y,l))&&(h=y);let w=Kce(i,g);o.push(p.slice(a,h)),o.push(`[${w}]`),a=m,r.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(o.push(p.slice(a)),o.join("")):p},gF=(p,i,r,t,o)=>{if(typeof p=="string")return Xce(p,i,r,t);if(Array.isArray(p)){if(o.has(p))return p;o.add(p);let a=false,s=p.map(c=>{let l=gF(c,i,r,t,o);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(o.has(p))return p;o.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=gF(l,i,r,t,o);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},Wee=(p,i)=>{let r=Math.max(4,Math.floor(i/4)*4),t=[],o={};for(let a of Oce){let s=p[a];if(s==null)continue;let c=gF(s,a,t,r,new WeakSet);c!==s&&(o[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...o},attachments:t}};});var Zce,Lee,Jee,Gee=n(()=>{Zce="BEMinIO",Lee=async(p,i,r)=>{let t=await fetch(p,{method:"PUT",body:i,headers:r});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},Jee=async(p,i,r,t)=>{let{data:o,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(o.length/5242880)),l=Buffer.from(i.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:r.entityType,entityId:r.entityId,path:l,projectName:r.projectName},p.requestOptions);if(m.uploadId===Zce){let d={"Content-Type":s,"Comet-Workspace":i.workspaceName,...i.extraHeaders};i.apiKey&&(d.authorization=i.apiKey),await Lee(m.preSignUrls[0],o,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=o.subarray(f,f+5242880),h=await Lee(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:r.entityType,entityId:r.entityId,fileSize:o.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:r.projectName},p.requestOptions);};});var du,fF=n(()=>{ae();Vee();Gee();du=async(p,i,r,t)=>{let o;try{o=Wee(t,i.minSizeBytes);}catch(a){return exports.logger.warn(`Attachment extraction skipped for ${r.entityType} '${r.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return o.attachments.length===0?t:(await Promise.all(o.attachments.map(a=>Jee(p,i,r,a).catch(s=>{exports.logger.warn(`Failed to upload extracted attachment '${a.fileName}' for ${r.entityType} '${r.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),o.result)};});var uu,Hee=n(()=>{Gt();uF();dt();fF();uu=class extends Be{constructor(r,t,o,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=r;this.maxPayloadSizeMb=o;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?du(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var o;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ji(s,(o=this.maxPayloadSizeMb)!=null?o:Ye.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(r){return await this.api.spans.getSpanById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let o=await this.extractAttachments(t,r),a=Ji(o,(s=this.maxPayloadSizeMb)!=null?s:Ye.maxPayloadSizeMb,"span",r);await this.api.spans.updateSpan(r,{body:a},this.api.requestOptions);}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var gu,Oee=n(()=>{Gt();gu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.spans.scoreBatchOfSpans({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var fu,Kee=n(()=>{Gt();uF();dt();fF();fu=class extends Be{constructor(r,t,o,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=r;this.maxPayloadSizeMb=o;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?du(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var o;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ji(s,(o=this.maxPayloadSizeMb)!=null?o:Ye.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(r){return await this.api.traces.getTraceById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let o=await this.extractAttachments(t,r),a=Ji(o,(s=this.maxPayloadSizeMb)!=null?s:Ye.maxPayloadSizeMb,"trace",r);await this.api.traces.updateTrace(r,{body:a},this.api.requestOptions);}async deleteEntities(r){await this.api.traces.deleteTraces({ids:r},this.api.requestOptions);}};});var hu,Qee=n(()=>{Gt();hu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.traces.scoreBatchOfTraces({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});function Xee(){return crypto.createHash("sha256").update(VB__default.default.hostname()+ele()).digest("hex")}function ele(p=process.env){for(let i of ["LOGNAME","USER","LNAME","USERNAME"])if(p[i])return p[i];try{return VB__default.default.userInfo().username}catch{return "unknown"}}var Yee,Zee=n(()=>{Yee="X-Opik-Client-Id";});var yu,qee=n(()=>{Ir();Zee();yu=class extends hp{constructor(r){var o;let t={[Yee]:Xee(),...r==null?void 0:r.headers,...(o=r==null?void 0:r.requestOptions)==null?void 0:o.headers};(r==null?void 0:r.apiKey)!==void 0&&(t.authorization=r.apiKey);super({...r,headers:t});this.setHeaders=r=>{this.requestOptions.headers=r;};this.requestOptions=(r==null?void 0:r.requestOptions)||{};}};});var bu,ere=n(()=>{Gt();bu=class extends Be{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=r;}getId(r){return r.id||""}async createEntities(r){for(let t of r)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(r){try{return await this.api.datasets.getDatasetById(r,this.api.requestOptions)}catch{return}}async updateEntity(r,t){await this.api.datasets.updateDataset(r,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(r){await this.api.datasets.deleteDatasetsBatch({ids:r},this.api.requestOptions);}};});async function rre(){return hF||(hF=await rle__default.default()),hF}var hF,tre=n(()=>{hF=null;});var Gi,Ru=n(()=>{ee();sr();tre();Gi=class p{constructor(i,r){let{id:t,traceId:o,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=i;this.id=t||exports.generateId(),this.traceId=o,this.spanId=a,this.source=s||Th.Sdk,this.description=c!=null?c:r,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(i=false){return i?{...this.data,id:this.id}:{...this.data}}async contentHash(){let i={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(i.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(i.executionPolicy=this.executionPolicy);let r=tle__default.default(i);return (await rre()).h32(r,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(i){return new p({id:i.id,traceId:i.traceId,spanId:i.spanId,source:i.source,...i.evaluators&&{evaluators:i.evaluators},...i.executionPolicy&&{executionPolicy:i.executionPolicy},...i.data},i.description)}};});async function ole(p,i,r,t){var l;if(r===0)return [];let o=new util.TextDecoder("utf-8"),a=[],s="",c=p.getReader();try{for(;;){let{done:m,value:u}=await c.read();if(m)break;let d=u;s+=o.decode(d,{stream:!0});let f=s.split(`
4
4
  `);s=(l=f.pop())!=null?l:"";for(let g of f)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let h=JSON.parse(g);t==null||t(h);let y=i.parse(h,{unrecognizedObjectKeys:"strip"});if(y.ok){if(a.push(y.value),r!==void 0&&a.length>=r)return c.releaseLock(),a}else exports.logger.error("Error parsing experiment item:",y.errors);}catch(h){exports.logger.error("Error parsing JSON line:",h instanceof Error?h.message:String(h));}}if(s.trim()&&s!=="{}"&&s!=="[]"&&s!=="null")try{let m=JSON.parse(s);t==null||t(m);let u=i.parse(m,{unrecognizedObjectKeys:"strip"});u.ok?a.push(u.value):exports.logger.error("Error parsing experiment item:",u.errors);}catch(m){exports.logger.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){exports.logger.error("Error processing stream:",m instanceof Error?m.message:String(m));}finally{c.releaseLock();}return a}function pr(p,i){let r=[];for(let t=0;t<p.length;t+=i.maxBatchSize)r.push(p.slice(t,t+i.maxBatchSize));return r}async function nle(p,i,r,t){let o=0,a;return {items:await ole(p,i,t,c=>{o++;let l=c==null?void 0:c[r];typeof l=="string"&&(a=l);}),recordsRead:o,lastCursorRead:a}}async function Me(p,i,r,{maxResults:t=Number.POSITIVE_INFINITY,startAfter:o}={}){let a=[],s=o;for(;a.length<t;){let c=Math.min(t-a.length,ale),l=await nle(await p(c,s),i,r,c);a.push(...l.items);let m=l.recordsRead<c,u=l.lastCursorRead!==void 0&&l.lastCursorRead!==s;if(m||!u)break;s=l.lastCursorRead;}return a}var ale,rt=n(()=>{ae();ale=2e3;});async function Hi(p,i){let{datasetName:r,projectName:t,datasetVersion:o,nbSamples:a,lastRetrievedId:s}=i;return (await Me((l,m)=>p.api.datasets.streamDatasetItems({datasetName:r,projectName:t,lastRetrievedId:m,steamLimit:l,datasetVersion:o}),G.DatasetItemPublic,"id",{maxResults:a,startAfter:s})).map(l=>Gi.fromApiModel(l))}var yF=n(()=>{Ru();rt();Ir();});exports.DatasetVersion=void 0;var xu=n(()=>{yF();exports.DatasetVersion=class{constructor(i,r,t,o){this.datasetName=i,this.datasetId=r,this.versionInfo=t,this.opik=o;}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(i,r){return (await Hi(this.opik,{datasetName:this.datasetName,datasetVersion:this.versionInfo.versionHash,nbSamples:i,lastRetrievedId:r})).map(o=>o.getContent(true))}async toJson(i={}){let t=(await this.getItems()).map(o=>{let a={...o};for(let[s,c]of Object.entries(i))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return tle__default.default(t)}};});var Ae,Ht=n(()=>{ae();Ae=class extends Error{constructor(i){var r;super(i.message),this.name=this.constructor.name,this.code=i.code,this.statusCode=i.statusCode,this.details=i.details,this.originalError=i.originalError,exports.logger.error(this.message),(r=Error.captureStackTrace)==null||r.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 ire=n(()=>{});var bF,RF=n(()=>{bF={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,i)=>`Item at position ${p} is not an object (${i})`,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,i)=>`Dataset version '${p}' not found in dataset '${i}'`};});var ore,wu;exports.DatasetVersionNotFoundError=void 0;var xF=n(()=>{RF();Ht();ore={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID",DATASET_VERSION_NOT_FOUND:"DATASET_VERSION_NOT_FOUND"},wu=class extends Ae{constructor(i){super({message:bF.DATASET_ITEM_MISSING_ID(i),code:ore.DATASET_ITEM_MISSING_ID});}},exports.DatasetVersionNotFoundError=class extends Ae{constructor(i,r){super({message:bF.DATASET_VERSION_NOT_FOUND(i,r),code:ore.DATASET_VERSION_NOT_FOUND});}};});var are=n(()=>{RF();xF();});var ple,_u,nre=n(()=>{Ht();ple={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},_u=class extends Ae{constructor(i){super({message:i,code:ple.SEARCH_TIMEOUT});}};});var sre=n(()=>{});var pre=n(()=>{nre();sre();});var ku,Au,Oi,wp=n(()=>{ku=class extends Error{constructor(i){super(i),this.name="AnnotationQueueError";}},Au=class extends ku{constructor(i){super(`Annotation queue with ID '${i}' not found`),this.name="AnnotationQueueNotFoundError";}},Oi=class extends ku{constructor(i,r){let t=r!==void 0?` at index ${r}`:"";super(`${i} object${t} has no ID`),this.name="AnnotationQueueItemMissingIdError";}};});exports.ConfigNotFoundError=void 0;exports.ConfigMismatchError=void 0;var Pu=n(()=>{Ht();exports.ConfigNotFoundError=class extends Ae{constructor(i){super({message:i,code:"CONFIG_NOT_FOUND"}),this.name="ConfigNotFoundError";}},exports.ConfigMismatchError=class extends Ae{constructor(i){super({message:i,code:"CONFIG_MISMATCH"}),this.name="ConfigMismatchError";}};});var zu,Su,vu,wF=n(()=>{zu=class extends Error{constructor(i){super(i),this.name="EnvironmentError";}},Su=class extends zu{constructor(i){super(`Environment '${i}' already exists in this workspace.`),this.name="EnvironmentAlreadyExistsError";}},vu=class extends zu{constructor(i){super(i),this.name="EnvironmentConfigurationError";}};});var _F=n(()=>{Ht();ire();are();pre();wp();Pu();wF();});var Tu,cre=n(()=>{Tu={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,i)=>`Item at position ${p} is not an object (${i})`};});var kF,ju,Cu,Eu,lre=n(()=>{Ht();cre();kF={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},ju=class extends Ae{constructor(i){let r=i instanceof Error?i:new Error(String(i));super({message:Tu.JSON_PARSE_ERROR,code:kF.JSON_PARSE_ERROR,originalError:r});}},Cu=class extends Ae{constructor(i){super({message:Tu.JSON_NOT_ARRAY(i),code:kF.JSON_NOT_ARRAY});}},Eu=class extends Ae{constructor(i,r){super({message:Tu.JSON_ITEM_NOT_OBJECT(i,r),code:kF.JSON_ITEM_NOT_OBJECT});}};});exports.Dataset=void 0;var Iu=n(()=>{sr();Ru();xu();yF();rt();ae();_F();lre();J();exports.Dataset=class{constructor({name:i,description:r,id:t,projectName:o},a){this.opik=a;this.idToHash=new Map;this.hashes=new Set;this.id=t||exports.generateId(),this.name=i,this.description=r,this.projectName=o;}async insert(i){if(!i||i.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let r=await this.getDeduplicatedItems(i),t=pr(r,{maxBatchSize:1e3}),o=exports.generateId();try{let a=0;for(let s of t)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:s,batchGroupId:o,projectName:this.projectName}),a+=s.length,exports.logger.info(`Inserted ${Math.min(a,r.length)} of ${r.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(i){if(!(!i||i.length===0)){for(let r=0;r<i.length;r++)if(!i[r].id)throw new wu(r);await this.insert(i);}}async delete(i){if(!i||i.length===0){exports.logger.info("No item IDs provided for deletion");return}let r=pr(i,{maxBatchSize:100}),t=exports.generateId();for await(let o of r){exports.logger.debug("Deleting dataset items batch",{batchSize:o.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:o,batchGroupId:t});for(let a of o)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 r=(await this.getItems()).map(t=>t.id).filter(Boolean);r.length!==0&&await this.delete(r);}async getTags(){var r;return (r=(await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName})).tags)!=null?r:[]}async getItemsCount(){if(this.cachedItemsCount===void 0){let i=await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName});this.cachedItemsCount=i.datasetItemsCount;}return this.cachedItemsCount}async getItems(i,r){return (await Hi(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:i,lastRetrievedId:r})).map(o=>o.getContent(true))}async getRawItems(i,r){return Hi(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:i,lastRetrievedId:r})}async insertFromJson(i,r={},t=[]){let o;try{o=JSON.parse(i);}catch(s){throw new ju(s)}if(!Array.isArray(o))throw new Cu(typeof o);if(o.length===0)return;for(let s=0;s<o.length;s++){let c=o[s];if(typeof c!="object"||c===null)throw new Eu(s,typeof c)}let a=o.map(s=>{let c=s,l={};for(let[m,u]of Object.entries(c)){if(t.includes(m))continue;let d=r[m]||m;l[d]=u;}return l});await this.insert(a);}async toJson(i={}){let t=(await this.getItems()).map(o=>{let a={...o};for(let[s,c]of Object.entries(i))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return tle__default.default(t)}async getDeduplicatedItems(i){let r=[];for(let t of i){let o=new Gi(t),a=await o.contentHash();if(this.hashes.has(a)){exports.logger.debug("Duplicate item found - skipping",{contentHash:a,datasetId:this.id});continue}r.push(o.toApiModel()),this.hashes.add(a),this.idToHash.set(o.id,a);}return r}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){exports.logger.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let i=await Hi(this.opik,{datasetName:this.name,projectName:this.projectName});this.clearHashState();for(let r of i){let t=await r.contentHash();this.idToHash.set(r.id,t),this.hashes.add(t);}exports.logger.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:i.length});}catch(i){if(i instanceof k&&i.statusCode===404){exports.logger.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw i}}async getVersionView(i){let r=await this.findVersionByName(i);if(!r)throw new exports.DatasetVersionNotFoundError(i,this.name);return new exports.DatasetVersion(this.name,this.id,r,this.opik)}async getCurrentVersionName(){let i=await this.getVersionInfo();return i==null?void 0:i.versionName}async getVersionInfo(){var i;try{let t=(i=(await this.opik.api.datasets.listDatasetVersions(this.id,{page:1,size:1})).content)!=null?i:[];return t.length===0?void 0:t[0]}catch(r){if(r instanceof k&&r.statusCode===404)return;throw r}}async findVersionByName(i){try{return await this.opik.api.datasets.retrieveDatasetVersion(this.id,{versionName:i})}catch(r){if(r instanceof k&&r.statusCode===404)return;throw r}}};});var AF,Ot,mre=n(()=>{AF=class extends Error{constructor(i){super(i),this.name="DatasetError";}},Ot=class extends AF{constructor(i){super(`Dataset with name '${i}' not found`),this.name="DatasetNotFoundError";}};});var PF=n(()=>{Iu();Ru();xu();mre();});var _p,Du,zF=n(()=>{_p=class{constructor(i){if(!i.datasetItemId)throw new Error("datasetItemId is required");if(!i.traceId)throw new Error("traceId is required");this.datasetItemId=i.datasetItemId,this.traceId=i.traceId,this.projectName=i.projectName;}},Du=class p{constructor(i){this.id=i.id,this.datasetItemId=i.datasetItemId,this.traceId=i.traceId,this.datasetItemData=i.datasetItemData,this.evaluationTaskOutput=i.evaluationTaskOutput,this.feedbackScores=[...i.feedbackScores];}static fromRestExperimentItemCompare(i){var t,o;let r=(o=(t=i.feedbackScores)==null?void 0:t.map(a=>({categoryName:a.categoryName,name:a.name,reason:a.reason,value:a.value,source:a.source})))!=null?o:[];return new p({id:i.id,traceId:i.traceId,datasetItemId:i.datasetItemId,datasetItemData:i.input,evaluationTaskOutput:i.output,feedbackScores:r})}};});var Nr,Uu=n(()=>{sr();zF();rt();ae();Ir();dF();dt();Nr=class{constructor({id:i,name:r,datasetName:t,prompts:o,tags:a,projectName:s},c){this.opik=c;this.id=i||exports.generateId(),this._name=r,this.datasetName=t,this.prompts=o,this.tags=a,this.projectName=s;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let i=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=i.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(i){if(i.length===0)return;let r=i.map(o=>({id:exports.generateId(),experimentId:this.id,datasetItemId:o.datasetItemId,traceId:o.traceId,projectName:o.projectName})),t=pr(r,{maxBatchSize:50});try{for(let o of t)await this.opik.api.experiments.createExperimentItems({experimentItems:o});exports.logger.debug(`Inserted ${i.length} items into experiment ${this.id}`);}catch(o){throw exports.logger.error(`Error inserting items into experiment: ${o instanceof Error?o.message:String(o)}`),o}}async getItems(i){let{maxResults:r,truncate:t=false}=i||{};try{let a=(await Me((s,c)=>this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:s,lastRetrievedId:c,truncate:t}),G.ExperimentItemCompare,"id",{maxResults:r})).map(s=>Du.fromRestExperimentItemCompare(s));return exports.logger.info(`Retrieved ${a.length} items${r?` (limited by maxResults=${r})`:""}`),a}catch(o){throw exports.logger.error("Error retrieving experiment items: "+(o instanceof Error?o.message:String(o))),o}}async getUrl(){if(!this.datasetName)throw new Error("Cannot get URL: the associated dataset has been deleted or is unavailable");let i=await this.opik.getDataset(this.datasetName,this.projectName),r=this.opik.config.apiUrl||Ye.apiUrl;return Eee({datasetId:i.id,experimentId:this.id,baseUrl:r})}};});var Nu,SF=n(()=>{Uu();Nu=class extends Nr{constructor(i,r){super(i,r),this.passRate=i.passRate,this.passedCount=i.passedCount,this.totalCount=i.totalCount,this.assertionScores=i.assertionScores;}};});var Fu,vF=n(()=>{Fu={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: {...} })
@@ -14,7 +14,7 @@ ${s.join(`
14
14
  Prompt version comparison:
15
15
  ${s}`),s}isChatPrompt(i){try{let r=JSON.parse(i);return Array.isArray(r)&&r.length>0&&typeof r[0]=="object"&&"role"in r[0]&&"content"in r[0]}catch{return false}}formatChatPromptString(i){try{let r=JSON.parse(i);return Are(r)}catch{return i}}static fromApiResponse(i,r){var t,o;if(!r.template)throw new de("Invalid API response: missing required field 'template'");if(!r.commit)throw new de("Invalid API response: missing required field 'commit'");if(!r.promptId)throw new de("Invalid API response: missing required field 'promptId'");if(!r.id)throw new de("Invalid API response: missing required field 'id'");return new p({name:i,prompt:r.template,commit:r.commit,version:(t=r.versionNumber)!=null?t:void 0,promptId:r.promptId,versionId:r.id,type:(o=r.type)!=null?o:exports.PromptType.MUSTACHE,metadata:r.metadata,changeDescription:r.changeDescription,tags:r.tags,createdAt:r.createdAt?new Date(r.createdAt):void 0,createdBy:r.createdBy})}};});var Wu,cr,vp=n(()=>{IF();Sp();ae();Wu=5e3,cr=class{constructor(i,r){this._pendingSync=null;var t,o,a;this._id=i.promptId,this._versionId=i.versionId,this._commit=i.commit,this._version=i.version,this.type=(t=i.type)!=null?t:"mustache",this._changeDescription=i.changeDescription,this.templateStructure=(o=i.templateStructure)!=null?o:"text",this._synced=(a=i.synced)!=null?a:false,this._name=i.name,this._description=i.description,this._tags=i.tags?[...i.tags]:[],this._metadata=i.metadata,this.opik=r!=null?r:EF(),this._projectName=i.projectName,this._environments=i.environments?[...i.environments]:[];}get id(){return this._id}get versionId(){return this._versionId}get commit(){return this._commit}get version(){return this._version}get synced(){return this._synced}get changeDescription(){return this._changeDescription}get projectName(){return this._projectName}get environments(){return Object.freeze([...this._environments])}updateSyncState(i){this._id=i.promptId,this._versionId=i.versionId,this._commit=i.commit,this._version=i.version,this._changeDescription=i.changeDescription,i.tags&&(this._tags=i.tags),i.projectName!==void 0&&(this._projectName=i.projectName),this._environments=i.environments?[...i.environments]:[],this._synced=true;}async _syncViaCreate(i){let r=Symbol(),t,o=new Promise(a=>{t=setTimeout(()=>a(r),Wu);});try{let a=i().catch(c=>{exports.logger.debug(`Prompt '${this._name}' sync rejected after timeout`,{error:c});}),s=await Promise.race([a,o]);if(s===r){exports.logger.warn(`Prompt '${this._name}' sync timed out after ${Wu}ms. The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`);return}if(!s){exports.logger.warn(`Prompt '${this._name}' sync failed (rejected after timeout). The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`);return}s.synced&&s.id&&s.versionId&&s.commit?this.updateSyncState({promptId:s.id,versionId:s.versionId,commit:s.commit,version:s.version,changeDescription:s.changeDescription,tags:s.tags?Array.from(s.tags):void 0,projectName:s.projectName,environments:s.environments?Array.from(s.environments):void 0}):exports.logger.warn(`Prompt '${this._name}' was not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`);}catch(a){exports.logger.warn(`Failed to sync prompt '${this._name}' with the backend. The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`,{error:a});}finally{clearTimeout(t);}}ready(){var i;return (i=this._pendingSync)!=null?i:Promise.resolve()}get name(){return this._name}get description(){return this._description}get tags(){return Object.freeze([...this._tags])}get metadata(){if(this._metadata)return structuredClone(this._metadata)}async updateProperties(i){var r,t,o,a;return await this.ready(),this.ensureSynced("updateProperties"),await this.opik.api.prompts.updatePrompt(this.id,{name:(r=i.name)!=null?r:this._name,description:i.description,tags:i.tags},this.opik.api.requestOptions),this._name=(t=i.name)!=null?t:this._name,this._description=(o=i.description)!=null?o:this._description,this._tags=(a=i.tags)!=null?a:this._tags,this}async delete(){await this.ready(),this.ensureSynced("delete"),await this.opik.deletePrompts([this.id]);}async getVersions(i){var r;await this.ready(),this.ensureSynced("getVersions"),exports.logger.debug("Getting versions for prompt",{promptId:this.id,name:this.name});try{let t=[],o=1,a=100;for(;;){let c=(r=(await this.opik.api.prompts.getPromptVersions(this.id,{page:o,size:a,search:i==null?void 0:i.search,sorting:i==null?void 0:i.sorting,filters:i==null?void 0:i.filters},this.opik.api.requestOptions)).content)!=null?r:[];if(t.push(...c),c.length<a)break;o++;}return exports.logger.debug("Successfully retrieved prompt versions",{promptId:this.id,name:this.name,totalVersions:t.length}),t.map(s=>Br.fromApiResponse(this.name,s))}catch(t){throw exports.logger.error("Failed to get prompt versions",{promptId:this.id,name:this.name,error:t}),t}}async restoreVersion(i){await this.ready(),this.ensureSynced("restoreVersion"),exports.logger.debug("Restoring prompt version",{promptId:this.id,name:this.name,versionId:i.id,versionCommit:i.commit});try{let r=await this.opik.api.prompts.restorePromptVersion(this.id,i.id,this.opik.api.requestOptions);return exports.logger.debug("Successfully restored prompt version",{promptId:this.id,name:this.name,restoredVersionId:r.id,restoredCommit:r.commit}),r}catch(r){throw exports.logger.error("Failed to restore prompt version",{promptId:this.id,name:this.name,versionId:i.id,versionCommit:i.commit,error:r}),r}}async retrieveVersion(i){let t=/^v\d+$/.test(i)?{name:this.name,projectName:this._projectName,versionNumber:i}:{name:this.name,projectName:this._projectName,commit:i};try{return await this.opik.api.prompts.retrievePromptVersion(t,this.opik.api.requestOptions)}catch(o){if(o&&typeof o=="object"&&"statusCode"in o&&o.statusCode===404)return null;throw exports.logger.error("Failed to retrieve prompt version",{promptName:this.name,version:i,error:o}),o}}ensureSynced(i){if(!this.synced)throw new Error(`Cannot call ${i}() on a prompt that failed to persist. Call .syncWithBackend() to retry persisting the prompt.`)}};});exports.Prompt=void 0;var UF=n(()=>{Kt();Fr();Pp();vp();ae();exports.Prompt=class p extends cr{constructor(i,r){super({...i,templateStructure:we.Text},r),this.prompt=i.prompt,!i.synced&&!i.promptId&&exports.logger.warn("new Prompt() is deprecated. Use client.createPrompt() to create or client.getPrompt() to retrieve text prompts instead."),r===void 0&&!i.synced&&(this._pendingSync=this._performSync());}_performSync(){return this._syncViaCreate(()=>this.opik.createPrompt({name:this._name,prompt:this.prompt,metadata:this._metadata,type:this.type,description:this._description,tags:this._tags.length?Array.from(this._tags):void 0}))}get template(){return this.prompt}format(i){return Ce(this.prompt,i,this.type)}static fromApiResponse(i,r,t,o){var s;if(!r.template)throw new de("Invalid API response: missing required field 'template'");if(!r.commit)throw new de("Invalid API response: missing required field 'commit'");if(!r.promptId)throw new de("Invalid API response: missing required field 'promptId'");if(!r.id)throw new de("Invalid API response: missing required field 'id' (version ID)");let a=(s=r.type)!=null?s:exports.PromptType.MUSTACHE;if(a!=="mustache"&&a!=="jinja2")throw new de(`Invalid API response: unknown prompt type '${a}'`);return new p({promptId:r.promptId,versionId:r.id,name:i.name,prompt:r.template,commit:r.commit,version:r.versionNumber,metadata:r.metadata,type:a,changeDescription:r.changeDescription,description:i.description,tags:i.tags,synced:true,projectName:o,environments:r.environments},t)}async useVersion(i){var t;let r=await this.restoreVersion(i);return p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik)}async syncWithBackend(){try{return await this.opik.createPrompt({name:this.name,prompt:this.prompt,metadata:this.metadata,type:this.type,description:this.description,tags:this.tags?Array.from(this.tags):void 0})}catch(i){return exports.logger.warn(`Failed to sync prompt '${this.name}' with the backend. The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`,{error:i}),this}}async getVersion(i){var t;let r=await this.retrieveVersion(i);return r?p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik):null}};});var Vu,Sre=n(()=>{Pp();Fr();Vu=class{constructor(i,r="mustache",t=false){this.messages=i,this.templateType=r,this.validatePlaceholders=t;}format(i,r){let t={vision:true,video:true,...r},o=[];for(let a of this.messages){let s=a.role;if(!s)continue;let c=a.content,l;if(typeof c=="string")l=Ce(c,i,this.templateType);else if(Array.isArray(c))l=this.renderContentParts(c,i,t);else throw new de(`Invalid message content type. Expected string or array of content parts, got: ${typeof c}`);o.push({role:s,content:l});}return o}renderContentParts(i,r,t){var s,c,l,m,u,d,f;let o=[],a=false;for(let g of i){if(!g||typeof g!="object")continue;switch(g.type){case "text":{let w=Ce(g.text||"",r,this.templateType);o.push({type:"text",text:w});break}case "image_url":{if(t.vision===false)a=true,o.push({type:"text",text:"<<<image>>><<</image>>>"});else {let y=g,w=((s=y.image_url)==null?void 0:s.url)||"",A=Ce(w,r,this.templateType);if(A){let C={type:"image_url",image_url:{url:A}};(c=y.image_url)!=null&&c.detail&&(C.image_url.detail=y.image_url.detail),o.push(C);}}break}case "video_url":{if(t.video===false)a=true,o.push({type:"text",text:"<<<video>>><<</video>>>"});else {let y=g,w=((l=y.video_url)==null?void 0:l.url)||"",A=Ce(w,r,this.templateType);if(A){let C={type:"video_url",video_url:{url:A}};(m=y.video_url)!=null&&m.mime_type&&(C.video_url.mime_type=y.video_url.mime_type),(u=y.video_url)!=null&&u.duration&&(C.video_url.duration=y.video_url.duration),(d=y.video_url)!=null&&d.format&&(C.video_url.format=y.video_url.format),(f=y.video_url)!=null&&f.detail&&(C.video_url.detail=y.video_url.detail),o.push(C);}}break}default:o.push(g);}}if(a){let g=[];for(let h of o)if(h.type==="text"){let y=h.text;y&&g.push(y);}else g.push(JSON.stringify(h));return g.join(`
16
16
 
17
- `)}return o.length===1&&o[0].type==="text"?o[0].text:o}};});exports.ChatPrompt=void 0;var Lu=n(()=>{Kt();Fr();Sre();vp();ae();exports.ChatPrompt=class p extends cr{constructor(i,r){super({...i,templateStructure:we.Chat},r),this.messages=i.messages,this.chatTemplate=new Vu(i.messages,this.type),!i.synced&&!i.promptId&&exports.logger.warn("new ChatPrompt() is deprecated. Use client.createChatPrompt() to create or client.getChatPrompt() to retrieve chat prompts instead."),r===void 0&&!i.synced&&(this._pendingSync=this._performSync());}_performSync(){return this._syncViaCreate(()=>this.opik.createChatPrompt({name:this._name,messages:structuredClone(this.messages),metadata:this._metadata,type:this.type,description:this._description,tags:this._tags.length?Array.from(this._tags):void 0}))}get template(){return structuredClone(this.messages)}format(i,r){return this.chatTemplate.format(i,r)}static fromApiResponse(i,r,t,o){var c;if(!r.template)throw new de("Invalid API response: missing required field 'template'");if(!r.commit)throw new de("Invalid API response: missing required field 'commit'");if(!r.promptId)throw new de("Invalid API response: missing required field 'promptId'");if(!r.id)throw new de("Invalid API response: missing required field 'id' (version ID)");let a;try{if(a=JSON.parse(r.template),!Array.isArray(a))throw new de("Invalid chat prompt template: expected array of messages")}catch(l){throw l instanceof de?l:new de(`Failed to parse chat prompt template: ${l instanceof Error?l.message:String(l)}`)}let s=(c=r.type)!=null?c:exports.PromptType.MUSTACHE;if(s!=="mustache"&&s!=="jinja2")throw new de(`Invalid API response: unknown prompt type '${s}'`);return new p({promptId:r.promptId,versionId:r.id,name:i.name,messages:a,commit:r.commit,version:r.versionNumber,metadata:r.metadata,type:s,changeDescription:r.changeDescription,description:i.description,tags:i.tags,synced:true,projectName:o,environments:r.environments},t)}async useVersion(i){var t;let r=await this.restoreVersion(i);return p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik)}async syncWithBackend(){try{return await this.opik.createChatPrompt({name:this.name,messages:structuredClone(this.messages),metadata:this.metadata,type:this.type,description:this.description,tags:this.tags?Array.from(this.tags):void 0})}catch(i){return exports.logger.warn(`Failed to sync chat prompt '${this.name}' with the backend. The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`,{error:i}),this}}async getVersion(i){var t;let r=await this.retrieveVersion(i);return r?p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik):null}};});function _le(p,i,r){return {prompt:p,ttlSeconds:i,lastFetch:Date.now(),refreshCallback:r,get isStale(){return this.ttlSeconds===null?false:Date.now()-this.lastFetch>=this.ttlSeconds*1e3}}}function Gu(){return Tre}function jre(p,i,r,t,o,a,s){var l;let c=(l=a!=null?a:i)!=null?l:"";return JSON.stringify([p,c,r!=null?r:"",t,s!=null?s:"",o!=null?o:""])}async function Hu(p,i,r,t,o,a,s,c,l){let m=i!=null?null:a!=null?a:Rle,u=m!==null&&!s?o:void 0,d=jre(p,i,r,t,s,c,l);return await Tre.getOrFetch(d,o,m,u)}var Rle,xle,wle,vre,Ju,Tre,NF=n(()=>{ae();Rle=300,xle=1,wle=128,vre=100;Ju=class{constructor(i=wle){this.entries=new Map;this.inflight=new Map;this.refreshTimer=null;this.refreshRunning=false;this.stopped=false;this.maxSize=i;}get(i){let r=this.entries.get(i);return r?(this.entries.delete(i),this.entries.set(i,r),r.prompt):null}async getOrFetch(i,r,t,o){let a=this.entries.get(i);if(a)return this.entries.delete(i),this.entries.set(i,a),a.prompt;let s=this.inflight.get(i);if(s)return s;let c=this.fetchAndCache(i,r,t,o);this.inflight.set(i,c);try{return await c}finally{this.inflight.delete(i);}}async fetchAndCache(i,r,t,o){let a=await r();return a===null?null:(this.entries.set(i,_le(a,t,o)),this.evict(),t!==null&&this.ensureRefreshTimerStarted(t),a)}evictByIds(i){let r=new Set(i);for(let[t,o]of this.entries)o.prompt.id&&r.has(o.prompt.id)&&this.entries.delete(t);}invalidateForPrompt(i,r){let t=r!=null?r:"";for(let o of this.entries.keys()){let[a,,s]=JSON.parse(o);a===i&&s===t&&this.entries.delete(o);}}clear(){this.stopRefreshTimer(),this.entries.clear(),this.stopped=false;}evict(){for(;this.entries.size>this.maxSize;){let i=this.entries.keys().next().value;i!==void 0&&this.entries.delete(i);}}ensureRefreshTimerStarted(i){if(this.stopped||this.refreshTimer!==null)return;let r=Math.max(i,xle)*1e3;this.refreshTimer=setInterval(()=>{this.refreshStaleEntries().catch(t=>{exports.logger.debug("Prompt cache background refresh loop failed",{error:t});});},r),this.refreshTimer&&typeof this.refreshTimer=="object"&&"unref"in this.refreshTimer&&this.refreshTimer.unref();}async refreshStaleEntries(){if(!this.refreshRunning){this.refreshRunning=true;try{let i=Array.from(this.entries.values()).filter(r=>r.isStale&&r.refreshCallback);for(let r=0;r<i.length&&!this.stopped;r+=vre){let t=i.slice(r,r+vre),o=await Promise.allSettled(t.map(async a=>{let s=await a.refreshCallback();s!==null&&(a.prompt=s,a.lastFetch=Date.now());}));for(let a=0;a<o.length;a++){let s=o[a];s.status==="rejected"&&exports.logger.debug("Background prompt cache refresh failed",{promptName:t[a].prompt.name,error:s.reason});}}}finally{this.refreshRunning=false;}}}stopRefreshTimer(){this.stopped=true,this.refreshTimer!==null&&(clearInterval(this.refreshTimer),this.refreshTimer=null);}},Tre=new Ju;});var FF=n(()=>{UF();Lu();Sp();Kt();Fr();NF();});async function Cre(p,i,r,t){try{return await p.retrievePromptVersion({name:i,projectName:r},t)}catch(o){if(Ple(o))return null;throw o}}function Ere(p,i,r){return i?i.template!==p.prompt||!Ale(i.metadata,p.metadata)||i.type!==r:true}function Ale(p,i){let r=p!=null?p:{},t=i!=null?i:{};return kle__default.default(r,t)}function Ple(p){return typeof p=="object"&&p!==null&&"statusCode"in p&&p.statusCode===404}var Ire=n(()=>{});function Ure(p,i){return Dre.run(p!=null?p:null,i)}function Nre(p){var r;let i=Dre.getStore();return i==null?null:(r=i[p])!=null?r:null}var Dre,BF=n(()=>{Dre=new async_hooks.AsyncLocalStorage;});var Ve,Tp=n(()=>{Ve=class{constructor(i){this.input=i;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(i){return this.input[this.cursor+i]}consumeChar(){return this.input[this.cursor++]}advance(i=1){this.cursor+=i;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(i){let r=this.cursor;for(;this.cursor<this.input.length&&i(this.input[this.cursor]);)this.cursor++;return this.input.slice(r,this.cursor)}sliceFrom(i){return this.input.slice(i,this.cursor)}static isFieldChar(i){return /[a-zA-Z0-9_]/.test(i)}static isLetterChar(i){return /[a-zA-Z]/.test(i)}static isDigitChar(i){return /\d/.test(i)}static isWhitespaceChar(i){return /\s/.test(i)}static isQuoteChar(i){return i==='"'||i==="'"}};});function Fre(p,i){let r=p.startsWith("usage."),t=i.nestedFields.includes(p),o=Object.keys(i.columns).includes(p);if(!r&&!t&&!o){let a=Object.keys(i.columns).join(", ");throw new Error(`Field ${p} is not supported, only the fields ${a} are supported.`)}}function Bre(p,i,r){if(!r.nestedFields.includes(p)){let t=Object.keys(r.columns).join(", ");throw new Error(`Field ${p}.${i} is not supported, only the fields ${t} are supported.`)}if(p==="usage"&&!r.usageKeys.includes(i))throw new Error(`When querying usage, ${i} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function MF(p,i,r){let t=r.supportedOperators[p];if(!(t!=null&&t.includes(i))){let o=(t==null?void 0:t.join(", "))||"none";throw new Error(`Operator ${i} is not supported for field ${p}, only the operators ${o} are supported.`)}}function Mre(p){let i=p.toLowerCase();if(i==="and")return true;throw i==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${p}`)}function Ou(p,i,r){if(!p)throw new Error(`Missing closing quote for: ${r}`)}var jp=n(()=>{});var Cp,Wre=n(()=>{Tp();jp();Cp=class{static parse(i,r){i.skipWhitespace();let t=this.parseFieldName(i);return Fre(t,r),i.peekChar()==="."?this.parseFieldWithKey(i,t,r):{type:"simple",field:t,columnType:r.columns[t]}}static parseFieldName(i){return i.consumeWhile(r=>Ve.isFieldChar(r))}static parseFieldWithKey(i,r,t){i.advance();let o=this.parseKey(i);if(Bre(r,o,t),r==="usage"){let a=`usage.${o}`;return {type:"simple",field:a,columnType:t.columns[a]}}return {type:"nested",field:r,key:o,columnType:t.columns[r]}}static parseKey(i){let r=i.peekChar();return Ve.isQuoteChar(r)?this.parseQuotedKey(i,r):this.parseUnquotedKey(i)}static parseUnquotedKey(i){return i.consumeWhile(r=>Ve.isFieldChar(r))}static parseQuotedKey(i,r){let t=i.getPosition();i.advance();let o="",a=false;for(;!i.isAtEnd();){let c=i.peekChar();if(c===r){if(i.peekCharAt(1)===r){o+=r,i.advance(2);continue}a=true,i.advance();break}o+=c,i.advance();}let s=i.getFullInput().slice(t);return Ou(a,t,s),o}};});var Ep,Vre=n(()=>{Tp();jp();Ep=class{static parse(i,r,t){i.skipWhitespace();let o=i.peekChar(),a=this.tryParseSymbolicOperator(i,o);if(a)return MF(r,a,t),{operator:a};let s=this.parseWordOperator(i);return MF(r,s,t),{operator:s}}static tryParseSymbolicOperator(i,r){if(r==="=")return i.advance(),"=";if(r==="<"||r===">"){let t=r;return i.advance(),i.peekChar()==="="?(i.advance(),t+"="):t}return r==="!"&&i.peekCharAt(1)==="="?(i.advance(2),"!="):null}static parseWordOperator(i){return i.consumeWhile(r=>!Ve.isWhitespaceChar(r))}};});var Xi,Lre=n(()=>{Tp();jp();Xi=class{static parse(i){i.skipWhitespace();let r=i.getPosition(),t=i.peekChar();if(t==='"')return this.parseQuotedString(i,r);if(Ve.isDigitChar(t)||t==="-")return this.parseNumber(i);let o=i.getRemainingInput();throw new Error(`Invalid value ${o.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(i,r){i.advance();let t="",o=false;for(;!i.isAtEnd();){if(i.peekChar()==='"'){if(i.peekCharAt(1)==='"'){t+='"',i.advance(2);continue}o=true;break}t+=i.consumeChar();}return Ou(o,r,`value starting at position ${r}`),i.advance(),{value:t}}static parseNumber(i){let r="";return i.peekChar()==="-"&&(r+=i.consumeChar()),r+=this.parseDigits(i),i.peekChar()==="."&&(r+=i.consumeChar(),r+=this.parseDigits(i)),{value:r}}static parseArrayValue(i){if(i.skipWhitespace(),i.peekChar()!=="("){let t=i.getRemainingInput();throw new Error(`Expected array value starting with '(' for in/not_in operator, got: ${t.slice(0,20)}`)}i.advance();let r=[];for(;;){if(i.skipWhitespace(),i.isAtEnd())throw new Error("Unterminated array value, missing ')'");if(i.peekChar()===")"){if(r.length===0)throw new Error("Expected at least one item inside (...) for in/not_in operator");i.advance();break}if(r.length>0){if(i.peekChar()!==","){let a=i.getRemainingInput();throw new Error(`Expected ',' between array elements, got: ${a.slice(0,20)}`)}i.advance(),i.skipWhitespace();}if(i.isAtEnd()||i.peekChar()!=='"'){let a=i.getRemainingInput();throw new Error(`Array elements must be quoted strings, got: ${a.slice(0,20)}`)}let o=this.parseQuotedString(i,i.getPosition()).value;if(o.includes(","))throw new Error(`Array element values cannot contain commas (got: "${o}"). The backend uses comma as the array delimiter.`);r.push(o);}return {value:r.join(",")}}static parseDigits(i){return i.consumeWhile(r=>Ve.isDigitChar(r))}};});var Jre=n(()=>{Wre();Vre();Lre();});var Le,$t=n(()=>{Le=class{get nestedFields(){return ["usage","metadata","feedback_scores"]}get usageKeys(){return ["total_tokens","prompt_tokens","completion_tokens"]}};});var W,Gre,Hre,Yt=n(()=>{W={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],STRING_STATE_DB_OPS:["=","!=","contains","not_contains","starts_with","ends_with"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["=","!=","contains","not_contains","is_empty","is_not_empty"],DICT_OPS:["=","contains",">","<"],ENUM_OPS:["=","!=","in","not_in"],LIMITED_STRING_OPS:["=","contains","not_contains"],FEEDBACK_SCORES_OPS:["=","!=",">","<",">=","<=","is_empty","is_not_empty"]},Gre=["is_empty","is_not_empty"],Hre=["in","not_in"];});var Xt,Ore=n(()=>{$t();Yt();Xt=class extends Le{get columns(){return {id:"string",name:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",input_json:"dictionary",output_json:"dictionary",metadata:"dictionary",total_estimated_cost:"number",llm_span_count:"number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",feedback_scores:"feedback_scores_number",span_feedback_scores:"feedback_scores_number",duration:"number",thread_id:"string",guardrails:"string",error_info:"error_container",created_at:"date_time",last_updated_at:"date_time",annotation_queue_ids:"list",comments:"comments",experiment_id:"string",environment:"enum"}}get supportedOperators(){return {id:W.STRING_OPS,name:W.STRING_OPS,start_time:W.DATETIME_OPS,end_time:W.DATETIME_OPS,input:W.LIMITED_STRING_OPS,output:W.LIMITED_STRING_OPS,input_json:W.DICT_OPS,output_json:W.DICT_OPS,metadata:W.DICT_OPS,feedback_scores:W.FEEDBACK_SCORES_OPS,span_feedback_scores:W.FEEDBACK_SCORES_OPS,tags:W.LIST_OPS,"usage.total_tokens":W.NUMERIC_OPS,"usage.prompt_tokens":W.NUMERIC_OPS,"usage.completion_tokens":W.NUMERIC_OPS,duration:W.NUMERIC_OPS,thread_id:W.STRING_OPS,total_estimated_cost:W.NUMERIC_OPS,llm_span_count:W.NUMERIC_OPS,guardrails:W.STRING_OPS,error_info:["is_empty","is_not_empty"],created_at:W.DATETIME_OPS,last_updated_at:W.DATETIME_OPS,annotation_queue_ids:W.LIST_OPS,comments:["is_empty","is_not_empty"],experiment_id:W.STRING_OPS,environment:W.ENUM_OPS}}get nestedFields(){return ["usage","metadata","feedback_scores","span_feedback_scores","input_json","output_json"]}};});var Zi,Kre=n(()=>{$t();Yt();Zi=class extends Le{get columns(){return {id:"string",name:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",input_json:"dictionary",output_json:"dictionary",metadata:"dictionary",model:"string",provider:"string",total_estimated_cost:"number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",feedback_scores:"feedback_scores_number",duration:"number",error_info:"error_container",type:"enum",trace_id:"string",environment:"enum"}}get supportedOperators(){return {id:W.STRING_OPS,name:W.STRING_OPS,start_time:W.DATETIME_OPS,end_time:W.DATETIME_OPS,input:W.LIMITED_STRING_OPS,output:W.LIMITED_STRING_OPS,input_json:W.DICT_OPS,output_json:W.DICT_OPS,metadata:W.DICT_OPS,feedback_scores:W.FEEDBACK_SCORES_OPS,tags:W.LIST_OPS,"usage.total_tokens":W.NUMERIC_OPS,"usage.prompt_tokens":W.NUMERIC_OPS,"usage.completion_tokens":W.NUMERIC_OPS,duration:W.NUMERIC_OPS,total_estimated_cost:W.NUMERIC_OPS,model:W.STRING_OPS,provider:W.STRING_OPS,error_info:["is_empty","is_not_empty"],type:W.ENUM_OPS,trace_id:W.STRING_OPS,environment:W.ENUM_OPS}}get nestedFields(){return ["usage","metadata","feedback_scores","input_json","output_json"]}};});var qi,Qre=n(()=>{$t();Yt();qi=class extends Le{get columns(){return {id:"string",first_message:"string",last_message:"string",number_of_messages:"number",duration:"number",created_at:"date_time",last_updated_at:"date_time",start_time:"date_time",end_time:"date_time",feedback_scores:"feedback_scores_number",status:"enum",tags:"list",annotation_queue_ids:"list",comments:"comments",environment:"enum"}}get supportedOperators(){return {id:W.STRING_OPS,first_message:W.LIMITED_STRING_OPS,last_message:W.LIMITED_STRING_OPS,number_of_messages:W.NUMERIC_OPS,duration:W.NUMERIC_OPS,created_at:W.DATETIME_OPS,last_updated_at:W.DATETIME_OPS,start_time:W.DATETIME_OPS,end_time:W.DATETIME_OPS,feedback_scores:W.FEEDBACK_SCORES_OPS,status:W.ENUM_OPS,tags:W.LIST_OPS,annotation_queue_ids:W.LIST_OPS,comments:["is_empty","is_not_empty"],environment:W.ENUM_OPS}}get nestedFields(){return ["feedback_scores"]}};});var eo,$re=n(()=>{$t();Yt();eo=class extends Le{get columns(){return {id:"string",name:"string",description:"string",created_at:"date_time",last_updated_at:"date_time",created_by:"string",last_updated_by:"string",tags:"list",version_count:"number",template_structure:"string"}}get supportedOperators(){return {id:W.STRING_OPS,name:W.STRING_OPS,description:W.STRING_OPS,created_at:W.DATETIME_OPS,last_updated_at:W.DATETIME_OPS,created_by:W.STRING_OPS,last_updated_by:W.STRING_OPS,tags:W.LIST_OPS,version_count:W.NUMERIC_OPS,template_structure:W.STRING_OPS}}get nestedFields(){return []}};});var Ip,Yre=n(()=>{$t();Yt();Ip=class extends Le{get columns(){return {id:"string",commit:"string",version_number:"string",template:"string",change_description:"string",metadata:"dictionary",type:"string",tags:"list",created_at:"date_time",created_by:"string"}}get supportedOperators(){return {id:W.STRING_STATE_DB_OPS,commit:W.STRING_STATE_DB_OPS,version_number:W.STRING_STATE_DB_OPS,template:W.STRING_STATE_DB_OPS,change_description:W.STRING_STATE_DB_OPS,metadata:W.DICT_OPS,type:["=","!="],tags:W.LIST_OPS,created_at:W.DATETIME_OPS,created_by:W.STRING_STATE_DB_OPS}}get nestedFields(){return ["metadata"]}};});var WF=n(()=>{$t();Ore();Kre();Qre();$re();Yre();});exports.OpikQueryLanguage=void 0;var Xre=n(()=>{Tp();jp();Jre();WF();Yt();exports.OpikQueryLanguage=class p{constructor(i,r){let t=i||"";this.config=r||new Xt,this.filterExpressions=t?this.parse(t):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}static forTraces(i){return new p(i,new Xt)}static forSpans(i){return new p(i,new Zi)}static forThreads(i){return new p(i,new qi)}static forPrompts(i){return new p(i,new eo)}static forPromptVersions(i){return new p(i,new Ip)}getFilterExpressions(){return this.filterExpressions}parse(i){let r=new Ve(i),t=[];for(;!r.isAtEnd();){let o=this.parseExpression(r);if(t.push(o),r.skipWhitespace(),!r.isAtEnd()&&!this.parseConnector(r))break}return t}parseExpression(i){let r=Cp.parse(i,this.config),t=Ep.parse(i,this.getFieldName(r),this.config),o=Gre.includes(t.operator)?{value:null}:Hre.includes(t.operator)?Xi.parseArrayValue(i):Xi.parse(i);return this.buildExpression(r,t,o)}getFieldName(i){return i.field}buildExpression(i,r,t){let o={field:i.field,operator:r.operator,value:t.value,type:i.columnType};return i.type==="nested"&&(o.key=i.key),o}parseConnector(i){let r=i.getPosition(),t=i.consumeWhile(o=>Ve.isLetterChar(o));try{return Mre(t)}catch(o){if(o instanceof Error&&o.message.includes("trailing characters")){let a=i.getFullInput().slice(r);throw new Error(`Invalid filter string, trailing characters ${a}`)}throw o}}};});var Ku=n(()=>{Xre();WF();});async function Zre(p,i,r,t,o,a){return Me((s,c)=>p.traces.searchTraces({projectName:i,filters:r!=null?r:void 0,limit:s,lastRetrievedId:c,truncate:o,exclude:a}),G.TracePublic,"id",{maxResults:t})}async function qre(p,i,r,t){let o=Number.isNaN(r)?0:r,a=Date.now(),s=[];for(;;){if(s=await p(),s.length>=i)return s;let c=Date.now()-a;if(c>=o)return s;await new Promise(l=>setTimeout(l,Math.min(t,o-c)));}}async function ete(p,i,r,t,o){return Me((a,s)=>p.traces.searchTraceThreads({projectName:i,filters:r!=null?r:void 0,limit:a,lastRetrievedThreadModelId:s,truncate:o}),G.TraceThread,"thread_model_id",{maxResults:t})}function VF(p,i,r){if(!p)return null;let o=r(p).getFilterExpressions();return o?o.map(a=>{let s={field:a.field,operator:i(a.operator),value:a.value};return a.key&&(s.key=a.key),s}):null}function Qu(p){return VF(p,i=>i,exports.OpikQueryLanguage.forTraces)}function $u(p){return VF(p,i=>i,exports.OpikQueryLanguage.forThreads)}async function rte(p,i,r,t,o,a){return Me((s,c)=>p.spans.searchSpans({projectName:i,filters:r!=null?r:void 0,limit:s,lastRetrievedId:c,truncate:o,exclude:a}),G.SpanPublic,"id",{maxResults:t})}function tte(p){return VF(p,i=>i,exports.OpikQueryLanguage.forSpans)}var Yu=n(()=>{Ir();rt();Ku();});var to,ro,Xu=n(()=>{ae();to=1e3,ro=class{constructor(i,r){this.opik=r;var t;this.id=i.id,this.name=i.name,this.projectId=i.projectId,this.scope=(t=i.scope)!=null?t:this.constructor.SCOPE,this.description=i.description,this.instructions=i.instructions,this.commentsEnabled=i.commentsEnabled,this.feedbackDefinitionNames=i.feedbackDefinitionNames;}async getItemsCount(){return (await this.opik.api.annotationQueues.getAnnotationQueueById(this.id)).itemsCount}async update(i){exports.logger.debug(`Updating annotation queue "${this.name}"`,i),await this.opik.api.annotationQueues.updateAnnotationQueue(this.id,i),exports.logger.debug(`Successfully updated annotation queue "${this.name}"`);}async delete(){exports.logger.debug(`Deleting annotation queue "${this.name}"`),await this.opik.api.annotationQueues.deleteAnnotationQueueBatch({ids:[this.id]}),exports.logger.debug(`Successfully deleted annotation queue "${this.name}"`);}async addItemsBatch(i){await this.opik.api.annotationQueues.addItemsToAnnotationQueue(this.id,{body:{ids:i}}),exports.logger.debug(`Successfully added ${i.length} items to annotation queue`);}async removeItemsBatch(i){await this.opik.api.annotationQueues.removeItemsFromAnnotationQueue(this.id,{body:{ids:i}}),exports.logger.debug(`Successfully removed ${i.length} items from annotation queue`);}};});exports.TracesAnnotationQueue=void 0;var ite=n(()=>{Ir();rt();Yu();ae();wp();Xu();exports.TracesAnnotationQueue=class extends ro{constructor(i,r){super(i,r);}extractTraceIds(i){return i.map((r,t)=>{if(!r.id)throw new Oi("trace",t);return r.id})}async addTraces(i){if(!i||i.length===0)return;let r=this.extractTraceIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Adding ${o.length} traces to annotation queue`),await this.addItemsBatch(o);}async getItems(i){var a;let r=(a=i==null?void 0:i.truncateImages)!=null?a:true,t=Qu(`annotation_queue_ids contains "${this.id}"`);exports.logger.debug(`Fetching items from annotation queue "${this.name}"`);let o=await Me((s,c)=>this.opik.api.traces.searchTraces({projectId:this.projectId,filters:t!=null?t:void 0,limit:s,lastRetrievedId:c,truncate:r}),G.TracePublic,"id");return exports.logger.debug(`Fetched ${o.length} items from annotation queue "${this.name}"`),o}async removeTraces(i){if(!i||i.length===0)return;let r=this.extractTraceIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Removing ${o.length} traces from annotation queue`),await this.removeItemsBatch(o);}};exports.TracesAnnotationQueue.SCOPE="trace";});exports.ThreadsAnnotationQueue=void 0;var ote=n(()=>{Ir();rt();Yu();ae();wp();Xu();exports.ThreadsAnnotationQueue=class extends ro{constructor(i,r){super(i,r);}extractThreadIds(i){return i.map((r,t)=>{if(!r.threadModelId)throw new Oi("thread",t);return r.threadModelId})}async addThreads(i){if(!i||i.length===0)return;let r=this.extractThreadIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Adding ${o.length} threads to annotation queue`),await this.addItemsBatch(o);}async getItems(i){var a;let r=(a=i==null?void 0:i.truncateImages)!=null?a:true,t=$u(`annotation_queue_ids contains "${this.id}"`);exports.logger.debug(`Fetching items from annotation queue "${this.name}"`);let o=await Me((s,c)=>this.opik.api.traces.searchTraceThreads({projectId:this.projectId,filters:t!=null?t:void 0,limit:s,lastRetrievedThreadModelId:c,truncate:r}),G.TraceThread,"thread_model_id");return exports.logger.debug(`Fetched ${o.length} items from annotation queue "${this.name}"`),o}async removeThreads(i){if(!i||i.length===0)return;let r=this.extractThreadIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Removing ${o.length} threads from annotation queue`),await this.removeItemsBatch(o);}};exports.ThreadsAnnotationQueue.SCOPE="thread";});var LF=n(()=>{Xu();ite();ote();wp();});function JF(p,i){let r=i!=null?i:Zu(p);if(r==="boolean")return p?"true":"false";if(r==="integer"||r==="float"){if(!Number.isFinite(p))throw new TypeError(`Cannot serialize non-finite number: ${p}`);return String(p)}if(r==="string")return Array.isArray(p)||typeof p=="object"&&p!==null?JSON.stringify(p):p;if(r==="prompt"){let t=p;if(!t.commit)throw new TypeError("Cannot serialize prompt without a commit");return t.commit}if(r==="prompt_commit")return p.commit;throw new TypeError(`Unsupported backend type: ${r}`)}function io(p,i){if(p==null)return null;switch(i){case "boolean":return p.toLowerCase()==="true";case "integer":return Math.trunc(Number(p));case "float":return Number(p);case "string":case "prompt":case "prompt_commit":return p;default:return p}}function Zu(p){if(typeof p=="boolean")return "boolean";if(typeof p=="number")return Number.isInteger(p)?"integer":"float";if(typeof p=="string")return "string";if(p instanceof cr)return "prompt";if(p instanceof Br)return "prompt_commit";if(p===null||Array.isArray(p)||typeof p=="object")return "string";throw new TypeError(`Unsupported value type: ${typeof p}`)}function GF(p){let i=[];for(let[r,t]of Object.entries(p)){if(t==null){i.push({key:r,value:void 0,type:"string"});continue}let o=Zu(t);i.push({key:r,value:JF(t,o),type:o});}return i}function ate(p,i,r){let t=r!=null?r:Object.keys(p),o={};for(let a of t){let s=p[a];s&&(s.type==="prompt"||s.type==="prompt_commit"?o[a]=i[a]:o[a]=io(s.value,s.type));}return o}var Dp=n(()=>{vp();Sp();});var xr,qu=n(()=>{UF();Lu();Sp();Dp();xr=class p{constructor(i){this.id=i.id,this.name=i.name,this.type=i.type,this.description=i.description,this.envs=i.envs,this.createdBy=i.createdBy,this.createdAt=i.createdAt,this._rawValues=i.values,this._opik=i.opik,this._resolvedValues={},this._descriptions={};for(let r of this._rawValues)this._resolvedValues[r.key]=io(r.value,r.type),this._descriptions[r.key]=r.description;}static async fromApiResponse(i,r){if(!i.id)throw new Error("Invalid API response: missing required field 'id'");let t=new p({id:i.id,name:i.name,type:i.type,description:i.description,envs:i.envs,createdBy:i.createdBy,createdAt:i.createdAt,values:i.values,opik:r});return await t.resolvePrompts(),t}async resolvePrompts(){if(this._opik)for(let i of this._rawValues){if(i.type!=="prompt"&&i.type!=="prompt_commit"||!i.value)continue;let r=await this._opik.api.prompts.getPromptByCommit(i.value),t=r.requestedVersion;t&&(!t.promptId&&r.id&&(t.promptId=r.id),i.type==="prompt"?r.templateStructure==="chat"||t.templateStructure==="chat"?this._resolvedValues[i.key]=exports.ChatPrompt.fromApiResponse(r,t,this._opik):this._resolvedValues[i.key]=exports.Prompt.fromApiResponse(r,t,this._opik):this._resolvedValues[i.key]=Br.fromApiResponse(r.name,t));}}get values(){return {...this._resolvedValues}}get(i,r){let t=this._resolvedValues[i];return t!==void 0?t:r}keys(){return this._rawValues.map(i=>i.key)}getRawValue(i){var t;let r=this._rawValues.find(o=>o.key===i);return (t=r==null?void 0:r.value)!=null?t:void 0}getRawEntry(i){let r=this._rawValues.find(t=>t.key===i);if(r)return {value:r.value,type:r.type}}getFieldDescription(i){return this._descriptions[i]}};});var Zt,HF=n(()=>{Ir();ee();sr();ae();qu();Zt=class{constructor(i,r){this.projectName=i,this.opik=r;}async getProjectId(){let i=await this.opik.api.projects.retrieveProject({name:this.projectName});if(!(i!=null&&i.id))throw new Error(`Project "${this.projectName}" not found`);return i.id}async createBlueprint(i){let r=exports.generateId();exports.logger.debug(`Creating blueprint for project "${this.projectName}"`),await this.opik.api.agentConfigs.createAgentConfig({id:r,projectName:this.projectName,blueprint:{id:r,type:wo.Blueprint,description:i.description,values:i.values}});let t=await this.opik.api.agentConfigs.getBlueprintById(r);return await xr.fromApiResponse(t,this.opik)}async updateBlueprint(i){let r=exports.generateId();exports.logger.debug(`Updating blueprint for project "${this.projectName}"`),await this.opik.api.agentConfigs.updateAgentConfig({projectName:this.projectName,blueprint:{id:r,type:wo.Blueprint,description:i.description,values:i.values}});let t=await this.opik.api.agentConfigs.getBlueprintById(r);return await xr.fromApiResponse(t,this.opik)}async createMask(i){let r=exports.generateId();return exports.logger.debug(`Creating mask for project "${this.projectName}"`),await this.opik.api.agentConfigs.updateAgentConfig({projectName:this.projectName,blueprint:{id:r,type:wo.Mask,description:i.description,values:i.values}}),r}async getBlueprint(i={}){let{id:r,name:t,env:o,maskId:a}=i;try{let s;if(r)exports.logger.debug(`Getting blueprint by ID "${r}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintById(r,{maskId:a});else if(t){let c=await this.getProjectId();exports.logger.debug(`Getting blueprint by name "${t}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintByName(c,t,{maskId:a});}else if(o){let c=await this.getProjectId();exports.logger.debug(`Getting blueprint by env "${o}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintByEnv(o,c,{maskId:a});}else {let c=await this.getProjectId();exports.logger.debug(`Getting latest blueprint for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getLatestBlueprint(c,{maskId:a});}return await xr.fromApiResponse(s,this.opik)}catch(s){if(s instanceof k&&s.statusCode===404)return null;throw exports.logger.error(`Failed to get blueprint for project "${this.projectName}"`,{error:s}),s}}};});function nte(){var p;return (p=eg.getStore())==null?void 0:p.traceId}function ste(p,i){return eg.run(p,i)}var eg,rg=n(()=>{eg=new async_hooks.AsyncLocalStorage;});function lte(p){pte.set(p.name,p);for(let i of cte)i(p.name);}function mte(p){cte.push(p);}function oo(){return new Map(pte)}function dte(p){var o,a;let i=p.toString(),r=vle.exec(i)||Tle.exec(i);if(!r)return [];let t=(a=(o=r[1])!=null?o:r[2])!=null?a:"";return t.trim()?t.split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>{let c=/=/.test(s)||/\?/.test(s.replace(/:\s*.*$/,"")),l=s.replace(/=.*$/,"").replace(/:\s*.*$/,"").replace(/^\.\.\.|[?]$/g,"").trim(),m=c?ci.Optional:ci.Required;return {name:l,type:"string",presence:m}}).filter(s=>s.name.length>0):[]}var pte,cte,vle,Tle,tg=n(()=>{Bh();pte=new Map,cte=[];vle=/^(?:async\s+)?(?:function\s+\w*\s*)?\(([^)]*)\)/,Tle=/^(?:async\s+)?(?:\(([^)]*)\)|(\w+))\s*=>/;});function ig(p,i){return OF.run(p,i)}function KF(){var p,i;return (i=(p=OF.getStore())==null?void 0:p.maskId)!=null?i:null}function ute(){var p,i;return (i=(p=OF.getStore())==null?void 0:p.blueprintName)!=null?i:null}var OF,og=n(()=>{OF=new async_hooks.AsyncLocalStorage;});exports.flushAll=void 0;var QF=n(()=>{Yi();ae();Mr();exports.flushAll=async()=>{exports.logger.debug("Starting flushAll operation");try{await Promise.all([ng().flush({silent:!0}),...sg.map(p=>p.flush({silent:!0}))]),exports.logger.debug("flushAll operation completed successfully");}catch(p){throw exports.logger.error("Error during flushAll operation:",{error:p instanceof Error?p.message:p,stack:p instanceof Error?p.stack:void 0}),p}};});function ZF(p,i,r){return Math.round(p+(i-p)*r)}function Cle(){let p=hte%gte/(gte-1),i=ZF($F[0],YF[0],p),r=ZF($F[1],YF[1],p),t=ZF($F[2],YF[2],p);return hte++,`\x1B[38;2;${i};${r};${t}m \u2503\x1B[0m `}function yte(p,i){return function(t,o,a){let s=typeof t=="string"?t:Buffer.from(t).toString("utf-8"),c=eg.getStore();if(c){let l=pg.get(c.jobId);l||(l=[],pg.set(c.jobId,l)),l.push({stream:i,text:s});}if(bte){let l=s.split(`
17
+ `)}return o.length===1&&o[0].type==="text"?o[0].text:o}};});exports.ChatPrompt=void 0;var Lu=n(()=>{Kt();Fr();Sre();vp();ae();exports.ChatPrompt=class p extends cr{constructor(i,r){super({...i,templateStructure:we.Chat},r),this.messages=i.messages,this.chatTemplate=new Vu(i.messages,this.type),!i.synced&&!i.promptId&&exports.logger.warn("new ChatPrompt() is deprecated. Use client.createChatPrompt() to create or client.getChatPrompt() to retrieve chat prompts instead."),r===void 0&&!i.synced&&(this._pendingSync=this._performSync());}_performSync(){return this._syncViaCreate(()=>this.opik.createChatPrompt({name:this._name,messages:structuredClone(this.messages),metadata:this._metadata,type:this.type,description:this._description,tags:this._tags.length?Array.from(this._tags):void 0}))}get template(){return structuredClone(this.messages)}format(i,r){return this.chatTemplate.format(i,r)}static fromApiResponse(i,r,t,o){var c;if(!r.template)throw new de("Invalid API response: missing required field 'template'");if(!r.commit)throw new de("Invalid API response: missing required field 'commit'");if(!r.promptId)throw new de("Invalid API response: missing required field 'promptId'");if(!r.id)throw new de("Invalid API response: missing required field 'id' (version ID)");let a;try{if(a=JSON.parse(r.template),!Array.isArray(a))throw new de("Invalid chat prompt template: expected array of messages")}catch(l){throw l instanceof de?l:new de(`Failed to parse chat prompt template: ${l instanceof Error?l.message:String(l)}`)}let s=(c=r.type)!=null?c:exports.PromptType.MUSTACHE;if(s!=="mustache"&&s!=="jinja2")throw new de(`Invalid API response: unknown prompt type '${s}'`);return new p({promptId:r.promptId,versionId:r.id,name:i.name,messages:a,commit:r.commit,version:r.versionNumber,metadata:r.metadata,type:s,changeDescription:r.changeDescription,description:i.description,tags:i.tags,synced:true,projectName:o,environments:r.environments},t)}async useVersion(i){var t;let r=await this.restoreVersion(i);return p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik)}async syncWithBackend(){try{return await this.opik.createChatPrompt({name:this.name,messages:structuredClone(this.messages),metadata:this.metadata,type:this.type,description:this.description,tags:this.tags?Array.from(this.tags):void 0})}catch(i){return exports.logger.warn(`Failed to sync chat prompt '${this.name}' with the backend. The prompt will work locally but is not persisted on the server. Await prompt.ready(), then retry by calling .syncWithBackend() if prompt.synced is still false.`,{error:i}),this}}async getVersion(i){var t;let r=await this.retrieveVersion(i);return r?p.fromApiResponse({name:this.name,description:this.description,tags:Array.from((t=this.tags)!=null?t:[])},r,this.opik):null}};});function _le(p,i,r){return {prompt:p,ttlSeconds:i,lastFetch:Date.now(),refreshCallback:r,get isStale(){return this.ttlSeconds===null?false:Date.now()-this.lastFetch>=this.ttlSeconds*1e3}}}function Gu(){return Tre}function jre(p,i,r,t,o,a,s){var l;let c=(l=a!=null?a:i)!=null?l:"";return JSON.stringify([p,c,r!=null?r:"",t,s!=null?s:"",o!=null?o:""])}async function Hu(p,i,r,t,o,a,s,c,l){let m=i!=null?null:a!=null?a:Rle,u=m!==null&&!s?o:void 0,d=jre(p,i,r,t,s,c,l);return await Tre.getOrFetch(d,o,m,u)}var Rle,xle,wle,vre,Ju,Tre,NF=n(()=>{ae();Rle=300,xle=1,wle=128,vre=100;Ju=class{constructor(i=wle){this.entries=new Map;this.inflight=new Map;this.refreshTimer=null;this.refreshRunning=false;this.stopped=false;this.maxSize=i;}get(i){let r=this.entries.get(i);return r?(this.entries.delete(i),this.entries.set(i,r),r.prompt):null}async getOrFetch(i,r,t,o){let a=this.entries.get(i);if(a)return this.entries.delete(i),this.entries.set(i,a),a.prompt;let s=this.inflight.get(i);if(s)return s;let c=this.fetchAndCache(i,r,t,o);this.inflight.set(i,c);try{return await c}finally{this.inflight.delete(i);}}async fetchAndCache(i,r,t,o){let a=await r();return a===null?null:(this.entries.set(i,_le(a,t,o)),this.evict(),t!==null&&this.ensureRefreshTimerStarted(t),a)}evictByIds(i){let r=new Set(i);for(let[t,o]of this.entries)o.prompt.id&&r.has(o.prompt.id)&&this.entries.delete(t);}invalidateForPrompt(i,r){let t=r!=null?r:"";for(let o of this.entries.keys()){let[a,,s]=JSON.parse(o);a===i&&s===t&&this.entries.delete(o);}}clear(){this.stopRefreshTimer(),this.entries.clear(),this.stopped=false;}evict(){for(;this.entries.size>this.maxSize;){let i=this.entries.keys().next().value;i!==void 0&&this.entries.delete(i);}}ensureRefreshTimerStarted(i){if(this.stopped||this.refreshTimer!==null)return;let r=Math.max(i,xle)*1e3;this.refreshTimer=setInterval(()=>{this.refreshStaleEntries().catch(t=>{exports.logger.debug("Prompt cache background refresh loop failed",{error:t});});},r),this.refreshTimer&&typeof this.refreshTimer=="object"&&"unref"in this.refreshTimer&&this.refreshTimer.unref();}async refreshStaleEntries(){if(!this.refreshRunning){this.refreshRunning=true;try{let i=Array.from(this.entries.values()).filter(r=>r.isStale&&r.refreshCallback);for(let r=0;r<i.length&&!this.stopped;r+=vre){let t=i.slice(r,r+vre),o=await Promise.allSettled(t.map(async a=>{let s=await a.refreshCallback();s!==null&&(a.prompt=s,a.lastFetch=Date.now());}));for(let a=0;a<o.length;a++){let s=o[a];s.status==="rejected"&&exports.logger.debug("Background prompt cache refresh failed",{promptName:t[a].prompt.name,error:s.reason});}}}finally{this.refreshRunning=false;}}}stopRefreshTimer(){this.stopped=true,this.refreshTimer!==null&&(clearInterval(this.refreshTimer),this.refreshTimer=null);}},Tre=new Ju;});var FF=n(()=>{UF();Lu();Sp();Kt();Fr();NF();});async function Cre(p,i,r,t){try{return await p.retrievePromptVersion({name:i,projectName:r},t)}catch(o){if(Ple(o))return null;throw o}}function Ere(p,i,r){return i?i.template!==p.prompt||!Ale(i.metadata,p.metadata)||i.type!==r:true}function Ale(p,i){let r=p!=null?p:{},t=i!=null?i:{};return kle__default.default(r,t)}function Ple(p){return typeof p=="object"&&p!==null&&"statusCode"in p&&p.statusCode===404}var Ire=n(()=>{});function Ure(p,i){return Dre.run(p!=null?p:null,i)}function Nre(p){var r;let i=Dre.getStore();return i==null?null:(r=i[p])!=null?r:null}var Dre,BF=n(()=>{Dre=new async_hooks.AsyncLocalStorage;});var Ve,Tp=n(()=>{Ve=class{constructor(i){this.input=i;this.cursor=0;}getPosition(){return this.cursor}getRemainingInput(){return this.input.slice(this.cursor)}getFullInput(){return this.input}isAtEnd(){return this.cursor>=this.input.length}peekChar(){return this.input[this.cursor]}peekCharAt(i){return this.input[this.cursor+i]}consumeChar(){return this.input[this.cursor++]}advance(i=1){this.cursor+=i;}skipWhitespace(){for(;this.cursor<this.input.length&&/\s/.test(this.input[this.cursor]);)this.cursor++;}consumeWhile(i){let r=this.cursor;for(;this.cursor<this.input.length&&i(this.input[this.cursor]);)this.cursor++;return this.input.slice(r,this.cursor)}sliceFrom(i){return this.input.slice(i,this.cursor)}static isFieldChar(i){return /[a-zA-Z0-9_]/.test(i)}static isLetterChar(i){return /[a-zA-Z]/.test(i)}static isDigitChar(i){return /\d/.test(i)}static isWhitespaceChar(i){return /\s/.test(i)}static isQuoteChar(i){return i==='"'||i==="'"}};});function Fre(p,i){let r=p.startsWith("usage."),t=i.nestedFields.includes(p),o=Object.keys(i.columns).includes(p);if(!r&&!t&&!o){let a=Object.keys(i.columns).join(", ");throw new Error(`Field ${p} is not supported, only the fields ${a} are supported.`)}}function Bre(p,i,r){if(!r.nestedFields.includes(p)){let t=Object.keys(r.columns).join(", ");throw new Error(`Field ${p}.${i} is not supported, only the fields ${t} are supported.`)}if(p==="usage"&&!r.usageKeys.includes(i))throw new Error(`When querying usage, ${i} is not supported, only usage.total_tokens, usage.prompt_tokens and usage.completion_tokens are supported.`)}function MF(p,i,r){let t=r.supportedOperators[p];if(!(t!=null&&t.includes(i))){let o=(t==null?void 0:t.join(", "))||"none";throw new Error(`Operator ${i} is not supported for field ${p}, only the operators ${o} are supported.`)}}function Mre(p){let i=p.toLowerCase();if(i==="and")return true;throw i==="or"?new Error("Invalid filter string, OR is not currently supported"):new Error(`Invalid filter string, trailing characters ${p}`)}function Ou(p,i,r){if(!p)throw new Error(`Missing closing quote for: ${r}`)}var jp=n(()=>{});var Cp,Wre=n(()=>{Tp();jp();Cp=class{static parse(i,r){i.skipWhitespace();let t=this.parseFieldName(i);return Fre(t,r),i.peekChar()==="."?this.parseFieldWithKey(i,t,r):{type:"simple",field:t,columnType:r.columns[t]}}static parseFieldName(i){return i.consumeWhile(r=>Ve.isFieldChar(r))}static parseFieldWithKey(i,r,t){i.advance();let o=this.parseKey(i);if(Bre(r,o,t),r==="usage"){let a=`usage.${o}`;return {type:"simple",field:a,columnType:t.columns[a]}}return {type:"nested",field:r,key:o,columnType:t.columns[r]}}static parseKey(i){let r=i.peekChar();return Ve.isQuoteChar(r)?this.parseQuotedKey(i,r):this.parseUnquotedKey(i)}static parseUnquotedKey(i){return i.consumeWhile(r=>Ve.isFieldChar(r))}static parseQuotedKey(i,r){let t=i.getPosition();i.advance();let o="",a=false;for(;!i.isAtEnd();){let c=i.peekChar();if(c===r){if(i.peekCharAt(1)===r){o+=r,i.advance(2);continue}a=true,i.advance();break}o+=c,i.advance();}let s=i.getFullInput().slice(t);return Ou(a,t,s),o}};});var Ep,Vre=n(()=>{Tp();jp();Ep=class{static parse(i,r,t){i.skipWhitespace();let o=i.peekChar(),a=this.tryParseSymbolicOperator(i,o);if(a)return MF(r,a,t),{operator:a};let s=this.parseWordOperator(i);return MF(r,s,t),{operator:s}}static tryParseSymbolicOperator(i,r){if(r==="=")return i.advance(),"=";if(r==="<"||r===">"){let t=r;return i.advance(),i.peekChar()==="="?(i.advance(),t+"="):t}return r==="!"&&i.peekCharAt(1)==="="?(i.advance(2),"!="):null}static parseWordOperator(i){return i.consumeWhile(r=>!Ve.isWhitespaceChar(r))}};});var Xi,Lre=n(()=>{Tp();jp();Xi=class{static parse(i){i.skipWhitespace();let r=i.getPosition(),t=i.peekChar();if(t==='"')return this.parseQuotedString(i,r);if(Ve.isDigitChar(t)||t==="-")return this.parseNumber(i);let o=i.getRemainingInput();throw new Error(`Invalid value ${o.slice(0,20)}, expected a string in double quotes("value") or a number`)}static parseQuotedString(i,r){i.advance();let t="",o=false;for(;!i.isAtEnd();){if(i.peekChar()==='"'){if(i.peekCharAt(1)==='"'){t+='"',i.advance(2);continue}o=true;break}t+=i.consumeChar();}return Ou(o,r,`value starting at position ${r}`),i.advance(),{value:t}}static parseNumber(i){let r="";return i.peekChar()==="-"&&(r+=i.consumeChar()),r+=this.parseDigits(i),i.peekChar()==="."&&(r+=i.consumeChar(),r+=this.parseDigits(i)),{value:r}}static parseArrayValue(i){if(i.skipWhitespace(),i.peekChar()!=="("){let t=i.getRemainingInput();throw new Error(`Expected array value starting with '(' for in/not_in operator, got: ${t.slice(0,20)}`)}i.advance();let r=[];for(;;){if(i.skipWhitespace(),i.isAtEnd())throw new Error("Unterminated array value, missing ')'");if(i.peekChar()===")"){if(r.length===0)throw new Error("Expected at least one item inside (...) for in/not_in operator");i.advance();break}if(r.length>0){if(i.peekChar()!==","){let a=i.getRemainingInput();throw new Error(`Expected ',' between array elements, got: ${a.slice(0,20)}`)}i.advance(),i.skipWhitespace();}if(i.isAtEnd()||i.peekChar()!=='"'){let a=i.getRemainingInput();throw new Error(`Array elements must be quoted strings, got: ${a.slice(0,20)}`)}let o=this.parseQuotedString(i,i.getPosition()).value;if(o.includes(","))throw new Error(`Array element values cannot contain commas (got: "${o}"). The backend uses comma as the array delimiter.`);r.push(o);}return {value:r.join(",")}}static parseDigits(i){return i.consumeWhile(r=>Ve.isDigitChar(r))}};});var Jre=n(()=>{Wre();Vre();Lre();});var Le,$t=n(()=>{Le=class{get nestedFields(){return ["usage","metadata","feedback_scores"]}get usageKeys(){return ["total_tokens","prompt_tokens","completion_tokens"]}};});var V,Gre,Hre,Yt=n(()=>{V={STRING_OPS:["=","contains","not_contains","starts_with","ends_with","!=",">","<"],STRING_STATE_DB_OPS:["=","!=","contains","not_contains","starts_with","ends_with"],NUMERIC_OPS:["=","!=",">","<",">=","<="],DATETIME_OPS:["=",">","<",">=","<="],LIST_OPS:["=","!=","contains","not_contains","is_empty","is_not_empty"],DICT_OPS:["=","contains",">","<"],ENUM_OPS:["=","!=","in","not_in"],LIMITED_STRING_OPS:["=","contains","not_contains"],FEEDBACK_SCORES_OPS:["=","!=",">","<",">=","<=","is_empty","is_not_empty"]},Gre=["is_empty","is_not_empty"],Hre=["in","not_in"];});var Xt,Ore=n(()=>{$t();Yt();Xt=class extends Le{get columns(){return {id:"string",name:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",input_json:"dictionary",output_json:"dictionary",metadata:"dictionary",total_estimated_cost:"number",llm_span_count:"number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",feedback_scores:"feedback_scores_number",span_feedback_scores:"feedback_scores_number",duration:"number",thread_id:"string",guardrails:"string",error_info:"error_container",created_at:"date_time",last_updated_at:"date_time",annotation_queue_ids:"list",comments:"comments",experiment_id:"string",environment:"enum"}}get supportedOperators(){return {id:V.STRING_OPS,name:V.STRING_OPS,start_time:V.DATETIME_OPS,end_time:V.DATETIME_OPS,input:V.LIMITED_STRING_OPS,output:V.LIMITED_STRING_OPS,input_json:V.DICT_OPS,output_json:V.DICT_OPS,metadata:V.DICT_OPS,feedback_scores:V.FEEDBACK_SCORES_OPS,span_feedback_scores:V.FEEDBACK_SCORES_OPS,tags:V.LIST_OPS,"usage.total_tokens":V.NUMERIC_OPS,"usage.prompt_tokens":V.NUMERIC_OPS,"usage.completion_tokens":V.NUMERIC_OPS,duration:V.NUMERIC_OPS,thread_id:V.STRING_OPS,total_estimated_cost:V.NUMERIC_OPS,llm_span_count:V.NUMERIC_OPS,guardrails:V.STRING_OPS,error_info:["is_empty","is_not_empty"],created_at:V.DATETIME_OPS,last_updated_at:V.DATETIME_OPS,annotation_queue_ids:V.LIST_OPS,comments:["is_empty","is_not_empty"],experiment_id:V.STRING_OPS,environment:V.ENUM_OPS}}get nestedFields(){return ["usage","metadata","feedback_scores","span_feedback_scores","input_json","output_json"]}};});var Zi,Kre=n(()=>{$t();Yt();Zi=class extends Le{get columns(){return {id:"string",name:"string",start_time:"date_time",end_time:"date_time",input:"string",output:"string",input_json:"dictionary",output_json:"dictionary",metadata:"dictionary",model:"string",provider:"string",total_estimated_cost:"number",tags:"list","usage.total_tokens":"number","usage.prompt_tokens":"number","usage.completion_tokens":"number",feedback_scores:"feedback_scores_number",duration:"number",error_info:"error_container",type:"enum",trace_id:"string",environment:"enum"}}get supportedOperators(){return {id:V.STRING_OPS,name:V.STRING_OPS,start_time:V.DATETIME_OPS,end_time:V.DATETIME_OPS,input:V.LIMITED_STRING_OPS,output:V.LIMITED_STRING_OPS,input_json:V.DICT_OPS,output_json:V.DICT_OPS,metadata:V.DICT_OPS,feedback_scores:V.FEEDBACK_SCORES_OPS,tags:V.LIST_OPS,"usage.total_tokens":V.NUMERIC_OPS,"usage.prompt_tokens":V.NUMERIC_OPS,"usage.completion_tokens":V.NUMERIC_OPS,duration:V.NUMERIC_OPS,total_estimated_cost:V.NUMERIC_OPS,model:V.STRING_OPS,provider:V.STRING_OPS,error_info:["is_empty","is_not_empty"],type:V.ENUM_OPS,trace_id:V.STRING_OPS,environment:V.ENUM_OPS}}get nestedFields(){return ["usage","metadata","feedback_scores","input_json","output_json"]}};});var qi,Qre=n(()=>{$t();Yt();qi=class extends Le{get columns(){return {id:"string",first_message:"string",last_message:"string",number_of_messages:"number",duration:"number",created_at:"date_time",last_updated_at:"date_time",start_time:"date_time",end_time:"date_time",feedback_scores:"feedback_scores_number",status:"enum",tags:"list",annotation_queue_ids:"list",comments:"comments",environment:"enum"}}get supportedOperators(){return {id:V.STRING_OPS,first_message:V.LIMITED_STRING_OPS,last_message:V.LIMITED_STRING_OPS,number_of_messages:V.NUMERIC_OPS,duration:V.NUMERIC_OPS,created_at:V.DATETIME_OPS,last_updated_at:V.DATETIME_OPS,start_time:V.DATETIME_OPS,end_time:V.DATETIME_OPS,feedback_scores:V.FEEDBACK_SCORES_OPS,status:V.ENUM_OPS,tags:V.LIST_OPS,annotation_queue_ids:V.LIST_OPS,comments:["is_empty","is_not_empty"],environment:V.ENUM_OPS}}get nestedFields(){return ["feedback_scores"]}};});var eo,$re=n(()=>{$t();Yt();eo=class extends Le{get columns(){return {id:"string",name:"string",description:"string",created_at:"date_time",last_updated_at:"date_time",created_by:"string",last_updated_by:"string",tags:"list",version_count:"number",template_structure:"string"}}get supportedOperators(){return {id:V.STRING_OPS,name:V.STRING_OPS,description:V.STRING_OPS,created_at:V.DATETIME_OPS,last_updated_at:V.DATETIME_OPS,created_by:V.STRING_OPS,last_updated_by:V.STRING_OPS,tags:V.LIST_OPS,version_count:V.NUMERIC_OPS,template_structure:V.STRING_OPS}}get nestedFields(){return []}};});var Ip,Yre=n(()=>{$t();Yt();Ip=class extends Le{get columns(){return {id:"string",commit:"string",version_number:"string",template:"string",change_description:"string",metadata:"dictionary",type:"string",tags:"list",created_at:"date_time",created_by:"string"}}get supportedOperators(){return {id:V.STRING_STATE_DB_OPS,commit:V.STRING_STATE_DB_OPS,version_number:V.STRING_STATE_DB_OPS,template:V.STRING_STATE_DB_OPS,change_description:V.STRING_STATE_DB_OPS,metadata:V.DICT_OPS,type:["=","!="],tags:V.LIST_OPS,created_at:V.DATETIME_OPS,created_by:V.STRING_STATE_DB_OPS}}get nestedFields(){return ["metadata"]}};});var WF=n(()=>{$t();Ore();Kre();Qre();$re();Yre();});exports.OpikQueryLanguage=void 0;var Xre=n(()=>{Tp();jp();Jre();WF();Yt();exports.OpikQueryLanguage=class p{constructor(i,r){let t=i||"";this.config=r||new Xt,this.filterExpressions=t?this.parse(t):null,this.parsedFilters=this.filterExpressions?JSON.stringify(this.filterExpressions):null;}static forTraces(i){return new p(i,new Xt)}static forSpans(i){return new p(i,new Zi)}static forThreads(i){return new p(i,new qi)}static forPrompts(i){return new p(i,new eo)}static forPromptVersions(i){return new p(i,new Ip)}getFilterExpressions(){return this.filterExpressions}parse(i){let r=new Ve(i),t=[];for(;!r.isAtEnd();){let o=this.parseExpression(r);if(t.push(o),r.skipWhitespace(),!r.isAtEnd()&&!this.parseConnector(r))break}return t}parseExpression(i){let r=Cp.parse(i,this.config),t=Ep.parse(i,this.getFieldName(r),this.config),o=Gre.includes(t.operator)?{value:null}:Hre.includes(t.operator)?Xi.parseArrayValue(i):Xi.parse(i);return this.buildExpression(r,t,o)}getFieldName(i){return i.field}buildExpression(i,r,t){let o={field:i.field,operator:r.operator,value:t.value,type:i.columnType};return i.type==="nested"&&(o.key=i.key),o}parseConnector(i){let r=i.getPosition(),t=i.consumeWhile(o=>Ve.isLetterChar(o));try{return Mre(t)}catch(o){if(o instanceof Error&&o.message.includes("trailing characters")){let a=i.getFullInput().slice(r);throw new Error(`Invalid filter string, trailing characters ${a}`)}throw o}}};});var Ku=n(()=>{Xre();WF();});async function Zre(p,i,r,t,o,a){return Me((s,c)=>p.traces.searchTraces({projectName:i,filters:r!=null?r:void 0,limit:s,lastRetrievedId:c,truncate:o,exclude:a}),G.TracePublic,"id",{maxResults:t})}async function qre(p,i,r,t){let o=Number.isNaN(r)?0:r,a=Date.now(),s=[];for(;;){if(s=await p(),s.length>=i)return s;let c=Date.now()-a;if(c>=o)return s;await new Promise(l=>setTimeout(l,Math.min(t,o-c)));}}async function ete(p,i,r,t,o){return Me((a,s)=>p.traces.searchTraceThreads({projectName:i,filters:r!=null?r:void 0,limit:a,lastRetrievedThreadModelId:s,truncate:o}),G.TraceThread,"thread_model_id",{maxResults:t})}function VF(p,i,r){if(!p)return null;let o=r(p).getFilterExpressions();return o?o.map(a=>{let s={field:a.field,operator:i(a.operator),value:a.value};return a.key&&(s.key=a.key),s}):null}function Qu(p){return VF(p,i=>i,exports.OpikQueryLanguage.forTraces)}function $u(p){return VF(p,i=>i,exports.OpikQueryLanguage.forThreads)}async function rte(p,i,r,t,o,a){return Me((s,c)=>p.spans.searchSpans({projectName:i,filters:r!=null?r:void 0,limit:s,lastRetrievedId:c,truncate:o,exclude:a}),G.SpanPublic,"id",{maxResults:t})}function tte(p){return VF(p,i=>i,exports.OpikQueryLanguage.forSpans)}var Yu=n(()=>{Ir();rt();Ku();});var to,ro,Xu=n(()=>{ae();to=1e3,ro=class{constructor(i,r){this.opik=r;var t;this.id=i.id,this.name=i.name,this.projectId=i.projectId,this.scope=(t=i.scope)!=null?t:this.constructor.SCOPE,this.description=i.description,this.instructions=i.instructions,this.commentsEnabled=i.commentsEnabled,this.feedbackDefinitionNames=i.feedbackDefinitionNames;}async getItemsCount(){return (await this.opik.api.annotationQueues.getAnnotationQueueById(this.id)).itemsCount}async update(i){exports.logger.debug(`Updating annotation queue "${this.name}"`,i),await this.opik.api.annotationQueues.updateAnnotationQueue(this.id,i),exports.logger.debug(`Successfully updated annotation queue "${this.name}"`);}async delete(){exports.logger.debug(`Deleting annotation queue "${this.name}"`),await this.opik.api.annotationQueues.deleteAnnotationQueueBatch({ids:[this.id]}),exports.logger.debug(`Successfully deleted annotation queue "${this.name}"`);}async addItemsBatch(i){await this.opik.api.annotationQueues.addItemsToAnnotationQueue(this.id,{body:{ids:i}}),exports.logger.debug(`Successfully added ${i.length} items to annotation queue`);}async removeItemsBatch(i){await this.opik.api.annotationQueues.removeItemsFromAnnotationQueue(this.id,{body:{ids:i}}),exports.logger.debug(`Successfully removed ${i.length} items from annotation queue`);}};});exports.TracesAnnotationQueue=void 0;var ite=n(()=>{Ir();rt();Yu();ae();wp();Xu();exports.TracesAnnotationQueue=class extends ro{constructor(i,r){super(i,r);}extractTraceIds(i){return i.map((r,t)=>{if(!r.id)throw new Oi("trace",t);return r.id})}async addTraces(i){if(!i||i.length===0)return;let r=this.extractTraceIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Adding ${o.length} traces to annotation queue`),await this.addItemsBatch(o);}async getItems(i){var a;let r=(a=i==null?void 0:i.truncateImages)!=null?a:true,t=Qu(`annotation_queue_ids contains "${this.id}"`);exports.logger.debug(`Fetching items from annotation queue "${this.name}"`);let o=await Me((s,c)=>this.opik.api.traces.searchTraces({projectId:this.projectId,filters:t!=null?t:void 0,limit:s,lastRetrievedId:c,truncate:r}),G.TracePublic,"id");return exports.logger.debug(`Fetched ${o.length} items from annotation queue "${this.name}"`),o}async removeTraces(i){if(!i||i.length===0)return;let r=this.extractTraceIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Removing ${o.length} traces from annotation queue`),await this.removeItemsBatch(o);}};exports.TracesAnnotationQueue.SCOPE="trace";});exports.ThreadsAnnotationQueue=void 0;var ote=n(()=>{Ir();rt();Yu();ae();wp();Xu();exports.ThreadsAnnotationQueue=class extends ro{constructor(i,r){super(i,r);}extractThreadIds(i){return i.map((r,t)=>{if(!r.threadModelId)throw new Oi("thread",t);return r.threadModelId})}async addThreads(i){if(!i||i.length===0)return;let r=this.extractThreadIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Adding ${o.length} threads to annotation queue`),await this.addItemsBatch(o);}async getItems(i){var a;let r=(a=i==null?void 0:i.truncateImages)!=null?a:true,t=$u(`annotation_queue_ids contains "${this.id}"`);exports.logger.debug(`Fetching items from annotation queue "${this.name}"`);let o=await Me((s,c)=>this.opik.api.traces.searchTraceThreads({projectId:this.projectId,filters:t!=null?t:void 0,limit:s,lastRetrievedThreadModelId:c,truncate:r}),G.TraceThread,"thread_model_id");return exports.logger.debug(`Fetched ${o.length} items from annotation queue "${this.name}"`),o}async removeThreads(i){if(!i||i.length===0)return;let r=this.extractThreadIds(i),t=pr(r,{maxBatchSize:to});for(let o of t)exports.logger.debug(`Removing ${o.length} threads from annotation queue`),await this.removeItemsBatch(o);}};exports.ThreadsAnnotationQueue.SCOPE="thread";});var LF=n(()=>{Xu();ite();ote();wp();});function JF(p,i){let r=i!=null?i:Zu(p);if(r==="boolean")return p?"true":"false";if(r==="integer"||r==="float"){if(!Number.isFinite(p))throw new TypeError(`Cannot serialize non-finite number: ${p}`);return String(p)}if(r==="string")return Array.isArray(p)||typeof p=="object"&&p!==null?JSON.stringify(p):p;if(r==="prompt"){let t=p;if(!t.commit)throw new TypeError("Cannot serialize prompt without a commit");return t.commit}if(r==="prompt_commit")return p.commit;throw new TypeError(`Unsupported backend type: ${r}`)}function io(p,i){if(p==null)return null;switch(i){case "boolean":return p.toLowerCase()==="true";case "integer":return Math.trunc(Number(p));case "float":return Number(p);case "string":case "prompt":case "prompt_commit":return p;default:return p}}function Zu(p){if(typeof p=="boolean")return "boolean";if(typeof p=="number")return Number.isInteger(p)?"integer":"float";if(typeof p=="string")return "string";if(p instanceof cr)return "prompt";if(p instanceof Br)return "prompt_commit";if(p===null||Array.isArray(p)||typeof p=="object")return "string";throw new TypeError(`Unsupported value type: ${typeof p}`)}function GF(p){let i=[];for(let[r,t]of Object.entries(p)){if(t==null){i.push({key:r,value:void 0,type:"string"});continue}let o=Zu(t);i.push({key:r,value:JF(t,o),type:o});}return i}function ate(p,i,r){let t=r!=null?r:Object.keys(p),o={};for(let a of t){let s=p[a];s&&(s.type==="prompt"||s.type==="prompt_commit"?o[a]=i[a]:o[a]=io(s.value,s.type));}return o}var Dp=n(()=>{vp();Sp();});var xr,qu=n(()=>{UF();Lu();Sp();Dp();xr=class p{constructor(i){this.id=i.id,this.name=i.name,this.type=i.type,this.description=i.description,this.envs=i.envs,this.createdBy=i.createdBy,this.createdAt=i.createdAt,this._rawValues=i.values,this._opik=i.opik,this._resolvedValues={},this._descriptions={};for(let r of this._rawValues)this._resolvedValues[r.key]=io(r.value,r.type),this._descriptions[r.key]=r.description;}static async fromApiResponse(i,r){if(!i.id)throw new Error("Invalid API response: missing required field 'id'");let t=new p({id:i.id,name:i.name,type:i.type,description:i.description,envs:i.envs,createdBy:i.createdBy,createdAt:i.createdAt,values:i.values,opik:r});return await t.resolvePrompts(),t}async resolvePrompts(){if(this._opik)for(let i of this._rawValues){if(i.type!=="prompt"&&i.type!=="prompt_commit"||!i.value)continue;let r=await this._opik.api.prompts.getPromptByCommit(i.value),t=r.requestedVersion;t&&(!t.promptId&&r.id&&(t.promptId=r.id),i.type==="prompt"?r.templateStructure==="chat"||t.templateStructure==="chat"?this._resolvedValues[i.key]=exports.ChatPrompt.fromApiResponse(r,t,this._opik):this._resolvedValues[i.key]=exports.Prompt.fromApiResponse(r,t,this._opik):this._resolvedValues[i.key]=Br.fromApiResponse(r.name,t));}}get values(){return {...this._resolvedValues}}get(i,r){let t=this._resolvedValues[i];return t!==void 0?t:r}keys(){return this._rawValues.map(i=>i.key)}getRawValue(i){var t;let r=this._rawValues.find(o=>o.key===i);return (t=r==null?void 0:r.value)!=null?t:void 0}getRawEntry(i){let r=this._rawValues.find(t=>t.key===i);if(r)return {value:r.value,type:r.type}}getFieldDescription(i){return this._descriptions[i]}};});var Zt,HF=n(()=>{Ir();ee();sr();ae();qu();Zt=class{constructor(i,r){this.projectName=i,this.opik=r;}async getProjectId(){let i=await this.opik.api.projects.retrieveProject({name:this.projectName});if(!(i!=null&&i.id))throw new Error(`Project "${this.projectName}" not found`);return i.id}async createBlueprint(i){let r=exports.generateId();exports.logger.debug(`Creating blueprint for project "${this.projectName}"`),await this.opik.api.agentConfigs.createAgentConfig({id:r,projectName:this.projectName,blueprint:{id:r,type:wo.Blueprint,description:i.description,values:i.values}});let t=await this.opik.api.agentConfigs.getBlueprintById(r);return await xr.fromApiResponse(t,this.opik)}async updateBlueprint(i){let r=exports.generateId();exports.logger.debug(`Updating blueprint for project "${this.projectName}"`),await this.opik.api.agentConfigs.updateAgentConfig({projectName:this.projectName,blueprint:{id:r,type:wo.Blueprint,description:i.description,values:i.values}});let t=await this.opik.api.agentConfigs.getBlueprintById(r);return await xr.fromApiResponse(t,this.opik)}async createMask(i){let r=exports.generateId();return exports.logger.debug(`Creating mask for project "${this.projectName}"`),await this.opik.api.agentConfigs.updateAgentConfig({projectName:this.projectName,blueprint:{id:r,type:wo.Mask,description:i.description,values:i.values}}),r}async getBlueprint(i={}){let{id:r,name:t,env:o,maskId:a}=i;try{let s;if(r)exports.logger.debug(`Getting blueprint by ID "${r}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintById(r,{maskId:a});else if(t){let c=await this.getProjectId();exports.logger.debug(`Getting blueprint by name "${t}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintByName(c,t,{maskId:a});}else if(o){let c=await this.getProjectId();exports.logger.debug(`Getting blueprint by env "${o}" for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getBlueprintByEnv(o,c,{maskId:a});}else {let c=await this.getProjectId();exports.logger.debug(`Getting latest blueprint for project "${this.projectName}"`),s=await this.opik.api.agentConfigs.getLatestBlueprint(c,{maskId:a});}return await xr.fromApiResponse(s,this.opik)}catch(s){if(s instanceof k&&s.statusCode===404)return null;throw exports.logger.error(`Failed to get blueprint for project "${this.projectName}"`,{error:s}),s}}};});function nte(){var p;return (p=eg.getStore())==null?void 0:p.traceId}function ste(p,i){return eg.run(p,i)}var eg,rg=n(()=>{eg=new async_hooks.AsyncLocalStorage;});function lte(p){pte.set(p.name,p);for(let i of cte)i(p.name);}function mte(p){cte.push(p);}function oo(){return new Map(pte)}function dte(p){var o,a;let i=p.toString(),r=vle.exec(i)||Tle.exec(i);if(!r)return [];let t=(a=(o=r[1])!=null?o:r[2])!=null?a:"";return t.trim()?t.split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>{let c=/=/.test(s)||/\?/.test(s.replace(/:\s*.*$/,"")),l=s.replace(/=.*$/,"").replace(/:\s*.*$/,"").replace(/^\.\.\.|[?]$/g,"").trim(),m=c?ci.Optional:ci.Required;return {name:l,type:"string",presence:m}}).filter(s=>s.name.length>0):[]}var pte,cte,vle,Tle,tg=n(()=>{Bh();pte=new Map,cte=[];vle=/^(?:async\s+)?(?:function\s+\w*\s*)?\(([^)]*)\)/,Tle=/^(?:async\s+)?(?:\(([^)]*)\)|(\w+))\s*=>/;});function ig(p,i){return OF.run(p,i)}function KF(){var p,i;return (i=(p=OF.getStore())==null?void 0:p.maskId)!=null?i:null}function ute(){var p,i;return (i=(p=OF.getStore())==null?void 0:p.blueprintName)!=null?i:null}var OF,og=n(()=>{OF=new async_hooks.AsyncLocalStorage;});exports.flushAll=void 0;var QF=n(()=>{Yi();ae();Mr();exports.flushAll=async()=>{exports.logger.debug("Starting flushAll operation");try{await Promise.all([ng().flush({silent:!0}),...sg.map(p=>p.flush({silent:!0}))]),exports.logger.debug("flushAll operation completed successfully");}catch(p){throw exports.logger.error("Error during flushAll operation:",{error:p instanceof Error?p.message:p,stack:p instanceof Error?p.stack:void 0}),p}};});function ZF(p,i,r){return Math.round(p+(i-p)*r)}function Cle(){let p=hte%gte/(gte-1),i=ZF($F[0],YF[0],p),r=ZF($F[1],YF[1],p),t=ZF($F[2],YF[2],p);return hte++,`\x1B[38;2;${i};${r};${t}m \u2503\x1B[0m `}function yte(p,i){return function(t,o,a){let s=typeof t=="string"?t:Buffer.from(t).toString("utf-8"),c=eg.getStore();if(c){let l=pg.get(c.jobId);l||(l=[],pg.set(c.jobId,l)),l.push({stream:i,text:s});}if(bte){let l=s.split(`
18
18
  `),m="";for(let u=0;u<l.length;u++)u>0&&(m+=`
19
19
  `),(l[u].length>0||u<l.length-1)&&(m+=Cle()+l[u]);return p.call(i==="stdout"?process.stdout:process.stderr,m,o,a)}return p.call(i==="stdout"?process.stdout:process.stderr,t,o,a)}}function Rte(){var p;XF||(bte=typeof((p=process.stdout)==null?void 0:p.isTTY)=="boolean"&&process.stdout.isTTY,XF=process.stdout.write.bind(process.stdout),fte=process.stderr.write.bind(process.stderr),process.stdout.write=yte(XF,"stdout"),process.stderr.write=yte(fte,"stderr"));}function xte(p){var r;let i=(r=pg.get(p))!=null?r:[];return pg.delete(p),i}var $F,YF,gte,XF,fte,hte,bte,pg,qF=n(()=>{rg();$F=[245,166,35],YF=[224,62,45],gte=20,XF=null,fte=null,hte=0,bte=false,pg=new Map;});function Dle(p,i){if(p==null)return p;switch(i){case "boolean":return typeof p=="boolean"?p:io(String(p),"boolean");case "float":case "integer":{if(typeof p=="number")return p;let r=io(String(p),"float");if(typeof r=="number"&&Number.isNaN(r))throw new TypeError(`Cannot cast "${p}" to number`);return i==="integer"?Math.trunc(r):r}default:return typeof p=="string"?p:Array.isArray(p)||typeof p=="object"&&p!==null?JSON.stringify(p):String(p)}}var Ele,Ile,wte,cg,Up,_te=n(()=>{Yp();Xg();og();BF();Dp();QF();ae();sr();tg();rg();qF();Ele=500,Ile=3e5,wte=1e4,cg=class{constructor(i,r,t){this.shutdownRequested=false;this.heartbeatTimer=null;this.pollTimer=null;this.cancelledJobs=new Map;this.activeTasks=new Set;this.pollFailures=0;var o,a;this.api=i,this.runnerId=r,this.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!=null?o:5e3,this.backoffCapMs=(a=t==null?void 0:t.backoffCapMs)!=null?a:3e4;}start(){this.startHeartbeat(),this.startPolling();}shutdown(){this.shutdownRequested=true,this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null),this.pollTimer&&(clearTimeout(this.pollTimer),this.pollTimer=null);}startHeartbeat(){let i=setInterval(()=>{this.heartbeatTick().catch(r=>{exports.logger.debug("Heartbeat tick error",{error:r});});},this.heartbeatIntervalMs);i.unref(),this.heartbeatTimer=i;}async heartbeatTick(){var i;if(!this.shutdownRequested)try{let t=(i=(await this.api.runners.heartbeat(this.runnerId)).cancelledJobIds)!=null?i:[],o=Date.now();for(let a of t)this.cancelledJobs.set(a,o);this.pruneCancelledJobs(o);}catch(r){if(r instanceof ut){exports.logger.info("Runner deregistered (410), shutting down"),this.shutdown();return}exports.logger.debug("Heartbeat error",{error:r});}}startPolling(){this.pollTick(1e3);}pollTick(i){if(this.shutdownRequested)return;(async()=>{if(this.shutdownRequested)return;let t=i;try{let o=await this.api.runners.nextJob(this.runnerId);if(this.pollFailures=0,t=1e3,o===null){this.scheduleNextPoll(Ele,t);return}this.spawnJob(o);}catch(o){if(this.pollFailures++,this.pollFailures===1){let s=o instanceof k?o.statusCode:void 0;exports.logger.warn("Unable to reach Opik server"+(s?` (API ${s})`:"")+". Retrying...",{error:o});}else exports.logger.debug("Poll error",{error:o});let a=this.jitteredBackoff(t);t=Math.min(t*2,this.backoffCapMs),this.scheduleNextPoll(a,t);return}this.scheduleNextPoll(0,t);})().catch(t=>{this.pollFailures++,this.pollFailures===1?exports.logger.warn("Unable to reach Opik server. Retrying...",{error:t}):exports.logger.debug("Poll tick error",{error:t}),this.scheduleNextPoll(this.jitteredBackoff(i),Math.min(i*2,this.backoffCapMs));});}scheduleNextPoll(i,r){if(this.shutdownRequested)return;let t=setTimeout(()=>this.pollTick(r),i);t.unref(),this.pollTimer=t;}spawnJob(i){let r=this.executeJob(i).finally(()=>{this.activeTasks.delete(r);});this.activeTasks.add(r);}async executeJob(i){var s,c;let r=(s=i.id)!=null?s:"",t=(c=i.agentName)!=null?c:"";if(this.cancelledJobs.has(r)){exports.logger.debug(`Skipping cancelled job ${r}`),this.cancelledJobs.delete(r);return}if(!oo().get(t)){exports.logger.error(`Unknown agent '${t}' for job ${r}`),await this.reportJobResult(r,{status:"failed",error:`Unknown agent: ${t}`,traceId:i.traceId});return}let a=exports.generateId();await this.reportJobResult(r,{status:"running",traceId:a});try{let l=await this.invokeAgent(i,r,a);await exports.flushAll().catch(m=>{exports.logger.debug("Flush error after job execution",{error:m});}),await this.sendJobLogs(r),await this.reportJobResult(r,{status:"completed",result:this.normalizeResult(l),traceId:a});}catch(l){await exports.flushAll().catch(()=>{}),await this.sendJobLogs(r);let m=i.timeout,u=l instanceof Up?`Job timed out after ${m}s`:l instanceof Error?`${l.name}: ${l.message}`:String(l);l instanceof Up?exports.logger.warn(`Job ${r} timed out after ${m}s`):exports.logger.error(`Job ${r} failed: ${u}`),await this.reportJobResult(r,{status:"failed",error:u,traceId:a});}}async invokeAgent(i,r,t){var h,y;let o=(h=i.agentName)!=null?h:"",a=(y=i.inputs)!=null?y:{},s=i.maskId,c=i.blueprintName,l=i.promptMasks,m=oo().get(o),u=m.params.map(w=>{let A=a[w.name];if(!(w.presence===ci.Optional&&A===void 0&&!(w.name in a)))return Dle(A,w.type)}),d=()=>ste({traceId:t,jobId:r},()=>Ure(l,()=>s||c?ig({blueprintName:c,maskId:s},()=>m.func(...u)):m.func(...u))),f=Promise.resolve(d()),g=i.timeout;return g&&g>0?Promise.race([f,new Promise((w,A)=>{setTimeout(()=>A(new Up("Job timed out")),g*1e3).unref();})]):f}normalizeResult(i){return i!=null&&typeof i!="string"&&typeof i!="number"&&typeof i!="boolean"&&!Array.isArray(i)&&typeof i!="object"&&(i=String(i)),typeof i=="object"&&i!==null&&!Array.isArray(i)?i:{result:i}}async reportJobResult(i,r){try{await this.api.runners.reportJobResult(i,r);}catch(t){exports.logger.warn(`Failed to report result for job ${i}`,{error:t});}}async sendJobLogs(i){let r=xte(i);if(r.length!==0)try{await this.api.runners.appendJobLogs(i,{body:r});}catch{exports.logger.debug(`Failed to send logs for job ${i}`);}}pruneCancelledJobs(i){let r=i-Ile;for(let[t,o]of this.cancelledJobs)o<=r&&this.cancelledJobs.delete(t);if(this.cancelledJobs.size>wte){let t=[...this.cancelledJobs.entries()].sort((a,s)=>a[1]-s[1]),o=t.length-wte;for(let a=0;a<o;a++)this.cancelledJobs.delete(t[a][0]);}}jitteredBackoff(i){return Math.min(i,this.backoffCapMs)*(.5+Math.random()*.5)}};Up=class extends Error{constructor(i){super(i),this.name="TimeoutError";}};});function eB(){process.env.OPIK_RUNNER_MODE==="true"&&(kte||(kte=true,Ule().catch(p=>{exports.logger.error("Runner activation failed",{error:p});})));}async function Ule(){var m,u;let p=(m=process.env.OPIK_RUNNER_ID)!=null?m:"",i=(u=process.env.OPIK_PROJECT_NAME)!=null?u:"";if(!p){exports.logger.error("OPIK_RUNNER_ID not set, cannot activate runner");return}Nle(p,i),Rte();let r=new exports.Opik,t=r.api;function o(d){return {description:d.docstring,language:"typescript",params:d.params.map(f=>({name:f.name,type:f.type,presence:f.presence})),timeout:0}}function a(d){let f=oo(),g={};for(let[h,y]of f)g[h]=o(y);t.runners.registerAgents(p,{body:g}).catch(h=>{exports.logger.debug("Failed to sync agents after new registration",{error:h});});}await new Promise(d=>setImmediate(d));let s=oo();if(s.size>0){let d={};for(let[f,g]of s)d[f]=o(g);try{await t.runners.registerAgents(p,{body:d});}catch{exports.logger.debug("Failed to register agents on startup");}}mte(a),exports.logger.info("Runner activated");let c=new cg(t,p);c.start();let l=()=>{Ate=true,exports.logger.info("Received shutdown signal, stopping runner..."),c.shutdown(),r.flush().catch(()=>{}).finally(()=>process.exit(0));};process.once("SIGTERM",l),process.once("SIGINT",l),process.on("exit",()=>{Ate||console.error(`
20
20
  Warning: The process exited without blocking. The runner needs the process to stay alive to process jobs.
@@ -56,7 +56,7 @@ Each assertion below is an EVALUATION CRITERION to check against the agent's out
56
56
  ---END ASSERTIONS---`;});var Kte;exports.ResponseSchema=void 0;var bB=n(()=>{Kte=zod.z.object({score:zod.z.boolean(),reason:zod.z.string(),confidence:zod.z.number().min(0).max(1)}),exports.ResponseSchema=class{constructor(i){this.fieldMapping=new Map(i.map((t,o)=>[`assertion_${o+1}`,t]));let r={};for(let[t,o]of this.fieldMapping)r[t]=Kte.describe(o);this.schema=zod.z.object(r);}get responseSchema(){return this.schema}formatAssertions(){return [...this.fieldMapping.entries()].map(([i,r])=>`- \`${i}\`: ${r}`).join(`
57
57
  `)}parse(i){let r=[];for(let[t,o]of this.fieldMapping){let a=i[t];if(a==null){r.push({name:o,value:0,reason:`Assertion field missing from LLM response: "${t}"`,scoringFailed:true});continue}if(typeof a!="object"||Array.isArray(a)){r.push({name:o,value:0,reason:`Assertion field malformed in LLM response: "${t}"`,scoringFailed:true});continue}let s=Kte.safeParse(a);if(!s.success){r.push({name:o,value:0,reason:`Assertion field malformed in LLM response: "${t}"`,scoringFailed:true});continue}r.push({name:o,value:s.data.score?1:0,reason:s.data.reason});}return r}};});function Vp(p){return typeof p=="object"&&p!==null?p:{}}var kme;exports.LLMJudge=void 0;var Lp=n(()=>{fg();Rg();yB();bB();ae();kme="low";exports.LLMJudge=class p extends exports.BaseSuiteEvaluator{constructor(i){var r,t,o,a,s;if(super((r=i.name)!=null?r:"llm_judge",(t=i.track)!=null?t:true),i.assertions.length===0)throw new Error("LLMJudge requires at least one assertion");for(let c of i.assertions)if(typeof c!="string"||c.trim()==="")throw new Error(`LLMJudge assertions must be non-empty strings. Received: ${JSON.stringify(c)}`);this.assertions=i.assertions,this.modelName=(o=i.model)!=null?o:"gpt-5-nano",this.seed=i.seed,this.temperature=i.temperature,this.reasoningEffort=(a=i.reasoningEffort)!=null?a:kme,this.projectName=i.projectName,this.model=ii(this.modelName,{trackGenerations:(s=i.track)!=null?s:true}),this.responseSchema=new exports.ResponseSchema(this.assertions);}toConfig(){let i=exports.USER_PROMPT_TEMPLATE.replace("{assertions}",this.responseSchema.formatAssertions());return {version:"1.0.0",name:this.name,model:{name:this.modelName,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},customParameters:{reasoning_effort:this.reasoningEffort}},messages:[{role:"SYSTEM",content:exports.SYSTEM_PROMPT},{role:"USER",content:i}],variables:{input:"input",output:"output"},schema:this.assertions.map(r=>({name:r,type:"BOOLEAN",description:r}))}}hasSameSettings(i){return this.modelName===i.modelName&&this.temperature===i.temperature&&this.seed===i.seed&&this.reasoningEffort===i.reasoningEffort&&this.trackMetric===i.trackMetric}static merged(i){if(i.length<=1)return;let r=i[0];if(!i.every(a=>r.hasSameSettings(a)))return;let t=new Set,o=[];for(let a of i)for(let s of a.assertions)t.has(s)||(t.add(s),o.push(s));return new p({assertions:o,name:r.name,model:r.modelName,seed:r.seed,temperature:r.temperature,reasoningEffort:r.reasoningEffort,track:r.trackMetric})}static fromConfig(i,r){var l,m,u;let t=(l=i.schema)!=null?l:[],o=Vp(i.model),a=t.map(d=>{var f;return (f=d.description)!=null?f:d.name}),s=Vp(o.customParameters),c=typeof s.reasoning_effort=="string"?s.reasoning_effort:void 0;return new p({assertions:a,name:typeof i.name=="string"?i.name:"llm_judge",model:(m=r==null?void 0:r.model)!=null?m:typeof o.name=="string"?o.name:"gpt-5-nano",temperature:typeof o.temperature=="number"?o.temperature:void 0,seed:typeof o.seed=="number"?o.seed:void 0,reasoningEffort:c,track:(u=r==null?void 0:r.track)!=null?u:true})}async score(i){var s,c;let r=Vp(i),t=typeof r.input=="string"?r.input:JSON.stringify((s=r.input)!=null?s:""),o=typeof r.output=="string"?r.output:JSON.stringify((c=r.output)!=null?c:""),a=exports.USER_PROMPT_TEMPLATE.replace("{input}",t).replace("{output}",o).replace("{assertions}",this.responseSchema.formatAssertions());try{let l=await this.model.generateProviderResponse([{role:"system",content:exports.SYSTEM_PROMPT},{role:"user",content:a}],{...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},reasoning_effort:this.reasoningEffort,output:ai$1.Output.object({schema:this.responseSchema.responseSchema})}),m=Vp(Vp(l).output);return this.responseSchema.parse(m)}catch(l){return exports.logger.debug(`LLMJudge scoring failed: ${l instanceof Error?l.message:String(l)}`),this.assertions.map(m=>({name:m,value:0,reason:`LLM scoring failed: ${l instanceof Error?l.message:String(l)}`,scoringFailed:true}))}}};});function oi(p){return p.map(i=>({name:i.name,type:Ih.LlmJudge,config:i.toConfig()}))}function ct(p,i){let r=[];for(let t of p)t.type===Ch.LlmJudge?r.push(exports.LLMJudge.fromConfig(t.config,i?{model:i}:void 0)):exports.logger.warn(`Unsupported evaluator type: ${t.type}. Skipping.`);return r}function Wr(p){var i,r;return {runsPerItem:(i=p==null?void 0:p.runsPerItem)!=null?i:exports.DEFAULT_EXECUTION_POLICY.runsPerItem,passThreshold:(r=p==null?void 0:p.passThreshold)!=null?r:exports.DEFAULT_EXECUTION_POLICY.passThreshold}}function Qte(p,i){if(p.length!==i.length)return false;let r=a=>a.map(s=>JSON.stringify(s.toConfig())).sort(),t=r(p),o=r(i);return t.every((a,s)=>a===o[s])}function $te(p,i){return p.runsPerItem===i.runsPerItem&&p.passThreshold===i.passThreshold}function co(p,i){var r,t;return p?{runsPerItem:(r=p.runsPerItem)!=null?r:i.runsPerItem,passThreshold:(t=p.passThreshold)!=null?t:i.passThreshold}:i}function Yte(p){if(typeof p!="object"||p===null)throw new TypeError(`The task function must return an object with 'input' and 'output' keys, but it returned ${typeof p}. Example: return { input: data, output: response }`);let i=p,r=[];if("input"in i||r.push("input"),"output"in i||r.push("output"),r.length>0)throw new Error(`The task function must return an object with 'input' and 'output' keys, but the returned object is missing: ${r.join(", ")}. Got keys: ${Object.keys(i).join(", ")}. Example: return { input: data, output: response }`);return i}var Jp=n(()=>{Lp();Dh();Eh();mg();ae();});async function _g(p){var u;if(!p.dataset)throw new Error("Dataset is required for test suite");if(!p.task)throw new Error("Task function is required for test suite");let i=(u=p.client)!=null?u:so.getInstance(),r=await p.dataset.getVersionInfo(),t=r!=null&&r.evaluators?ct(r.evaluators,p.evaluatorModel):[],o=Wr(r==null?void 0:r.executionPolicy),a=await p.dataset.getRawItems(p.nbSamples),s=new Map,c=new Map;for(let d of a){let f=d.evaluators?ct(d.evaluators,p.evaluatorModel):[],g=[...t,...f],h=g.filter(C=>C instanceof exports.LLMJudge),y=exports.LLMJudge.merged(h),w=y?[y,...g.filter(C=>!(C instanceof exports.LLMJudge))]:g;s.set(d.id,w);let A=co(d.executionPolicy,o);c.set(d.id,A);}let l=a.map(d=>d.getContent(true)),m=await i.createExperiment({name:p.experimentName,datasetName:p.dataset.name,experimentConfig:p.experimentConfig,prompts:p.prompts,datasetVersionId:r==null?void 0:r.id,evaluationMethod:oc.EvaluationSuite,tags:p.tags,projectName:p.projectName});try{let d={suiteMode:!0,dataset:p.dataset,task:p.task,scoringMetrics:t,projectName:p.projectName,executionPolicy:o,prefetchedItems:l,itemMetricsMap:s,itemPolicyMap:c,taskThreads:p.taskThreads};return await new nt(d,i,m).execute()}catch(d){throw exports.logger.error(`Error during test suite: ${d}`),d}}var RB=n(()=>{lB();dB();Lp();ae();Jp();jf();});async function Xte(p){var u;let{testSuite:i,task:r,model:t,experimentTags:o,...a}=p,s=async d=>{let f=await r(d);return Yte(f)},c=performance.now(),l=await _g({dataset:i.dataset,task:s,client:i.client,evaluatorModel:t,tags:o,...a,projectName:(u=a.projectName)!=null?u:i.projectName}),m=(performance.now()-c)/1e3;return pB(l,{suiteName:i.name,totalTime:m})}var Zte=n(()=>{RB();cB();Jp();});async function qte(p){var a;if(!p.dataset)throw new Error("Dataset is required for evaluation");if(!p.task)throw new Error("Task function is required for evaluation");p.prompts&&await Promise.all(p.prompts.map(s=>s.ready()));let i=(a=p.client)!=null?a:so.getInstance(),r=p.experimentConfig;if(p.blueprintId){let s={_blueprint_id:p.blueprintId};try{let c=await i.api.agentConfigs.getBlueprintById(p.blueprintId);c.name&&(s.blueprint_version=c.name);}catch(c){exports.logger.debug(`Failed to fetch blueprint ${p.blueprintId}: ${c}`);}r={...r,agent_configuration:s};}let t=await p.dataset.getVersionInfo(),o=await i.createExperiment({name:p.experimentName,datasetName:p.dataset.name,experimentConfig:r,prompts:p.prompts,datasetVersionId:t==null?void 0:t.id,tags:p.tags,projectName:p.projectName});try{let s=new nt(p,i,o);return exports.logger.info("Starting evaluation"),s.execute()}catch(s){throw exports.logger.error(`Error during evaluation: ${s}`),s}}var xB=n(()=>{ae();dB();lB();});var wB=n(()=>{hg();bg();Rg();yg();fB();});function eie(p){return p.map(i=>{let r=Array.isArray(i.content)?Ame(i.content):i.content;return `${i.role}: ${r}`}).join(`
58
58
  `)}function Ame(p){return p.map(i=>i.type==="text"?i.text:i.type==="file"?`[file: ${i.filename||"unknown"}]`:i.type==="tool-call"?`[tool-call: ${i.toolName}]`:i.type==="tool-result"?`[tool-result: ${i.toolName}]`:i.type==="reasoning"?`[reasoning: ${i.text}]`:i.type==="tool-approval-request"?"[tool-approval-request]":i.type==="tool-approval-response"?"[tool-approval-response]":"").filter(i=>i.length>0).join(`
59
- `)}function Pme(p,i,r){return typeof p=="string"?Ce(p,i,r):Array.isArray(p)?p.map(o=>o.type==="text"&&typeof o.text=="string"?{...o,text:Ce(o.text,i,r)}:o.type==="image"&&typeof o.image=="string"?{...o,image:Ce(o.image,i,r)}:o.type==="file"&&typeof o.data=="string"?{...o,data:Ce(o.data,i,r)}:o.type==="reasoning"&&typeof o.text=="string"?{...o,text:Ce(o.text,i,r)}:o):p}function rie(p,i,r){let t=Pme(p.content,i,r);return {...p,content:t}}var tie=n(()=>{Pp();});async function dBr(p){var o;if(!p.dataset)throw new Error("Dataset is required for prompt evaluation");if(!p.messages||p.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(p.experimentConfig!==void 0&&(typeof p.experimentConfig!="object"||p.experimentConfig===null||Array.isArray(p.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let i=ii(p.model),r={...p.experimentConfig,prompt_template:p.messages,model:i.modelName,...p.temperature!==void 0&&{temperature:p.temperature},...p.seed!==void 0&&{seed:p.seed}},t=zme(i,p.messages,(o=p.templateType)!=null?o:exports.PromptType.MUSTACHE,{temperature:p.temperature,seed:p.seed});return qte({dataset:p.dataset,task:t,scoringMetrics:p.scoringMetrics,experimentName:p.experimentName,projectName:p.projectName,experimentConfig:r,prompts:p.prompts,client:p.client,nbSamples:p.nbSamples,scoringKeyMapping:p.scoringKeyMapping})}function zme(p,i,r,t){return async o=>{let a=i.map(m=>rie(m,o,r)),s=await p.generateProviderResponse(a,t),c=Sme(s);return {input:eie(a),output:c}}}function Sme(p){return p&&typeof p=="object"?"text"in p&&typeof p.text=="string"?p.text:"content"in p&&typeof p.content=="string"?p.content:JSON.stringify(p):String(p)}var iie=n(()=>{wB();xB();Kt();tie();});var vme;exports.ExactMatch=void 0;var aie=n(()=>{at();vme=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),exports.ExactMatch=class extends exports.BaseMetric{constructor(r="exact_match",t=true){super(r,t);this.validationSchema=vme;}async score(r){let{output:t,expected:o}=r,a=t===o?1:0;return {name:this.name,value:a,reason:`Exact match: ${a===1?"Match":"No match"}`}}};});var Tme;exports.Contains=void 0;var sie=n(()=>{at();Tme=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),exports.Contains=class extends exports.BaseMetric{constructor(r="contains",t=true,o=false){super(r,t);this.validationSchema=Tme;this.caseSensitive=o;}async score(r){let{output:t,substring:o}=r,a=this.caseSensitive?t:t.toLowerCase(),s=this.caseSensitive?o:o.toLowerCase();return a.includes(s)?{name:this.name,value:1,reason:`Contains: "${o}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${o}" not found in output.`}}};});var jme;exports.RegexMatch=void 0;var cie=n(()=>{at();jme=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),exports.RegexMatch=class extends exports.BaseMetric{constructor(r="regex_match",t=true){super(r,t);this.validationSchema=jme;}async score(r){let{output:t,pattern:o,flags:a}=r,s;typeof o=="string"&&a?s=new RegExp(o,a):s=new RegExp(o);let c=s.test(t);return {name:this.name,value:c?1:0,reason:c?`Regex: Output matches the regex pattern: ${o}`:`Regex: Output does not match the regex pattern: ${o}`}}};});var Cme;exports.IsJson=void 0;var die=n(()=>{at();Cme=zod.z.object({output:zod.z.unknown()}),exports.IsJson=class extends exports.BaseMetric{constructor(r="is_json_metric",t=true){super(r,t);this.validationSchema=Cme;}async score(r){let{output:t}=r;try{return JSON.parse(t),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};});var uie=n(()=>{aie();sie();cie();die();});exports.BaseLLMJudgeMetric=void 0;var ai=n(()=>{at();Rg();exports.BaseLLMJudgeMetric=class extends exports.BaseMetric{constructor(i,r){var o;let t=(o=r==null?void 0:r.trackMetric)!=null?o:true;super(i,t),this.temperature=r==null?void 0:r.temperature,this.seed=r==null?void 0:r.seed,this.maxTokens=r==null?void 0:r.maxTokens,this.modelSettings=r==null?void 0:r.modelSettings,this.model=this.initModel(r==null?void 0:r.model,{trackGenerations:t});}initModel(i,r){return ii(i,r)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};});function gie(p,i=[]){let r="";return i.length>0&&(r=`
59
+ `)}function Pme(p,i,r){return typeof p=="string"?Ce(p,i,r):Array.isArray(p)?p.map(o=>o.type==="text"&&typeof o.text=="string"?{...o,text:Ce(o.text,i,r)}:o.type==="image"&&typeof o.image=="string"?{...o,image:Ce(o.image,i,r)}:o.type==="file"&&typeof o.data=="string"?{...o,data:Ce(o.data,i,r)}:o.type==="reasoning"&&typeof o.text=="string"?{...o,text:Ce(o.text,i,r)}:o):p}function rie(p,i,r){let t=Pme(p.content,i,r);return {...p,content:t}}var tie=n(()=>{Pp();});async function gBr(p){var o;if(!p.dataset)throw new Error("Dataset is required for prompt evaluation");if(!p.messages||p.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(p.experimentConfig!==void 0&&(typeof p.experimentConfig!="object"||p.experimentConfig===null||Array.isArray(p.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let i=ii(p.model),r={...p.experimentConfig,prompt_template:p.messages,model:i.modelName,...p.temperature!==void 0&&{temperature:p.temperature},...p.seed!==void 0&&{seed:p.seed}},t=zme(i,p.messages,(o=p.templateType)!=null?o:exports.PromptType.MUSTACHE,{temperature:p.temperature,seed:p.seed});return qte({dataset:p.dataset,task:t,scoringMetrics:p.scoringMetrics,experimentName:p.experimentName,projectName:p.projectName,experimentConfig:r,prompts:p.prompts,client:p.client,nbSamples:p.nbSamples,scoringKeyMapping:p.scoringKeyMapping})}function zme(p,i,r,t){return async o=>{let a=i.map(m=>rie(m,o,r)),s=await p.generateProviderResponse(a,t),c=Sme(s);return {input:eie(a),output:c}}}function Sme(p){return p&&typeof p=="object"?"text"in p&&typeof p.text=="string"?p.text:"content"in p&&typeof p.content=="string"?p.content:JSON.stringify(p):String(p)}var iie=n(()=>{wB();xB();Kt();tie();});var vme;exports.ExactMatch=void 0;var aie=n(()=>{at();vme=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()}),exports.ExactMatch=class extends exports.BaseMetric{constructor(r="exact_match",t=true){super(r,t);this.validationSchema=vme;}async score(r){let{output:t,expected:o}=r,a=t===o?1:0;return {name:this.name,value:a,reason:`Exact match: ${a===1?"Match":"No match"}`}}};});var Tme;exports.Contains=void 0;var sie=n(()=>{at();Tme=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),exports.Contains=class extends exports.BaseMetric{constructor(r="contains",t=true,o=false){super(r,t);this.validationSchema=Tme;this.caseSensitive=o;}async score(r){let{output:t,substring:o}=r,a=this.caseSensitive?t:t.toLowerCase(),s=this.caseSensitive?o:o.toLowerCase();return a.includes(s)?{name:this.name,value:1,reason:`Contains: "${o}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${o}" not found in output.`}}};});var jme;exports.RegexMatch=void 0;var cie=n(()=>{at();jme=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),exports.RegexMatch=class extends exports.BaseMetric{constructor(r="regex_match",t=true){super(r,t);this.validationSchema=jme;}async score(r){let{output:t,pattern:o,flags:a}=r,s;typeof o=="string"&&a?s=new RegExp(o,a):s=new RegExp(o);let c=s.test(t);return {name:this.name,value:c?1:0,reason:c?`Regex: Output matches the regex pattern: ${o}`:`Regex: Output does not match the regex pattern: ${o}`}}};});var Cme;exports.IsJson=void 0;var die=n(()=>{at();Cme=zod.z.object({output:zod.z.unknown()}),exports.IsJson=class extends exports.BaseMetric{constructor(r="is_json_metric",t=true){super(r,t);this.validationSchema=Cme;}async score(r){let{output:t}=r;try{return JSON.parse(t),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}};});var uie=n(()=>{aie();sie();cie();die();});exports.BaseLLMJudgeMetric=void 0;var ai=n(()=>{at();Rg();exports.BaseLLMJudgeMetric=class extends exports.BaseMetric{constructor(i,r){var o;let t=(o=r==null?void 0:r.trackMetric)!=null?o:true;super(i,t),this.temperature=r==null?void 0:r.temperature,this.seed=r==null?void 0:r.seed,this.maxTokens=r==null?void 0:r.maxTokens,this.modelSettings=r==null?void 0:r.modelSettings,this.model=this.initModel(r==null?void 0:r.model,{trackGenerations:t});}initModel(i,r){return ii(i,r)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};});function gie(p,i=[]){let r="";return i.length>0&&(r=`
60
60
 
61
61
  ###EXAMPLES###
62
62
 
@@ -402,4 +402,4 @@ Return the output in a JSON format with the keys "score" and "reason".`;});funct
402
402
  Set OPIK_PROJECT_NAME environment variable or pass projectName to the Opik client
403
403
  to log to a specific project.
404
404
  See https://www.comet.com/docs/opik/tracing/advanced/sdk_configuration`)),this.config.projectName)}async findProjectIdByName(i){try{return await this.getProjectIdByName(i)}catch(r){if(r instanceof k&&r.statusCode===404)return;throw r}}async getProjectIdByName(i){let r=await this.api.projects.retrieveProject({name:i});if(!(r!=null&&r.id))throw new Error(`Project "${i}" not found`);return r.id}async resolveProjectId(i){if(i!==void 0)return this.getProjectIdByName(i)}async createAnnotationQueueInternal(i,r){let{name:t,projectName:o,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l}=i,m=r.SCOPE;exports.logger.debug(`Creating ${m} annotation queue "${t}"`);let u=o!=null?o:this.config.projectName;try{let d=await this.getProjectIdByName(u),f=exports.generateId();return await this.api.annotationQueues.createAnnotationQueue({id:f,projectId:d,name:t,scope:m,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l}),exports.logger.debug(`Created ${m} annotation queue "${t}" with ID "${f}"`),new r({id:f,name:t,projectId:d,scope:m,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l},this)}catch(d){throw exports.logger.error(`Failed to create ${m} annotation queue "${t}"`,{error:d}),d}}async fetchAnnotationQueueById(i,r,t){exports.logger.debug(`Getting ${r} annotation queue with ID "${i}"`);try{let o=await this.api.annotationQueues.getAnnotationQueueById(i);if(o.scope!==r)throw new Error(`Annotation queue "${i}" is not a ${r} queue (scope: ${o.scope})`);return new t(o,this)}catch(o){if(o instanceof k){if(o.statusCode===404)throw new Au(i);exports.logger.error(`Failed to get ${r} annotation queue with ID "${i}"`,{error:o});}throw o}}async getAnnotationQueuesByScope(i,r){let{projectName:t,maxResults:o=1e3}=r!=null?r:{};exports.logger.debug(`Getting ${i} annotation queues (project: ${t!=null?t:"all"}, limit: ${o})`);try{let a;if(t){let l=await this.getProjectIdByName(t);a=JSON.stringify([{field:"project_id",operator:"=",value:l},{field:"scope",operator:"=",value:i}]);}else a=JSON.stringify([{field:"scope",operator:"=",value:i}]);let c=(await this.api.annotationQueues.findAnnotationQueues({size:o,filters:a})).content||[];return exports.logger.info(`Retrieved ${c.length} ${i} annotation queues`),c}catch(a){throw exports.logger.error(`Failed to retrieve ${i} annotation queues`,{error:a}),a}}async deleteAnnotationQueueById(i,r){exports.logger.debug(`Deleting ${r} annotation queue with ID "${i}"`);try{await this.api.annotationQueues.deleteAnnotationQueueBatch({ids:[i]}),exports.logger.debug(`Successfully deleted ${r} annotation queue with ID "${i}"`);}catch(t){throw exports.logger.error(`Failed to delete ${r} annotation queue with ID "${i}"`,{error:t}),t}}async executeSearch(i,r,t,o){let{projectName:a,filterString:s,maxResults:c=1e3,truncate:l=true,waitForAtLeast:m,waitForTimeout:u=60}=r;exports.logger.debug(`Searching ${i}`,{projectName:a,filterString:s,maxResults:c,truncate:l,waitForAtLeast:m,waitForTimeout:u});let d=t(s),f=a!=null?a:this.config.projectName,g=()=>o(this.api,f,d,c,l);if(m===void 0)return await g();let h=await qre(g,m,u*1e3,5e3);if(h.length<m)throw new _u(`Timeout after ${u} seconds: expected ${m} ${i}, but only ${h.length} were found.`);return h}logFeedbackScores(i,r){var t;for(let o of i)r.create({...o,projectName:(t=o.projectName)!=null?t:this.config.projectName,source:Nh.Sdk});}logTracesFeedbackScores(i){this.logFeedbackScores(i,this.traceFeedbackScoresBatchQueue);}logSpansFeedbackScores(i){this.logFeedbackScores(i,this.spanFeedbackScoresBatchQueue);}getOrCreateConfig(i){return this._getOrCreateConfigImpl(i)}_validatePromptProjects(i,r){for(let[t,o]of Object.entries(i))if(o instanceof cr&&o.projectName!==void 0&&o.projectName!==r)throw new exports.ConfigMismatchError(`Field "${t}": prompt project "${o.projectName}" does not match config project "${r}". All prompts referenced in a config must belong to the same project as the config.`)}async _allPromptsSynced(i){let r=Object.values(i).filter(a=>a instanceof cr&&!a.synced);if(r.length===0)return true;let t=Symbol(),o;try{if(await Promise.race([Promise.allSettled(r.map(s=>s.ready())).then(()=>{}),new Promise(s=>{o=setTimeout(()=>s(t),ide);})])===t)return exports.logger.debug("Timed out waiting for prompt sync before creating config."),!1}finally{clearTimeout(o);}return r.every(a=>a.synced)}_makeFallbackConfig(i,r){return iB({values:i,fieldNames:new Set(Object.keys(i)),blueprintId:void 0,blueprintVersion:void 0,isFallback:true,maskId:r})}async _fetchBlueprintFromBackend(i,r){let{blueprintName:t,isLatest:o,hasNamedVersion:a,namedVersion:s,effectiveEnv:c,maskId:l,projectName:m,effectiveVersion:u,fallback:d}=r,f=jte(m,c,l!=null?l:null,u);if(!f.isStale())return f.getBlueprint();let g=null;try{t?g=await i.getBlueprint({name:t,maskId:l}):o?g=await i.getBlueprint({maskId:l}):a?g=await i.getBlueprint({name:s,maskId:l}):g=await i.getBlueprint({env:c,maskId:l});}catch(y){if(d!==void 0)return exports.logger.debug("Failed to fetch config from backend, using fallback",{error:y}),this._makeFallbackConfig(d,l);throw y}let h=l===void 0&&!a?o?()=>i.getBlueprint({maskId:void 0}):()=>i.getBlueprint({env:c,maskId:void 0}):null;return sB(m,c,l!=null?l:null,g,h,u),g}async _resolveNullBlueprint(i,r){let{projectName:t,effectiveEnv:o,effectiveVersion:a,maskId:s,hasNamedVersion:c,hasExplicitEnv:l,isExplicitBlueprintFromContext:m,isLatest:u,fallback:d}=r;if(c||l||m)throw new exports.ConfigNotFoundError(`No config found for project "${t}" with the specified selector`);if(!u){let h=null;try{h=await i.getBlueprint({maskId:void 0});}catch(y){if(d!==void 0)return exports.logger.debug("Failed to probe project-wide config, using fallback",{error:y}),this._makeFallbackConfig(d,s);throw y}if(h!==null)throw new exports.ConfigNotFoundError(`No config tagged with env="prod" in project "${t}", but other configs exist. Use setConfigEnv() to tag a version, or pass an explicit env/version.`)}if(d===void 0)throw new exports.ConfigNotFoundError(`No config found in project "${t}". Pass a fallback to auto-create one.`);if(this._validatePromptProjects(d,t),!await this._allPromptsSynced(d))return this._makeFallbackConfig(d,s);let g;try{g=await i.createBlueprint({values:GF(d)});}catch(h){if(h instanceof k&&h.statusCode===409){let y=await i.getBlueprint({maskId:void 0});if(!y)throw new exports.ConfigNotFoundError(`Failed to create or fetch config in project "${t}".`);g=y;}else throw h}return sB(t,o,s!=null?s:null,g,null,a),g}_buildConfigFromBlueprint(i,r,t){var s;let o=Object.fromEntries(i.keys().map(c=>[c,i.getRawEntry(c)]));if(r!==void 0){let c=Object.keys(r).filter(l=>o[l]===void 0);if(c.length>0){let l=(s=i.name)!=null?s:i.id;throw new exports.ConfigMismatchError(`Config version "${l}" is missing expected field(s): ${c.join(", ")}. The retrieved version does not contain all fields declared in the fallback.`)}}let a=ate(o,i.values,r!==void 0?Object.keys(r):void 0);return iB({values:a,fieldNames:new Set(Object.keys(r!=null?r:a)),blueprintId:i.id,blueprintVersion:i.name,isFallback:false,maskId:t})}async _getOrCreateConfigImpl(i){var h,y,w,A;if(!qt.getStore())throw new Error("getOrCreateConfig() must be called inside a track() function");if((i==null?void 0:i.version)!==void 0&&(i==null?void 0:i.env)!==void 0)throw new Error("Only one of 'version' or 'env' may be specified in getOrCreateConfig().");let r=i==null?void 0:i.fallback,t=(h=i==null?void 0:i.projectName)!=null?h:this.config.projectName,o=(y=KF())!=null?y:void 0,a=(w=ute())!=null?w:void 0,s=a!==void 0,c=new Zt(t,this),l=(i==null?void 0:i.version)==="latest",m=(i==null?void 0:i.version)!==void 0&&!l,u=i!=null&&i.version?null:(A=i==null?void 0:i.env)!=null?A:"prod",d=a!=null?a:m?i.version:null,f=await this._fetchBlueprintFromBackend(c,{blueprintName:a,isLatest:l,hasNamedVersion:m,namedVersion:i==null?void 0:i.version,effectiveEnv:u,maskId:o,projectName:t,effectiveVersion:d,fallback:r});if(f!==null&&!(f instanceof xr))return f;let g=f;if(!g){let C=await this._resolveNullBlueprint(c,{projectName:t,effectiveEnv:u,effectiveVersion:d,maskId:o,hasNamedVersion:m,hasExplicitEnv:(i==null?void 0:i.env)!==void 0,isExplicitBlueprintFromContext:s,isLatest:l,fallback:r});if(!(C instanceof xr))return C;g=C;}return this._buildConfigFromBlueprint(g,r,o)}};Hg.BUILTIN_ENVIRONMENT_NAMES=new Set(["production","staging","development"]);exports.Opik=Hg;});var poe=n(()=>{HF();qu();og();});function ode(){let p=exports.getTrackContext();return p?{[exports.OPIK_TRACE_ID_HEADER]:p.trace.data.id,[exports.OPIK_PARENT_SPAN_ID_HEADER]:p.span.data.id}:null}exports.OPIK_TRACE_ID_HEADER=void 0;exports.OPIK_PARENT_SPAN_ID_HEADER=void 0;var moe=n(()=>{Mr();exports.OPIK_TRACE_ID_HEADER="opik_trace_id",exports.OPIK_PARENT_SPAN_ID_HEADER="opik_parent_span_id";});var Ete=n(()=>{Yi();pi();Mr();sr();QF();ae();Mh();Jg();Iu();xu();xF();FF();IF();Ku();LF();poe();Pu();rB();moe();});Ete();
405
- Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.activateRunner=eB;exports.agentConfigContext=ig;exports.buildSuiteResult=pB;exports.createModel=hB;exports.createModelFromInstance=Ote;exports.deserializeEvaluators=ct;exports.detectProvider=gB;exports.evaluate=qte;exports.evaluatePrompt=dBr;exports.evaluateTestSuite=_g;exports.getDistributedTraceHeaders=ode;exports.getGlobalClient=EF;exports.isTracingActive=Ge;exports.resetGlobalClient=hle;exports.resetTracingToConfigDefault=Doe;exports.resolveEvaluators=uo;exports.resolveExecutionPolicy=Wr;exports.resolveItemExecutionPolicy=co;exports.resolveModel=ii;exports.runTests=Xte;exports.serializeEvaluators=oi;exports.setGlobalClient=fle;exports.setTracingActive=Ioe;exports.track=ot;exports.validateEvaluators=ioe;exports.validateExecutionPolicy=go;
405
+ Object.defineProperty(exports,"z",{enumerable:true,get:function(){return zod.z}});exports.activateRunner=eB;exports.agentConfigContext=ig;exports.buildSuiteResult=pB;exports.createModel=hB;exports.createModelFromInstance=Ote;exports.deserializeEvaluators=ct;exports.detectProvider=gB;exports.evaluate=qte;exports.evaluatePrompt=gBr;exports.evaluateTestSuite=_g;exports.getDistributedTraceHeaders=ode;exports.getGlobalClient=EF;exports.isTracingActive=Ge;exports.resetGlobalClient=hle;exports.resetTracingToConfigDefault=Doe;exports.resolveEvaluators=uo;exports.resolveExecutionPolicy=Wr;exports.resolveItemExecutionPolicy=co;exports.resolveModel=ii;exports.runTests=Xte;exports.serializeEvaluators=oi;exports.setGlobalClient=fle;exports.setTracingActive=Ioe;exports.track=ot;exports.validateEvaluators=ioe;exports.validateExecutionPolicy=go;