opik 2.0.21 → 2.0.22

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.
@@ -1,6 +1,6 @@
1
1
  import {link}from'ansi-escapes';import {Logger}from'tslog';import ZE from'fs';import qE from'os';import vX from'path';import jX from'ini';import'dotenv/config';import {v7}from'uuid';import G8 from'xxhash-wasm';import O8 from'fast-json-stable-stringify';import {TextDecoder}from'util';import X8 from'mustache';import eZ from'nunjucks';import {formatDistanceToNow}from'date-fns';import {diffStringsUnified}from'jest-diff';import aZ from'fast-deep-equal';import {AsyncLocalStorage}from'async_hooks';import Xm from'chalk';import CZ from'boxen';import {z as z$1}from'zod';export{z as Da}from'zod';import DZ from'ora';import {createOpenAI}from'@ai-sdk/openai';import {createAnthropic}from'@ai-sdk/anthropic';import {createGoogleGenerativeAI}from'@ai-sdk/google';import {Output,generateText}from'ai';var dX=Object.create;var Mt=Object.defineProperty;var HE=Object.getOwnPropertyDescriptor;var uX=Object.getOwnPropertyNames;var gX=Object.prototype.hasOwnProperty;var GE=(p,i)=>(i=Symbol[p])?i:Symbol.for("Symbol."+p),Ki=p=>{throw TypeError(p)};var fX=(p,i,e)=>i in p?Mt(p,i,{enumerable:true,configurable:true,writable:true,value:e}):p[i]=e;var n=(p,i)=>()=>(p&&(i=p(p=0)),i);var V=(p,i)=>{for(var e in i)Mt(p,e,{get:i[e],enumerable:true});},hX=(p,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let o of uX(i))!gX.call(p,o)&&o!==e&&Mt(p,o,{get:()=>i[o],enumerable:!(t=HE(i,o))||t.enumerable});return p};var yX=p=>hX(Mt({},"__esModule",{value:true}),p);var OE=p=>{var i;return [,,,dX((i=void 0)!=null?i:null)]},KE=["class","method","getter","setter","accessor","field","value","get","set"],Oi=p=>p!==void 0&&typeof p!="function"?Ki("Function expected"):p,bX=(p,i,e,t,o)=>({kind:KE[p],name:i,metadata:t,addInitializer:a=>e._?Ki("Already initialized"):o.push(Oi(a||null))}),Sd=(p,i)=>fX(i,GE("metadata"),p[3]),$E=(p,i,e,t)=>{for(var o=0,a=p[i>>1],s=a&&a.length;o<s;o++)a[o].call(e);return t},QE=(p,i,e,t,o,a)=>{var c,l,m,u,d=i&7,f=false,g=false,h=2,y=KE[d+5],A=p[h]||(p[h]=[]),C=((o=o.prototype),HE(o,e));for(var I=t.length-1;I>=0;I--)m=bX(d,e,l={},p[3],A),(m.static=f,m.private=g,u=m.access={has:D=>e in D},(u.get=D=>D[e]),d>2),c=(0, t[I])(C[y],m),l._=1,Oi(c)&&(C[y]=c);return C&&Mt(o,e,C),o};function wX(p){return p.scoringFailed?false:p.value===1}var $i,Ns,Bs=n(()=>{$i={runsPerItem:1,passThreshold:1};Ns=class{constructor(i){this.allItemsPassed=i.allItemsPassed,this.itemsPassed=i.itemsPassed,this.itemsTotal=i.itemsTotal,this.passRate=i.passRate,this.itemResults=i.itemResults,this.experimentId=i.experimentId,this.experimentName=i.experimentName,this.experimentUrl=i.experimentUrl,this.suiteName=i.suiteName,this.totalTime=i.totalTime;}toReportDict(){var t,o,a;let i=[];for(let[s,c]of this.itemResults){let l=new Map;for(let u of c.testResults){let d=(t=u.trialId)!=null?t:0,f=(o=l.get(d))!=null?o:[];f.push(u),l.set(d,f);}let m=[];for(let[u,d]of l){let g=d.flatMap(A=>A.scoreResults).map(A=>{var I;let C={name:A.name,passed:wX(A),value:A.value,scoringFailed:(I=A.scoringFailed)!=null?I:false};return A.reason!==void 0&&(C.reason=A.reason),C}),h=g.length===0||g.every(A=>A.passed),y=d[0],w={trialId:u,passed:h,input:y.testCase.taskOutput.input,output:y.testCase.taskOutput.output,assertions:g};y.testCase.traceId&&(w.traceId=y.testCase.traceId),m.push(w);}i.push({datasetItemId:s,passed:c.passed,runsPassed:c.runsPassed,executionPolicy:{runsPerItem:c.configuredRunsPerItem,passThreshold:c.passThreshold},runs:m});}let e={suitePassed:this.allItemsPassed,itemsPassed:this.itemsPassed,itemsTotal:this.itemsTotal,passRate:(a=this.passRate)!=null?a:null,experimentId:this.experimentId};return this.suiteName!==void 0&&(e.suiteName=this.suiteName),this.experimentName!==void 0&&(e.experimentName=this.experimentName),this.experimentUrl!==void 0&&(e.experimentUrl=this.experimentUrl),this.totalTime!==void 0&&(e.totalTimeSeconds=Math.round(this.totalTime*1e3)/1e3),e.generatedAt=new Date().toISOString(),e.items=i,e}toDict(){return this.toReportDict()}};});function _X(p){return p.scoreResults.length===0?true:p.scoreResults.every(i=>!!i.value)}function kX(p){let i=new Map;for(let e of p){let t=e.testCase.datasetItemId,o=i.get(t);o?o.push(e):i.set(t,[e]);}return i}function AX(p){var e;let i=new Map;for(let t of p){let o=(e=t.trialId)!=null?e:0,a=i.get(o);a?a.push(t):i.set(o,[t]);}return i}function YE(p,i={}){var m;let e=kX(p.testResults),t=new Map;for(let[u,d]of e){let f=AX(d),g=f.size,h=0;for(let[,N]of f)N.every(_X)&&h++;let w=(m=d[0].resolvedExecutionPolicy)!=null?m:$i,A=w.passThreshold,C=w.runsPerItem,I=h>=A,D=d.some(N=>N.scoreResults.length>0);t.set(u,{datasetItemId:u,passed:I,hasAssertions:D,runsPassed:h,runsTotal:g,configuredRunsPerItem:C,passThreshold:A,testResults:d});}let o=t.size,a=[...t.values()].filter(u=>u.passed).length,s=o===0||a===o,c=[...t.values()].filter(u=>u.hasAssertions),l=c.length===0?void 0:c.filter(u=>u.passed).length/c.length;return new Ns({allItemsPassed:s,itemsPassed:a,itemsTotal:o,passRate:l,itemResults:t,experimentId:p.experimentId,experimentName:p.experimentName,experimentUrl:p.resultUrl,suiteName:i.suiteName,totalTime:i.totalTime})}var vd=n(()=>{Bs();});function Fs(p,i=p){return link(i,p)}var SX,E,XE,TX,q=n(()=>{SX={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};E=new Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),XE=p=>{E.settings.minLevel=SX[p];},TX=()=>{E.settings.minLevel=100;};XE(process.env.OPIK_LOG_LEVEL||"INFO");});function jd(p){return Object.fromEntries(Object.entries(p).filter(([,i])=>i!==void 0))}function CX(){return jd({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:process.env.OPIK_HOLD_UNTIL_FLUSH===void 0?void 0:["1","true","yes"].includes(String(process.env.OPIK_HOLD_UNTIL_FLUSH).toLowerCase())})}function IX(p){return p.replace(/^~(?=$|\/|\\)/,qE.homedir())}function DX(){let p=process.env.OPIK_CONFIG_PATH||EX,i=IX(p);if(!ZE.existsSync(i)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${i}`);return {}}try{let e=jX.parse(ZE.readFileSync(i,"utf8"));return e.opik?jd({apiKey:e.opik.api_key,apiUrl:e.opik.url_override,projectName:e.opik.project_name,workspaceName:e.opik.workspace}):{}}catch(e){return E.error(`Error loading config file ${i}: ${e}`),{}}}function eC(p){let i=CX(),e=DX(),{headers:t,...o}=p||{};return UX({...Qi,...e,...i,...jd(o)})}function UX(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");let i=NX(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 NX(p){return new URL(p).hostname.endsWith("comet.com")}var EX,Qi,Ms=n(()=>{q();EX=vX.join(qE.homedir(),".opik.config"),Qi={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false};});function Yi(p,i){return JSON.parse(p,i)}var Ge,Dr=n(()=>{Ge=(p,i,e)=>JSON.stringify(p,i,e);});function BX({message:p,statusCode:i,body:e}){let t=[];return p!=null&&t.push(p),i!=null&&t.push(`Status code: ${i.toString()}`),e!=null&&t.push(`Body: ${Ge(e,void 0,2)}`),t.join(`
2
2
  `)}var k,Ws=n(()=>{Dr();k=class extends Error{constructor({message:i,statusCode:e,body:t,rawResponse:o}){super(BX({message:i,statusCode:e,body:t})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=e,this.body=t,this.rawResponse=o;}};});var Ur,rC=n(()=>{Ur=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(()=>{Ws();rC();});var Xi,tC=n(()=>{J();Xi=class extends k{constructor(i,e){super({message:"BadGatewayError",statusCode:502,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var B,iC=n(()=>{J();B=class extends k{constructor(i,e){super({message:"BadRequestError",statusCode:400,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var K,oC=n(()=>{J();K=class extends k{constructor(i,e){super({message:"ConflictError",statusCode:409,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ye,aC=n(()=>{J();ye=class extends k{constructor(i,e){super({message:"ForbiddenError",statusCode:403,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var rt,Ed=n(()=>{J();rt=class extends k{constructor(i,e){super({message:"GoneError",statusCode:410,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Zi,nC=n(()=>{J();Zi=class extends k{constructor(i,e){super({message:"InternalServerError",statusCode:500,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var U,sC=n(()=>{J();U=class extends k{constructor(i,e){super({message:"NotFoundError",statusCode:404,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var nr,pC=n(()=>{J();nr=class extends k{constructor(i,e){super({message:"NotImplementedError",statusCode:501,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Wt,cC=n(()=>{J();Wt=class extends k{constructor(i,e){super({message:"ServiceUnavailableError",statusCode:503,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var sr,lC=n(()=>{J();sr=class extends k{constructor(i,e){super({message:"TooManyRequestsError",statusCode:429,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var $,mC=n(()=>{J();$=class extends k{constructor(i,e){super({message:"UnauthorizedError",statusCode:401,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ce,dC=n(()=>{J();ce=class extends k{constructor(i,e){super({message:"UnprocessableEntityError",statusCode:422,body:i,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var uC=n(()=>{tC();iC();oC();aC();Ed();nC();sC();pC();cC();lC();mC();dC();});var Cd=n(()=>{});var gC=n(()=>{Cd();});var Id={};var fC=n(()=>{gC();});var Dd=n(()=>{});var hC=n(()=>{Dd();});var yC,bC=n(()=>{yC={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var Ud=n(()=>{bC();});var Ls={};V(Ls,{GetWebhookExamplesRequestAlertType:()=>yC});var RC=n(()=>{hC();Ud();});var Nd=n(()=>{});var xC=n(()=>{Nd();});var Bd={};var wC=n(()=>{xC();});var Fd=n(()=>{});var _C=n(()=>{Fd();});var kC,AC=n(()=>{kC={Trace:"TRACE",Span:"SPAN",Thread:"THREAD"};});var Md=n(()=>{AC();});var Vs={};V(Vs,{AssertionResultBatchEntityType:()=>kC});var PC=n(()=>{_C();Md();});var Wd=n(()=>{});var zC=n(()=>{Wd();});var SC,TC=n(()=>{SC={Trace:"trace",Span:"span"};});var vC,jC=n(()=>{vC={Trace:"trace",Span:"span"};});var EC,CC=n(()=>{EC={Trace:"trace",Span:"span"};});var IC,DC=n(()=>{IC={Trace:"trace",Span:"span"};});var Ld=n(()=>{TC();jC();CC();DC();});var Js={};V(Js,{AttachmentListRequestEntityType:()=>SC,DownloadAttachmentRequestEntityType:()=>vC,StartMultipartUploadRequestEntityType:()=>EC,UploadAttachmentRequestEntityType:()=>IC});var UC=n(()=>{zC();Ld();});var Vd=n(()=>{});var NC=n(()=>{Vd();});var Jd={};var BC=n(()=>{NC();});var Hd=n(()=>{});var FC=n(()=>{Hd();});var Gd={};var MC=n(()=>{FC();});var WC=n(()=>{});var Od={};var LC=n(()=>{WC();});var Kd=n(()=>{});var VC=n(()=>{Kd();});var $d={};var JC=n(()=>{VC();});var Qd=n(()=>{});var HC=n(()=>{Qd();});var GC,OC=n(()=>{GC={Private:"private",Public:"public"};});var Hs,Yd=n(()=>{Hs={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var KC,$C=n(()=>{KC={Private:"private",Public:"public"};});var Xd=n(()=>{OC();Yd();$C();});var Gs={};V(Gs,{DatasetUpdateVisibility:()=>GC,DatasetWriteType:()=>Hs,DatasetWriteVisibility:()=>KC});var QC=n(()=>{HC();Xd();});var Zd=n(()=>{});var YC=n(()=>{Zd();});var qd={};var XC=n(()=>{YC();});var eu=n(()=>{});var ZC=n(()=>{eu();});var Os,ru=n(()=>{Os={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var qC,eI=n(()=>{qC={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var rI,tI=n(()=>{rI={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var tu=n(()=>{ru();eI();tI();});var Ks={};V(Ks,{ExperimentWriteEvaluationMethod:()=>Os,ExperimentWriteStatus:()=>qC,ExperimentWriteType:()=>rI});var iI=n(()=>{ZC();tu();});var iu=n(()=>{});var oI=n(()=>{iu();});var aI,nI=n(()=>{aI={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};});var ou=n(()=>{nI();});var $s={};V($s,{FindFeedbackDefinitionsRequestType:()=>aI});var sI=n(()=>{oI();ou();});var au=n(()=>{});var pI=n(()=>{au();});var nu={};var cI=n(()=>{pI();});var su=n(()=>{});var lI=n(()=>{su();});var pu={};var mI=n(()=>{lI();});var dI=n(()=>{});var cu={};var uI=n(()=>{dI();});var lu=n(()=>{});var gI=n(()=>{lu();});var fI,hI=n(()=>{fI={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var mu=n(()=>{hI();});var Qs={};V(Qs,{ProviderApiKeyWriteProvider:()=>fI});var yI=n(()=>{gI();mu();});var bI=n(()=>{});var du={};var RI=n(()=>{bI();});var xI=n(()=>{});var uu={};var wI=n(()=>{xI();});var _I=n(()=>{});var gu={};var kI=n(()=>{_I();});var AI=n(()=>{});var fu={};var PI=n(()=>{AI();});var hu=n(()=>{});var zI=n(()=>{hu();});var SI,TI=n(()=>{SI={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var yu=n(()=>{TI();});var Ys={};V(Ys,{OptimizationUpdateStatus:()=>SI});var vI=n(()=>{zI();yu();});var bu=n(()=>{});var jI=n(()=>{bu();});var EI,CI=n(()=>{EI={Connect:"connect",Endpoint:"endpoint"};});var Ru=n(()=>{CI();});var Xs={};V(Xs,{CreateSessionRequestType:()=>EI});var II=n(()=>{jI();Ru();});var xu=n(()=>{});var DI=n(()=>{xu();});var UI,NI=n(()=>{UI={Traces:"traces",Spans:"spans",Threads:"threads"};});var BI,FI=n(()=>{BI={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var MI,WI=n(()=>{MI={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 LI,VI=n(()=>{LI={Private:"private",Public:"public"};});var JI,HI=n(()=>{JI={Private:"private",Public:"public"};});var wu=n(()=>{NI();FI();WI();VI();HI();});var Zs={};V(Zs,{KpiCardRequestEntityType:()=>UI,ProjectMetricRequestPublicInterval:()=>BI,ProjectMetricRequestPublicMetricType:()=>MI,ProjectUpdateVisibility:()=>LI,ProjectWriteVisibility:()=>JI});var GI=n(()=>{DI();wu();});var _u=n(()=>{});var OI=n(()=>{_u();});var KI,$I=n(()=>{KI={Text:"text",Chat:"chat"};});var QI,YI=n(()=>{QI={Text:"text",Chat:"chat"};});var XI,ZI=n(()=>{XI={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var ku=n(()=>{$I();YI();ZI();});var qs={};V(qs,{CreatePromptVersionDetailTemplateStructure:()=>KI,PromptWriteTemplateStructure:()=>QI,PromptWriteType:()=>XI});var qI=n(()=>{OI();ku();});var Au=n(()=>{});var eD=n(()=>{Au();});var Pu={};var rD=n(()=>{eD();});var zu=n(()=>{});var tD=n(()=>{zu();});var iD,oD=n(()=>{iD={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var Su=n(()=>{oD();});var ep={};V(ep,{RetentionRuleWriteRetention:()=>iD});var aD=n(()=>{tD();Su();});var Tu=n(()=>{});var nD=n(()=>{Tu();});var sD,pD=n(()=>{sD={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var cD,lD=n(()=>{cD={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var mD,dD=n(()=>{mD={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var uD,gD=n(()=>{uD={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var vu=n(()=>{pD();lD();dD();gD();});var rp={};V(rp,{BridgeCommandResultRequestStatus:()=>sD,BridgeCommandSubmitRequestType:()=>cD,ListRunnersRequestStatus:()=>mD,LocalRunnerJobResultRequestStatus:()=>uD});var fD=n(()=>{nD();vu();});var hD=n(()=>{});var ju={};var yD=n(()=>{hD();});var Eu=n(()=>{});var bD=n(()=>{Eu();});var RD,xD=n(()=>{RD={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var wD,_D=n(()=>{wD={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var kD,AD=n(()=>{kD={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var PD,zD=n(()=>{PD={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"};});var SD,TD=n(()=>{SD={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var Cu=n(()=>{xD();_D();AD();zD();TD();});var tp={};V(tp,{FindFeedbackScoreNames1RequestType:()=>RD,GetSpanStatsRequestType:()=>wD,GetSpansByProjectRequestType:()=>kD,SpanSearchStreamRequestPublicExcludeItem:()=>PD,SpanSearchStreamRequestPublicType:()=>SD});var vD=n(()=>{bD();Cu();});var jD=n(()=>{});var Iu={};var ED=n(()=>{jD();});var Du=n(()=>{});var CD=n(()=>{Du();});var ID,DD=n(()=>{ID={Name:"name",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Tags:"tags",ErrorInfo:"error_info",Usage:"usage",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",SpanFeedbackScores:"span_feedback_scores",Comments:"comments",GuardrailsValidations:"guardrails_validations",TotalEstimatedCost:"total_estimated_cost",SpanCount:"span_count",LlmSpanCount:"llm_span_count",HasToolSpans:"has_tool_spans",Duration:"duration",Ttft:"ttft",ThreadId:"thread_id",VisibilityMode:"visibility_mode",Providers:"providers",Experiment:"experiment",Source:"source"};});var Uu=n(()=>{DD();});var ip={};V(ip,{TraceSearchStreamRequestPublicExcludeItem:()=>ID});var UD=n(()=>{CD();Uu();});var Nu=n(()=>{});var ND=n(()=>{Nu();});var Bu={};var BD=n(()=>{ND();});var FD=n(()=>{});var Fu={};var MD=n(()=>{FD();});var WD=n(()=>{});var Mu={};var LD=n(()=>{WD();});var VD=n(()=>{Cd();fC();Dd();RC();Ud();Nd();wC();Fd();PC();Md();Wd();UC();Ld();Vd();BC();Hd();MC();LC();Kd();JC();Qd();QC();Xd();Zd();XC();eu();iI();tu();iu();sI();ou();au();cI();su();mI();uI();lu();yI();mu();RI();wI();kI();PI();hu();vI();yu();bu();II();Ru();xu();GI();wu();_u();qI();ku();Au();rD();zu();aD();Su();Tu();fD();vu();yD();Eu();vD();Cu();ED();Du();UD();Uu();Nu();BD();MD();LD();});var JD=n(()=>{});var HD=n(()=>{});var FX,GD=n(()=>{FX={Blueprint:"blueprint",Mask:"mask"};});var OD=n(()=>{});var MX,KD=n(()=>{MX={Blueprint:"blueprint",Mask:"mask"};});var $D=n(()=>{});var qi,QD=n(()=>{qi={Blueprint:"blueprint",Mask:"mask"};});var YD=n(()=>{});var XD=n(()=>{});var ZD=n(()=>{});var WX,qD=n(()=>{WX={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var eU=n(()=>{});var LX,rU=n(()=>{LX={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var tU=n(()=>{});var VX,iU=n(()=>{VX={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var oU=n(()=>{});var aU=n(()=>{});var JX,nU=n(()=>{JX={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var sU=n(()=>{});var pU=n(()=>{});var HX,cU=n(()=>{HX={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var lU=n(()=>{});var mU=n(()=>{});var dU=n(()=>{});var GX,uU=n(()=>{GX={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};});var OX,gU=n(()=>{OX={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};});var fU=n(()=>{});var KX,hU=n(()=>{KX={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors"};});var $X,yU=n(()=>{$X={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 bU=n(()=>{});var QX,RU=n(()=>{QX={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 xU=n(()=>{});var YX,wU=n(()=>{YX={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 _U=n(()=>{});var XX,kU=n(()=>{XX={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var AU=n(()=>{});var PU=n(()=>{});var zU=n(()=>{});var SU=n(()=>{});var TU=n(()=>{});var ZX,vU=n(()=>{ZX={Trace:"trace",Thread:"thread"};});var jU=n(()=>{});var EU=n(()=>{});var qX,CU=n(()=>{qX={Trace:"trace",Thread:"thread"};});var IU=n(()=>{});var e9,DU=n(()=>{e9={Trace:"trace",Thread:"thread"};});var UU=n(()=>{});var NU=n(()=>{});var r9,BU=n(()=>{r9={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var t9,FU=n(()=>{t9={Passed:"passed",Failed:"failed"};});var MU=n(()=>{});var WU=n(()=>{});var LU=n(()=>{});var VU=n(()=>{});var i9,JU=n(()=>{i9={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};});var HU=n(()=>{});var GU=n(()=>{});var OU=n(()=>{});var KU=n(()=>{});var $U=n(()=>{});var QU=n(()=>{});var YU=n(()=>{});var o9,XU=n(()=>{o9={Evaluator:"evaluator"};});var ZU=n(()=>{});var qU=n(()=>{});var eN=n(()=>{});var rN=n(()=>{});var a9,tN=n(()=>{a9={Evaluator:"evaluator"};});var iN=n(()=>{});var oN=n(()=>{});var n9,aN=n(()=>{n9={Evaluator:"evaluator"};});var nN=n(()=>{});var sN=n(()=>{});var pN=n(()=>{});var cN=n(()=>{});var lN=n(()=>{});var mN=n(()=>{});var dN=n(()=>{});var uN=n(()=>{});var gN=n(()=>{});var fN=n(()=>{});var hN=n(()=>{});var yN=n(()=>{});var bN=n(()=>{});var s9,RN=n(()=>{s9={Evaluator:"evaluator"};});var xN=n(()=>{});var wN=n(()=>{});var _N=n(()=>{});var kN=n(()=>{});var AN=n(()=>{});var PN=n(()=>{});var zN=n(()=>{});var SN=n(()=>{});var TN=n(()=>{});var vN=n(()=>{});var p9,jN=n(()=>{p9={Evaluator:"evaluator"};});var EN=n(()=>{});var CN=n(()=>{});var IN=n(()=>{});var DN=n(()=>{});var UN=n(()=>{});var NN=n(()=>{});var BN=n(()=>{});var FN=n(()=>{});var MN=n(()=>{});var WN=n(()=>{});var LN=n(()=>{});var VN=n(()=>{});var JN=n(()=>{});var HN=n(()=>{});var GN=n(()=>{});var c9,ON=n(()=>{c9={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type"};});var KN=n(()=>{});var $N=n(()=>{});var QN=n(()=>{});var l9,YN=n(()=>{l9={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var m9,XN=n(()=>{m9={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var ZN=n(()=>{});var d9,qN=n(()=>{d9={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var eB=n(()=>{});var rB=n(()=>{});var tB=n(()=>{});var iB=n(()=>{});var oB=n(()=>{});var aB=n(()=>{});var nB=n(()=>{});var sB=n(()=>{});var pB=n(()=>{});var cB=n(()=>{});var lB=n(()=>{});var u9,mB=n(()=>{u9={Topic:"TOPIC",Pii:"PII"};});var dB=n(()=>{});var g9,uB=n(()=>{g9={Topic:"TOPIC",Pii:"PII"};});var f9,gB=n(()=>{f9={Passed:"passed",Failed:"failed"};});var h9,fB=n(()=>{h9={Passed:"passed",Failed:"failed"};});var hB=n(()=>{});var yB=n(()=>{});var bB=n(()=>{});var RB=n(()=>{});var xB=n(()=>{});var wB=n(()=>{});var y9,_B=n(()=>{y9={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var kB=n(()=>{});var b9,AB=n(()=>{b9={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var R9,PB=n(()=>{R9={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var zB=n(()=>{});var SB=n(()=>{});var TB=n(()=>{});var vB=n(()=>{});var x9,jB=n(()=>{x9={Trace:"trace",Span:"span"};});var EB=n(()=>{});var CB=n(()=>{});var IB=n(()=>{});var DB=n(()=>{});var UB=n(()=>{});var w9,NB=n(()=>{w9={Workspace:"workspace",Insights:"insights"};});var _9,BB=n(()=>{_9={MultiProject:"multi_project",Experiments:"experiments"};});var FB=n(()=>{});var k9,MB=n(()=>{k9={MultiProject:"multi_project",Experiments:"experiments"};});var WB=n(()=>{});var A9,LB=n(()=>{A9={MultiProject:"multi_project",Experiments:"experiments"};});var VB=n(()=>{});var JB=n(()=>{});var HB=n(()=>{});var GB=n(()=>{});var OB=n(()=>{});var KB=n(()=>{});var P9,$B=n(()=>{P9={Pending:"PENDING",Processing:"PROCESSING",Completed:"COMPLETED",Failed:"FAILED"};});var QB=n(()=>{});var YB=n(()=>{});var XB=n(()=>{});var ZB=n(()=>{});var z9,qB=n(()=>{z9={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var eF=n(()=>{});var S9,rF=n(()=>{S9={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var tF=n(()=>{});var iF=n(()=>{});var oF=n(()=>{});var T9,aF=n(()=>{T9={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var v9,nF=n(()=>{v9={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var sF=n(()=>{});var pF=n(()=>{});var Wu,cF=n(()=>{Wu={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var lF=n(()=>{});var mF=n(()=>{});var j9,dF=n(()=>{j9={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Lu,uF=n(()=>{Lu={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var E9,gF=n(()=>{E9={Private:"private",Public:"public"};});var C9,fF=n(()=>{C9={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var I9,hF=n(()=>{I9={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var yF=n(()=>{});var bF=n(()=>{});var RF=n(()=>{});var xF=n(()=>{});var wF=n(()=>{});var _F=n(()=>{});var D9,kF=n(()=>{D9={Private:"private",Public:"public"};});var AF=n(()=>{});var U9,PF=n(()=>{U9={Trace:"trace",Span:"span"};});var zF=n(()=>{});var SF=n(()=>{});var TF=n(()=>{});var vF=n(()=>{});var jF=n(()=>{});var EF=n(()=>{});var CF=n(()=>{});var IF=n(()=>{});var DF=n(()=>{});var UF=n(()=>{});var NF=n(()=>{});var BF=n(()=>{});var FF=n(()=>{});var MF=n(()=>{});var WF=n(()=>{});var LF=n(()=>{});var VF=n(()=>{});var JF=n(()=>{});var HF=n(()=>{});var GF=n(()=>{});var N9,OF=n(()=>{N9={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var KF=n(()=>{});var Vu,Ju=n(()=>{Vu={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var B9,$F=n(()=>{B9={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var QF=n(()=>{});var Hu,Gu=n(()=>{Hu={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var YF=n(()=>{});var XF=n(()=>{});var ZF=n(()=>{});var qF=n(()=>{});var eM=n(()=>{});var F9,rM=n(()=>{F9={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var tM=n(()=>{});var iM=n(()=>{});var oM=n(()=>{});var aM=n(()=>{});var nM=n(()=>{});var sM=n(()=>{});var pM=n(()=>{});var cM=n(()=>{});var lM=n(()=>{});var M9,mM=n(()=>{M9={Passed:"passed",Failed:"failed"};});var W9,dM=n(()=>{W9={Default:"default",Hidden:"hidden"};});var uM=n(()=>{});var L9,gM=n(()=>{L9={Default:"default",Hidden:"hidden"};});var fM=n(()=>{});var hM=n(()=>{});var V9,yM=n(()=>{V9={Passed:"passed",Failed:"failed"};});var J9,bM=n(()=>{J9={Default:"default",Hidden:"hidden"};});var RM=n(()=>{});var xM=n(()=>{});var H9,wM=n(()=>{H9={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var G9,_M=n(()=>{G9={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var O9,kM=n(()=>{O9={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var AM=n(()=>{});var PM=n(()=>{});var K9,zM=n(()=>{K9={Passed:"passed",Failed:"failed"};});var SM=n(()=>{});var $9,TM=n(()=>{$9={Passed:"passed",Failed:"failed"};});var Q9,vM=n(()=>{Q9={Passed:"passed",Failed:"failed"};});var jM=n(()=>{});var EM=n(()=>{});var CM=n(()=>{});var Y9,IM=n(()=>{Y9={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Ou,DM=n(()=>{Ou={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var UM=n(()=>{});var X9,NM=n(()=>{X9={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Z9,BM=n(()=>{Z9={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var FM=n(()=>{});var MM=n(()=>{});var WM=n(()=>{});var LM=n(()=>{});var VM=n(()=>{});var JM=n(()=>{});var HM=n(()=>{});var GM=n(()=>{});var OM=n(()=>{});var KM=n(()=>{});var $M=n(()=>{});var QM=n(()=>{});var Ku,$u=n(()=>{Ku={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var YM=n(()=>{});var q9,XM=n(()=>{q9={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var ZM=n(()=>{});var e5,qM=n(()=>{e5={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var eW=n(()=>{});var r5,rW=n(()=>{r5={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var tW=n(()=>{});var iW=n(()=>{});var oW=n(()=>{});var t5,aW=n(()=>{t5={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var i5,nW=n(()=>{i5={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var sW=n(()=>{});var pW=n(()=>{});var cW=n(()=>{});var lW=n(()=>{});var mW=n(()=>{});var dW=n(()=>{});var uW=n(()=>{});var gW=n(()=>{});var fW=n(()=>{});var o5,hW=n(()=>{o5={Topic:"TOPIC",Pii:"PII"};});var a5,yW=n(()=>{a5={Passed:"passed",Failed:"failed"};});var bW=n(()=>{});var RW=n(()=>{});var xW=n(()=>{});var n5,wW=n(()=>{n5={Topic:"TOPIC",Pii:"PII"};});var s5,_W=n(()=>{s5={Passed:"passed",Failed:"failed"};});var kW=n(()=>{});var AW=n(()=>{});var PW=n(()=>{});var zW=n(()=>{});var SW=n(()=>{});var TW=n(()=>{});var vW=n(()=>{});var jW=n(()=>{});var EW=n(()=>{});var CW=n(()=>{});var IW=n(()=>{});var DW=n(()=>{});var UW=n(()=>{});var NW=n(()=>{});var BW=n(()=>{});var FW=n(()=>{});var MW=n(()=>{});var p5,WW=n(()=>{p5={Count:"count",Errors:"errors",AvgDuration:"avg_duration",TotalCost:"total_cost"};});var LW=n(()=>{});var VW=n(()=>{});var JW=n(()=>{});var HW=n(()=>{});var GW=n(()=>{});var OW=n(()=>{});var KW=n(()=>{});var $W=n(()=>{});var c5,QW=n(()=>{c5={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var l5,YW=n(()=>{l5={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var XW=n(()=>{});var m5,ZW=n(()=>{m5={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var qW=n(()=>{});var e0=n(()=>{});var r0=n(()=>{});var t0=n(()=>{});var i0=n(()=>{});var d5,o0=n(()=>{d5={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var u5,a0=n(()=>{u5={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var n0=n(()=>{});var g5,s0=n(()=>{g5={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var p0=n(()=>{});var c0=n(()=>{});var l0=n(()=>{});var m0=n(()=>{});var d0=n(()=>{});var f5,u0=n(()=>{f5={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var g0=n(()=>{});var f0=n(()=>{});var h5,h0=n(()=>{h5={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var y5,y0=n(()=>{y5={Connect:"connect",Endpoint:"endpoint"};});var b0=n(()=>{});var b5,R0=n(()=>{b5={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};});var x0=n(()=>{});var w0=n(()=>{});var _0=n(()=>{});var k0=n(()=>{});var R5,A0=n(()=>{R5={Trace:"trace",Thread:"thread",Span:"span"};});var P0=n(()=>{});var z0=n(()=>{});var S0=n(()=>{});var T0=n(()=>{});var v0=n(()=>{});var j0=n(()=>{});var E0=n(()=>{});var C0=n(()=>{});var I0=n(()=>{});var D0=n(()=>{});var U0=n(()=>{});var N0=n(()=>{});var B0=n(()=>{});var F0=n(()=>{});var M0=n(()=>{});var W0=n(()=>{});var L0=n(()=>{});var x5,V0=n(()=>{x5={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var w5,J0=n(()=>{w5={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var H0=n(()=>{});var G0=n(()=>{});var O0=n(()=>{});var K0=n(()=>{});var $0=n(()=>{});var _5,Q0=n(()=>{_5={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var Y0=n(()=>{});var X0=n(()=>{});var Lt,Qu=n(()=>{Lt={Required:"required",Optional:"optional"};});var Z0=n(()=>{});var q0=n(()=>{});var eL=n(()=>{});var rL=n(()=>{});var tL=n(()=>{});var iL=n(()=>{});var oL=n(()=>{});var k5,aL=n(()=>{k5={Private:"private",Public:"public"};});var nL=n(()=>{});var A5,sL=n(()=>{A5={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var P5,pL=n(()=>{P5={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 cL=n(()=>{});var lL=n(()=>{});var z5,mL=n(()=>{z5={Private:"private",Public:"public"};});var dL=n(()=>{});var uL=n(()=>{});var gL=n(()=>{});var fL=n(()=>{});var hL=n(()=>{});var yL=n(()=>{});var S5,bL=n(()=>{S5={Private:"private",Public:"public"};});var RL=n(()=>{});var xL=n(()=>{});var T5,wL=n(()=>{T5={Text:"text",Chat:"chat"};});var _L=n(()=>{});var kL=n(()=>{});var v5,AL=n(()=>{v5={Text:"text",Chat:"chat"};});var j5,PL=n(()=>{j5={Text:"text",Chat:"chat"};});var zL=n(()=>{});var E5,SL=n(()=>{E5={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var TL=n(()=>{});var vL=n(()=>{});var jL=n(()=>{});var C5,EL=n(()=>{C5={Text:"text",Chat:"chat"};});var I5,CL=n(()=>{I5={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var IL=n(()=>{});var DL=n(()=>{});var UL=n(()=>{});var NL=n(()=>{});var BL=n(()=>{});var D5,FL=n(()=>{D5={Text:"text",Chat:"chat"};});var U5,ML=n(()=>{U5={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var N5,WL=n(()=>{N5={Text:"text",Chat:"chat"};});var B5,LL=n(()=>{B5={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var VL=n(()=>{});var JL=n(()=>{});var HL=n(()=>{});var F5,GL=n(()=>{F5={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var OL=n(()=>{});var M5,KL=n(()=>{M5={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var $L=n(()=>{});var W5,QL=n(()=>{W5={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};});var YL=n(()=>{});var XL=n(()=>{});var ZL=n(()=>{});var qL=n(()=>{});var L5,eV=n(()=>{L5={Organization:"organization",Workspace:"workspace",Project:"project"};});var V5,rV=n(()=>{V5={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var tV=n(()=>{});var iV=n(()=>{});var oV=n(()=>{});var aV=n(()=>{});var nV=n(()=>{});var sV=n(()=>{});var pV=n(()=>{});var J5,cV=n(()=>{J5={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var H5,lV=n(()=>{H5={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var mV=n(()=>{});var G5,dV=n(()=>{G5={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var uV=n(()=>{});var O5,gV=n(()=>{O5={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var fV=n(()=>{});var K5,hV=n(()=>{K5={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var yV=n(()=>{});var bV=n(()=>{});var RV=n(()=>{});var xV=n(()=>{});var wV=n(()=>{});var $5,_V=n(()=>{$5={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var Q5,kV=n(()=>{Q5={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var Y5,AV=n(()=>{Y5={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var PV=n(()=>{});var yr,Yu=n(()=>{yr={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var zV=n(()=>{});var X5,SV=n(()=>{X5={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var Z5,TV=n(()=>{Z5={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var vV=n(()=>{});var jV=n(()=>{});var EV=n(()=>{});var CV=n(()=>{});var q5,IV=n(()=>{q5={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var e3,DV=n(()=>{e3={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var UV=n(()=>{});var NV=n(()=>{});var BV=n(()=>{});var FV=n(()=>{});var MV=n(()=>{});var WV=n(()=>{});var LV=n(()=>{});var VV=n(()=>{});var JV=n(()=>{});var HV=n(()=>{});var GV=n(()=>{});var OV=n(()=>{});var KV=n(()=>{});var $V=n(()=>{});var QV=n(()=>{});var YV=n(()=>{});var XV=n(()=>{});var ZV=n(()=>{});var qV=n(()=>{});var eJ=n(()=>{});var rJ=n(()=>{});var tJ=n(()=>{});var iJ=n(()=>{});var r3,oJ=n(()=>{r3={Function:"function"};});var t3,aJ=n(()=>{t3={Function:"function"};});var nJ=n(()=>{});var sJ=n(()=>{});var pJ=n(()=>{});var cJ=n(()=>{});var lJ=n(()=>{});var i3,mJ=n(()=>{i3={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var dJ=n(()=>{});var o3,uJ=n(()=>{o3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var gJ=n(()=>{});var a3,fJ=n(()=>{a3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var hJ=n(()=>{});var n3,yJ=n(()=>{n3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var bJ=n(()=>{});var RJ=n(()=>{});var s3,xJ=n(()=>{s3={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var p3,wJ=n(()=>{p3={Default:"default",Hidden:"hidden"};});var c3,_J=n(()=>{c3={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var kJ=n(()=>{});var AJ=n(()=>{});var l3,PJ=n(()=>{l3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var zJ=n(()=>{});var m3,SJ=n(()=>{m3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var TJ=n(()=>{});var d3,vJ=n(()=>{d3={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty"};});var jJ=n(()=>{});var EJ=n(()=>{});var CJ=n(()=>{});var IJ=n(()=>{});var DJ=n(()=>{});var u3,UJ=n(()=>{u3={Active:"active",Inactive:"inactive"};});var NJ=n(()=>{});var BJ=n(()=>{});var FJ=n(()=>{});var MJ=n(()=>{});var WJ=n(()=>{});var g3,LJ=n(()=>{g3={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var f3,VJ=n(()=>{f3={Default:"default",Hidden:"hidden"};});var JJ=n(()=>{});var h3,HJ=n(()=>{h3={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization"};});var GJ=n(()=>{});var OJ=n(()=>{});var KJ=n(()=>{});var $J=n(()=>{});var QJ=n(()=>{});var YJ=n(()=>{});var y3,XJ=n(()=>{y3={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var ZJ=n(()=>{});var b3,qJ=n(()=>{b3={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var e1=n(()=>{});var R3,r1=n(()=>{R3={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var x3,t1=n(()=>{x3={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var i1=n(()=>{});var o1=n(()=>{});var a1=n(()=>{});var n1=n(()=>{});var s1=n(()=>{});var p1=n(()=>{});var c1=n(()=>{});var w3,l1=n(()=>{w3={Success:"success",Failure:"failure"};});var m1=n(()=>{});var d1=n(()=>{});var u1=n(()=>{});var g1=n(()=>{});var f1=n(()=>{});var h1=n(()=>{});var y1=n(()=>{});var b1=n(()=>{});var R1=n(()=>{});var x1=n(()=>{});var w1=n(()=>{});var _1=n(()=>{});var _3,k1=n(()=>{_3={Version1:"version_1",Version2:"version_2"};});var Xu=n(()=>{JD();HD();GD();OD();KD();$D();QD();YD();XD();ZD();qD();eU();rU();tU();iU();oU();aU();nU();sU();pU();cU();lU();mU();dU();uU();gU();fU();hU();yU();bU();RU();xU();wU();_U();kU();AU();PU();zU();SU();TU();vU();jU();EU();CU();IU();DU();UU();NU();BU();FU();MU();WU();LU();VU();JU();HU();GU();OU();KU();$U();QU();YU();XU();ZU();qU();eN();rN();tN();iN();oN();aN();nN();sN();pN();cN();lN();mN();dN();uN();gN();fN();hN();yN();bN();RN();xN();wN();_N();kN();AN();PN();zN();SN();TN();vN();jN();EN();CN();IN();DN();UN();NN();BN();FN();MN();WN();LN();VN();JN();HN();GN();ON();KN();$N();QN();YN();XN();ZN();qN();eB();rB();tB();iB();oB();aB();nB();sB();pB();cB();lB();mB();dB();uB();gB();fB();hB();yB();bB();RB();xB();wB();_B();kB();AB();PB();zB();SB();TB();vB();jB();EB();CB();IB();DB();UB();NB();BB();FB();MB();WB();LB();VB();JB();HB();GB();OB();KB();$B();QB();YB();XB();ZB();qB();eF();rF();tF();iF();oF();aF();nF();sF();pF();cF();lF();mF();dF();uF();gF();fF();hF();yF();bF();RF();xF();wF();_F();kF();AF();PF();zF();SF();TF();vF();jF();EF();CF();IF();DF();UF();NF();BF();FF();MF();WF();LF();VF();JF();HF();GF();OF();KF();Ju();$F();QF();Gu();YF();XF();ZF();qF();eM();rM();tM();iM();oM();aM();nM();sM();pM();cM();lM();mM();dM();uM();gM();fM();hM();yM();bM();RM();xM();wM();_M();kM();AM();PM();zM();SM();TM();vM();jM();EM();CM();IM();DM();UM();NM();BM();FM();MM();WM();LM();VM();JM();HM();GM();OM();KM();$M();QM();$u();YM();XM();ZM();qM();eW();rW();tW();iW();oW();aW();nW();sW();pW();cW();lW();mW();dW();uW();gW();fW();hW();yW();bW();RW();xW();wW();_W();kW();AW();PW();zW();SW();TW();vW();jW();EW();CW();IW();DW();UW();NW();BW();FW();MW();WW();LW();VW();JW();HW();GW();OW();KW();$W();QW();YW();XW();ZW();qW();e0();r0();t0();i0();o0();a0();n0();s0();p0();c0();l0();m0();d0();u0();g0();f0();h0();y0();b0();R0();x0();w0();_0();k0();A0();P0();z0();S0();T0();v0();j0();E0();C0();I0();D0();U0();N0();B0();F0();M0();W0();L0();V0();J0();H0();G0();O0();K0();$0();Q0();Y0();X0();Qu();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();TL();vL();jL();EL();CL();IL();DL();UL();NL();BL();FL();ML();WL();LL();VL();JL();HL();GL();OL();KL();$L();QL();YL();XL();ZL();qL();eV();rV();tV();iV();oV();aV();nV();sV();pV();cV();lV();mV();dV();uV();gV();fV();hV();yV();bV();RV();xV();wV();_V();kV();AV();PV();Yu();zV();SV();TV();vV();jV();EV();CV();IV();DV();UV();NV();BV();FV();MV();WV();LV();VV();JV();HV();GV();OV();KV();$V();QV();YV();XV();ZV();qV();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();TJ();vJ();jJ();EJ();CJ();IJ();DJ();UJ();NJ();BJ();FJ();MJ();WJ();LJ();VJ();JJ();HJ();GJ();OJ();KJ();$J();QJ();YJ();XJ();ZJ();qJ();e1();r1();t1();i1();o1();a1();n1();s1();p1();c1();l1();m1();d1();u1();g1();f1();h1();y1();b1();R1();x1();w1();_1();k1();});var se={};V(se,{AgentBlueprintHistoryType:()=>FX,AgentBlueprintPublicType:()=>MX,AgentBlueprintWriteType:()=>qi,AgentConfigValueHistoryType:()=>WX,AgentConfigValuePublicType:()=>LX,AgentConfigValueWriteType:()=>VX,AlertAlertType:()=>JX,AlertPublicAlertType:()=>HX,AlertTriggerConfigPublicType:()=>GX,AlertTriggerConfigType:()=>OX,AlertTriggerConfigWriteType:()=>KX,AlertTriggerEventType:()=>$X,AlertTriggerPublicEventType:()=>QX,AlertTriggerWriteEventType:()=>YX,AlertWriteAlertType:()=>XX,AnnotationQueuePublicScope:()=>ZX,AnnotationQueueScope:()=>qX,AnnotationQueueWriteScope:()=>e9,AssertionResultBatchEntityType:()=>kC,AssertionResultBatchItemSource:()=>r9,AssertionResultBatchItemStatus:()=>t9,AssistantMessageRole:()=>i9,AttachmentListRequestEntityType:()=>SC,AutomationRuleEvaluatorAction:()=>o9,AutomationRuleEvaluatorObjectObjectPublicAction:()=>a9,AutomationRuleEvaluatorPublicAction:()=>n9,AutomationRuleEvaluatorUpdateAction:()=>s9,AutomationRuleEvaluatorWriteAction:()=>p9,BadGatewayError:()=>Xi,BadRequestError:()=>B,BreakdownConfigPublicField:()=>c9,BridgeCommandItemType:()=>l9,BridgeCommandResultRequestStatus:()=>sD,BridgeCommandStatus:()=>m9,BridgeCommandSubmitRequestType:()=>cD,BridgeCommandType:()=>d9,CheckName:()=>u9,CheckPublicName:()=>g9,CheckPublicResult:()=>f9,CheckResult:()=>h9,ColumnCompareTypesItem:()=>y9,ColumnPublicTypesItem:()=>b9,ColumnTypesItem:()=>R9,CompleteMultipartUploadRequestEntityType:()=>x9,ConflictError:()=>K,CreatePromptVersionDetailTemplateStructure:()=>KI,CreateSessionRequestType:()=>EI,DashboardPublicScope:()=>w9,DashboardPublicType:()=>_9,DashboardUpdatePublicType:()=>k9,DashboardWriteType:()=>A9,DatasetExportJobPublicStatus:()=>P9,DatasetItemCompareSource:()=>z9,DatasetItemFilterOperator:()=>S9,DatasetItemPublicSource:()=>T9,DatasetItemSource:()=>v9,DatasetItemWriteSource:()=>Wu,DatasetPublicStatus:()=>j9,DatasetPublicType:()=>Lu,DatasetPublicVisibility:()=>E9,DatasetStatus:()=>C9,DatasetType:()=>I9,DatasetUpdateVisibility:()=>GC,DatasetVisibility:()=>D9,DatasetWriteType:()=>Hs,DatasetWriteVisibility:()=>KC,DeleteAttachmentsRequestEntityType:()=>U9,DownloadAttachmentRequestEntityType:()=>vC,EvaluatorItemCompareType:()=>N9,EvaluatorItemPublicType:()=>Vu,EvaluatorItemType:()=>B9,EvaluatorItemWriteType:()=>Hu,ExperimentEvaluationMethod:()=>F9,ExperimentItemCompareStatus:()=>M9,ExperimentItemCompareTraceVisibilityMode:()=>W9,ExperimentItemPublicTraceVisibilityMode:()=>L9,ExperimentItemStatus:()=>V9,ExperimentItemTraceVisibilityMode:()=>J9,ExperimentPublicEvaluationMethod:()=>H9,ExperimentPublicStatus:()=>G9,ExperimentPublicType:()=>O9,ExperimentRunSummaryCompareStatus:()=>K9,ExperimentRunSummaryPublicStatus:()=>$9,ExperimentRunSummaryStatus:()=>Q9,ExperimentStatus:()=>Y9,ExperimentType:()=>Ou,ExperimentUpdateStatus:()=>X9,ExperimentUpdateType:()=>Z9,ExperimentWriteEvaluationMethod:()=>Os,ExperimentWriteStatus:()=>qC,ExperimentWriteType:()=>rI,FeedbackScoreBatchItemSource:()=>Ku,FeedbackScoreBatchItemThreadSource:()=>q9,FeedbackScoreCompareSource:()=>e5,FeedbackScoreExperimentItemBulkWriteViewSource:()=>r5,FeedbackScorePublicSource:()=>t5,FeedbackScoreSource:()=>i5,FindFeedbackDefinitionsRequestType:()=>aI,FindFeedbackScoreNames1RequestType:()=>RD,ForbiddenError:()=>ye,GetSpanStatsRequestType:()=>wD,GetSpansByProjectRequestType:()=>kD,GetWebhookExamplesRequestAlertType:()=>yC,GoneError:()=>rt,GuardrailName:()=>o5,GuardrailResult:()=>a5,GuardrailWriteName:()=>n5,GuardrailWriteResult:()=>s5,InternalServerError:()=>Zi,KpiCardRequestEntityType:()=>UI,KpiMetricType:()=>p5,ListRunnersRequestStatus:()=>mD,LlmAsJudgeMessagePublicRole:()=>c5,LlmAsJudgeMessageRole:()=>l5,LlmAsJudgeMessageWriteRole:()=>m5,LlmAsJudgeOutputSchemaPublicType:()=>d5,LlmAsJudgeOutputSchemaType:()=>u5,LlmAsJudgeOutputSchemaWriteType:()=>g5,LocalRunnerJobResultRequestStatus:()=>uD,LocalRunnerJobStatus:()=>f5,LocalRunnerStatus:()=>h5,LocalRunnerType:()=>y5,LogItemLevel:()=>b5,ManualEvaluationRequestEntityType:()=>R5,NotFoundError:()=>U,NotImplementedError:()=>nr,OptimizationPublicStatus:()=>x5,OptimizationStatus:()=>w5,OptimizationUpdateStatus:()=>SI,OptimizationWriteStatus:()=>_5,ParamPresence:()=>Lt,ProjectDetailedVisibility:()=>k5,ProjectMetricRequestPublicInterval:()=>BI,ProjectMetricRequestPublicMetricType:()=>MI,ProjectMetricResponsePublicInterval:()=>A5,ProjectMetricResponsePublicMetricType:()=>P5,ProjectPublicVisibility:()=>z5,ProjectUpdateVisibility:()=>LI,ProjectVisibility:()=>S5,ProjectWriteVisibility:()=>JI,PromptDetailTemplateStructure:()=>T5,PromptPublicTemplateStructure:()=>v5,PromptTemplateStructure:()=>j5,PromptType:()=>E5,PromptVersionDetailTemplateStructure:()=>C5,PromptVersionDetailType:()=>I5,PromptVersionPublicTemplateStructure:()=>D5,PromptVersionPublicType:()=>U5,PromptVersionTemplateStructure:()=>N5,PromptVersionType:()=>B5,PromptWriteTemplateStructure:()=>QI,PromptWriteType:()=>XI,ProviderApiKeyProvider:()=>F5,ProviderApiKeyPublicProvider:()=>M5,ProviderApiKeyWriteProvider:()=>fI,ResponseFormatType:()=>W5,RetentionRulePublicLevel:()=>L5,RetentionRulePublicRetention:()=>V5,RetentionRuleWriteRetention:()=>iD,ServiceUnavailableError:()=>Wt,SpanExperimentItemBulkWriteViewSource:()=>J5,SpanExperimentItemBulkWriteViewType:()=>H5,SpanFilterOperator:()=>G5,SpanFilterPublicOperator:()=>O5,SpanFilterWriteOperator:()=>K5,SpanPublicSource:()=>$5,SpanPublicType:()=>Q5,SpanSearchStreamRequestPublicExcludeItem:()=>PD,SpanSearchStreamRequestPublicType:()=>SD,SpanSource:()=>Y5,SpanType:()=>yr,SpanUpdateSource:()=>X5,SpanUpdateType:()=>Z5,SpanWriteSource:()=>q5,SpanWriteType:()=>e3,StartMultipartUploadRequestEntityType:()=>EC,TooManyRequestsError:()=>sr,ToolCallType:()=>r3,ToolType:()=>t3,TraceExperimentItemBulkWriteViewSource:()=>i3,TraceFilterOperator:()=>o3,TraceFilterPublicOperator:()=>a3,TraceFilterWriteOperator:()=>n3,TracePublicSource:()=>s3,TracePublicVisibilityMode:()=>p3,TraceSearchStreamRequestPublicExcludeItem:()=>ID,TraceSource:()=>c3,TraceThreadFilterOperator:()=>l3,TraceThreadFilterPublicOperator:()=>m3,TraceThreadFilterWriteOperator:()=>d3,TraceThreadStatus:()=>u3,TraceUpdateSource:()=>g3,TraceVisibilityMode:()=>f3,TraceWriteSource:()=>h3,UnauthorizedError:()=>$,UnprocessableEntityError:()=>ce,UploadAttachmentRequestEntityType:()=>IC,ValueEntryCompareSource:()=>y3,ValueEntryExperimentItemBulkWriteViewSource:()=>b3,ValueEntryPublicSource:()=>R3,ValueEntrySource:()=>x3,WebhookTestResultStatus:()=>w3,WorkspaceVersionOpikVersion:()=>_3,agentConfigs:()=>Id,alerts:()=>Ls,annotationQueues:()=>Bd,assertionResults:()=>Vs,attachments:()=>Js,automationRuleEvaluators:()=>Jd,chatCompletions:()=>Gd,check:()=>Od,dashboards:()=>$d,datasets:()=>Gs,environments:()=>qd,experiments:()=>Ks,feedbackDefinitions:()=>$s,guardrails:()=>nu,insightsViews:()=>pu,llmModels:()=>cu,llmProviderKey:()=>Qs,manualEvaluation:()=>du,ollama:()=>uu,ollieState:()=>gu,openTelemetryIngestion:()=>fu,optimizations:()=>Ys,pairing:()=>Xs,projects:()=>Zs,prompts:()=>qs,redirect:()=>Pu,retentionRules:()=>ep,runners:()=>rp,serviceToggles:()=>ju,spans:()=>tp,systemUsage:()=>Iu,traces:()=>ip,welcomeWizard:()=>Bu,workspacePermissions:()=>Fu,workspaces:()=>Mu});var ie=n(()=>{uC();VD();Xu();});function z(...p){let i={};for(let[e,t]of p.filter(o=>o!=null).flatMap(o=>Object.entries(o))){let o=e.toLowerCase();t!=null?i[o]=t:o in i&&delete i[o];}return i}function v(...p){let i={};for(let[e,t]of p.filter(o=>o!=null).flatMap(o=>Object.entries(o))){let o=e.toLowerCase();t!=null&&(i[o]=t);}return i}var Q=n(()=>{});var Zu,qu=n(()=>{Zu={get:async(p,i)=>typeof p=="function"?p(i):p};});function eg(p){return p==null?k3:p instanceof Vt?p:(p=p!=null?p:{},(p.level)!=null||(p.level=Fe.Info),(p.logger)!=null||(p.logger=new tt),(p.silent)!=null||(p.silent=true),new Vt(p))}var Fe,A1,tt,Vt,k3,op=n(()=>{Fe={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},A1={[Fe.Debug]:1,[Fe.Info]:2,[Fe.Warn]:3,[Fe.Error]:4},tt=class{debug(i,...e){console.debug(i,...e);}info(i,...e){console.info(i,...e);}warn(i,...e){console.warn(i,...e);}error(i,...e){console.error(i,...e);}},Vt=class{constructor(i){this.level=A1[i.level],this.logger=i.logger,this.silent=i.silent;}shouldLog(i){return !this.silent&&this.level<=A1[i]}isDebug(){return this.shouldLog(Fe.Debug)}debug(i,...e){this.isDebug()&&this.logger.debug(i,...e);}isInfo(){return this.shouldLog(Fe.Info)}info(i,...e){this.isInfo()&&this.logger.info(i,...e);}isWarn(){return this.shouldLog(Fe.Warn)}warn(i,...e){this.isWarn()&&this.logger.warn(i,...e);}isError(){return this.shouldLog(Fe.Error)}error(i,...e){this.isError()&&this.logger.error(i,...e);}};k3=new Vt({level:Fe.Info,logger:new tt,silent:true});});function P1(p,i){if(p===void 0||p===null)return "";let e=String(p);return i?encodeURIComponent(e):e}function rg(p,i="",e){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=e.arrayFormat==="indices"?`${s}[${c}]`:s;t.push(...rg(l,m,e));}else {let m=e.arrayFormat==="indices"?`${s}[${c}]`:s,u=e.encode?encodeURIComponent(m):m;t.push(`${u}=${P1(l,e.encode)}`);}}}else if(typeof a=="object"&&a!==null){if(Object.keys(a).length===0)continue;t.push(...rg(a,s,e));}else {let c=e.encode?encodeURIComponent(s):s;t.push(`${c}=${P1(a,e.encode)}`);}}return t}function it(p,i){return p==null||typeof p!="object"?"":rg(p,"",{...P3,...i}).join("&")}var P3,eo=n(()=>{P3={arrayFormat:"indices",encode:true};});function z1(p,i){let e=it(i,{arrayFormat:"repeat"});return e?`${p}?${e}`:p}var S1=n(()=>{eo();});function T1(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 v1=n(()=>{});async function ap(p,i){switch(i){case "binary-response":return T1(p);case "blob":return await p.blob();case "arrayBuffer":return await p.arrayBuffer();case "sse":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "streaming":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "text":return await p.text()}let e=await p.text();if(e.length>0)try{return Yi(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:p.status,rawBody:e}}}}var tg=n(()=>{Dr();v1();});async function j1(p){var e,t,o;let i=(e=p.headers.get("Content-Type"))==null?void 0:e.toLowerCase();if(i==null||i.length===0)return ap(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?Yi(a):void 0}default:if(i.startsWith("application/vnd.")&&i.endsWith("+json")){let a=await p.text();return a.length>0?Yi(a):void 0}return await p.text()}}var E1=n(()=>{Dr();tg();});async function C1(){return fetch}var I1=n(()=>{});async function D1({body:p,type:i}){return i==="form"?it(p,{arrayFormat:"repeat",encode:true}):i.includes("json")?Ge(p):p}var U1=n(()=>{Dr();eo();});var Nr,ig=n(()=>{typeof globalThis.Headers!="undefined"?Nr=globalThis.Headers:Nr=class N1{constructor(i){if(this.headers=new Map,i)if(i instanceof N1)i.forEach((e,t)=>this.append(t,e));else if(Array.isArray(i))for(let[e,t]of i)if(typeof e=="string"&&typeof t=="string")this.append(e,t);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,t]of Object.entries(i))if(typeof t=="string")this.append(e,t);else throw new TypeError("Header values must be strings")}append(i,e){let t=i.toLowerCase(),o=this.headers.get(t)||[];this.headers.set(t,[...o,e]);}delete(i){let e=i.toLowerCase();this.headers.delete(e);}get(i){let e=i.toLowerCase(),t=this.headers.get(e);return t?t.join(", "):null}has(i){let e=i.toLowerCase();return this.headers.has(e)}set(i,e){let t=i.toLowerCase();this.headers.set(t,[e]);}forEach(i,e){let t=e?i.bind(e):i;this.headers.forEach((o,a)=>t(o.join(", "),a,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[i,e]of this.headers.entries())yield [i,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let i of this.headers.values())yield i.join(", ");}[Symbol.iterator](){return this.entries()}};});function B1(p){let i=new AbortController,e=setTimeout(()=>i.abort(z3),p);return {signal:i.signal,abortId:e}}function F1(...p){let i=p.length===1&&Array.isArray(p[0])?p[0]:p,e=new AbortController;for(let t of i){if(t.aborted){e.abort(t==null?void 0:t.reason);break}t.addEventListener("abort",()=>e.abort(t==null?void 0:t.reason),{signal:e.signal});}return e.signal}var z3,M1=n(()=>{z3="timeout";});var W1,L1=n(()=>{M1();W1=async(p,i,e,t,o,a,s,c,l)=>{let m=[],u;if(a!=null){let{signal:g,abortId:h}=B1(a);u=h,m.push(g);}s!=null&&m.push(s);let d=F1(m),f=await p(i,{method:e,headers:t,body:o,signal:d,credentials:c?"include":void 0,duplex:l});return u!=null&&clearTimeout(u),f};});function pp(p){return {headers:p.headers,redirected:p.redirected,status:p.status,statusText:p.statusText,type:p.type,url:p.url}}var np,sp,og=n(()=>{ig();np={headers:new Nr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},sp={headers:new Nr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};});function S3(p){let i=1+Math.random()*.2;return p*i}function T3(p){let i=1+(Math.random()-.5)*.2;return p*i}function v3(p,i){let e=p.headers.get("Retry-After");if(e){let o=parseInt(e,10);if(!Number.isNaN(o)&&o>0)return Math.min(o*1e3,6e4);let a=new Date(e);if(!Number.isNaN(a.getTime())){let s=a.getTime()-Date.now();if(s>0)return Math.min(Math.max(s,0),6e4)}}let t=p.headers.get("X-RateLimit-Reset");if(t){let o=parseInt(t,10);if(!Number.isNaN(o)){let a=o*1e3-Date.now();if(a>0)return S3(Math.min(a,6e4))}}return T3(Math.min(1e3*2**i,6e4))}async function V1(p,i=2){let e=await p();for(let t=0;t<i&&([408,429].includes(e.status)||e.status>=500);++t){let o=v3(e,t);await new Promise(a=>setTimeout(a,o)),e=await p();}return e}var J1=n(()=>{});function ag(p){let i={};for(let[e,t]of p instanceof Nr?p.entries():Object.entries(p))j3.has(e.toLowerCase())?i[e]="[REDACTED]":i[e]=t;return i}function E3(p){if(p==null)return p;let i={};for(let[e,t]of Object.entries(p))ng.has(e.toLowerCase())?i[e]="[REDACTED]":i[e]=t;return i}function ot(p){let i=p.indexOf("://");if(i===-1)return p;let e=i+3,t=p.indexOf("/",e),o=p.indexOf("?",e),a=p.indexOf("#",e),s=Math.min(t===-1?p.length:t,o===-1?p.length:o,a===-1?p.length:a),c=-1;for(let h=e;h<s;h++)p[h]==="@"&&(c=h);if(c!==-1&&(p=`${p.slice(0,e)}[REDACTED]@${p.slice(c+1)}`),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=ng.has(w.toLowerCase());if(!A&&w.includes("%"))try{let C=decodeURIComponent(w);A=ng.has(C.toLowerCase());}catch{}f.push(A?`${w}=[REDACTED]`:h);}return p.slice(0,o+1)+f.join("&")+p.slice(l)}async function C3(p){var e;let i=new Nr;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 Zu.get(o,{endpointMetadata:(e=p.endpointMetadata)!=null?e:{}});if(typeof a=="string"){i.set(t,a);continue}a!=null&&i.set(t,`${a}`);}return i}async function I3(p){var s,c,l;let i=z1(p.url,p.queryParameters),e=await D1({body:p.body,type:(s=p.requestType)!=null?s:"other"}),t=(c=p.fetchFn)!=null?c:await C1(),o=await C3(p),a=eg(p.logging);if(a.isDebug()){let m={method:p.method,url:ot(i),headers:ag(o),queryParameters:E3(p.queryParameters),hasBody:e!=null};a.debug("Making HTTP request",m);}try{let m=await V1(async()=>W1(t,i,p.method,o,e,p.timeoutMs,p.abortSignal,p.withCredentials,p.duplex),p.maxRetries);if(m.status>=200&&m.status<400){if(a.isDebug()){let d={method:p.method,url:ot(i),statusCode:m.status,responseHeaders:ag(m.headers)};a.debug("HTTP request succeeded",d);}return {ok:!0,body:await ap(m,p.responseType),headers:m.headers,rawResponse:pp(m)}}else {if(a.isError()){let u={method:p.method,url:ot(i),statusCode:m.status,responseHeaders:ag(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 j1(m)},rawResponse:pp(m)}}}catch(m){if((l=p.abortSignal)!=null&&l.aborted){if(a.isError()){let u={method:p.method,url:ot(i)};a.error("HTTP request was aborted",u);}return {ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:np}}else if(m instanceof Error&&m.name==="AbortError"){if(a.isError()){let u={method:p.method,url:ot(i),timeoutMs:p.timeoutMs};a.error("HTTP request timed out",u);}return {ok:false,error:{reason:"timeout"},rawResponse:np}}else if(m instanceof Error){if(a.isError()){let u={method:p.method,url:ot(i),errorMessage:m.message};a.error("HTTP request failed with error",u);}return {ok:false,error:{reason:"unknown",errorMessage:m.message},rawResponse:sp}}if(a.isError()){let u={method:p.method,url:ot(i),error:Ge(m)};a.error("HTTP request failed with unknown error",u);}return {ok:false,error:{reason:"unknown",errorMessage:Ge(m)},rawResponse:sp}}}var j3,ng,S,H1=n(()=>{Dr();op();S1();qu();E1();I1();U1();tg();ig();L1();og();J1();j3=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"]);ng=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=I3;});var G1=n(()=>{});var P,O1=n(()=>{P=class p extends Promise{constructor(i){super(e=>{e(void 0);}),this.innerPromise=i;}static fromFunction(i,...e){return new p(i(...e))}static interceptFunction(i){return (...e)=>p.fromPromise(i(...e))}static fromPromise(i){return new p(i)}static fromExecutor(i){let e=new Promise(i);return new p(e)}static fromResult(i){let e=Promise.resolve(i);return new p(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:i})=>i)),this.unwrappedPromise}then(i,e){return this.unwrap().then(i,e)}catch(i){return this.unwrap().catch(i)}finally(i){return this.unwrap().finally(i)}async withRawResponse(){return await this.innerPromise}};});var x,K1=n(()=>{x={get:async p=>typeof p=="function"?p():p};});var $1=n(()=>{qu();H1();G1();O1();og();K1();});async function D3(p){let{data:i,filename:e,contentLength:t,contentType:o}=await pg(p),a={body:i,headers:{}};return e&&(a.headers["Content-Disposition"]=`attachment; filename="${e}"`),o&&(a.headers["Content-Type"]=o),t!=null&&(a.headers["Content-Length"]=t.toString()),a}async function sg(p){let{data:i,filename:e,contentType:t}=await pg(p,{noSniffFileSize:true});return {data:i,filename:e,contentType:t}}async function pg(p,{noSniffFileSize:i}={}){var e,t,o,a,s;if(U3(p))return pg({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=(e=p.contentLength)!=null?e:i===true?void 0:await Q1(p.path),u=(t=p.filename)!=null?t:Y1(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 B3(c,{noSniffFileSize:i}),m=(a=p.filename)!=null?a:N3(c);return {data:c,filename:m,contentType:(s=p.contentType)!=null?s:F3(c),contentLength:l}}throw new Error(`Invalid FileUpload of type ${typeof p}: ${JSON.stringify(p)}`)}function U3(p){return Z1(p)||q1(p)||eH(p)||V3(p)||cg(p)||lg(p)||W3(p)||L3(p)}async function Q1(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 N3(p){if(M3(p))return p.name;if(X1(p))return Y1(p.path.toString())}async function B3(p,{noSniffFileSize:i}={}){if(Z1(p))return p.length;if(q1(p)||eH(p))return p.byteLength;if(cg(p)||lg(p))return p.size;if(i!==true&&X1(p))return await Q1(p.path.toString())}function F3(p){if(cg(p)||lg(p))return p.type}function Y1(p){let i=p.lastIndexOf("/"),e=p.lastIndexOf("\\"),t=Math.max(i,e);return t>=0?p.substring(t+1):p}function M3(p){return typeof p=="object"&&p!=null&&"name"in p}function X1(p){return typeof p=="object"&&p!=null&&"path"in p}function W3(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function L3(p){return typeof p=="object"&&p!=null&&"getReader"in p}function Z1(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function q1(p){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(p)}function eH(p){return typeof ArrayBuffer!="undefined"&&p instanceof ArrayBuffer}function V3(p){return typeof Uint8Array!="undefined"&&p instanceof Uint8Array}function cg(p){return typeof Blob!="undefined"&&p instanceof Blob}function lg(p){return typeof File!="undefined"&&p instanceof File}var rH=n(()=>{});var tH=n(()=>{});var ro={};V(ro,{toBinaryUploadRequest:()=>D3,toMultipartDataPart:()=>sg});var mg=n(()=>{rH();tH();});var iH=n(()=>{eo();});function J3(){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 Jt,oH=n(()=>{Jt=J3();});var dg=n(()=>{oH();});async function aH(){return new ug}function H3(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function nH(p){return typeof p=="object"&&p!=null&&"getReader"in p}function G3(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function O3(p){return ArrayBuffer.isView(p)}async function K3(p){if(Jt.type==="node"){let{Readable:i}=await import('stream');if(p instanceof i){let e=[];for await(let t of p)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e)}}if(nH(p)){let i=p.getReader(),e=[];try{for(;;){let{done:s,value:c}=await i.read();if(s)break;e.push(c);}}finally{i.releaseLock();}let t=e.reduce((s,c)=>s+c.length,0),o=new Uint8Array(t),a=0;for(let s of e)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 $3(p,i){if(H3(p)||nH(p)){let e=await K3(p);return new Blob([e],{type:i})}return p instanceof Blob?p:G3(p)?new Blob([p],{type:i}):p instanceof ArrayBuffer?new Blob([p],{type:i}):O3(p)?new Blob([p],{type:i}):typeof p=="string"?new Blob([p],{type:i}):typeof p=="object"&&p!==null?new Blob([Ge(p)],{type:i!=null?i:"application/json"}):new Blob([String(p)],{type:i})}var ug,sH=n(()=>{mg();Dr();dg();ug=class{constructor(){this.fd=new FormData;}async setup(){}append(i,e){this.fd.append(i,String(e));}async appendFile(i,e){let{data:t,filename:o,contentType:a}=await sg(e),s=await $3(t,a);o?this.fd.append(i,s,o):this.fd.append(i,s);}getRequest(){return {body:this.fd,headers:{},duplex:"half"}}};});var pH=n(()=>{iH();sH();});var to={};V(to,{ConsoleLogger:()=>tt,LogLevel:()=>Fe,Logger:()=>Vt,createLogger:()=>eg});var cH=n(()=>{op();});var G,he=n(()=>{G={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 oe(p,i){return `Expected ${i}. Received ${Q3(p)}.`}function Q3(p){if(Array.isArray(p))return "list";if(p===null)return "null";if(p instanceof BigInt)return "BigInt";switch(typeof p){case "string":return `"${p}"`;case "bigint":case "number":case "boolean":case "undefined":return `${p}`}return typeof p}var ze=n(()=>{});function be(p){return {...p,json:lH(p.json),parse:lH(p.parse)}}function lH(p){return (i,e)=>{let t=p(i,e),{skipValidation:o=false}=e!=null?e:{};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 pr=n(()=>{});function cp(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var gg=n(()=>{});var Ht,fg=n(()=>{gg();Ht=class p extends Error{constructor(e){super(e.map(cp).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var Gt,hg=n(()=>{gg();Gt=class p extends Error{constructor(e){super(e.map(cp).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ne(p){return {nullable:()=>Y3(p),optional:()=>yg(p),optionalNullable:()=>X3(p),transform:i=>bg(p,i),parseOrThrow:(i,e)=>{let t=p.parse(i,e);if(t.ok)return t.value;throw new Gt(t.errors)},jsonOrThrow:(i,e)=>{let t=p.json(i,e);if(t.ok)return t.value;throw new Ht(t.errors)}}}function Y3(p){let i={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>G.NULLABLE};return {...i,...ne(i)}}function yg(p){let i={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>G.OPTIONAL};return {...i,...ne(i)}}function X3(p){let i={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>G.OPTIONAL_NULLABLE};return {...i,...ne(i)}}function bg(p,i){let e={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 {...e,...ne(e)}}var mH=n(()=>{he();fg();hg();});var Ie=n(()=>{mH();fg();hg();});function dH(){let p={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i=="bigint"?{ok:true,value:i}:typeof i=="number"?{ok:true,value:BigInt(i)}:{ok:false,errors:[{path:e,message:oe(i,"bigint | number")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="bigint"?{ok:false,errors:[{path:e,message:oe(i,"bigint")}]}:{ok:true,value:i},getType:()=>G.BIGINT};return {...be(p),...ne(p)}}var uH=n(()=>{he();ze();pr();Ie();});var gH=n(()=>{uH();});function fH(){let p={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="string"?{ok:false,errors:[{path:e,message:oe(i,"string")}]}:Z3.test(i)?{ok:true,value:new Date(i)}:{ok:false,errors:[{path:e,message:oe(i,"ISO 8601 date string")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>i instanceof Date?{ok:true,value:i.toISOString()}:{ok:false,errors:[{path:e,message:oe(i,"Date object")}]},getType:()=>G.DATE};return {...be(p),...ne(p)}}var Z3,hH=n(()=>{he();ze();pr();Ie();Z3=/^([+-]?\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 yH=n(()=>{hH();});function Re(p,i){return ()=>{let e={parse:i,json:i,getType:()=>p};return {...be(e),...ne(e)}}}var cr=n(()=>{Ie();pr();});function lp(p){let i=new Set(p);return Re(G.ENUM,(t,{allowUnrecognizedEnumValues:o,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:oe(t,"string")}]}:!i.has(t)&&!o?{ok:false,errors:[{path:a,message:oe(t,"enum")}]}:{ok:true,value:t})()}var bH=n(()=>{he();cr();ze();});var Rg=n(()=>{bH();});function RH(p){let i=xg(p);return {...i,...ne(i)}}function xg(p){return {parse:(i,e)=>Ot(p).parse(i,e),json:(i,e)=>Ot(p).json(i,e),getType:()=>Ot(p).getType()}}function Ot(p){let i=p;return i.__zurg_memoized==null&&(i.__zurg_memoized=p()),i.__zurg_memoized}var wg=n(()=>{Ie();});function io(p){return Object.entries(p)}var _g=n(()=>{});function oo(p,i){let e=new Set(i);return Object.entries(p).reduce((t,[o,a])=>(e.has(o)&&(t[o]=a),t),{})}var kg=n(()=>{});function br(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 ao=n(()=>{});function no(p){return Object.keys(p)}var Ag=n(()=>{});function xH(p,i){let e=[],t=[];for(let o of p)i(o)?e.push(o):t.push(o);return [e,t]}var wH=n(()=>{});function Oe(p){return {withParsedProperties:i=>Pg(p,i)}}function Pg(p,i){let e={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(!br(t))return {ok:false,errors:[{path:(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],message:oe(t,"object")}]};let a=new Set(Object.keys(i)),s=oo(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,o)},getType:()=>p.getType()};return {...e,...ne(e),...Oe(e)}}var _H=n(()=>{kg();ze();ao();Ie();});var so=n(()=>{_H();});function kH(p,i){return {rawKey:p,valueSchema:i,isProperty:true}}function Br(p){return p.isProperty}var zg=n(()=>{});function mp(p){let i={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Br(t)?t.rawKey:e),_getParsedProperties:()=>no(p),parse:(e,t)=>{let o={},a=[];for(let[s,c]of io(p)){let l=Br(c)?c.rawKey:s,m=Br(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};o[l]=u,zH(m)&&a.push(l);}return AH({value:e,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:(e,t)=>{let o=[];for(let[a,s]of io(p)){let c=Br(s)?s.valueSchema:s;zH(c)&&o.push(a);}return AH({value:e,requiredKeys:o,getProperty:a=>{let s=p[a];if(s!=null)return Br(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:()=>G.OBJECT};return {...be(i),...ne(i),...Oe(i),...at(i)}}function AH({value:p,requiredKeys:i,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:o=false,breadcrumbsPrefix:a=[]}){if(!br(p))return {ok:false,errors:[{path:a,message:oe(p,"object")}]};let s=new Set(i),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...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 at(p){return {extend:i=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...i._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...i._getRawProperties()],parse:(t,o)=>PH({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)=>PH({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:()=>G.OBJECT};return {...e,...ne(e),...Oe(e),...at(e)}},passthrough:()=>{let i=new Set(p._getRawProperties()),e=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))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>G.OBJECT};return {...t,...ne(t),...Oe(t),...at(t)}}}}function PH({extensionKeys:p,value:i,transformBase:e,transformExtension:t,breadcrumbsPrefix:o=[]}){if(!br(i))return {ok:false,errors:[{path:o,message:oe(i,"object")}]};let a=new Set(p),[s,c]=xH(no(i),u=>a.has(u)),l=e(oo(i,c)),m=t(oo(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 zH(p){return !q3(p)}function q3(p){switch(p.getType()){case G.ANY:case G.UNKNOWN:case G.OPTIONAL:case G.OPTIONAL_NULLABLE:return true;default:return false}}var Sg=n(()=>{he();_g();kg();ze();ao();Ag();pr();wH();so();Ie();zg();});function SH(p){return mp(p)}var TH=n(()=>{Sg();});var Tg=n(()=>{Sg();TH();zg();});function vH(p){let i={...xg(p),_getRawProperties:()=>Ot(p)._getRawProperties(),_getParsedProperties:()=>Ot(p)._getParsedProperties()};return {...i,...ne(i),...Oe(i),...at(i)}}var jH=n(()=>{Tg();so();Ie();wg();});var EH=n(()=>{wg();jH();});function dp(p){let i={parse:(e,t)=>CH(e,(o,a)=>{var s;return p.parse(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>CH(e,(o,a)=>{var s;return p.json(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>G.LIST};return {...be(i),...ne(i)}}function CH(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:oe(p,"list"),path:[]}]}}var IH=n(()=>{he();ze();pr();Ie();});var vg=n(()=>{IH();});function DH(p){return Re(G.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:oe(e,`${p.toString()}`)}]})()}var UH=n(()=>{he();cr();ze();});function NH(p){return Re(G.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:oe(e,`"${p}"`)}]})()}var BH=n(()=>{he();cr();ze();});var FH=n(()=>{UH();BH();});var MH,WH=n(()=>{he();cr();MH=Re(G.ANY,p=>({ok:true,value:p}));});var LH,VH=n(()=>{he();cr();ze();LH=Re(G.BOOLEAN,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"boolean")}]});});var JH,HH=n(()=>{he();cr();JH=Re(G.NEVER,(p,{breadcrumbsPrefix:i=[]}={})=>({ok:false,errors:[{path:i,message:"Expected never"}]}));});var GH,OH=n(()=>{he();cr();ze();GH=Re(G.NUMBER,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"number")}]});});var KH,$H=n(()=>{he();cr();ze();KH=Re(G.STRING,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"string")}]});});var QH,YH=n(()=>{he();cr();QH=Re(G.UNKNOWN,p=>({ok:true,value:p}));});var XH=n(()=>{WH();VH();HH();OH();$H();YH();});function qH(p,i){let e={parse:(t,o)=>ZH({value:t,isKeyNumeric:p.getType()===G.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)=>ZH({value:t,isKeyNumeric:p.getType()===G.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:()=>G.RECORD};return {...be(e),...ne(e)}}function ZH({value:p,isKeyNumeric:i,transformKey:e,transformValue:t,breadcrumbsPrefix:o=[]}){return br(p)?io(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=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:o,message:oe(p,"object")}]}}var eG=n(()=>{he();_g();ze();ao();pr();Ie();});var rG=n(()=>{eG();});function tG(p){let i=dp(p),e={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:oe(t,"Set")}]}},getType:()=>G.SET};return {...be(e),...ne(e)}}var iG=n(()=>{he();ze();pr();vg();Ie();});var oG=n(()=>{iG();});function nG(p){let i={parse:(e,t)=>aG((o,a)=>o.parse(e,a),p,t),json:(e,t)=>aG((o,a)=>o.json(e,a),p,t),getType:()=>G.UNDISCRIMINATED_UNION};return {...be(i),...ne(i)}}function aG(p,i,e){let t=[];for(let[o,a]of i.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${o}] ${c.message}`});}return {ok:false,errors:t}}var sG=n(()=>{he();pr();Ie();});var pG=n(()=>{sG();});function cG(p,i){return {parsedDiscriminant:p,rawDiscriminant:i}}var lG=n(()=>{});function dG(p,i){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,o=lp(no(i)),a={parse:(s,c)=>mG({value:s,discriminant:e,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:[],e]})},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)=>mG({value:s,discriminant:t,transformedDiscriminant:e,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:()=>G.UNION};return {...be(a),...ne(a),...Oe(a)}}function mG({value:p,discriminant:i,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:o,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!br(p))return {ok:false,errors:[{path:c,message:oe(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:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,i],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var uG=n(()=>{he();ze();ao();Ag();pr();Rg();so();Ie();});var gG=n(()=>{lG();uG();});var fG=n(()=>{gH();yH();Rg();EH();vg();FH();Tg();so();XH();rG();Ie();oG();pG();gG();});var r={};V(r,{JsonError:()=>Ht,ParseError:()=>Gt,any:()=>MH,bigint:()=>dH,boolean:()=>LH,booleanLiteral:()=>DH,date:()=>fH,discriminant:()=>cG,enum_:()=>lp,getObjectLikeUtils:()=>Oe,getObjectUtils:()=>at,getSchemaUtils:()=>ne,isProperty:()=>Br,lazy:()=>RH,lazyObject:()=>vH,list:()=>dp,never:()=>JH,number:()=>GH,object:()=>mp,objectWithoutOptionalProperties:()=>SH,optional:()=>yg,property:()=>kH,record:()=>qH,set:()=>tG,string:()=>KH,stringLiteral:()=>NH,transform:()=>bg,undiscriminatedUnion:()=>nG,union:()=>dG,unknown:()=>QH,withParsedProperties:()=>Pg});var hG=n(()=>{fG();});function yG(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 bG=n(()=>{});function xG(p,...i){if(!p)return "";if(i.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return RG(p,...i)}let t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=_G(a);s&&(e.pathname=wG(e.pathname,s));}return o&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return RG(p,...i)}function RG(p,...i){if(i.length===0)return p;let e=p,t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=_G(a);s&&(e=wG(e,s));}return o&&!e.endsWith("/")&&(e+="/"),e}function wG(p,i){return p.endsWith("/")?p+i:`${p}/${i}`}function _G(p){if(!p)return p;let i=0,e=p.length;return p.startsWith("/")&&(i=1),p.endsWith("/")&&(e=p.length-1),i===0&&e===p.length?p:p.slice(i,e)}var kG=n(()=>{});var _={};V(_,{encodePathParam:()=>yG,join:()=>xG,toQueryString:()=>it});var AG=n(()=>{bG();kG();eo();});var b=n(()=>{$1();mg();pH();cH();dg();hG();AG();});function M(p){let i=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":Jt.type,"X-Fern-Runtime-Version":Jt.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:to.createLogger(p==null?void 0:p.logging),headers:i}}var X=n(()=>{Q();b();});var T,Y=n(()=>{T={Default:"http://localhost:5173/api"};});function j(p,i,e,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 Ur(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:i});default:throw new k({message:"Unknown error",rawResponse:i})}}var Z=n(()=>{J();});var po,PG=n(()=>{b();po=r.object({blueprintName:r.property("blueprint_name",r.string())});});var jg,Eg=n(()=>{b();jg=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),envName:r.property("env_name",r.string()),blueprintId:r.property("blueprint_id",r.string()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),endedAt:r.property("ended_at",r.date().optional())});});var co,zG=n(()=>{b();Eg();co=r.object({projectId:r.property("project_id",r.string()),envs:r.list(jg)});});var lo,SG=n(()=>{b();lo=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var Cg=n(()=>{PG();zG();SG();});var TG=n(()=>{Cg();});var up={};V(up,{AgentConfigEnvSetByName:()=>po,AgentConfigEnvUpdate:()=>co,AgentConfigRemoveValues:()=>lo});var vG=n(()=>{TG();});var gp,jG=n(()=>{b();gp=r.enum_(["general","slack","pagerduty"]);});var Ig=n(()=>{jG();});var fp={};V(fp,{GetWebhookExamplesRequestAlertType:()=>gp});var EG=n(()=>{Ig();});var Dg,Ug=n(()=>{b();Dg=r.enum_(["trace","thread"]);});var mo,Ng=n(()=>{b();Ug();mo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:Dg,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});});var uo,CG=n(()=>{b();Ng();uo=r.object({annotationQueues:r.property("annotation_queues",r.list(mo))});});var go,IG=n(()=>{b();go=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});});var Bg=n(()=>{CG();IG();});var DG=n(()=>{Bg();});var hp={};V(hp,{AnnotationQueueBatchWrite:()=>uo,AnnotationQueueUpdate:()=>go});var UG=n(()=>{DG();});var Fg,Mg=n(()=>{b();Fg=r.enum_(["ui","sdk","online_scoring"]);});var Wg,Lg=n(()=>{b();Wg=r.enum_(["passed","failed"]);});var Vg,Jg=n(()=>{b();Mg();Lg();Vg=r.object({entityId:r.property("entity_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),status:Wg,reason:r.string().optional(),source:Fg});});var yp,Hg=n(()=>{b();yp=r.enum_(["TRACE","SPAN","THREAD"]);});var fo,NG=n(()=>{b();Jg();Hg();fo=r.object({entityType:r.property("entity_type",yp),assertionResults:r.property("assertion_results",r.list(Vg))});});var Gg=n(()=>{NG();});var BG=n(()=>{Gg();});var Og=n(()=>{Hg();});var bp={};V(bp,{AssertionResultBatch:()=>fo,AssertionResultBatchEntityType:()=>yp});var FG=n(()=>{BG();Og();});var Rp,Kg=n(()=>{b();Rp=r.enum_(["trace","span"]);});var ho,MG=n(()=>{b();Kg();ho=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Rp),entityId:r.property("entity_id",r.string()),path:r.string()});});var $g=n(()=>{MG();});var xp={};V(xp,{Request:()=>e8});var e8,WG=n(()=>{b();e8=r.record(r.string(),r.unknown());});var LG=n(()=>{$g();WG();});var wp,VG=n(()=>{b();wp=r.enum_(["trace","span"]);});var _p,JG=n(()=>{b();_p=r.enum_(["trace","span"]);});var kp,HG=n(()=>{b();kp=r.enum_(["trace","span"]);});var Qg=n(()=>{VG();JG();Kg();HG();});var Kt={};V(Kt,{AttachmentListRequestEntityType:()=>wp,DownloadAttachmentRequestEntityType:()=>_p,StartMultipartUploadRequest:()=>ho,StartMultipartUploadRequestEntityType:()=>Rp,UploadAttachmentRequestEntityType:()=>kp,uploadAttachment:()=>xp});var GG=n(()=>{LG();Qg();});var yo,Ap=n(()=>{b();yo=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var Rr,$t=n(()=>{b();Rr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var L,de=n(()=>{b();L=r.record(r.string(),r.unknown());});var bo,Pp=n(()=>{b();de();bo=r.object({role:r.string(),content:L});});var Yg,Xg=n(()=>{b();Yg=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var Zg,qg=n(()=>{b();Zg=r.enum_(["text","json_object","json_schema"]);});var ef,rf=n(()=>{b();Xg();qg();ef=r.object({type:Zg.optional(),jsonSchema:r.property("json_schema",Yg.optional())});});var tf,of=n(()=>{b();tf=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});});var af,nf=n(()=>{b();af=r.enum_(["function"]);});var sf,pf=n(()=>{b();Ap();nf();sf=r.object({type:af.optional(),function:yo.optional()});});var Ro,OG=n(()=>{b();Ap();$t();Pp();rf();of();pf();Ro=r.object({model:r.string().optional(),messages:r.list(bo).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",tf.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",ef.optional()),seed:r.number().optional(),tools:r.list(sf).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),logprobs:r.boolean().optional(),topLogprobs:r.property("top_logprobs",r.number().optional()),functions:r.list(yo).optional(),functionCall:r.property("function_call",Rr.optional())});});var cf=n(()=>{OG();});var KG=n(()=>{cf();});var zp={};V(zp,{ChatCompletionRequest:()=>Ro});var $G=n(()=>{KG();});var lf,mf=n(()=>{b();lf=r.enum_(["llm_judge","code_metric"]);});var xr,Qt=n(()=>{b();mf();de();xr=r.object({name:r.string(),type:lf,config:L});});var Ke,nt=n(()=>{b();Ke=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var df,uf=n(()=>{b();df=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var xo,QG=n(()=>{b();Qt();nt();uf();xo=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",df),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional())});});var gf,ff=n(()=>{b();gf=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var wo,YG=n(()=>{b();Qt();nt();ff();wo=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",gf),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional())});});var _o,XG=n(()=>{b();_o=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var ko,ZG=n(()=>{b();ko=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Ao,qG=n(()=>{b();Ao=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var hf,yf=n(()=>{b();hf=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Po,Sp=n(()=>{b();yf();Po=r.object({field:r.string().optional(),operator:hf.optional(),key:r.string().optional(),value:r.string().optional()});});var bf,Rf=n(()=>{b();Qt();nt();de();bf=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:L.optional(),data:L.optional(),description:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var zo,eO=n(()=>{b();Sp();Rf();zo=r.object({ids:r.list(r.string()).optional(),filters:r.list(Po).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:bf,mergeTags:r.property("merge_tags",r.boolean().optional())});});var xf,wf=n(()=>{b();xf=r.enum_(["manual","trace","span","sdk"]);});var _f,kf=n(()=>{b();_f=r.enum_(["llm_judge","code_metric"]);});var Se,wr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Af,Pf=n(()=>{b();kf();wr();Af=r.object({name:r.string(),type:_f,config:Se});});var zf,Sf=n(()=>{b();zf=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var So,Tf=n(()=>{b();wf();Pf();Sf();de();So=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:xf,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Af).optional(),executionPolicy:r.property("execution_policy",zf.optional())});});var To,rO=n(()=>{b();Tf();To=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(So),batchGroupId:r.property("batch_group_id",r.string().optional())});});var vo,tO=n(()=>{b();vo=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional()),datasetVersion:r.property("dataset_version",r.string().optional()),projectName:r.property("project_name",r.string().optional()),filters:r.string().optional()});});var jo,iO=n(()=>{b();Sp();jo=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Po).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var Tp,vf=n(()=>{b();Tp=r.enum_(["private","public"]);});var Eo,oO=n(()=>{b();vf();Eo=r.object({name:r.string(),description:r.string().optional(),visibility:Tp.optional(),tags:r.list(r.string()).optional()});});var Co,aO=n(()=>{b();Co=r.object({versionRef:r.property("version_ref",r.string())});});var Io,nO=n(()=>{b();Io=r.object({versionName:r.property("version_name",r.string())});});var Do,sO=n(()=>{b();Do=r.object({tag:r.string()});});var Uo,pO=n(()=>{b();Uo=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var vp,jf=n(()=>{b();vp=r.enum_(["dataset","evaluation_suite"]);});var jp,Ef=n(()=>{b();jp=r.enum_(["private","public"]);});var No,cO=n(()=>{b();jf();Ef();No=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:vp.optional(),visibility:jp.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var Cf=n(()=>{QG();YG();XG();ZG();qG();eO();rO();tO();iO();oO();aO();nO();sO();pO();cO();});var If,Df=n(()=>{b();If=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var Yt,Uf=n(()=>{b();Df();Yt=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:If.optional(),filePath:r.property("file_path",r.string().optional()),errorMessage:r.property("error_message",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional()),viewedAt:r.property("viewed_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ep={};V(Ep,{Response:()=>r8});var r8,lO=n(()=>{b();Uf();r8=r.list(Yt);});var mO=n(()=>{lO();Cf();});var Nf=n(()=>{vf();jf();Ef();});var Xt={};V(Xt,{CreateDatasetItemsFromSpansRequest:()=>xo,CreateDatasetItemsFromTracesRequest:()=>wo,DatasetExpansionWrite:()=>_o,DatasetIdentifier:()=>ko,DatasetIdentifierPublic:()=>Ao,DatasetItemBatchUpdate:()=>zo,DatasetItemBatchWrite:()=>To,DatasetItemStreamRequest:()=>vo,DatasetItemsDelete:()=>jo,DatasetUpdate:()=>Eo,DatasetUpdateVisibility:()=>Tp,DatasetVersionRestorePublic:()=>Co,DatasetVersionRetrieveRequestPublic:()=>Io,DatasetVersionTag:()=>Do,DatasetVersionUpdatePublic:()=>Uo,DatasetWrite:()=>No,DatasetWriteType:()=>vp,DatasetWriteVisibility:()=>jp,getDatasetExportJobs:()=>Ep});var dO=n(()=>{mO();Nf();});var Bo,uO=n(()=>{b();Bo=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var Fo,gO=n(()=>{b();Fo=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var Bf=n(()=>{uO();gO();});var fO=n(()=>{Bf();});var Cp={};V(Cp,{EnvironmentUpdate:()=>Bo,EnvironmentWrite:()=>Fo});var hO=n(()=>{fO();});var Mo,Ip=n(()=>{b();Mo=r.object({name:r.string(),value:r.number()});});var Ff,Mf=n(()=>{b();Ff=r.enum_(["running","completed","cancelled"]);});var Wf,Lf=n(()=>{b();Wf=r.enum_(["regular","trial","mini-batch","mutation"]);});var Wo,Vf=n(()=>{b();Ip();Mf();Lf();de();Wo=r.object({name:r.string().optional(),metadata:L.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),type:Wf.optional(),status:Ff.optional(),experimentScores:r.property("experiment_scores",r.list(Mo).optional())});});var Lo,yO=n(()=>{b();Vf();Lo=r.object({ids:r.list(r.string()),update:Wo,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Fr,Vo=n(()=>{b();Fr=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var Jf,Hf=n(()=>{b();de();Pp();Vo();Jf=r.object({model:r.string(),messages:r.list(bo),configs:r.record(r.string(),L).optional(),promptVersions:r.property("prompt_versions",r.list(Fr).optional())});});var Jo,bO=n(()=>{b();Hf();Vo();Jo=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(Jf),projectName:r.property("project_name",r.string().optional()),datasetId:r.property("dataset_id",r.string()),versionHash:r.property("version_hash",r.string().optional()),promptVersions:r.property("prompt_versions",r.list(Fr).optional())});});var Gf,Of=n(()=>{b();Gf=r.enum_(["ui","sdk","online_scoring"]);});var Kf,$f=n(()=>{b();Kf=r.enum_(["ui","sdk","online_scoring"]);});var Qf,Yf=n(()=>{b();$f();Qf=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Kf.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var Xf,Zf=n(()=>{b();Of();Yf();Xf=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Gf,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Qf).optional())});});var $e,Ho=n(()=>{b();$e=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Go,Dp=n(()=>{b();Go=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var qf,eh=n(()=>{b();qf=r.enum_(["sdk","experiment","playground","optimization"]);});var rh,th=n(()=>{b();rh=r.enum_(["general","tool","llm","guardrail"]);});var ih,oh=n(()=>{b();Dp();Ho();eh();th();ih=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:rh.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),ttft:r.number().optional(),source:qf.optional()});});var ah,nh=n(()=>{b();ah=r.enum_(["sdk","experiment","playground","optimization"]);});var sh,ph=n(()=>{b();Dp();Ho();nh();sh=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:ah.optional()});});var ch,lh=n(()=>{b();Zf();Ho();oh();ph();ch=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",$e.optional()),trace:sh.optional(),spans:r.list(ih).optional(),feedbackScores:r.property("feedback_scores",r.list(Xf).optional())});});var Oo,RO=n(()=>{b();lh();Oo=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(ch)});});var Ko,xO=n(()=>{b();Ko=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),projectName:r.property("project_name",r.string().optional())});});var mh,dh=n(()=>{b();mh=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var fe,st=n(()=>{b();fe=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var uh,gh=n(()=>{b();uh=r.enum_(["passed","failed"]);});var fh,hh=n(()=>{b();fh=r.enum_(["default","hidden"]);});var yh,bh=n(()=>{b();yh=r.enum_(["ui","sdk","online_scoring"]);});var Rh,xh=n(()=>{b();Rh=r.enum_(["ui","sdk","online_scoring"]);});var wh,_h=n(()=>{b();xh();wh=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Rh.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var Pe,pt=n(()=>{b();bh();_h();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:yh,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),wh).optional())});});var le,Qe=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var $o,Up=n(()=>{b();dh();st();nt();gh();hh();pt();Qe();$o=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",fh.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",Ke.optional()),assertionResults:r.property("assertion_results",r.list(mh).optional()),status:uh.optional()});});var Qo,wO=n(()=>{b();Up();Qo=r.object({experimentItems:r.property("experiment_items",r.list($o))});});var Yo,_O=n(()=>{b();Yo=r.object({ids:r.list(r.string())});});var Xo,kO=n(()=>{b();Xo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var kh,Ah=n(()=>{b();kh=r.object({name:r.string(),value:r.number()});});var Me,Zt=n(()=>{b();Me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Np,Ph=n(()=>{b();Np=r.object({id:r.string()});});var Bp,zh=n(()=>{b();Bp=r.enum_(["dataset","evaluation_suite"]);});var Fp,Sh=n(()=>{b();Fp=r.enum_(["running","completed","cancelled"]);});var Mp,Th=n(()=>{b();Mp=r.enum_(["regular","trial","mini-batch","mutation"]);});var Zo,AO=n(()=>{b();Ah();Zt();Ph();zh();Sh();Th();Zo=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Me.optional(),tags:r.list(r.string()).optional(),type:Mp.optional(),evaluationMethod:r.property("evaluation_method",Bp.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Fp.optional(),experimentScores:r.property("experiment_scores",r.list(kh).optional()),promptVersion:r.property("prompt_version",Np.optional()),promptVersions:r.property("prompt_versions",r.list(Np).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var vh=n(()=>{yO();bO();RO();xO();wO();_O();kO();AO();});var PO=n(()=>{vh();});var jh=n(()=>{zh();Sh();Th();});var Wp={};V(Wp,{ExperimentBatchUpdate:()=>Lo,ExperimentExecutionRequest:()=>Jo,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Oo,ExperimentItemStreamRequest:()=>Ko,ExperimentItemsBatch:()=>Qo,ExperimentItemsDelete:()=>Yo,ExperimentStreamRequestPublic:()=>Xo,ExperimentWrite:()=>Zo,ExperimentWriteEvaluationMethod:()=>Bp,ExperimentWriteStatus:()=>Fp,ExperimentWriteType:()=>Mp});var zO=n(()=>{PO();jh();});var Lp,SO=n(()=>{b();Lp=r.enum_(["numerical","categorical","boolean"]);});var Eh=n(()=>{SO();});var Vp={};V(Vp,{FindFeedbackDefinitionsRequestType:()=>Lp});var TO=n(()=>{Eh();});var Ch,Ih=n(()=>{b();Ch=r.enum_(["TOPIC","PII"]);});var Dh,Uh=n(()=>{b();Dh=r.enum_(["passed","failed"]);});var Nh,Bh=n(()=>{b();Ih();Uh();de();Nh=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Ch,result:Dh,config:L,details:L});});var qo,vO=n(()=>{b();Bh();qo=r.object({guardrails:r.list(Nh)});});var Fh=n(()=>{vO();});var jO=n(()=>{Fh();});var Jp={};V(Jp,{GuardrailBatchWrite:()=>qo});var EO=n(()=>{jO();});var Hp={};V(Hp,{Response:()=>t8});var t8,CO=n(()=>{b();t8=r.string();});var IO=n(()=>{CO();});var qt={};V(qt,{getLlmModels:()=>Hp});var DO=n(()=>{IO();});var ea,UO=n(()=>{b();ea=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});});var Gp,Mh=n(()=>{b();Gp=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var ra,NO=n(()=>{b();Mh();ra=r.object({provider:Gp,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});});var Wh=n(()=>{UO();NO();});var BO=n(()=>{Wh();});var Lh=n(()=>{Mh();});var Op={};V(Op,{ProviderApiKeyUpdate:()=>ea,ProviderApiKeyWrite:()=>ra,ProviderApiKeyWriteProvider:()=>Gp});var FO=n(()=>{BO();Lh();});var Vh,Jh=n(()=>{b();Vh=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var Kp={};V(Kp,{Response:()=>i8});var i8,MO=n(()=>{b();Jh();i8=r.list(Vh);});var WO=n(()=>{MO();});var ei={};V(ei,{listModels:()=>Kp});var LO=n(()=>{WO();});var $p,Hh=n(()=>{b();$p=r.enum_(["running","completed","cancelled","initialized","error"]);});var ta,VO=n(()=>{b();Hh();ta=r.object({name:r.string().optional(),status:$p.optional()});});var Gh=n(()=>{VO();});var JO=n(()=>{Gh();});var Oh=n(()=>{Hh();});var Qp={};V(Qp,{OptimizationUpdate:()=>ta,OptimizationUpdateStatus:()=>$p});var HO=n(()=>{JO();Oh();});var ia,GO=n(()=>{b();ia=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Yp,Kh=n(()=>{b();Yp=r.enum_(["connect","endpoint"]);});var oa,OO=n(()=>{b();Kh();oa=r.object({projectId:r.property("project_id",r.string()),activationKey:r.property("activation_key",r.string()),ttlSeconds:r.property("ttl_seconds",r.number().optional()),type:Yp});});var $h=n(()=>{GO();OO();});var KO=n(()=>{$h();});var Qh=n(()=>{Kh();});var Xp={};V(Xp,{ActivateRequest:()=>ia,CreateSessionRequest:()=>oa,CreateSessionRequestType:()=>Yp});var $O=n(()=>{KO();Qh();});var Zp,Yh=n(()=>{b();Zp=r.enum_(["traces","spans","threads"]);});var aa,QO=n(()=>{b();Yh();aa=r.object({entityType:r.property("entity_type",Zp),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var Xh,Zh=n(()=>{b();Xh=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type"]);});var qh,ey=n(()=>{b();Zh();qh=r.object({field:Xh.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ry,ty=n(()=>{b();ry=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var _r,ri=n(()=>{b();ty();_r=r.object({field:r.string().optional(),operator:ry.optional(),key:r.string().optional(),value:r.string().optional()});});var iy,oy=n(()=>{b();iy=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var kr,ti=n(()=>{b();oy();kr=r.object({field:r.string().optional(),operator:iy.optional(),key:r.string().optional(),value:r.string().optional()});});var ay,ny=n(()=>{b();ay=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var ct,na=n(()=>{b();ny();ct=r.object({field:r.string().optional(),operator:ay.optional(),key:r.string().optional(),value:r.string().optional()});});var qp,sy=n(()=>{b();qp=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var ec,py=n(()=>{b();ec=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var sa,YO=n(()=>{b();ey();ri();ti();na();sy();py();sa=r.object({metricType:r.property("metric_type",ec.optional()),interval:qp.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(_r).optional()),traceFilters:r.property("trace_filters",r.list(kr).optional()),threadFilters:r.property("thread_filters",r.list(ct).optional()),breakdown:qh.optional()});});var pa,XO=n(()=>{b();pa=r.object({name:r.string()});});var rc,cy=n(()=>{b();rc=r.enum_(["private","public"]);});var ca,ZO=n(()=>{b();cy();ca=r.object({name:r.string().optional(),description:r.string().optional(),visibility:rc.optional()});});var tc,ly=n(()=>{b();tc=r.enum_(["private","public"]);});var la,qO=n(()=>{b();ly();la=r.object({name:r.string(),visibility:tc.optional(),description:r.string().optional()});});var my=n(()=>{QO();YO();XO();ZO();qO();});var eK=n(()=>{my();});var dy=n(()=>{Yh();sy();py();cy();ly();});var ic={};V(ic,{KpiCardRequest:()=>aa,KpiCardRequestEntityType:()=>Zp,ProjectMetricRequestPublic:()=>sa,ProjectMetricRequestPublicInterval:()=>qp,ProjectMetricRequestPublicMetricType:()=>ec,ProjectRetrieveDetailed:()=>pa,ProjectUpdate:()=>ca,ProjectUpdateVisibility:()=>rc,ProjectWrite:()=>la,ProjectWriteVisibility:()=>tc});var rK=n(()=>{eK();dy();});var uy,gy=n(()=>{b();uy=r.record(r.string(),r.unknown());});var fy,hy=n(()=>{b();fy=r.enum_(["text","chat"]);});var yy,by=n(()=>{b();yy=r.enum_(["mustache","jinja2","python"]);});var Ye,oc=n(()=>{b();gy();hy();by();Ye=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:uy.optional(),type:yy.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",fy.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var ac,Ry=n(()=>{b();ac=r.enum_(["text","chat"]);});var ma,tK=n(()=>{b();oc();Ry();ma=r.object({name:r.string(),version:Ye,templateStructure:r.property("template_structure",ac.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var da,iK=n(()=>{b();da=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var xy,wy=n(()=>{b();xy=r.object({tags:r.list(r.string()).optional()});});var ua,oK=n(()=>{b();wy();ua=r.object({ids:r.list(r.string()),update:xy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var ga,aK=n(()=>{b();ga=r.object({commits:r.list(r.string())});});var fa,nK=n(()=>{b();fa=r.object({name:r.string(),commit:r.string().optional(),projectName:r.property("project_name",r.string().optional())});});var nc,_y=n(()=>{b();nc=r.enum_(["text","chat"]);});var sc,ky=n(()=>{b();sc=r.enum_(["mustache","jinja2","python"]);});var ha,sK=n(()=>{b();wr();_y();ky();ha=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:Se.optional(),changeDescription:r.property("change_description",r.string().optional()),type:sc.optional(),templateStructure:r.property("template_structure",nc.optional()),tags:r.list(r.string()).optional()});});var Ay=n(()=>{tK();iK();oK();aK();nK();sK();});var ii,pc=n(()=>{b();ii=r.object({promptVersionId:r.property("prompt_version_id",r.string().optional()),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var cc={};V(cc,{Response:()=>o8});var o8,pK=n(()=>{b();pc();o8=r.list(ii);});var cK=n(()=>{pK();Ay();});var Py=n(()=>{Ry();_y();ky();});var oi={};V(oi,{CreatePromptVersionDetail:()=>ma,CreatePromptVersionDetailTemplateStructure:()=>ac,PromptUpdatable:()=>da,PromptVersionBatchUpdate:()=>ua,PromptVersionCommitsRequestPublic:()=>ga,PromptVersionRetrieveDetail:()=>fa,PromptWrite:()=>ha,PromptWriteTemplateStructure:()=>nc,PromptWriteType:()=>sc,getPromptsByCommits:()=>cc});var lK=n(()=>{cK();Py();});var lc,zy=n(()=>{b();lc=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var ya,mK=n(()=>{b();zy();ya=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:lc,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var Sy=n(()=>{mK();});var dK=n(()=>{Sy();});var Ty=n(()=>{zy();});var mc={};V(mc,{RetentionRuleWrite:()=>ya,RetentionRuleWriteRetention:()=>lc});var uK=n(()=>{dK();Ty();});var ba,gK=n(()=>{b();ba=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var dc,vy=n(()=>{b();dc=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Ra,fK=n(()=>{b();de();vy();Ra=r.object({status:dc,result:L.optional(),error:L.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var uc,jy=n(()=>{b();uc=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var xa,hK=n(()=>{b();de();jy();xa=r.object({type:uc,args:L,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var wa,gc=n(()=>{b();wa=r.object({datasetId:r.property("dataset_id",r.string().optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetItemVersionId:r.property("dataset_item_version_id",r.string().optional()),datasetItemId:r.property("dataset_item_id",r.string().optional())});});var _a,yK=n(()=>{b();de();gc();_a=r.object({agentName:r.property("agent_name",r.string()),inputs:L.optional(),projectId:r.property("project_id",r.string()),maskId:r.property("mask_id",r.string().optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:wa.optional()});});var ka,bK=n(()=>{b();ka=r.object({capabilities:r.list(r.string()).optional()});});var fc,Ey=n(()=>{b();fc=r.enum_(["pending","running","completed","failed","cancelled"]);});var Aa,RK=n(()=>{b();de();Ey();Aa=r.object({status:fc,result:L.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var Cy=n(()=>{gK();fK();hK();yK();bK();RK();});var Pa,hc=n(()=>{b();Pa=r.object({stream:r.string(),text:r.string()});});var yc={};V(yc,{Request:()=>a8});var a8,xK=n(()=>{b();hc();a8=r.list(Pa);});var bc={};V(bc,{Response:()=>n8});var n8,wK=n(()=>{b();hc();n8=r.list(Pa);});var Iy,Dy=n(()=>{b();Iy=r.enum_(["pending","running","completed","failed","cancelled"]);});var lt,Rc=n(()=>{b();de();gc();Dy();lt=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:Iy.optional(),inputs:L.optional(),result:L.optional(),error:r.string().optional(),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),maskId:r.property("mask_id",r.string().optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:wa.optional(),timeout:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),startedAt:r.property("started_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional())});});var xc={};V(xc,{Response:()=>s8});var s8,_K=n(()=>{Rc();s8=lt.nullable();});var wc={};V(wc,{Request:()=>p8});var p8,kK=n(()=>{b();p8=r.record(r.string(),r.unknown());});var _c={};V(_c,{Request:()=>c8});var c8,AK=n(()=>{b();c8=r.record(r.string(),r.unknown());});var PK=n(()=>{xK();wK();_K();kK();AK();Cy();});var kc,zK=n(()=>{b();kc=r.enum_(["pairing","connected","disconnected"]);});var Uy=n(()=>{vy();jy();zK();Ey();});var lr={};V(lr,{BridgeCommandNextRequest:()=>ba,BridgeCommandResultRequest:()=>Ra,BridgeCommandResultRequestStatus:()=>dc,BridgeCommandSubmitRequest:()=>xa,BridgeCommandSubmitRequestType:()=>uc,CreateLocalRunnerJobRequest:()=>_a,ListRunnersRequestStatus:()=>kc,LocalRunnerHeartbeatRequest:()=>ka,LocalRunnerJobResultRequest:()=>Aa,LocalRunnerJobResultRequestStatus:()=>fc,appendJobLogs:()=>yc,getJobLogs:()=>bc,nextJob:()=>xc,patchChecklist:()=>wc,registerAgents:()=>_c});var SK=n(()=>{PK();Uy();});var Ar,ai=n(()=>{b();Ar=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Ny,By=n(()=>{b();Ny=r.enum_(["sdk","experiment","playground","optimization"]);});var Fy,My=n(()=>{b();Fy=r.enum_(["general","tool","llm","guardrail"]);});var za,Wy=n(()=>{b();ai();Qe();By();My();za=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Fy.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Ar.optional()),ttft:r.number().optional(),source:Ny.optional()});});var Sa,TK=n(()=>{b();Wy();Sa=r.object({ids:r.list(r.string()),update:za,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Ta,Ac=n(()=>{b();Ta=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Ly,Vy=n(()=>{b();Ly=r.enum_(["sdk","experiment","playground","optimization"]);});var Jy,Hy=n(()=>{b();Jy=r.enum_(["general","tool","llm","guardrail"]);});var va,Gy=n(()=>{b();Ac();Zt();Vy();Hy();va=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Jy.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Me.optional(),output:Me.optional(),metadata:Me.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ta.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),ttft:r.number().optional(),source:Ly.optional()});});var ja,vK=n(()=>{b();Gy();ja=r.object({spans:r.list(va)});});var Pc,Oy=n(()=>{b();Pc=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source"]);});var zc,Ky=n(()=>{b();zc=r.enum_(["general","tool","llm","guardrail"]);});var Ea,jK=n(()=>{b();ri();Oy();Ky();Ea=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:zc.optional(),filters:r.list(_r).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(Pc).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var $y=n(()=>{TK();vK();jK();});var EK=n(()=>{$y();});var Sc,CK=n(()=>{b();Sc=r.enum_(["general","tool","llm","guardrail"]);});var Tc,IK=n(()=>{b();Tc=r.enum_(["general","tool","llm","guardrail"]);});var vc,DK=n(()=>{b();vc=r.enum_(["general","tool","llm","guardrail"]);});var Qy=n(()=>{CK();IK();DK();Oy();Ky();});var jc={};V(jc,{FindFeedbackScoreNames1RequestType:()=>Sc,GetSpanStatsRequestType:()=>Tc,GetSpansByProjectRequestType:()=>vc,SpanBatchUpdate:()=>Sa,SpanBatchWrite:()=>ja,SpanSearchStreamRequestPublic:()=>Ea,SpanSearchStreamRequestPublicExcludeItem:()=>Pc,SpanSearchStreamRequestPublicType:()=>zc});var UK=n(()=>{EK();Qy();});var Ca,NK=n(()=>{b();Ca=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});});var Ia,BK=n(()=>{b();Ia=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});});var Yy,Xy=n(()=>{b();Yy=r.enum_(["ui","sdk","online_scoring"]);});var Zy,qy=n(()=>{b();Xy();Zy=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Yy,author:r.string().optional(),threadId:r.property("thread_id",r.string())});});var Da,FK=n(()=>{b();qy();Da=r.object({scores:r.list(Zy)});});var eb,rb=n(()=>{b();eb=r.enum_(["sdk","experiment","playground","optimization"]);});var Ua,tb=n(()=>{b();ai();Qe();rb();Ua=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",Ar.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:eb.optional()});});var Na,MK=n(()=>{b();tb();Na=r.object({ids:r.list(r.string()),update:Ua,mergeTags:r.property("merge_tags",r.boolean().optional())});});var ib,ob=n(()=>{b();ib=r.enum_(["sdk","experiment","playground","optimization"]);});var Ba,ab=n(()=>{b();Ac();Zt();ob();Ba=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Me.optional(),output:Me.optional(),metadata:Me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ta.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:ib.optional()});});var Fa,WK=n(()=>{b();ab();Fa=r.object({traces:r.list(Ba)});});var Ec,nb=n(()=>{b();Ec=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source"]);});var Ma,LK=n(()=>{b();ti();nb();Ma=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(kr).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),exclude:r.list(Ec).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Wa,VK=n(()=>{b();Wa=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});});var La,sb=n(()=>{b();La=r.object({tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional())});});var Va,JK=n(()=>{b();sb();Va=r.object({ids:r.list(r.string()),update:La,mergeTags:r.property("merge_tags",r.boolean().optional())});});var pb,cb=n(()=>{b();pb=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Xe,mt=n(()=>{b();cb();Xe=r.object({field:r.string().optional(),operator:pb.optional(),key:r.string().optional(),value:r.string().optional()});});var Ja,HK=n(()=>{b();mt();Ja=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Xe).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var lb=n(()=>{NK();BK();FK();MK();WK();LK();VK();JK();HK();});var GK=n(()=>{lb();});var mb=n(()=>{nb();});var Cc={};V(Cc,{DeleteThreadFeedbackScores:()=>Ca,DeleteTraceThreads:()=>Ia,FeedbackScoreBatchThread:()=>Da,TraceBatchUpdate:()=>Na,TraceBatchWrite:()=>Fa,TraceSearchStreamRequestPublic:()=>Ma,TraceSearchStreamRequestPublicExcludeItem:()=>Ec,TraceThreadBatchIdentifier:()=>Wa,TraceThreadBatchUpdate:()=>Va,TraceThreadSearchStreamRequest:()=>Ja});var OK=n(()=>{GK();mb();});var Ha,KK=n(()=>{b();Ha=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});});var db=n(()=>{KK();});var $K=n(()=>{db();});var Ic={};V(Ic,{WelcomeWizardSubmission:()=>Ha});var QK=n(()=>{$K();});var YK=n(()=>{Cg();vG();EG();Ig();Bg();UG();Gg();FG();Og();$g();GG();Qg();cf();$G();Cf();dO();Nf();Bf();hO();vh();zO();jh();TO();Eh();Fh();EO();DO();Wh();FO();Lh();LO();Gh();HO();Oh();$h();$O();Qh();my();rK();dy();Ay();lK();Py();Sy();uK();Ty();Cy();SK();Uy();$y();UK();Qy();lb();OK();mb();db();QK();});var ub,gb=n(()=>{b();ub=r.enum_(["required","optional"]);});var fb,hb=n(()=>{b();gb();fb=r.object({name:r.string(),type:r.string(),presence:ub.optional()});});var yb,bb=n(()=>{b();hb();yb=r.object({name:r.string().optional(),description:r.string().optional(),language:r.string().optional(),executable:r.string().optional(),sourceFile:r.property("source_file",r.string().optional()),params:r.list(fb).optional(),timeout:r.number().optional()});});var Rb,xb=n(()=>{b();Rb=r.enum_(["blueprint","mask"]);});var wb,_b=n(()=>{b();wb=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var kb,Ab=n(()=>{b();_b();kb=r.object({key:r.string(),value:r.string().optional(),type:wb,description:r.string().optional()});});var Pb,zb=n(()=>{b();xb();Ab();Pb=r.object({id:r.string().optional(),name:r.string().optional(),type:Rb,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(kb)});});var Sb,Tb=n(()=>{b();Sb=r.enum_(["blueprint","mask"]);});var vb,jb=n(()=>{b();vb=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Eb,Cb=n(()=>{b();jb();Eb=r.object({key:r.string(),value:r.string().optional(),type:vb,description:r.string().optional()});});var dt,XK=n(()=>{b();Tb();Cb();dt=r.object({id:r.string().optional(),name:r.string().optional(),type:Sb,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Eb)});});var Ib,Db=n(()=>{b();Ib=r.enum_(["blueprint","mask"]);});var Ub,Nb=n(()=>{b();Ub=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Bb,Fb=n(()=>{b();Nb();Bb=r.object({key:r.string(),value:r.string().optional(),type:Ub,description:r.string().optional()});});var Mb,Wb=n(()=>{b();Db();Fb();Mb=r.object({id:r.string().optional(),type:Ib,description:r.string().optional(),values:r.list(Bb)});});var Dc,ZK=n(()=>{b();Wb();Dc=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Mb});});var Te,Mr=n(()=>{b();Te=r.object({name:r.string(),value:r.number()});});var Pr,ni=n(()=>{b();Pr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Lb,Vb=n(()=>{b();Mr();ni();Lb=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:Pr.optional(),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),experimentScores:r.property("experiment_scores",r.list(Te).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var Jb,Hb=n(()=>{b();Jb=r.enum_(["general","slack","pagerduty"]);});var Gb,Ob=n(()=>{b();Gb=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var Kb,$b=n(()=>{b();Ob();Kb=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Gb,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Qb,Yb=n(()=>{b();Qb=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var Xb,Zb=n(()=>{b();$b();Yb();Xb=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",Qb),triggerConfigs:r.property("trigger_configs",r.list(Kb).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var qb,eR=n(()=>{b();qb=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var l8,qK=n(()=>{b();Hb();Zb();eR();l8=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Jb.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:qb,triggers:r.list(Xb).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),projectId:r.property("project_id",r.string().optional())});});var rR,tR=n(()=>{b();rR=r.enum_(["general","slack","pagerduty"]);});var iR,oR=n(()=>{b();iR=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var aR,nR=n(()=>{b();oR();aR=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:iR,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var sR,pR=n(()=>{b();sR=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var cR,lR=n(()=>{b();nR();pR();cR=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",sR),triggerConfigs:r.property("trigger_configs",r.list(aR).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var mR,dR=n(()=>{b();mR=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ga,uR=n(()=>{b();tR();lR();dR();Ga=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",rR.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:mR,triggers:r.list(cR).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),projectId:r.property("project_id",r.string().optional())});});var Oa,e$=n(()=>{b();uR();Oa=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ga).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var gR,fR=n(()=>{b();gR=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var hR,yR=n(()=>{b();fR();hR=r.object({id:r.string().optional(),type:gR,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});});var bR,RR=n(()=>{b();bR=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var xR,wR=n(()=>{b();yR();RR();xR=r.object({id:r.string().optional(),eventType:r.property("event_type",bR),triggerConfigs:r.property("trigger_configs",r.list(hR).optional())});});var _R,kR=n(()=>{b();_R=r.enum_(["general","slack","pagerduty"]);});var AR,PR=n(()=>{b();AR=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});});var Ka,r$=n(()=>{b();wR();kR();PR();Ka=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",_R.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:AR,triggers:r.list(xR).optional(),projectId:r.property("project_id",r.string().optional())});});var zR,SR=n(()=>{b();zR=r.object({username:r.string().optional(),status:r.number().optional()});});var TR,vR=n(()=>{b();TR=r.enum_(["trace","thread"]);});var jR,ER=n(()=>{b();SR();vR();Mr();jR=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:TR,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(zR).optional(),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var m8,t$=n(()=>{b();ER();m8=r.object({annotationQueues:r.property("annotation_queues",r.list(jR))});});var Uc,i$=n(()=>{b();Uc=r.object({ids:r.list(r.string())});});var CR,IR=n(()=>{b();CR=r.enum_(["trace","thread"]);});var DR,UR=n(()=>{b();DR=r.object({username:r.string().optional(),status:r.number().optional()});});var Wr,$a=n(()=>{b();Wr=r.object({name:r.string(),value:r.number()});});var Qa,NR=n(()=>{b();IR();UR();$a();Qa=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:CR,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(DR).optional(),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var BR,o$=n(()=>{b();NR();BR=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Qa).optional(),sortableBy:r.list(r.string()).optional()});});var FR,MR=n(()=>{b();FR=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var WR,LR=n(()=>{b();WR=r.object({name:r.string(),value:r.number()});});var VR,JR=n(()=>{b();VR=r.object({name:r.string(),value:r.number()});});var HR,GR=n(()=>{b();HR=r.enum_(["system","user","assistant","tool","function"]);});var OR,KR=n(()=>{b();OR=r.enum_(["function"]);});var Ya,Nc=n(()=>{b();$t();KR();Ya=r.object({id:r.string().optional(),index:r.number().optional(),type:OR.optional(),function:Rr.optional()});});var $R,QR=n(()=>{b();GR();$t();Nc();$R=r.object({role:HR.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(Ya).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Rr.optional())});});var YR,XR=n(()=>{b();YR=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});});var ZR,a$=n(()=>{b();XR();ZR=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(YR).optional(),sortableBy:r.list(r.string()).optional()});});var qR,ex=n(()=>{b();qR=r.object({url:r.string()});});var rx,tx=n(()=>{b();rx=r.object({url:r.string()});});var ix,ox=n(()=>{b();ix=r.object({url:r.string()});});var ax,n$=n(()=>{b();ax=r.record(r.string(),r.unknown());});var nx,sx=n(()=>{b();nx=r.enum_(["evaluator"]);});var px,cx=n(()=>{b();px=r.object({url:r.string(),detail:r.string().optional()});});var lx,mx=n(()=>{b();lx=r.object({url:r.string()});});var dx,ux=n(()=>{b();ex();cx();mx();dx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",px.optional()),videoUrl:r.property("video_url",lx.optional()),audioUrl:r.property("audio_url",qR.optional())});});var gx,fx=n(()=>{b();gx=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var ut,Xa=n(()=>{b();ux();fx();ut=r.object({role:gx,content:r.string().optional(),contentArray:r.property("content_array",r.list(dx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var gt,Za=n(()=>{b();de();gt=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",L.optional())});});var hx,yx=n(()=>{b();hx=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var ft,qa=n(()=>{b();yx();ft=r.object({name:r.string(),type:hx,description:r.string()});});var en,Bc=n(()=>{b();Xa();Za();qa();en=r.object({model:gt,messages:r.list(ut),variables:r.record(r.string(),r.string()),schema:r.list(ft)});});var bx,Rx=n(()=>{b();bx=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var zr,si=n(()=>{b();Rx();zr=r.object({field:r.string().optional(),operator:bx.optional(),key:r.string().optional(),value:r.string().optional()});});var xx,wx=n(()=>{b();Bc();si();xx=r.object({filters:r.list(zr).optional(),code:en.optional()});});var _x,kx=n(()=>{b();_x=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Sr,pi=n(()=>{b();kx();Sr=r.object({field:r.string().optional(),operator:_x.optional(),key:r.string().optional(),value:r.string().optional()});});var rn,Fc=n(()=>{b();Xa();Za();qa();rn=r.object({model:gt,messages:r.list(ut),variables:r.record(r.string(),r.string()),schema:r.list(ft)});});var Ax,Px=n(()=>{b();pi();Fc();Ax=r.object({filters:r.list(Sr).optional(),code:rn.optional()});});var tn,Mc=n(()=>{b();tn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var zx,Sx=n(()=>{b();pi();Mc();zx=r.object({filters:r.list(Sr).optional(),code:tn.optional()});});var on,Wc=n(()=>{b();Xa();Za();qa();on=r.object({model:gt,messages:r.list(ut),schema:r.list(ft)});});var Tx,vx=n(()=>{b();mt();Wc();Tx=r.object({filters:r.list(Xe).optional(),code:on.optional()});});var an,Lc=n(()=>{b();an=r.object({metric:r.string()});});var jx,Ex=n(()=>{b();mt();Lc();jx=r.object({filters:r.list(Xe).optional(),code:an.optional()});});var nn,Vc=n(()=>{b();nn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Cx,Ix=n(()=>{b();si();Vc();Cx=r.object({filters:r.list(zr).optional(),code:nn.optional()});});var Dx,Ux=n(()=>{b();Dx=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var ci,d8,s$=n(()=>{b();sx();wx();Px();Sx();vx();Ex();Ix();Ux();ci=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(Dx).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:nx}),d8=r.union("type",{llm_as_judge:xx.extend(ci),user_defined_metric_python:Cx.extend(ci),trace_thread_llm_as_judge:Tx.extend(ci),trace_thread_user_defined_metric_python:jx.extend(ci),span_llm_as_judge:Ax.extend(ci),span_user_defined_metric_python:zx.extend(ci)}).transform({transform:p=>p,untransform:p=>p});});var Nx,Bx=n(()=>{b();Nx=r.object({url:r.string(),detail:r.string().optional()});});var Fx,Mx=n(()=>{b();Fx=r.object({url:r.string()});});var Wx,Lx=n(()=>{b();tx();Bx();Mx();Wx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Nx.optional()),videoUrl:r.property("video_url",Fx.optional()),audioUrl:r.property("audio_url",rx.optional())});});var Vx,Jx=n(()=>{b();Vx=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var ht,sn=n(()=>{b();Lx();Jx();ht=r.object({role:Vx,content:r.string().optional(),contentArray:r.property("content_array",r.list(Wx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,mr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var yt,pn=n(()=>{b();mr();yt=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var Hx,Gx=n(()=>{b();Hx=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var bt,cn=n(()=>{b();Gx();bt=r.object({name:r.string(),type:Hx,description:r.string()});});var Ox,Kx=n(()=>{b();sn();pn();cn();Ox=r.object({model:yt,messages:r.list(ht),variables:r.record(r.string(),r.string()),schema:r.list(bt)});});var ln,Jc=n(()=>{b();Kx();ti();ln=r.object({filters:r.list(kr).optional(),code:Ox.optional()});});var $x,Qx=n(()=>{b();$x=r.object({url:r.string(),detail:r.string().optional()});});var Yx,Xx=n(()=>{b();Yx=r.object({url:r.string()});});var Zx,qx=n(()=>{b();ox();Qx();Xx();Zx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",$x.optional()),videoUrl:r.property("video_url",Yx.optional()),audioUrl:r.property("audio_url",ix.optional())});});var ew,rw=n(()=>{b();ew=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Rt,mn=n(()=>{b();qx();rw();Rt=r.object({role:ew,content:r.string().optional(),contentArray:r.property("content_array",r.list(Zx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var xt,dn=n(()=>{b();wr();xt=r.object({name:r.string(),temperature:r.number(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var tw,iw=n(()=>{b();tw=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var wt,un=n(()=>{b();iw();wt=r.object({name:r.string(),type:tw,description:r.string()});});var ow,aw=n(()=>{b();mn();dn();un();ow=r.object({model:xt,messages:r.list(Rt),variables:r.record(r.string(),r.string()),schema:r.list(wt)});});var nw,sw=n(()=>{b();nw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var gn,Hc=n(()=>{b();sw();gn=r.object({field:r.string().optional(),operator:nw.optional(),key:r.string().optional(),value:r.string().optional()});});var pw,cw=n(()=>{b();aw();Hc();pw=r.object({filters:r.list(gn).optional(),code:ow.optional()});});var lw,mw=n(()=>{b();lw=r.enum_(["evaluator"]);});var dw,uw=n(()=>{b();sn();pn();cn();dw=r.object({model:yt,messages:r.list(ht),variables:r.record(r.string(),r.string()),schema:r.list(bt)});});var fn,Gc=n(()=>{b();ri();uw();fn=r.object({filters:r.list(_r).optional(),code:dw.optional()});});var gw,fw=n(()=>{b();gw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var hn,Oc=n(()=>{b();ri();fw();hn=r.object({filters:r.list(_r).optional(),code:gw.optional()});});var hw,yw=n(()=>{b();sn();pn();cn();hw=r.object({model:yt,messages:r.list(ht),schema:r.list(bt)});});var yn,Kc=n(()=>{b();na();yw();yn=r.object({filters:r.list(ct).optional(),code:hw.optional()});});var bw,Rw=n(()=>{b();bw=r.object({metric:r.string()});});var bn,$c=n(()=>{b();na();Rw();bn=r.object({filters:r.list(ct).optional(),code:bw.optional()});});var xw,ww=n(()=>{b();xw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Rn,Qc=n(()=>{b();ti();ww();Rn=r.object({filters:r.list(kr).optional(),code:xw.optional()});});var xn,Yc=n(()=>{b();xn=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var li,_w,kw=n(()=>{b();Jc();mw();Gc();Oc();Kc();$c();Qc();Yc();li=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(xn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:lw}),_w=r.union("type",{llm_as_judge:ln.extend(li),user_defined_metric_python:Rn.extend(li),trace_thread_llm_as_judge:yn.extend(li),trace_thread_user_defined_metric_python:bn.extend(li),span_llm_as_judge:fn.extend(li),span_user_defined_metric_python:hn.extend(li)}).transform({transform:p=>p,untransform:p=>p});});var Aw,p$=n(()=>{b();kw();Aw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(_w).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var Pw,zw=n(()=>{b();Pw=r.enum_(["evaluator"]);});var mi,Sw,c$=n(()=>{b();Jc();zw();Gc();Oc();Kc();$c();Qc();Yc();mi=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(xn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:Pw}),Sw=r.union("type",{llm_as_judge:ln.extend(mi),user_defined_metric_python:Rn.extend(mi),trace_thread_llm_as_judge:yn.extend(mi),trace_thread_user_defined_metric_python:bn.extend(mi),span_llm_as_judge:fn.extend(mi),span_user_defined_metric_python:hn.extend(mi)}).transform({transform:p=>p,untransform:p=>p});});var Tw,vw=n(()=>{b();Tw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var wn,Xc=n(()=>{b();vw();wn=r.object({field:r.string().optional(),operator:Tw.optional(),key:r.string().optional(),value:r.string().optional()});});var jw,Ew=n(()=>{b();mn();dn();un();jw=r.object({model:xt,messages:r.list(Rt),variables:r.record(r.string(),r.string()),schema:r.list(wt)});});var Cw,Iw=n(()=>{b();Xc();Ew();Cw=r.object({filters:r.list(wn).optional(),code:jw.optional()});});var Dw,Uw=n(()=>{b();Dw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Nw,Bw=n(()=>{b();Xc();Uw();Nw=r.object({filters:r.list(wn).optional(),code:Dw.optional()});});var Fw,Mw=n(()=>{b();Fw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var _n,Zc=n(()=>{b();Mw();_n=r.object({field:r.string().optional(),operator:Fw.optional(),key:r.string().optional(),value:r.string().optional()});});var Ww,Lw=n(()=>{b();mn();dn();un();Ww=r.object({model:xt,messages:r.list(Rt),schema:r.list(wt)});});var Vw,Jw=n(()=>{b();Zc();Lw();Vw=r.object({filters:r.list(_n).optional(),code:Ww.optional()});});var Hw,Gw=n(()=>{b();Hw=r.object({metric:r.string()});});var Ow,Kw=n(()=>{b();Zc();Gw();Ow=r.object({filters:r.list(_n).optional(),code:Hw.optional()});});var $w,Qw=n(()=>{b();$w=r.enum_(["evaluator"]);});var Yw,Xw=n(()=>{b();Bc();si();Yw=r.object({filters:r.list(zr).optional(),code:en.optional()});});var Zw,qw=n(()=>{b();pi();Fc();Zw=r.object({filters:r.list(Sr).optional(),code:rn.optional()});});var e_,r_=n(()=>{b();pi();Mc();e_=r.object({filters:r.list(Sr).optional(),code:tn.optional()});});var t_,i_=n(()=>{b();mt();Wc();t_=r.object({filters:r.list(Xe).optional(),code:on.optional()});});var o_,a_=n(()=>{b();mt();Lc();o_=r.object({filters:r.list(Xe).optional(),code:an.optional()});});var n_,s_=n(()=>{b();si();Vc();n_=r.object({filters:r.list(zr).optional(),code:nn.optional()});});var di,p_,l$=n(()=>{b();Qw();Xw();qw();r_();i_();a_();s_();di=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:$w}),p_=r.union("type",{llm_as_judge:Yw.extend(di),user_defined_metric_python:n_.extend(di),trace_thread_llm_as_judge:t_.extend(di),trace_thread_user_defined_metric_python:o_.extend(di),span_llm_as_judge:Zw.extend(di),span_user_defined_metric_python:e_.extend(di)}).transform({transform:p=>p,untransform:p=>p});});var c_,l_=n(()=>{b();c_=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var m_,d_=n(()=>{b();Hc();l_();m_=r.object({filters:r.list(gn).optional(),code:c_.optional()});});var u_,g_=n(()=>{b();u_=r.enum_(["evaluator"]);});var ui,f_,m$=n(()=>{b();cw();Iw();Bw();Jw();Kw();d_();g_();ui=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:u_}),f_=r.union("type",{llm_as_judge:pw.extend(ui),user_defined_metric_python:m_.extend(ui),trace_thread_llm_as_judge:Vw.extend(ui),trace_thread_user_defined_metric_python:Ow.extend(ui),span_llm_as_judge:Cw.extend(ui),span_user_defined_metric_python:Nw.extend(ui)}).transform({transform:p=>p,untransform:p=>p});});var h_,y_=n(()=>{b();h_=r.object({value:r.number().optional()});});var me,d$=n(()=>{b();me=r.object({ids:r.list(r.string())});});var u8,u$=n(()=>{b();u8=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var b_,R_=n(()=>{b();b_=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var gi,g$=n(()=>{b();R_();gi=r.object({biInformation:r.property("bi_information",r.list(b_).optional())});});var x_,f$=n(()=>{b();zb();x_=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pb).optional()});});var w_,__=n(()=>{b();w_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var k_,A_=n(()=>{b();__();k_=r.object({details:w_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var P_,z_=n(()=>{b();P_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var S_,T_=n(()=>{b();z_();S_=r.object({details:P_.optional()});});var v_,j_=n(()=>{b();v_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var kn,qc=n(()=>{b();j_();kn=r.object({details:v_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var E_,C_=n(()=>{b();E_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var I_,D_=n(()=>{b();C_();I_=r.object({details:E_.optional()});});var U_,N_=n(()=>{b();U_=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var B_,F_=n(()=>{b();B_=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var M_,h$=n(()=>{b();N_();F_();de();M_=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:B_.optional(),status:U_.optional(),args:L.optional(),result:L.optional(),error:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional()),pickedUpAt:r.property("picked_up_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional()),durationMs:r.property("duration_ms",r.number().optional())});});var W_,L_=n(()=>{b();W_=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var V_,J_=n(()=>{b();L_();de();V_=r.object({commandId:r.property("command_id",r.string().optional()),type:W_.optional(),args:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var H_,y$=n(()=>{b();J_();H_=r.object({commands:r.list(V_).optional()});});var G_,b$=n(()=>{b();G_=r.object({commandId:r.property("command_id",r.string().optional())});});var O_,K_=n(()=>{b();O_=r.object({categories:r.record(r.string(),r.number())});});var $_,Q_=n(()=>{b();K_();$_=r.object({details:O_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Y_,X_=n(()=>{b();Y_=r.object({categories:r.record(r.string(),r.number())});});var Z_,q_=n(()=>{b();X_();Z_=r.object({details:Y_.optional()});});var ek,rk=n(()=>{b();ek=r.object({categories:r.record(r.string(),r.number())});});var An,el=n(()=>{b();rk();An=r.object({details:ek.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var tk,ik=n(()=>{b();tk=r.object({categories:r.record(r.string(),r.number())});});var ok,ak=n(()=>{b();ik();ok=r.object({details:tk.optional()});});var nk,sk=n(()=>{b();$t();Nc();nk=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(Ya).optional()),functionCall:r.property("function_call",Rr.optional())});});var pk,ck=n(()=>{b();pk=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var lk,mk=n(()=>{b();ck();lk=r.object({content:r.list(pk).optional()});});var dk,uk=n(()=>{b();QR();sk();mk();dk=r.object({index:r.number().optional(),message:$R.optional(),delta:nk.optional(),finishReason:r.property("finish_reason",r.string().optional()),logprobs:lk.optional()});});var gk,fk=n(()=>{b();gk=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});});var hk,yk=n(()=>{b();hk=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});});var bk,Rk=n(()=>{b();fk();yk();bk=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",hk.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",gk.optional())});});var xk,R$=n(()=>{b();uk();Rk();xk=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(dk).optional(),usage:bk.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});});var wk,_k=n(()=>{b();wk=r.enum_(["TOPIC","PII"]);});var kk,Ak=n(()=>{b();kk=r.enum_(["passed","failed"]);});var Pk,zk=n(()=>{b();_k();Ak();Pk=r.object({name:wk.optional(),result:kk.optional()});});var Sk,Tk=n(()=>{b();Sk=r.enum_(["TOPIC","PII"]);});var vk,jk=n(()=>{b();vk=r.enum_(["passed","failed"]);});var Ek,Ck=n(()=>{b();Tk();jk();Ek=r.object({name:Sk.optional(),result:vk.optional()});});var Ik,Dk=n(()=>{b();Ik=r.object({typeName:r.string().optional()});});var g8,x$=n(()=>{b();Dk();g8=r.object({type:Ik.optional(),closed:r.boolean().optional()});});var Uk,Nk=n(()=>{b();Uk=r.object({typeName:r.string().optional()});});var f8,w$=n(()=>{b();Nk();f8=r.object({type:Uk.optional(),closed:r.boolean().optional()});});var Bk,Fk=n(()=>{b();Bk=r.enum_(["string","number","object","boolean","array","null"]);});var Mk,Wk=n(()=>{b();Fk();Mk=r.object({name:r.string().optional(),types:r.list(Bk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Lk,Vk=n(()=>{b();Lk=r.enum_(["string","number","object","boolean","array","null"]);});var Jk,Hk=n(()=>{b();Vk();Jk=r.object({name:r.string().optional(),types:r.list(Lk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Gk,Ok=n(()=>{b();Gk=r.enum_(["string","number","object","boolean","array","null"]);});var Kk,$k=n(()=>{b();Ok();Kk=r.object({name:r.string().optional(),types:r.list(Gk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Qk,Yk=n(()=>{b();Qk=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var _t,Pn=n(()=>{b();_t=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Xk,Zk=n(()=>{b();Xk=r.enum_(["trace","span"]);});var qk,eA=n(()=>{b();qk=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var rl,_$=n(()=>{b();Zk();eA();rl=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Xk),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(qk))});});var rA,tA=n(()=>{b();rA=r.object({value:r.number().optional()});});var iA,k$=n(()=>{b();iA=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var oA,aA=n(()=>{b();oA=r.enum_(["workspace","insights"]);});var nA,sA=n(()=>{b();nA=r.enum_(["multi_project","experiments"]);});var Ze,pA=n(()=>{b();aA();sA();mr();Ze=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:nA.optional(),scope:oA.optional(),description:r.string().optional(),config:_e,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var kt,A$=n(()=>{b();pA();kt=r.object({content:r.list(Ze).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var cA,lA=n(()=>{b();cA=r.enum_(["multi_project","experiments"]);});var zn,P$=n(()=>{b();lA();mr();zn=r.object({name:r.string().optional(),type:cA.optional(),description:r.string().optional(),config:_e.optional()});});var mA,dA=n(()=>{b();mA=r.enum_(["multi_project","experiments"]);});var Sn,z$=n(()=>{b();dA();wr();Sn=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:mA.optional(),description:r.string().optional(),config:Se});});var h8,S$=n(()=>{b();h8=r.object({time:r.date(),value:r.number().optional()});});var uA,gA=n(()=>{b();uA=r.object({time:r.date(),value:r.number().optional()});});var fA,hA=n(()=>{b();fA=r.enum_(["unknown","processing","completed","failed"]);});var yA,bA=n(()=>{b();yA=r.enum_(["dataset","evaluation_suite"]);});var Tn,tl=n(()=>{b();Tn=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var RA,xA=n(()=>{b();RA=r.enum_(["private","public"]);});var y8,T$=n(()=>{b();hA();bA();tl();xA();y8=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:yA.optional(),visibility:RA.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:fA.optional(),latestVersion:r.property("latest_version",Tn.optional())});});var b8,v$=n(()=>{b();b8=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var wA,_A=n(()=>{b();wA=r.enum_(["manual","trace","span","sdk"]);});var kA,AA=n(()=>{b();kA=r.enum_(["passed","failed"]);});var PA,zA=n(()=>{b();AA();PA=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:kA.optional()});});var vn,il=n(()=>{b();_A();Qt();nt();Up();zA();de();vn=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:wA,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional()),experimentItems:r.property("experiment_items",r.list($o).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),PA).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var SA,j$=n(()=>{b();il();SA=r.object({generatedSamples:r.property("generated_samples",r.list(vn).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var R8,E$=n(()=>{b();il();R8=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(vn),batchGroupId:r.property("batch_group_id",r.string().optional())});});var TA,C$=n(()=>{b();TA=r.record(r.string(),r.unknown());});var vA,jA=n(()=>{b();vA=r.enum_(["manual","trace","span","sdk"]);});var EA,CA=n(()=>{b();EA=r.enum_(["llm_judge","code_metric"]);});var IA,DA=n(()=>{b();IA=r.record(r.string(),r.unknown());});var UA,NA=n(()=>{b();CA();DA();UA=r.object({name:r.string(),type:EA,config:IA});});var jn,ol=n(()=>{b();jn=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var BA,FA=n(()=>{b();BA=r.enum_(["passed","failed"]);});var MA,WA=n(()=>{b();MA=r.enum_(["default","hidden"]);});var LA,VA=n(()=>{b();LA=r.enum_(["ui","sdk","online_scoring"]);});var JA,HA=n(()=>{b();JA=r.enum_(["ui","sdk","online_scoring"]);});var GA,OA=n(()=>{b();HA();GA=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:JA.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var KA,$A=n(()=>{b();VA();OA();KA=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:LA,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),GA).optional())});});var al,QA=n(()=>{b();al=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var YA,XA=n(()=>{b();MR();Yk();ol();FA();WA();$A();QA();YA=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),input:al.optional(),output:al.optional(),feedbackScores:r.property("feedback_scores",r.list(KA).optional()),comments:r.list(Qk).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",MA.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",jn.optional()),assertionResults:r.property("assertion_results",r.list(FR).optional()),status:BA.optional()});});var ZA,qA=n(()=>{b();ZA=r.enum_(["passed","failed"]);});var eP,rP=n(()=>{b();qA();eP=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:ZA.optional()});});var tP,iP=n(()=>{b();jA();NA();ol();XA();rP();de();tP=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:vA,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(UA).optional(),executionPolicy:r.property("execution_policy",jn.optional()),experimentItems:r.property("experiment_items",r.list(YA).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),eP).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var oP,I$=n(()=>{b();Hk();iP();oP=r.object({content:r.list(tP).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Jk).optional(),sortableBy:r.list(r.string()).optional()});});var aP,nP=n(()=>{b();aP=r.enum_(["manual","trace","span","sdk"]);});var sP,pP=n(()=>{b();sP=r.enum_(["llm_judge","code_metric"]);});var En,nl=n(()=>{b();pP();mr();En=r.object({name:r.string(),type:sP,config:_e});});var Cn,sl=n(()=>{b();Cn=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var cP,lP=n(()=>{b();cP=r.enum_(["default","hidden"]);});var In,mP=n(()=>{b();lP();In=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",cP.optional())});});var dP,uP=n(()=>{b();dP=r.enum_(["passed","failed"]);});var gP,fP=n(()=>{b();uP();gP=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:dP.optional()});});var Dn,hP=n(()=>{b();nP();nl();sl();mP();fP();de();Dn=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:aP,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(En).optional(),executionPolicy:r.property("execution_policy",Cn.optional()),experimentItems:r.property("experiment_items",r.list(In).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),gP).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var yP,D$=n(()=>{b();$k();hP();yP=r.object({content:r.list(Dn).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Kk).optional(),sortableBy:r.list(r.string()).optional()});});var bP,RP=n(()=>{b();bP=r.enum_(["unknown","processing","completed","failed"]);});var xP,wP=n(()=>{b();xP=r.enum_(["dataset","evaluation_suite"]);});var _P,kP=n(()=>{b();_P=r.enum_(["private","public"]);});var Un,pl=n(()=>{b();Un=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var fi,AP=n(()=>{b();RP();wP();kP();pl();fi=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:xP.optional(),visibility:_P.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:bP.optional(),latestVersion:r.property("latest_version",Un.optional())});});var Nn,U$=n(()=>{b();AP();Nn=r.object({content:r.list(fi).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var PP,zP=n(()=>{b();PP=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var SP,N$=n(()=>{b();zP();SP=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:PP.optional()});});var Lr,TP=n(()=>{b();nl();sl();Lr=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),versionName:r.property("version_name",r.string().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),evaluators:r.list(En).optional(),executionPolicy:r.property("execution_policy",Cn.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var vP,B$=n(()=>{b();TP();vP=r.object({content:r.list(Lr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var jP,EP=n(()=>{b();jP=r.enum_(["trace","span"]);});var x8,F$=n(()=>{b();EP();x8=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",jP),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var Bn,M$=n(()=>{b();Bn=r.object({name:r.string(),author:r.string().optional()});});var hi,W$=n(()=>{b();hi=r.object({ids:r.list(r.string())});});var w8,L$=n(()=>{b();w8=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Fn,CP=n(()=>{b();Fn=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var IP,V$=n(()=>{b();CP();IP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fn).optional(),sortableBy:r.list(r.string()).optional()});});var Mn,cl=n(()=>{b();Mn=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var DP,UP=n(()=>{b();DP=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Wn,ll=n(()=>{b();Wn=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var ue,J$=n(()=>{b();ue=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var _8,H$=n(()=>{b();_8=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var k8,G$=n(()=>{b();k8=r.object({errors:r.list(r.string()).optional()});});var A8,O$=n(()=>{b();A8=r.object({errors:r.list(r.string()).optional()});});var P8,K$=n(()=>{b();P8=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var z8,$$=n(()=>{b();z8=r.object({errors:r.list(r.string()).optional()});});var NP,BP=n(()=>{b();NP=r.enum_(["dataset","evaluation_suite"]);});var FP,MP=n(()=>{b();FP=r.enum_(["running","completed","cancelled"]);});var WP,LP=n(()=>{b();WP=r.enum_(["regular","trial","mini-batch","mutation"]);});var S8,Q$=n(()=>{b();LR();st();tl();BP();Ip();MP();LP();Mr();Qe();ni();Vo();S8=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),type:WP.optional(),evaluationMethod:r.property("evaluation_method",NP.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),comments:r.list(fe).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:FP.optional(),experimentScores:r.property("experiment_scores",r.list(Mo).optional()),promptVersion:r.property("prompt_version",Fr.optional()),promptVersions:r.property("prompt_versions",r.list(Fr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",Tn.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(WR).optional())});});var VP,JP=n(()=>{b();VP=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var HP,Y$=n(()=>{b();JP();HP=r.object({experiments:r.list(VP).optional(),totalItems:r.property("total_items",r.number().optional())});});var GP,OP=n(()=>{b();Vb();GP=r.object({label:r.string().optional(),aggregations:Lb.optional()});});var KP,X$=n(()=>{b();OP();KP=r.object({content:r.record(r.string(),GP).optional()});});var $P,QP=n(()=>{b();$P=r.object({label:r.string().optional()});});var YP,XP=n(()=>{b();YP=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var ZP,qP=n(()=>{b();XP();ZP=r.object({groupsDetails:r.property("groups_details",r.list(YP).optional())});});var ez,Z$=n(()=>{b();QP();qP();ez=r.object({content:r.record(r.string(),$P).optional(),details:ZP.optional()});});var rz,tz=n(()=>{b();rz=r.enum_(["sdk","experiment","playground","optimization"]);});var iz,oz=n(()=>{b();iz=r.enum_(["general","tool","llm","guardrail"]);});var Ln,ml=n(()=>{b();st();ai();pt();Qe();tz();oz();Ln=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:iz.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ar.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:rz.optional()});});var az,nz=n(()=>{b();az=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var sz,pz=n(()=>{b();zk();sz=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Pk).optional()});});var cz,lz=n(()=>{b();cz=r.enum_(["sdk","experiment","playground","optimization"]);});var mz,dz=n(()=>{b();mz=r.enum_(["default","hidden"]);});var Vn,dl=n(()=>{b();st();ai();nz();pt();pz();Qe();lz();dz();Vn=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ar.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(sz).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",mz.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional(),experiment:az.optional(),source:cz.optional()});});var uz,gz=n(()=>{b();pt();Qe();ml();dl();uz=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:Vn.optional(),spans:r.list(Ln).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var T8,q$=n(()=>{b();gz();T8=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(uz)});});var fz,hz=n(()=>{b();fz=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var yz,bz=n(()=>{b();yz=r.enum_(["dataset","evaluation_suite"]);});var Rz,xz=n(()=>{b();Rz=r.enum_(["running","completed","cancelled"]);});var wz,_z=n(()=>{b();wz=r.enum_(["regular","trial","mini-batch","mutation"]);});var kz,Az=n(()=>{b();kz=r.object({name:r.string(),value:r.number()});});var We,yi=n(()=>{b();We=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Jn,ul=n(()=>{b();Jn=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Hn,Pz=n(()=>{b();JR();Pn();pl();bz();xz();_z();Az();$a();yi();ul();pc();Hn=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:We.optional(),tags:r.list(r.string()).optional(),type:wz.optional(),evaluationMethod:r.property("evaluation_method",yz.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),comments:r.list(_t).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Jn.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:Rz.optional(),experimentScores:r.property("experiment_scores",r.list(kz).optional()),promptVersion:r.property("prompt_version",ii.optional()),promptVersions:r.property("prompt_versions",r.list(ii).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",Un.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(VR).optional())});});var Gn,eQ=n(()=>{b();Pz();Gn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Hn).optional(),sortableBy:r.list(r.string()).optional()});});var v8,rQ=n(()=>{de();v8=L;});var zz,Sz=n(()=>{b();zz=r.object({max:r.number(),min:r.number()});});var Tz,vz=n(()=>{b();Sz();Tz=r.object({details:zz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var jz,j8,tQ=n(()=>{b();A_();Q_();vz();jz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),j8=r.union("type",{numerical:Tz.extend(jz),categorical:$_.extend(jz),boolean:k_.extend(jz)}).transform({transform:p=>p,untransform:p=>p});});var Ez,Cz=n(()=>{b();Ez=r.object({max:r.number(),min:r.number()});});var Iz,Dz=n(()=>{b();Cz();Iz=r.object({details:Ez.optional()});});var Uz,Nz,iQ=n(()=>{b();T_();q_();Dz();Uz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Nz=r.union("type",{numerical:Iz.extend(Uz),categorical:Z_.extend(Uz),boolean:S_.extend(Uz)}).transform({transform:p=>p,untransform:p=>p});});var Bz,Fz=n(()=>{b();Bz=r.object({max:r.number(),min:r.number()});});var On,gl=n(()=>{b();Fz();On=r.object({details:Bz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Mz,Wz,Lz=n(()=>{b();qc();el();gl();Mz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Wz=r.union("type",{numerical:On.extend(Mz),categorical:An.extend(Mz),boolean:kn.extend(Mz)}).transform({transform:p=>p,untransform:p=>p});});var Vz,oQ=n(()=>{b();Lz();Vz=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Wz).optional()});});var Jz,Hz,aQ=n(()=>{b();qc();el();gl();Jz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Hz=r.union("type",{numerical:On.extend(Jz),categorical:An.extend(Jz),boolean:kn.extend(Jz)}).transform({transform:p=>p,untransform:p=>p});});var Gz,Oz=n(()=>{b();Gz=r.object({name:r.string(),value:r.number()});});var Kz,$z=n(()=>{b();Kz=r.enum_(["ui","sdk","online_scoring"]);});var Qz,Yz=n(()=>{b();$z();Qz=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Kz,author:r.string().optional(),id:r.string()});});var Kn,nQ=n(()=>{b();Yz();Kn=r.object({scores:r.list(Qz)});});var Xz,Zz=n(()=>{b();Xz=r.object({name:r.string().optional(),type:r.string().optional()});});var qz,sQ=n(()=>{b();Zz();qz=r.object({scores:r.list(Xz).optional()});});var eS,rS=n(()=>{b();eS=r.object({name:r.string().optional(),type:r.string().optional()});});var Vr,pQ=n(()=>{b();rS();Vr=r.object({scores:r.list(eS).optional()});});var tS,iS=n(()=>{b();tS=r.enum_(["ui","sdk","online_scoring"]);});var oS,aS=n(()=>{b();oS=r.enum_(["ui","sdk","online_scoring"]);});var nS,sS=n(()=>{b();aS();nS=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:oS.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var bi,fl=n(()=>{b();iS();sS();bi=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:tS,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),nS).optional())});});var pS,cS=n(()=>{b();pS=r.object({max:r.number(),min:r.number()});});var lS,mS=n(()=>{b();cS();lS=r.object({details:pS.optional()});});var dS,uS,cQ=n(()=>{b();D_();ak();mS();dS=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),uS=r.union("type",{numerical:lS.extend(dS),categorical:ok.extend(dS),boolean:I_.extend(dS)}).transform({transform:p=>p,untransform:p=>p});});var gS,fS=n(()=>{b();gS=r.enum_(["TOPIC","PII"]);});var hS,yS=n(()=>{b();hS=r.enum_(["passed","failed"]);});var bS,RS=n(()=>{b();fS();yS();de();bS=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:gS,result:hS,config:L,details:L});});var E8,lQ=n(()=>{b();RS();E8=r.object({guardrails:r.list(bS)});});var xS,wS=n(()=>{b();Ck();xS=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ek).optional()});});var C8,mQ=n(()=>{b();C8=r.object({ids:r.list(r.string())});});var _S,kS=n(()=>{b();_S=r.enum_(["count","errors","avg_duration","total_cost"]);});var AS,PS=n(()=>{b();kS();AS=r.object({type:_S.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var zS,dQ=n(()=>{b();PS();zS=r.object({stats:r.list(AS).optional()});});var SS,TS=n(()=>{b();SS=r.enum_(["pairing","connected","disconnected"]);});var vS,jS=n(()=>{b();vS=r.enum_(["connect","endpoint"]);});var $n,ES=n(()=>{b();bb();de();TS();jS();$n=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:SS.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(yb).optional(),capabilities:r.list(r.string()).optional(),checklist:L.optional(),type:vS.optional()});});var CS,uQ=n(()=>{b();CS=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var IS,gQ=n(()=>{b();Rc();IS=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(lt).optional()});});var DS,fQ=n(()=>{b();ES();DS=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($n).optional()});});var US,NS=n(()=>{b();US=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var BS,FS=n(()=>{b();NS();BS=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:US.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var MS,hQ=n(()=>{b();FS();MS=r.object({content:r.list(BS).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var WS,LS=n(()=>{b();WS=r.enum_(["trace","thread","span"]);});var Qn,yQ=n(()=>{b();LS();Qn=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",WS)});});var Yn,bQ=n(()=>{b();Yn=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var hl,RQ=n(()=>{b();hl=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var yl,xQ=n(()=>{b();yl=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.enum_(["running","completed","cancelled","initialized","error"]);});var HS,GS=n(()=>{b();de();HS=r.object({type:r.string(),parameters:L.optional()});});var OS,KS=n(()=>{b();GS();OS=r.object({metrics:r.list(HS)});});var $S,QS=n(()=>{b();de();$S=r.object({model:r.string(),parameters:L.optional()});});var YS,XS=n(()=>{b();de();YS=r.object({type:r.string(),parameters:L.optional()});});var ZS,qS=n(()=>{b();ZS=r.object({role:r.string(),content:r.string()});});var eT,rT=n(()=>{b();qS();eT=r.object({messages:r.list(ZS)});});var tT,iT=n(()=>{b();KS();QS();XS();rT();tT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:eT,llmModel:r.property("llm_model",$S),evaluation:OS,optimizer:YS});});var I8,wQ=n(()=>{b();Mr();Qe();JS();iT();I8=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:VS,metadata:le.optional(),studioConfig:r.property("studio_config",tT.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),experimentScores:r.property("experiment_scores",r.list(Te).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var oT,aT=n(()=>{b();oT=r.enum_(["running","completed","cancelled","initialized","error"]);});var nT,sT=n(()=>{b();mr();nT=r.object({type:r.string(),parameters:_e.optional()});});var pT,cT=n(()=>{b();sT();pT=r.object({metrics:r.list(nT)});});var lT,mT=n(()=>{b();mr();lT=r.object({model:r.string(),parameters:_e.optional()});});var dT,uT=n(()=>{b();mr();dT=r.object({type:r.string(),parameters:_e.optional()});});var gT,fT=n(()=>{b();gT=r.object({role:r.string(),content:r.string()});});var hT,yT=n(()=>{b();fT();hT=r.object({messages:r.list(gT)});});var bT,RT=n(()=>{b();cT();mT();uT();yT();bT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:hT,llmModel:r.property("llm_model",lT),evaluation:pT,optimizer:dT});});var Xn,xT=n(()=>{b();$a();yi();aT();RT();Xn=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:oT,metadata:We.optional(),studioConfig:r.property("studio_config",bT.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),experimentScores:r.property("experiment_scores",r.list(Wr).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var Zn,_Q=n(()=>{b();xT();Zn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Xn).optional(),sortableBy:r.list(r.string()).optional()});});var wT,_T=n(()=>{b();wr();wT=r.object({type:r.string(),parameters:Se.optional()});});var kT,AT=n(()=>{b();_T();kT=r.object({metrics:r.list(wT)});});var PT,zT=n(()=>{b();wr();PT=r.object({model:r.string(),parameters:Se.optional()});});var ST,TT=n(()=>{b();wr();ST=r.object({type:r.string(),parameters:Se.optional()});});var vT,jT=n(()=>{b();vT=r.object({role:r.string(),content:r.string()});});var ET,CT=n(()=>{b();jT();ET=r.object({messages:r.list(vT)});});var IT,DT=n(()=>{b();AT();zT();TT();CT();IT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:ET,llmModel:r.property("llm_model",PT),evaluation:kT,optimizer:ST});});var UT,kQ=n(()=>{b();UT=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var NT,BT=n(()=>{b();NT=r.enum_(["running","completed","cancelled","initialized","error"]);});var bl,AQ=n(()=>{b();Zt();DT();BT();bl=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:NT,metadata:Me.optional(),studioConfig:r.property("studio_config",IT.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FT,PQ=n(()=>{b();Wk();FT=r.object({columns:r.list(Mk).optional()});});var MT,WT=n(()=>{b();ul();MT=r.object({value:Jn.optional()});});var LT,VT=n(()=>{b();LT=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var JT,HT=n(()=>{b();JT=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var GT,OT=n(()=>{b();GT=r.enum_(["private","public"]);});var D8,zQ=n(()=>{b();cl();Mr();ni();OT();D8=r.object({id:r.string().optional(),name:r.string(),visibility:GT.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Mn.optional())});});var KT,$T=n(()=>{b();KT=r.enum_(["private","public"]);});var QT,SQ=n(()=>{b();UP();Oz();VT();$T();QT=r.object({id:r.string().optional(),name:r.string(),visibility:KT.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Gz).optional()),duration:LT.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",DP.optional())});});var YT,XT=n(()=>{b();YT=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var ZT,qT=n(()=>{b();ZT=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var ev,rv=n(()=>{b();gA();ev=r.object({name:r.string().optional(),data:r.list(uA).optional()});});var tv,TQ=n(()=>{b();XT();qT();rv();tv=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",ZT.optional()),interval:YT.optional(),results:r.list(ev).optional()});});var iv,ov=n(()=>{b();iv=r.enum_(["private","public"]);});var qn,av=n(()=>{b();ov();qn=r.object({id:r.string().optional(),name:r.string(),visibility:iv.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});});var nv,vQ=n(()=>{b();av();nv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(qn).optional(),sortableBy:r.list(r.string()).optional()});});var sv,pv,cv=n(()=>{b();y_();tA();WT();sv=r.object({name:r.string().optional()}),pv=r.union("type",{PERCENTAGE:MT.extend(sv),COUNT:rA.extend(sv),AVG:h_.extend(sv)}).transform({transform:p=>p,untransform:p=>p});});var Jr,jQ=n(()=>{b();cv();Jr=r.object({stats:r.list(pv).optional()});});var lv,mv=n(()=>{b();cl();Mr();ni();lv=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Mn.optional())});});var dv,EQ=n(()=>{b();mv();dv=r.object({content:r.list(lv).optional()});});var uv,gv=n(()=>{b();uv=r.enum_(["text","chat"]);});var fv,hv=n(()=>{b();fv=r.enum_(["mustache","jinja2","python"]);});var yv,bv=n(()=>{b();yv=r.enum_(["text","chat"]);});var Rv,xv=n(()=>{b();Rv=r.enum_(["mustache","jinja2","python"]);});var Rl,wv=n(()=>{b();de();bv();xv();Rl=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:L.optional(),type:Rv.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",yv.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var U8,CQ=n(()=>{b();de();gv();hv();wv();U8=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:L.optional(),changeDescription:r.property("change_description",r.string().optional()),type:fv.optional(),templateStructure:r.property("template_structure",uv.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Rl.optional()),requestedVersion:r.property("requested_version",Rl.optional())});});var _v,kv=n(()=>{b();_v=r.enum_(["text","chat"]);});var xl,IQ=n(()=>{b();kv();oc();xl=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",_v.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Ye.optional()),requestedVersion:r.property("requested_version",Ye.optional())});});var Av,Pv=n(()=>{b();Av=r.enum_(["text","chat"]);});var zv,Sv=n(()=>{b();Pv();zv=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",Av.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});});var es,DQ=n(()=>{b();Sv();es=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(zv).optional(),sortableBy:r.list(r.string()).optional()});});var Tv,vv=n(()=>{b();Tv=r.enum_(["text","chat"]);});var jv,Ev=n(()=>{b();jv=r.enum_(["mustache","jinja2","python"]);});var Cv,Iv=n(()=>{b();mr();vv();Ev();Cv=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:_e.optional(),type:jv.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Tv.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Dv,UQ=n(()=>{b();Iv();Dv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cv).optional(),sortableBy:r.list(r.string()).optional()});});var Uv,Nv=n(()=>{b();Uv=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var N8,NQ=n(()=>{b();Nv();N8=r.object({id:r.string().optional(),provider:Uv,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});});var Bv,Fv=n(()=>{b();Bv=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var rs,Mv=n(()=>{b();Fv();rs=r.object({id:r.string().optional(),provider:Bv,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});});var Wv,BQ=n(()=>{b();Mv();Wv=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(rs).optional(),sortableBy:r.list(r.string()).optional()});});var At,wl=n(()=>{b();At=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var Lv,Vv=n(()=>{b();Lv=r.enum_(["organization","workspace","project"]);});var Jv,Hv=n(()=>{b();Jv=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ri,Gv=n(()=>{b();Vv();Hv();Ri=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:Lv.optional(),retention:Jv,applyToPast:r.property("apply_to_past",r.boolean().optional()),enabled:r.boolean().optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),catchUpCursor:r.property("catch_up_cursor",r.string().optional()),catchUpDone:r.property("catch_up_done",r.boolean().optional())});});var Ov,FQ=n(()=>{b();Gv();Ov=r.object({content:r.list(Ri).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var Kv,MQ=n(()=>{b();Kv=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean(),v2WorkspaceAllowlistIds:r.list(r.string()),forceWorkspaceVersion:r.string(),defaultPageSize:r.number().optional(),v2WorkspaceAllowlist:r.string().optional()});});var B8,WQ=n(()=>{b();ml();B8=r.object({spans:r.list(Ln)});});var $v,Qv=n(()=>{b();$v=r.enum_(["sdk","experiment","playground","optimization"]);});var Yv,Xv=n(()=>{b();Yv=r.enum_(["general","tool","llm","guardrail"]);});var ts,Zv=n(()=>{b();Pn();ll();fl();yi();Qv();Xv();ts=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Yv.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:We.optional(),output:We.optional(),metadata:We.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Wn.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(bi).optional()),comments:r.list(_t).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:$v.optional()});});var qv,LQ=n(()=>{b();Zv();qv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ts).optional(),sortableBy:r.list(r.string()).optional()});});var ej,rj=n(()=>{b();ej=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var tj,VQ=n(()=>{b();rj();tj=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(ej).optional())});});var ij,JQ=n(()=>{b();ij=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var oj,HQ=n(()=>{b();oj=r.object({names:r.list(r.string()).optional()});});var F8,GQ=n(()=>{b();dl();F8=r.object({traces:r.list(Vn)});});var aj,nj=n(()=>{b();aj=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var sj,OQ=n(()=>{b();nj();sj=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(aj).optional())});});var pj,cj=n(()=>{b();pj=r.enum_(["sdk","experiment","playground","optimization"]);});var lj,mj=n(()=>{b();lj=r.enum_(["default","hidden"]);});var is,dj=n(()=>{b();Pn();ll();hz();fl();wS();yi();cj();mj();is=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:We.optional(),output:We.optional(),metadata:We.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Wn.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(bi).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(bi).optional()),comments:r.list(_t).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(xS).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",lj.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional(),experiment:fz.optional(),source:pj.optional()});});var uj,KQ=n(()=>{b();dj();uj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(is).optional(),sortableBy:r.list(r.string()).optional()});});var gj,fj=n(()=>{b();gj=r.enum_(["active","inactive"]);});var os,hj=n(()=>{b();st();pt();Qe();fj();os=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",le.optional()),lastMessage:r.property("last_message",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),status:gj.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(fe).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var _l,$Q=n(()=>{b();_l=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});});var yj,QQ=n(()=>{b();hj();yj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(os).optional(),sortableBy:r.list(r.string()).optional()});});var bj,YQ=n(()=>{b();bj=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var Rj,xj=n(()=>{b();Rj=r.enum_(["success","failure"]);});var wj,XQ=n(()=>{b();xj();wj=r.object({status:Rj.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});});var _j,ZQ=n(()=>{b();_j=r.object({completed:r.boolean().optional()});});var as,qQ=n(()=>{b();as=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional()),colorMap:r.property("color_map",r.record(r.string(),r.string()).optional())});});var M8,e4=n(()=>{b();M8=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kl,r4=n(()=>{b();wl();kl=r.object({results:r.list(At).optional()});});var xi,t4=n(()=>{b();xi=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kj,i4=n(()=>{b();wl();kj=r.object({results:r.list(At).optional()});});var Aj,o4=n(()=>{b();Aj=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var Pj,a4=n(()=>{b();HT();Pj=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(JT).optional()});});var zj,Sj=n(()=>{b();zj=r.enum_(["version_1","version_2"]);});var Tj,n4=n(()=>{b();Sj();Tj=r.object({opikVersion:r.property("opik_version",zj.optional())});});var s4=n(()=>{bb();zb();xb();XK();Tb();Wb();Db();ZK();Eg();Ab();_b();Cb();jb();Fb();Nb();Vb();qK();Hb();e$();uR();tR();Zb();$b();nR();oR();Ob();yR();fR();Yb();lR();pR();wR();RR();r$();kR();ER();t$();i$();o$();NR();IR();SR();UR();vR();Ng();Ug();dh();Jg();Mg();Lg();MR();LR();JR();QR();GR();XR();a$();ex();tx();ox();n$();s$();sx();wx();Jc();cw();kw();mw();p$();c$();zw();Px();Gc();Iw();Sx();Oc();Bw();vx();Kc();Jw();Ex();$c();Kw();l$();Qw();Xw();qw();r_();i_();a_();s_();Ix();Qc();d_();m$();g_();y_();d$();u$();R_();g$();f$();A_();T_();qc();D_();__();z_();j_();C_();ey();Zh();h$();y$();J_();L_();N_();b$();F_();Q_();q_();el();ak();K_();X_();rk();ik();uk();R$();zk();_k();Ck();Tk();jk();Ak();x$();w$();Nk();Dk();Wk();Hk();Vk();$k();Ok();Fk();st();Yk();Pn();_$();Zk();fk();tA();k$();A$();pA();aA();sA();P$();lA();z$();dA();S$();gA();T$();v$();j$();Uf();Df();il();E$();C$();iP();jA();Sp();yf();I$();D$();hP();nP();_A();Rf();Tf();wf();U$();AP();RP();wP();kP();hA();bA();N$();zP();B$();TP();tl();pl();xA();F$();EP();M$();W$();sk();L$();V$();CP();cl();UP();ai();Dp();ll();Ac();J$();H$();G$();O$();K$();$$();Qt();NA();CA();nl();pP();mf();Pf();kf();nt();ol();sl();Sf();Q$();BP();Y$();X$();Z$();JP();Up();gz();lh();q$();XA();FA();WA();mP();lP();nz();hz();gh();hh();eQ();Pz();bz();xz();_z();zA();rP();qA();fP();uP();AA();Ip();Az();Ah();MP();LP();Vf();Mf();Lf();rQ();tQ();iQ();oQ();Lz();aQ();pt();Mr();Oz();$a();nQ();Yz();$z();qy();Xy();$A();VA();Zf();Of();sQ();pQ();fl();iS();bh();cQ();Ap();$t();QP();OP();XP();qP();RS();lQ();fS();yS();pz();wS();Bh();Ih();Uh();mQ();cx();Bx();Qx();Qe();QA();Ho();yi();Zt();de();DA();gy();mr();wr();Xg();dQ();PS();kS();Bc();Kx();aw();Xa();ux();Lx();qx();sn();Jx();fx();mn();rw();Za();pn();dn();qa();cn();Gx();yx();un();iw();ES();uQ();Rc();gc();gQ();Dy();hc();fQ();TS();jS();FS();NS();hQ();ck();mk();yQ();LS();bQ();Pp();eA();vz();Dz();gl();mS();Sz();Cz();Fz();cS();RQ();xQ();Jh();wQ();_Q();xT();aT();JS();iT();RT();DT();kQ();AQ();BT();PQ();hb();gb();WT();ni();VT();ul();HT();zQ();SQ();$T();TQ();XT();qT();vQ();av();ov();Ux();Yc();cv();jQ();EQ();mv();OT();CQ();IQ();kv();DQ();Sv();Pv();gv();yk();hv();Hf();wv();oc();hy();by();Vo();pc();Ph();UQ();Iv();vv();Ev();bv();xv();wy();NQ();BQ();Nv();Mv();Fv();rf();qg();wl();rv();FQ();Gv();Vv();Hv();Zz();rS();MQ();ml();WQ();uf();oh();eh();th();pi();kx();ri();ty();Xc();vw();Fc();uw();Ew();LQ();Zv();Qv();Xv();tz();VQ();oz();Wy();By();My();Mc();fw();Uw();Gy();Vy();Hy();JQ();of();KS();cT();AT();QS();mT();zT();qS();fT();jT();GS();sT();_T();XS();uT();TT();rT();yT();CT();HQ();pf();Nc();KR();nf();dl();GQ();OQ();ff();ph();nh();si();Rx();ti();oy();Hc();sw();KQ();dj();cj();mj();lz();hj();mt();cb();na();ny();Zc();Mw();$Q();Wc();yw();Lw();QQ();fj();sb();Lc();Rw();Gw();tb();rb();dz();ab();ob();Rk();Vc();ww();l_();_h();OA();HA();Yf();$f();sS();aS();xh();mx();Mx();Xx();eR();YQ();dR();XQ();xj();PR();ZQ();qQ();e4();r4();t4();i4();o4();rj();nj();a4();n4();Sj();});var O={};V(O,{ActivateRequest:()=>ia,Agent:()=>yb,AgentBlueprintHistory:()=>Pb,AgentBlueprintHistoryType:()=>Rb,AgentBlueprintPublic:()=>dt,AgentBlueprintPublicType:()=>Sb,AgentBlueprintWrite:()=>Mb,AgentBlueprintWriteType:()=>Ib,AgentConfigCreateWrite:()=>Dc,AgentConfigEnv:()=>jg,AgentConfigEnvSetByName:()=>po,AgentConfigEnvUpdate:()=>co,AgentConfigRemoveValues:()=>lo,AgentConfigValueHistory:()=>kb,AgentConfigValueHistoryType:()=>wb,AgentConfigValuePublic:()=>Eb,AgentConfigValuePublicType:()=>vb,AgentConfigValueWrite:()=>Bb,AgentConfigValueWriteType:()=>Ub,AggregationData:()=>Lb,Alert:()=>l8,AlertAlertType:()=>Jb,AlertPagePublic:()=>Oa,AlertPublic:()=>Ga,AlertPublicAlertType:()=>rR,AlertTrigger:()=>Xb,AlertTriggerConfig:()=>Kb,AlertTriggerConfigPublic:()=>aR,AlertTriggerConfigPublicType:()=>iR,AlertTriggerConfigType:()=>Gb,AlertTriggerConfigWrite:()=>hR,AlertTriggerConfigWriteType:()=>gR,AlertTriggerEventType:()=>Qb,AlertTriggerPublic:()=>cR,AlertTriggerPublicEventType:()=>sR,AlertTriggerWrite:()=>xR,AlertTriggerWriteEventType:()=>bR,AlertWrite:()=>Ka,AlertWriteAlertType:()=>_R,AnnotationQueue:()=>jR,AnnotationQueueBatch:()=>m8,AnnotationQueueBatchWrite:()=>uo,AnnotationQueueItemIds:()=>Uc,AnnotationQueuePagePublic:()=>BR,AnnotationQueuePublic:()=>Qa,AnnotationQueuePublicScope:()=>CR,AnnotationQueueReviewer:()=>zR,AnnotationQueueReviewerPublic:()=>DR,AnnotationQueueScope:()=>TR,AnnotationQueueUpdate:()=>go,AnnotationQueueWrite:()=>mo,AnnotationQueueWriteScope:()=>Dg,AssertionResult:()=>mh,AssertionResultBatch:()=>fo,AssertionResultBatchEntityType:()=>yp,AssertionResultBatchItem:()=>Vg,AssertionResultBatchItemSource:()=>Fg,AssertionResultBatchItemStatus:()=>Wg,AssertionResultCompare:()=>FR,AssertionScoreAverage:()=>WR,AssertionScoreAveragePublic:()=>VR,AssistantMessage:()=>$R,AssistantMessageRole:()=>HR,Attachment:()=>YR,AttachmentListRequestEntityType:()=>wp,AttachmentPage:()=>ZR,AudioUrl:()=>qR,AudioUrlPublic:()=>rx,AudioUrlWrite:()=>ix,AuthDetailsHolder:()=>ax,AutomationRuleEvaluator:()=>d8,AutomationRuleEvaluatorAction:()=>nx,AutomationRuleEvaluatorLlmAsJudge:()=>xx,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ln,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>pw,AutomationRuleEvaluatorObjectObjectPublic:()=>_w,AutomationRuleEvaluatorObjectObjectPublicAction:()=>lw,AutomationRuleEvaluatorPagePublic:()=>Aw,AutomationRuleEvaluatorPublic:()=>Sw,AutomationRuleEvaluatorPublicAction:()=>Pw,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Ax,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>fn,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>Cw,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>zx,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>hn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Nw,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Tx,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>yn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Vw,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>jx,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>bn,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Ow,AutomationRuleEvaluatorUpdate:()=>p_,AutomationRuleEvaluatorUpdateAction:()=>$w,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Yw,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Zw,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>e_,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>t_,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>o_,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>n_,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Cx,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Rn,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>m_,AutomationRuleEvaluatorWrite:()=>f_,AutomationRuleEvaluatorWriteAction:()=>u_,AvgValueStatPublic:()=>h_,BatchDelete:()=>me,BatchDeleteByProject:()=>u8,BiInformation:()=>b_,BiInformationResponse:()=>gi,BlueprintPageHistory:()=>x_,BooleanFeedbackDefinition:()=>k_,BooleanFeedbackDefinitionCreate:()=>S_,BooleanFeedbackDefinitionPublic:()=>kn,BooleanFeedbackDefinitionUpdate:()=>I_,BooleanFeedbackDetail:()=>w_,BooleanFeedbackDetailCreate:()=>P_,BooleanFeedbackDetailPublic:()=>v_,BooleanFeedbackDetailUpdate:()=>E_,BreakdownConfigPublic:()=>qh,BreakdownConfigPublicField:()=>Xh,BridgeCommand:()=>M_,BridgeCommandBatchResponse:()=>H_,BridgeCommandItem:()=>V_,BridgeCommandItemType:()=>W_,BridgeCommandNextRequest:()=>ba,BridgeCommandResultRequest:()=>Ra,BridgeCommandResultRequestStatus:()=>dc,BridgeCommandStatus:()=>U_,BridgeCommandSubmitRequest:()=>xa,BridgeCommandSubmitRequestType:()=>uc,BridgeCommandSubmitResponse:()=>G_,BridgeCommandType:()=>B_,CategoricalFeedbackDefinition:()=>$_,CategoricalFeedbackDefinitionCreate:()=>Z_,CategoricalFeedbackDefinitionPublic:()=>An,CategoricalFeedbackDefinitionUpdate:()=>ok,CategoricalFeedbackDetail:()=>O_,CategoricalFeedbackDetailCreate:()=>Y_,CategoricalFeedbackDetailPublic:()=>ek,CategoricalFeedbackDetailUpdate:()=>tk,ChatCompletionChoice:()=>dk,ChatCompletionRequest:()=>Ro,ChatCompletionResponse:()=>xk,Check:()=>Pk,CheckName:()=>wk,CheckPublic:()=>Ek,CheckPublicName:()=>Sk,CheckPublicResult:()=>vk,CheckResult:()=>kk,ChunkedOutputJsonNode:()=>g8,ChunkedOutputJsonNodePublic:()=>f8,ChunkedOutputJsonNodePublicType:()=>Uk,ChunkedOutputJsonNodeType:()=>Ik,Column:()=>Mk,ColumnCompare:()=>Jk,ColumnCompareTypesItem:()=>Lk,ColumnPublic:()=>Kk,ColumnPublicTypesItem:()=>Gk,ColumnTypesItem:()=>Bk,Comment:()=>fe,CommentCompare:()=>Qk,CommentPublic:()=>_t,CompleteMultipartUploadRequest:()=>rl,CompleteMultipartUploadRequestEntityType:()=>Xk,CompletionTokensDetails:()=>gk,CountValueStatPublic:()=>rA,CreateDatasetItemsFromSpansRequest:()=>xo,CreateDatasetItemsFromTracesRequest:()=>wo,CreateLocalRunnerJobRequest:()=>_a,CreatePromptVersionDetail:()=>ma,CreatePromptVersionDetailTemplateStructure:()=>ac,CreateSessionRequest:()=>oa,CreateSessionRequestType:()=>Yp,CreateSessionResponse:()=>iA,DashboardPagePublic:()=>kt,DashboardPublic:()=>Ze,DashboardPublicScope:()=>oA,DashboardPublicType:()=>nA,DashboardUpdatePublic:()=>zn,DashboardUpdatePublicType:()=>cA,DashboardWrite:()=>Sn,DashboardWriteType:()=>mA,DataPointDouble:()=>h8,DataPointNumberPublic:()=>uA,Dataset:()=>y8,DatasetExpansion:()=>b8,DatasetExpansionResponse:()=>SA,DatasetExpansionWrite:()=>_o,DatasetExportJobPublic:()=>Yt,DatasetExportJobPublicStatus:()=>If,DatasetIdentifier:()=>ko,DatasetIdentifierPublic:()=>Ao,DatasetItem:()=>vn,DatasetItemBatch:()=>R8,DatasetItemBatchUpdate:()=>zo,DatasetItemBatchWrite:()=>To,DatasetItemChangesPublic:()=>TA,DatasetItemCompare:()=>tP,DatasetItemCompareSource:()=>vA,DatasetItemFilter:()=>Po,DatasetItemFilterOperator:()=>hf,DatasetItemPageCompare:()=>oP,DatasetItemPagePublic:()=>yP,DatasetItemPublic:()=>Dn,DatasetItemPublicSource:()=>aP,DatasetItemSource:()=>wA,DatasetItemStreamRequest:()=>vo,DatasetItemUpdate:()=>bf,DatasetItemWrite:()=>So,DatasetItemWriteSource:()=>xf,DatasetItemsDelete:()=>jo,DatasetPagePublic:()=>Nn,DatasetPublic:()=>fi,DatasetPublicStatus:()=>bP,DatasetPublicType:()=>xP,DatasetPublicVisibility:()=>_P,DatasetStatus:()=>fA,DatasetType:()=>yA,DatasetUpdate:()=>Eo,DatasetUpdateVisibility:()=>Tp,DatasetVersionDiff:()=>SP,DatasetVersionDiffStats:()=>PP,DatasetVersionPagePublic:()=>vP,DatasetVersionPublic:()=>Lr,DatasetVersionRestorePublic:()=>Co,DatasetVersionRetrieveRequestPublic:()=>Io,DatasetVersionSummary:()=>Tn,DatasetVersionSummaryPublic:()=>Un,DatasetVersionTag:()=>Do,DatasetVersionUpdatePublic:()=>Uo,DatasetVisibility:()=>RA,DatasetWrite:()=>No,DatasetWriteType:()=>vp,DatasetWriteVisibility:()=>jp,DeleteAttachmentsRequest:()=>x8,DeleteAttachmentsRequestEntityType:()=>jP,DeleteFeedbackScore:()=>Bn,DeleteIdsHolder:()=>hi,DeleteThreadFeedbackScores:()=>Ca,DeleteTraceThreads:()=>Ia,Delta:()=>nk,DownloadAttachmentRequestEntityType:()=>_p,Environment:()=>w8,EnvironmentPagePublic:()=>IP,EnvironmentPublic:()=>Fn,EnvironmentUpdate:()=>Bo,EnvironmentWrite:()=>Fo,ErrorCountWithDeviation:()=>Mn,ErrorCountWithDeviationDetailed:()=>DP,ErrorInfo:()=>Ar,ErrorInfoExperimentItemBulkWriteView:()=>Go,ErrorInfoPublic:()=>Wn,ErrorInfoWrite:()=>Ta,ErrorMessage:()=>ue,ErrorMessageDetail:()=>_8,ErrorMessageDetailed:()=>k8,ErrorMessageHistory:()=>A8,ErrorMessagePublic:()=>P8,ErrorMessageWrite:()=>z8,EvaluatorItem:()=>xr,EvaluatorItemCompare:()=>UA,EvaluatorItemCompareType:()=>EA,EvaluatorItemPublic:()=>En,EvaluatorItemPublicType:()=>sP,EvaluatorItemType:()=>lf,EvaluatorItemWrite:()=>Af,EvaluatorItemWriteType:()=>_f,ExecutionPolicy:()=>Ke,ExecutionPolicyCompare:()=>jn,ExecutionPolicyPublic:()=>Cn,ExecutionPolicyWrite:()=>zf,Experiment:()=>S8,ExperimentBatchUpdate:()=>Lo,ExperimentEvaluationMethod:()=>NP,ExperimentExecutionRequest:()=>Jo,ExperimentExecutionResponse:()=>HP,ExperimentGroupAggregationsResponse:()=>KP,ExperimentGroupResponse:()=>ez,ExperimentInfo:()=>VP,ExperimentItem:()=>$o,ExperimentItemBulkRecord:()=>uz,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>ch,ExperimentItemBulkUpload:()=>T8,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Oo,ExperimentItemCompare:()=>YA,ExperimentItemCompareStatus:()=>BA,ExperimentItemCompareTraceVisibilityMode:()=>MA,ExperimentItemPublic:()=>In,ExperimentItemPublicTraceVisibilityMode:()=>cP,ExperimentItemReference:()=>az,ExperimentItemReferencePublic:()=>fz,ExperimentItemStatus:()=>uh,ExperimentItemStreamRequest:()=>Ko,ExperimentItemTraceVisibilityMode:()=>fh,ExperimentItemsBatch:()=>Qo,ExperimentItemsDelete:()=>Yo,ExperimentPagePublic:()=>Gn,ExperimentPublic:()=>Hn,ExperimentPublicEvaluationMethod:()=>yz,ExperimentPublicStatus:()=>Rz,ExperimentPublicType:()=>wz,ExperimentRunSummary:()=>PA,ExperimentRunSummaryCompare:()=>eP,ExperimentRunSummaryCompareStatus:()=>ZA,ExperimentRunSummaryPublic:()=>gP,ExperimentRunSummaryPublicStatus:()=>dP,ExperimentRunSummaryStatus:()=>kA,ExperimentScore:()=>Mo,ExperimentScorePublic:()=>kz,ExperimentScoreWrite:()=>kh,ExperimentStatus:()=>FP,ExperimentStreamRequestPublic:()=>Xo,ExperimentType:()=>WP,ExperimentUpdate:()=>Wo,ExperimentUpdateStatus:()=>Ff,ExperimentUpdateType:()=>Wf,ExperimentWrite:()=>Zo,ExperimentWriteEvaluationMethod:()=>Bp,ExperimentWriteStatus:()=>Fp,ExperimentWriteType:()=>Mp,ExportTraceServiceRequest:()=>v8,Feedback:()=>j8,FeedbackCreate:()=>Nz,FeedbackDefinitionPagePublic:()=>Vz,FeedbackObjectPublic:()=>Wz,FeedbackPublic:()=>Hz,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>Te,FeedbackScoreAverageDetailed:()=>Gz,FeedbackScoreAveragePublic:()=>Wr,FeedbackScoreBatch:()=>Kn,FeedbackScoreBatchItem:()=>Qz,FeedbackScoreBatchItemSource:()=>Kz,FeedbackScoreBatchItemThread:()=>Zy,FeedbackScoreBatchItemThreadSource:()=>Yy,FeedbackScoreBatchThread:()=>Da,FeedbackScoreCompare:()=>KA,FeedbackScoreCompareSource:()=>LA,FeedbackScoreExperimentItemBulkWriteView:()=>Xf,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Gf,FeedbackScoreNames:()=>qz,FeedbackScoreNamesPublic:()=>Vr,FeedbackScorePublic:()=>bi,FeedbackScorePublicSource:()=>tS,FeedbackScoreSource:()=>yh,FeedbackUpdate:()=>uS,FindFeedbackDefinitionsRequestType:()=>Lp,FindFeedbackScoreNames1RequestType:()=>Sc,Function:()=>yo,FunctionCall:()=>Rr,GetSpanStatsRequestType:()=>Tc,GetSpansByProjectRequestType:()=>vc,GetWebhookExamplesRequestAlertType:()=>gp,GroupContent:()=>$P,GroupContentWithAggregations:()=>GP,GroupDetail:()=>YP,GroupDetails:()=>ZP,Guardrail:()=>bS,GuardrailBatch:()=>E8,GuardrailBatchWrite:()=>qo,GuardrailName:()=>gS,GuardrailResult:()=>hS,GuardrailWrite:()=>Nh,GuardrailWriteName:()=>Ch,GuardrailWriteResult:()=>Dh,GuardrailsValidation:()=>sz,GuardrailsValidationPublic:()=>xS,IdsHolder:()=>C8,ImageUrl:()=>px,ImageUrlPublic:()=>Nx,ImageUrlWrite:()=>$x,JsonListString:()=>le,JsonListStringCompare:()=>al,JsonListStringExperimentItemBulkWriteView:()=>$e,JsonListStringPublic:()=>We,JsonListStringWrite:()=>Me,JsonNode:()=>L,JsonNodeCompare:()=>IA,JsonNodeDetail:()=>uy,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>Yg,KpiCardRequest:()=>aa,KpiCardRequestEntityType:()=>Zp,KpiCardResponse:()=>zS,KpiMetric:()=>AS,KpiMetricType:()=>_S,ListRunnersRequestStatus:()=>kc,LlmAsJudgeCode:()=>en,LlmAsJudgeCodePublic:()=>Ox,LlmAsJudgeCodeWrite:()=>ow,LlmAsJudgeMessage:()=>ut,LlmAsJudgeMessageContent:()=>dx,LlmAsJudgeMessageContentPublic:()=>Wx,LlmAsJudgeMessageContentWrite:()=>Zx,LlmAsJudgeMessagePublic:()=>ht,LlmAsJudgeMessagePublicRole:()=>Vx,LlmAsJudgeMessageRole:()=>gx,LlmAsJudgeMessageWrite:()=>Rt,LlmAsJudgeMessageWriteRole:()=>ew,LlmAsJudgeModelParameters:()=>gt,LlmAsJudgeModelParametersPublic:()=>yt,LlmAsJudgeModelParametersWrite:()=>xt,LlmAsJudgeOutputSchema:()=>ft,LlmAsJudgeOutputSchemaPublic:()=>bt,LlmAsJudgeOutputSchemaPublicType:()=>Hx,LlmAsJudgeOutputSchemaType:()=>hx,LlmAsJudgeOutputSchemaWrite:()=>wt,LlmAsJudgeOutputSchemaWriteType:()=>tw,LocalRunner:()=>$n,LocalRunnerHeartbeatRequest:()=>ka,LocalRunnerHeartbeatResponse:()=>CS,LocalRunnerJob:()=>lt,LocalRunnerJobMetadata:()=>wa,LocalRunnerJobPage:()=>IS,LocalRunnerJobResultRequest:()=>Aa,LocalRunnerJobResultRequestStatus:()=>fc,LocalRunnerJobStatus:()=>Iy,LocalRunnerLogEntry:()=>Pa,LocalRunnerPage:()=>DS,LocalRunnerStatus:()=>SS,LocalRunnerType:()=>vS,LogItem:()=>BS,LogItemLevel:()=>US,LogPage:()=>MS,LogProb:()=>pk,LogProbs:()=>lk,ManualEvaluationRequest:()=>Qn,ManualEvaluationRequestEntityType:()=>WS,ManualEvaluationResponse:()=>Yn,Message:()=>bo,MultipartUploadPart:()=>qk,NumericalFeedbackDefinition:()=>Tz,NumericalFeedbackDefinitionCreate:()=>Iz,NumericalFeedbackDefinitionPublic:()=>On,NumericalFeedbackDefinitionUpdate:()=>lS,NumericalFeedbackDetail:()=>zz,NumericalFeedbackDetailCreate:()=>Ez,NumericalFeedbackDetailPublic:()=>Bz,NumericalFeedbackDetailUpdate:()=>pS,OllamaConnectionTestResponse:()=>hl,OllamaInstanceBaseUrlRequest:()=>yl,OllamaModel:()=>Vh,Optimization:()=>I8,OptimizationPagePublic:()=>Zn,OptimizationPublic:()=>Xn,OptimizationPublicStatus:()=>oT,OptimizationStatus:()=>VS,OptimizationStudioConfig:()=>tT,OptimizationStudioConfigPublic:()=>bT,OptimizationStudioConfigWrite:()=>IT,OptimizationStudioLog:()=>UT,OptimizationUpdate:()=>ta,OptimizationUpdateStatus:()=>$p,OptimizationWrite:()=>bl,OptimizationWriteStatus:()=>NT,PageColumns:()=>FT,Param:()=>fb,ParamPresence:()=>ub,PercentageValueStatPublic:()=>MT,PercentageValues:()=>Pr,PercentageValuesDetailed:()=>LT,PercentageValuesPublic:()=>Jn,Permission:()=>JT,Project:()=>D8,ProjectDetailed:()=>QT,ProjectDetailedVisibility:()=>KT,ProjectMetricRequestPublic:()=>sa,ProjectMetricRequestPublicInterval:()=>qp,ProjectMetricRequestPublicMetricType:()=>ec,ProjectMetricResponsePublic:()=>tv,ProjectMetricResponsePublicInterval:()=>YT,ProjectMetricResponsePublicMetricType:()=>ZT,ProjectPagePublic:()=>nv,ProjectPublic:()=>qn,ProjectPublicVisibility:()=>iv,ProjectReference:()=>Dx,ProjectReferencePublic:()=>xn,ProjectRetrieveDetailed:()=>pa,ProjectStatItemObjectPublic:()=>pv,ProjectStatsPublic:()=>Jr,ProjectStatsSummary:()=>dv,ProjectStatsSummaryItem:()=>lv,ProjectUpdate:()=>ca,ProjectUpdateVisibility:()=>rc,ProjectVisibility:()=>GT,ProjectWrite:()=>la,ProjectWriteVisibility:()=>tc,Prompt:()=>U8,PromptDetail:()=>xl,PromptDetailTemplateStructure:()=>_v,PromptPagePublic:()=>es,PromptPublic:()=>zv,PromptPublicTemplateStructure:()=>Av,PromptTemplateStructure:()=>uv,PromptTokensDetails:()=>hk,PromptType:()=>fv,PromptUpdatable:()=>da,PromptVariant:()=>Jf,PromptVersion:()=>Rl,PromptVersionBatchUpdate:()=>ua,PromptVersionCommitsRequestPublic:()=>ga,PromptVersionDetail:()=>Ye,PromptVersionDetailTemplateStructure:()=>fy,PromptVersionDetailType:()=>yy,PromptVersionLink:()=>Fr,PromptVersionLinkPublic:()=>ii,PromptVersionLinkWrite:()=>Np,PromptVersionPagePublic:()=>Dv,PromptVersionPublic:()=>Cv,PromptVersionPublicTemplateStructure:()=>Tv,PromptVersionPublicType:()=>jv,PromptVersionRetrieveDetail:()=>fa,PromptVersionTemplateStructure:()=>yv,PromptVersionType:()=>Rv,PromptVersionUpdate:()=>xy,PromptWrite:()=>ha,PromptWriteTemplateStructure:()=>nc,PromptWriteType:()=>sc,ProviderApiKey:()=>N8,ProviderApiKeyPagePublic:()=>Wv,ProviderApiKeyProvider:()=>Uv,ProviderApiKeyPublic:()=>rs,ProviderApiKeyPublicProvider:()=>Bv,ProviderApiKeyUpdate:()=>ea,ProviderApiKeyWrite:()=>ra,ProviderApiKeyWriteProvider:()=>Gp,ResponseFormat:()=>ef,ResponseFormatType:()=>Zg,Result:()=>At,ResultsNumberPublic:()=>ev,RetentionRulePagePublic:()=>Ov,RetentionRulePublic:()=>Ri,RetentionRulePublicLevel:()=>Lv,RetentionRulePublicRetention:()=>Jv,RetentionRuleWrite:()=>ya,RetentionRuleWriteRetention:()=>lc,ScoreName:()=>Xz,ScoreNamePublic:()=>eS,ServiceTogglesConfig:()=>Kv,Span:()=>Ln,SpanBatch:()=>B8,SpanBatchUpdate:()=>Sa,SpanBatchWrite:()=>ja,SpanEnrichmentOptions:()=>df,SpanExperimentItemBulkWriteView:()=>ih,SpanExperimentItemBulkWriteViewSource:()=>qf,SpanExperimentItemBulkWriteViewType:()=>rh,SpanFilter:()=>Sr,SpanFilterOperator:()=>_x,SpanFilterPublic:()=>_r,SpanFilterPublicOperator:()=>ry,SpanFilterWrite:()=>wn,SpanFilterWriteOperator:()=>Tw,SpanLlmAsJudgeCode:()=>rn,SpanLlmAsJudgeCodePublic:()=>dw,SpanLlmAsJudgeCodeWrite:()=>jw,SpanPagePublic:()=>qv,SpanPublic:()=>ts,SpanPublicSource:()=>$v,SpanPublicType:()=>Yv,SpanSearchStreamRequestPublic:()=>Ea,SpanSearchStreamRequestPublicExcludeItem:()=>Pc,SpanSearchStreamRequestPublicType:()=>zc,SpanSource:()=>rz,SpanType:()=>iz,SpanUpdate:()=>za,SpanUpdateSource:()=>Ny,SpanUpdateType:()=>Fy,SpanUserDefinedMetricPythonCode:()=>tn,SpanUserDefinedMetricPythonCodePublic:()=>gw,SpanUserDefinedMetricPythonCodeWrite:()=>Dw,SpanWrite:()=>va,SpanWriteSource:()=>Ly,SpanWriteType:()=>Jy,SpansCountResponse:()=>tj,StartMultipartUploadRequest:()=>ho,StartMultipartUploadRequestEntityType:()=>Rp,StartMultipartUploadResponse:()=>ij,StreamOptions:()=>tf,StudioEvaluation:()=>OS,StudioEvaluationPublic:()=>pT,StudioEvaluationWrite:()=>kT,StudioLlmModel:()=>$S,StudioLlmModelPublic:()=>lT,StudioLlmModelWrite:()=>PT,StudioMessage:()=>ZS,StudioMessagePublic:()=>gT,StudioMessageWrite:()=>vT,StudioMetric:()=>HS,StudioMetricPublic:()=>nT,StudioMetricWrite:()=>wT,StudioOptimizer:()=>YS,StudioOptimizerPublic:()=>dT,StudioOptimizerWrite:()=>ST,StudioPrompt:()=>eT,StudioPromptPublic:()=>hT,StudioPromptWrite:()=>ET,TokenUsageNames:()=>oj,Tool:()=>sf,ToolCall:()=>Ya,ToolCallType:()=>OR,ToolType:()=>af,Trace:()=>Vn,TraceBatch:()=>F8,TraceBatchUpdate:()=>Na,TraceBatchWrite:()=>Fa,TraceCountResponse:()=>sj,TraceEnrichmentOptions:()=>gf,TraceExperimentItemBulkWriteView:()=>sh,TraceExperimentItemBulkWriteViewSource:()=>ah,TraceFilter:()=>zr,TraceFilterOperator:()=>bx,TraceFilterPublic:()=>kr,TraceFilterPublicOperator:()=>iy,TraceFilterWrite:()=>gn,TraceFilterWriteOperator:()=>nw,TracePagePublic:()=>uj,TracePublic:()=>is,TracePublicSource:()=>pj,TracePublicVisibilityMode:()=>lj,TraceSearchStreamRequestPublic:()=>Ma,TraceSearchStreamRequestPublicExcludeItem:()=>Ec,TraceSource:()=>cz,TraceThread:()=>os,TraceThreadBatchIdentifier:()=>Wa,TraceThreadBatchUpdate:()=>Va,TraceThreadFilter:()=>Xe,TraceThreadFilterOperator:()=>pb,TraceThreadFilterPublic:()=>ct,TraceThreadFilterPublicOperator:()=>ay,TraceThreadFilterWrite:()=>_n,TraceThreadFilterWriteOperator:()=>Fw,TraceThreadIdentifier:()=>_l,TraceThreadLlmAsJudgeCode:()=>on,TraceThreadLlmAsJudgeCodePublic:()=>hw,TraceThreadLlmAsJudgeCodeWrite:()=>Ww,TraceThreadPage:()=>yj,TraceThreadSearchStreamRequest:()=>Ja,TraceThreadStatus:()=>gj,TraceThreadUpdate:()=>La,TraceThreadUserDefinedMetricPythonCode:()=>an,TraceThreadUserDefinedMetricPythonCodePublic:()=>bw,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Hw,TraceUpdate:()=>Ua,TraceUpdateSource:()=>eb,TraceVisibilityMode:()=>mz,TraceWrite:()=>Ba,TraceWriteSource:()=>ib,UploadAttachmentRequestEntityType:()=>kp,Usage:()=>bk,UserDefinedMetricPythonCode:()=>nn,UserDefinedMetricPythonCodePublic:()=>xw,UserDefinedMetricPythonCodeWrite:()=>c_,ValueEntry:()=>wh,ValueEntryCompare:()=>GA,ValueEntryCompareSource:()=>JA,ValueEntryExperimentItemBulkWriteView:()=>Qf,ValueEntryExperimentItemBulkWriteViewSource:()=>Kf,ValueEntryPublic:()=>nS,ValueEntryPublicSource:()=>oS,ValueEntrySource:()=>Rh,VideoUrl:()=>lx,VideoUrlPublic:()=>Fx,VideoUrlWrite:()=>Yx,Webhook:()=>qb,WebhookExamples:()=>bj,WebhookPublic:()=>mR,WebhookTestResult:()=>wj,WebhookTestResultStatus:()=>Rj,WebhookWrite:()=>AR,WelcomeWizardSubmission:()=>Ha,WelcomeWizardTracking:()=>_j,WorkspaceConfiguration:()=>as,WorkspaceMetricRequest:()=>M8,WorkspaceMetricResponse:()=>kl,WorkspaceMetricsSummaryRequest:()=>xi,WorkspaceMetricsSummaryResponse:()=>kj,WorkspaceNameHolder:()=>Aj,WorkspaceSpansCount:()=>ej,WorkspaceTraceCount:()=>aj,WorkspaceUserPermissions:()=>Pj,WorkspaceVersion:()=>Tj,WorkspaceVersionOpikVersion:()=>zj,agentConfigs:()=>up,alerts:()=>fp,annotationQueues:()=>hp,assertionResults:()=>bp,attachments:()=>Kt,chatCompletions:()=>zp,datasets:()=>Xt,environments:()=>Cp,experiments:()=>Wp,feedbackDefinitions:()=>Vp,guardrails:()=>Jp,llmModels:()=>qt,llmProviderKey:()=>Op,ollama:()=>ei,optimizations:()=>Qp,pairing:()=>Xp,projects:()=>ic,prompts:()=>oi,retentionRules:()=>mc,runners:()=>lr,spans:()=>jc,traces:()=>Cc,welcomeWizard:()=>Ic});var te=n(()=>{YK();s4();});var Al,p4=n(()=>{X();Q();b();Y();Z();J();te();ie();Al=class{constructor(i={}){this._options=M(i);}createAgentConfig(i,e){return P.fromPromise(this.__createAgentConfig(i,e))}async __createAgentConfig(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Dc.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);case 409: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/agent-configs/blueprints")}updateAgentConfig(i,e){return P.fromPromise(this.__updateAgentConfig(i,e))}async __updateAgentConfig(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Dc.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 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,e,t={},o){return P.fromPromise(this.__createBlueprintFromMask(i,e,t,o))}async __createBlueprintFromMask(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(i)}/masks/${_.encodePathParam(e)}`),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 $(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,e){return P.fromPromise(this.__createOrUpdateEnvs(i,e))}async __createOrUpdateEnvs(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:co.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 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,e,t={},o){return P.fromPromise(this.__getBlueprintByEnv(i,e,t,o))}async __getBlueprintByEnv(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),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:dt.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 $(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,e,t,o){return P.fromPromise(this.__setEnvByBlueprintName(i,e,t,o))}async __setEnvByBlueprintName(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:po.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 $(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,e,t={},o){return P.fromPromise(this.__deleteEnv(i,e,t,o))}async __deleteEnv(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),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 $(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,e={},t){return P.fromPromise(this.__getBlueprintById(i,e,t))}async __getBlueprintById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=e,a={mask_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:dt.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 $(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,e,t={},o){return P.fromPromise(this.__getBlueprintByName(i,e,t,o))}async __getBlueprintByName(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(i)}/names/${_.encodePathParam(e)}`),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:dt.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 $(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,e={},t){return P.fromPromise(this.__getBlueprintHistory(i,e,t))}async __getBlueprintHistory(i,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=e,s={page:o,size:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:x_.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 $(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,e={},t){return P.fromPromise(this.__getDeltaById(i,e,t))}async __getDeltaById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:dt.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 $(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,e={},t){return P.fromPromise(this.__getLatestBlueprint(i,e,t))}async __getLatestBlueprint(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=e,a={mask_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:dt.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 $(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,e){return P.fromPromise(this.__removeConfigKeys(i,e))}async __removeConfigKeys(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===401?new $(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 Pl,c4=n(()=>{X();Q();b();Y();Z();J();te();ie();Pl=class{constructor(i={}){this._options=M(i);}findAlerts(i={},e){return P.fromPromise(this.__findAlerts(i,e))}async __findAlerts(i={},e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Oa.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,e){return P.fromPromise(this.__createAlert(i,e))}async __createAlert(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteAlertBatch(i,e))}async __deleteAlertBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getAlertById(i,e,t))}async __getAlertById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ga.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,e,t){return P.fromPromise(this.__updateAlert(i,e,t))}async __updateAlert(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/alerts/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ka.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 B(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);case 422:throw new ce(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={},e){return P.fromPromise(this.__getWebhookExamples(i,e))}async __getWebhookExamples(i={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=i,o={alert_type:t!=null?gp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:bj.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,e){return P.fromPromise(this.__testWebhook(i,e))}async __testWebhook(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:wj.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 ce(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 zl,l4=n(()=>{X();Q();b();Y();Z();J();te();ie();zl=class{constructor(i={}){this._options=M(i);}addItemsToAnnotationQueue(i,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(i,e,t))}async __addItemsToAnnotationQueue(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Uc.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={},e){return P.fromPromise(this.__findAnnotationQueues(i,e))}async __findAnnotationQueues(i={},e){var d,f,g,h,y,w,A,C,I,D,N;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,v({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:T.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:BR.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,e){return P.fromPromise(this.__createAnnotationQueue(i,e))}async __createAnnotationQueue(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__createAnnotationQueueBatch(i,e))}async __createAnnotationQueueBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:uo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(i,e))}async __deleteAnnotationQueueBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getAnnotationQueueById(i,e,t))}async __getAnnotationQueueById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Qa.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,e={},t){return P.fromPromise(this.__updateAnnotationQueue(i,e,t))}async __updateAnnotationQueue(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/annotation-queues/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:go.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new B(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}")}removeItemsFromAnnotationQueue(i,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(i,e,t))}async __removeItemsFromAnnotationQueue(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Uc.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")}};});var Sl,m4=n(()=>{X();Q();b();Y();Z();J();te();Sl=class{constructor(i={}){this._options=M(i);}storeAssertionsBatch(i,e){return P.fromPromise(this.__storeAssertionsBatch(i,e))}async __storeAssertionsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Tl,d4=n(()=>{X();Q();b();Y();Z();J();te();ie();Tl=class{constructor(i={}){this._options=M(i);}attachmentList(i,e){return P.fromPromise(this.__attachmentList(i,e))}async __attachmentList(i,e){var f,g,h,y,w,A,C,I,D,N,F;let{page:t,size:o,projectId:a,entityType:s,entityId:c,path:l}=i,m={page:t,size:o,project_id:a,entity_type:wp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:ZR.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__completeMultiPartUpload(i,e))}async __completeMultiPartUpload(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:rl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__deleteAttachments(i,e))}async __deleteAttachments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:rl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__downloadAttachment(i,e))}async __downloadAttachment(i,e){var f,g,h,y,w,A,C,I,D,N,F;let{workspaceName:t,containerId:o,entityType:a,entityId:s,fileName:c,mimeType:l}=i,m={workspace_name:t,container_id:o,entity_type:_p.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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__startMultiPartUpload(i,e))}async __startMultiPartUpload(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ho.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ij.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 $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__uploadAttachment(i,e))}async __uploadAttachment(i,e){var f,g,h,y,w,A,C,I,D,N,F;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:kp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:Kt.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 vl,u4=n(()=>{X();Q();b();Y();Z();J();te();vl=class{constructor(i={}){this._options=M(i);}findEvaluators(i={},e){return P.fromPromise(this.__findEvaluators(i,e))}async __findEvaluators(i={},e){var g,h,y,w,A,C,I,D,N,F,re;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,v({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:T.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(N=this._options)==null?void 0:N.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(re=this._options)==null?void 0:re.fetch,logging:this._options.logging});if(f.ok)return {data:Aw.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,e){return P.fromPromise(this.__createAutomationRuleEvaluator(i,e))}async __createAutomationRuleEvaluator(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:f_.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(i,e))}async __deleteAutomationRuleEvaluatorBatch(i,e){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,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:me.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(i,e={},t){return P.fromPromise(this.__getEvaluatorById(i,e,t))}async __getEvaluatorById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:o}=e,a={project_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:Sw.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,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(i,e,t))}async __updateAutomationRuleEvaluator(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/automations/evaluators/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:p_.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/automations/evaluators/{id}")}getEvaluatorLogsById(i,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(i,e,t))}async __getEvaluatorLogsById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:o}=e,a={size:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:MS.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 jl,g4=n(()=>{X();Q();b();Y();Z();J();te();jl=class{constructor(i={}){this._options=M(i);}createChatCompletions(i={},e){return P.fromPromise(this.__createChatCompletions(i,e))}async __createChatCompletions(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ro.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:xk.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 El,f4=n(()=>{X();Q();b();Y();Z();J();te();ie();El=class{constructor(i={}){this._options=M(i);}access(i,e){return P.fromPromise(this.__access(i,e))}async __access(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ax.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/auth/workspace"),method:"GET",headers:e,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:Aj.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 $(t.error.body,t.rawResponse);case 403:throw new ye(ue.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 Cl,h4=n(()=>{X();Q();b();Y();Z();J();te();ie();Cl=class{constructor(i={}){this._options=M(i);}findDashboards(i={},e){return P.fromPromise(this.__findDashboards(i,e))}async __findDashboards(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e){return P.fromPromise(this.__createDashboard(i,e))}async __createDashboard(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ze.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,e={},t){return P.fromPromise(this.__getDashboardById(i,e,t))}async __getDashboardById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ze.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,e={},t){return P.fromPromise(this.__deleteDashboard(i,e,t))}async __deleteDashboard(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateDashboard(i,e,t))}async __updateDashboard(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/dashboards/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zn.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:Ze.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(i,e){return P.fromPromise(this.__deleteDashboardsBatch(i,e))}async __deleteDashboardsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Il,y4=n(()=>{X();Q();b();Dr();Y();Z();J();te();ie();Il=class{constructor(i={}){this._options=M(i);}applyDatasetItemChanges(i,e,t){return P.fromPromise(this.__applyDatasetItemChanges(i,e,t))}async __applyDatasetItemChanges(i,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:o,body:a}=e,s={override:o},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:TA.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:Lr.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 B(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new K(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,e){return P.fromPromise(this.__batchUpdateDatasetItems(i,e))}async __batchUpdateDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__findDatasets(i,e))}async __findDatasets(i={},e){var y,w,A,C,I,D,N,F,re,ae,we;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,v({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:T.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((F=(N=e==null?void 0:e.timeoutInSeconds)!=null?N:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(ae=e==null?void 0:e.maxRetries)!=null?ae:(re=this._options)==null?void 0:re.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:Nn.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,e){return P.fromPromise(this.__createDataset(i,e))}async __createDataset(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:No.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createOrUpdateDatasetItems(i,e))}async __createOrUpdateDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:To.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createDatasetItemsFromCsv(i,e))}async __createDatasetItemsFromCsv(i,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await aH();t.append("file",Ge(i.file)),t.append("dataset_id",i.datasetId);let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new B(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/datasets/items/from-csv")}createDatasetItemsFromSpans(i,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(i,e,t))}async __createDatasetItemsFromSpans(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(i,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(i,e,t))}async __createDatasetItemsFromTraces(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(i,e={},t){return P.fromPromise(this.__getDatasetById(i,e,t))}async __getDatasetById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:fi.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,e,t){return P.fromPromise(this.__updateDataset(i,e,t))}async __updateDataset(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/datasets/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(i,e={},t){return P.fromPromise(this.__deleteDataset(i,e,t))}async __deleteDataset(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e){return P.fromPromise(this.__deleteDatasetByName(i,e))}async __deleteDatasetByName(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ko.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__deleteDatasetItems(i,e))}async __deleteDatasetItems(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e){return P.fromPromise(this.__deleteDatasetsBatch(i,e))}async __deleteDatasetsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__downloadDatasetExport(i,e,t))}async __downloadDatasetExport(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 B(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,e,t){return P.fromPromise(this.__expandDataset(i,e,t))}async __expandDataset(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/expansions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:_o.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:SA.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,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(i,e,t))}async __findDatasetItemsWithExperimentItems(i,e,t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:o,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.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 new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(i,e){return P.fromPromise(this.__getDatasetByIdentifier(i,e))}async __getDatasetByIdentifier(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ao.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fi.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,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(i,e,t))}async __getDatasetExperimentItemsStats(i,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:o,filters:a}=e,s={experiment_ids:o,filters:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:Jr.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,e={},t){return P.fromPromise(this.__getDatasetExportJob(i,e,t))}async __getDatasetExportJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Yt.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,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:Xt.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,e={},t){return P.fromPromise(this.__getDatasetItemById(i,e,t))}async __getDatasetItemById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Dn.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,e,t){return P.fromPromise(this.__patchDatasetItem(i,e,t))}async __patchDatasetItem(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/datasets/items/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:So.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,e={},t){return P.fromPromise(this.__getDatasetItems(i,e,t))}async __getDatasetItems(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,version:s,filters:c,truncate:l}=e,m={page:o,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:yP.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,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(i,e,t))}async __getDatasetItemsOutputColumns(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:o}=e,a={experiment_ids:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:FT.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,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(i,e,t))}async __markDatasetExportJobViewed(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e={},t){return P.fromPromise(this.__startDatasetExport(i,e,t))}async __startDatasetExport(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Yt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(i,e){return P.fromPromise(this.__streamDatasetItems(i,e))}async __streamDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__compareDatasetVersions(i,e,t))}async __compareDatasetVersions(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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: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/datasets/{id}/versions/diff")}createVersionTag(i,e,t,o){return P.fromPromise(this.__createVersionTag(i,e,t,o))}async __createVersionTag(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Do.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 B(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(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,e,t,o={},a){return P.fromPromise(this.__deleteVersionTag(i,e,t,o,a))}async __deleteVersionTag(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(i,e={},t){return P.fromPromise(this.__listDatasetVersions(i,e,t))}async __listDatasetVersions(i,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=e,s={page:o,size:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:vP.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 B(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,e,t){return P.fromPromise(this.__restoreDatasetVersion(i,e,t))}async __restoreDatasetVersion(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Co.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Lr.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/datasets/{id}/versions/restore")}retrieveDatasetVersion(i,e,t){return P.fromPromise(this.__retrieveDatasetVersion(i,e,t))}async __retrieveDatasetVersion(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Lr.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 B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(i,e,t={},o){return P.fromPromise(this.__updateDatasetVersion(i,e,t,o))}async __updateDatasetVersion(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Uo.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:Lr.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 B(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Dl,b4=n(()=>{X();Q();b();Y();Z();J();te();ie();Dl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/environments"),method:"GET",headers:e,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:IP.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,e){return P.fromPromise(this.__createEnvironment(i,e))}async __createEnvironment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/environments")}deleteEnvironmentsBatch(i,e){return P.fromPromise(this.__deleteEnvironmentsBatch(i,e))}async __deleteEnvironmentsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getEnvironmentById(i,e,t))}async __getEnvironmentById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Fn.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,e={},t){return P.fromPromise(this.__updateEnvironment(i,e,t))}async __updateEnvironment(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/environments/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(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 Ul,R4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ul=class{constructor(i={}){this._options=M(i);}batchUpdateExperiments(i,e){return P.fromPromise(this.__batchUpdateExperiments(i,e))}async __batchUpdateExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Lo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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")}findExperiments(i={},e){return P.fromPromise(this.__findExperiments(i,e))}async __findExperiments(i={},e){var D,N,F,re,ae,we,Ee,Ce,He,Hi,Gi;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,v({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(N=this._options)==null?void 0:N.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ae=(re=await x.get(this._options.baseUrl))!=null?re:await x.get(this._options.environment))!=null?ae:T.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ce=(Ee=e==null?void 0:e.timeoutInSeconds)!=null?Ee:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ce:60)*1e3,maxRetries:(Hi=e==null?void 0:e.maxRetries)!=null?Hi:(He=this._options)==null?void 0:He.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Gi=this._options)==null?void 0:Gi.fetch,logging:this._options.logging});if(I.ok)return {data:Gn.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 B(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,e){return P.fromPromise(this.__createExperiment(i,e))}async __createExperiment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createExperimentItems(i,e))}async __createExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteExperimentItems(i,e))}async __deleteExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Yo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteExperimentsById(i,e))}async __deleteExperimentsById(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__executeExperiment(i,e))}async __executeExperiment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:HP.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/experiments/execute")}experimentItemsBulk(i,e){return P.fromPromise(this.__experimentItemsBulk(i,e))}async __experimentItemsBulk(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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={},e){return P.fromPromise(this.__findFeedbackScoreNames(i,e))}async __findFeedbackScoreNames(i={},e){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,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vr.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={},e){return P.fromPromise(this.__findExperimentGroups(i,e))}async __findExperimentGroups(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:ez.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 B(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={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(i,e))}async __findExperimentGroupsAggregations(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:KP.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 B(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,e){return P.fromPromise(this.__finishExperiments(i,e))}async __finishExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getExperimentById(i,e,t))}async __getExperimentById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Hn.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,e,t){return P.fromPromise(this.__updateExperiment(i,e,t))}async __updateExperiment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/experiments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wo.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 B(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,e={},t){return P.fromPromise(this.__getExperimentItemById(i,e,t))}async __getExperimentItemById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:In.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,e){return P.fromPromise(this.__streamExperimentItems(i,e))}async __streamExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ko.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__streamExperiments(i,e))}async __streamExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Xo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Nl,x4=n(()=>{X();Q();b();Y();Z();J();te();ie();Nl=class{constructor(i={}){this._options=M(i);}findFeedbackDefinitions(i={},e){return P.fromPromise(this.__findFeedbackDefinitions(i,e))}async __findFeedbackDefinitions(i={},e){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?Lp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Vz.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,e){return P.fromPromise(this.__createFeedbackDefinition(i,e))}async __createFeedbackDefinition(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Nz.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(i,e,t))}async __getFeedbackDefinitionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Hz.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,e,t){return P.fromPromise(this.__updateFeedbackDefinition(i,e,t))}async __updateFeedbackDefinition(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/feedback-definitions/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:uS.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,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(i,e,t))}async __deleteFeedbackDefinitionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 K(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,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(i,e))}async __deleteFeedbackDefinitionsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/feedback-definitions/delete")}};});var Bl,w4=n(()=>{X();Q();b();Y();Z();J();te();Bl=class{constructor(i={}){this._options=M(i);}createGuardrails(i,e){return P.fromPromise(this.__createGuardrails(i,e))}async __createGuardrails(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Fl,_4=n(()=>{X();Q();b();Y();Z();J();te();ie();Fl=class{constructor(i={}){this._options=M(i);}findInsightsViews(i={},e){return P.fromPromise(this.__findInsightsViews(i,e))}async __findInsightsViews(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e){return P.fromPromise(this.__createInsightsView(i,e))}async __createInsightsView(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ze.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,e={},t){return P.fromPromise(this.__getInsightsViewById(i,e,t))}async __getInsightsViewById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ze.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,e={},t){return P.fromPromise(this.__deleteInsightsView(i,e,t))}async __deleteInsightsView(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateInsightsView(i,e,t))}async __updateInsightsView(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/insights-views/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zn.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:Ze.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(i,e){return P.fromPromise(this.__deleteInsightsViewsBatch(i,e))}async __deleteInsightsViewsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Ml,k4=n(()=>{X();Q();b();Y();Z();J();te();Ml=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/llm/models"),method:"GET",headers:e,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:qt.getLlmModels.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models")}};});var Wl,A4=n(()=>{X();Q();b();Y();Z();J();te();ie();Wl=class{constructor(i={}){this._options=M(i);}deleteLlmProviderApiKeysBatch(i,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(i,e))}async __deleteLlmProviderApiKeysBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,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:Wv.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,e){return P.fromPromise(this.__storeLlmProviderApiKey(i,e))}async __storeLlmProviderApiKey(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ra.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(i,e,t))}async __getLlmProviderApiKeyById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:rs.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,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(i,e,t))}async __updateLlmProviderApiKey(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ea.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new $(a.error.body,a.rawResponse);case 403:throw new ye(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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}")}};});var Ll,P4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ll=class{constructor(i={}){this._options=M(i);}evaluateSpans(i,e){return P.fromPromise(this.__evaluateSpans(i,e))}async __evaluateSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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,e){return P.fromPromise(this.__evaluateThreads(i,e))}async __evaluateThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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,e){return P.fromPromise(this.__evaluateTraces(i,e))}async __evaluateTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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 Vl,z4=n(()=>{X();Q();b();Y();Z();J();te();ie();Vl=class{constructor(i={}){this._options=M(i);}listModels(i,e){return P.fromPromise(this.__listModels(i,e))}async __listModels(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ei.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 ce(o.error.body,o.rawResponse);case 500:throw new Zi(o.error.body,o.rawResponse);case 503:throw new Wt(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__testConnection(i,e))}async __testConnection(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:hl.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 ce(o.error.body,o.rawResponse);case 502:throw new Xi(hl.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 503:throw new Wt(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 Jl,S4=n(()=>{X();Q();b();Y();Z();J();te();ie();Jl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/ollie/state"),method:"GET",headers:e,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 $(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,e){return P.fromPromise(this.__replaceOllieState(i,e))}async __replaceOllieState(i,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await ro.toBinaryUploadRequest(i),o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,"v1/private/ollie/state"),method:"PUT",headers:o,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 401:throw new $(a.error.body,a.rawResponse);case 429:throw new sr(ue.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,"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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,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 $(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 Hl,T4=n(()=>{X();Q();b();Y();Z();J();Hl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,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 Gl,v4=n(()=>{X();Q();b();Y();Z();J();te();ie();Gl=class{constructor(i={}){this._options=M(i);}cancelStudioOptimizations(i,e={},t){return P.fromPromise(this.__cancelStudioOptimizations(i,e,t))}async __cancelStudioOptimizations(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/optimizations/studio/${_.encodePathParam(i)}/cancel`),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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new nr(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}/cancel")}findOptimizations(i={},e){return P.fromPromise(this.__findOptimizations(i,e))}async __findOptimizations(i={},e){var h,y,w,A,C,I,D,N,F,re,ae;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,v({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:T.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((N=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=e==null?void 0:e.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Zn.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 B(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,e){return P.fromPromise(this.__createOptimization(i,e))}async __createOptimization(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__upsertOptimization(i,e))}async __upsertOptimization(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteOptimizationsById(i,e))}async __deleteOptimizationsById(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getOptimizationById(i,e,t))}async __getOptimizationById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Xn.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,e={},t){return P.fromPromise(this.__updateOptimizationsById(i,e,t))}async __updateOptimizationsById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/optimizations/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ta.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")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,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(i,e,t))}async __getStudioOptimizationLogs(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:UT.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 Ol,j4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ol=class{constructor(i={}){this._options=M(i);}activatePairingSession(i,e,t){return P.fromPromise(this.__activatePairingSession(i,e,t))}async __activatePairingSession(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new ye(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(a.error.body,a.rawResponse);case 422:throw new ce(a.error.body,a.rawResponse);case 429:throw new sr(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);case 501:throw new nr(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,e){return P.fromPromise(this.__createPairingSession(i,e))}async __createPairingSession(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:iA.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(o.error.body,o.rawResponse);case 429:throw new sr(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 501:throw new nr(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 Kl,E4=n(()=>{X();Q();b();Y();Z();J();te();ie();Kl=class{constructor(i={}){this._options=M(i);}findAlertsByProject(i,e={},t){return P.fromPromise(this.__findAlertsByProject(i,e,t))}async __findAlertsByProject(i,e={},t){var d,f,g,h,y,w,A,C,I,D,N;let{page:o,size:a,sorting:s,filters:c}=e,l={page:o,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,v({"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:T.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:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:Oa.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 B(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,e={},t){return P.fromPromise(this.__findDashboardsByProject(i,e,t))}async __findDashboardsByProject(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,name:s,sorting:c,filters:l}=e,m={page:o,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e={},t){return P.fromPromise(this.__findDatasetsByProject(i,e,t))}async __findDatasetsByProject(i,e={},t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,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,v({"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:T.Default,`v1/private/projects/${_.encodePathParam(i)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Nn.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,e={},t){return P.fromPromise(this.__findExperimentsByProject(i,e,t))}async __findExperimentsByProject(i,e={},t){var C,I,D,N,F,re,ae,we,Ee,Ce,He;let{page:o,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,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,v({"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((F=(N=await x.get(this._options.baseUrl))!=null?N:await x.get(this._options.environment))!=null?F:T.Default,`v1/private/projects/${_.encodePathParam(i)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ae=t==null?void 0:t.timeoutInSeconds)!=null?ae:(re=this._options)==null?void 0:re.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ce=t==null?void 0:t.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(He=this._options)==null?void 0:He.fetch,logging:this._options.logging});if(A.ok)return {data:Gn.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 B(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,e={},t){return P.fromPromise(this.__findOptimizationsByProject(i,e,t))}async __findOptimizationsByProject(i,e={},t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,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,v({"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:T.Default,`v1/private/projects/${_.encodePathParam(i)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Zn.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 B(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,e={},t){return P.fromPromise(this.__getPromptsByProject(i,e,t))}async __getPromptsByProject(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,name:s,sorting:c,filters:l}=e,m={page:o,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:es.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={},e){return P.fromPromise(this.__findProjects(i,e))}async __findProjects(i={},e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:nv.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,e){return P.fromPromise(this.__createProject(i,e))}async __createProject(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:la.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 422:throw new ce(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,e={},t){return P.fromPromise(this.__getProjectById(i,e,t))}async __getProjectById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:qn.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,e={},t){return P.fromPromise(this.__deleteProjectById(i,e,t))}async __deleteProjectById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 K(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,e={},t){return P.fromPromise(this.__updateProject(i,e,t))}async __updateProject(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/projects/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ca.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteProjectsBatch(i,e))}async __deleteProjectsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(i,e))}async __findFeedbackScoreNamesByProjectIds(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:qz.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,e={},t){return P.fromPromise(this.__findTokenUsageNames(i,e,t))}async __findTokenUsageNames(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:oj.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,e,t){return P.fromPromise(this.__getProjectKpiCards(i,e,t))}async __getProjectKpiCards(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:aa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:zS.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 B(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,e={},t){return P.fromPromise(this.__getProjectMetrics(i,e,t))}async __getProjectMetrics(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/projects/${_.encodePathParam(i)}/metrics`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:tv.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 B(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={},e){return P.fromPromise(this.__getProjectStats(i,e))}async __getProjectStats(i={},e){var d,f,g,h,y,w,A,C,I,D,N;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,v({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:T.Default,"v1/private/projects/stats"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:dv.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/projects/stats")}retrieveProject(i,e){return P.fromPromise(this.__retrieveProject(i,e))}async __retrieveProject(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:QT.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(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")}};});var $l,C4=n(()=>{X();Q();b();Y();Z();J();te();ie();$l=class{constructor(i={}){this._options=M(i);}getPrompts(i={},e){return P.fromPromise(this.__getPrompts(i,e))}async __getPrompts(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:es.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,e){return P.fromPromise(this.__createPrompt(i,e))}async __createPrompt(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__createPromptVersion(i,e))}async __createPromptVersion(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ye.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 B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__updatePromptVersions(i,e))}async __updatePromptVersions(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getPromptById(i,e,t))}async __getPromptById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/prompts/${_.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:xl.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/{id}")}updatePrompt(i,e,t){return P.fromPromise(this.__updatePrompt(i,e,t))}async __updatePrompt(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/prompts/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:da.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(a.error.body,a.rawResponse);case 422:throw new ce(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,e={},t){return P.fromPromise(this.__deletePrompt(i,e,t))}async __deletePrompt(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e){return P.fromPromise(this.__deletePromptsBatch(i,e))}async __deletePromptsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getPromptByCommit(i,e,t))}async __getPromptByCommit(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xl.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 B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(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,e={},t){return P.fromPromise(this.__getPromptVersionById(i,e,t))}async __getPromptVersionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ye.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}")}getPromptVersions(i,e={},t){return P.fromPromise(this.__getPromptVersions(i,e,t))}async __getPromptVersions(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,search:s,sorting:c,filters:l}=e,m={page:o,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Dv.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,e){return P.fromPromise(this.__getPromptsByCommits(i,e))}async __getPromptsByCommits(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ga.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:oi.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,e,t={},o){return P.fromPromise(this.__restorePromptVersion(i,e,t,o))}async __restorePromptVersion(i,e,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,v({"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:T.Default,`v1/private/prompts/${_.encodePathParam(i)}/versions/${_.encodePathParam(e)}/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:Ye.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 B(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,e){return P.fromPromise(this.__retrievePromptVersion(i,e))}async __retrievePromptVersion(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ye.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(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")}};});var Ql,I4=n(()=>{X();Q();b();Y();Z();J();ie();Ql=class{constructor(i={}){this._options=M(i);}datasetsRedirect(i,e){return P.fromPromise(this.__datasetsRedirect(i,e))}async __datasetsRedirect(i,e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__experimentsRedirect(i,e))}async __experimentsRedirect(i,e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__optimizationsRedirect(i,e))}async __optimizationsRedirect(i,e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__projectsRedirect(i,e))}async __projectsRedirect(i,e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new B(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 Yl,D4=n(()=>{X();Q();b();Y();Z();J();te();ie();Yl=class{constructor(i={}){this._options=M(i);}findRetentionRules(i={},e){return P.fromPromise(this.__findRetentionRules(i,e))}async __findRetentionRules(i={},e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ov.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,e){return P.fromPromise(this.__createRetentionRule(i,e))}async __createRetentionRule(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ya.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ri.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,e={},t){return P.fromPromise(this.__getRetentionRuleById(i,e,t))}async __getRetentionRuleById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ri.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,e={},t){return P.fromPromise(this.__deactivateRetentionRule(i,e,t))}async __deactivateRetentionRule(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 Xl,U4=n(()=>{X();Q();b();Y();Z();J();te();ie();Xl=class{constructor(i={}){this._options=M(i);}getJobLogs(i,e={},t){return P.fromPromise(this.__getJobLogs(i,e,t))}async __getJobLogs(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:o}=e,a={offset:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:lr.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,e,t){return P.fromPromise(this.__appendJobLogs(i,e,t))}async __appendJobLogs(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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 B(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,e={},t){return P.fromPromise(this.__cancelJob(i,e,t))}async __cancelJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__createBridgeCommand(i,e,t))}async __createBridgeCommand(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:G_.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 K(a.error.body,a.rawResponse);case 429:throw new sr(ue.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}/bridge/commands")}createJob(i,e){return P.fromPromise(this.__createJob(i,e))}async __createJob(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 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/local-runners/jobs")}getRunner(i,e={},t){return P.fromPromise(this.__getRunner(i,e,t))}async __getRunner(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:$n.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,e={},t){return P.fromPromise(this.__disconnectRunner(i,e,t))}async __disconnectRunner(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t={},o){return P.fromPromise(this.__getBridgeCommand(i,e,t,o))}async __getBridgeCommand(i,e,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,v({"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:T.Default,`v1/private/local-runners/${_.encodePathParam(i)}/bridge/commands/${_.encodePathParam(e)}`),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:M_.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,e={},t){return P.fromPromise(this.__getJob(i,e,t))}async __getJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:lt.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,e={},t){return P.fromPromise(this.__heartbeat(i,e,t))}async __heartbeat(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ka.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:CS.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 rt(ue.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,e={},t){return P.fromPromise(this.__listJobs(i,e,t))}async __listJobs(i,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,page:a,size:s}=e,c={project_id:o,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,v({"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:T.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:IS.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,e){return P.fromPromise(this.__listRunners(i,e))}async __listRunners(i,e){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?kc.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:DS.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,e={},t){return P.fromPromise(this.__nextBridgeCommands(i,e,t))}async __nextBridgeCommands(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ba.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:H_.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,e={},t){return P.fromPromise(this.__nextJob(i,e,t))}async __nextJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:lr.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,e,t){return P.fromPromise(this.__patchChecklist(i,e,t))}async __patchChecklist(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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,e,t){return P.fromPromise(this.__registerAgents(i,e,t))}async __registerAgents(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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 B(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,e,t,o){return P.fromPromise(this.__reportBridgeResult(i,e,t,o))}async __reportBridgeResult(i,e,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,v({"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:T.Default,`v1/private/local-runners/${_.encodePathParam(i)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ra.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 K(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,e,t){return P.fromPromise(this.__reportJobResult(i,e,t))}async __reportJobResult(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Aa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(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 Zl,N4=n(()=>{X();Q();b();Y();Z();J();te();Zl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/toggles"),method:"GET",headers:e,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:Kv.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 ql,B4=n(()=>{X();Q();b();Y();Z();J();te();ie();ql=class{constructor(i={}){this._options=M(i);}addSpanComment(i,e,t){return P.fromPromise(this.__addSpanComment(i,e,t))}async __addSpanComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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,e,t){return P.fromPromise(this.__addSpanFeedbackScore(i,e,t))}async __addSpanFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Pe.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,e){return P.fromPromise(this.__createSpans(i,e))}async __createSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__batchUpdateSpans(i,e))}async __batchUpdateSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__getSpansByProject(i,e))}async __getSpansByProject(i={},e){var D,N,F,re,ae,we,Ee,Ce,He,Hi,Gi;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?vc.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,v({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(N=this._options)==null?void 0:N.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ae=(re=await x.get(this._options.baseUrl))!=null?re:await x.get(this._options.environment))!=null?ae:T.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ce=(Ee=e==null?void 0:e.timeoutInSeconds)!=null?Ee:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ce:60)*1e3,maxRetries:(Hi=e==null?void 0:e.maxRetries)!=null?Hi:(He=this._options)==null?void 0:He.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Gi=this._options)==null?void 0:Gi.fetch,logging:this._options.logging});if(I.ok)return {data:qv.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,e){return P.fromPromise(this.__createSpan(i,e))}async __createSpan(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/spans")}getSpanById(i,e={},t){return P.fromPromise(this.__getSpanById(i,e,t))}async __getSpanById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=e,a={strip_attachments:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:ts.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,e={},t){return P.fromPromise(this.__deleteSpanById(i,e,t))}async __deleteSpanById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 nr(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,e,t){return P.fromPromise(this.__updateSpan(i,e,t))}async __updateSpan(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:za.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,e){return P.fromPromise(this.__deleteSpanComments(i,e))}async __deleteSpanComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(i,e,t))}async __deleteSpanFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Bn.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={},e){return P.fromPromise(this.__findFeedbackScoreNames1(i,e))}async __findFeedbackScoreNames1(i={},e){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?Sc.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vr.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,e,t={},o){return P.fromPromise(this.__getSpanComment(i,e,t,o))}async __getSpanComment(i,e,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,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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={},e){return P.fromPromise(this.__getSpanStats(i,e))}async __getSpanStats(i={},e){var h,y,w,A,C,I,D,N,F,re,ae;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?Tc.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,v({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:T.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((N=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=e==null?void 0:e.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Jr.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,e){return P.fromPromise(this.__scoreBatchOfSpans(i,e))}async __scoreBatchOfSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__searchSpans(i,e))}async __searchSpans(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ea.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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")}updateSpanComment(i,e,t){return P.fromPromise(this.__updateSpanComment(i,e,t))}async __updateSpanComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/comments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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 em,F4=n(()=>{X();Q();b();Y();Z();J();te();em=class{constructor(i={}){this._options=M(i);}getDatasetBiInfo(i){return P.fromPromise(this.__getDatasetBiInfo(i))}async __getDatasetBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,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:gi.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")}getSpansCountForWorkspaces(i){return P.fromPromise(this.__getSpansCountForWorkspaces(i))}async __getSpansCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,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:tj.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,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:sj.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 rm,M4=n(()=>{X();Q();b();Y();Z();J();te();ie();rm=class{constructor(i={}){this._options=M(i);}addThreadComment(i,e,t){return P.fromPromise(this.__addThreadComment(i,e,t))}async __addThreadComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:fe.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,e,t){return P.fromPromise(this.__addTraceComment(i,e,t))}async __addTraceComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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,e,t){return P.fromPromise(this.__addTraceFeedbackScore(i,e,t))}async __addTraceFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Pe.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,e){return P.fromPromise(this.__createTraces(i,e))}async __createTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__batchUpdateTraces(i,e))}async __batchUpdateTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e){return P.fromPromise(this.__batchUpdateThreads(i,e))}async __batchUpdateThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__closeTraceThread(i,e))}async __closeTraceThread(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__getTracesByProject(i,e))}async __getTracesByProject(i={},e){var C,I,D,N,F,re,ae,we,Ee,Ce,He;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}=i,y={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()},w=z((C=this._options)==null?void 0:C.headers,v({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((F=(N=await x.get(this._options.baseUrl))!=null?N:await x.get(this._options.environment))!=null?F:T.Default,"v1/private/traces"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ae=e==null?void 0:e.timeoutInSeconds)!=null?ae:(re=this._options)==null?void 0:re.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(He=this._options)==null?void 0:He.fetch,logging:this._options.logging});if(A.ok)return {data:uj.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces")}createTrace(i,e){return P.fromPromise(this.__createTrace(i,e))}async __createTrace(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getTraceById(i,e,t))}async __getTraceById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=e,a={strip_attachments:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:is.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,e={},t){return P.fromPromise(this.__deleteTraceById(i,e,t))}async __deleteTraceById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateTrace(i,e,t))}async __updateTrace(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ua.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,e){return P.fromPromise(this.__deleteThreadComments(i,e))}async __deleteThreadComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteThreadFeedbackScores(i,e))}async __deleteThreadFeedbackScores(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ca.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteTraceComments(i,e))}async __deleteTraceComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(i,e,t))}async __deleteTraceFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Bn.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,e){return P.fromPromise(this.__deleteTraceThreads(i,e))}async __deleteTraceThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ia.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteTraces(i,e))}async __deleteTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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/delete")}findFeedbackScoreNames2(i={},e){return P.fromPromise(this.__findFeedbackScoreNames2(i,e))}async __findFeedbackScoreNames2(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vr.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={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(i,e))}async __findTraceThreadsFeedbackScoreNames(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vr.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={},e){return P.fromPromise(this.__getTraceStats(i,e))}async __getTraceStats(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Jr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(i,e,t={},o){return P.fromPromise(this.__getThreadComment(i,e,t,o))}async __getThreadComment(i,e,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,v({"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:T.Default,`v1/private/traces/threads/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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={},e){return P.fromPromise(this.__getTraceThreadStats(i,e))}async __getTraceThreadStats(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Jr.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,e,t={},o){return P.fromPromise(this.__getTraceComment(i,e,t,o))}async __getTraceComment(i,e,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,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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,e){return P.fromPromise(this.__getTraceThread(i,e))}async __getTraceThread(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_l.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:os.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={},e){return P.fromPromise(this.__getTraceThreads(i,e))}async __getTraceThreads(i={},e){var A,C,I,D,N,F,re,ae,we,Ee,Ce;let{page:t,size:o,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g}=i,h={page:t,size:o,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString()},y=z((A=this._options)==null?void 0:A.headers,v({"Comet-Workspace":(I=e==null?void 0:e.workspaceName)!=null?I:(C=this._options)==null?void 0:C.workspaceName}),e==null?void 0:e.headers),w=await S({url:_.join((N=(D=await x.get(this._options.baseUrl))!=null?D:await x.get(this._options.environment))!=null?N:T.Default,"v1/private/traces/threads"),method:"GET",headers:y,queryParameters:{...h,...e==null?void 0:e.queryParams},timeoutMs:((ae=(re=e==null?void 0:e.timeoutInSeconds)!=null?re:(F=this._options)==null?void 0:F.timeoutInSeconds)!=null?ae:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(we=this._options)==null?void 0:we.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(w.ok)return {data:yj.parseOrThrow(w.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:w.rawResponse};if(w.error.reason==="status-code")throw new k({statusCode:w.error.statusCode,body:w.error.body,rawResponse:w.rawResponse});return j(w.error,w.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(i,e){return P.fromPromise(this.__openTraceThread(i,e))}async __openTraceThread(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_l.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__scoreBatchOfThreads(i,e))}async __scoreBatchOfThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Da.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__scoreBatchOfTraces(i,e))}async __scoreBatchOfTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__searchTraceThreads(i,e))}async __searchTraceThreads(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__searchTraces(i,e))}async __searchTraces(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 401:throw new $(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")}updateThread(i,e,t){return P.fromPromise(this.__updateThread(i,e,t))}async __updateThread(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/threads/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:La.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,e,t){return P.fromPromise(this.__updateThreadComment(i,e,t))}async __updateThreadComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:fe.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,e,t){return P.fromPromise(this.__updateTraceComment(i,e,t))}async __updateTraceComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/comments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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 tm,W4=n(()=>{X();Q();b();Y();Z();J();te();tm=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,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/welcome-wizard")}submitWelcomeWizard(i={},e){return P.fromPromise(this.__submitWelcomeWizard(i,e))}async __submitWelcomeWizard(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 im,L4=n(()=>{X();Q();b();Y();Z();J();te();ie();im=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,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:Pj.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 B(t.error.body,t.rawResponse);case 401:throw new $(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 om,V4=n(()=>{X();Q();b();Y();Z();J();te();ie();om=class{constructor(i={}){this._options=M(i);}costsSummary(i,e){return P.fromPromise(this.__costsSummary(i,e))}async __costsSummary(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:At.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 B(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,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:as.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,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(i,e))}async __upsertWorkspaceConfiguration(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:as.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 B(o.error.body,o.rawResponse);case 422:throw new ce(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,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,e){return P.fromPromise(this.__getCost(i,e))}async __getCost(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kl.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 B(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,e){return P.fromPromise(this.__getMetric(i,e))}async __getMetric(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kl.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 B(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")}getWorkspaceVersion(i){return P.fromPromise(this.__getWorkspaceVersion(i))}async __getWorkspaceVersion(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/versions"),method:"GET",headers:e,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:Tj.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/workspaces/versions")}metricsSummary(i,e){return P.fromPromise(this.__metricsSummary(i,e))}async __metricsSummary(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kj.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 B(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 ns,J4=n(()=>{p4();c4();l4();m4();d4();u4();g4();f4();h4();y4();b4();R4();x4();w4();_4();k4();A4();P4();z4();S4();T4();v4();j4();E4();C4();I4();D4();U4();N4();B4();F4();M4();W4();L4();V4();X();Q();b();Y();Z();J();ns=class{constructor(i={}){this._options=M(i);}get systemUsage(){var i;return (i=this._systemUsage)!=null?i:this._systemUsage=new em(this._options)}get agentConfigs(){var i;return (i=this._agentConfigs)!=null?i:this._agentConfigs=new Al(this._options)}get alerts(){var i;return (i=this._alerts)!=null?i:this._alerts=new Pl(this._options)}get annotationQueues(){var i;return (i=this._annotationQueues)!=null?i:this._annotationQueues=new zl(this._options)}get assertionResults(){var i;return (i=this._assertionResults)!=null?i:this._assertionResults=new Sl(this._options)}get attachments(){var i;return (i=this._attachments)!=null?i:this._attachments=new Tl(this._options)}get check(){var i;return (i=this._check)!=null?i:this._check=new El(this._options)}get automationRuleEvaluators(){var i;return (i=this._automationRuleEvaluators)!=null?i:this._automationRuleEvaluators=new vl(this._options)}get chatCompletions(){var i;return (i=this._chatCompletions)!=null?i:this._chatCompletions=new jl(this._options)}get dashboards(){var i;return (i=this._dashboards)!=null?i:this._dashboards=new Cl(this._options)}get datasets(){var i;return (i=this._datasets)!=null?i:this._datasets=new Il(this._options)}get environments(){var i;return (i=this._environments)!=null?i:this._environments=new Dl(this._options)}get experiments(){var i;return (i=this._experiments)!=null?i:this._experiments=new Ul(this._options)}get feedbackDefinitions(){var i;return (i=this._feedbackDefinitions)!=null?i:this._feedbackDefinitions=new Nl(this._options)}get guardrails(){var i;return (i=this._guardrails)!=null?i:this._guardrails=new Bl(this._options)}get insightsViews(){var i;return (i=this._insightsViews)!=null?i:this._insightsViews=new Fl(this._options)}get llmModels(){var i;return (i=this._llmModels)!=null?i:this._llmModels=new Ml(this._options)}get llmProviderKey(){var i;return (i=this._llmProviderKey)!=null?i:this._llmProviderKey=new Wl(this._options)}get runners(){var i;return (i=this._runners)!=null?i:this._runners=new Xl(this._options)}get manualEvaluation(){var i;return (i=this._manualEvaluation)!=null?i:this._manualEvaluation=new Ll(this._options)}get ollama(){var i;return (i=this._ollama)!=null?i:this._ollama=new Vl(this._options)}get ollieState(){var i;return (i=this._ollieState)!=null?i:this._ollieState=new Jl(this._options)}get openTelemetryIngestion(){var i;return (i=this._openTelemetryIngestion)!=null?i:this._openTelemetryIngestion=new Hl(this._options)}get optimizations(){var i;return (i=this._optimizations)!=null?i:this._optimizations=new Gl(this._options)}get pairing(){var i;return (i=this._pairing)!=null?i:this._pairing=new Ol(this._options)}get projects(){var i;return (i=this._projects)!=null?i:this._projects=new Kl(this._options)}get prompts(){var i;return (i=this._prompts)!=null?i:this._prompts=new $l(this._options)}get retentionRules(){var i;return (i=this._retentionRules)!=null?i:this._retentionRules=new Yl(this._options)}get serviceToggles(){var i;return (i=this._serviceToggles)!=null?i:this._serviceToggles=new Zl(this._options)}get spans(){var i;return (i=this._spans)!=null?i:this._spans=new ql(this._options)}get traces(){var i;return (i=this._traces)!=null?i:this._traces=new rm(this._options)}get welcomeWizard(){var i;return (i=this._welcomeWizard)!=null?i:this._welcomeWizard=new tm(this._options)}get workspacePermissions(){var i;return (i=this._workspacePermissions)!=null?i:this._workspacePermissions=new im(this._options)}get workspaces(){var i;return (i=this._workspaces)!=null?i:this._workspaces=new om(this._options)}get redirect(){var i;return (i=this._redirect)!=null?i:this._redirect=new Ql(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"is-alive/ping"),method:"GET",headers:e,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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"is-alive/ver"),method:"GET",headers:e,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 H4=n(()=>{});var G4,O4=n(()=>{op();(e=>(e.LogLevel=Fe,e.ConsoleLogger=tt))(G4||(G4={}));});var K4=n(()=>{H4();O4();});var $4=n(()=>{K4();});var Pt=n(()=>{ie();J4();Y();J();$4();te();});var ge,qe=n(()=>{ge=()=>v7();});var wi,vj=n(()=>{wi=class{static serializePromptToInfoDict(i){return {name:i.name,...i.id&&{id:i.id},version:{...i.versionId&&{id:i.versionId},...i.commit&&{commit:i.commit},template:i.prompt}}}static normalizeMetadata(i){if(!i)return {};if(typeof i=="object"&&!Array.isArray(i))return i;if(typeof i=="string")try{let e=JSON.parse(i);if(typeof e=="object"&&!Array.isArray(e))return e}catch{}return {}}static mergePromptsIntoMetadata(i,e,t){let o=t.map(c=>this.serializePromptToInfoDict(c)),a=this.normalizeMetadata(i),s=this.normalizeMetadata(e);return {...a,...s,opik_prompts:o}}static processUpdate(i,e){let{prompts:t,...o}=i;if(!t||t.length===0){if(o.metadata&&e){let a=this.normalizeMetadata(e),s=this.normalizeMetadata(o.metadata);return {...o,metadata:{...a,...s}}}return o}return {...o,metadata:this.mergePromptsIntoMetadata(e,o.metadata,t)}}static processTraceUpdate(i,e){return this.processUpdate(i,e)}static processSpanUpdate(i,e){return this.processUpdate(i,e)}};});var am,Q4=n(()=>{qe();vj();am=class p{constructor(i,e){this.data=i;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=i=>{var o;let e=wi.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,...e};return this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=i=>{var a;let e=(a=this.data.projectName)!=null?a:this.opik.config.projectName,t={id:ge(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(t);let o=new p(t,this.opik);return this.childSpans.push(o),o};}};});var nm,Y4=n(()=>{qe();Q4();vj();nm=class{constructor(i,e){this.data=i;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=i=>{var a,s;let e=(s=(a=this.data.projectName)!=null?a:i.projectName)!=null?s:this.opik.config.projectName,t={id:ge(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(t);let o=new am(t,this.opik);return this.spans.push(o),o};this.update=i=>{var o;let e=wi.processTraceUpdate(i,this.data.metadata),t={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...e};return this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var X4,ss,L8,V8,Z4,q4,e6,r6,jj=n(()=>{X4={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"},ss={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},L8=p=>Object.entries(p).map(([i,e])=>`${i}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),V8=p=>p.replace(/\/api\/?$/,""),Z4=p=>Buffer.from(p).toString("base64"),q4=(p,i,e)=>{let t=L8(e),o=V8(p),a=o.endsWith("/")?o:`${o}/`,s=i.startsWith("/")?i.slice(1):i;return `${a}${s}?${t}`},e6=({datasetId:p,experimentId:i,baseUrl:e})=>q4(e,X4.EXPERIMENTS,{[ss.EXPERIMENT_ID]:i,[ss.DATASET_ID]:p,[ss.PATH]:Z4(e)}),r6=(p,i)=>q4(i,X4.PROJECTS,{[ss.TRACE_ID]:p,[ss.PATH]:Z4(i)});});var J8,sm,ps,De,zt=n(()=>{q();J8=300,sm=100,ps=class{constructor({action:i,batchSize:e=sm,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,e)=>{if(this.queue.set(i,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(i,e)=>{let t=this.queue.get(i);t&&(this.queue.set(i,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let i=new Map(this.queue);this.queue.clear(),E.debug(`Adding ${i.size} items to ${this.name} promise:`,i),this.promise=this.promise.finally(()=>(E.debug(`Flushing ${this.name}:`,i),this.action(i))).catch(e=>{E.error(`Failed to flush ${this.name}:`,e,i);}),await this.promise;};this.action=i,this.batchSize=e,this.delay=t,this.enableBatch=o,this.name=a;}},De=class{constructor({delay:i=J8,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:o=true,createBatchSize:a=sm,updateBatchSize:s=sm,deleteBatchSize:c=sm,name:l="BatchQueue"}={}){this.create=i=>{let e=this.getId(i);this.createQueue.add(e,i);};this.get=async i=>{let e=this.createQueue.queue.get(i);return e||this.getEntity(i)};this.update=(i,e)=>{if(this.createQueue.queue.get(i)){this.createQueue.update(i,e);return}let o=this.updateQueue.queue.get(i);this.updateQueue.add(i,{...o,...e});};this.delete=i=>{if(this.createQueue.queue.has(i)){this.createQueue.queue.delete(i);return}this.deleteQueue.add(i);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new ps({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:i,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new ps({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 ps({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 H8,pm,t6=n(()=>{Ws();q();zt();H8="suite_assertion",pm=class extends De{constructor(e,t,o="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${o}`});this.api=e;this.entityType=o;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,E.warn('Opik backend does not support PUT /v1/private/assertion-results yet \u2014 falling back to the legacy feedback-scores path with categoryName="suite_assertion". Upgrade the Opik backend to a version that includes OPIK-6048 to enable native assertion-results ingestion.'),await this.writeViaLegacyFeedbackScores(e);return}throw t}}async writeViaLegacyFeedbackScores(e){let t=e.map(o=>({id:o.entityId,name:o.name,value:o.status==="passed"?1:0,categoryName:H8,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 cm,i6=n(()=>{zt();cm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){await this.api.spans.updateSpan(e,{body:t},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var lm,o6=n(()=>{zt();lm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var mm,a6=n(()=>{zt();mm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){await this.api.traces.updateTrace(e,{body:t},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var dm,n6=n(()=>{zt();dm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var um,s6=n(()=>{Pt();um=class extends ns{constructor(e){var o;let t={...e==null?void 0:e.headers,...(o=e==null?void 0:e.requestOptions)==null?void 0:o.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var gm,p6=n(()=>{zt();gm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function c6(){return Ej||(Ej=await G8()),Ej}var Ej,l6=n(()=>{Ej=null;});var _i,fm=n(()=>{ie();qe();l6();_i=class p{constructor(i,e){let{id:t,traceId:o,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=i;this.id=t||ge(),this.traceId=o,this.spanId=a,this.source=s||Wu.Sdk,this.description=c!=null?c:e,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 e=O8(i);return (await c6()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(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 dr(p,i,e){var c;if(e===0)return [];let t=new TextDecoder("utf-8"),o=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
3
+ `)),{ok:true,value:i}):t}}var pr=n(()=>{});function cp(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var gg=n(()=>{});var Ht,fg=n(()=>{gg();Ht=class p extends Error{constructor(e){super(e.map(cp).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var Gt,hg=n(()=>{gg();Gt=class p extends Error{constructor(e){super(e.map(cp).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ne(p){return {nullable:()=>Y3(p),optional:()=>yg(p),optionalNullable:()=>X3(p),transform:i=>bg(p,i),parseOrThrow:(i,e)=>{let t=p.parse(i,e);if(t.ok)return t.value;throw new Gt(t.errors)},jsonOrThrow:(i,e)=>{let t=p.json(i,e);if(t.ok)return t.value;throw new Ht(t.errors)}}}function Y3(p){let i={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>G.NULLABLE};return {...i,...ne(i)}}function yg(p){let i={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>G.OPTIONAL};return {...i,...ne(i)}}function X3(p){let i={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>G.OPTIONAL_NULLABLE};return {...i,...ne(i)}}function bg(p,i){let e={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 {...e,...ne(e)}}var mH=n(()=>{he();fg();hg();});var Ie=n(()=>{mH();fg();hg();});function dH(){let p={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i=="bigint"?{ok:true,value:i}:typeof i=="number"?{ok:true,value:BigInt(i)}:{ok:false,errors:[{path:e,message:oe(i,"bigint | number")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="bigint"?{ok:false,errors:[{path:e,message:oe(i,"bigint")}]}:{ok:true,value:i},getType:()=>G.BIGINT};return {...be(p),...ne(p)}}var uH=n(()=>{he();ze();pr();Ie();});var gH=n(()=>{uH();});function fH(){let p={parse:(i,{breadcrumbsPrefix:e=[]}={})=>typeof i!="string"?{ok:false,errors:[{path:e,message:oe(i,"string")}]}:Z3.test(i)?{ok:true,value:new Date(i)}:{ok:false,errors:[{path:e,message:oe(i,"ISO 8601 date string")}]},json:(i,{breadcrumbsPrefix:e=[]}={})=>i instanceof Date?{ok:true,value:i.toISOString()}:{ok:false,errors:[{path:e,message:oe(i,"Date object")}]},getType:()=>G.DATE};return {...be(p),...ne(p)}}var Z3,hH=n(()=>{he();ze();pr();Ie();Z3=/^([+-]?\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 yH=n(()=>{hH();});function Re(p,i){return ()=>{let e={parse:i,json:i,getType:()=>p};return {...be(e),...ne(e)}}}var cr=n(()=>{Ie();pr();});function lp(p){let i=new Set(p);return Re(G.ENUM,(t,{allowUnrecognizedEnumValues:o,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:oe(t,"string")}]}:!i.has(t)&&!o?{ok:false,errors:[{path:a,message:oe(t,"enum")}]}:{ok:true,value:t})()}var bH=n(()=>{he();cr();ze();});var Rg=n(()=>{bH();});function RH(p){let i=xg(p);return {...i,...ne(i)}}function xg(p){return {parse:(i,e)=>Ot(p).parse(i,e),json:(i,e)=>Ot(p).json(i,e),getType:()=>Ot(p).getType()}}function Ot(p){let i=p;return i.__zurg_memoized==null&&(i.__zurg_memoized=p()),i.__zurg_memoized}var wg=n(()=>{Ie();});function io(p){return Object.entries(p)}var _g=n(()=>{});function oo(p,i){let e=new Set(i);return Object.entries(p).reduce((t,[o,a])=>(e.has(o)&&(t[o]=a),t),{})}var kg=n(()=>{});function br(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 ao=n(()=>{});function no(p){return Object.keys(p)}var Ag=n(()=>{});function xH(p,i){let e=[],t=[];for(let o of p)i(o)?e.push(o):t.push(o);return [e,t]}var wH=n(()=>{});function Oe(p){return {withParsedProperties:i=>Pg(p,i)}}function Pg(p,i){let e={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(!br(t))return {ok:false,errors:[{path:(c=o==null?void 0:o.breadcrumbsPrefix)!=null?c:[],message:oe(t,"object")}]};let a=new Set(Object.keys(i)),s=oo(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,o)},getType:()=>p.getType()};return {...e,...ne(e),...Oe(e)}}var _H=n(()=>{kg();ze();ao();Ie();});var so=n(()=>{_H();});function kH(p,i){return {rawKey:p,valueSchema:i,isProperty:true}}function Br(p){return p.isProperty}var zg=n(()=>{});function mp(p){let i={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Br(t)?t.rawKey:e),_getParsedProperties:()=>no(p),parse:(e,t)=>{let o={},a=[];for(let[s,c]of io(p)){let l=Br(c)?c.rawKey:s,m=Br(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};o[l]=u,zH(m)&&a.push(l);}return AH({value:e,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:(e,t)=>{let o=[];for(let[a,s]of io(p)){let c=Br(s)?s.valueSchema:s;zH(c)&&o.push(a);}return AH({value:e,requiredKeys:o,getProperty:a=>{let s=p[a];if(s!=null)return Br(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:()=>G.OBJECT};return {...be(i),...ne(i),...Oe(i),...at(i)}}function AH({value:p,requiredKeys:i,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:o=false,breadcrumbsPrefix:a=[]}){if(!br(p))return {ok:false,errors:[{path:a,message:oe(p,"object")}]};let s=new Set(i),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...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 at(p){return {extend:i=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...i._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...i._getRawProperties()],parse:(t,o)=>PH({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)=>PH({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:()=>G.OBJECT};return {...e,...ne(e),...Oe(e),...at(e)}},passthrough:()=>{let i=new Set(p._getRawProperties()),e=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))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>G.OBJECT};return {...t,...ne(t),...Oe(t),...at(t)}}}}function PH({extensionKeys:p,value:i,transformBase:e,transformExtension:t,breadcrumbsPrefix:o=[]}){if(!br(i))return {ok:false,errors:[{path:o,message:oe(i,"object")}]};let a=new Set(p),[s,c]=xH(no(i),u=>a.has(u)),l=e(oo(i,c)),m=t(oo(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 zH(p){return !q3(p)}function q3(p){switch(p.getType()){case G.ANY:case G.UNKNOWN:case G.OPTIONAL:case G.OPTIONAL_NULLABLE:return true;default:return false}}var Sg=n(()=>{he();_g();kg();ze();ao();Ag();pr();wH();so();Ie();zg();});function SH(p){return mp(p)}var TH=n(()=>{Sg();});var Tg=n(()=>{Sg();TH();zg();});function vH(p){let i={...xg(p),_getRawProperties:()=>Ot(p)._getRawProperties(),_getParsedProperties:()=>Ot(p)._getParsedProperties()};return {...i,...ne(i),...Oe(i),...at(i)}}var jH=n(()=>{Tg();so();Ie();wg();});var EH=n(()=>{wg();jH();});function dp(p){let i={parse:(e,t)=>CH(e,(o,a)=>{var s;return p.parse(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>CH(e,(o,a)=>{var s;return p.json(o,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>G.LIST};return {...be(i),...ne(i)}}function CH(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:oe(p,"list"),path:[]}]}}var IH=n(()=>{he();ze();pr();Ie();});var vg=n(()=>{IH();});function DH(p){return Re(G.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:oe(e,`${p.toString()}`)}]})()}var UH=n(()=>{he();cr();ze();});function NH(p){return Re(G.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:oe(e,`"${p}"`)}]})()}var BH=n(()=>{he();cr();ze();});var FH=n(()=>{UH();BH();});var MH,WH=n(()=>{he();cr();MH=Re(G.ANY,p=>({ok:true,value:p}));});var LH,VH=n(()=>{he();cr();ze();LH=Re(G.BOOLEAN,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"boolean")}]});});var JH,HH=n(()=>{he();cr();JH=Re(G.NEVER,(p,{breadcrumbsPrefix:i=[]}={})=>({ok:false,errors:[{path:i,message:"Expected never"}]}));});var GH,OH=n(()=>{he();cr();ze();GH=Re(G.NUMBER,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"number")}]});});var KH,$H=n(()=>{he();cr();ze();KH=Re(G.STRING,(p,{breadcrumbsPrefix:i=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:i,message:oe(p,"string")}]});});var QH,YH=n(()=>{he();cr();QH=Re(G.UNKNOWN,p=>({ok:true,value:p}));});var XH=n(()=>{WH();VH();HH();OH();$H();YH();});function qH(p,i){let e={parse:(t,o)=>ZH({value:t,isKeyNumeric:p.getType()===G.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)=>ZH({value:t,isKeyNumeric:p.getType()===G.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:()=>G.RECORD};return {...be(e),...ne(e)}}function ZH({value:p,isKeyNumeric:i,transformKey:e,transformValue:t,breadcrumbsPrefix:o=[]}){return br(p)?io(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=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:o,message:oe(p,"object")}]}}var eG=n(()=>{he();_g();ze();ao();pr();Ie();});var rG=n(()=>{eG();});function tG(p){let i=dp(p),e={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:oe(t,"Set")}]}},getType:()=>G.SET};return {...be(e),...ne(e)}}var iG=n(()=>{he();ze();pr();vg();Ie();});var oG=n(()=>{iG();});function nG(p){let i={parse:(e,t)=>aG((o,a)=>o.parse(e,a),p,t),json:(e,t)=>aG((o,a)=>o.json(e,a),p,t),getType:()=>G.UNDISCRIMINATED_UNION};return {...be(i),...ne(i)}}function aG(p,i,e){let t=[];for(let[o,a]of i.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${o}] ${c.message}`});}return {ok:false,errors:t}}var sG=n(()=>{he();pr();Ie();});var pG=n(()=>{sG();});function cG(p,i){return {parsedDiscriminant:p,rawDiscriminant:i}}var lG=n(()=>{});function dG(p,i){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,o=lp(no(i)),a={parse:(s,c)=>mG({value:s,discriminant:e,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:[],e]})},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)=>mG({value:s,discriminant:t,transformedDiscriminant:e,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:()=>G.UNION};return {...be(a),...ne(a),...Oe(a)}}function mG({value:p,discriminant:i,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:o,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!br(p))return {ok:false,errors:[{path:c,message:oe(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:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,i],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var uG=n(()=>{he();ze();ao();Ag();pr();Rg();so();Ie();});var gG=n(()=>{lG();uG();});var fG=n(()=>{gH();yH();Rg();EH();vg();FH();Tg();so();XH();rG();Ie();oG();pG();gG();});var r={};V(r,{JsonError:()=>Ht,ParseError:()=>Gt,any:()=>MH,bigint:()=>dH,boolean:()=>LH,booleanLiteral:()=>DH,date:()=>fH,discriminant:()=>cG,enum_:()=>lp,getObjectLikeUtils:()=>Oe,getObjectUtils:()=>at,getSchemaUtils:()=>ne,isProperty:()=>Br,lazy:()=>RH,lazyObject:()=>vH,list:()=>dp,never:()=>JH,number:()=>GH,object:()=>mp,objectWithoutOptionalProperties:()=>SH,optional:()=>yg,property:()=>kH,record:()=>qH,set:()=>tG,string:()=>KH,stringLiteral:()=>NH,transform:()=>bg,undiscriminatedUnion:()=>nG,union:()=>dG,unknown:()=>QH,withParsedProperties:()=>Pg});var hG=n(()=>{fG();});function yG(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 bG=n(()=>{});function xG(p,...i){if(!p)return "";if(i.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return RG(p,...i)}let t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=_G(a);s&&(e.pathname=wG(e.pathname,s));}return o&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return RG(p,...i)}function RG(p,...i){if(i.length===0)return p;let e=p,t=i[i.length-1],o=t==null?void 0:t.endsWith("/");for(let a of i){let s=_G(a);s&&(e=wG(e,s));}return o&&!e.endsWith("/")&&(e+="/"),e}function wG(p,i){return p.endsWith("/")?p+i:`${p}/${i}`}function _G(p){if(!p)return p;let i=0,e=p.length;return p.startsWith("/")&&(i=1),p.endsWith("/")&&(e=p.length-1),i===0&&e===p.length?p:p.slice(i,e)}var kG=n(()=>{});var _={};V(_,{encodePathParam:()=>yG,join:()=>xG,toQueryString:()=>it});var AG=n(()=>{bG();kG();eo();});var b=n(()=>{$1();mg();pH();cH();dg();hG();AG();});function M(p){let i=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":Jt.type,"X-Fern-Runtime-Version":Jt.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:to.createLogger(p==null?void 0:p.logging),headers:i}}var X=n(()=>{Q();b();});var T,Y=n(()=>{T={Default:"http://localhost:5173/api"};});function j(p,i,e,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 Ur(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:i});default:throw new k({message:"Unknown error",rawResponse:i})}}var Z=n(()=>{J();});var po,PG=n(()=>{b();po=r.object({blueprintName:r.property("blueprint_name",r.string())});});var jg,Eg=n(()=>{b();jg=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),envName:r.property("env_name",r.string()),blueprintId:r.property("blueprint_id",r.string()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),endedAt:r.property("ended_at",r.date().optional())});});var co,zG=n(()=>{b();Eg();co=r.object({projectId:r.property("project_id",r.string()),envs:r.list(jg)});});var lo,SG=n(()=>{b();lo=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var Cg=n(()=>{PG();zG();SG();});var TG=n(()=>{Cg();});var up={};V(up,{AgentConfigEnvSetByName:()=>po,AgentConfigEnvUpdate:()=>co,AgentConfigRemoveValues:()=>lo});var vG=n(()=>{TG();});var gp,jG=n(()=>{b();gp=r.enum_(["general","slack","pagerduty"]);});var Ig=n(()=>{jG();});var fp={};V(fp,{GetWebhookExamplesRequestAlertType:()=>gp});var EG=n(()=>{Ig();});var Dg,Ug=n(()=>{b();Dg=r.enum_(["trace","thread"]);});var mo,Ng=n(()=>{b();Ug();mo=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:Dg,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});});var uo,CG=n(()=>{b();Ng();uo=r.object({annotationQueues:r.property("annotation_queues",r.list(mo))});});var go,IG=n(()=>{b();go=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional())});});var Bg=n(()=>{CG();IG();});var DG=n(()=>{Bg();});var hp={};V(hp,{AnnotationQueueBatchWrite:()=>uo,AnnotationQueueUpdate:()=>go});var UG=n(()=>{DG();});var Fg,Mg=n(()=>{b();Fg=r.enum_(["ui","sdk","online_scoring"]);});var Wg,Lg=n(()=>{b();Wg=r.enum_(["passed","failed"]);});var Vg,Jg=n(()=>{b();Mg();Lg();Vg=r.object({entityId:r.property("entity_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),status:Wg,reason:r.string().optional(),source:Fg});});var yp,Hg=n(()=>{b();yp=r.enum_(["TRACE","SPAN","THREAD"]);});var fo,NG=n(()=>{b();Jg();Hg();fo=r.object({entityType:r.property("entity_type",yp),assertionResults:r.property("assertion_results",r.list(Vg))});});var Gg=n(()=>{NG();});var BG=n(()=>{Gg();});var Og=n(()=>{Hg();});var bp={};V(bp,{AssertionResultBatch:()=>fo,AssertionResultBatchEntityType:()=>yp});var FG=n(()=>{BG();Og();});var Rp,Kg=n(()=>{b();Rp=r.enum_(["trace","span"]);});var ho,MG=n(()=>{b();Kg();ho=r.object({fileName:r.property("file_name",r.string()),numOfFileParts:r.property("num_of_file_parts",r.number()),mimeType:r.property("mime_type",r.string().optional()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Rp),entityId:r.property("entity_id",r.string()),path:r.string()});});var $g=n(()=>{MG();});var xp={};V(xp,{Request:()=>e8});var e8,WG=n(()=>{b();e8=r.record(r.string(),r.unknown());});var LG=n(()=>{$g();WG();});var wp,VG=n(()=>{b();wp=r.enum_(["trace","span"]);});var _p,JG=n(()=>{b();_p=r.enum_(["trace","span"]);});var kp,HG=n(()=>{b();kp=r.enum_(["trace","span"]);});var Qg=n(()=>{VG();JG();Kg();HG();});var Kt={};V(Kt,{AttachmentListRequestEntityType:()=>wp,DownloadAttachmentRequestEntityType:()=>_p,StartMultipartUploadRequest:()=>ho,StartMultipartUploadRequestEntityType:()=>Rp,UploadAttachmentRequestEntityType:()=>kp,uploadAttachment:()=>xp});var GG=n(()=>{LG();Qg();});var yo,Ap=n(()=>{b();yo=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var Rr,$t=n(()=>{b();Rr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var L,de=n(()=>{b();L=r.record(r.string(),r.unknown());});var bo,Pp=n(()=>{b();de();bo=r.object({role:r.string(),content:L});});var Yg,Xg=n(()=>{b();Yg=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var Zg,qg=n(()=>{b();Zg=r.enum_(["text","json_object","json_schema"]);});var ef,rf=n(()=>{b();Xg();qg();ef=r.object({type:Zg.optional(),jsonSchema:r.property("json_schema",Yg.optional())});});var tf,of=n(()=>{b();tf=r.object({includeUsage:r.property("include_usage",r.boolean().optional())});});var af,nf=n(()=>{b();af=r.enum_(["function"]);});var sf,pf=n(()=>{b();Ap();nf();sf=r.object({type:af.optional(),function:yo.optional()});});var Ro,OG=n(()=>{b();Ap();$t();Pp();rf();of();pf();Ro=r.object({model:r.string().optional(),messages:r.list(bo).optional(),temperature:r.number().optional(),topP:r.property("top_p",r.number().optional()),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:r.property("stream_options",tf.optional()),stop:r.list(r.string()).optional(),maxTokens:r.property("max_tokens",r.number().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional()),presencePenalty:r.property("presence_penalty",r.number().optional()),frequencyPenalty:r.property("frequency_penalty",r.number().optional()),logitBias:r.property("logit_bias",r.record(r.string(),r.number()).optional()),user:r.string().optional(),responseFormat:r.property("response_format",ef.optional()),seed:r.number().optional(),tools:r.list(sf).optional(),toolChoice:r.property("tool_choice",r.record(r.string(),r.unknown()).optional()),parallelToolCalls:r.property("parallel_tool_calls",r.boolean().optional()),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.property("reasoning_effort",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional()),logprobs:r.boolean().optional(),topLogprobs:r.property("top_logprobs",r.number().optional()),functions:r.list(yo).optional(),functionCall:r.property("function_call",Rr.optional())});});var cf=n(()=>{OG();});var KG=n(()=>{cf();});var zp={};V(zp,{ChatCompletionRequest:()=>Ro});var $G=n(()=>{KG();});var lf,mf=n(()=>{b();lf=r.enum_(["llm_judge","code_metric"]);});var xr,Qt=n(()=>{b();mf();de();xr=r.object({name:r.string(),type:lf,config:L});});var Ke,nt=n(()=>{b();Ke=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var df,uf=n(()=>{b();df=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var xo,QG=n(()=>{b();Qt();nt();uf();xo=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",df),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional())});});var gf,ff=n(()=>{b();gf=r.object({includeSpans:r.boolean().optional(),includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var wo,YG=n(()=>{b();Qt();nt();ff();wo=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",gf),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional())});});var _o,XG=n(()=>{b();_o=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var ko,ZG=n(()=>{b();ko=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Ao,qG=n(()=>{b();Ao=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var hf,yf=n(()=>{b();hf=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Po,Sp=n(()=>{b();yf();Po=r.object({field:r.string().optional(),operator:hf.optional(),key:r.string().optional(),value:r.string().optional()});});var bf,Rf=n(()=>{b();Qt();nt();de();bf=r.object({input:r.string().optional(),expectedOutput:r.property("expected_output",r.string().optional()),metadata:L.optional(),data:L.optional(),description:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var zo,eO=n(()=>{b();Sp();Rf();zo=r.object({ids:r.list(r.string()).optional(),filters:r.list(Po).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:bf,mergeTags:r.property("merge_tags",r.boolean().optional())});});var xf,wf=n(()=>{b();xf=r.enum_(["manual","trace","span","sdk"]);});var _f,kf=n(()=>{b();_f=r.enum_(["llm_judge","code_metric"]);});var Se,wr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Af,Pf=n(()=>{b();kf();wr();Af=r.object({name:r.string(),type:_f,config:Se});});var zf,Sf=n(()=>{b();zf=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var So,Tf=n(()=>{b();wf();Pf();Sf();de();So=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:xf,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Af).optional(),executionPolicy:r.property("execution_policy",zf.optional())});});var To,rO=n(()=>{b();Tf();To=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(So),batchGroupId:r.property("batch_group_id",r.string().optional())});});var vo,tO=n(()=>{b();vo=r.object({datasetName:r.property("dataset_name",r.string()),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),steamLimit:r.property("steam_limit",r.number().optional()),datasetVersion:r.property("dataset_version",r.string().optional()),projectName:r.property("project_name",r.string().optional()),filters:r.string().optional()});});var jo,iO=n(()=>{b();Sp();jo=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Po).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var Tp,vf=n(()=>{b();Tp=r.enum_(["private","public"]);});var Eo,oO=n(()=>{b();vf();Eo=r.object({name:r.string(),description:r.string().optional(),visibility:Tp.optional(),tags:r.list(r.string()).optional()});});var Co,aO=n(()=>{b();Co=r.object({versionRef:r.property("version_ref",r.string())});});var Io,nO=n(()=>{b();Io=r.object({versionName:r.property("version_name",r.string())});});var Do,sO=n(()=>{b();Do=r.object({tag:r.string()});});var Uo,pO=n(()=>{b();Uo=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var vp,jf=n(()=>{b();vp=r.enum_(["dataset","evaluation_suite"]);});var jp,Ef=n(()=>{b();jp=r.enum_(["private","public"]);});var No,cO=n(()=>{b();jf();Ef();No=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:vp.optional(),visibility:jp.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var Cf=n(()=>{QG();YG();XG();ZG();qG();eO();rO();tO();iO();oO();aO();nO();sO();pO();cO();});var If,Df=n(()=>{b();If=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var Yt,Uf=n(()=>{b();Df();Yt=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:If.optional(),filePath:r.property("file_path",r.string().optional()),errorMessage:r.property("error_message",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional()),viewedAt:r.property("viewed_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ep={};V(Ep,{Response:()=>r8});var r8,lO=n(()=>{b();Uf();r8=r.list(Yt);});var mO=n(()=>{lO();Cf();});var Nf=n(()=>{vf();jf();Ef();});var Xt={};V(Xt,{CreateDatasetItemsFromSpansRequest:()=>xo,CreateDatasetItemsFromTracesRequest:()=>wo,DatasetExpansionWrite:()=>_o,DatasetIdentifier:()=>ko,DatasetIdentifierPublic:()=>Ao,DatasetItemBatchUpdate:()=>zo,DatasetItemBatchWrite:()=>To,DatasetItemStreamRequest:()=>vo,DatasetItemsDelete:()=>jo,DatasetUpdate:()=>Eo,DatasetUpdateVisibility:()=>Tp,DatasetVersionRestorePublic:()=>Co,DatasetVersionRetrieveRequestPublic:()=>Io,DatasetVersionTag:()=>Do,DatasetVersionUpdatePublic:()=>Uo,DatasetWrite:()=>No,DatasetWriteType:()=>vp,DatasetWriteVisibility:()=>jp,getDatasetExportJobs:()=>Ep});var dO=n(()=>{mO();Nf();});var Bo,uO=n(()=>{b();Bo=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var Fo,gO=n(()=>{b();Fo=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var Bf=n(()=>{uO();gO();});var fO=n(()=>{Bf();});var Cp={};V(Cp,{EnvironmentUpdate:()=>Bo,EnvironmentWrite:()=>Fo});var hO=n(()=>{fO();});var Mo,Ip=n(()=>{b();Mo=r.object({name:r.string(),value:r.number()});});var Ff,Mf=n(()=>{b();Ff=r.enum_(["running","completed","cancelled"]);});var Wf,Lf=n(()=>{b();Wf=r.enum_(["regular","trial","mini-batch","mutation"]);});var Wo,Vf=n(()=>{b();Ip();Mf();Lf();de();Wo=r.object({name:r.string().optional(),metadata:L.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),type:Wf.optional(),status:Ff.optional(),experimentScores:r.property("experiment_scores",r.list(Mo).optional())});});var Lo,yO=n(()=>{b();Vf();Lo=r.object({ids:r.list(r.string()),update:Wo,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Fr,Vo=n(()=>{b();Fr=r.object({id:r.string(),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var Jf,Hf=n(()=>{b();de();Pp();Vo();Jf=r.object({model:r.string(),messages:r.list(bo),configs:r.record(r.string(),L).optional(),promptVersions:r.property("prompt_versions",r.list(Fr).optional())});});var Jo,bO=n(()=>{b();Hf();Vo();Jo=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(Jf),projectName:r.property("project_name",r.string().optional()),datasetId:r.property("dataset_id",r.string()),versionHash:r.property("version_hash",r.string().optional()),promptVersions:r.property("prompt_versions",r.list(Fr).optional())});});var Gf,Of=n(()=>{b();Gf=r.enum_(["ui","sdk","online_scoring"]);});var Kf,$f=n(()=>{b();Kf=r.enum_(["ui","sdk","online_scoring"]);});var Qf,Yf=n(()=>{b();$f();Qf=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Kf.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var Xf,Zf=n(()=>{b();Of();Yf();Xf=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Gf,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Qf).optional())});});var $e,Ho=n(()=>{b();$e=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Go,Dp=n(()=>{b();Go=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var qf,eh=n(()=>{b();qf=r.enum_(["sdk","experiment","playground","optimization"]);});var rh,th=n(()=>{b();rh=r.enum_(["general","tool","llm","guardrail"]);});var ih,oh=n(()=>{b();Dp();Ho();eh();th();ih=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:rh.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),ttft:r.number().optional(),source:qf.optional()});});var ah,nh=n(()=>{b();ah=r.enum_(["sdk","experiment","playground","optimization"]);});var sh,ph=n(()=>{b();Dp();Ho();nh();sh=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Go.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:ah.optional()});});var ch,lh=n(()=>{b();Zf();Ho();oh();ph();ch=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",$e.optional()),trace:sh.optional(),spans:r.list(ih).optional(),feedbackScores:r.property("feedback_scores",r.list(Xf).optional())});});var Oo,RO=n(()=>{b();lh();Oo=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(ch)});});var Ko,xO=n(()=>{b();Ko=r.object({experimentName:r.property("experiment_name",r.string()),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),projectName:r.property("project_name",r.string().optional())});});var mh,dh=n(()=>{b();mh=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var fe,st=n(()=>{b();fe=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var uh,gh=n(()=>{b();uh=r.enum_(["passed","failed"]);});var fh,hh=n(()=>{b();fh=r.enum_(["default","hidden"]);});var yh,bh=n(()=>{b();yh=r.enum_(["ui","sdk","online_scoring"]);});var Rh,xh=n(()=>{b();Rh=r.enum_(["ui","sdk","online_scoring"]);});var wh,_h=n(()=>{b();xh();wh=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Rh.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var Pe,pt=n(()=>{b();bh();_h();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:yh,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),wh).optional())});});var le,Qe=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var $o,Up=n(()=>{b();dh();st();nt();gh();hh();pt();Qe();$o=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",fh.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",Ke.optional()),assertionResults:r.property("assertion_results",r.list(mh).optional()),status:uh.optional()});});var Qo,wO=n(()=>{b();Up();Qo=r.object({experimentItems:r.property("experiment_items",r.list($o))});});var Yo,_O=n(()=>{b();Yo=r.object({ids:r.list(r.string())});});var Xo,kO=n(()=>{b();Xo=r.object({name:r.string(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var kh,Ah=n(()=>{b();kh=r.object({name:r.string(),value:r.number()});});var Me,Zt=n(()=>{b();Me=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Np,Ph=n(()=>{b();Np=r.object({id:r.string()});});var Bp,zh=n(()=>{b();Bp=r.enum_(["dataset","evaluation_suite"]);});var Fp,Sh=n(()=>{b();Fp=r.enum_(["running","completed","cancelled"]);});var Mp,Th=n(()=>{b();Mp=r.enum_(["regular","trial","mini-batch","mutation"]);});var Zo,AO=n(()=>{b();Ah();Zt();Ph();zh();Sh();Th();Zo=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Me.optional(),tags:r.list(r.string()).optional(),type:Mp.optional(),evaluationMethod:r.property("evaluation_method",Bp.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Fp.optional(),experimentScores:r.property("experiment_scores",r.list(kh).optional()),promptVersion:r.property("prompt_version",Np.optional()),promptVersions:r.property("prompt_versions",r.list(Np).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var vh=n(()=>{yO();bO();RO();xO();wO();_O();kO();AO();});var PO=n(()=>{vh();});var jh=n(()=>{zh();Sh();Th();});var Wp={};V(Wp,{ExperimentBatchUpdate:()=>Lo,ExperimentExecutionRequest:()=>Jo,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Oo,ExperimentItemStreamRequest:()=>Ko,ExperimentItemsBatch:()=>Qo,ExperimentItemsDelete:()=>Yo,ExperimentStreamRequestPublic:()=>Xo,ExperimentWrite:()=>Zo,ExperimentWriteEvaluationMethod:()=>Bp,ExperimentWriteStatus:()=>Fp,ExperimentWriteType:()=>Mp});var zO=n(()=>{PO();jh();});var Lp,SO=n(()=>{b();Lp=r.enum_(["numerical","categorical","boolean"]);});var Eh=n(()=>{SO();});var Vp={};V(Vp,{FindFeedbackDefinitionsRequestType:()=>Lp});var TO=n(()=>{Eh();});var Ch,Ih=n(()=>{b();Ch=r.enum_(["TOPIC","PII"]);});var Dh,Uh=n(()=>{b();Dh=r.enum_(["passed","failed"]);});var Nh,Bh=n(()=>{b();Ih();Uh();de();Nh=r.object({entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:Ch,result:Dh,config:L,details:L});});var qo,vO=n(()=>{b();Bh();qo=r.object({guardrails:r.list(Nh)});});var Fh=n(()=>{vO();});var jO=n(()=>{Fh();});var Jp={};V(Jp,{GuardrailBatchWrite:()=>qo});var EO=n(()=>{jO();});var Hp={};V(Hp,{Response:()=>t8});var t8,CO=n(()=>{b();t8=r.string();});var IO=n(()=>{CO();});var qt={};V(qt,{getLlmModels:()=>Hp});var DO=n(()=>{IO();});var ea,UO=n(()=>{b();ea=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});});var Gp,Mh=n(()=>{b();Gp=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var ra,NO=n(()=>{b();Mh();ra=r.object({provider:Gp,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional())});});var Wh=n(()=>{UO();NO();});var BO=n(()=>{Wh();});var Lh=n(()=>{Mh();});var Op={};V(Op,{ProviderApiKeyUpdate:()=>ea,ProviderApiKeyWrite:()=>ra,ProviderApiKeyWriteProvider:()=>Gp});var FO=n(()=>{BO();Lh();});var Vh,Jh=n(()=>{b();Vh=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var Kp={};V(Kp,{Response:()=>i8});var i8,MO=n(()=>{b();Jh();i8=r.list(Vh);});var WO=n(()=>{MO();});var ei={};V(ei,{listModels:()=>Kp});var LO=n(()=>{WO();});var $p,Hh=n(()=>{b();$p=r.enum_(["running","completed","cancelled","initialized","error"]);});var ta,VO=n(()=>{b();Hh();ta=r.object({name:r.string().optional(),status:$p.optional()});});var Gh=n(()=>{VO();});var JO=n(()=>{Gh();});var Oh=n(()=>{Hh();});var Qp={};V(Qp,{OptimizationUpdate:()=>ta,OptimizationUpdateStatus:()=>$p});var HO=n(()=>{JO();Oh();});var ia,GO=n(()=>{b();ia=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Yp,Kh=n(()=>{b();Yp=r.enum_(["connect","endpoint"]);});var oa,OO=n(()=>{b();Kh();oa=r.object({projectId:r.property("project_id",r.string()),activationKey:r.property("activation_key",r.string()),ttlSeconds:r.property("ttl_seconds",r.number().optional()),type:Yp});});var $h=n(()=>{GO();OO();});var KO=n(()=>{$h();});var Qh=n(()=>{Kh();});var Xp={};V(Xp,{ActivateRequest:()=>ia,CreateSessionRequest:()=>oa,CreateSessionRequestType:()=>Yp});var $O=n(()=>{KO();Qh();});var Zp,Yh=n(()=>{b();Zp=r.enum_(["traces","spans","threads"]);});var aa,QO=n(()=>{b();Yh();aa=r.object({entityType:r.property("entity_type",Zp),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var Xh,Zh=n(()=>{b();Xh=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type"]);});var qh,ey=n(()=>{b();Zh();qh=r.object({field:Xh.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ry,ty=n(()=>{b();ry=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var _r,ri=n(()=>{b();ty();_r=r.object({field:r.string().optional(),operator:ry.optional(),key:r.string().optional(),value:r.string().optional()});});var iy,oy=n(()=>{b();iy=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var kr,ti=n(()=>{b();oy();kr=r.object({field:r.string().optional(),operator:iy.optional(),key:r.string().optional(),value:r.string().optional()});});var ay,ny=n(()=>{b();ay=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var ct,na=n(()=>{b();ny();ct=r.object({field:r.string().optional(),operator:ay.optional(),key:r.string().optional(),value:r.string().optional()});});var qp,sy=n(()=>{b();qp=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var ec,py=n(()=>{b();ec=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var sa,YO=n(()=>{b();ey();ri();ti();na();sy();py();sa=r.object({metricType:r.property("metric_type",ec.optional()),interval:qp.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(_r).optional()),traceFilters:r.property("trace_filters",r.list(kr).optional()),threadFilters:r.property("thread_filters",r.list(ct).optional()),breakdown:qh.optional()});});var pa,XO=n(()=>{b();pa=r.object({name:r.string()});});var rc,cy=n(()=>{b();rc=r.enum_(["private","public"]);});var ca,ZO=n(()=>{b();cy();ca=r.object({name:r.string().optional(),description:r.string().optional(),visibility:rc.optional()});});var tc,ly=n(()=>{b();tc=r.enum_(["private","public"]);});var la,qO=n(()=>{b();ly();la=r.object({name:r.string(),visibility:tc.optional(),description:r.string().optional()});});var my=n(()=>{QO();YO();XO();ZO();qO();});var eK=n(()=>{my();});var dy=n(()=>{Yh();sy();py();cy();ly();});var ic={};V(ic,{KpiCardRequest:()=>aa,KpiCardRequestEntityType:()=>Zp,ProjectMetricRequestPublic:()=>sa,ProjectMetricRequestPublicInterval:()=>qp,ProjectMetricRequestPublicMetricType:()=>ec,ProjectRetrieveDetailed:()=>pa,ProjectUpdate:()=>ca,ProjectUpdateVisibility:()=>rc,ProjectWrite:()=>la,ProjectWriteVisibility:()=>tc});var rK=n(()=>{eK();dy();});var uy,gy=n(()=>{b();uy=r.record(r.string(),r.unknown());});var fy,hy=n(()=>{b();fy=r.enum_(["text","chat"]);});var yy,by=n(()=>{b();yy=r.enum_(["mustache","jinja2","python"]);});var Ye,oc=n(()=>{b();gy();hy();by();Ye=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:uy.optional(),type:yy.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",fy.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var ac,Ry=n(()=>{b();ac=r.enum_(["text","chat"]);});var ma,tK=n(()=>{b();oc();Ry();ma=r.object({name:r.string(),version:Ye,templateStructure:r.property("template_structure",ac.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var da,iK=n(()=>{b();da=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var xy,wy=n(()=>{b();xy=r.object({tags:r.list(r.string()).optional()});});var ua,oK=n(()=>{b();wy();ua=r.object({ids:r.list(r.string()),update:xy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var ga,aK=n(()=>{b();ga=r.object({commits:r.list(r.string())});});var fa,nK=n(()=>{b();fa=r.object({name:r.string(),commit:r.string().optional(),projectName:r.property("project_name",r.string().optional())});});var nc,_y=n(()=>{b();nc=r.enum_(["text","chat"]);});var sc,ky=n(()=>{b();sc=r.enum_(["mustache","jinja2","python"]);});var ha,sK=n(()=>{b();wr();_y();ky();ha=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:Se.optional(),changeDescription:r.property("change_description",r.string().optional()),type:sc.optional(),templateStructure:r.property("template_structure",nc.optional()),tags:r.list(r.string()).optional()});});var Ay=n(()=>{tK();iK();oK();aK();nK();sK();});var ii,pc=n(()=>{b();ii=r.object({promptVersionId:r.property("prompt_version_id",r.string().optional()),commit:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var cc={};V(cc,{Response:()=>o8});var o8,pK=n(()=>{b();pc();o8=r.list(ii);});var cK=n(()=>{pK();Ay();});var Py=n(()=>{Ry();_y();ky();});var oi={};V(oi,{CreatePromptVersionDetail:()=>ma,CreatePromptVersionDetailTemplateStructure:()=>ac,PromptUpdatable:()=>da,PromptVersionBatchUpdate:()=>ua,PromptVersionCommitsRequestPublic:()=>ga,PromptVersionRetrieveDetail:()=>fa,PromptWrite:()=>ha,PromptWriteTemplateStructure:()=>nc,PromptWriteType:()=>sc,getPromptsByCommits:()=>cc});var lK=n(()=>{cK();Py();});var lc,zy=n(()=>{b();lc=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var ya,mK=n(()=>{b();zy();ya=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:lc,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var Sy=n(()=>{mK();});var dK=n(()=>{Sy();});var Ty=n(()=>{zy();});var mc={};V(mc,{RetentionRuleWrite:()=>ya,RetentionRuleWriteRetention:()=>lc});var uK=n(()=>{dK();Ty();});var ba,gK=n(()=>{b();ba=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var dc,vy=n(()=>{b();dc=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Ra,fK=n(()=>{b();de();vy();Ra=r.object({status:dc,result:L.optional(),error:L.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var uc,jy=n(()=>{b();uc=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var xa,hK=n(()=>{b();de();jy();xa=r.object({type:uc,args:L,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var wa,gc=n(()=>{b();wa=r.object({datasetId:r.property("dataset_id",r.string().optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetItemVersionId:r.property("dataset_item_version_id",r.string().optional()),datasetItemId:r.property("dataset_item_id",r.string().optional())});});var _a,yK=n(()=>{b();de();gc();_a=r.object({agentName:r.property("agent_name",r.string()),inputs:L.optional(),projectId:r.property("project_id",r.string()),maskId:r.property("mask_id",r.string().optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:wa.optional()});});var ka,bK=n(()=>{b();ka=r.object({capabilities:r.list(r.string()).optional()});});var fc,Ey=n(()=>{b();fc=r.enum_(["pending","running","completed","failed","cancelled"]);});var Aa,RK=n(()=>{b();de();Ey();Aa=r.object({status:fc,result:L.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var Cy=n(()=>{gK();fK();hK();yK();bK();RK();});var Pa,hc=n(()=>{b();Pa=r.object({stream:r.string(),text:r.string()});});var yc={};V(yc,{Request:()=>a8});var a8,xK=n(()=>{b();hc();a8=r.list(Pa);});var bc={};V(bc,{Response:()=>n8});var n8,wK=n(()=>{b();hc();n8=r.list(Pa);});var Iy,Dy=n(()=>{b();Iy=r.enum_(["pending","running","completed","failed","cancelled"]);});var lt,Rc=n(()=>{b();de();gc();Dy();lt=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:Iy.optional(),inputs:L.optional(),result:L.optional(),error:r.string().optional(),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),maskId:r.property("mask_id",r.string().optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:wa.optional(),timeout:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),startedAt:r.property("started_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional())});});var xc={};V(xc,{Response:()=>s8});var s8,_K=n(()=>{Rc();s8=lt.nullable();});var wc={};V(wc,{Request:()=>p8});var p8,kK=n(()=>{b();p8=r.record(r.string(),r.unknown());});var _c={};V(_c,{Request:()=>c8});var c8,AK=n(()=>{b();c8=r.record(r.string(),r.unknown());});var PK=n(()=>{xK();wK();_K();kK();AK();Cy();});var kc,zK=n(()=>{b();kc=r.enum_(["pairing","connected","disconnected"]);});var Uy=n(()=>{vy();jy();zK();Ey();});var lr={};V(lr,{BridgeCommandNextRequest:()=>ba,BridgeCommandResultRequest:()=>Ra,BridgeCommandResultRequestStatus:()=>dc,BridgeCommandSubmitRequest:()=>xa,BridgeCommandSubmitRequestType:()=>uc,CreateLocalRunnerJobRequest:()=>_a,ListRunnersRequestStatus:()=>kc,LocalRunnerHeartbeatRequest:()=>ka,LocalRunnerJobResultRequest:()=>Aa,LocalRunnerJobResultRequestStatus:()=>fc,appendJobLogs:()=>yc,getJobLogs:()=>bc,nextJob:()=>xc,patchChecklist:()=>wc,registerAgents:()=>_c});var SK=n(()=>{PK();Uy();});var Ar,ai=n(()=>{b();Ar=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Ny,By=n(()=>{b();Ny=r.enum_(["sdk","experiment","playground","optimization"]);});var Fy,My=n(()=>{b();Fy=r.enum_(["general","tool","llm","guardrail"]);});var za,Wy=n(()=>{b();ai();Qe();By();My();za=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Fy.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",Ar.optional()),ttft:r.number().optional(),source:Ny.optional()});});var Sa,TK=n(()=>{b();Wy();Sa=r.object({ids:r.list(r.string()),update:za,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Ta,Ac=n(()=>{b();Ta=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Ly,Vy=n(()=>{b();Ly=r.enum_(["sdk","experiment","playground","optimization"]);});var Jy,Hy=n(()=>{b();Jy=r.enum_(["general","tool","llm","guardrail"]);});var va,Gy=n(()=>{b();Ac();Zt();Vy();Hy();va=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Jy.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Me.optional(),output:Me.optional(),metadata:Me.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ta.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),ttft:r.number().optional(),source:Ly.optional()});});var ja,vK=n(()=>{b();Gy();ja=r.object({spans:r.list(va)});});var Pc,Oy=n(()=>{b();Pc=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source"]);});var zc,Ky=n(()=>{b();zc=r.enum_(["general","tool","llm","guardrail"]);});var Ea,jK=n(()=>{b();ri();Oy();Ky();Ea=r.object({traceId:r.property("trace_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),type:zc.optional(),filters:r.list(_r).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(Pc).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var $y=n(()=>{TK();vK();jK();});var EK=n(()=>{$y();});var Sc,CK=n(()=>{b();Sc=r.enum_(["general","tool","llm","guardrail"]);});var Tc,IK=n(()=>{b();Tc=r.enum_(["general","tool","llm","guardrail"]);});var vc,DK=n(()=>{b();vc=r.enum_(["general","tool","llm","guardrail"]);});var Qy=n(()=>{CK();IK();DK();Oy();Ky();});var jc={};V(jc,{FindFeedbackScoreNames1RequestType:()=>Sc,GetSpanStatsRequestType:()=>Tc,GetSpansByProjectRequestType:()=>vc,SpanBatchUpdate:()=>Sa,SpanBatchWrite:()=>ja,SpanSearchStreamRequestPublic:()=>Ea,SpanSearchStreamRequestPublicExcludeItem:()=>Pc,SpanSearchStreamRequestPublicType:()=>zc});var UK=n(()=>{EK();Qy();});var Ca,NK=n(()=>{b();Ca=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional()});});var Ia,BK=n(()=>{b();Ia=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()))});});var Yy,Xy=n(()=>{b();Yy=r.enum_(["ui","sdk","online_scoring"]);});var Zy,qy=n(()=>{b();Xy();Zy=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Yy,author:r.string().optional(),threadId:r.property("thread_id",r.string())});});var Da,FK=n(()=>{b();qy();Da=r.object({scores:r.list(Zy)});});var eb,rb=n(()=>{b();eb=r.enum_(["sdk","experiment","playground","optimization"]);});var Ua,tb=n(()=>{b();ai();Qe();rb();Ua=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",Ar.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:eb.optional()});});var Na,MK=n(()=>{b();tb();Na=r.object({ids:r.list(r.string()),update:Ua,mergeTags:r.property("merge_tags",r.boolean().optional())});});var ib,ob=n(()=>{b();ib=r.enum_(["sdk","experiment","playground","optimization"]);});var Ba,ab=n(()=>{b();Ac();Zt();ob();Ba=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Me.optional(),output:Me.optional(),metadata:Me.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ta.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:ib.optional()});});var Fa,WK=n(()=>{b();ab();Fa=r.object({traces:r.list(Ba)});});var Ec,nb=n(()=>{b();Ec=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source"]);});var Ma,LK=n(()=>{b();ti();nb();Ma=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(kr).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),exclude:r.list(Ec).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Wa,VK=n(()=>{b();Wa=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string().optional()),threadIds:r.property("thread_ids",r.list(r.string()).optional())});});var La,sb=n(()=>{b();La=r.object({tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional())});});var Va,JK=n(()=>{b();sb();Va=r.object({ids:r.list(r.string()),update:La,mergeTags:r.property("merge_tags",r.boolean().optional())});});var pb,cb=n(()=>{b();pb=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Xe,mt=n(()=>{b();cb();Xe=r.object({field:r.string().optional(),operator:pb.optional(),key:r.string().optional(),value:r.string().optional()});});var Ja,HK=n(()=>{b();mt();Ja=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Xe).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var lb=n(()=>{NK();BK();FK();MK();WK();LK();VK();JK();HK();});var GK=n(()=>{lb();});var mb=n(()=>{nb();});var Cc={};V(Cc,{DeleteThreadFeedbackScores:()=>Ca,DeleteTraceThreads:()=>Ia,FeedbackScoreBatchThread:()=>Da,TraceBatchUpdate:()=>Na,TraceBatchWrite:()=>Fa,TraceSearchStreamRequestPublic:()=>Ma,TraceSearchStreamRequestPublicExcludeItem:()=>Ec,TraceThreadBatchIdentifier:()=>Wa,TraceThreadBatchUpdate:()=>Va,TraceThreadSearchStreamRequest:()=>Ja});var OK=n(()=>{GK();mb();});var Ha,KK=n(()=>{b();Ha=r.object({role:r.string().optional(),integrations:r.list(r.string()).optional(),email:r.string().optional(),joinBetaProgram:r.property("join_beta_program",r.boolean().optional())});});var db=n(()=>{KK();});var $K=n(()=>{db();});var Ic={};V(Ic,{WelcomeWizardSubmission:()=>Ha});var QK=n(()=>{$K();});var YK=n(()=>{Cg();vG();EG();Ig();Bg();UG();Gg();FG();Og();$g();GG();Qg();cf();$G();Cf();dO();Nf();Bf();hO();vh();zO();jh();TO();Eh();Fh();EO();DO();Wh();FO();Lh();LO();Gh();HO();Oh();$h();$O();Qh();my();rK();dy();Ay();lK();Py();Sy();uK();Ty();Cy();SK();Uy();$y();UK();Qy();lb();OK();mb();db();QK();});var ub,gb=n(()=>{b();ub=r.enum_(["required","optional"]);});var fb,hb=n(()=>{b();gb();fb=r.object({name:r.string(),type:r.string(),presence:ub.optional()});});var yb,bb=n(()=>{b();hb();yb=r.object({name:r.string().optional(),description:r.string().optional(),language:r.string().optional(),executable:r.string().optional(),sourceFile:r.property("source_file",r.string().optional()),params:r.list(fb).optional(),timeout:r.number().optional()});});var Rb,xb=n(()=>{b();Rb=r.enum_(["blueprint","mask"]);});var wb,_b=n(()=>{b();wb=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var kb,Ab=n(()=>{b();_b();kb=r.object({key:r.string(),value:r.string().optional(),type:wb,description:r.string().optional()});});var Pb,zb=n(()=>{b();xb();Ab();Pb=r.object({id:r.string().optional(),name:r.string().optional(),type:Rb,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(kb)});});var Sb,Tb=n(()=>{b();Sb=r.enum_(["blueprint","mask"]);});var vb,jb=n(()=>{b();vb=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Eb,Cb=n(()=>{b();jb();Eb=r.object({key:r.string(),value:r.string().optional(),type:vb,description:r.string().optional()});});var dt,XK=n(()=>{b();Tb();Cb();dt=r.object({id:r.string().optional(),name:r.string().optional(),type:Sb,description:r.string().optional(),envs:r.list(r.string()).optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),values:r.list(Eb)});});var Ib,Db=n(()=>{b();Ib=r.enum_(["blueprint","mask"]);});var Ub,Nb=n(()=>{b();Ub=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Bb,Fb=n(()=>{b();Nb();Bb=r.object({key:r.string(),value:r.string().optional(),type:Ub,description:r.string().optional()});});var Mb,Wb=n(()=>{b();Db();Fb();Mb=r.object({id:r.string().optional(),type:Ib,description:r.string().optional(),values:r.list(Bb)});});var Dc,ZK=n(()=>{b();Wb();Dc=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Mb});});var Te,Mr=n(()=>{b();Te=r.object({name:r.string(),value:r.number()});});var Pr,ni=n(()=>{b();Pr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Lb,Vb=n(()=>{b();Mr();ni();Lb=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:Pr.optional(),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),experimentScores:r.property("experiment_scores",r.list(Te).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var Jb,Hb=n(()=>{b();Jb=r.enum_(["general","slack","pagerduty"]);});var Gb,Ob=n(()=>{b();Gb=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var Kb,$b=n(()=>{b();Ob();Kb=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:Gb,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Qb,Yb=n(()=>{b();Qb=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var Xb,Zb=n(()=>{b();$b();Yb();Xb=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",Qb),triggerConfigs:r.property("trigger_configs",r.list(Kb).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var qb,eR=n(()=>{b();qb=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var l8,qK=n(()=>{b();Hb();Zb();eR();l8=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Jb.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:qb,triggers:r.list(Xb).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),projectId:r.property("project_id",r.string().optional())});});var rR,tR=n(()=>{b();rR=r.enum_(["general","slack","pagerduty"]);});var iR,oR=n(()=>{b();iR=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var aR,nR=n(()=>{b();oR();aR=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:iR,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var sR,pR=n(()=>{b();sR=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var cR,lR=n(()=>{b();nR();pR();cR=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",sR),triggerConfigs:r.property("trigger_configs",r.list(aR).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var mR,dR=n(()=>{b();mR=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ga,uR=n(()=>{b();tR();lR();dR();Ga=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",rR.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:mR,triggers:r.list(cR).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),projectId:r.property("project_id",r.string().optional())});});var Oa,e$=n(()=>{b();uR();Oa=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ga).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var gR,fR=n(()=>{b();gR=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors"]);});var hR,yR=n(()=>{b();fR();hR=r.object({id:r.string().optional(),type:gR,configValue:r.property("config_value",r.record(r.string(),r.string()).optional())});});var bR,RR=n(()=>{b();bR=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var xR,wR=n(()=>{b();yR();RR();xR=r.object({id:r.string().optional(),eventType:r.property("event_type",bR),triggerConfigs:r.property("trigger_configs",r.list(hR).optional())});});var _R,kR=n(()=>{b();_R=r.enum_(["general","slack","pagerduty"]);});var AR,PR=n(()=>{b();AR=r.object({id:r.string().optional(),name:r.string().optional(),url:r.string(),secretToken:r.property("secret_token",r.string().optional()),headers:r.record(r.string(),r.string()).optional()});});var Ka,r$=n(()=>{b();wR();kR();PR();Ka=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",_R.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:AR,triggers:r.list(xR).optional(),projectId:r.property("project_id",r.string().optional())});});var zR,SR=n(()=>{b();zR=r.object({username:r.string().optional(),status:r.number().optional()});});var TR,vR=n(()=>{b();TR=r.enum_(["trace","thread"]);});var jR,ER=n(()=>{b();SR();vR();Mr();jR=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:TR,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(zR).optional(),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var m8,t$=n(()=>{b();ER();m8=r.object({annotationQueues:r.property("annotation_queues",r.list(jR))});});var Uc,i$=n(()=>{b();Uc=r.object({ids:r.list(r.string())});});var CR,IR=n(()=>{b();CR=r.enum_(["trace","thread"]);});var DR,UR=n(()=>{b();DR=r.object({username:r.string().optional(),status:r.number().optional()});});var Wr,$a=n(()=>{b();Wr=r.object({name:r.string(),value:r.number()});});var Qa,NR=n(()=>{b();IR();UR();$a();Qa=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string().optional()),name:r.string(),description:r.string().optional(),instructions:r.string().optional(),scope:CR,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),reviewers:r.list(DR).optional(),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var BR,o$=n(()=>{b();NR();BR=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Qa).optional(),sortableBy:r.list(r.string()).optional()});});var FR,MR=n(()=>{b();FR=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var WR,LR=n(()=>{b();WR=r.object({name:r.string(),value:r.number()});});var VR,JR=n(()=>{b();VR=r.object({name:r.string(),value:r.number()});});var HR,GR=n(()=>{b();HR=r.enum_(["system","user","assistant","tool","function"]);});var OR,KR=n(()=>{b();OR=r.enum_(["function"]);});var Ya,Nc=n(()=>{b();$t();KR();Ya=r.object({id:r.string().optional(),index:r.number().optional(),type:OR.optional(),function:Rr.optional()});});var $R,QR=n(()=>{b();GR();$t();Nc();$R=r.object({role:HR.optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),name:r.string().optional(),toolCalls:r.property("tool_calls",r.list(Ya).optional()),refusal:r.string().optional(),functionCall:r.property("function_call",Rr.optional())});});var YR,XR=n(()=>{b();YR=r.object({link:r.string().optional(),fileName:r.property("file_name",r.string()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string())});});var ZR,a$=n(()=>{b();XR();ZR=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(YR).optional(),sortableBy:r.list(r.string()).optional()});});var qR,ex=n(()=>{b();qR=r.object({url:r.string()});});var rx,tx=n(()=>{b();rx=r.object({url:r.string()});});var ix,ox=n(()=>{b();ix=r.object({url:r.string()});});var ax,n$=n(()=>{b();ax=r.record(r.string(),r.unknown());});var nx,sx=n(()=>{b();nx=r.enum_(["evaluator"]);});var px,cx=n(()=>{b();px=r.object({url:r.string(),detail:r.string().optional()});});var lx,mx=n(()=>{b();lx=r.object({url:r.string()});});var dx,ux=n(()=>{b();ex();cx();mx();dx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",px.optional()),videoUrl:r.property("video_url",lx.optional()),audioUrl:r.property("audio_url",qR.optional())});});var gx,fx=n(()=>{b();gx=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var ut,Xa=n(()=>{b();ux();fx();ut=r.object({role:gx,content:r.string().optional(),contentArray:r.property("content_array",r.list(dx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var gt,Za=n(()=>{b();de();gt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",L.optional())});});var hx,yx=n(()=>{b();hx=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var ft,qa=n(()=>{b();yx();ft=r.object({name:r.string(),type:hx,description:r.string()});});var en,Bc=n(()=>{b();Xa();Za();qa();en=r.object({model:gt,messages:r.list(ut),variables:r.record(r.string(),r.string()),schema:r.list(ft)});});var bx,Rx=n(()=>{b();bx=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var zr,si=n(()=>{b();Rx();zr=r.object({field:r.string().optional(),operator:bx.optional(),key:r.string().optional(),value:r.string().optional()});});var xx,wx=n(()=>{b();Bc();si();xx=r.object({filters:r.list(zr).optional(),code:en.optional()});});var _x,kx=n(()=>{b();_x=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var Sr,pi=n(()=>{b();kx();Sr=r.object({field:r.string().optional(),operator:_x.optional(),key:r.string().optional(),value:r.string().optional()});});var rn,Fc=n(()=>{b();Xa();Za();qa();rn=r.object({model:gt,messages:r.list(ut),variables:r.record(r.string(),r.string()),schema:r.list(ft)});});var Ax,Px=n(()=>{b();pi();Fc();Ax=r.object({filters:r.list(Sr).optional(),code:rn.optional()});});var tn,Mc=n(()=>{b();tn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var zx,Sx=n(()=>{b();pi();Mc();zx=r.object({filters:r.list(Sr).optional(),code:tn.optional()});});var on,Wc=n(()=>{b();Xa();Za();qa();on=r.object({model:gt,messages:r.list(ut),schema:r.list(ft)});});var Tx,vx=n(()=>{b();mt();Wc();Tx=r.object({filters:r.list(Xe).optional(),code:on.optional()});});var an,Lc=n(()=>{b();an=r.object({metric:r.string()});});var jx,Ex=n(()=>{b();mt();Lc();jx=r.object({filters:r.list(Xe).optional(),code:an.optional()});});var nn,Vc=n(()=>{b();nn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Cx,Ix=n(()=>{b();si();Vc();Cx=r.object({filters:r.list(zr).optional(),code:nn.optional()});});var Dx,Ux=n(()=>{b();Dx=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var ci,d8,s$=n(()=>{b();sx();wx();Px();Sx();vx();Ex();Ix();Ux();ci=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(Dx).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:nx}),d8=r.union("type",{llm_as_judge:xx.extend(ci),user_defined_metric_python:Cx.extend(ci),trace_thread_llm_as_judge:Tx.extend(ci),trace_thread_user_defined_metric_python:jx.extend(ci),span_llm_as_judge:Ax.extend(ci),span_user_defined_metric_python:zx.extend(ci)}).transform({transform:p=>p,untransform:p=>p});});var Nx,Bx=n(()=>{b();Nx=r.object({url:r.string(),detail:r.string().optional()});});var Fx,Mx=n(()=>{b();Fx=r.object({url:r.string()});});var Wx,Lx=n(()=>{b();tx();Bx();Mx();Wx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Nx.optional()),videoUrl:r.property("video_url",Fx.optional()),audioUrl:r.property("audio_url",rx.optional())});});var Vx,Jx=n(()=>{b();Vx=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var ht,sn=n(()=>{b();Lx();Jx();ht=r.object({role:Vx,content:r.string().optional(),contentArray:r.property("content_array",r.list(Wx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,mr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var yt,pn=n(()=>{b();mr();yt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var Hx,Gx=n(()=>{b();Hx=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var bt,cn=n(()=>{b();Gx();bt=r.object({name:r.string(),type:Hx,description:r.string()});});var Ox,Kx=n(()=>{b();sn();pn();cn();Ox=r.object({model:yt,messages:r.list(ht),variables:r.record(r.string(),r.string()),schema:r.list(bt)});});var ln,Jc=n(()=>{b();Kx();ti();ln=r.object({filters:r.list(kr).optional(),code:Ox.optional()});});var $x,Qx=n(()=>{b();$x=r.object({url:r.string(),detail:r.string().optional()});});var Yx,Xx=n(()=>{b();Yx=r.object({url:r.string()});});var Zx,qx=n(()=>{b();ox();Qx();Xx();Zx=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",$x.optional()),videoUrl:r.property("video_url",Yx.optional()),audioUrl:r.property("audio_url",ix.optional())});});var ew,rw=n(()=>{b();ew=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Rt,mn=n(()=>{b();qx();rw();Rt=r.object({role:ew,content:r.string().optional(),contentArray:r.property("content_array",r.list(Zx).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var xt,dn=n(()=>{b();wr();xt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var tw,iw=n(()=>{b();tw=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var wt,un=n(()=>{b();iw();wt=r.object({name:r.string(),type:tw,description:r.string()});});var ow,aw=n(()=>{b();mn();dn();un();ow=r.object({model:xt,messages:r.list(Rt),variables:r.record(r.string(),r.string()),schema:r.list(wt)});});var nw,sw=n(()=>{b();nw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var gn,Hc=n(()=>{b();sw();gn=r.object({field:r.string().optional(),operator:nw.optional(),key:r.string().optional(),value:r.string().optional()});});var pw,cw=n(()=>{b();aw();Hc();pw=r.object({filters:r.list(gn).optional(),code:ow.optional()});});var lw,mw=n(()=>{b();lw=r.enum_(["evaluator"]);});var dw,uw=n(()=>{b();sn();pn();cn();dw=r.object({model:yt,messages:r.list(ht),variables:r.record(r.string(),r.string()),schema:r.list(bt)});});var fn,Gc=n(()=>{b();ri();uw();fn=r.object({filters:r.list(_r).optional(),code:dw.optional()});});var gw,fw=n(()=>{b();gw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var hn,Oc=n(()=>{b();ri();fw();hn=r.object({filters:r.list(_r).optional(),code:gw.optional()});});var hw,yw=n(()=>{b();sn();pn();cn();hw=r.object({model:yt,messages:r.list(ht),schema:r.list(bt)});});var yn,Kc=n(()=>{b();na();yw();yn=r.object({filters:r.list(ct).optional(),code:hw.optional()});});var bw,Rw=n(()=>{b();bw=r.object({metric:r.string()});});var bn,$c=n(()=>{b();na();Rw();bn=r.object({filters:r.list(ct).optional(),code:bw.optional()});});var xw,ww=n(()=>{b();xw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Rn,Qc=n(()=>{b();ti();ww();Rn=r.object({filters:r.list(kr).optional(),code:xw.optional()});});var xn,Yc=n(()=>{b();xn=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var li,_w,kw=n(()=>{b();Jc();mw();Gc();Oc();Kc();$c();Qc();Yc();li=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(xn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:lw}),_w=r.union("type",{llm_as_judge:ln.extend(li),user_defined_metric_python:Rn.extend(li),trace_thread_llm_as_judge:yn.extend(li),trace_thread_user_defined_metric_python:bn.extend(li),span_llm_as_judge:fn.extend(li),span_user_defined_metric_python:hn.extend(li)}).transform({transform:p=>p,untransform:p=>p});});var Aw,p$=n(()=>{b();kw();Aw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(_w).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var Pw,zw=n(()=>{b();Pw=r.enum_(["evaluator"]);});var mi,Sw,c$=n(()=>{b();Jc();zw();Gc();Oc();Kc();$c();Qc();Yc();mi=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(xn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:Pw}),Sw=r.union("type",{llm_as_judge:ln.extend(mi),user_defined_metric_python:Rn.extend(mi),trace_thread_llm_as_judge:yn.extend(mi),trace_thread_user_defined_metric_python:bn.extend(mi),span_llm_as_judge:fn.extend(mi),span_user_defined_metric_python:hn.extend(mi)}).transform({transform:p=>p,untransform:p=>p});});var Tw,vw=n(()=>{b();Tw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var wn,Xc=n(()=>{b();vw();wn=r.object({field:r.string().optional(),operator:Tw.optional(),key:r.string().optional(),value:r.string().optional()});});var jw,Ew=n(()=>{b();mn();dn();un();jw=r.object({model:xt,messages:r.list(Rt),variables:r.record(r.string(),r.string()),schema:r.list(wt)});});var Cw,Iw=n(()=>{b();Xc();Ew();Cw=r.object({filters:r.list(wn).optional(),code:jw.optional()});});var Dw,Uw=n(()=>{b();Dw=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Nw,Bw=n(()=>{b();Xc();Uw();Nw=r.object({filters:r.list(wn).optional(),code:Dw.optional()});});var Fw,Mw=n(()=>{b();Fw=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty"]);});var _n,Zc=n(()=>{b();Mw();_n=r.object({field:r.string().optional(),operator:Fw.optional(),key:r.string().optional(),value:r.string().optional()});});var Ww,Lw=n(()=>{b();mn();dn();un();Ww=r.object({model:xt,messages:r.list(Rt),schema:r.list(wt)});});var Vw,Jw=n(()=>{b();Zc();Lw();Vw=r.object({filters:r.list(_n).optional(),code:Ww.optional()});});var Hw,Gw=n(()=>{b();Hw=r.object({metric:r.string()});});var Ow,Kw=n(()=>{b();Zc();Gw();Ow=r.object({filters:r.list(_n).optional(),code:Hw.optional()});});var $w,Qw=n(()=>{b();$w=r.enum_(["evaluator"]);});var Yw,Xw=n(()=>{b();Bc();si();Yw=r.object({filters:r.list(zr).optional(),code:en.optional()});});var Zw,qw=n(()=>{b();pi();Fc();Zw=r.object({filters:r.list(Sr).optional(),code:rn.optional()});});var e_,r_=n(()=>{b();pi();Mc();e_=r.object({filters:r.list(Sr).optional(),code:tn.optional()});});var t_,i_=n(()=>{b();mt();Wc();t_=r.object({filters:r.list(Xe).optional(),code:on.optional()});});var o_,a_=n(()=>{b();mt();Lc();o_=r.object({filters:r.list(Xe).optional(),code:an.optional()});});var n_,s_=n(()=>{b();si();Vc();n_=r.object({filters:r.list(zr).optional(),code:nn.optional()});});var di,p_,l$=n(()=>{b();Qw();Xw();qw();r_();i_();a_();s_();di=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:$w}),p_=r.union("type",{llm_as_judge:Yw.extend(di),user_defined_metric_python:n_.extend(di),trace_thread_llm_as_judge:t_.extend(di),trace_thread_user_defined_metric_python:o_.extend(di),span_llm_as_judge:Zw.extend(di),span_user_defined_metric_python:e_.extend(di)}).transform({transform:p=>p,untransform:p=>p});});var c_,l_=n(()=>{b();c_=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var m_,d_=n(()=>{b();Hc();l_();m_=r.object({filters:r.list(gn).optional(),code:c_.optional()});});var u_,g_=n(()=>{b();u_=r.enum_(["evaluator"]);});var ui,f_,m$=n(()=>{b();cw();Iw();Bw();Jw();Kw();d_();g_();ui=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),action:u_}),f_=r.union("type",{llm_as_judge:pw.extend(ui),user_defined_metric_python:m_.extend(ui),trace_thread_llm_as_judge:Vw.extend(ui),trace_thread_user_defined_metric_python:Ow.extend(ui),span_llm_as_judge:Cw.extend(ui),span_user_defined_metric_python:Nw.extend(ui)}).transform({transform:p=>p,untransform:p=>p});});var h_,y_=n(()=>{b();h_=r.object({value:r.number().optional()});});var me,d$=n(()=>{b();me=r.object({ids:r.list(r.string())});});var u8,u$=n(()=>{b();u8=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var b_,R_=n(()=>{b();b_=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var gi,g$=n(()=>{b();R_();gi=r.object({biInformation:r.property("bi_information",r.list(b_).optional())});});var x_,f$=n(()=>{b();zb();x_=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pb).optional()});});var w_,__=n(()=>{b();w_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var k_,A_=n(()=>{b();__();k_=r.object({details:w_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var P_,z_=n(()=>{b();P_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var S_,T_=n(()=>{b();z_();S_=r.object({details:P_.optional()});});var v_,j_=n(()=>{b();v_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var kn,qc=n(()=>{b();j_();kn=r.object({details:v_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var E_,C_=n(()=>{b();E_=r.object({trueLabel:r.string(),falseLabel:r.string()});});var I_,D_=n(()=>{b();C_();I_=r.object({details:E_.optional()});});var U_,N_=n(()=>{b();U_=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var B_,F_=n(()=>{b();B_=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var M_,h$=n(()=>{b();N_();F_();de();M_=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:B_.optional(),status:U_.optional(),args:L.optional(),result:L.optional(),error:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional()),pickedUpAt:r.property("picked_up_at",r.date().optional()),completedAt:r.property("completed_at",r.date().optional()),durationMs:r.property("duration_ms",r.number().optional())});});var W_,L_=n(()=>{b();W_=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var V_,J_=n(()=>{b();L_();de();V_=r.object({commandId:r.property("command_id",r.string().optional()),type:W_.optional(),args:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var H_,y$=n(()=>{b();J_();H_=r.object({commands:r.list(V_).optional()});});var G_,b$=n(()=>{b();G_=r.object({commandId:r.property("command_id",r.string().optional())});});var O_,K_=n(()=>{b();O_=r.object({categories:r.record(r.string(),r.number())});});var $_,Q_=n(()=>{b();K_();$_=r.object({details:O_.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Y_,X_=n(()=>{b();Y_=r.object({categories:r.record(r.string(),r.number())});});var Z_,q_=n(()=>{b();X_();Z_=r.object({details:Y_.optional()});});var ek,rk=n(()=>{b();ek=r.object({categories:r.record(r.string(),r.number())});});var An,el=n(()=>{b();rk();An=r.object({details:ek.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var tk,ik=n(()=>{b();tk=r.object({categories:r.record(r.string(),r.number())});});var ok,ak=n(()=>{b();ik();ok=r.object({details:tk.optional()});});var nk,sk=n(()=>{b();$t();Nc();nk=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.property("reasoning_content",r.string().optional()),toolCalls:r.property("tool_calls",r.list(Ya).optional()),functionCall:r.property("function_call",Rr.optional())});});var pk,ck=n(()=>{b();pk=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var lk,mk=n(()=>{b();ck();lk=r.object({content:r.list(pk).optional()});});var dk,uk=n(()=>{b();QR();sk();mk();dk=r.object({index:r.number().optional(),message:$R.optional(),delta:nk.optional(),finishReason:r.property("finish_reason",r.string().optional()),logprobs:lk.optional()});});var gk,fk=n(()=>{b();gk=r.object({reasoningTokens:r.property("reasoning_tokens",r.number().optional())});});var hk,yk=n(()=>{b();hk=r.object({cachedTokens:r.property("cached_tokens",r.number().optional())});});var bk,Rk=n(()=>{b();fk();yk();bk=r.object({totalTokens:r.property("total_tokens",r.number().optional()),promptTokens:r.property("prompt_tokens",r.number().optional()),promptTokensDetails:r.property("prompt_tokens_details",hk.optional()),completionTokens:r.property("completion_tokens",r.number().optional()),completionTokensDetails:r.property("completion_tokens_details",gk.optional())});});var xk,R$=n(()=>{b();uk();Rk();xk=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list(dk).optional(),usage:bk.optional(),systemFingerprint:r.property("system_fingerprint",r.string().optional()),serviceTier:r.property("service_tier",r.string().optional())});});var wk,_k=n(()=>{b();wk=r.enum_(["TOPIC","PII"]);});var kk,Ak=n(()=>{b();kk=r.enum_(["passed","failed"]);});var Pk,zk=n(()=>{b();_k();Ak();Pk=r.object({name:wk.optional(),result:kk.optional()});});var Sk,Tk=n(()=>{b();Sk=r.enum_(["TOPIC","PII"]);});var vk,jk=n(()=>{b();vk=r.enum_(["passed","failed"]);});var Ek,Ck=n(()=>{b();Tk();jk();Ek=r.object({name:Sk.optional(),result:vk.optional()});});var Ik,Dk=n(()=>{b();Ik=r.object({typeName:r.string().optional()});});var g8,x$=n(()=>{b();Dk();g8=r.object({type:Ik.optional(),closed:r.boolean().optional()});});var Uk,Nk=n(()=>{b();Uk=r.object({typeName:r.string().optional()});});var f8,w$=n(()=>{b();Nk();f8=r.object({type:Uk.optional(),closed:r.boolean().optional()});});var Bk,Fk=n(()=>{b();Bk=r.enum_(["string","number","object","boolean","array","null"]);});var Mk,Wk=n(()=>{b();Fk();Mk=r.object({name:r.string().optional(),types:r.list(Bk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Lk,Vk=n(()=>{b();Lk=r.enum_(["string","number","object","boolean","array","null"]);});var Jk,Hk=n(()=>{b();Vk();Jk=r.object({name:r.string().optional(),types:r.list(Lk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Gk,Ok=n(()=>{b();Gk=r.enum_(["string","number","object","boolean","array","null"]);});var Kk,$k=n(()=>{b();Ok();Kk=r.object({name:r.string().optional(),types:r.list(Gk).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var Qk,Yk=n(()=>{b();Qk=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var _t,Pn=n(()=>{b();_t=r.object({id:r.string().optional(),text:r.string(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Xk,Zk=n(()=>{b();Xk=r.enum_(["trace","span"]);});var qk,eA=n(()=>{b();qk=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var rl,_$=n(()=>{b();Zk();eA();rl=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",Xk),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string().optional()),fileSize:r.property("file_size",r.number()),mimeType:r.property("mime_type",r.string().optional()),uploadId:r.property("upload_id",r.string()),uploadedFileParts:r.property("uploaded_file_parts",r.list(qk))});});var rA,tA=n(()=>{b();rA=r.object({value:r.number().optional()});});var iA,k$=n(()=>{b();iA=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var oA,aA=n(()=>{b();oA=r.enum_(["workspace","insights"]);});var nA,sA=n(()=>{b();nA=r.enum_(["multi_project","experiments"]);});var Ze,pA=n(()=>{b();aA();sA();mr();Ze=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:nA.optional(),scope:oA.optional(),description:r.string().optional(),config:_e,createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var kt,A$=n(()=>{b();pA();kt=r.object({content:r.list(Ze).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var cA,lA=n(()=>{b();cA=r.enum_(["multi_project","experiments"]);});var zn,P$=n(()=>{b();lA();mr();zn=r.object({name:r.string().optional(),type:cA.optional(),description:r.string().optional(),config:_e.optional()});});var mA,dA=n(()=>{b();mA=r.enum_(["multi_project","experiments"]);});var Sn,z$=n(()=>{b();dA();wr();Sn=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:mA.optional(),description:r.string().optional(),config:Se});});var h8,S$=n(()=>{b();h8=r.object({time:r.date(),value:r.number().optional()});});var uA,gA=n(()=>{b();uA=r.object({time:r.date(),value:r.number().optional()});});var fA,hA=n(()=>{b();fA=r.enum_(["unknown","processing","completed","failed"]);});var yA,bA=n(()=>{b();yA=r.enum_(["dataset","evaluation_suite"]);});var Tn,tl=n(()=>{b();Tn=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var RA,xA=n(()=>{b();RA=r.enum_(["private","public"]);});var y8,T$=n(()=>{b();hA();bA();tl();xA();y8=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),type:yA.optional(),visibility:RA.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:fA.optional(),latestVersion:r.property("latest_version",Tn.optional())});});var b8,v$=n(()=>{b();b8=r.object({model:r.string(),sampleCount:r.property("sample_count",r.number().optional()),preserveFields:r.property("preserve_fields",r.list(r.string()).optional()),variationInstructions:r.property("variation_instructions",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),maxCompletionTokens:r.property("max_completion_tokens",r.number().optional())});});var wA,_A=n(()=>{b();wA=r.enum_(["manual","trace","span","sdk"]);});var kA,AA=n(()=>{b();kA=r.enum_(["passed","failed"]);});var PA,zA=n(()=>{b();AA();PA=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:kA.optional()});});var vn,il=n(()=>{b();_A();Qt();nt();Up();zA();de();vn=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:wA,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(xr).optional(),executionPolicy:r.property("execution_policy",Ke.optional()),experimentItems:r.property("experiment_items",r.list($o).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),PA).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var SA,j$=n(()=>{b();il();SA=r.object({generatedSamples:r.property("generated_samples",r.list(vn).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var R8,E$=n(()=>{b();il();R8=r.object({datasetName:r.property("dataset_name",r.string().optional()),datasetId:r.property("dataset_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),items:r.list(vn),batchGroupId:r.property("batch_group_id",r.string().optional())});});var TA,C$=n(()=>{b();TA=r.record(r.string(),r.unknown());});var vA,jA=n(()=>{b();vA=r.enum_(["manual","trace","span","sdk"]);});var EA,CA=n(()=>{b();EA=r.enum_(["llm_judge","code_metric"]);});var IA,DA=n(()=>{b();IA=r.record(r.string(),r.unknown());});var UA,NA=n(()=>{b();CA();DA();UA=r.object({name:r.string(),type:EA,config:IA});});var jn,ol=n(()=>{b();jn=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var BA,FA=n(()=>{b();BA=r.enum_(["passed","failed"]);});var MA,WA=n(()=>{b();MA=r.enum_(["default","hidden"]);});var LA,VA=n(()=>{b();LA=r.enum_(["ui","sdk","online_scoring"]);});var JA,HA=n(()=>{b();JA=r.enum_(["ui","sdk","online_scoring"]);});var GA,OA=n(()=>{b();HA();GA=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:JA.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var KA,$A=n(()=>{b();VA();OA();KA=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:LA,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),GA).optional())});});var al,QA=n(()=>{b();al=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var YA,XA=n(()=>{b();MR();Yk();ol();FA();WA();$A();QA();YA=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),input:al.optional(),output:al.optional(),feedbackScores:r.property("feedback_scores",r.list(KA).optional()),comments:r.list(Qk).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",MA.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",jn.optional()),assertionResults:r.property("assertion_results",r.list(FR).optional()),status:BA.optional()});});var ZA,qA=n(()=>{b();ZA=r.enum_(["passed","failed"]);});var eP,rP=n(()=>{b();qA();eP=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:ZA.optional()});});var tP,iP=n(()=>{b();jA();NA();ol();XA();rP();de();tP=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:vA,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(UA).optional(),executionPolicy:r.property("execution_policy",jn.optional()),experimentItems:r.property("experiment_items",r.list(YA).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),eP).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var oP,I$=n(()=>{b();Hk();iP();oP=r.object({content:r.list(tP).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Jk).optional(),sortableBy:r.list(r.string()).optional()});});var aP,nP=n(()=>{b();aP=r.enum_(["manual","trace","span","sdk"]);});var sP,pP=n(()=>{b();sP=r.enum_(["llm_judge","code_metric"]);});var En,nl=n(()=>{b();pP();mr();En=r.object({name:r.string(),type:sP,config:_e});});var Cn,sl=n(()=>{b();Cn=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var cP,lP=n(()=>{b();cP=r.enum_(["default","hidden"]);});var In,mP=n(()=>{b();lP();In=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",cP.optional())});});var dP,uP=n(()=>{b();dP=r.enum_(["passed","failed"]);});var gP,fP=n(()=>{b();uP();gP=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:dP.optional()});});var Dn,hP=n(()=>{b();nP();nl();sl();mP();fP();de();Dn=r.object({id:r.string().optional(),datasetItemId:r.property("dataset_item_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:aP,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(En).optional(),executionPolicy:r.property("execution_policy",Cn.optional()),experimentItems:r.property("experiment_items",r.list(In).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),gP).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var yP,D$=n(()=>{b();$k();hP();yP=r.object({content:r.list(Dn).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(Kk).optional(),sortableBy:r.list(r.string()).optional()});});var bP,RP=n(()=>{b();bP=r.enum_(["unknown","processing","completed","failed"]);});var xP,wP=n(()=>{b();xP=r.enum_(["dataset","evaluation_suite"]);});var _P,kP=n(()=>{b();_P=r.enum_(["private","public"]);});var Un,pl=n(()=>{b();Un=r.object({id:r.string().optional(),versionHash:r.property("version_hash",r.string().optional()),versionName:r.property("version_name",r.string().optional()),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional()});});var fi,AP=n(()=>{b();RP();wP();kP();pl();fi=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:xP.optional(),visibility:_P.optional(),tags:r.list(r.string()).optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),experimentCount:r.property("experiment_count",r.number().optional()),datasetItemsCount:r.property("dataset_items_count",r.number().optional()),optimizationCount:r.property("optimization_count",r.number().optional()),mostRecentExperimentAt:r.property("most_recent_experiment_at",r.date().optional()),lastCreatedExperimentAt:r.property("last_created_experiment_at",r.date().optional()),mostRecentOptimizationAt:r.property("most_recent_optimization_at",r.date().optional()),lastCreatedOptimizationAt:r.property("last_created_optimization_at",r.date().optional()),status:bP.optional(),latestVersion:r.property("latest_version",Un.optional())});});var Nn,U$=n(()=>{b();AP();Nn=r.object({content:r.list(fi).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var PP,zP=n(()=>{b();PP=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var SP,N$=n(()=>{b();zP();SP=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:PP.optional()});});var Lr,TP=n(()=>{b();nl();sl();Lr=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),versionHash:r.property("version_hash",r.string().optional()),tags:r.list(r.string()).optional(),isLatest:r.property("is_latest",r.boolean().optional()),versionName:r.property("version_name",r.string().optional()),itemsTotal:r.property("items_total",r.number().optional()),itemsAdded:r.property("items_added",r.number().optional()),itemsModified:r.property("items_modified",r.number().optional()),itemsDeleted:r.property("items_deleted",r.number().optional()),changeDescription:r.property("change_description",r.string().optional()),metadata:r.record(r.string(),r.string()).optional(),evaluators:r.list(En).optional(),executionPolicy:r.property("execution_policy",Cn.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var vP,B$=n(()=>{b();TP();vP=r.object({content:r.list(Lr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var jP,EP=n(()=>{b();jP=r.enum_(["trace","span"]);});var x8,F$=n(()=>{b();EP();x8=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",jP),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var Bn,M$=n(()=>{b();Bn=r.object({name:r.string(),author:r.string().optional()});});var hi,W$=n(()=>{b();hi=r.object({ids:r.list(r.string())});});var w8,L$=n(()=>{b();w8=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Fn,CP=n(()=>{b();Fn=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var IP,V$=n(()=>{b();CP();IP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fn).optional(),sortableBy:r.list(r.string()).optional()});});var Mn,cl=n(()=>{b();Mn=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var DP,UP=n(()=>{b();DP=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Wn,ll=n(()=>{b();Wn=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var ue,J$=n(()=>{b();ue=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var _8,H$=n(()=>{b();_8=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var k8,G$=n(()=>{b();k8=r.object({errors:r.list(r.string()).optional()});});var A8,O$=n(()=>{b();A8=r.object({errors:r.list(r.string()).optional()});});var P8,K$=n(()=>{b();P8=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var z8,$$=n(()=>{b();z8=r.object({errors:r.list(r.string()).optional()});});var NP,BP=n(()=>{b();NP=r.enum_(["dataset","evaluation_suite"]);});var FP,MP=n(()=>{b();FP=r.enum_(["running","completed","cancelled"]);});var WP,LP=n(()=>{b();WP=r.enum_(["regular","trial","mini-batch","mutation"]);});var S8,Q$=n(()=>{b();LR();st();tl();BP();Ip();MP();LP();Mr();Qe();ni();Vo();S8=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),type:WP.optional(),evaluationMethod:r.property("evaluation_method",NP.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),comments:r.list(fe).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:FP.optional(),experimentScores:r.property("experiment_scores",r.list(Mo).optional()),promptVersion:r.property("prompt_version",Fr.optional()),promptVersions:r.property("prompt_versions",r.list(Fr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",Tn.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(WR).optional())});});var VP,JP=n(()=>{b();VP=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var HP,Y$=n(()=>{b();JP();HP=r.object({experiments:r.list(VP).optional(),totalItems:r.property("total_items",r.number().optional())});});var GP,OP=n(()=>{b();Vb();GP=r.object({label:r.string().optional(),aggregations:Lb.optional()});});var KP,X$=n(()=>{b();OP();KP=r.object({content:r.record(r.string(),GP).optional()});});var $P,QP=n(()=>{b();$P=r.object({label:r.string().optional()});});var YP,XP=n(()=>{b();YP=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var ZP,qP=n(()=>{b();XP();ZP=r.object({groupsDetails:r.property("groups_details",r.list(YP).optional())});});var ez,Z$=n(()=>{b();QP();qP();ez=r.object({content:r.record(r.string(),$P).optional(),details:ZP.optional()});});var rz,tz=n(()=>{b();rz=r.enum_(["sdk","experiment","playground","optimization"]);});var iz,oz=n(()=>{b();iz=r.enum_(["general","tool","llm","guardrail"]);});var Ln,ml=n(()=>{b();st();ai();pt();Qe();tz();oz();Ln=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:iz.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ar.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:rz.optional()});});var az,nz=n(()=>{b();az=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var sz,pz=n(()=>{b();zk();sz=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Pk).optional()});});var cz,lz=n(()=>{b();cz=r.enum_(["sdk","experiment","playground","optimization"]);});var mz,dz=n(()=>{b();mz=r.enum_(["default","hidden"]);});var Vn,dl=n(()=>{b();st();ai();nz();pt();pz();Qe();lz();dz();Vn=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ar.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(fe).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(sz).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",mz.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional(),experiment:az.optional(),source:cz.optional()});});var uz,gz=n(()=>{b();pt();Qe();ml();dl();uz=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:Vn.optional(),spans:r.list(Ln).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var T8,q$=n(()=>{b();gz();T8=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),items:r.list(uz)});});var fz,hz=n(()=>{b();fz=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var yz,bz=n(()=>{b();yz=r.enum_(["dataset","evaluation_suite"]);});var Rz,xz=n(()=>{b();Rz=r.enum_(["running","completed","cancelled"]);});var wz,_z=n(()=>{b();wz=r.enum_(["regular","trial","mini-batch","mutation"]);});var kz,Az=n(()=>{b();kz=r.object({name:r.string(),value:r.number()});});var We,yi=n(()=>{b();We=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Jn,ul=n(()=>{b();Jn=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Hn,Pz=n(()=>{b();JR();Pn();pl();bz();xz();_z();Az();$a();yi();ul();pc();Hn=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:We.optional(),tags:r.list(r.string()).optional(),type:wz.optional(),evaluationMethod:r.property("evaluation_method",yz.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),comments:r.list(_t).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:Jn.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:Rz.optional(),experimentScores:r.property("experiment_scores",r.list(kz).optional()),promptVersion:r.property("prompt_version",ii.optional()),promptVersions:r.property("prompt_versions",r.list(ii).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",Un.optional()),passRate:r.property("pass_rate",r.number().optional()),passedCount:r.property("passed_count",r.number().optional()),totalCount:r.property("total_count",r.number().optional()),assertionScores:r.property("assertion_scores",r.list(VR).optional())});});var Gn,eQ=n(()=>{b();Pz();Gn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Hn).optional(),sortableBy:r.list(r.string()).optional()});});var v8,rQ=n(()=>{de();v8=L;});var zz,Sz=n(()=>{b();zz=r.object({max:r.number(),min:r.number()});});var Tz,vz=n(()=>{b();Sz();Tz=r.object({details:zz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var jz,j8,tQ=n(()=>{b();A_();Q_();vz();jz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),j8=r.union("type",{numerical:Tz.extend(jz),categorical:$_.extend(jz),boolean:k_.extend(jz)}).transform({transform:p=>p,untransform:p=>p});});var Ez,Cz=n(()=>{b();Ez=r.object({max:r.number(),min:r.number()});});var Iz,Dz=n(()=>{b();Cz();Iz=r.object({details:Ez.optional()});});var Uz,Nz,iQ=n(()=>{b();T_();q_();Dz();Uz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),Nz=r.union("type",{numerical:Iz.extend(Uz),categorical:Z_.extend(Uz),boolean:S_.extend(Uz)}).transform({transform:p=>p,untransform:p=>p});});var Bz,Fz=n(()=>{b();Bz=r.object({max:r.number(),min:r.number()});});var On,gl=n(()=>{b();Fz();On=r.object({details:Bz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Mz,Wz,Lz=n(()=>{b();qc();el();gl();Mz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Wz=r.union("type",{numerical:On.extend(Mz),categorical:An.extend(Mz),boolean:kn.extend(Mz)}).transform({transform:p=>p,untransform:p=>p});});var Vz,oQ=n(()=>{b();Lz();Vz=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Wz).optional()});});var Jz,Hz,aQ=n(()=>{b();qc();el();gl();Jz=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),createdAt:r.date().optional(),createdBy:r.string().optional(),lastUpdatedAt:r.date().optional(),lastUpdatedBy:r.string().optional()}),Hz=r.union("type",{numerical:On.extend(Jz),categorical:An.extend(Jz),boolean:kn.extend(Jz)}).transform({transform:p=>p,untransform:p=>p});});var Gz,Oz=n(()=>{b();Gz=r.object({name:r.string(),value:r.number()});});var Kz,$z=n(()=>{b();Kz=r.enum_(["ui","sdk","online_scoring"]);});var Qz,Yz=n(()=>{b();$z();Qz=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Kz,author:r.string().optional(),id:r.string()});});var Kn,nQ=n(()=>{b();Yz();Kn=r.object({scores:r.list(Qz)});});var Xz,Zz=n(()=>{b();Xz=r.object({name:r.string().optional(),type:r.string().optional()});});var qz,sQ=n(()=>{b();Zz();qz=r.object({scores:r.list(Xz).optional()});});var eS,rS=n(()=>{b();eS=r.object({name:r.string().optional(),type:r.string().optional()});});var Vr,pQ=n(()=>{b();rS();Vr=r.object({scores:r.list(eS).optional()});});var tS,iS=n(()=>{b();tS=r.enum_(["ui","sdk","online_scoring"]);});var oS,aS=n(()=>{b();oS=r.enum_(["ui","sdk","online_scoring"]);});var nS,sS=n(()=>{b();aS();nS=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:oS.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional())});});var bi,fl=n(()=>{b();iS();sS();bi=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:tS,createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),nS).optional())});});var pS,cS=n(()=>{b();pS=r.object({max:r.number(),min:r.number()});});var lS,mS=n(()=>{b();cS();lS=r.object({details:pS.optional()});});var dS,uS,cQ=n(()=>{b();D_();ak();mS();dS=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),uS=r.union("type",{numerical:lS.extend(dS),categorical:ok.extend(dS),boolean:I_.extend(dS)}).transform({transform:p=>p,untransform:p=>p});});var gS,fS=n(()=>{b();gS=r.enum_(["TOPIC","PII"]);});var hS,yS=n(()=>{b();hS=r.enum_(["passed","failed"]);});var bS,RS=n(()=>{b();fS();yS();de();bS=r.object({id:r.string().optional(),entityId:r.property("entity_id",r.string()),secondaryId:r.property("secondary_id",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:gS,result:hS,config:L,details:L});});var E8,lQ=n(()=>{b();RS();E8=r.object({guardrails:r.list(bS)});});var xS,wS=n(()=>{b();Ck();xS=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(Ek).optional()});});var C8,mQ=n(()=>{b();C8=r.object({ids:r.list(r.string())});});var _S,kS=n(()=>{b();_S=r.enum_(["count","errors","avg_duration","total_cost"]);});var AS,PS=n(()=>{b();kS();AS=r.object({type:_S.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var zS,dQ=n(()=>{b();PS();zS=r.object({stats:r.list(AS).optional()});});var SS,TS=n(()=>{b();SS=r.enum_(["pairing","connected","disconnected"]);});var vS,jS=n(()=>{b();vS=r.enum_(["connect","endpoint"]);});var $n,ES=n(()=>{b();bb();de();TS();jS();$n=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:SS.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(yb).optional(),capabilities:r.list(r.string()).optional(),checklist:L.optional(),type:vS.optional()});});var CS,uQ=n(()=>{b();CS=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var IS,gQ=n(()=>{b();Rc();IS=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(lt).optional()});});var DS,fQ=n(()=>{b();ES();DS=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list($n).optional()});});var US,NS=n(()=>{b();US=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var BS,FS=n(()=>{b();NS();BS=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:US.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var MS,hQ=n(()=>{b();FS();MS=r.object({content:r.list(BS).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var WS,LS=n(()=>{b();WS=r.enum_(["trace","thread","span"]);});var Qn,yQ=n(()=>{b();LS();Qn=r.object({projectId:r.property("project_id",r.string()),entityIds:r.property("entity_ids",r.list(r.string())),ruleIds:r.property("rule_ids",r.list(r.string())),entityType:r.property("entity_type",WS)});});var Yn,bQ=n(()=>{b();Yn=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var hl,RQ=n(()=>{b();hl=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var yl,xQ=n(()=>{b();yl=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.enum_(["running","completed","cancelled","initialized","error"]);});var HS,GS=n(()=>{b();de();HS=r.object({type:r.string(),parameters:L.optional()});});var OS,KS=n(()=>{b();GS();OS=r.object({metrics:r.list(HS)});});var $S,QS=n(()=>{b();de();$S=r.object({model:r.string(),parameters:L.optional()});});var YS,XS=n(()=>{b();de();YS=r.object({type:r.string(),parameters:L.optional()});});var ZS,qS=n(()=>{b();ZS=r.object({role:r.string(),content:r.string()});});var eT,rT=n(()=>{b();qS();eT=r.object({messages:r.list(ZS)});});var tT,iT=n(()=>{b();KS();QS();XS();rT();tT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:eT,llmModel:r.property("llm_model",$S),evaluation:OS,optimizer:YS});});var I8,wQ=n(()=>{b();Mr();Qe();JS();iT();I8=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:VS,metadata:le.optional(),studioConfig:r.property("studio_config",tT.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),experimentScores:r.property("experiment_scores",r.list(Te).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var oT,aT=n(()=>{b();oT=r.enum_(["running","completed","cancelled","initialized","error"]);});var nT,sT=n(()=>{b();mr();nT=r.object({type:r.string(),parameters:_e.optional()});});var pT,cT=n(()=>{b();sT();pT=r.object({metrics:r.list(nT)});});var lT,mT=n(()=>{b();mr();lT=r.object({model:r.string(),parameters:_e.optional()});});var dT,uT=n(()=>{b();mr();dT=r.object({type:r.string(),parameters:_e.optional()});});var gT,fT=n(()=>{b();gT=r.object({role:r.string(),content:r.string()});});var hT,yT=n(()=>{b();fT();hT=r.object({messages:r.list(gT)});});var bT,RT=n(()=>{b();cT();mT();uT();yT();bT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:hT,llmModel:r.property("llm_model",lT),evaluation:pT,optimizer:dT});});var Xn,xT=n(()=>{b();$a();yi();aT();RT();Xn=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:oT,metadata:We.optional(),studioConfig:r.property("studio_config",bT.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Wr).optional()),experimentScores:r.property("experiment_scores",r.list(Wr).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var Zn,_Q=n(()=>{b();xT();Zn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Xn).optional(),sortableBy:r.list(r.string()).optional()});});var wT,_T=n(()=>{b();wr();wT=r.object({type:r.string(),parameters:Se.optional()});});var kT,AT=n(()=>{b();_T();kT=r.object({metrics:r.list(wT)});});var PT,zT=n(()=>{b();wr();PT=r.object({model:r.string(),parameters:Se.optional()});});var ST,TT=n(()=>{b();wr();ST=r.object({type:r.string(),parameters:Se.optional()});});var vT,jT=n(()=>{b();vT=r.object({role:r.string(),content:r.string()});});var ET,CT=n(()=>{b();jT();ET=r.object({messages:r.list(vT)});});var IT,DT=n(()=>{b();AT();zT();TT();CT();IT=r.object({datasetName:r.property("dataset_name",r.string()),prompt:ET,llmModel:r.property("llm_model",PT),evaluation:kT,optimizer:ST});});var UT,kQ=n(()=>{b();UT=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var NT,BT=n(()=>{b();NT=r.enum_(["running","completed","cancelled","initialized","error"]);});var bl,AQ=n(()=>{b();Zt();DT();BT();bl=r.object({id:r.string().optional(),name:r.string().optional(),datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),objectiveName:r.property("objective_name",r.string()),status:NT,metadata:Me.optional(),studioConfig:r.property("studio_config",IT.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FT,PQ=n(()=>{b();Wk();FT=r.object({columns:r.list(Mk).optional()});});var MT,WT=n(()=>{b();ul();MT=r.object({value:Jn.optional()});});var LT,VT=n(()=>{b();LT=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var JT,HT=n(()=>{b();JT=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var GT,OT=n(()=>{b();GT=r.enum_(["private","public"]);});var D8,zQ=n(()=>{b();cl();Mr();ni();OT();D8=r.object({id:r.string().optional(),name:r.string(),visibility:GT.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Mn.optional())});});var KT,$T=n(()=>{b();KT=r.enum_(["private","public"]);});var QT,SQ=n(()=>{b();UP();Oz();VT();$T();QT=r.object({id:r.string().optional(),name:r.string(),visibility:KT.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(Gz).optional()),duration:LT.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",DP.optional())});});var YT,XT=n(()=>{b();YT=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var ZT,qT=n(()=>{b();ZT=r.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var ev,rv=n(()=>{b();gA();ev=r.object({name:r.string().optional(),data:r.list(uA).optional()});});var tv,TQ=n(()=>{b();XT();qT();rv();tv=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",ZT.optional()),interval:YT.optional(),results:r.list(ev).optional()});});var iv,ov=n(()=>{b();iv=r.enum_(["private","public"]);});var qn,av=n(()=>{b();ov();qn=r.object({id:r.string().optional(),name:r.string(),visibility:iv.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional())});});var nv,vQ=n(()=>{b();av();nv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(qn).optional(),sortableBy:r.list(r.string()).optional()});});var sv,pv,cv=n(()=>{b();y_();tA();WT();sv=r.object({name:r.string().optional()}),pv=r.union("type",{PERCENTAGE:MT.extend(sv),COUNT:rA.extend(sv),AVG:h_.extend(sv)}).transform({transform:p=>p,untransform:p=>p});});var Jr,jQ=n(()=>{b();cv();Jr=r.object({stats:r.list(pv).optional()});});var lv,mv=n(()=>{b();cl();Mr();ni();lv=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Te).optional()),duration:Pr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Mn.optional())});});var dv,EQ=n(()=>{b();mv();dv=r.object({content:r.list(lv).optional()});});var uv,gv=n(()=>{b();uv=r.enum_(["text","chat"]);});var fv,hv=n(()=>{b();fv=r.enum_(["mustache","jinja2","python"]);});var yv,bv=n(()=>{b();yv=r.enum_(["text","chat"]);});var Rv,xv=n(()=>{b();Rv=r.enum_(["mustache","jinja2","python"]);});var Rl,wv=n(()=>{b();de();bv();xv();Rl=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:L.optional(),type:Rv.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",yv.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var U8,CQ=n(()=>{b();de();gv();hv();wv();U8=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),description:r.string().optional(),template:r.string().optional(),metadata:L.optional(),changeDescription:r.property("change_description",r.string().optional()),type:fv.optional(),templateStructure:r.property("template_structure",uv.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Rl.optional()),requestedVersion:r.property("requested_version",Rl.optional())});});var _v,kv=n(()=>{b();_v=r.enum_(["text","chat"]);});var xl,IQ=n(()=>{b();kv();oc();xl=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",_v.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",Ye.optional()),requestedVersion:r.property("requested_version",Ye.optional())});});var Av,Pv=n(()=>{b();Av=r.enum_(["text","chat"]);});var zv,Sv=n(()=>{b();Pv();zv=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),description:r.string().optional(),templateStructure:r.property("template_structure",Av.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional())});});var es,DQ=n(()=>{b();Sv();es=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(zv).optional(),sortableBy:r.list(r.string()).optional()});});var Tv,vv=n(()=>{b();Tv=r.enum_(["text","chat"]);});var jv,Ev=n(()=>{b();jv=r.enum_(["mustache","jinja2","python"]);});var Cv,Iv=n(()=>{b();mr();vv();Ev();Cv=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),template:r.string(),metadata:_e.optional(),type:jv.optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",Tv.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Dv,UQ=n(()=>{b();Iv();Dv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cv).optional(),sortableBy:r.list(r.string()).optional()});});var Uv,Nv=n(()=>{b();Uv=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var N8,NQ=n(()=>{b();Nv();N8=r.object({id:r.string().optional(),provider:Uv,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});});var Bv,Fv=n(()=>{b();Bv=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var rs,Mv=n(()=>{b();Fv();rs=r.object({id:r.string().optional(),provider:Bv,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),readOnly:r.property("read_only",r.boolean().optional())});});var Wv,BQ=n(()=>{b();Mv();Wv=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(rs).optional(),sortableBy:r.list(r.string()).optional()});});var At,wl=n(()=>{b();At=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var Lv,Vv=n(()=>{b();Lv=r.enum_(["organization","workspace","project"]);});var Jv,Hv=n(()=>{b();Jv=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ri,Gv=n(()=>{b();Vv();Hv();Ri=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:Lv.optional(),retention:Jv,applyToPast:r.property("apply_to_past",r.boolean().optional()),enabled:r.boolean().optional(),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),catchUpCursor:r.property("catch_up_cursor",r.string().optional()),catchUpDone:r.property("catch_up_done",r.boolean().optional())});});var Ov,FQ=n(()=>{b();Gv();Ov=r.object({content:r.list(Ri).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var Kv,MQ=n(()=>{b();Kv=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),csvUploadEnabled:r.boolean(),exportEnabled:r.boolean(),optimizationStudioEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),collaboratorsTabEnabled:r.boolean(),v2WorkspaceAllowlistIds:r.list(r.string()),forceWorkspaceVersion:r.string(),defaultPageSize:r.number().optional(),v2WorkspaceAllowlist:r.string().optional()});});var B8,WQ=n(()=>{b();ml();B8=r.object({spans:r.list(Ln)});});var $v,Qv=n(()=>{b();$v=r.enum_(["sdk","experiment","playground","optimization"]);});var Yv,Xv=n(()=>{b();Yv=r.enum_(["general","tool","llm","guardrail"]);});var ts,Zv=n(()=>{b();Pn();ll();fl();yi();Qv();Xv();ts=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),traceId:r.property("trace_id",r.string().optional()),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:Yv.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:We.optional(),output:We.optional(),metadata:We.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Wn.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(bi).optional()),comments:r.list(_t).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:$v.optional()});});var qv,LQ=n(()=>{b();Zv();qv=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ts).optional(),sortableBy:r.list(r.string()).optional()});});var ej,rj=n(()=>{b();ej=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var tj,VQ=n(()=>{b();rj();tj=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(ej).optional())});});var ij,JQ=n(()=>{b();ij=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var oj,HQ=n(()=>{b();oj=r.object({names:r.list(r.string()).optional()});});var F8,GQ=n(()=>{b();dl();F8=r.object({traces:r.list(Vn)});});var aj,nj=n(()=>{b();aj=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var sj,OQ=n(()=>{b();nj();sj=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(aj).optional())});});var pj,cj=n(()=>{b();pj=r.enum_(["sdk","experiment","playground","optimization"]);});var lj,mj=n(()=>{b();lj=r.enum_(["default","hidden"]);});var is,dj=n(()=>{b();Pn();ll();hz();fl();wS();yi();cj();mj();is=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:We.optional(),output:We.optional(),metadata:We.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Wn.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(bi).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(bi).optional()),comments:r.list(_t).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(xS).optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),spanCount:r.property("span_count",r.number().optional()),duration:r.number().optional(),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),visibilityMode:r.property("visibility_mode",lj.optional()),llmSpanCount:r.property("llm_span_count",r.number().optional()),hasToolSpans:r.property("has_tool_spans",r.boolean().optional()),providers:r.list(r.string()).optional(),experiment:fz.optional(),source:pj.optional()});});var uj,KQ=n(()=>{b();dj();uj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(is).optional(),sortableBy:r.list(r.string()).optional()});});var gj,fj=n(()=>{b();gj=r.enum_(["active","inactive"]);});var os,hj=n(()=>{b();st();pt();Qe();fj();os=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),threadModelId:r.property("thread_model_id",r.string().optional()),startTime:r.property("start_time",r.date().optional()),endTime:r.property("end_time",r.date().optional()),duration:r.number().optional(),firstMessage:r.property("first_message",le.optional()),lastMessage:r.property("last_message",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),status:gj.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(fe).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var _l,$Q=n(()=>{b();_l=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),threadId:r.property("thread_id",r.string()),truncate:r.boolean().optional()});});var yj,QQ=n(()=>{b();hj();yj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(os).optional(),sortableBy:r.list(r.string()).optional()});});var bj,YQ=n(()=>{b();bj=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var Rj,xj=n(()=>{b();Rj=r.enum_(["success","failure"]);});var wj,XQ=n(()=>{b();xj();wj=r.object({status:Rj.optional(),statusCode:r.property("status_code",r.number().optional()),requestBody:r.property("request_body",r.string().optional()),errorMessage:r.property("error_message",r.string().optional())});});var _j,ZQ=n(()=>{b();_j=r.object({completed:r.boolean().optional()});});var as,qQ=n(()=>{b();as=r.object({timeoutToMarkThreadAsInactive:r.property("timeout_to_mark_thread_as_inactive",r.string().optional()),truncationOnTables:r.property("truncation_on_tables",r.boolean().optional()),colorMap:r.property("color_map",r.record(r.string(),r.string()).optional())});});var M8,e4=n(()=>{b();M8=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kl,r4=n(()=>{b();wl();kl=r.object({results:r.list(At).optional()});});var xi,t4=n(()=>{b();xi=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kj,i4=n(()=>{b();wl();kj=r.object({results:r.list(At).optional()});});var Aj,o4=n(()=>{b();Aj=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var Pj,a4=n(()=>{b();HT();Pj=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(JT).optional()});});var zj,Sj=n(()=>{b();zj=r.enum_(["version_1","version_2"]);});var Tj,n4=n(()=>{b();Sj();Tj=r.object({opikVersion:r.property("opik_version",zj.optional())});});var s4=n(()=>{bb();zb();xb();XK();Tb();Wb();Db();ZK();Eg();Ab();_b();Cb();jb();Fb();Nb();Vb();qK();Hb();e$();uR();tR();Zb();$b();nR();oR();Ob();yR();fR();Yb();lR();pR();wR();RR();r$();kR();ER();t$();i$();o$();NR();IR();SR();UR();vR();Ng();Ug();dh();Jg();Mg();Lg();MR();LR();JR();QR();GR();XR();a$();ex();tx();ox();n$();s$();sx();wx();Jc();cw();kw();mw();p$();c$();zw();Px();Gc();Iw();Sx();Oc();Bw();vx();Kc();Jw();Ex();$c();Kw();l$();Qw();Xw();qw();r_();i_();a_();s_();Ix();Qc();d_();m$();g_();y_();d$();u$();R_();g$();f$();A_();T_();qc();D_();__();z_();j_();C_();ey();Zh();h$();y$();J_();L_();N_();b$();F_();Q_();q_();el();ak();K_();X_();rk();ik();uk();R$();zk();_k();Ck();Tk();jk();Ak();x$();w$();Nk();Dk();Wk();Hk();Vk();$k();Ok();Fk();st();Yk();Pn();_$();Zk();fk();tA();k$();A$();pA();aA();sA();P$();lA();z$();dA();S$();gA();T$();v$();j$();Uf();Df();il();E$();C$();iP();jA();Sp();yf();I$();D$();hP();nP();_A();Rf();Tf();wf();U$();AP();RP();wP();kP();hA();bA();N$();zP();B$();TP();tl();pl();xA();F$();EP();M$();W$();sk();L$();V$();CP();cl();UP();ai();Dp();ll();Ac();J$();H$();G$();O$();K$();$$();Qt();NA();CA();nl();pP();mf();Pf();kf();nt();ol();sl();Sf();Q$();BP();Y$();X$();Z$();JP();Up();gz();lh();q$();XA();FA();WA();mP();lP();nz();hz();gh();hh();eQ();Pz();bz();xz();_z();zA();rP();qA();fP();uP();AA();Ip();Az();Ah();MP();LP();Vf();Mf();Lf();rQ();tQ();iQ();oQ();Lz();aQ();pt();Mr();Oz();$a();nQ();Yz();$z();qy();Xy();$A();VA();Zf();Of();sQ();pQ();fl();iS();bh();cQ();Ap();$t();QP();OP();XP();qP();RS();lQ();fS();yS();pz();wS();Bh();Ih();Uh();mQ();cx();Bx();Qx();Qe();QA();Ho();yi();Zt();de();DA();gy();mr();wr();Xg();dQ();PS();kS();Bc();Kx();aw();Xa();ux();Lx();qx();sn();Jx();fx();mn();rw();Za();pn();dn();qa();cn();Gx();yx();un();iw();ES();uQ();Rc();gc();gQ();Dy();hc();fQ();TS();jS();FS();NS();hQ();ck();mk();yQ();LS();bQ();Pp();eA();vz();Dz();gl();mS();Sz();Cz();Fz();cS();RQ();xQ();Jh();wQ();_Q();xT();aT();JS();iT();RT();DT();kQ();AQ();BT();PQ();hb();gb();WT();ni();VT();ul();HT();zQ();SQ();$T();TQ();XT();qT();vQ();av();ov();Ux();Yc();cv();jQ();EQ();mv();OT();CQ();IQ();kv();DQ();Sv();Pv();gv();yk();hv();Hf();wv();oc();hy();by();Vo();pc();Ph();UQ();Iv();vv();Ev();bv();xv();wy();NQ();BQ();Nv();Mv();Fv();rf();qg();wl();rv();FQ();Gv();Vv();Hv();Zz();rS();MQ();ml();WQ();uf();oh();eh();th();pi();kx();ri();ty();Xc();vw();Fc();uw();Ew();LQ();Zv();Qv();Xv();tz();VQ();oz();Wy();By();My();Mc();fw();Uw();Gy();Vy();Hy();JQ();of();KS();cT();AT();QS();mT();zT();qS();fT();jT();GS();sT();_T();XS();uT();TT();rT();yT();CT();HQ();pf();Nc();KR();nf();dl();GQ();OQ();ff();ph();nh();si();Rx();ti();oy();Hc();sw();KQ();dj();cj();mj();lz();hj();mt();cb();na();ny();Zc();Mw();$Q();Wc();yw();Lw();QQ();fj();sb();Lc();Rw();Gw();tb();rb();dz();ab();ob();Rk();Vc();ww();l_();_h();OA();HA();Yf();$f();sS();aS();xh();mx();Mx();Xx();eR();YQ();dR();XQ();xj();PR();ZQ();qQ();e4();r4();t4();i4();o4();rj();nj();a4();n4();Sj();});var O={};V(O,{ActivateRequest:()=>ia,Agent:()=>yb,AgentBlueprintHistory:()=>Pb,AgentBlueprintHistoryType:()=>Rb,AgentBlueprintPublic:()=>dt,AgentBlueprintPublicType:()=>Sb,AgentBlueprintWrite:()=>Mb,AgentBlueprintWriteType:()=>Ib,AgentConfigCreateWrite:()=>Dc,AgentConfigEnv:()=>jg,AgentConfigEnvSetByName:()=>po,AgentConfigEnvUpdate:()=>co,AgentConfigRemoveValues:()=>lo,AgentConfigValueHistory:()=>kb,AgentConfigValueHistoryType:()=>wb,AgentConfigValuePublic:()=>Eb,AgentConfigValuePublicType:()=>vb,AgentConfigValueWrite:()=>Bb,AgentConfigValueWriteType:()=>Ub,AggregationData:()=>Lb,Alert:()=>l8,AlertAlertType:()=>Jb,AlertPagePublic:()=>Oa,AlertPublic:()=>Ga,AlertPublicAlertType:()=>rR,AlertTrigger:()=>Xb,AlertTriggerConfig:()=>Kb,AlertTriggerConfigPublic:()=>aR,AlertTriggerConfigPublicType:()=>iR,AlertTriggerConfigType:()=>Gb,AlertTriggerConfigWrite:()=>hR,AlertTriggerConfigWriteType:()=>gR,AlertTriggerEventType:()=>Qb,AlertTriggerPublic:()=>cR,AlertTriggerPublicEventType:()=>sR,AlertTriggerWrite:()=>xR,AlertTriggerWriteEventType:()=>bR,AlertWrite:()=>Ka,AlertWriteAlertType:()=>_R,AnnotationQueue:()=>jR,AnnotationQueueBatch:()=>m8,AnnotationQueueBatchWrite:()=>uo,AnnotationQueueItemIds:()=>Uc,AnnotationQueuePagePublic:()=>BR,AnnotationQueuePublic:()=>Qa,AnnotationQueuePublicScope:()=>CR,AnnotationQueueReviewer:()=>zR,AnnotationQueueReviewerPublic:()=>DR,AnnotationQueueScope:()=>TR,AnnotationQueueUpdate:()=>go,AnnotationQueueWrite:()=>mo,AnnotationQueueWriteScope:()=>Dg,AssertionResult:()=>mh,AssertionResultBatch:()=>fo,AssertionResultBatchEntityType:()=>yp,AssertionResultBatchItem:()=>Vg,AssertionResultBatchItemSource:()=>Fg,AssertionResultBatchItemStatus:()=>Wg,AssertionResultCompare:()=>FR,AssertionScoreAverage:()=>WR,AssertionScoreAveragePublic:()=>VR,AssistantMessage:()=>$R,AssistantMessageRole:()=>HR,Attachment:()=>YR,AttachmentListRequestEntityType:()=>wp,AttachmentPage:()=>ZR,AudioUrl:()=>qR,AudioUrlPublic:()=>rx,AudioUrlWrite:()=>ix,AuthDetailsHolder:()=>ax,AutomationRuleEvaluator:()=>d8,AutomationRuleEvaluatorAction:()=>nx,AutomationRuleEvaluatorLlmAsJudge:()=>xx,AutomationRuleEvaluatorLlmAsJudgePublic:()=>ln,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>pw,AutomationRuleEvaluatorObjectObjectPublic:()=>_w,AutomationRuleEvaluatorObjectObjectPublicAction:()=>lw,AutomationRuleEvaluatorPagePublic:()=>Aw,AutomationRuleEvaluatorPublic:()=>Sw,AutomationRuleEvaluatorPublicAction:()=>Pw,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Ax,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>fn,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>Cw,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>zx,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>hn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>Nw,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>Tx,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>yn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>Vw,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>jx,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>bn,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>Ow,AutomationRuleEvaluatorUpdate:()=>p_,AutomationRuleEvaluatorUpdateAction:()=>$w,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>Yw,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>Zw,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>e_,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>t_,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>o_,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>n_,AutomationRuleEvaluatorUserDefinedMetricPython:()=>Cx,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Rn,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>m_,AutomationRuleEvaluatorWrite:()=>f_,AutomationRuleEvaluatorWriteAction:()=>u_,AvgValueStatPublic:()=>h_,BatchDelete:()=>me,BatchDeleteByProject:()=>u8,BiInformation:()=>b_,BiInformationResponse:()=>gi,BlueprintPageHistory:()=>x_,BooleanFeedbackDefinition:()=>k_,BooleanFeedbackDefinitionCreate:()=>S_,BooleanFeedbackDefinitionPublic:()=>kn,BooleanFeedbackDefinitionUpdate:()=>I_,BooleanFeedbackDetail:()=>w_,BooleanFeedbackDetailCreate:()=>P_,BooleanFeedbackDetailPublic:()=>v_,BooleanFeedbackDetailUpdate:()=>E_,BreakdownConfigPublic:()=>qh,BreakdownConfigPublicField:()=>Xh,BridgeCommand:()=>M_,BridgeCommandBatchResponse:()=>H_,BridgeCommandItem:()=>V_,BridgeCommandItemType:()=>W_,BridgeCommandNextRequest:()=>ba,BridgeCommandResultRequest:()=>Ra,BridgeCommandResultRequestStatus:()=>dc,BridgeCommandStatus:()=>U_,BridgeCommandSubmitRequest:()=>xa,BridgeCommandSubmitRequestType:()=>uc,BridgeCommandSubmitResponse:()=>G_,BridgeCommandType:()=>B_,CategoricalFeedbackDefinition:()=>$_,CategoricalFeedbackDefinitionCreate:()=>Z_,CategoricalFeedbackDefinitionPublic:()=>An,CategoricalFeedbackDefinitionUpdate:()=>ok,CategoricalFeedbackDetail:()=>O_,CategoricalFeedbackDetailCreate:()=>Y_,CategoricalFeedbackDetailPublic:()=>ek,CategoricalFeedbackDetailUpdate:()=>tk,ChatCompletionChoice:()=>dk,ChatCompletionRequest:()=>Ro,ChatCompletionResponse:()=>xk,Check:()=>Pk,CheckName:()=>wk,CheckPublic:()=>Ek,CheckPublicName:()=>Sk,CheckPublicResult:()=>vk,CheckResult:()=>kk,ChunkedOutputJsonNode:()=>g8,ChunkedOutputJsonNodePublic:()=>f8,ChunkedOutputJsonNodePublicType:()=>Uk,ChunkedOutputJsonNodeType:()=>Ik,Column:()=>Mk,ColumnCompare:()=>Jk,ColumnCompareTypesItem:()=>Lk,ColumnPublic:()=>Kk,ColumnPublicTypesItem:()=>Gk,ColumnTypesItem:()=>Bk,Comment:()=>fe,CommentCompare:()=>Qk,CommentPublic:()=>_t,CompleteMultipartUploadRequest:()=>rl,CompleteMultipartUploadRequestEntityType:()=>Xk,CompletionTokensDetails:()=>gk,CountValueStatPublic:()=>rA,CreateDatasetItemsFromSpansRequest:()=>xo,CreateDatasetItemsFromTracesRequest:()=>wo,CreateLocalRunnerJobRequest:()=>_a,CreatePromptVersionDetail:()=>ma,CreatePromptVersionDetailTemplateStructure:()=>ac,CreateSessionRequest:()=>oa,CreateSessionRequestType:()=>Yp,CreateSessionResponse:()=>iA,DashboardPagePublic:()=>kt,DashboardPublic:()=>Ze,DashboardPublicScope:()=>oA,DashboardPublicType:()=>nA,DashboardUpdatePublic:()=>zn,DashboardUpdatePublicType:()=>cA,DashboardWrite:()=>Sn,DashboardWriteType:()=>mA,DataPointDouble:()=>h8,DataPointNumberPublic:()=>uA,Dataset:()=>y8,DatasetExpansion:()=>b8,DatasetExpansionResponse:()=>SA,DatasetExpansionWrite:()=>_o,DatasetExportJobPublic:()=>Yt,DatasetExportJobPublicStatus:()=>If,DatasetIdentifier:()=>ko,DatasetIdentifierPublic:()=>Ao,DatasetItem:()=>vn,DatasetItemBatch:()=>R8,DatasetItemBatchUpdate:()=>zo,DatasetItemBatchWrite:()=>To,DatasetItemChangesPublic:()=>TA,DatasetItemCompare:()=>tP,DatasetItemCompareSource:()=>vA,DatasetItemFilter:()=>Po,DatasetItemFilterOperator:()=>hf,DatasetItemPageCompare:()=>oP,DatasetItemPagePublic:()=>yP,DatasetItemPublic:()=>Dn,DatasetItemPublicSource:()=>aP,DatasetItemSource:()=>wA,DatasetItemStreamRequest:()=>vo,DatasetItemUpdate:()=>bf,DatasetItemWrite:()=>So,DatasetItemWriteSource:()=>xf,DatasetItemsDelete:()=>jo,DatasetPagePublic:()=>Nn,DatasetPublic:()=>fi,DatasetPublicStatus:()=>bP,DatasetPublicType:()=>xP,DatasetPublicVisibility:()=>_P,DatasetStatus:()=>fA,DatasetType:()=>yA,DatasetUpdate:()=>Eo,DatasetUpdateVisibility:()=>Tp,DatasetVersionDiff:()=>SP,DatasetVersionDiffStats:()=>PP,DatasetVersionPagePublic:()=>vP,DatasetVersionPublic:()=>Lr,DatasetVersionRestorePublic:()=>Co,DatasetVersionRetrieveRequestPublic:()=>Io,DatasetVersionSummary:()=>Tn,DatasetVersionSummaryPublic:()=>Un,DatasetVersionTag:()=>Do,DatasetVersionUpdatePublic:()=>Uo,DatasetVisibility:()=>RA,DatasetWrite:()=>No,DatasetWriteType:()=>vp,DatasetWriteVisibility:()=>jp,DeleteAttachmentsRequest:()=>x8,DeleteAttachmentsRequestEntityType:()=>jP,DeleteFeedbackScore:()=>Bn,DeleteIdsHolder:()=>hi,DeleteThreadFeedbackScores:()=>Ca,DeleteTraceThreads:()=>Ia,Delta:()=>nk,DownloadAttachmentRequestEntityType:()=>_p,Environment:()=>w8,EnvironmentPagePublic:()=>IP,EnvironmentPublic:()=>Fn,EnvironmentUpdate:()=>Bo,EnvironmentWrite:()=>Fo,ErrorCountWithDeviation:()=>Mn,ErrorCountWithDeviationDetailed:()=>DP,ErrorInfo:()=>Ar,ErrorInfoExperimentItemBulkWriteView:()=>Go,ErrorInfoPublic:()=>Wn,ErrorInfoWrite:()=>Ta,ErrorMessage:()=>ue,ErrorMessageDetail:()=>_8,ErrorMessageDetailed:()=>k8,ErrorMessageHistory:()=>A8,ErrorMessagePublic:()=>P8,ErrorMessageWrite:()=>z8,EvaluatorItem:()=>xr,EvaluatorItemCompare:()=>UA,EvaluatorItemCompareType:()=>EA,EvaluatorItemPublic:()=>En,EvaluatorItemPublicType:()=>sP,EvaluatorItemType:()=>lf,EvaluatorItemWrite:()=>Af,EvaluatorItemWriteType:()=>_f,ExecutionPolicy:()=>Ke,ExecutionPolicyCompare:()=>jn,ExecutionPolicyPublic:()=>Cn,ExecutionPolicyWrite:()=>zf,Experiment:()=>S8,ExperimentBatchUpdate:()=>Lo,ExperimentEvaluationMethod:()=>NP,ExperimentExecutionRequest:()=>Jo,ExperimentExecutionResponse:()=>HP,ExperimentGroupAggregationsResponse:()=>KP,ExperimentGroupResponse:()=>ez,ExperimentInfo:()=>VP,ExperimentItem:()=>$o,ExperimentItemBulkRecord:()=>uz,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>ch,ExperimentItemBulkUpload:()=>T8,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Oo,ExperimentItemCompare:()=>YA,ExperimentItemCompareStatus:()=>BA,ExperimentItemCompareTraceVisibilityMode:()=>MA,ExperimentItemPublic:()=>In,ExperimentItemPublicTraceVisibilityMode:()=>cP,ExperimentItemReference:()=>az,ExperimentItemReferencePublic:()=>fz,ExperimentItemStatus:()=>uh,ExperimentItemStreamRequest:()=>Ko,ExperimentItemTraceVisibilityMode:()=>fh,ExperimentItemsBatch:()=>Qo,ExperimentItemsDelete:()=>Yo,ExperimentPagePublic:()=>Gn,ExperimentPublic:()=>Hn,ExperimentPublicEvaluationMethod:()=>yz,ExperimentPublicStatus:()=>Rz,ExperimentPublicType:()=>wz,ExperimentRunSummary:()=>PA,ExperimentRunSummaryCompare:()=>eP,ExperimentRunSummaryCompareStatus:()=>ZA,ExperimentRunSummaryPublic:()=>gP,ExperimentRunSummaryPublicStatus:()=>dP,ExperimentRunSummaryStatus:()=>kA,ExperimentScore:()=>Mo,ExperimentScorePublic:()=>kz,ExperimentScoreWrite:()=>kh,ExperimentStatus:()=>FP,ExperimentStreamRequestPublic:()=>Xo,ExperimentType:()=>WP,ExperimentUpdate:()=>Wo,ExperimentUpdateStatus:()=>Ff,ExperimentUpdateType:()=>Wf,ExperimentWrite:()=>Zo,ExperimentWriteEvaluationMethod:()=>Bp,ExperimentWriteStatus:()=>Fp,ExperimentWriteType:()=>Mp,ExportTraceServiceRequest:()=>v8,Feedback:()=>j8,FeedbackCreate:()=>Nz,FeedbackDefinitionPagePublic:()=>Vz,FeedbackObjectPublic:()=>Wz,FeedbackPublic:()=>Hz,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>Te,FeedbackScoreAverageDetailed:()=>Gz,FeedbackScoreAveragePublic:()=>Wr,FeedbackScoreBatch:()=>Kn,FeedbackScoreBatchItem:()=>Qz,FeedbackScoreBatchItemSource:()=>Kz,FeedbackScoreBatchItemThread:()=>Zy,FeedbackScoreBatchItemThreadSource:()=>Yy,FeedbackScoreBatchThread:()=>Da,FeedbackScoreCompare:()=>KA,FeedbackScoreCompareSource:()=>LA,FeedbackScoreExperimentItemBulkWriteView:()=>Xf,FeedbackScoreExperimentItemBulkWriteViewSource:()=>Gf,FeedbackScoreNames:()=>qz,FeedbackScoreNamesPublic:()=>Vr,FeedbackScorePublic:()=>bi,FeedbackScorePublicSource:()=>tS,FeedbackScoreSource:()=>yh,FeedbackUpdate:()=>uS,FindFeedbackDefinitionsRequestType:()=>Lp,FindFeedbackScoreNames1RequestType:()=>Sc,Function:()=>yo,FunctionCall:()=>Rr,GetSpanStatsRequestType:()=>Tc,GetSpansByProjectRequestType:()=>vc,GetWebhookExamplesRequestAlertType:()=>gp,GroupContent:()=>$P,GroupContentWithAggregations:()=>GP,GroupDetail:()=>YP,GroupDetails:()=>ZP,Guardrail:()=>bS,GuardrailBatch:()=>E8,GuardrailBatchWrite:()=>qo,GuardrailName:()=>gS,GuardrailResult:()=>hS,GuardrailWrite:()=>Nh,GuardrailWriteName:()=>Ch,GuardrailWriteResult:()=>Dh,GuardrailsValidation:()=>sz,GuardrailsValidationPublic:()=>xS,IdsHolder:()=>C8,ImageUrl:()=>px,ImageUrlPublic:()=>Nx,ImageUrlWrite:()=>$x,JsonListString:()=>le,JsonListStringCompare:()=>al,JsonListStringExperimentItemBulkWriteView:()=>$e,JsonListStringPublic:()=>We,JsonListStringWrite:()=>Me,JsonNode:()=>L,JsonNodeCompare:()=>IA,JsonNodeDetail:()=>uy,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>Yg,KpiCardRequest:()=>aa,KpiCardRequestEntityType:()=>Zp,KpiCardResponse:()=>zS,KpiMetric:()=>AS,KpiMetricType:()=>_S,ListRunnersRequestStatus:()=>kc,LlmAsJudgeCode:()=>en,LlmAsJudgeCodePublic:()=>Ox,LlmAsJudgeCodeWrite:()=>ow,LlmAsJudgeMessage:()=>ut,LlmAsJudgeMessageContent:()=>dx,LlmAsJudgeMessageContentPublic:()=>Wx,LlmAsJudgeMessageContentWrite:()=>Zx,LlmAsJudgeMessagePublic:()=>ht,LlmAsJudgeMessagePublicRole:()=>Vx,LlmAsJudgeMessageRole:()=>gx,LlmAsJudgeMessageWrite:()=>Rt,LlmAsJudgeMessageWriteRole:()=>ew,LlmAsJudgeModelParameters:()=>gt,LlmAsJudgeModelParametersPublic:()=>yt,LlmAsJudgeModelParametersWrite:()=>xt,LlmAsJudgeOutputSchema:()=>ft,LlmAsJudgeOutputSchemaPublic:()=>bt,LlmAsJudgeOutputSchemaPublicType:()=>Hx,LlmAsJudgeOutputSchemaType:()=>hx,LlmAsJudgeOutputSchemaWrite:()=>wt,LlmAsJudgeOutputSchemaWriteType:()=>tw,LocalRunner:()=>$n,LocalRunnerHeartbeatRequest:()=>ka,LocalRunnerHeartbeatResponse:()=>CS,LocalRunnerJob:()=>lt,LocalRunnerJobMetadata:()=>wa,LocalRunnerJobPage:()=>IS,LocalRunnerJobResultRequest:()=>Aa,LocalRunnerJobResultRequestStatus:()=>fc,LocalRunnerJobStatus:()=>Iy,LocalRunnerLogEntry:()=>Pa,LocalRunnerPage:()=>DS,LocalRunnerStatus:()=>SS,LocalRunnerType:()=>vS,LogItem:()=>BS,LogItemLevel:()=>US,LogPage:()=>MS,LogProb:()=>pk,LogProbs:()=>lk,ManualEvaluationRequest:()=>Qn,ManualEvaluationRequestEntityType:()=>WS,ManualEvaluationResponse:()=>Yn,Message:()=>bo,MultipartUploadPart:()=>qk,NumericalFeedbackDefinition:()=>Tz,NumericalFeedbackDefinitionCreate:()=>Iz,NumericalFeedbackDefinitionPublic:()=>On,NumericalFeedbackDefinitionUpdate:()=>lS,NumericalFeedbackDetail:()=>zz,NumericalFeedbackDetailCreate:()=>Ez,NumericalFeedbackDetailPublic:()=>Bz,NumericalFeedbackDetailUpdate:()=>pS,OllamaConnectionTestResponse:()=>hl,OllamaInstanceBaseUrlRequest:()=>yl,OllamaModel:()=>Vh,Optimization:()=>I8,OptimizationPagePublic:()=>Zn,OptimizationPublic:()=>Xn,OptimizationPublicStatus:()=>oT,OptimizationStatus:()=>VS,OptimizationStudioConfig:()=>tT,OptimizationStudioConfigPublic:()=>bT,OptimizationStudioConfigWrite:()=>IT,OptimizationStudioLog:()=>UT,OptimizationUpdate:()=>ta,OptimizationUpdateStatus:()=>$p,OptimizationWrite:()=>bl,OptimizationWriteStatus:()=>NT,PageColumns:()=>FT,Param:()=>fb,ParamPresence:()=>ub,PercentageValueStatPublic:()=>MT,PercentageValues:()=>Pr,PercentageValuesDetailed:()=>LT,PercentageValuesPublic:()=>Jn,Permission:()=>JT,Project:()=>D8,ProjectDetailed:()=>QT,ProjectDetailedVisibility:()=>KT,ProjectMetricRequestPublic:()=>sa,ProjectMetricRequestPublicInterval:()=>qp,ProjectMetricRequestPublicMetricType:()=>ec,ProjectMetricResponsePublic:()=>tv,ProjectMetricResponsePublicInterval:()=>YT,ProjectMetricResponsePublicMetricType:()=>ZT,ProjectPagePublic:()=>nv,ProjectPublic:()=>qn,ProjectPublicVisibility:()=>iv,ProjectReference:()=>Dx,ProjectReferencePublic:()=>xn,ProjectRetrieveDetailed:()=>pa,ProjectStatItemObjectPublic:()=>pv,ProjectStatsPublic:()=>Jr,ProjectStatsSummary:()=>dv,ProjectStatsSummaryItem:()=>lv,ProjectUpdate:()=>ca,ProjectUpdateVisibility:()=>rc,ProjectVisibility:()=>GT,ProjectWrite:()=>la,ProjectWriteVisibility:()=>tc,Prompt:()=>U8,PromptDetail:()=>xl,PromptDetailTemplateStructure:()=>_v,PromptPagePublic:()=>es,PromptPublic:()=>zv,PromptPublicTemplateStructure:()=>Av,PromptTemplateStructure:()=>uv,PromptTokensDetails:()=>hk,PromptType:()=>fv,PromptUpdatable:()=>da,PromptVariant:()=>Jf,PromptVersion:()=>Rl,PromptVersionBatchUpdate:()=>ua,PromptVersionCommitsRequestPublic:()=>ga,PromptVersionDetail:()=>Ye,PromptVersionDetailTemplateStructure:()=>fy,PromptVersionDetailType:()=>yy,PromptVersionLink:()=>Fr,PromptVersionLinkPublic:()=>ii,PromptVersionLinkWrite:()=>Np,PromptVersionPagePublic:()=>Dv,PromptVersionPublic:()=>Cv,PromptVersionPublicTemplateStructure:()=>Tv,PromptVersionPublicType:()=>jv,PromptVersionRetrieveDetail:()=>fa,PromptVersionTemplateStructure:()=>yv,PromptVersionType:()=>Rv,PromptVersionUpdate:()=>xy,PromptWrite:()=>ha,PromptWriteTemplateStructure:()=>nc,PromptWriteType:()=>sc,ProviderApiKey:()=>N8,ProviderApiKeyPagePublic:()=>Wv,ProviderApiKeyProvider:()=>Uv,ProviderApiKeyPublic:()=>rs,ProviderApiKeyPublicProvider:()=>Bv,ProviderApiKeyUpdate:()=>ea,ProviderApiKeyWrite:()=>ra,ProviderApiKeyWriteProvider:()=>Gp,ResponseFormat:()=>ef,ResponseFormatType:()=>Zg,Result:()=>At,ResultsNumberPublic:()=>ev,RetentionRulePagePublic:()=>Ov,RetentionRulePublic:()=>Ri,RetentionRulePublicLevel:()=>Lv,RetentionRulePublicRetention:()=>Jv,RetentionRuleWrite:()=>ya,RetentionRuleWriteRetention:()=>lc,ScoreName:()=>Xz,ScoreNamePublic:()=>eS,ServiceTogglesConfig:()=>Kv,Span:()=>Ln,SpanBatch:()=>B8,SpanBatchUpdate:()=>Sa,SpanBatchWrite:()=>ja,SpanEnrichmentOptions:()=>df,SpanExperimentItemBulkWriteView:()=>ih,SpanExperimentItemBulkWriteViewSource:()=>qf,SpanExperimentItemBulkWriteViewType:()=>rh,SpanFilter:()=>Sr,SpanFilterOperator:()=>_x,SpanFilterPublic:()=>_r,SpanFilterPublicOperator:()=>ry,SpanFilterWrite:()=>wn,SpanFilterWriteOperator:()=>Tw,SpanLlmAsJudgeCode:()=>rn,SpanLlmAsJudgeCodePublic:()=>dw,SpanLlmAsJudgeCodeWrite:()=>jw,SpanPagePublic:()=>qv,SpanPublic:()=>ts,SpanPublicSource:()=>$v,SpanPublicType:()=>Yv,SpanSearchStreamRequestPublic:()=>Ea,SpanSearchStreamRequestPublicExcludeItem:()=>Pc,SpanSearchStreamRequestPublicType:()=>zc,SpanSource:()=>rz,SpanType:()=>iz,SpanUpdate:()=>za,SpanUpdateSource:()=>Ny,SpanUpdateType:()=>Fy,SpanUserDefinedMetricPythonCode:()=>tn,SpanUserDefinedMetricPythonCodePublic:()=>gw,SpanUserDefinedMetricPythonCodeWrite:()=>Dw,SpanWrite:()=>va,SpanWriteSource:()=>Ly,SpanWriteType:()=>Jy,SpansCountResponse:()=>tj,StartMultipartUploadRequest:()=>ho,StartMultipartUploadRequestEntityType:()=>Rp,StartMultipartUploadResponse:()=>ij,StreamOptions:()=>tf,StudioEvaluation:()=>OS,StudioEvaluationPublic:()=>pT,StudioEvaluationWrite:()=>kT,StudioLlmModel:()=>$S,StudioLlmModelPublic:()=>lT,StudioLlmModelWrite:()=>PT,StudioMessage:()=>ZS,StudioMessagePublic:()=>gT,StudioMessageWrite:()=>vT,StudioMetric:()=>HS,StudioMetricPublic:()=>nT,StudioMetricWrite:()=>wT,StudioOptimizer:()=>YS,StudioOptimizerPublic:()=>dT,StudioOptimizerWrite:()=>ST,StudioPrompt:()=>eT,StudioPromptPublic:()=>hT,StudioPromptWrite:()=>ET,TokenUsageNames:()=>oj,Tool:()=>sf,ToolCall:()=>Ya,ToolCallType:()=>OR,ToolType:()=>af,Trace:()=>Vn,TraceBatch:()=>F8,TraceBatchUpdate:()=>Na,TraceBatchWrite:()=>Fa,TraceCountResponse:()=>sj,TraceEnrichmentOptions:()=>gf,TraceExperimentItemBulkWriteView:()=>sh,TraceExperimentItemBulkWriteViewSource:()=>ah,TraceFilter:()=>zr,TraceFilterOperator:()=>bx,TraceFilterPublic:()=>kr,TraceFilterPublicOperator:()=>iy,TraceFilterWrite:()=>gn,TraceFilterWriteOperator:()=>nw,TracePagePublic:()=>uj,TracePublic:()=>is,TracePublicSource:()=>pj,TracePublicVisibilityMode:()=>lj,TraceSearchStreamRequestPublic:()=>Ma,TraceSearchStreamRequestPublicExcludeItem:()=>Ec,TraceSource:()=>cz,TraceThread:()=>os,TraceThreadBatchIdentifier:()=>Wa,TraceThreadBatchUpdate:()=>Va,TraceThreadFilter:()=>Xe,TraceThreadFilterOperator:()=>pb,TraceThreadFilterPublic:()=>ct,TraceThreadFilterPublicOperator:()=>ay,TraceThreadFilterWrite:()=>_n,TraceThreadFilterWriteOperator:()=>Fw,TraceThreadIdentifier:()=>_l,TraceThreadLlmAsJudgeCode:()=>on,TraceThreadLlmAsJudgeCodePublic:()=>hw,TraceThreadLlmAsJudgeCodeWrite:()=>Ww,TraceThreadPage:()=>yj,TraceThreadSearchStreamRequest:()=>Ja,TraceThreadStatus:()=>gj,TraceThreadUpdate:()=>La,TraceThreadUserDefinedMetricPythonCode:()=>an,TraceThreadUserDefinedMetricPythonCodePublic:()=>bw,TraceThreadUserDefinedMetricPythonCodeWrite:()=>Hw,TraceUpdate:()=>Ua,TraceUpdateSource:()=>eb,TraceVisibilityMode:()=>mz,TraceWrite:()=>Ba,TraceWriteSource:()=>ib,UploadAttachmentRequestEntityType:()=>kp,Usage:()=>bk,UserDefinedMetricPythonCode:()=>nn,UserDefinedMetricPythonCodePublic:()=>xw,UserDefinedMetricPythonCodeWrite:()=>c_,ValueEntry:()=>wh,ValueEntryCompare:()=>GA,ValueEntryCompareSource:()=>JA,ValueEntryExperimentItemBulkWriteView:()=>Qf,ValueEntryExperimentItemBulkWriteViewSource:()=>Kf,ValueEntryPublic:()=>nS,ValueEntryPublicSource:()=>oS,ValueEntrySource:()=>Rh,VideoUrl:()=>lx,VideoUrlPublic:()=>Fx,VideoUrlWrite:()=>Yx,Webhook:()=>qb,WebhookExamples:()=>bj,WebhookPublic:()=>mR,WebhookTestResult:()=>wj,WebhookTestResultStatus:()=>Rj,WebhookWrite:()=>AR,WelcomeWizardSubmission:()=>Ha,WelcomeWizardTracking:()=>_j,WorkspaceConfiguration:()=>as,WorkspaceMetricRequest:()=>M8,WorkspaceMetricResponse:()=>kl,WorkspaceMetricsSummaryRequest:()=>xi,WorkspaceMetricsSummaryResponse:()=>kj,WorkspaceNameHolder:()=>Aj,WorkspaceSpansCount:()=>ej,WorkspaceTraceCount:()=>aj,WorkspaceUserPermissions:()=>Pj,WorkspaceVersion:()=>Tj,WorkspaceVersionOpikVersion:()=>zj,agentConfigs:()=>up,alerts:()=>fp,annotationQueues:()=>hp,assertionResults:()=>bp,attachments:()=>Kt,chatCompletions:()=>zp,datasets:()=>Xt,environments:()=>Cp,experiments:()=>Wp,feedbackDefinitions:()=>Vp,guardrails:()=>Jp,llmModels:()=>qt,llmProviderKey:()=>Op,ollama:()=>ei,optimizations:()=>Qp,pairing:()=>Xp,projects:()=>ic,prompts:()=>oi,retentionRules:()=>mc,runners:()=>lr,spans:()=>jc,traces:()=>Cc,welcomeWizard:()=>Ic});var te=n(()=>{YK();s4();});var Al,p4=n(()=>{X();Q();b();Y();Z();J();te();ie();Al=class{constructor(i={}){this._options=M(i);}createAgentConfig(i,e){return P.fromPromise(this.__createAgentConfig(i,e))}async __createAgentConfig(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Dc.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 401:throw new $(o.error.body,o.rawResponse);case 409: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/agent-configs/blueprints")}updateAgentConfig(i,e){return P.fromPromise(this.__updateAgentConfig(i,e))}async __updateAgentConfig(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Dc.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 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,e,t={},o){return P.fromPromise(this.__createBlueprintFromMask(i,e,t,o))}async __createBlueprintFromMask(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(i)}/masks/${_.encodePathParam(e)}`),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 $(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,e){return P.fromPromise(this.__createOrUpdateEnvs(i,e))}async __createOrUpdateEnvs(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:co.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 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,e,t={},o){return P.fromPromise(this.__getBlueprintByEnv(i,e,t,o))}async __getBlueprintByEnv(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),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:dt.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 $(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,e,t,o){return P.fromPromise(this.__setEnvByBlueprintName(i,e,t,o))}async __setEnvByBlueprintName(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:po.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 $(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,e,t={},o){return P.fromPromise(this.__deleteEnv(i,e,t,o))}async __deleteEnv(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(i)}/projects/${_.encodePathParam(e)}`),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 $(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,e={},t){return P.fromPromise(this.__getBlueprintById(i,e,t))}async __getBlueprintById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=e,a={mask_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:dt.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 $(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,e,t={},o){return P.fromPromise(this.__getBlueprintByName(i,e,t,o))}async __getBlueprintByName(i,e,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,v({"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:T.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(i)}/names/${_.encodePathParam(e)}`),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:dt.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 $(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,e={},t){return P.fromPromise(this.__getBlueprintHistory(i,e,t))}async __getBlueprintHistory(i,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=e,s={page:o,size:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:x_.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 $(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,e={},t){return P.fromPromise(this.__getDeltaById(i,e,t))}async __getDeltaById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:dt.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 $(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,e={},t){return P.fromPromise(this.__getLatestBlueprint(i,e,t))}async __getLatestBlueprint(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:o}=e,a={mask_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:dt.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 $(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,e){return P.fromPromise(this.__removeConfigKeys(i,e))}async __removeConfigKeys(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===401?new $(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 Pl,c4=n(()=>{X();Q();b();Y();Z();J();te();ie();Pl=class{constructor(i={}){this._options=M(i);}findAlerts(i={},e){return P.fromPromise(this.__findAlerts(i,e))}async __findAlerts(i={},e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Oa.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,e){return P.fromPromise(this.__createAlert(i,e))}async __createAlert(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteAlertBatch(i,e))}async __deleteAlertBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getAlertById(i,e,t))}async __getAlertById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ga.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,e,t){return P.fromPromise(this.__updateAlert(i,e,t))}async __updateAlert(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/alerts/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ka.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 B(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);case 422:throw new ce(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={},e){return P.fromPromise(this.__getWebhookExamples(i,e))}async __getWebhookExamples(i={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=i,o={alert_type:t!=null?gp.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:bj.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,e){return P.fromPromise(this.__testWebhook(i,e))}async __testWebhook(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ka.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:wj.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 ce(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 zl,l4=n(()=>{X();Q();b();Y();Z();J();te();ie();zl=class{constructor(i={}){this._options=M(i);}addItemsToAnnotationQueue(i,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(i,e,t))}async __addItemsToAnnotationQueue(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Uc.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={},e){return P.fromPromise(this.__findAnnotationQueues(i,e))}async __findAnnotationQueues(i={},e){var d,f,g,h,y,w,A,C,I,D,N;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,v({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:T.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:BR.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,e){return P.fromPromise(this.__createAnnotationQueue(i,e))}async __createAnnotationQueue(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__createAnnotationQueueBatch(i,e))}async __createAnnotationQueueBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:uo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(i,e))}async __deleteAnnotationQueueBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getAnnotationQueueById(i,e,t))}async __getAnnotationQueueById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Qa.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,e={},t){return P.fromPromise(this.__updateAnnotationQueue(i,e,t))}async __updateAnnotationQueue(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/annotation-queues/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:go.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new B(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}")}removeItemsFromAnnotationQueue(i,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(i,e,t))}async __removeItemsFromAnnotationQueue(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Uc.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")}};});var Sl,m4=n(()=>{X();Q();b();Y();Z();J();te();Sl=class{constructor(i={}){this._options=M(i);}storeAssertionsBatch(i,e){return P.fromPromise(this.__storeAssertionsBatch(i,e))}async __storeAssertionsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Tl,d4=n(()=>{X();Q();b();Y();Z();J();te();ie();Tl=class{constructor(i={}){this._options=M(i);}attachmentList(i,e){return P.fromPromise(this.__attachmentList(i,e))}async __attachmentList(i,e){var f,g,h,y,w,A,C,I,D,N,F;let{page:t,size:o,projectId:a,entityType:s,entityId:c,path:l}=i,m={page:t,size:o,project_id:a,entity_type:wp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:ZR.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__completeMultiPartUpload(i,e))}async __completeMultiPartUpload(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:rl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__deleteAttachments(i,e))}async __deleteAttachments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:rl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__downloadAttachment(i,e))}async __downloadAttachment(i,e){var f,g,h,y,w,A,C,I,D,N,F;let{workspaceName:t,containerId:o,entityType:a,entityId:s,fileName:c,mimeType:l}=i,m={workspace_name:t,container_id:o,entity_type:_p.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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__startMultiPartUpload(i,e))}async __startMultiPartUpload(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ho.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ij.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 $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__uploadAttachment(i,e))}async __uploadAttachment(i,e){var f,g,h,y,w,A,C,I,D,N,F;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:kp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:Kt.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.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 $(d.error.body,d.rawResponse);case 403:throw new ye(ue.parseOrThrow(d.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 vl,u4=n(()=>{X();Q();b();Y();Z();J();te();vl=class{constructor(i={}){this._options=M(i);}findEvaluators(i={},e){return P.fromPromise(this.__findEvaluators(i,e))}async __findEvaluators(i={},e){var g,h,y,w,A,C,I,D,N,F,re;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,v({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:T.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(N=this._options)==null?void 0:N.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(re=this._options)==null?void 0:re.fetch,logging:this._options.logging});if(f.ok)return {data:Aw.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,e){return P.fromPromise(this.__createAutomationRuleEvaluator(i,e))}async __createAutomationRuleEvaluator(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:f_.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(i,e))}async __deleteAutomationRuleEvaluatorBatch(i,e){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,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:me.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(i,e={},t){return P.fromPromise(this.__getEvaluatorById(i,e,t))}async __getEvaluatorById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:o}=e,a={project_id:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:Sw.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,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(i,e,t))}async __updateAutomationRuleEvaluator(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/automations/evaluators/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:p_.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/automations/evaluators/{id}")}getEvaluatorLogsById(i,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(i,e,t))}async __getEvaluatorLogsById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:o}=e,a={size:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:MS.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 jl,g4=n(()=>{X();Q();b();Y();Z();J();te();jl=class{constructor(i={}){this._options=M(i);}createChatCompletions(i={},e){return P.fromPromise(this.__createChatCompletions(i,e))}async __createChatCompletions(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ro.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:xk.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 El,f4=n(()=>{X();Q();b();Y();Z();J();te();ie();El=class{constructor(i={}){this._options=M(i);}access(i,e){return P.fromPromise(this.__access(i,e))}async __access(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ax.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/auth/workspace"),method:"GET",headers:e,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:Aj.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 $(t.error.body,t.rawResponse);case 403:throw new ye(ue.parseOrThrow(t.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 Cl,h4=n(()=>{X();Q();b();Y();Z();J();te();ie();Cl=class{constructor(i={}){this._options=M(i);}findDashboards(i={},e){return P.fromPromise(this.__findDashboards(i,e))}async __findDashboards(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e){return P.fromPromise(this.__createDashboard(i,e))}async __createDashboard(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ze.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,e={},t){return P.fromPromise(this.__getDashboardById(i,e,t))}async __getDashboardById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ze.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,e={},t){return P.fromPromise(this.__deleteDashboard(i,e,t))}async __deleteDashboard(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateDashboard(i,e,t))}async __updateDashboard(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/dashboards/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zn.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:Ze.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(i,e){return P.fromPromise(this.__deleteDashboardsBatch(i,e))}async __deleteDashboardsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Il,y4=n(()=>{X();Q();b();Dr();Y();Z();J();te();ie();Il=class{constructor(i={}){this._options=M(i);}applyDatasetItemChanges(i,e,t){return P.fromPromise(this.__applyDatasetItemChanges(i,e,t))}async __applyDatasetItemChanges(i,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:o,body:a}=e,s={override:o},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:TA.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:Lr.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 B(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new K(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,e){return P.fromPromise(this.__batchUpdateDatasetItems(i,e))}async __batchUpdateDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__findDatasets(i,e))}async __findDatasets(i={},e){var y,w,A,C,I,D,N,F,re,ae,we;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,v({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:T.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((F=(N=e==null?void 0:e.timeoutInSeconds)!=null?N:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(ae=e==null?void 0:e.maxRetries)!=null?ae:(re=this._options)==null?void 0:re.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:Nn.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,e){return P.fromPromise(this.__createDataset(i,e))}async __createDataset(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:No.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createOrUpdateDatasetItems(i,e))}async __createOrUpdateDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:To.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createDatasetItemsFromCsv(i,e))}async __createDatasetItemsFromCsv(i,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await aH();t.append("file",Ge(i.file)),t.append("dataset_id",i.datasetId);let o=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...o.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:o.duplex,body:o.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new B(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/datasets/items/from-csv")}createDatasetItemsFromSpans(i,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(i,e,t))}async __createDatasetItemsFromSpans(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(i,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(i,e,t))}async __createDatasetItemsFromTraces(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:wo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(i,e={},t){return P.fromPromise(this.__getDatasetById(i,e,t))}async __getDatasetById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:fi.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,e,t){return P.fromPromise(this.__updateDataset(i,e,t))}async __updateDataset(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/datasets/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Eo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(i,e={},t){return P.fromPromise(this.__deleteDataset(i,e,t))}async __deleteDataset(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e){return P.fromPromise(this.__deleteDatasetByName(i,e))}async __deleteDatasetByName(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ko.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__deleteDatasetItems(i,e))}async __deleteDatasetItems(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e){return P.fromPromise(this.__deleteDatasetsBatch(i,e))}async __deleteDatasetsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__downloadDatasetExport(i,e,t))}async __downloadDatasetExport(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 B(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,e,t){return P.fromPromise(this.__expandDataset(i,e,t))}async __expandDataset(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/expansions`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:_o.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:SA.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,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(i,e,t))}async __findDatasetItemsWithExperimentItems(i,e,t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:o,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.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 new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(i,e){return P.fromPromise(this.__getDatasetByIdentifier(i,e))}async __getDatasetByIdentifier(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ao.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:fi.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,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(i,e,t))}async __getDatasetExperimentItemsStats(i,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:o,filters:a}=e,s={experiment_ids:o,filters:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:Jr.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,e={},t){return P.fromPromise(this.__getDatasetExportJob(i,e,t))}async __getDatasetExportJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Yt.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,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:Xt.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,e={},t){return P.fromPromise(this.__getDatasetItemById(i,e,t))}async __getDatasetItemById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Dn.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,e,t){return P.fromPromise(this.__patchDatasetItem(i,e,t))}async __patchDatasetItem(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/datasets/items/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:So.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,e={},t){return P.fromPromise(this.__getDatasetItems(i,e,t))}async __getDatasetItems(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,version:s,filters:c,truncate:l}=e,m={page:o,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:yP.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,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(i,e,t))}async __getDatasetItemsOutputColumns(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:o}=e,a={experiment_ids:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:FT.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,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(i,e,t))}async __markDatasetExportJobViewed(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e={},t){return P.fromPromise(this.__startDatasetExport(i,e,t))}async __startDatasetExport(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Yt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(i,e){return P.fromPromise(this.__streamDatasetItems(i,e))}async __streamDatasetItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__compareDatasetVersions(i,e,t))}async __compareDatasetVersions(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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: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/datasets/{id}/versions/diff")}createVersionTag(i,e,t,o){return P.fromPromise(this.__createVersionTag(i,e,t,o))}async __createVersionTag(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Do.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 B(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(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,e,t,o={},a){return P.fromPromise(this.__deleteVersionTag(i,e,t,o,a))}async __deleteVersionTag(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(i,e={},t){return P.fromPromise(this.__listDatasetVersions(i,e,t))}async __listDatasetVersions(i,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:o,size:a}=e,s={page:o,size:a},c=z((m=this._options)==null?void 0:m.headers,v({"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:T.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:vP.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 B(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,e,t){return P.fromPromise(this.__restoreDatasetVersion(i,e,t))}async __restoreDatasetVersion(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Co.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Lr.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/datasets/{id}/versions/restore")}retrieveDatasetVersion(i,e,t){return P.fromPromise(this.__retrieveDatasetVersion(i,e,t))}async __retrieveDatasetVersion(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Io.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Lr.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 B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(i,e,t={},o){return P.fromPromise(this.__updateDatasetVersion(i,e,t,o))}async __updateDatasetVersion(i,e,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,v({"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:T.Default,`v1/private/datasets/${_.encodePathParam(i)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Uo.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:Lr.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 B(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Dl,b4=n(()=>{X();Q();b();Y();Z();J();te();ie();Dl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/environments"),method:"GET",headers:e,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:IP.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,e){return P.fromPromise(this.__createEnvironment(i,e))}async __createEnvironment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/environments")}deleteEnvironmentsBatch(i,e){return P.fromPromise(this.__deleteEnvironmentsBatch(i,e))}async __deleteEnvironmentsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getEnvironmentById(i,e,t))}async __getEnvironmentById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Fn.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,e={},t){return P.fromPromise(this.__updateEnvironment(i,e,t))}async __updateEnvironment(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/environments/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bo.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(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 Ul,R4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ul=class{constructor(i={}){this._options=M(i);}batchUpdateExperiments(i,e){return P.fromPromise(this.__batchUpdateExperiments(i,e))}async __batchUpdateExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Lo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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")}findExperiments(i={},e){return P.fromPromise(this.__findExperiments(i,e))}async __findExperiments(i={},e){var D,N,F,re,ae,we,Ee,Ce,He,Hi,Gi;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,v({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(N=this._options)==null?void 0:N.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ae=(re=await x.get(this._options.baseUrl))!=null?re:await x.get(this._options.environment))!=null?ae:T.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ce=(Ee=e==null?void 0:e.timeoutInSeconds)!=null?Ee:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ce:60)*1e3,maxRetries:(Hi=e==null?void 0:e.maxRetries)!=null?Hi:(He=this._options)==null?void 0:He.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Gi=this._options)==null?void 0:Gi.fetch,logging:this._options.logging});if(I.ok)return {data:Gn.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 B(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,e){return P.fromPromise(this.__createExperiment(i,e))}async __createExperiment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Zo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__createExperimentItems(i,e))}async __createExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteExperimentItems(i,e))}async __deleteExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Yo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteExperimentsById(i,e))}async __deleteExperimentsById(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__executeExperiment(i,e))}async __executeExperiment(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Jo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:HP.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/experiments/execute")}experimentItemsBulk(i,e){return P.fromPromise(this.__experimentItemsBulk(i,e))}async __experimentItemsBulk(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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={},e){return P.fromPromise(this.__findFeedbackScoreNames(i,e))}async __findFeedbackScoreNames(i={},e){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,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vr.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={},e){return P.fromPromise(this.__findExperimentGroups(i,e))}async __findExperimentGroups(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:ez.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 B(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={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(i,e))}async __findExperimentGroupsAggregations(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:KP.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 B(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,e){return P.fromPromise(this.__finishExperiments(i,e))}async __finishExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getExperimentById(i,e,t))}async __getExperimentById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Hn.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,e,t){return P.fromPromise(this.__updateExperiment(i,e,t))}async __updateExperiment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/experiments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Wo.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 B(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,e={},t){return P.fromPromise(this.__getExperimentItemById(i,e,t))}async __getExperimentItemById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:In.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,e){return P.fromPromise(this.__streamExperimentItems(i,e))}async __streamExperimentItems(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ko.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__streamExperiments(i,e))}async __streamExperiments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Xo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Nl,x4=n(()=>{X();Q();b();Y();Z();J();te();ie();Nl=class{constructor(i={}){this._options=M(i);}findFeedbackDefinitions(i={},e){return P.fromPromise(this.__findFeedbackDefinitions(i,e))}async __findFeedbackDefinitions(i={},e){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?Lp.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Vz.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,e){return P.fromPromise(this.__createFeedbackDefinition(i,e))}async __createFeedbackDefinition(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Nz.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(i,e,t))}async __getFeedbackDefinitionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Hz.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,e,t){return P.fromPromise(this.__updateFeedbackDefinition(i,e,t))}async __updateFeedbackDefinition(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/feedback-definitions/${_.encodePathParam(i)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:uS.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,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(i,e,t))}async __deleteFeedbackDefinitionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 K(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,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(i,e))}async __deleteFeedbackDefinitionsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/feedback-definitions/delete")}};});var Bl,w4=n(()=>{X();Q();b();Y();Z();J();te();Bl=class{constructor(i={}){this._options=M(i);}createGuardrails(i,e){return P.fromPromise(this.__createGuardrails(i,e))}async __createGuardrails(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:qo.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Fl,_4=n(()=>{X();Q();b();Y();Z();J();te();ie();Fl=class{constructor(i={}){this._options=M(i);}findInsightsViews(i={},e){return P.fromPromise(this.__findInsightsViews(i,e))}async __findInsightsViews(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e){return P.fromPromise(this.__createInsightsView(i,e))}async __createInsightsView(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ze.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,e={},t){return P.fromPromise(this.__getInsightsViewById(i,e,t))}async __getInsightsViewById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ze.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,e={},t){return P.fromPromise(this.__deleteInsightsView(i,e,t))}async __deleteInsightsView(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateInsightsView(i,e,t))}async __updateInsightsView(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/insights-views/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zn.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:Ze.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(i,e){return P.fromPromise(this.__deleteInsightsViewsBatch(i,e))}async __deleteInsightsViewsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}};});var Ml,k4=n(()=>{X();Q();b();Y();Z();J();te();Ml=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/llm/models"),method:"GET",headers:e,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:qt.getLlmModels.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models")}};});var Wl,A4=n(()=>{X();Q();b();Y();Z();J();te();ie();Wl=class{constructor(i={}){this._options=M(i);}deleteLlmProviderApiKeysBatch(i,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(i,e))}async __deleteLlmProviderApiKeysBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,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:Wv.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,e){return P.fromPromise(this.__storeLlmProviderApiKey(i,e))}async __storeLlmProviderApiKey(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ra.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 401:throw new $(o.error.body,o.rawResponse);case 403:throw new ye(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(i,e,t))}async __getLlmProviderApiKeyById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:rs.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,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(i,e,t))}async __updateLlmProviderApiKey(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ea.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new $(a.error.body,a.rawResponse);case 403:throw new ye(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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}")}};});var Ll,P4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ll=class{constructor(i={}){this._options=M(i);}evaluateSpans(i,e){return P.fromPromise(this.__evaluateSpans(i,e))}async __evaluateSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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,e){return P.fromPromise(this.__evaluateThreads(i,e))}async __evaluateThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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,e){return P.fromPromise(this.__evaluateTraces(i,e))}async __evaluateTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Yn.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 B(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 Vl,z4=n(()=>{X();Q();b();Y();Z();J();te();ie();Vl=class{constructor(i={}){this._options=M(i);}listModels(i,e){return P.fromPromise(this.__listModels(i,e))}async __listModels(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:ei.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 ce(o.error.body,o.rawResponse);case 500:throw new Zi(o.error.body,o.rawResponse);case 503:throw new Wt(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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,e){return P.fromPromise(this.__testConnection(i,e))}async __testConnection(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:hl.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 ce(o.error.body,o.rawResponse);case 502:throw new Xi(hl.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 503:throw new Wt(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),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 Jl,S4=n(()=>{X();Q();b();Y();Z();J();te();ie();Jl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/ollie/state"),method:"GET",headers:e,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 $(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,e){return P.fromPromise(this.__replaceOllieState(i,e))}async __replaceOllieState(i,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await ro.toBinaryUploadRequest(i),o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,"v1/private/ollie/state"),method:"PUT",headers:o,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 401:throw new $(a.error.body,a.rawResponse);case 429:throw new sr(ue.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,"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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,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 $(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 Hl,T4=n(()=>{X();Q();b();Y();Z();J();Hl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,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 Gl,v4=n(()=>{X();Q();b();Y();Z();J();te();ie();Gl=class{constructor(i={}){this._options=M(i);}cancelStudioOptimizations(i,e={},t){return P.fromPromise(this.__cancelStudioOptimizations(i,e,t))}async __cancelStudioOptimizations(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/optimizations/studio/${_.encodePathParam(i)}/cancel`),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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new nr(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}/cancel")}findOptimizations(i={},e){return P.fromPromise(this.__findOptimizations(i,e))}async __findOptimizations(i={},e){var h,y,w,A,C,I,D,N,F,re,ae;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,v({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:T.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((N=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=e==null?void 0:e.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Zn.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 B(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,e){return P.fromPromise(this.__createOptimization(i,e))}async __createOptimization(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__upsertOptimization(i,e))}async __upsertOptimization(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:bl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteOptimizationsById(i,e))}async __deleteOptimizationsById(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getOptimizationById(i,e,t))}async __getOptimizationById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Xn.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,e={},t){return P.fromPromise(this.__updateOptimizationsById(i,e,t))}async __updateOptimizationsById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/optimizations/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ta.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")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,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(i,e,t))}async __getStudioOptimizationLogs(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:UT.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 Ol,j4=n(()=>{X();Q();b();Y();Z();J();te();ie();Ol=class{constructor(i={}){this._options=M(i);}activatePairingSession(i,e,t){return P.fromPromise(this.__activatePairingSession(i,e,t))}async __activatePairingSession(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ia.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new ye(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(a.error.body,a.rawResponse);case 422:throw new ce(a.error.body,a.rawResponse);case 429:throw new sr(ue.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);case 501:throw new nr(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,e){return P.fromPromise(this.__createPairingSession(i,e))}async __createPairingSession(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:iA.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(o.error.body,o.rawResponse);case 429:throw new sr(ue.parseOrThrow(o.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),o.rawResponse);case 501:throw new nr(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 Kl,E4=n(()=>{X();Q();b();Y();Z();J();te();ie();Kl=class{constructor(i={}){this._options=M(i);}findAlertsByProject(i,e={},t){return P.fromPromise(this.__findAlertsByProject(i,e,t))}async __findAlertsByProject(i,e={},t){var d,f,g,h,y,w,A,C,I,D,N;let{page:o,size:a,sorting:s,filters:c}=e,l={page:o,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,v({"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:T.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:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:Oa.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 B(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,e={},t){return P.fromPromise(this.__findDashboardsByProject(i,e,t))}async __findDashboardsByProject(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,name:s,sorting:c,filters:l}=e,m={page:o,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:kt.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,e={},t){return P.fromPromise(this.__findDatasetsByProject(i,e,t))}async __findDatasetsByProject(i,e={},t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,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,v({"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:T.Default,`v1/private/projects/${_.encodePathParam(i)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Nn.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,e={},t){return P.fromPromise(this.__findExperimentsByProject(i,e,t))}async __findExperimentsByProject(i,e={},t){var C,I,D,N,F,re,ae,we,Ee,Ce,He;let{page:o,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,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,v({"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((F=(N=await x.get(this._options.baseUrl))!=null?N:await x.get(this._options.environment))!=null?F:T.Default,`v1/private/projects/${_.encodePathParam(i)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ae=t==null?void 0:t.timeoutInSeconds)!=null?ae:(re=this._options)==null?void 0:re.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ce=t==null?void 0:t.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(He=this._options)==null?void 0:He.fetch,logging:this._options.logging});if(A.ok)return {data:Gn.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 B(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,e={},t){return P.fromPromise(this.__findOptimizationsByProject(i,e,t))}async __findOptimizationsByProject(i,e={},t){var h,y,w,A,C,I,D,N,F,re,ae;let{page:o,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,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,v({"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:T.Default,`v1/private/projects/${_.encodePathParam(i)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((N=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=t==null?void 0:t.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Zn.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 B(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,e={},t){return P.fromPromise(this.__getPromptsByProject(i,e,t))}async __getPromptsByProject(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,name:s,sorting:c,filters:l}=e,m={page:o,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:es.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={},e){return P.fromPromise(this.__findProjects(i,e))}async __findProjects(i={},e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:nv.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,e){return P.fromPromise(this.__createProject(i,e))}async __createProject(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:la.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 422:throw new ce(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,e={},t){return P.fromPromise(this.__getProjectById(i,e,t))}async __getProjectById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:qn.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,e={},t){return P.fromPromise(this.__deleteProjectById(i,e,t))}async __deleteProjectById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 K(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,e={},t){return P.fromPromise(this.__updateProject(i,e,t))}async __updateProject(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/projects/${_.encodePathParam(i)}`),method:"PATCH",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ca.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__deleteProjectsBatch(i,e))}async __deleteProjectsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(i,e))}async __findFeedbackScoreNamesByProjectIds(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:qz.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,e={},t){return P.fromPromise(this.__findTokenUsageNames(i,e,t))}async __findTokenUsageNames(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:oj.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,e,t){return P.fromPromise(this.__getProjectKpiCards(i,e,t))}async __getProjectKpiCards(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:aa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:zS.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 B(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,e={},t){return P.fromPromise(this.__getProjectMetrics(i,e,t))}async __getProjectMetrics(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/projects/${_.encodePathParam(i)}/metrics`),method:"POST",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:sa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:tv.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 B(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={},e){return P.fromPromise(this.__getProjectStats(i,e))}async __getProjectStats(i={},e){var d,f,g,h,y,w,A,C,I,D,N;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,v({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:T.Default,"v1/private/projects/stats"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(N=this._options)==null?void 0:N.fetch,logging:this._options.logging});if(u.ok)return {data:dv.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/projects/stats")}retrieveProject(i,e){return P.fromPromise(this.__retrieveProject(i,e))}async __retrieveProject(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:QT.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(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")}};});var $l,C4=n(()=>{X();Q();b();Y();Z();J();te();ie();$l=class{constructor(i={}){this._options=M(i);}getPrompts(i={},e){return P.fromPromise(this.__getPrompts(i,e))}async __getPrompts(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:es.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,e){return P.fromPromise(this.__createPrompt(i,e))}async __createPrompt(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__createPromptVersion(i,e))}async __createPromptVersion(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ye.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 B(o.error.body,o.rawResponse);case 409:throw new K(o.error.body,o.rawResponse);case 422:throw new ce(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,e){return P.fromPromise(this.__updatePromptVersions(i,e))}async __updatePromptVersions(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e={},t){return P.fromPromise(this.__getPromptById(i,e,t))}async __getPromptById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/prompts/${_.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:xl.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/{id}")}updatePrompt(i,e,t){return P.fromPromise(this.__updatePrompt(i,e,t))}async __updatePrompt(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.Default,`v1/private/prompts/${_.encodePathParam(i)}`),method:"PUT",headers:o,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:da.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(a.error.body,a.rawResponse);case 422:throw new ce(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,e={},t){return P.fromPromise(this.__deletePrompt(i,e,t))}async __deletePrompt(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e){return P.fromPromise(this.__deletePromptsBatch(i,e))}async __deletePromptsBatch(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getPromptByCommit(i,e,t))}async __getPromptByCommit(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xl.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 B(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new K(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,e={},t){return P.fromPromise(this.__getPromptVersionById(i,e,t))}async __getPromptVersionById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ye.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}")}getPromptVersions(i,e={},t){return P.fromPromise(this.__getPromptVersions(i,e,t))}async __getPromptVersions(i,e={},t){var f,g,h,y,w,A,C,I,D,N,F;let{page:o,size:a,search:s,sorting:c,filters:l}=e,m={page:o,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,v({"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:T.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:(N=t==null?void 0:t.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Dv.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,e){return P.fromPromise(this.__getPromptsByCommits(i,e))}async __getPromptsByCommits(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ga.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:oi.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,e,t={},o){return P.fromPromise(this.__restorePromptVersion(i,e,t,o))}async __restorePromptVersion(i,e,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,v({"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:T.Default,`v1/private/prompts/${_.encodePathParam(i)}/versions/${_.encodePathParam(e)}/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:Ye.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 B(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,e){return P.fromPromise(this.__retrievePromptVersion(i,e))}async __retrievePromptVersion(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ye.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 B(o.error.body,o.rawResponse);case 404:throw new U(o.error.body,o.rawResponse);case 422:throw new ce(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")}};});var Ql,I4=n(()=>{X();Q();b();Y();Z();J();ie();Ql=class{constructor(i={}){this._options=M(i);}datasetsRedirect(i,e){return P.fromPromise(this.__datasetsRedirect(i,e))}async __datasetsRedirect(i,e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__experimentsRedirect(i,e))}async __experimentsRedirect(i,e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__optimizationsRedirect(i,e))}async __optimizationsRedirect(i,e){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,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new B(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,e){return P.fromPromise(this.__projectsRedirect(i,e))}async __projectsRedirect(i,e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new B(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 Yl,D4=n(()=>{X();Q();b();Y();Z();J();te();ie();Yl=class{constructor(i={}){this._options=M(i);}findRetentionRules(i={},e){return P.fromPromise(this.__findRetentionRules(i,e))}async __findRetentionRules(i={},e){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,v({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:T.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Ov.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,e){return P.fromPromise(this.__createRetentionRule(i,e))}async __createRetentionRule(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ya.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:Ri.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,e={},t){return P.fromPromise(this.__getRetentionRuleById(i,e,t))}async __getRetentionRuleById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Ri.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,e={},t){return P.fromPromise(this.__deactivateRetentionRule(i,e,t))}async __deactivateRetentionRule(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 Xl,U4=n(()=>{X();Q();b();Y();Z();J();te();ie();Xl=class{constructor(i={}){this._options=M(i);}getJobLogs(i,e={},t){return P.fromPromise(this.__getJobLogs(i,e,t))}async __getJobLogs(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:o}=e,a={offset:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:lr.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,e,t){return P.fromPromise(this.__appendJobLogs(i,e,t))}async __appendJobLogs(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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 B(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,e={},t){return P.fromPromise(this.__cancelJob(i,e,t))}async __cancelJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__createBridgeCommand(i,e,t))}async __createBridgeCommand(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:xa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:G_.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 K(a.error.body,a.rawResponse);case 429:throw new sr(ue.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}/bridge/commands")}createJob(i,e){return P.fromPromise(this.__createJob(i,e))}async __createJob(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 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/local-runners/jobs")}getRunner(i,e={},t){return P.fromPromise(this.__getRunner(i,e,t))}async __getRunner(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:$n.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,e={},t){return P.fromPromise(this.__disconnectRunner(i,e,t))}async __disconnectRunner(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t={},o){return P.fromPromise(this.__getBridgeCommand(i,e,t,o))}async __getBridgeCommand(i,e,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,v({"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:T.Default,`v1/private/local-runners/${_.encodePathParam(i)}/bridge/commands/${_.encodePathParam(e)}`),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:M_.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,e={},t){return P.fromPromise(this.__getJob(i,e,t))}async __getJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:lt.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,e={},t){return P.fromPromise(this.__heartbeat(i,e,t))}async __heartbeat(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ka.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:CS.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 rt(ue.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,e={},t){return P.fromPromise(this.__listJobs(i,e,t))}async __listJobs(i,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:o,page:a,size:s}=e,c={project_id:o,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,v({"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:T.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:IS.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,e){return P.fromPromise(this.__listRunners(i,e))}async __listRunners(i,e){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?kc.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,v({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:T.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:DS.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,e={},t){return P.fromPromise(this.__nextBridgeCommands(i,e,t))}async __nextBridgeCommands(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:ba.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:H_.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,e={},t){return P.fromPromise(this.__nextJob(i,e,t))}async __nextJob(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:lr.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,e,t){return P.fromPromise(this.__patchChecklist(i,e,t))}async __patchChecklist(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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,e,t){return P.fromPromise(this.__registerAgents(i,e,t))}async __registerAgents(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:lr.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 B(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,e,t,o){return P.fromPromise(this.__reportBridgeResult(i,e,t,o))}async __reportBridgeResult(i,e,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,v({"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:T.Default,`v1/private/local-runners/${_.encodePathParam(i)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:o==null?void 0:o.queryParams,requestType:"json",body:Ra.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 K(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,e,t){return P.fromPromise(this.__reportJobResult(i,e,t))}async __reportJobResult(i,e,t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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:Aa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new B(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 Zl,N4=n(()=>{X();Q();b();Y();Z();J();te();Zl=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/toggles"),method:"GET",headers:e,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:Kv.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 ql,B4=n(()=>{X();Q();b();Y();Z();J();te();ie();ql=class{constructor(i={}){this._options=M(i);}addSpanComment(i,e,t){return P.fromPromise(this.__addSpanComment(i,e,t))}async __addSpanComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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,e,t){return P.fromPromise(this.__addSpanFeedbackScore(i,e,t))}async __addSpanFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Pe.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,e){return P.fromPromise(this.__createSpans(i,e))}async __createSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__batchUpdateSpans(i,e))}async __batchUpdateSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__getSpansByProject(i,e))}async __getSpansByProject(i={},e){var D,N,F,re,ae,we,Ee,Ce,He,Hi,Gi;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?vc.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,v({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(N=this._options)==null?void 0:N.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ae=(re=await x.get(this._options.baseUrl))!=null?re:await x.get(this._options.environment))!=null?ae:T.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ce=(Ee=e==null?void 0:e.timeoutInSeconds)!=null?Ee:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ce:60)*1e3,maxRetries:(Hi=e==null?void 0:e.maxRetries)!=null?Hi:(He=this._options)==null?void 0:He.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Gi=this._options)==null?void 0:Gi.fetch,logging:this._options.logging});if(I.ok)return {data:qv.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,e){return P.fromPromise(this.__createSpan(i,e))}async __createSpan(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===409?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/spans")}getSpanById(i,e={},t){return P.fromPromise(this.__getSpanById(i,e,t))}async __getSpanById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=e,a={strip_attachments:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:ts.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,e={},t){return P.fromPromise(this.__deleteSpanById(i,e,t))}async __deleteSpanById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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 nr(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,e,t){return P.fromPromise(this.__updateSpan(i,e,t))}async __updateSpan(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:za.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,e){return P.fromPromise(this.__deleteSpanComments(i,e))}async __deleteSpanComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(i,e,t))}async __deleteSpanFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Bn.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={},e){return P.fromPromise(this.__findFeedbackScoreNames1(i,e))}async __findFeedbackScoreNames1(i={},e){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?Sc.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,v({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:T.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Vr.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,e,t={},o){return P.fromPromise(this.__getSpanComment(i,e,t,o))}async __getSpanComment(i,e,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,v({"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:T.Default,`v1/private/spans/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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={},e){return P.fromPromise(this.__getSpanStats(i,e))}async __getSpanStats(i={},e){var h,y,w,A,C,I,D,N,F,re,ae;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?Tc.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,v({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:T.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((N=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?N:60)*1e3,maxRetries:(re=e==null?void 0:e.maxRetries)!=null?re:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ae=this._options)==null?void 0:ae.fetch,logging:this._options.logging});if(g.ok)return {data:Jr.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,e){return P.fromPromise(this.__scoreBatchOfSpans(i,e))}async __scoreBatchOfSpans(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__searchSpans(i,e))}async __searchSpans(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ea.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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")}updateSpanComment(i,e,t){return P.fromPromise(this.__updateSpanComment(i,e,t))}async __updateSpanComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/spans/comments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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 em,F4=n(()=>{X();Q();b();Y();Z();J();te();em=class{constructor(i={}){this._options=M(i);}getDatasetBiInfo(i){return P.fromPromise(this.__getDatasetBiInfo(i))}async __getDatasetBiInfo(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,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:gi.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")}getSpansCountForWorkspaces(i){return P.fromPromise(this.__getSpansCountForWorkspaces(i))}async __getSpansCountForWorkspaces(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,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:tj.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,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:gi.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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,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:sj.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 rm,M4=n(()=>{X();Q();b();Y();Z();J();te();ie();rm=class{constructor(i={}){this._options=M(i);}addThreadComment(i,e,t){return P.fromPromise(this.__addThreadComment(i,e,t))}async __addThreadComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:fe.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,e,t){return P.fromPromise(this.__addTraceComment(i,e,t))}async __addTraceComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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,e,t){return P.fromPromise(this.__addTraceFeedbackScore(i,e,t))}async __addTraceFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Pe.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,e){return P.fromPromise(this.__createTraces(i,e))}async __createTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__batchUpdateTraces(i,e))}async __batchUpdateTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Na.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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,e){return P.fromPromise(this.__batchUpdateThreads(i,e))}async __batchUpdateThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Va.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:void 0,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__closeTraceThread(i,e))}async __closeTraceThread(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__getTracesByProject(i,e))}async __getTracesByProject(i={},e){var C,I,D,N,F,re,ae,we,Ee,Ce,He;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}=i,y={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()},w=z((C=this._options)==null?void 0:C.headers,v({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((F=(N=await x.get(this._options.baseUrl))!=null?N:await x.get(this._options.environment))!=null?F:T.Default,"v1/private/traces"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ae=e==null?void 0:e.timeoutInSeconds)!=null?ae:(re=this._options)==null?void 0:re.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(He=this._options)==null?void 0:He.fetch,logging:this._options.logging});if(A.ok)return {data:uj.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces")}createTrace(i,e){return P.fromPromise(this.__createTrace(i,e))}async __createTrace(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e={},t){return P.fromPromise(this.__getTraceById(i,e,t))}async __getTraceById(i,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:o}=e,a={strip_attachments:o},s=z((l=this._options)==null?void 0:l.headers,v({"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:T.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:is.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,e={},t){return P.fromPromise(this.__deleteTraceById(i,e,t))}async __deleteTraceById(i,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let o=z((s=this._options)==null?void 0:s.headers,v({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:T.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,e,t){return P.fromPromise(this.__updateTrace(i,e,t))}async __updateTrace(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ua.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,e){return P.fromPromise(this.__deleteThreadComments(i,e))}async __deleteThreadComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteThreadFeedbackScores(i,e))}async __deleteThreadFeedbackScores(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ca.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteTraceComments(i,e))}async __deleteTraceComments(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(i,e,t))}async __deleteTraceFeedbackScore(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:Bn.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,e){return P.fromPromise(this.__deleteTraceThreads(i,e))}async __deleteTraceThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ia.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__deleteTraces(i,e))}async __deleteTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:me.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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/delete")}findFeedbackScoreNames2(i={},e){return P.fromPromise(this.__findFeedbackScoreNames2(i,e))}async __findFeedbackScoreNames2(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vr.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={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(i,e))}async __findTraceThreadsFeedbackScoreNames(i={},e){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,v({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:T.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...o,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Vr.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={},e){return P.fromPromise(this.__getTraceStats(i,e))}async __getTraceStats(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Jr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(i,e,t={},o){return P.fromPromise(this.__getThreadComment(i,e,t,o))}async __getThreadComment(i,e,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,v({"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:T.Default,`v1/private/traces/threads/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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={},e){return P.fromPromise(this.__getTraceThreadStats(i,e))}async __getTraceThreadStats(i={},e){var f,g,h,y,w,A,C,I,D,N,F;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,v({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:T.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(N=e==null?void 0:e.maxRetries)!=null?N:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(d.ok)return {data:Jr.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,e,t={},o){return P.fromPromise(this.__getTraceComment(i,e,t,o))}async __getTraceComment(i,e,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,v({"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:T.Default,`v1/private/traces/${_.encodePathParam(i)}/comments/${_.encodePathParam(e)}`),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")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,e){return P.fromPromise(this.__getTraceThread(i,e))}async __getTraceThread(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_l.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:os.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={},e){return P.fromPromise(this.__getTraceThreads(i,e))}async __getTraceThreads(i={},e){var A,C,I,D,N,F,re,ae,we,Ee,Ce;let{page:t,size:o,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g}=i,h={page:t,size:o,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString()},y=z((A=this._options)==null?void 0:A.headers,v({"Comet-Workspace":(I=e==null?void 0:e.workspaceName)!=null?I:(C=this._options)==null?void 0:C.workspaceName}),e==null?void 0:e.headers),w=await S({url:_.join((N=(D=await x.get(this._options.baseUrl))!=null?D:await x.get(this._options.environment))!=null?N:T.Default,"v1/private/traces/threads"),method:"GET",headers:y,queryParameters:{...h,...e==null?void 0:e.queryParams},timeoutMs:((ae=(re=e==null?void 0:e.timeoutInSeconds)!=null?re:(F=this._options)==null?void 0:F.timeoutInSeconds)!=null?ae:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(we=this._options)==null?void 0:we.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(w.ok)return {data:yj.parseOrThrow(w.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:w.rawResponse};if(w.error.reason==="status-code")throw new k({statusCode:w.error.statusCode,body:w.error.body,rawResponse:w.rawResponse});return j(w.error,w.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(i,e){return P.fromPromise(this.__openTraceThread(i,e))}async __openTraceThread(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_l.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__scoreBatchOfThreads(i,e))}async __scoreBatchOfThreads(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Da.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,e){return P.fromPromise(this.__scoreBatchOfTraces(i,e))}async __scoreBatchOfTraces(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Kn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},e){return P.fromPromise(this.__searchTraceThreads(i,e))}async __searchTraceThreads(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ja.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")throw o.error.statusCode===400?new B(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={},e){return P.fromPromise(this.__searchTraces(i,e))}async __searchTraces(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ma.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:o.body,rawResponse:o.rawResponse};if(o.error.reason==="status-code")switch(o.error.statusCode){case 400:throw new B(o.error.body,o.rawResponse);case 401:throw new $(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")}updateThread(i,e,t){return P.fromPromise(this.__updateThread(i,e,t))}async __updateThread(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/threads/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:La.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,e,t){return P.fromPromise(this.__updateThreadComment(i,e,t))}async __updateThreadComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.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:fe.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,e,t){return P.fromPromise(this.__updateTraceComment(i,e,t))}async __updateTraceComment(i,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:o}=e,a=z((c=this._options)==null?void 0:c.headers,v({"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:T.Default,`v1/private/traces/comments/${_.encodePathParam(i)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:fe.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 tm,W4=n(()=>{X();Q();b();Y();Z();J();te();tm=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,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/welcome-wizard")}submitWelcomeWizard(i={},e){return P.fromPromise(this.__submitWelcomeWizard(i,e))}async __submitWelcomeWizard(i={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 im,L4=n(()=>{X();Q();b();Y();Z();J();te();ie();im=class{constructor(i={}){this._options=M(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,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:Pj.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 B(t.error.body,t.rawResponse);case 401:throw new $(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 om,V4=n(()=>{X();Q();b();Y();Z();J();te();ie();om=class{constructor(i={}){this._options=M(i);}costsSummary(i,e){return P.fromPromise(this.__costsSummary(i,e))}async __costsSummary(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:At.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 B(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,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:as.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,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(i,e))}async __upsertWorkspaceConfiguration(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:as.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 B(o.error.body,o.rawResponse);case 422:throw new ce(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,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,e){return P.fromPromise(this.__getCost(i,e))}async __getCost(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kl.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 B(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,e){return P.fromPromise(this.__getMetric(i,e))}async __getMetric(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kl.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 B(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")}getWorkspaceVersion(i){return P.fromPromise(this.__getWorkspaceVersion(i))}async __getWorkspaceVersion(i){var o,a,s,c,l,m,u,d,f,g,h;let e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"v1/private/workspaces/versions"),method:"GET",headers:e,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:Tj.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/workspaces/versions")}metricsSummary(i,e){return P.fromPromise(this.__metricsSummary(i,e))}async __metricsSummary(i,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,v({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),o=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:T.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(o.ok)return {data:kj.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 B(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 ns,J4=n(()=>{p4();c4();l4();m4();d4();u4();g4();f4();h4();y4();b4();R4();x4();w4();_4();k4();A4();P4();z4();S4();T4();v4();j4();E4();C4();I4();D4();U4();N4();B4();F4();M4();W4();L4();V4();X();Q();b();Y();Z();J();ns=class{constructor(i={}){this._options=M(i);}get systemUsage(){var i;return (i=this._systemUsage)!=null?i:this._systemUsage=new em(this._options)}get agentConfigs(){var i;return (i=this._agentConfigs)!=null?i:this._agentConfigs=new Al(this._options)}get alerts(){var i;return (i=this._alerts)!=null?i:this._alerts=new Pl(this._options)}get annotationQueues(){var i;return (i=this._annotationQueues)!=null?i:this._annotationQueues=new zl(this._options)}get assertionResults(){var i;return (i=this._assertionResults)!=null?i:this._assertionResults=new Sl(this._options)}get attachments(){var i;return (i=this._attachments)!=null?i:this._attachments=new Tl(this._options)}get check(){var i;return (i=this._check)!=null?i:this._check=new El(this._options)}get automationRuleEvaluators(){var i;return (i=this._automationRuleEvaluators)!=null?i:this._automationRuleEvaluators=new vl(this._options)}get chatCompletions(){var i;return (i=this._chatCompletions)!=null?i:this._chatCompletions=new jl(this._options)}get dashboards(){var i;return (i=this._dashboards)!=null?i:this._dashboards=new Cl(this._options)}get datasets(){var i;return (i=this._datasets)!=null?i:this._datasets=new Il(this._options)}get environments(){var i;return (i=this._environments)!=null?i:this._environments=new Dl(this._options)}get experiments(){var i;return (i=this._experiments)!=null?i:this._experiments=new Ul(this._options)}get feedbackDefinitions(){var i;return (i=this._feedbackDefinitions)!=null?i:this._feedbackDefinitions=new Nl(this._options)}get guardrails(){var i;return (i=this._guardrails)!=null?i:this._guardrails=new Bl(this._options)}get insightsViews(){var i;return (i=this._insightsViews)!=null?i:this._insightsViews=new Fl(this._options)}get llmModels(){var i;return (i=this._llmModels)!=null?i:this._llmModels=new Ml(this._options)}get llmProviderKey(){var i;return (i=this._llmProviderKey)!=null?i:this._llmProviderKey=new Wl(this._options)}get runners(){var i;return (i=this._runners)!=null?i:this._runners=new Xl(this._options)}get manualEvaluation(){var i;return (i=this._manualEvaluation)!=null?i:this._manualEvaluation=new Ll(this._options)}get ollama(){var i;return (i=this._ollama)!=null?i:this._ollama=new Vl(this._options)}get ollieState(){var i;return (i=this._ollieState)!=null?i:this._ollieState=new Jl(this._options)}get openTelemetryIngestion(){var i;return (i=this._openTelemetryIngestion)!=null?i:this._openTelemetryIngestion=new Hl(this._options)}get optimizations(){var i;return (i=this._optimizations)!=null?i:this._optimizations=new Gl(this._options)}get pairing(){var i;return (i=this._pairing)!=null?i:this._pairing=new Ol(this._options)}get projects(){var i;return (i=this._projects)!=null?i:this._projects=new Kl(this._options)}get prompts(){var i;return (i=this._prompts)!=null?i:this._prompts=new $l(this._options)}get retentionRules(){var i;return (i=this._retentionRules)!=null?i:this._retentionRules=new Yl(this._options)}get serviceToggles(){var i;return (i=this._serviceToggles)!=null?i:this._serviceToggles=new Zl(this._options)}get spans(){var i;return (i=this._spans)!=null?i:this._spans=new ql(this._options)}get traces(){var i;return (i=this._traces)!=null?i:this._traces=new rm(this._options)}get welcomeWizard(){var i;return (i=this._welcomeWizard)!=null?i:this._welcomeWizard=new tm(this._options)}get workspacePermissions(){var i;return (i=this._workspacePermissions)!=null?i:this._workspacePermissions=new im(this._options)}get workspaces(){var i;return (i=this._workspaces)!=null?i:this._workspaces=new om(this._options)}get redirect(){var i;return (i=this._redirect)!=null?i:this._redirect=new Ql(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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"is-alive/ping"),method:"GET",headers:e,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 e=z((o=this._options)==null?void 0:o.headers,v({"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:T.Default,"is-alive/ver"),method:"GET",headers:e,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 H4=n(()=>{});var G4,O4=n(()=>{op();(e=>(e.LogLevel=Fe,e.ConsoleLogger=tt))(G4||(G4={}));});var K4=n(()=>{H4();O4();});var $4=n(()=>{K4();});var Pt=n(()=>{ie();J4();Y();J();$4();te();});var ge,qe=n(()=>{ge=()=>v7();});var wi,vj=n(()=>{wi=class{static serializePromptToInfoDict(i){return {name:i.name,...i.id&&{id:i.id},version:{...i.versionId&&{id:i.versionId},...i.commit&&{commit:i.commit},template:i.prompt}}}static normalizeMetadata(i){if(!i)return {};if(typeof i=="object"&&!Array.isArray(i))return i;if(typeof i=="string")try{let e=JSON.parse(i);if(typeof e=="object"&&!Array.isArray(e))return e}catch{}return {}}static mergePromptsIntoMetadata(i,e,t){let o=t.map(c=>this.serializePromptToInfoDict(c)),a=this.normalizeMetadata(i),s=this.normalizeMetadata(e);return {...a,...s,opik_prompts:o}}static processUpdate(i,e){let{prompts:t,...o}=i;if(!t||t.length===0){if(o.metadata&&e){let a=this.normalizeMetadata(e),s=this.normalizeMetadata(o.metadata);return {...o,metadata:{...a,...s}}}return o}return {...o,metadata:this.mergePromptsIntoMetadata(e,o.metadata,t)}}static processTraceUpdate(i,e){return this.processUpdate(i,e)}static processSpanUpdate(i,e){return this.processUpdate(i,e)}};});var am,Q4=n(()=>{qe();vj();am=class p{constructor(i,e){this.data=i;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.spanFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=i=>{var o;let e=wi.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,...e};return this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=i=>{var a;let e=(a=this.data.projectName)!=null?a:this.opik.config.projectName,t={id:ge(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id};this.opik.spanBatchQueue.create(t);let o=new p(t,this.opik);return this.childSpans.push(o),o};}};});var nm,Y4=n(()=>{qe();Q4();vj();nm=class{constructor(i,e){this.data=i;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=i=>{var e;this.opik.traceFeedbackScoresBatchQueue.create({...i,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=i=>{var a,s;let e=(s=(a=this.data.projectName)!=null?a:i.projectName)!=null?s:this.opik.config.projectName,t={id:ge(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id};this.opik.spanBatchQueue.create(t);let o=new am(t,this.opik);return this.spans.push(o),o};this.update=i=>{var o;let e=wi.processTraceUpdate(i,this.data.metadata),t={projectName:(o=this.data.projectName)!=null?o:this.opik.config.projectName,...e};return this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var X4,ss,L8,V8,Z4,q4,e6,r6,jj=n(()=>{X4={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"},ss={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},L8=p=>Object.entries(p).map(([i,e])=>`${i}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),V8=p=>p.replace(/\/api\/?$/,""),Z4=p=>Buffer.from(p).toString("base64"),q4=(p,i,e)=>{let t=L8(e),o=V8(p),a=o.endsWith("/")?o:`${o}/`,s=i.startsWith("/")?i.slice(1):i;return `${a}${s}?${t}`},e6=({datasetId:p,experimentId:i,baseUrl:e})=>q4(e,X4.EXPERIMENTS,{[ss.EXPERIMENT_ID]:i,[ss.DATASET_ID]:p,[ss.PATH]:Z4(e)}),r6=(p,i)=>q4(i,X4.PROJECTS,{[ss.TRACE_ID]:p,[ss.PATH]:Z4(i)});});var J8,sm,ps,De,zt=n(()=>{q();J8=300,sm=100,ps=class{constructor({action:i,batchSize:e=sm,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,e)=>{if(this.queue.set(i,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(i,e)=>{let t=this.queue.get(i);t&&(this.queue.set(i,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let i=new Map(this.queue);this.queue.clear(),E.debug(`Adding ${i.size} items to ${this.name} promise:`,i),this.promise=this.promise.finally(()=>(E.debug(`Flushing ${this.name}:`,i),this.action(i))).catch(e=>{E.error(`Failed to flush ${this.name}:`,e,i);}),await this.promise;};this.action=i,this.batchSize=e,this.delay=t,this.enableBatch=o,this.name=a;}},De=class{constructor({delay:i=J8,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:o=true,createBatchSize:a=sm,updateBatchSize:s=sm,deleteBatchSize:c=sm,name:l="BatchQueue"}={}){this.create=i=>{let e=this.getId(i);this.createQueue.add(e,i);};this.get=async i=>{let e=this.createQueue.queue.get(i);return e||this.getEntity(i)};this.update=(i,e)=>{if(this.createQueue.queue.get(i)){this.createQueue.update(i,e);return}let o=this.updateQueue.queue.get(i);this.updateQueue.add(i,{...o,...e});};this.delete=i=>{if(this.createQueue.queue.has(i)){this.createQueue.queue.delete(i);return}this.deleteQueue.add(i);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new ps({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:i,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new ps({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 ps({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 H8,pm,t6=n(()=>{Ws();q();zt();H8="suite_assertion",pm=class extends De{constructor(e,t,o="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${o}`});this.api=e;this.entityType=o;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,E.warn('Opik backend does not support PUT /v1/private/assertion-results yet \u2014 falling back to the legacy feedback-scores path with categoryName="suite_assertion". Upgrade the Opik backend to a version that includes OPIK-6048 to enable native assertion-results ingestion.'),await this.writeViaLegacyFeedbackScores(e);return}throw t}}async writeViaLegacyFeedbackScores(e){let t=e.map(o=>({id:o.entityId,name:o.name,value:o.status==="passed"?1:0,categoryName:H8,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 cm,i6=n(()=>{zt();cm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.spans.createSpans({spans:e},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){await this.api.spans.updateSpan(e,{body:t},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var lm,o6=n(()=>{zt();lm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var mm,a6=n(()=>{zt();mm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;}getId(e){return e.id}async createEntities(e){await this.api.traces.createTraces({traces:e},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){await this.api.traces.updateTrace(e,{body:t},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var dm,n6=n(()=>{zt();dm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var um,s6=n(()=>{Pt();um=class extends ns{constructor(e){var o;let t={...e==null?void 0:e.headers,...(o=e==null?void 0:e.requestOptions)==null?void 0:o.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var gm,p6=n(()=>{zt();gm=class extends De{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function c6(){return Ej||(Ej=await G8()),Ej}var Ej,l6=n(()=>{Ej=null;});var _i,fm=n(()=>{ie();qe();l6();_i=class p{constructor(i,e){let{id:t,traceId:o,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=i;this.id=t||ge(),this.traceId=o,this.spanId=a,this.source=s||Wu.Sdk,this.description=c!=null?c:e,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 e=O8(i);return (await c6()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(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 dr(p,i,e){var c;if(e===0)return [];let t=new TextDecoder("utf-8"),o=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
4
4
  `);a=(c=d.pop())!=null?c:"";for(let f of d)if(!(!f.trim()||f==="{}"||f==="[]"||f==="null"))try{let g=JSON.parse(f),h=i.parse(g,{unrecognizedObjectKeys:"strip"});if(h.ok){if(o.push(h.value),e!==void 0&&o.length>=e)return s.releaseLock(),o}else E.error("Error parsing experiment item:",h.errors);}catch(g){E.error("Error parsing JSON line:",g instanceof Error?g.message:String(g));}}if(a.trim()&&a!=="{}"&&a!=="[]"&&a!=="null")try{let l=JSON.parse(a),m=i.parse(l,{unrecognizedObjectKeys:"strip"});m.ok?o.push(m.value):E.error("Error parsing experiment item:",m.errors);}catch(l){E.error("Error parsing remaining buffer:",l instanceof Error?l.message:String(l));}}catch(l){E.error("Error processing stream:",l instanceof Error?l.message:String(l));}finally{s.releaseLock();}return o}function er(p,i){let e=[];for(let t=0;t<p.length;t+=i.maxBatchSize)e.push(p.slice(t,t+i.maxBatchSize));return e}var Hr=n(()=>{q();});async function ki(p,i){let{datasetName:e,projectName:t,datasetVersion:o,nbSamples:a,lastRetrievedId:s}=i;if(a===0)return [];let c=[],l=a,m=s;for(;;){let u=Math.min(l!=null?l:m6,m6),d=await p.api.datasets.streamDatasetItems({datasetName:e,projectName:t,lastRetrievedId:m,steamLimit:u,datasetVersion:o}),f=await dr(d,O.DatasetItemPublic,u);if(f.length===0)break;let g=f.map(h=>_i.fromApiModel(h));if(c.push(...g),m=f[f.length-1].id,l!==void 0&&(l-=f.length,l<=0)||f.length<u)break}return c}var m6,Cj=n(()=>{fm();Hr();Pt();m6=2e3;});var cs,hm=n(()=>{Cj();cs=class{constructor(i,e,t,o){this.datasetName=i,this.datasetId=e,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,e){return (await ki(this.opik,{datasetName:this.datasetName,datasetVersion:this.versionInfo.versionHash,nbSamples:i,lastRetrievedId:e})).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 O8(t)}};});var ke,St=n(()=>{q();ke=class extends Error{constructor(i){var e;super(i.message),this.name=this.constructor.name,this.code=i.code,this.statusCode=i.statusCode,this.details=i.details,this.originalError=i.originalError,E.error(this.message),(e=Error.captureStackTrace)==null||e.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};});var d6=n(()=>{});var Ij,Dj=n(()=>{Ij={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 u6,ym,ls,Uj=n(()=>{Dj();St();u6={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID",DATASET_VERSION_NOT_FOUND:"DATASET_VERSION_NOT_FOUND"},ym=class extends ke{constructor(i){super({message:Ij.DATASET_ITEM_MISSING_ID(i),code:u6.DATASET_ITEM_MISSING_ID});}},ls=class extends ke{constructor(i,e){super({message:Ij.DATASET_VERSION_NOT_FOUND(i,e),code:u6.DATASET_VERSION_NOT_FOUND});}};});var g6=n(()=>{Dj();Uj();});var Q8,bm,f6=n(()=>{St();Q8={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},bm=class extends ke{constructor(i){super({message:i,code:Q8.SEARCH_TIMEOUT});}};});var h6=n(()=>{});var y6=n(()=>{f6();h6();});var Rm,xm,Ai,ms=n(()=>{Rm=class extends Error{constructor(i){super(i),this.name="AnnotationQueueError";}},xm=class extends Rm{constructor(i){super(`Annotation queue with ID '${i}' not found`),this.name="AnnotationQueueNotFoundError";}},Ai=class extends Rm{constructor(i,e){let t=e!==void 0?` at index ${e}`:"";super(`${i} object${t} has no ID`),this.name="AnnotationQueueItemMissingIdError";}};});var Tr,Pi,wm=n(()=>{St();Tr=class extends ke{constructor(i){super({message:i,code:"CONFIG_NOT_FOUND"}),this.name="ConfigNotFoundError";}},Pi=class extends ke{constructor(i){super({message:i,code:"CONFIG_MISMATCH"}),this.name="ConfigMismatchError";}};});var Nj=n(()=>{St();d6();g6();y6();ms();wm();});var _m,b6=n(()=>{_m={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 Bj,km,Am,Pm,R6=n(()=>{St();b6();Bj={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},km=class extends ke{constructor(i){let e=i instanceof Error?i:new Error(String(i));super({message:_m.JSON_PARSE_ERROR,code:Bj.JSON_PARSE_ERROR,originalError:e});}},Am=class extends ke{constructor(i){super({message:_m.JSON_NOT_ARRAY(i),code:Bj.JSON_NOT_ARRAY});}},Pm=class extends ke{constructor(i,e){super({message:_m.JSON_ITEM_NOT_OBJECT(i,e),code:Bj.JSON_ITEM_NOT_OBJECT});}};});var ur,zm=n(()=>{qe();fm();hm();Cj();Hr();q();Nj();R6();J();ur=class{constructor({name:i,description:e,id:t,projectName:o},a){this.opik=a;this.idToHash=new Map;this.hashes=new Set;this.id=t||ge(),this.name=i,this.description=e,this.projectName=o;}async insert(i){if(!i||i.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(i),t=er(e,{maxBatchSize:1e3}),o=ge();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,E.info(`Inserted ${Math.min(a,e.length)} of ${e.length} items into dataset ${this.id}`);}catch(a){throw E.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 e=0;e<i.length;e++)if(!i[e].id)throw new ym(e);await this.insert(i);}}async delete(i){if(!i||i.length===0){E.info("No item IDs provided for deletion");return}let e=er(i,{maxBatchSize:100}),t=ge();for await(let o of e){E.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 e=(await this.getItems()).map(t=>t.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getTags(){var e;return (e=(await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName})).tags)!=null?e:[]}async getItemsCount(){if(this.cachedItemsCount===void 0){let i=await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName});this.cachedItemsCount=i.datasetItemsCount;}return this.cachedItemsCount}async getItems(i,e){return (await ki(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:i,lastRetrievedId:e})).map(o=>o.getContent(true))}async getRawItems(i,e){return ki(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:i,lastRetrievedId:e})}async insertFromJson(i,e={},t=[]){let o;try{o=JSON.parse(i);}catch(s){throw new km(s)}if(!Array.isArray(o))throw new Am(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 Pm(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=e[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 O8(t)}async getDeduplicatedItems(i){let e=[];for(let t of i){let o=new _i(t),a=await o.contentHash();if(this.hashes.has(a)){E.debug("Duplicate item found - skipping",{contentHash:a,datasetId:this.id});continue}e.push(o.toApiModel()),this.hashes.add(a),this.idToHash.set(o.id,a);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){E.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let i=await ki(this.opik,{datasetName:this.name,projectName:this.projectName});this.clearHashState();for(let e of i){let t=await e.contentHash();this.idToHash.set(e.id,t),this.hashes.add(t);}E.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:i.length});}catch(i){if(i instanceof k&&i.statusCode===404){E.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw i}}async getVersionView(i){let e=await this.findVersionByName(i);if(!e)throw new ls(i,this.name);return new cs(this.name,this.id,e,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(e){if(e instanceof k&&e.statusCode===404)return;throw e}}async findVersionByName(i){try{return await this.opik.api.datasets.retrieveDatasetVersion(this.id,{versionName:i})}catch(e){if(e instanceof k&&e.statusCode===404)return;throw e}}};});var Fj,Tt,x6=n(()=>{Fj=class extends Error{constructor(i){super(i),this.name="DatasetError";}},Tt=class extends Fj{constructor(i){super(`Dataset with name '${i}' not found`),this.name="DatasetNotFoundError";}};});var Mj=n(()=>{zm();fm();hm();x6();});var Sm,Tm,Wj=n(()=>{Sm=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;}},Tm=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 e=(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:e})}};});var vr,vm=n(()=>{qe();Wj();Hr();q();Pt();jj();Ms();vr=class{constructor({id:i,name:e,datasetName:t,prompts:o,tags:a,projectName:s},c){this.opik=c;this.id=i||ge(),this._name=e,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 e=i.map(o=>({id:ge(),experimentId:this.id,datasetItemId:o.datasetItemId,traceId:o.traceId,projectName:o.projectName})),t=er(e,{maxBatchSize:50});try{for(let o of t)await this.opik.api.experiments.createExperimentItems({experimentItems:o});E.debug(`Inserted ${i.length} items into experiment ${this.id}`);}catch(o){throw E.error(`Error inserting items into experiment: ${o instanceof Error?o.message:String(o)}`),o}}async getItems(i){let e=[],{maxResults:o,truncate:a=false}=i||{},s,c=true;try{for(;c&&!(o!==void 0&&e.length>=o);){let l=o?Math.min(o-e.length,2e3):2e3,m=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:l,lastRetrievedId:s,truncate:a});try{let u=await dr(m,O.ExperimentItemCompare,l);if(u.length===0){c=!1;break}for(let d of u){let f=Tm.fromRestExperimentItemCompare(d);if(e.push(f),o!==void 0&&e.length>=o){c=!1;break}}s=u[u.length-1].id;}catch(u){E.error("Error parsing experiment item: "+(u instanceof Error?u.message:String(u))),c=!1;break}}}catch(l){throw E.error("Error retrieving experiment items: "+(l instanceof Error?l.message:String(l))),l}return E.info(`Retrieved ${e.length} items${o?` (limited by maxResults=${o})`:""}`),e}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),e=this.opik.config.apiUrl||Qi.apiUrl;return e6({datasetId:i.id,experimentId:this.id,baseUrl:e})}};});var jm,Lj=n(()=>{vm();jm=class extends vr{constructor(i,e){super(i,e),this.passRate=i.passRate,this.passedCount=i.passedCount,this.totalCount=i.totalCount,this.assertionScores=i.assertionScores;}};});var Em,Vj=n(()=>{Em={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: {...} })
@@ -19,7 +19,7 @@ ${s}`),s}isChatPrompt(i){try{let e=JSON.parse(i);return Array.isArray(e)&&e.leng
19
19
  `),(l[u].length>0||u<l.length-1)&&(m+=dZ()+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 R2(){var p;pE||(b2=typeof((p=process.stdout)==null?void 0:p.isTTY)=="boolean"&&process.stdout.isTTY,pE=process.stdout.write.bind(process.stdout),f2=process.stderr.write.bind(process.stderr),process.stdout.write=y2(pE,"stdout"),process.stderr.write=y2(f2,"stderr"));}function x2(p){var e;let i=(e=$m.get(p))!=null?e:[];return $m.delete(p),i}var nE,sE,g2,pE,f2,h2,b2,$m,lE=n(()=>{Lm();nE=[245,166,35],sE=[224,62,45],g2=20,pE=null,f2=null,h2=0,b2=false,$m=new Map;});function fZ(p,i){if(p==null)return p;switch(i){case "boolean":return typeof p=="boolean"?p:Di(String(p),"boolean");case "float":case "integer":{if(typeof p=="number")return p;let e=Di(String(p),"float");if(typeof e=="number"&&Number.isNaN(e))throw new TypeError(`Cannot cast "${p}" to number`);return i==="integer"?Math.trunc(e):e}default:return typeof p=="string"?p:Array.isArray(p)||typeof p=="object"&&p!==null?JSON.stringify(p):String(p)}}var uZ,gZ,w2,Qm,As,_2=n(()=>{Ws();Ed();Hm();ks();aE();q();qe();Vm();Lm();lE();uZ=500,gZ=3e5,w2=1e4,Qm=class{constructor(i,e,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=e,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(e=>{E.debug("Heartbeat tick error",{error:e});});},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(e){if(e instanceof rt){E.info("Runner deregistered (410), shutting down"),this.shutdown();return}E.debug("Heartbeat error",{error:e});}}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(uZ,t);return}this.spawnJob(o);}catch(o){if(this.pollFailures++,this.pollFailures===1){let s=o instanceof k?o.statusCode:void 0;E.warn("Unable to reach Opik server"+(s?` (API ${s})`:"")+". Retrying...",{error:o});}else E.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?E.warn("Unable to reach Opik server. Retrying...",{error:t}):E.debug("Poll tick error",{error:t}),this.scheduleNextPoll(this.jitteredBackoff(i),Math.min(i*2,this.backoffCapMs));});}scheduleNextPoll(i,e){if(this.shutdownRequested)return;let t=setTimeout(()=>this.pollTick(e),i);t.unref(),this.pollTimer=t;}spawnJob(i){let e=this.executeJob(i).finally(()=>{this.activeTasks.delete(e);});this.activeTasks.add(e);}async executeJob(i){var s,c;let e=(s=i.id)!=null?s:"",t=(c=i.agentName)!=null?c:"";if(this.cancelledJobs.has(e)){E.debug(`Skipping cancelled job ${e}`),this.cancelledJobs.delete(e);return}if(!Ui().get(t)){E.error(`Unknown agent '${t}' for job ${e}`),await this.reportJobResult(e,{status:"failed",error:`Unknown agent: ${t}`,traceId:i.traceId});return}let a=ge();await this.reportJobResult(e,{status:"running",traceId:a});try{let l=await this.invokeAgent(i,e,a);await Gm().catch(m=>{E.debug("Flush error after job execution",{error:m});}),await this.sendJobLogs(e),await this.reportJobResult(e,{status:"completed",result:this.normalizeResult(l),traceId:a});}catch(l){await Gm().catch(()=>{}),await this.sendJobLogs(e);let m=i.timeout,u=l instanceof As?`Job timed out after ${m}s`:l instanceof Error?`${l.name}: ${l.message}`:String(l);l instanceof As?E.warn(`Job ${e} timed out after ${m}s`):E.error(`Job ${e} failed: ${u}`),await this.reportJobResult(e,{status:"failed",error:u,traceId:a});}}async invokeAgent(i,e,t){var g,h;let o=(g=i.agentName)!=null?g:"",a=(h=i.inputs)!=null?h:{},s=i.maskId,c=i.blueprintName,l=Ui().get(o),m=l.params.map(y=>{let w=a[y.name];if(!(y.presence===Lt.Optional&&w===void 0&&!(y.name in a)))return fZ(w,y.type)}),u=()=>s2({traceId:t,jobId:e},()=>s||c?Jm({blueprintName:c,maskId:s},()=>l.func(...m)):l.func(...m)),d=Promise.resolve(u()),f=i.timeout;return f&&f>0?Promise.race([d,new Promise((y,w)=>{setTimeout(()=>w(new As("Job timed out")),f*1e3).unref();})]):d}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,e){try{await this.api.runners.reportJobResult(i,e);}catch(t){E.warn(`Failed to report result for job ${i}`,{error:t});}}async sendJobLogs(i){let e=x2(i);if(e.length!==0)try{await this.api.runners.appendJobLogs(i,{body:e});}catch{E.debug(`Failed to send logs for job ${i}`);}}pruneCancelledJobs(i){let e=i-gZ;for(let[t,o]of this.cancelledJobs)o<=e&&this.cancelledJobs.delete(t);if(this.cancelledJobs.size>w2){let t=[...this.cancelledJobs.entries()].sort((a,s)=>a[1]-s[1]),o=t.length-w2;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)}};As=class extends Error{constructor(i){super(i),this.name="TimeoutError";}};});function mE(){process.env.OPIK_RUNNER_MODE==="true"&&(k2||(k2=true,hZ().catch(p=>{E.error("Runner activation failed",{error:p});})));}async function hZ(){var m,u;let p=(m=process.env.OPIK_RUNNER_ID)!=null?m:"",i=(u=process.env.OPIK_PROJECT_NAME)!=null?u:"";if(!p){E.error("OPIK_RUNNER_ID not set, cannot activate runner");return}yZ(p,i),R2();let e=new hr,t=e.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=Ui(),g={};for(let[h,y]of f)g[h]=o(y);t.runners.registerAgents(p,{body:g}).catch(h=>{E.debug("Failed to sync agents after new registration",{error:h});});}await new Promise(d=>setImmediate(d));let s=Ui();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{E.debug("Failed to register agents on startup");}}m2(a),E.info("Runner activated");let c=new Qm(t,p);c.start();let l=()=>{A2=true,E.info("Received shutdown signal, stopping runner..."),c.shutdown(),e.flush().catch(()=>{}).finally(()=>process.exit(0));};process.once("SIGTERM",l),process.once("SIGINT",l),process.on("exit",()=>{A2||console.error(`
20
20
  Warning: The process exited without blocking. The runner needs the process to stay alive to process jobs.
21
21
  Use a server framework like express or fastify to keep the process running.
22
- `);});}function yZ(p,i){let e=[" \u2800\u20DD","opik ",`runner: ${p}`];i&&e.push(` project: ${i}`),console.log(e.join("")),console.log();}var k2,A2,dE=n(()=>{q();zi();Vm();_2();lE();k2=false,A2=false;});function xZ(p){return !!p&&(typeof p=="object"||typeof p=="function")&&typeof p.then=="function"}function wZ({name:p,parentSpan:i,projectName:e,trace:t,type:o="llm"}){E.debug("Creating new span:",{name:p,parentSpan:i==null?void 0:i.data.id,projectName:e,type:o});let a=t;if(!a){let c=n2();a=Om().trace({name:p,projectName:e,...c?{id:c}:{}});}let s=a.span({name:p,parentSpanId:i==null?void 0:i.data.id,projectName:e,type:o});return E.debug("Span created with ID:",s.data.id),{span:s,trace:a}}function _Z({args:p,span:i,trace:e}){if(E.debug("Starting span execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id}),p.length===0)return;let t={arguments:p};E.debug("Recording span input"),i.update({input:t}),e&&(E.debug("Recording trace input"),e.update({input:t}));}function P2({result:p,span:i,trace:e,enrichSpan:t}){E.debug("Recording successful execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id});let o=typeof p=="object"?p:{result:p},a=new Date,s={endTime:a,output:o};if(t){let c=t(p);Object.assign(s,c);}i.update(s),e&&e.update({endTime:a,output:o});}function z2({span:p,error:i,trace:e}){var t,o;E.error("Recording execution error:",{spanId:p.data.id,traceId:e==null?void 0:e.data.id,error:i instanceof Error?{name:i.name,message:i.message,stack:i.stack}:i}),i instanceof Error&&p.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(t=i.stack)!=null?t:""}}),p.end(),e&&(e.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(o=i.stack)!=null?o:""}}),e.end());}function Ym({name:p,projectName:i,type:e,enrichSpan:t}={},o){return function(...s){let c=It.getStore(),{span:l,trace:m}=wZ({name:p!=null?p:o.name||RZ,parentSpan:c==null?void 0:c.span,projectName:i,trace:c==null?void 0:c.trace,type:e}),u=!c,d=this;return It.run({span:l,trace:m},()=>{let f=u?m:void 0;try{_Z({args:s,span:l,trace:f});let g=o.apply(d,s);return xZ(g)?g.then(h=>(P2({span:l,result:h,trace:f,enrichSpan:t}),h),h=>{throw z2({span:l,error:h,trace:f}),h}):(P2({span:l,result:g,trace:f,enrichSpan:t}),g)}catch(g){throw z2({span:l,error:g,trace:f}),g}})}}function Kr(p,i){if(typeof p=="function")return Ym({},p);let e=p;if(i){let t=Ym(e,i);return e.entrypoint&&kZ(i,t,e),t}return function(...t){if(t.length===2&&typeof t[1]=="object"&&t[1]!==null&&"kind"in t[1]){let[s,c]=t;if(c.kind!=="method")throw new Error("track decorator is only applicable to methods");return Ym(e,s)}let[,,o]=t;if(!o||typeof o.value!="function")throw new Error("track decorator can only be applied to methods");let a=o.value;return o.value=Ym(e,a),o}}function kZ(p,i,e){var m;let t=e.name||p.name;if(!t)throw new Error("entrypoint functions must have a name. Provide one via track({ name: '...' }) or use a named function.");let o=e.projectName||Om().config.projectName,a=(m=e.params)!=null?m:d2(p),s=new Set(["string","number","float","integer","boolean"]),c=a.filter(u=>!s.has(u.type));if(c.length>0){let u=c.map(d=>`${d.name} (${d.type})`);E.warn(`Could not resolve type for parameter(s) [${u.join(", ")}] in "${t}". These parameters will default to 'string' and cannot be modified via the UI. Consider using a supported type (string, number, boolean) or choosing a different entrypoint.`);}let l=a.map(u=>({...u,type:u.type==="number"?"float":u.type}));l2({func:i,name:t,project:o,params:l,docstring:""}),mE();}function Om(){return uE===null&&(uE=new hr),uE}var RZ,It,Ps,uE,Cr=n(()=>{zi();q();Lm();Vm();dE();RZ="track.decorator",It=new AsyncLocalStorage,Ps=()=>{let{span:p,trace:i}=It.getStore()||{};if(!(!p||!i))return {span:p,trace:i}};uE=null;});function AZ(p,i){var e;if(p!=null)return i==="prompt"?(e=p.commit)!=null?e:void 0:i==="prompt_commit"?eE(p,i):p}function gE(p){let{values:i,fieldNames:e,blueprintId:t,blueprintVersion:o,isFallback:a,maskId:s}=p,c={...i};return Object.defineProperties(c,{blueprintId:{value:t,enumerable:false,writable:false},blueprintVersion:{value:o,enumerable:false,writable:false},isFallback:{value:a,enumerable:false,writable:false}}),new Proxy(c,{get(m,u){return typeof u!="string"||PZ.has(u)||e.has(u)&&zZ({blueprintId:t,blueprintVersion:o,maskId:s,fieldNames:e,values:i}),Reflect.get(m,u)}})}function zZ(p){let i=Ps();if(!i)return;let{blueprintId:e,blueprintVersion:t,maskId:o,fieldNames:a,values:s}=p,c={};for(let u of a){let d=s[u];if(d===void 0)continue;let f=Fm(d);c[u]={value:AZ(d,f),type:f};}let l={_blueprint_id:e,blueprint_version:t,values:c};o!==void 0&&(l._mask_id=o);let m={agent_configuration:l};i.span.update({metadata:m}),i.trace.update({metadata:m});}var PZ,S2=n(()=>{Cr();ks();PZ=new Set(["blueprintId","blueprintVersion","isFallback"]);});function v2(){let p=process.env.OPIK_CONFIG_TTL_SECONDS;if(p!==void 0){let i=parseInt(p,10);if(!isNaN(i))return i}return SZ}function j2(p,i,e,t=null){return yE.getOrCreate(p,i,e,t)}function bE(p,i,e,t,o,a=null){let s=yE.getOrCreate(p,i,e,a);t!==null&&s.update(t),o!==null&&e===null&&(s.setRefreshCallback(o),yE.ensureRefreshTimerStarted());}var SZ,TZ,T2,fE,hE,yE,E2=n(()=>{q();SZ=300,TZ=1e3,T2=100;fE=class{constructor(i){this._blueprint=null;this._lastFetchMs=null;this._refreshCallback=null;this._ttlMs=i*1e3;}setRefreshCallback(i){this._refreshCallback===null&&(this._refreshCallback=i);}update(i){this._blueprint=i,this._lastFetchMs=Date.now();}getBlueprint(){return this._blueprint}isStale(){return this._lastFetchMs===null?true:Date.now()-this._lastFetchMs>=this._ttlMs}async tryBackgroundRefresh(){if(this._refreshCallback!==null)try{let i=await this._refreshCallback();i!==null&&this.update(i);}catch(i){E.debug("Background blueprint cache refresh failed",i);}}},hE=class{constructor(){this._entries=new Map;this._intervalHandle=null;this._refreshRunning=false;}getOrCreate(i,e,t,o=null){let a=`${i}::${e!=null?e:""}::${t!=null?t:""}::${o!=null?o:""}`,s=this._entries.get(a);return s||(s=new fE(v2()),this._entries.set(a,s)),s}ensureRefreshTimerStarted(){if(this._intervalHandle!==null)return;let i=Math.max(v2()*1e3,TZ);this._intervalHandle=setInterval(()=>{this._refreshAllStale();},i),this._intervalHandle.unref();}async _refreshAllStale(){if(!this._refreshRunning){this._refreshRunning=true;try{let i=[...this._entries.values()].filter(e=>e.isStale());for(let e=0;e<i.length;e+=T2)await Promise.all(i.slice(e,e+T2).map(t=>t.tryBackgroundRefresh()));}finally{this._refreshRunning=false;}}}clear(){this._intervalHandle!==null&&(clearInterval(this._intervalHandle),this._intervalHandle=null),this._refreshRunning=false,this._entries.clear();}},yE=new hE;});var z6={};V(z6,{OpikClient:()=>hr,clients:()=>Km,resetDefaultProjectWarning:()=>vZ});function vZ(){RE=false;}var Km,RE,jZ,hr,zi=n(()=>{Ms();Pt();ie();$u();Y4();qe();q();jj();t6();i6();o6();a6();n6();s6();p6();Mj();vm();Lj();k6();Xu();Hj();Hr();Qj();Dm();ys();vt();jr();U6();Nm();t2();Nj();qj();tE();Mm();ks();S2();Hm();E2();Cr();wm();Ms();Km=[],RE=false;jZ=Cm+500,hr=class{constructor(i){this.displayTraceLog=(i,e)=>{if(e===this.lastProjectNameLogged||!this.config.apiUrl)return;let t=r6(i,this.config.apiUrl);E.info(`Started logging traces to the "${e}" project at ${Fs(t)}`),this.lastProjectNameLogged=e;};this.trace=i=>{E.debug("Creating new trace with data:",i);let e=this.resolveProjectName(i.projectName),t=new nm({id:ge(),startTime:new Date,source:"sdk",...i,projectName:e},this);return this.traceBatchQueue.create(t.data),E.debug("Trace added to the queue with ID:",t.data.id),this.displayTraceLog(t.data.id,e),t};this.getDataset=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting dataset with name "${i}"`);try{await this.datasetBatchQueue.flush();let o=await this.api.datasets.getDatasetByIdentifier({datasetName:i,projectName:t});return new ur({...o,projectName:t},this)}catch(o){throw o instanceof k&&o.statusCode===404?new Tt(i):o}};this.createDataset=async(i,e,t)=>{let o=this.resolveProjectName(t);E.debug(`Creating dataset with name "${i}"`);let a=new ur({name:i,description:e,projectName:o},this);try{return this.datasetBatchQueue.create({name:a.name,description:a.description,id:a.id,projectName:o}),E.debug("Dataset added to the queue with name:",a.name),a}catch(s){throw E.error(`Failed to create dataset "${i}"`,{error:s}),new Error(`Error creating dataset "${i}": ${s}`)}};this.getOrCreateDataset=async(i,e,t)=>{E.debug(`Attempting to retrieve or create dataset with name: "${i}"`);try{return await this.getDataset(i,t)}catch(o){if(o instanceof Tt)return E.info(`Dataset "${i}" not found. Proceeding to create a new one.`),this.createDataset(i,e,t);throw E.error(`Error retrieving dataset "${i}":`,o),o}};this.getDatasets=async(i=100,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting all datasets (limit: ${i})`);try{await this.datasetBatchQueue.flush();let o;try{o=await this.getProjectIdByName(t);}catch{}let a=await this.api.datasets.findDatasets({size:i,...o&&{projectId:o}}),s=[];for(let c of a.content||[])s.push(new ur({...c,projectName:t},this));return E.info(`Retrieved ${s.length} datasets`),s}catch(o){throw E.error("Failed to retrieve datasets",{error:o}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async(i,e)=>{E.debug(`Deleting dataset with name "${i}"`);try{let t=await this.getDataset(i,e);if(!t.id)throw new Error(`Cannot delete dataset "${i}": ID not available`);this.datasetBatchQueue.delete(t.id);}catch(t){throw E.error(`Failed to delete dataset "${i}"`,{error:t}),new Error(`Failed to delete dataset "${i}": ${t}`)}};this.createTestSuite=async i=>{E.debug(`Creating test suite with name "${i.name}"`);let{TestSuite:e}=await import('./suite-N4PQBN76.js');return e.create(this,i)};this.getTestSuite=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting test suite with name "${i}"`);let{TestSuite:o}=await import('./suite-N4PQBN76.js');return o.get(this,i,t)};this.getOrCreateTestSuite=async i=>{E.debug(`Attempting to retrieve or create test suite with name: "${i.name}"`);let{TestSuite:e}=await import('./suite-N4PQBN76.js');return e.getOrCreate(this,i)};this.deleteTestSuite=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Deleting test suite with name "${i}"`);let{TestSuite:o}=await import('./suite-N4PQBN76.js');await o.delete(this,i,t);};this.getTestSuites=async(i=1e3,e)=>{var o;let t=this.resolveProjectName(e);E.debug(`Getting all test suites (limit: ${i})`);try{await this.datasetBatchQueue.flush();let a=await this.resolveProjectId(t),{TestSuite:s}=await import('./suite-N4PQBN76.js'),c=[],l=1,m=100;for(;c.length<i;){let d=(o=(await this.api.datasets.findDatasets({page:l,size:m,...a&&{projectId:a}})).content)!=null?o:[];if(d.length===0)break;for(let f of d){if(c.length>=i)break;f.type===Lu.EvaluationSuite&&c.push(new s(new ur({...f,projectName:t},this),this));}l++;}return E.info(`Retrieved ${c.length} test suites`),c}catch(a){throw E.error("Failed to retrieve test suites",{error:a}),new Error("Failed to retrieve test suites")}};this.createTracesAnnotationQueue=async i=>this.createAnnotationQueueInternal(i,Gr);this.createThreadsAnnotationQueue=async i=>this.createAnnotationQueueInternal(i,Or);this.getTracesAnnotationQueue=async i=>this.fetchAnnotationQueueById(i,"trace",Gr);this.getThreadsAnnotationQueue=async i=>this.fetchAnnotationQueueById(i,"thread",Or);this.getTracesAnnotationQueues=async i=>(await this.getAnnotationQueuesByScope("trace",i)).map(t=>new Gr(t,this));this.getThreadsAnnotationQueues=async i=>(await this.getAnnotationQueuesByScope("thread",i)).map(t=>new Or(t,this));this.deleteTracesAnnotationQueue=async i=>this.deleteAnnotationQueueById(i,"traces");this.deleteThreadsAnnotationQueue=async i=>this.deleteAnnotationQueueById(i,"threads");this.createExperiment=async({datasetName:i,name:e,experimentConfig:t,prompts:o,type:a=Ou.Regular,optimizationId:s,datasetVersionId:c,evaluationMethod:l,tags:m,projectName:u})=>{if(E.debug(`Creating experiment for dataset "${i}"`),!i)throw new Error("Dataset name is required to create an experiment");let[d,f]=_6(t,o),g=this.resolveProjectName(u),h=ge(),y=new vr({id:h,name:e,datasetName:i,prompts:o,tags:m,projectName:g},this);try{return await this.api.experiments.createExperiment({id:h,datasetName:i,name:e,metadata:d,promptVersions:f,type:a,optimizationId:s,datasetVersionId:c,tags:m,evaluationMethod:l,projectName:g}),E.debug("Experiment created with id:",h),y}catch(w){throw E.error(`Failed to create experiment for dataset "${i}"`,{error:w}),new Error(`Error creating experiment: ${w}`)}};this.updateExperiment=async(i,e)=>{if(!i)throw new Error("id is required to update an experiment");let{name:t,experimentConfig:o}=e;if(!t&&!o)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");E.debug(`Updating experiment with ID "${i}"`);let a={};t!==void 0&&(a.name=t),o!==void 0&&(a.metadata=o);try{await this.api.experiments.updateExperiment(i,{body:a});}catch(s){throw E.error(`Failed to update experiment with ID "${i}"`,{error:s}),s}};this.getExperimentById=async i=>{var e,t;E.debug(`Getting experiment with ID "${i}"`);try{let o=await this.api.experiments.getExperimentById(i);return new vr({id:o.id,name:o.name,datasetName:(e=o.datasetName)!=null?e:void 0,projectName:(t=o.projectName)!=null?t:void 0},this)}catch(o){throw o instanceof k&&o.statusCode===404?new ds(`No experiment found with ID '${i}'`):(E.error(`Failed to get experiment with ID "${i}"`,{error:o}),o)}};this.getExperimentsByName=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting experiments with name "${i}"`);try{let o=await this.api.experiments.streamExperiments({name:i,projectName:t});return (await dr(o,O.ExperimentPublic)).map(s=>{var c,l;return new vr({id:s.id,name:s.name,datasetName:(c=s.datasetName)!=null?c:void 0,projectName:(l=s.projectName)!=null?l:void 0},this)})}catch(o){throw E.error(`Failed to get experiments with name "${i}"`,{error:o}),o}};this.getExperiment=async(i,e)=>{E.debug(`Getting experiment with name "${i}"`);let t=await this.getExperimentsByName(i,e);if(t.length===0)throw new ds(i);return t[0]};this.getDatasetExperiments=async(i,e=100,t)=>{E.debug(`Getting experiments for dataset "${i}"`);let o=await this.getDataset(i,t);try{return await this.findExperimentsByDatasetId(o.id,e,a=>{var s;return new vr({id:a.id,name:a.name,datasetName:(s=a.datasetName)!=null?s:void 0},this)})}catch(a){throw E.error(`Failed to get experiments for dataset "${i}"`,{error:a}),a}};this.getTestSuiteExperiments=async(i,e=100,t)=>{E.debug(`Getting experiments for test suite "${i}"`);let o=await this.getDataset(i,t);try{return await this.findExperimentsByDatasetId(o.id,e,a=>{var s;return new jm({id:a.id,name:a.name,datasetName:(s=a.datasetName)!=null?s:void 0,passRate:a.passRate,passedCount:a.passedCount,totalCount:a.totalCount,assertionScores:a.assertionScores},this)})}catch(a){throw E.error(`Failed to get experiments for test suite "${i}"`,{error:a}),a}};this.findExperimentsByDatasetId=async(i,e,t)=>{var c;let o=Math.min(100,e),a=[],s=1;for(;a.length<e;){let l=await this.api.experiments.findExperiments({page:s,size:o,datasetId:i}),m=(c=l==null?void 0:l.content)!=null?c:[];if(m.length===0)break;let u=e-a.length,d=Math.min(m.length,u);for(let f=0;f<d;f++)a.push(t(m[f]));if(d<m.length)break;s+=1;}return a};this.deleteExperiment=async i=>{E.debug(`Deleting experiment with ID "${i}"`);try{await this.api.experiments.deleteExperimentsById({ids:[i]});}catch(e){throw E.error(`Failed to delete experiment with ID "${i}"`,{error:e}),e}};this.createPromptInternal=async(i,e,t,o,a,s,c,l,m)=>{var u;E.debug(`Creating ${l}`,{name:i});try{let d=await I6(this.api.prompts,i,this.api.requestOptions);a(d);let f=(u=o.type)!=null?u:Ue.MUSTACHE,g=D6({prompt:e,metadata:o.metadata},d,f),h;if(g?(E.debug(`Creating new ${l} version`,{name:i}),h=await this.api.prompts.createPromptVersion({name:i,version:{template:e,metadata:o.metadata,type:f},templateStructure:t,projectName:m},this.api.requestOptions)):(E.debug(`Returning existing ${l} version`,{name:i}),h=d),!h.promptId)throw new Error("Invalid API response: missing promptId");let y=await this.api.prompts.getPromptById(h.promptId,this.api.requestOptions),w=s(y,h);return E.debug(`${l} created`,{name:i}),o.description||o.tags?await w.updateProperties({description:o.description,tags:o.tags}):w}catch(d){if(d instanceof k||d instanceof Ur)return E.warn(`Failed to sync ${l} '${i}' with the backend. The prompt will work locally but is not persisted on the server. You can retry by calling .syncWithBackend().`,{error:d}),c();throw E.error(`Failed to create ${l}`,{name:i,error:d}),d}};this.createPrompt=async i=>{let e=this.resolveProjectName(i.projectName);return this.createPromptInternal(i.name,i.prompt,ve.Text,i,()=>{},(t,o)=>tr.fromApiResponse(t,o,this,e),()=>{var t;return new tr({name:i.name,prompt:i.prompt,metadata:i.metadata,type:(t=i.type)!=null?t:Ue.MUSTACHE,description:i.description,tags:i.tags,projectName:e,synced:false},this)},"prompt",e)};this.createChatPrompt=async i=>{let e=this.resolveProjectName(i.projectName),t=JSON.stringify(i.messages);return this.createPromptInternal(i.name,t,ve.Chat,i,o=>{if(o&&o.templateStructure&&o.templateStructure!==ve.Chat)throw new jt(i.name,o.templateStructure,ve.Chat)},(o,a)=>ir.fromApiResponse(o,a,this,e),()=>{var o;return new ir({name:i.name,messages:structuredClone(i.messages),metadata:i.metadata,type:(o=i.type)!=null?o:Ue.MUSTACHE,description:i.description,tags:i.tags,projectName:e,synced:false},this)},"chat prompt",e)};this.getPrompt=async i=>{var e;E.debug("Getting prompt",i);try{let t=this.resolveProjectName(i.projectName),o={...i,projectName:t},a;try{a=await this.getProjectIdByName(t);}catch{}let c=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:i.name}]),size:1,...a&&{projectId:a}},this.api.requestOptions)).content)==null?void 0:e[0];if(!c)return E.debug("Prompt not found",{name:i.name}),null;let l=await this.api.prompts.retrievePromptVersion(o,this.api.requestOptions),m=l.templateStructure;if(m&&m!==ve.Text)throw new jt(i.name,m,ve.Text);return tr.fromApiResponse(c,l,this,t)}catch(t){if(t instanceof k&&t.statusCode===404)return null;throw E.error("Failed to get prompt",{name:i.name,error:t}),t}};this.getChatPrompt=async i=>{var e;E.debug("Getting chat prompt",i);try{let t=this.resolveProjectName(i.projectName),o={...i,projectName:t},a;try{a=await this.getProjectIdByName(t);}catch{}let c=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:i.name}]),size:1,...a&&{projectId:a}},this.api.requestOptions)).content)==null?void 0:e[0];if(!c)return E.debug("Chat prompt not found",{name:i.name}),null;let l=await this.api.prompts.retrievePromptVersion(o,this.api.requestOptions),m=l.templateStructure;if(!m||m!==ve.Chat)throw new jt(i.name,m!=null?m:"undefined",ve.Chat);return ir.fromApiResponse(c,l,this,t)}catch(t){if(t instanceof k&&t.statusCode===404)return null;throw E.error("Failed to get chat prompt",{name:i.name,error:t}),t}};this.searchPrompts=async i=>{var e;E.debug("Searching prompts",{filterString:i});try{let t;if(i){let l=gr.forPrompts(i).getFilterExpressions();t=l?JSON.stringify(l):void 0;}let a=(e=(await this.api.prompts.getPrompts({filters:t,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(a.map(async c=>{if(!c.name)return null;try{let l=await this.api.prompts.retrievePromptVersion({name:c.name},this.api.requestOptions),m=l.templateStructure,u=this.resolveProjectName();return !m||m===ve.Text?tr.fromApiResponse(c,l,this,u):m===ve.Chat?ir.fromApiResponse(c,l,this,u):null}catch(l){return E.debug("Failed to get version for prompt",{name:c.name,error:l}),null}}))).filter(c=>c!==null)}catch(t){throw E.error("Failed to search prompts",{error:t}),t}};this.deletePrompts=async i=>{E.debug("Deleting prompts in batch",{count:i.length});try{await this.api.prompts.deletePromptsBatch({ids:i},this.api.requestOptions),E.info("Successfully deleted prompts",{count:i.length});}catch(e){throw E.error("Failed to delete prompts",{count:i.length,error:e}),e}};this.searchTraces=async i=>{let{exclude:e,...t}=i!=null?i:{};return this.executeSearch("traces",t,Z6,(o,a,s,c,l)=>Q6(o,a,s,c,l,e))};this.searchThreads=async i=>this.executeSearch("threads",i!=null?i:{},q6,X6);this.searchSpans=async i=>{let{exclude:e,...t}=i!=null?i:{};return this.executeSearch("spans",t,r2,(o,a,s,c,l)=>e2(o,a,s,c,l,e))};this.flush=async i=>{var t;let e=(t=i==null?void 0:i.silent)!=null?t:false;E.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.traceAssertionResultsBatchQueue.flush(),await this.datasetBatchQueue.flush(),e||E.info("Successfully flushed all data to Opik");}catch(o){E.error("Error during flush operation:",{error:o instanceof Error?o.message:o});}};this.createConfig=async(i,e)=>{var l,m;let t=(l=e==null?void 0:e.projectName)!=null?l:this.config.projectName;this._validatePromptProjects(i,t);let o=new Ct(t,this),a=rE(i),s=await o.getBlueprint(),c;if(s)c=await o.updateBlueprint({values:a,description:e==null?void 0:e.description});else try{c=await o.createBlueprint({values:a,description:e==null?void 0:e.description});}catch(u){if(u instanceof k&&u.statusCode===409)c=await o.updateBlueprint({values:a,description:e==null?void 0:e.description});else throw u}return (m=c.name)!=null?m:c.id};this.setConfigEnv=async i=>{var s;let e=(s=i.projectName)!=null?s:this.config.projectName,o=await new Ct(e,this).getBlueprint({name:i.version});if(!o)throw new Tr(`No config version "${i.version}" found in project "${e}".`);let a=await this.api.projects.retrieveProject({name:e});if(!(a!=null&&a.id))throw new Error(`Project "${e}" not found`);await this.api.agentConfigs.createOrUpdateEnvs({projectId:a.id,envs:[{envName:i.env,blueprintId:o.id}]});};this.updatePromptVersionTags=async(i,e)=>{var t;E.debug("Updating prompt version tags",{count:i.length,options:e});try{await this.api.prompts.updatePromptVersions({ids:i,update:{tags:(t=e==null?void 0:e.tags)!=null?t:void 0},mergeTags:e==null?void 0:e.mergeTags},this.api.requestOptions),E.debug("Successfully updated prompt version tags",{count:i.length});}catch(o){throw E.error("Failed to update prompt version tags",{count:i.length,error:o}),o}};E.debug("Initializing OpikClient with config:",i),this.config=eC(i);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};i!=null&&i.headers&&(E.debug("Initializing OpikClient with additional headers:",i==null?void 0:i.headers),e.requestOptions={headers:i==null?void 0:i.headers}),this.api=new um(e);let t=this.config.holdUntilFlush?1440*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new cm(this.api,t),this.traceBatchQueue=new mm(this.api,t),this.spanFeedbackScoresBatchQueue=new lm(this.api,t),this.traceFeedbackScoresBatchQueue=new dm(this.api,t),this.traceAssertionResultsBatchQueue=new pm(this.api,t,"TRACE"),this.datasetBatchQueue=new gm(this.api,t),Km.push(this);}resolveProjectName(i){return i!==void 0?i:(!RE&&this.config.projectName===Qi.projectName&&(RE=true,E.warn(`No project name configured. Traces are being logged to "Default Project".
22
+ `);});}function yZ(p,i){let e=[" \u2800\u20DD","opik ",`runner: ${p}`];i&&e.push(` project: ${i}`),console.log(e.join("")),console.log();}var k2,A2,dE=n(()=>{q();zi();Vm();_2();lE();k2=false,A2=false;});function xZ(p){return !!p&&(typeof p=="object"||typeof p=="function")&&typeof p.then=="function"}function wZ({name:p,parentSpan:i,projectName:e,trace:t,type:o="llm"}){E.debug("Creating new span:",{name:p,parentSpan:i==null?void 0:i.data.id,projectName:e,type:o});let a=t;if(!a){let c=n2();a=Om().trace({name:p,projectName:e,...c?{id:c}:{}});}let s=a.span({name:p,parentSpanId:i==null?void 0:i.data.id,projectName:e,type:o});return E.debug("Span created with ID:",s.data.id),{span:s,trace:a}}function _Z({args:p,span:i,trace:e}){if(E.debug("Starting span execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id}),p.length===0)return;let t={arguments:p};E.debug("Recording span input"),i.update({input:t}),e&&(E.debug("Recording trace input"),e.update({input:t}));}function P2({result:p,span:i,trace:e,enrichSpan:t}){E.debug("Recording successful execution:",{spanId:i.data.id,traceId:e==null?void 0:e.data.id});let o=typeof p=="object"?p:{result:p},a=new Date,s={endTime:a,output:o};if(t){let c=t(p);Object.assign(s,c);}i.update(s),e&&e.update({endTime:a,output:o});}function z2({span:p,error:i,trace:e}){var t,o;E.error("Recording execution error:",{spanId:p.data.id,traceId:e==null?void 0:e.data.id,error:i instanceof Error?{name:i.name,message:i.message,stack:i.stack}:i}),i instanceof Error&&p.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(t=i.stack)!=null?t:""}}),p.end(),e&&(e.update({errorInfo:{message:i.message,exceptionType:i.name,traceback:(o=i.stack)!=null?o:""}}),e.end());}function Ym({name:p,projectName:i,type:e,enrichSpan:t}={},o){return function(...s){let c=It.getStore(),{span:l,trace:m}=wZ({name:p!=null?p:o.name||RZ,parentSpan:c==null?void 0:c.span,projectName:i,trace:c==null?void 0:c.trace,type:e}),u=!c,d=this;return It.run({span:l,trace:m},()=>{let f=u?m:void 0;try{_Z({args:s,span:l,trace:f});let g=o.apply(d,s);return xZ(g)?g.then(h=>(P2({span:l,result:h,trace:f,enrichSpan:t}),h),h=>{throw z2({span:l,error:h,trace:f}),h}):(P2({span:l,result:g,trace:f,enrichSpan:t}),g)}catch(g){throw z2({span:l,error:g,trace:f}),g}})}}function Kr(p,i){if(typeof p=="function")return Ym({},p);let e=p;if(i){let t=Ym(e,i);return e.entrypoint&&kZ(i,t,e),t}return function(...t){if(t.length===2&&typeof t[1]=="object"&&t[1]!==null&&"kind"in t[1]){let[s,c]=t;if(c.kind!=="method")throw new Error("track decorator is only applicable to methods");return Ym(e,s)}let[,,o]=t;if(!o||typeof o.value!="function")throw new Error("track decorator can only be applied to methods");let a=o.value;return o.value=Ym(e,a),o}}function kZ(p,i,e){var m;let t=e.name||p.name;if(!t)throw new Error("entrypoint functions must have a name. Provide one via track({ name: '...' }) or use a named function.");let o=e.projectName||Om().config.projectName,a=(m=e.params)!=null?m:d2(p),s=new Set(["string","number","float","integer","boolean"]),c=a.filter(u=>!s.has(u.type));if(c.length>0){let u=c.map(d=>`${d.name} (${d.type})`);E.warn(`Could not resolve type for parameter(s) [${u.join(", ")}] in "${t}". These parameters will default to 'string' and cannot be modified via the UI. Consider using a supported type (string, number, boolean) or choosing a different entrypoint.`);}let l=a.map(u=>({...u,type:u.type==="number"?"float":u.type}));l2({func:i,name:t,project:o,params:l,docstring:""}),mE();}function Om(){return uE===null&&(uE=new hr),uE}var RZ,It,Ps,uE,Cr=n(()=>{zi();q();Lm();Vm();dE();RZ="track.decorator",It=new AsyncLocalStorage,Ps=()=>{let{span:p,trace:i}=It.getStore()||{};if(!(!p||!i))return {span:p,trace:i}};uE=null;});function AZ(p,i){var e;if(p!=null)return i==="prompt"?(e=p.commit)!=null?e:void 0:i==="prompt_commit"?eE(p,i):p}function gE(p){let{values:i,fieldNames:e,blueprintId:t,blueprintVersion:o,isFallback:a,maskId:s}=p,c={...i};return Object.defineProperties(c,{blueprintId:{value:t,enumerable:false,writable:false},blueprintVersion:{value:o,enumerable:false,writable:false},isFallback:{value:a,enumerable:false,writable:false}}),new Proxy(c,{get(m,u){return typeof u!="string"||PZ.has(u)||e.has(u)&&zZ({blueprintId:t,blueprintVersion:o,maskId:s,fieldNames:e,values:i}),Reflect.get(m,u)}})}function zZ(p){let i=Ps();if(!i)return;let{blueprintId:e,blueprintVersion:t,maskId:o,fieldNames:a,values:s}=p,c={};for(let u of a){let d=s[u];if(d===void 0)continue;let f=Fm(d);c[u]={value:AZ(d,f),type:f};}let l={_blueprint_id:e,blueprint_version:t,values:c};o!==void 0&&(l._mask_id=o);let m={agent_configuration:l};i.span.update({metadata:m}),i.trace.update({metadata:m});}var PZ,S2=n(()=>{Cr();ks();PZ=new Set(["blueprintId","blueprintVersion","isFallback"]);});function v2(){let p=process.env.OPIK_CONFIG_TTL_SECONDS;if(p!==void 0){let i=parseInt(p,10);if(!isNaN(i))return i}return SZ}function j2(p,i,e,t=null){return yE.getOrCreate(p,i,e,t)}function bE(p,i,e,t,o,a=null){let s=yE.getOrCreate(p,i,e,a);t!==null&&s.update(t),o!==null&&e===null&&(s.setRefreshCallback(o),yE.ensureRefreshTimerStarted());}var SZ,TZ,T2,fE,hE,yE,E2=n(()=>{q();SZ=300,TZ=1e3,T2=100;fE=class{constructor(i){this._blueprint=null;this._lastFetchMs=null;this._refreshCallback=null;this._ttlMs=i*1e3;}setRefreshCallback(i){this._refreshCallback===null&&(this._refreshCallback=i);}update(i){this._blueprint=i,this._lastFetchMs=Date.now();}getBlueprint(){return this._blueprint}isStale(){return this._lastFetchMs===null?true:Date.now()-this._lastFetchMs>=this._ttlMs}async tryBackgroundRefresh(){if(this._refreshCallback!==null)try{let i=await this._refreshCallback();i!==null&&this.update(i);}catch(i){E.debug("Background blueprint cache refresh failed",i);}}},hE=class{constructor(){this._entries=new Map;this._intervalHandle=null;this._refreshRunning=false;}getOrCreate(i,e,t,o=null){let a=`${i}::${e!=null?e:""}::${t!=null?t:""}::${o!=null?o:""}`,s=this._entries.get(a);return s||(s=new fE(v2()),this._entries.set(a,s)),s}ensureRefreshTimerStarted(){if(this._intervalHandle!==null)return;let i=Math.max(v2()*1e3,TZ);this._intervalHandle=setInterval(()=>{this._refreshAllStale();},i),this._intervalHandle.unref();}async _refreshAllStale(){if(!this._refreshRunning){this._refreshRunning=true;try{let i=[...this._entries.values()].filter(e=>e.isStale());for(let e=0;e<i.length;e+=T2)await Promise.all(i.slice(e,e+T2).map(t=>t.tryBackgroundRefresh()));}finally{this._refreshRunning=false;}}}clear(){this._intervalHandle!==null&&(clearInterval(this._intervalHandle),this._intervalHandle=null),this._refreshRunning=false,this._entries.clear();}},yE=new hE;});var z6={};V(z6,{OpikClient:()=>hr,clients:()=>Km,resetDefaultProjectWarning:()=>vZ});function vZ(){RE=false;}var Km,RE,jZ,hr,zi=n(()=>{Ms();Pt();ie();$u();Y4();qe();q();jj();t6();i6();o6();a6();n6();s6();p6();Mj();vm();Lj();k6();Xu();Hj();Hr();Qj();Dm();ys();vt();jr();U6();Nm();t2();Nj();qj();tE();Mm();ks();S2();Hm();E2();Cr();wm();Ms();Km=[],RE=false;jZ=Cm+500,hr=class{constructor(i){this.displayTraceLog=(i,e)=>{if(e===this.lastProjectNameLogged||!this.config.apiUrl)return;let t=r6(i,this.config.apiUrl);E.info(`Started logging traces to the "${e}" project at ${Fs(t)}`),this.lastProjectNameLogged=e;};this.trace=i=>{E.debug("Creating new trace with data:",i);let e=this.resolveProjectName(i.projectName),t=new nm({id:ge(),startTime:new Date,source:"sdk",...i,projectName:e},this);return this.traceBatchQueue.create(t.data),E.debug("Trace added to the queue with ID:",t.data.id),this.displayTraceLog(t.data.id,e),t};this.getDataset=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting dataset with name "${i}"`);try{await this.datasetBatchQueue.flush();let o=await this.api.datasets.getDatasetByIdentifier({datasetName:i,projectName:t});return new ur({...o,projectName:t},this)}catch(o){throw o instanceof k&&o.statusCode===404?new Tt(i):o}};this.createDataset=async(i,e,t)=>{let o=this.resolveProjectName(t);E.debug(`Creating dataset with name "${i}"`);let a=new ur({name:i,description:e,projectName:o},this);try{return this.datasetBatchQueue.create({name:a.name,description:a.description,id:a.id,projectName:o}),E.debug("Dataset added to the queue with name:",a.name),a}catch(s){throw E.error(`Failed to create dataset "${i}"`,{error:s}),new Error(`Error creating dataset "${i}": ${s}`)}};this.getOrCreateDataset=async(i,e,t)=>{E.debug(`Attempting to retrieve or create dataset with name: "${i}"`);try{return await this.getDataset(i,t)}catch(o){if(o instanceof Tt)return E.info(`Dataset "${i}" not found. Proceeding to create a new one.`),this.createDataset(i,e,t);throw E.error(`Error retrieving dataset "${i}":`,o),o}};this.getDatasets=async(i=100,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting all datasets (limit: ${i})`);try{await this.datasetBatchQueue.flush();let o;try{o=await this.getProjectIdByName(t);}catch{}let a=await this.api.datasets.findDatasets({size:i,...o&&{projectId:o}}),s=[];for(let c of a.content||[])s.push(new ur({...c,projectName:t},this));return E.info(`Retrieved ${s.length} datasets`),s}catch(o){throw E.error("Failed to retrieve datasets",{error:o}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async(i,e)=>{E.debug(`Deleting dataset with name "${i}"`);try{let t=await this.getDataset(i,e);if(!t.id)throw new Error(`Cannot delete dataset "${i}": ID not available`);this.datasetBatchQueue.delete(t.id);}catch(t){throw E.error(`Failed to delete dataset "${i}"`,{error:t}),new Error(`Failed to delete dataset "${i}": ${t}`)}};this.createTestSuite=async i=>{E.debug(`Creating test suite with name "${i.name}"`);let{TestSuite:e}=await import('./suite-H7TYFEAJ.js');return e.create(this,i)};this.getTestSuite=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting test suite with name "${i}"`);let{TestSuite:o}=await import('./suite-H7TYFEAJ.js');return o.get(this,i,t)};this.getOrCreateTestSuite=async i=>{E.debug(`Attempting to retrieve or create test suite with name: "${i.name}"`);let{TestSuite:e}=await import('./suite-H7TYFEAJ.js');return e.getOrCreate(this,i)};this.deleteTestSuite=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Deleting test suite with name "${i}"`);let{TestSuite:o}=await import('./suite-H7TYFEAJ.js');await o.delete(this,i,t);};this.getTestSuites=async(i=1e3,e)=>{var o;let t=this.resolveProjectName(e);E.debug(`Getting all test suites (limit: ${i})`);try{await this.datasetBatchQueue.flush();let a=await this.resolveProjectId(t),{TestSuite:s}=await import('./suite-H7TYFEAJ.js'),c=[],l=1,m=100;for(;c.length<i;){let d=(o=(await this.api.datasets.findDatasets({page:l,size:m,...a&&{projectId:a}})).content)!=null?o:[];if(d.length===0)break;for(let f of d){if(c.length>=i)break;f.type===Lu.EvaluationSuite&&c.push(new s(new ur({...f,projectName:t},this),this));}l++;}return E.info(`Retrieved ${c.length} test suites`),c}catch(a){throw E.error("Failed to retrieve test suites",{error:a}),new Error("Failed to retrieve test suites")}};this.createTracesAnnotationQueue=async i=>this.createAnnotationQueueInternal(i,Gr);this.createThreadsAnnotationQueue=async i=>this.createAnnotationQueueInternal(i,Or);this.getTracesAnnotationQueue=async i=>this.fetchAnnotationQueueById(i,"trace",Gr);this.getThreadsAnnotationQueue=async i=>this.fetchAnnotationQueueById(i,"thread",Or);this.getTracesAnnotationQueues=async i=>(await this.getAnnotationQueuesByScope("trace",i)).map(t=>new Gr(t,this));this.getThreadsAnnotationQueues=async i=>(await this.getAnnotationQueuesByScope("thread",i)).map(t=>new Or(t,this));this.deleteTracesAnnotationQueue=async i=>this.deleteAnnotationQueueById(i,"traces");this.deleteThreadsAnnotationQueue=async i=>this.deleteAnnotationQueueById(i,"threads");this.createExperiment=async({datasetName:i,name:e,experimentConfig:t,prompts:o,type:a=Ou.Regular,optimizationId:s,datasetVersionId:c,evaluationMethod:l,tags:m,projectName:u})=>{if(E.debug(`Creating experiment for dataset "${i}"`),!i)throw new Error("Dataset name is required to create an experiment");let[d,f]=_6(t,o),g=this.resolveProjectName(u),h=ge(),y=new vr({id:h,name:e,datasetName:i,prompts:o,tags:m,projectName:g},this);try{return await this.api.experiments.createExperiment({id:h,datasetName:i,name:e,metadata:d,promptVersions:f,type:a,optimizationId:s,datasetVersionId:c,tags:m,evaluationMethod:l,projectName:g}),E.debug("Experiment created with id:",h),y}catch(w){throw E.error(`Failed to create experiment for dataset "${i}"`,{error:w}),new Error(`Error creating experiment: ${w}`)}};this.updateExperiment=async(i,e)=>{if(!i)throw new Error("id is required to update an experiment");let{name:t,experimentConfig:o}=e;if(!t&&!o)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");E.debug(`Updating experiment with ID "${i}"`);let a={};t!==void 0&&(a.name=t),o!==void 0&&(a.metadata=o);try{await this.api.experiments.updateExperiment(i,{body:a});}catch(s){throw E.error(`Failed to update experiment with ID "${i}"`,{error:s}),s}};this.getExperimentById=async i=>{var e,t;E.debug(`Getting experiment with ID "${i}"`);try{let o=await this.api.experiments.getExperimentById(i);return new vr({id:o.id,name:o.name,datasetName:(e=o.datasetName)!=null?e:void 0,projectName:(t=o.projectName)!=null?t:void 0},this)}catch(o){throw o instanceof k&&o.statusCode===404?new ds(`No experiment found with ID '${i}'`):(E.error(`Failed to get experiment with ID "${i}"`,{error:o}),o)}};this.getExperimentsByName=async(i,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting experiments with name "${i}"`);try{let o=await this.api.experiments.streamExperiments({name:i,projectName:t});return (await dr(o,O.ExperimentPublic)).map(s=>{var c,l;return new vr({id:s.id,name:s.name,datasetName:(c=s.datasetName)!=null?c:void 0,projectName:(l=s.projectName)!=null?l:void 0},this)})}catch(o){throw E.error(`Failed to get experiments with name "${i}"`,{error:o}),o}};this.getExperiment=async(i,e)=>{E.debug(`Getting experiment with name "${i}"`);let t=await this.getExperimentsByName(i,e);if(t.length===0)throw new ds(i);return t[0]};this.getDatasetExperiments=async(i,e=100,t)=>{E.debug(`Getting experiments for dataset "${i}"`);let o=await this.getDataset(i,t);try{return await this.findExperimentsByDatasetId(o.id,e,a=>{var s;return new vr({id:a.id,name:a.name,datasetName:(s=a.datasetName)!=null?s:void 0},this)})}catch(a){throw E.error(`Failed to get experiments for dataset "${i}"`,{error:a}),a}};this.getTestSuiteExperiments=async(i,e=100,t)=>{E.debug(`Getting experiments for test suite "${i}"`);let o=await this.getDataset(i,t);try{return await this.findExperimentsByDatasetId(o.id,e,a=>{var s;return new jm({id:a.id,name:a.name,datasetName:(s=a.datasetName)!=null?s:void 0,passRate:a.passRate,passedCount:a.passedCount,totalCount:a.totalCount,assertionScores:a.assertionScores},this)})}catch(a){throw E.error(`Failed to get experiments for test suite "${i}"`,{error:a}),a}};this.findExperimentsByDatasetId=async(i,e,t)=>{var c;let o=Math.min(100,e),a=[],s=1;for(;a.length<e;){let l=await this.api.experiments.findExperiments({page:s,size:o,datasetId:i}),m=(c=l==null?void 0:l.content)!=null?c:[];if(m.length===0)break;let u=e-a.length,d=Math.min(m.length,u);for(let f=0;f<d;f++)a.push(t(m[f]));if(d<m.length)break;s+=1;}return a};this.deleteExperiment=async i=>{E.debug(`Deleting experiment with ID "${i}"`);try{await this.api.experiments.deleteExperimentsById({ids:[i]});}catch(e){throw E.error(`Failed to delete experiment with ID "${i}"`,{error:e}),e}};this.createPromptInternal=async(i,e,t,o,a,s,c,l,m)=>{var u;E.debug(`Creating ${l}`,{name:i});try{let d=await I6(this.api.prompts,i,this.api.requestOptions);a(d);let f=(u=o.type)!=null?u:Ue.MUSTACHE,g=D6({prompt:e,metadata:o.metadata},d,f),h;if(g?(E.debug(`Creating new ${l} version`,{name:i}),h=await this.api.prompts.createPromptVersion({name:i,version:{template:e,metadata:o.metadata,type:f},templateStructure:t,projectName:m},this.api.requestOptions)):(E.debug(`Returning existing ${l} version`,{name:i}),h=d),!h.promptId)throw new Error("Invalid API response: missing promptId");let y=await this.api.prompts.getPromptById(h.promptId,this.api.requestOptions),w=s(y,h);return E.debug(`${l} created`,{name:i}),o.description||o.tags?await w.updateProperties({description:o.description,tags:o.tags}):w}catch(d){if(d instanceof k||d instanceof Ur)return E.warn(`Failed to sync ${l} '${i}' with the backend. The prompt will work locally but is not persisted on the server. You can retry by calling .syncWithBackend().`,{error:d}),c();throw E.error(`Failed to create ${l}`,{name:i,error:d}),d}};this.createPrompt=async i=>{let e=this.resolveProjectName(i.projectName);return this.createPromptInternal(i.name,i.prompt,ve.Text,i,()=>{},(t,o)=>tr.fromApiResponse(t,o,this,e),()=>{var t;return new tr({name:i.name,prompt:i.prompt,metadata:i.metadata,type:(t=i.type)!=null?t:Ue.MUSTACHE,description:i.description,tags:i.tags,projectName:e,synced:false},this)},"prompt",e)};this.createChatPrompt=async i=>{let e=this.resolveProjectName(i.projectName),t=JSON.stringify(i.messages);return this.createPromptInternal(i.name,t,ve.Chat,i,o=>{if(o&&o.templateStructure&&o.templateStructure!==ve.Chat)throw new jt(i.name,o.templateStructure,ve.Chat)},(o,a)=>ir.fromApiResponse(o,a,this,e),()=>{var o;return new ir({name:i.name,messages:structuredClone(i.messages),metadata:i.metadata,type:(o=i.type)!=null?o:Ue.MUSTACHE,description:i.description,tags:i.tags,projectName:e,synced:false},this)},"chat prompt",e)};this.getPrompt=async i=>{var e;E.debug("Getting prompt",i);try{let t=this.resolveProjectName(i.projectName),o={...i,projectName:t},a;try{a=await this.getProjectIdByName(t);}catch{}let c=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:i.name}]),size:1,...a&&{projectId:a}},this.api.requestOptions)).content)==null?void 0:e[0];if(!c)return E.debug("Prompt not found",{name:i.name}),null;let l=await this.api.prompts.retrievePromptVersion(o,this.api.requestOptions),m=l.templateStructure;if(m&&m!==ve.Text)throw new jt(i.name,m,ve.Text);return tr.fromApiResponse(c,l,this,t)}catch(t){if(t instanceof k&&t.statusCode===404)return null;throw E.error("Failed to get prompt",{name:i.name,error:t}),t}};this.getChatPrompt=async i=>{var e;E.debug("Getting chat prompt",i);try{let t=this.resolveProjectName(i.projectName),o={...i,projectName:t},a;try{a=await this.getProjectIdByName(t);}catch{}let c=(e=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:i.name}]),size:1,...a&&{projectId:a}},this.api.requestOptions)).content)==null?void 0:e[0];if(!c)return E.debug("Chat prompt not found",{name:i.name}),null;let l=await this.api.prompts.retrievePromptVersion(o,this.api.requestOptions),m=l.templateStructure;if(!m||m!==ve.Chat)throw new jt(i.name,m!=null?m:"undefined",ve.Chat);return ir.fromApiResponse(c,l,this,t)}catch(t){if(t instanceof k&&t.statusCode===404)return null;throw E.error("Failed to get chat prompt",{name:i.name,error:t}),t}};this.searchPrompts=async i=>{var e;E.debug("Searching prompts",{filterString:i});try{let t;if(i){let l=gr.forPrompts(i).getFilterExpressions();t=l?JSON.stringify(l):void 0;}let a=(e=(await this.api.prompts.getPrompts({filters:t,size:1e3},this.api.requestOptions)).content)!=null?e:[];return (await Promise.all(a.map(async c=>{if(!c.name)return null;try{let l=await this.api.prompts.retrievePromptVersion({name:c.name},this.api.requestOptions),m=l.templateStructure,u=this.resolveProjectName();return !m||m===ve.Text?tr.fromApiResponse(c,l,this,u):m===ve.Chat?ir.fromApiResponse(c,l,this,u):null}catch(l){return E.debug("Failed to get version for prompt",{name:c.name,error:l}),null}}))).filter(c=>c!==null)}catch(t){throw E.error("Failed to search prompts",{error:t}),t}};this.deletePrompts=async i=>{E.debug("Deleting prompts in batch",{count:i.length});try{await this.api.prompts.deletePromptsBatch({ids:i},this.api.requestOptions),E.info("Successfully deleted prompts",{count:i.length});}catch(e){throw E.error("Failed to delete prompts",{count:i.length,error:e}),e}};this.searchTraces=async i=>{let{exclude:e,...t}=i!=null?i:{};return this.executeSearch("traces",t,Z6,(o,a,s,c,l)=>Q6(o,a,s,c,l,e))};this.searchThreads=async i=>this.executeSearch("threads",i!=null?i:{},q6,X6);this.searchSpans=async i=>{let{exclude:e,...t}=i!=null?i:{};return this.executeSearch("spans",t,r2,(o,a,s,c,l)=>e2(o,a,s,c,l,e))};this.flush=async i=>{var t;let e=(t=i==null?void 0:i.silent)!=null?t:false;E.debug("Starting flush operation");try{await this.traceBatchQueue.flush(),await this.spanBatchQueue.flush(),await this.traceFeedbackScoresBatchQueue.flush(),await this.spanFeedbackScoresBatchQueue.flush(),await this.traceAssertionResultsBatchQueue.flush(),await this.datasetBatchQueue.flush(),e||E.info("Successfully flushed all data to Opik");}catch(o){E.error("Error during flush operation:",{error:o instanceof Error?o.message:o});}};this.createConfig=async(i,e)=>{var l,m;let t=(l=e==null?void 0:e.projectName)!=null?l:this.config.projectName;this._validatePromptProjects(i,t);let o=new Ct(t,this),a=rE(i),s=await o.getBlueprint(),c;if(s)c=await o.updateBlueprint({values:a,description:e==null?void 0:e.description});else try{c=await o.createBlueprint({values:a,description:e==null?void 0:e.description});}catch(u){if(u instanceof k&&u.statusCode===409)c=await o.updateBlueprint({values:a,description:e==null?void 0:e.description});else throw u}return (m=c.name)!=null?m:c.id};this.setConfigEnv=async i=>{var s;let e=(s=i.projectName)!=null?s:this.config.projectName,o=await new Ct(e,this).getBlueprint({name:i.version});if(!o)throw new Tr(`No config version "${i.version}" found in project "${e}".`);let a=await this.api.projects.retrieveProject({name:e});if(!(a!=null&&a.id))throw new Error(`Project "${e}" not found`);await this.api.agentConfigs.createOrUpdateEnvs({projectId:a.id,envs:[{envName:i.env,blueprintId:o.id}]});};this.updatePromptVersionTags=async(i,e)=>{var t;E.debug("Updating prompt version tags",{count:i.length,options:e});try{await this.api.prompts.updatePromptVersions({ids:i,update:{tags:(t=e==null?void 0:e.tags)!=null?t:void 0},mergeTags:e==null?void 0:e.mergeTags},this.api.requestOptions),E.debug("Successfully updated prompt version tags",{count:i.length});}catch(o){throw E.error("Failed to update prompt version tags",{count:i.length,error:o}),o}};E.debug("Initializing OpikClient with config:",i),this.config=eC(i);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};i!=null&&i.headers&&(E.debug("Initializing OpikClient with additional headers:",i==null?void 0:i.headers),e.requestOptions={headers:i==null?void 0:i.headers}),this.api=new um(e);let t=this.config.holdUntilFlush?1440*60*1e3:this.config.batchDelayMs;this.spanBatchQueue=new cm(this.api,t),this.traceBatchQueue=new mm(this.api,t),this.spanFeedbackScoresBatchQueue=new lm(this.api,t),this.traceFeedbackScoresBatchQueue=new dm(this.api,t),this.traceAssertionResultsBatchQueue=new pm(this.api,t,"TRACE"),this.datasetBatchQueue=new gm(this.api,t),Km.push(this);}resolveProjectName(i){return i!==void 0?i:(!RE&&this.config.projectName===Qi.projectName&&(RE=true,E.warn(`No project name configured. Traces are being logged to "Default Project".
23
23
  Set OPIK_PROJECT_NAME environment variable or pass projectName to the Opik client
24
24
  to log to a specific project.
25
25
  See https://www.comet.com/docs/opik/tracing/advanced/sdk_configuration`)),this.config.projectName)}async getProjectIdByName(i){let e=await this.api.projects.retrieveProject({name:i});if(!(e!=null&&e.id))throw new Error(`Project "${i}" not found`);return e.id}async resolveProjectId(i){if(i!==void 0)return this.getProjectIdByName(i)}async createAnnotationQueueInternal(i,e){let{name:t,projectName:o,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l}=i,m=e.SCOPE;E.debug(`Creating ${m} annotation queue "${t}"`);let u=o!=null?o:this.config.projectName;try{let d=await this.getProjectIdByName(u),f=ge();return await this.api.annotationQueues.createAnnotationQueue({id:f,projectId:d,name:t,scope:m,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l}),E.debug(`Created ${m} annotation queue "${t}" with ID "${f}"`),new e({id:f,name:t,projectId:d,scope:m,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l},this)}catch(d){throw E.error(`Failed to create ${m} annotation queue "${t}"`,{error:d}),d}}async fetchAnnotationQueueById(i,e,t){E.debug(`Getting ${e} annotation queue with ID "${i}"`);try{let o=await this.api.annotationQueues.getAnnotationQueueById(i);if(o.scope!==e)throw new Error(`Annotation queue "${i}" is not a ${e} queue (scope: ${o.scope})`);return new t(o,this)}catch(o){if(o instanceof k){if(o.statusCode===404)throw new xm(i);E.error(`Failed to get ${e} annotation queue with ID "${i}"`,{error:o});}throw o}}async getAnnotationQueuesByScope(i,e){let{projectName:t,maxResults:o=1e3}=e!=null?e:{};E.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 E.info(`Retrieved ${c.length} ${i} annotation queues`),c}catch(a){throw E.error(`Failed to retrieve ${i} annotation queues`,{error:a}),a}}async deleteAnnotationQueueById(i,e){E.debug(`Deleting ${e} annotation queue with ID "${i}"`);try{await this.api.annotationQueues.deleteAnnotationQueueBatch({ids:[i]}),E.debug(`Successfully deleted ${e} annotation queue with ID "${i}"`);}catch(t){throw E.error(`Failed to delete ${e} annotation queue with ID "${i}"`,{error:t}),t}}async executeSearch(i,e,t,o){let{projectName:a,filterString:s,maxResults:c=1e3,truncate:l=true,waitForAtLeast:m,waitForTimeout:u=60}=e;E.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 Y6(g,m,u*1e3,5e3);if(h.length<m)throw new bm(`Timeout after ${u} seconds: expected ${m} ${i}, but only ${h.length} were found.`);return h}logFeedbackScores(i,e){var t;for(let o of i)e.create({...o,projectName:(t=o.projectName)!=null?t:this.config.projectName,source:Ku.Sdk});}logTracesFeedbackScores(i){this.logFeedbackScores(i,this.traceFeedbackScoresBatchQueue);}logSpansFeedbackScores(i){this.logFeedbackScores(i,this.spanFeedbackScoresBatchQueue);}getOrCreateConfig(i){return this._getOrCreateConfigImpl(i)}_validatePromptProjects(i,e){for(let[t,o]of Object.entries(i))if(o instanceof rr&&o.projectName!==void 0&&o.projectName!==e)throw new Pi(`Field "${t}": prompt project "${o.projectName}" does not match config project "${e}". All prompts referenced in a config must belong to the same project as the config.`)}async _allPromptsSynced(i){let e=Object.values(i).filter(a=>a instanceof rr&&!a.synced);if(e.length===0)return true;let t=Symbol(),o;try{if(await Promise.race([Promise.allSettled(e.map(s=>s.ready())).then(()=>{}),new Promise(s=>{o=setTimeout(()=>s(t),jZ);})])===t)return E.debug("Timed out waiting for prompt sync before creating config."),!1}finally{clearTimeout(o);}return e.every(a=>a.synced)}_makeFallbackConfig(i,e){return gE({values:i,fieldNames:new Set(Object.keys(i)),blueprintId:void 0,blueprintVersion:void 0,isFallback:true,maskId:e})}async _fetchBlueprintFromBackend(i,e){let{blueprintName:t,isLatest:o,hasNamedVersion:a,namedVersion:s,effectiveEnv:c,maskId:l,projectName:m,effectiveVersion:u,fallback:d}=e,f=j2(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 E.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 bE(m,c,l!=null?l:null,g,h,u),g}async _resolveNullBlueprint(i,e){let{projectName:t,effectiveEnv:o,effectiveVersion:a,maskId:s,hasNamedVersion:c,hasExplicitEnv:l,isExplicitBlueprintFromContext:m,isLatest:u,fallback:d}=e;if(c||l||m)throw new Tr(`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 E.debug("Failed to probe project-wide config, using fallback",{error:y}),this._makeFallbackConfig(d,s);throw y}if(h!==null)throw new Tr(`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 Tr(`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:rE(d)});}catch(h){if(h instanceof k&&h.statusCode===409){let y=await i.getBlueprint({maskId:void 0});if(!y)throw new Tr(`Failed to create or fetch config in project "${t}".`);g=y;}else throw h}return bE(t,o,s!=null?s:null,g,null,a),g}_buildConfigFromBlueprint(i,e,t){var s;let o=Object.fromEntries(i.keys().map(c=>[c,i.getRawEntry(c)]));if(e!==void 0){let c=Object.keys(e).filter(l=>o[l]===void 0);if(c.length>0){let l=(s=i.name)!=null?s:i.id;throw new Pi(`Config version "${l}" is missing expected field(s): ${c.join(", ")}. The retrieved version does not contain all fields declared in the fallback.`)}}let a=a2(o,i.values,e!==void 0?Object.keys(e):void 0);return gE({values:a,fieldNames:new Set(Object.keys(e!=null?e:a)),blueprintId:i.id,blueprintVersion:i.name,isFallback:false,maskId:t})}async _getOrCreateConfigImpl(i){var h,y,w,A;if(!It.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 e=i==null?void 0:i.fallback,t=(h=i==null?void 0:i.projectName)!=null?h:this.config.projectName,o=(y=oE())!=null?y:void 0,a=(w=u2())!=null?w:void 0,s=a!==void 0,c=new Ct(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:e});if(f!==null&&!(f instanceof fr))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:e});if(!(C instanceof fr))return C;g=C;}return this._buildConfigFromBlueprint(g,e,o)}};});function C2(p,i){if(!i||typeof i!="object")throw new Error("Arguments must be an object");let e=p.validationSchema,o=e.extend(Object.fromEntries(Object.entries(e.shape).map(([a,s])=>[a,s.refine(c=>c!==void 0,{message:`${a} cannot be undefined`,path:[a]})]))).safeParse(i);if(!o.success){let a=o.error.issues.map(c=>c.path[0]).filter(Boolean),s=[...new Set(a)];throw new Error(EZ(p,i,s))}}function EZ(p,i,e){let t=Object.keys(i),o=e.filter(a=>!(a in i));return `Metric '${p.name}' is skipped, missing required arguments: ${o.join(", ")}. Available arguments: ${t.join(", ")}.`}var I2=n(()=>{});var Zm,D2=n(()=>{q();Zm=class{static calculateAverageScores(i){if(!i||i.length===0)return new Map;let e=new Map;for(let o of i)if(!(!o||!o.scoreResults||o.scoreResults.length===0))for(let a of o.scoreResults){if(!a||a.scoringFailed||typeof a.value!="number")continue;let s=e.get(a.name)||{sum:0,count:0};s.sum+=a.value,s.count+=1,e.set(a.name,s);}let t=new Map;return e.forEach((o,a)=>{t.set(a,o.count>0?o.sum/o.count:0);}),t}static formatScore(i){return i.toFixed(4)}static formatTime(i){let e=Math.floor(i/3600),t=Math.floor(i%3600/60),o=Math.floor(i%60);return `${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}static async generateResultTable(i,e,t,o,a){if(i.length===0){E.info(`