opik 2.2.86 → 2.2.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {link}from'ansi-escapes';import {Logger}from'tslog';import RN from'fs';import xN from'os';import bee from'path';import Ree from'ini';import'dotenv/config';import {v7 as v7$1}from'uuid';import vae from'xxhash-wasm';import Tae from'fast-json-stable-stringify';import {TextDecoder as TextDecoder$1}from'util';import Dae from'mustache';import Fae from'nunjucks';import {formatDistanceToNow}from'date-fns';import {diffStringsUnified}from'jest-diff';import Oae from'fast-deep-equal';import {AsyncLocalStorage}from'async_hooks';import ku from'chalk';import wne from'boxen';import {z as z$1}from'zod';export{z as Ha}from'zod';import kne 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 ree=Object.create;var eo=Object.defineProperty;var mN=Object.getOwnPropertyDescriptor;var tee=Object.getOwnPropertyNames;var oee=Object.prototype.hasOwnProperty;var dN=(p,o)=>(o=Symbol[p])?o:Symbol.for("Symbol."+p),si=p=>{throw TypeError(p)};var iee=(p,o,e)=>o in p?eo(p,o,{enumerable:true,configurable:true,writable:true,value:e}):p[o]=e;var n=(p,o)=>()=>(p&&(o=p(p=0)),o);var V=(p,o)=>{for(var e in o)eo(p,e,{get:o[e],enumerable:true});},aee=(p,o,e,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of tee(o))!oee.call(p,i)&&i!==e&&eo(p,i,{get:()=>o[i],enumerable:!(t=mN(o,i))||t.enumerable});return p};var nee=p=>aee(eo({},"__esModule",{value:true}),p);var uN=p=>{var o;return [,,,ree((o=void 0)!=null?o:null)]},gN=["class","method","getter","setter","accessor","field","value","get","set"],ni=p=>p!==void 0&&typeof p!="function"?si("Function expected"):p,see=(p,o,e,t,i)=>({kind:gN[p],name:o,metadata:t,addInitializer:a=>e._?si("Already initialized"):i.push(ni(a||null))}),qu=(p,o)=>iee(o,dN("metadata"),p[3]),fN=(p,o,e,t)=>{for(var i=0,a=p[o>>1],s=a&&a.length;i<s;i++)a[i].call(e);return t},hN=(p,o,e,t,i,a)=>{var c,l,m,u,d=o&7,f=false,g=false,h=2,y=gN[d+5],A=p[h]||(p[h]=[]),C=((i=i.prototype),mN(i,e));for(var I=t.length-1;I>=0;I--)m=see(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,ni(c)&&(C[y]=c);return C&&eo(i,e,C),i};function lee(p){return p.scoringFailed?false:p.value===1}var pi,wp,_p=n(()=>{pi={runsPerItem:1,passThreshold:1};wp=class{constructor(o){this.allItemsPassed=o.allItemsPassed,this.itemsPassed=o.itemsPassed,this.itemsTotal=o.itemsTotal,this.passRate=o.passRate,this.itemResults=o.itemResults,this.experimentId=o.experimentId,this.experimentName=o.experimentName,this.experimentUrl=o.experimentUrl,this.suiteName=o.suiteName,this.totalTime=o.totalTime;}toReportDict(){var t,i,a;let o=[];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=(i=l.get(d))!=null?i:[];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:lee(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);}o.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=o,e}toDict(){return this.toReportDict()}};});function mee(p){return p.scoreResults.length===0?true:p.scoreResults.every(o=>!!o.value)}function dee(p){let o=new Map;for(let e of p){let t=e.testCase.datasetItemId,i=o.get(t);i?i.push(e):o.set(t,[e]);}return o}function uee(p){var e;let o=new Map;for(let t of p){let i=(e=t.trialId)!=null?e:0,a=o.get(i);a?a.push(t):o.set(i,[t]);}return o}function yN(p,o={}){var m;let e=dee(p.testResults),t=new Map;for(let[u,d]of e){let f=uee(d),g=f.size,h=0;for(let[,F]of f)F.every(mee)&&h++;let w=(m=d[0].resolvedExecutionPolicy)!=null?m:pi,A=w.passThreshold,C=w.runsPerItem,I=h>=A,D=d.some(F=>F.scoreResults.length>0);t.set(u,{datasetItemId:u,passed:I,hasAssertions:D,runsPassed:h,runsTotal:g,configuredRunsPerItem:C,passThreshold:A,testResults:d});}let i=t.size,a=[...t.values()].filter(u=>u.passed).length,s=i===0||a===i,c=[...t.values()].filter(u=>u.hasAssertions),l=c.length===0?void 0:c.filter(u=>u.passed).length/c.length;return new wp({allItemsPassed:s,itemsPassed:a,itemsTotal:i,passRate:l,itemResults:t,experimentId:p.experimentId,experimentName:p.experimentName,experimentUrl:p.resultUrl,suiteName:o.suiteName,totalTime:o.totalTime})}var rg=n(()=>{_p();});function kp(p,o=p){return link(o,p)}var hee,E,bN,yee,re=n(()=>{hee={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}} "}),bN=p=>{E.settings.minLevel=hee[p];},yee=()=>{E.settings.minLevel=100;};bN(process.env.OPIK_LOG_LEVEL||"INFO");});function tg(p){return Object.fromEntries(Object.entries(p).filter(([,o])=>o!==void 0))}function Ap(p){if(p!==void 0)return ["1","true","yes"].includes(String(p).toLowerCase())}function wee(){return tg({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,environment:process.env.OPIK_ENVIRONMENT,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:Ap(process.env.OPIK_HOLD_UNTIL_FLUSH),trackDisable:Ap(process.env.OPIK_TRACK_DISABLE),maxPayloadSizeMb:process.env.OPIK_MAX_PAYLOAD_SIZE_MB&&Number.isFinite(Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB))?Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB):void 0,isAttachmentExtractionActive:Ap(process.env.OPIK_IS_ATTACHMENT_EXTRACTION_ACTIVE),minBase64EmbeddedAttachmentSize:process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE&&Number.isFinite(Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE))?Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE):void 0,promptCacheTtlSeconds:process.env.OPIK_PROMPT_CACHE_TTL_SECONDS?Math.max(1,parseInt(process.env.OPIK_PROMPT_CACHE_TTL_SECONDS,10)||1):void 0})}function _ee(p){return p.replace(/^~(?=$|\/|\\)/,xN.homedir())}function kee(){let p=process.env.OPIK_CONFIG_PATH||xee,o=_ee(p);if(!RN.existsSync(o)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${o}`);return {}}try{let e=Ree.parse(RN.readFileSync(o,"utf8"));return e.opik?tg({apiKey:e.opik.api_key,apiUrl:e.opik.url_override,projectName:e.opik.project_name,workspaceName:e.opik.workspace,trackDisable:Ap(e.opik.track_disable)}):{}}catch(e){return E.error(`Error loading config file ${o}: ${e}`),{}}}function Pp(p){let o=wee(),e=kee(),{headers:t,...i}=p||{};return Aee({...Ke,...e,...o,...tg(i)})}function Aee(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");if(p.trackDisable)return p;let o=Pee(p.apiUrl);if(o&&!p.apiKey)throw new Error("OPIK_API_KEY is not set");if(o&&!p.workspaceName)throw new Error("OPIK_WORKSPACE is not set");return p}function Pee(p){return new URL(p).hostname.endsWith("comet.com")}var xee,Ke,pt=n(()=>{re();xee=bee.join(xN.homedir(),".opik.config"),Ke={apiKey:"",apiUrl:"https://www.comet.com/opik/api",projectName:"Default Project",workspaceName:"default",batchDelayMs:300,holdUntilFlush:false,trackDisable:false,maxPayloadSizeMb:20,isAttachmentExtractionActive:true,minBase64EmbeddedAttachmentSize:256e3};});function zee(p){ig.setTracingActive(p);}function Le(){return ig.isTracingActive()}function See(){ig.resetToConfigDefault();}var og,ig,ro=n(()=>{pt();og=class{constructor(){this.tracingActive=null;}setTracingActive(o){this.tracingActive=o;}resetToConfigDefault(){this.tracingActive=null;}isTracingActive(){if(this.tracingActive!==null)return this.tracingActive;try{return this.tracingActive=!Pp().trackDisable,this.tracingActive}catch{return true}}},ig=new og;});function ci(p,o){return JSON.parse(p,o)}var $e,Br=n(()=>{$e=(p,o,e)=>JSON.stringify(p,o,e);});function vee({message:p,statusCode:o,body:e}){let t=[];return p!=null&&t.push(p),o!=null&&t.push(`Status code: ${o.toString()}`),e!=null&&t.push(`Body: ${$e(e,void 0,2)}`),t.join(`
|
|
2
2
|
`)}var k,zp=n(()=>{Br();k=class extends Error{constructor({message:o,statusCode:e,body:t,rawResponse:i}){super(vee({message:o,statusCode:e,body:t})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=e,this.body=t,this.rawResponse=i;}};});var Mr,wN=n(()=>{Mr=class extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var J=n(()=>{zp();wN();});var li,_N=n(()=>{J();li=class extends k{constructor(o,e){super({message:"BadGatewayError",statusCode:502,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var N,kN=n(()=>{J();N=class extends k{constructor(o,e){super({message:"BadRequestError",statusCode:400,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var X,AN=n(()=>{J();X=class extends k{constructor(o,e){super({message:"ConflictError",statusCode:409,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var fe,PN=n(()=>{J();fe=class extends k{constructor(o,e){super({message:"ForbiddenError",statusCode:403,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ct,ag=n(()=>{J();ct=class extends k{constructor(o,e){super({message:"GoneError",statusCode:410,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var lt,zN=n(()=>{J();lt=class extends k{constructor(o,e){super({message:"InternalServerError",statusCode:500,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var U,SN=n(()=>{J();U=class extends k{constructor(o,e){super({message:"NotFoundError",statusCode:404,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Wr,vN=n(()=>{J();Wr=class extends k{constructor(o,e){super({message:"NotImplementedError",statusCode:501,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var to,TN=n(()=>{J();to=class extends k{constructor(o,e){super({message:"ServiceUnavailableError",statusCode:503,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Qe,jN=n(()=>{J();Qe=class extends k{constructor(o,e){super({message:"TooManyRequestsError",statusCode:429,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var O,EN=n(()=>{J();O=class extends k{constructor(o,e){super({message:"UnauthorizedError",statusCode:401,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ae,CN=n(()=>{J();ae=class extends k{constructor(o,e){super({message:"UnprocessableEntityError",statusCode:422,body:o,rawResponse:e}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var IN=n(()=>{_N();kN();AN();PN();ag();zN();SN();vN();TN();jN();EN();CN();});var ng=n(()=>{});var DN=n(()=>{ng();});var sg={};var UN=n(()=>{DN();});var pg=n(()=>{});var NN=n(()=>{pg();});var FN,BN=n(()=>{FN={Open:"open",Resolved:"resolved",Closed:"closed"};});var MN,WN=n(()=>{MN={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var LN,VN=n(()=>{LN={Open:"open",Resolved:"resolved",Closed:"closed"};});var cg=n(()=>{BN();WN();VN();});var Sp={};V(Sp,{AgentInsightsIssueUpdateStatus:()=>FN,FindAgentInsightsIssuesRequestSeverity:()=>MN,FindAgentInsightsIssuesRequestStatus:()=>LN});var JN=n(()=>{NN();cg();});var lg=n(()=>{});var HN=n(()=>{lg();});var mg={};var GN=n(()=>{HN();});var dg=n(()=>{});var ON=n(()=>{dg();});var KN,$N=n(()=>{KN={Enabled:"enabled",Disabled:"disabled"};});var ug=n(()=>{$N();});var vp={};V(vp,{AgentInsightsJobUpdateStatus:()=>KN});var QN=n(()=>{ON();ug();});var gg=n(()=>{});var YN=n(()=>{gg();});var XN,ZN=n(()=>{XN={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var fg=n(()=>{ZN();});var Tp={};V(Tp,{GetWebhookExamplesRequestAlertType:()=>XN});var qN=n(()=>{YN();fg();});var hg=n(()=>{});var eF=n(()=>{hg();});var yg={};var rF=n(()=>{eF();});var bg=n(()=>{});var tF=n(()=>{bg();});var oF,iF=n(()=>{oF={Trace:"TRACE",Span:"SPAN",Thread:"THREAD"};});var Rg=n(()=>{iF();});var jp={};V(jp,{AssertionResultBatchEntityType:()=>oF});var aF=n(()=>{tF();Rg();});var xg=n(()=>{});var nF=n(()=>{xg();});var sF,pF=n(()=>{sF={Trace:"trace",Span:"span"};});var cF,lF=n(()=>{cF={Trace:"trace",Span:"span"};});var mF,dF=n(()=>{mF={Trace:"trace",Span:"span"};});var uF,gF=n(()=>{uF={Trace:"trace",Span:"span"};});var wg=n(()=>{pF();lF();dF();gF();});var Ep={};V(Ep,{AttachmentListRequestEntityType:()=>sF,DownloadAttachmentRequestEntityType:()=>cF,StartMultipartUploadRequestEntityType:()=>mF,UploadAttachmentRequestEntityType:()=>uF});var fF=n(()=>{nF();wg();});var _g=n(()=>{});var hF=n(()=>{_g();});var kg={};var yF=n(()=>{hF();});var Ag=n(()=>{});var bF=n(()=>{Ag();});var Pg={};var RF=n(()=>{bF();});var xF=n(()=>{});var zg={};var wF=n(()=>{xF();});var Sg=n(()=>{});var _F=n(()=>{Sg();});var vg={};var kF=n(()=>{_F();});var Tg=n(()=>{});var AF=n(()=>{Tg();});var PF,zF=n(()=>{PF={Json:"json",Jsonl:"jsonl"};});var SF,vF=n(()=>{SF={Private:"private",Public:"public"};});var Cp,jg=n(()=>{Cp={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var TF,jF=n(()=>{TF={Private:"private",Public:"public"};});var Eg=n(()=>{zF();vF();jg();jF();});var Ip={};V(Ip,{CreateDatasetItemsFromJsonRequestFormat:()=>PF,DatasetUpdateVisibility:()=>SF,DatasetWriteType:()=>Cp,DatasetWriteVisibility:()=>TF});var EF=n(()=>{AF();Eg();});var Cg=n(()=>{});var CF=n(()=>{Cg();});var Ig={};var IF=n(()=>{CF();});var Dg=n(()=>{});var DF=n(()=>{Dg();});var Dp,Ug=n(()=>{Dp={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var UF,NF=n(()=>{UF={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var FF,BF=n(()=>{FF={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var Ng=n(()=>{Ug();NF();BF();});var Up={};V(Up,{ExperimentWriteEvaluationMethod:()=>Dp,ExperimentWriteStatus:()=>UF,ExperimentWriteType:()=>FF});var MF=n(()=>{DF();Ng();});var Fg=n(()=>{});var WF=n(()=>{Fg();});var LF,VF=n(()=>{LF={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};});var Bg=n(()=>{VF();});var Np={};V(Np,{FindFeedbackDefinitionsRequestType:()=>LF});var JF=n(()=>{WF();Bg();});var Mg=n(()=>{});var HF=n(()=>{Mg();});var Wg={};var GF=n(()=>{HF();});var Lg=n(()=>{});var OF=n(()=>{Lg();});var Vg={};var KF=n(()=>{OF();});var $F=n(()=>{});var Jg={};var QF=n(()=>{$F();});var Hg=n(()=>{});var YF=n(()=>{Hg();});var XF,ZF=n(()=>{XF={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var Gg=n(()=>{ZF();});var Fp={};V(Fp,{ProviderApiKeyWriteProvider:()=>XF});var qF=n(()=>{YF();Gg();});var eB=n(()=>{});var Og={};var rB=n(()=>{eB();});var Kg=n(()=>{});var tB=n(()=>{Kg();});var $g={};var oB=n(()=>{tB();});var iB=n(()=>{});var Qg={};var aB=n(()=>{iB();});var nB=n(()=>{});var Yg={};var sB=n(()=>{nB();});var pB=n(()=>{});var Xg={};var cB=n(()=>{pB();});var Zg=n(()=>{});var lB=n(()=>{Zg();});var mB,dB=n(()=>{mB={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var qg=n(()=>{dB();});var Bp={};V(Bp,{OptimizationUpdateStatus:()=>mB});var uB=n(()=>{lB();qg();});var ef=n(()=>{});var gB=n(()=>{ef();});var fB,hB=n(()=>{fB={Connect:"connect",Endpoint:"endpoint"};});var rf=n(()=>{hB();});var Mp={};V(Mp,{CreateSessionRequestType:()=>fB});var yB=n(()=>{gB();rf();});var tf=n(()=>{});var bB=n(()=>{tf();});var RB,xB=n(()=>{RB={Traces:"traces",Spans:"spans",Threads:"threads"};});var wB,_B=n(()=>{wB={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var kB,AB=n(()=>{kB={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 PB,zB=n(()=>{PB={Private:"private",Public:"public"};});var SB,vB=n(()=>{SB={Private:"private",Public:"public"};});var of=n(()=>{xB();_B();AB();zB();vB();});var Wp={};V(Wp,{KpiCardRequestEntityType:()=>RB,ProjectMetricRequestPublicInterval:()=>wB,ProjectMetricRequestPublicMetricType:()=>kB,ProjectUpdateVisibility:()=>PB,ProjectWriteVisibility:()=>SB});var TB=n(()=>{bB();of();});var af=n(()=>{});var jB=n(()=>{af();});var EB,CB=n(()=>{EB={Text:"text",Chat:"chat"};});var IB,DB=n(()=>{IB={Text:"text",Chat:"chat"};});var UB,NB=n(()=>{UB={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var nf=n(()=>{CB();DB();NB();});var Lp={};V(Lp,{CreatePromptVersionDetailTemplateStructure:()=>EB,PromptWriteTemplateStructure:()=>IB,PromptWriteType:()=>UB});var FB=n(()=>{jB();nf();});var sf=n(()=>{});var BB=n(()=>{sf();});var pf={};var MB=n(()=>{BB();});var cf=n(()=>{});var WB=n(()=>{cf();});var LB,VB=n(()=>{LB={AgentInsights:"agent_insights"};});var lf=n(()=>{VB();});var Vp={};V(Vp,{FindReportFailuresRequestType:()=>LB});var JB=n(()=>{WB();lf();});var mf=n(()=>{});var HB=n(()=>{mf();});var GB,OB=n(()=>{GB={Pending:"pending",Completed:"completed",Failed:"failed"};});var df=n(()=>{OB();});var Jp={};V(Jp,{ReportCompleteRequestStatus:()=>GB});var KB=n(()=>{HB();df();});var uf=n(()=>{});var $B=n(()=>{uf();});var QB,YB=n(()=>{QB={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var gf=n(()=>{YB();});var Hp={};V(Hp,{RetentionRuleWriteRetention:()=>QB});var XB=n(()=>{$B();gf();});var ff=n(()=>{});var ZB=n(()=>{ff();});var qB,eM=n(()=>{qB={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var rM,tM=n(()=>{rM={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var oM,iM=n(()=>{oM={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var aM,nM=n(()=>{aM={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var hf=n(()=>{eM();tM();iM();nM();});var Gp={};V(Gp,{BridgeCommandResultRequestStatus:()=>qB,BridgeCommandSubmitRequestType:()=>rM,ListRunnersRequestStatus:()=>oM,LocalRunnerJobResultRequestStatus:()=>aM});var sM=n(()=>{ZB();hf();});var pM=n(()=>{});var yf={};var cM=n(()=>{pM();});var bf=n(()=>{});var lM=n(()=>{bf();});var mM,dM=n(()=>{mM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var uM,gM=n(()=>{uM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var fM,hM=n(()=>{fM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var yM,bM=n(()=>{yM={Name:"name",Type:"type",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Model:"model",Provider:"provider",Tags:"tags",Usage:"usage",ErrorInfo:"error_info",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",Comments:"comments",TotalEstimatedCost:"total_estimated_cost",TotalEstimatedCostVersion:"total_estimated_cost_version",Duration:"duration",Ttft:"ttft",Source:"source",Environment:"environment"};});var RM,xM=n(()=>{RM={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var Rf=n(()=>{dM();gM();hM();bM();xM();});var Op={};V(Op,{FindFeedbackScoreNames1RequestType:()=>mM,GetSpanStatsRequestType:()=>uM,GetSpansByProjectRequestType:()=>fM,SpanSearchStreamRequestPublicExcludeItem:()=>yM,SpanSearchStreamRequestPublicType:()=>RM});var wM=n(()=>{lM();Rf();});var xf=n(()=>{});var _M=n(()=>{xf();});var wf={};var kM=n(()=>{_M();});var AM=n(()=>{});var _f={};var PM=n(()=>{AM();});var kf=n(()=>{});var zM=n(()=>{kf();});var SM,vM=n(()=>{SM={Name:"name",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Tags:"tags",ErrorInfo:"error_info",Usage:"usage",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",SpanFeedbackScores:"span_feedback_scores",Comments:"comments",GuardrailsValidations:"guardrails_validations",TotalEstimatedCost:"total_estimated_cost",SpanCount:"span_count",LlmSpanCount:"llm_span_count",HasToolSpans:"has_tool_spans",Duration:"duration",Ttft:"ttft",ThreadId:"thread_id",VisibilityMode:"visibility_mode",Providers:"providers",Experiment:"experiment",Source:"source",Environment:"environment"};});var Af=n(()=>{vM();});var Kp={};V(Kp,{TraceSearchStreamRequestPublicExcludeItem:()=>SM});var TM=n(()=>{zM();Af();});var Pf=n(()=>{});var jM=n(()=>{Pf();});var zf={};var EM=n(()=>{jM();});var CM=n(()=>{});var Sf={};var IM=n(()=>{CM();});var vf=n(()=>{});var DM=n(()=>{vf();});var UM,NM=n(()=>{UM={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var FM,BM=n(()=>{FM={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 Tf=n(()=>{NM();BM();});var $p={};V($p,{WorkspaceSpanMetricRequestInterval:()=>UM,WorkspaceSpanMetricRequestMetricType:()=>FM});var MM=n(()=>{DM();Tf();});var WM=n(()=>{ng();UN();pg();JN();cg();lg();GN();dg();QN();ug();gg();qN();fg();hg();rF();bg();aF();Rg();xg();fF();wg();_g();yF();Ag();RF();wF();Sg();kF();Tg();EF();Eg();Cg();IF();Dg();MF();Ng();Fg();JF();Bg();Mg();GF();Lg();KF();QF();Hg();qF();Gg();rB();Kg();oB();aB();sB();cB();Zg();uB();qg();ef();yB();rf();tf();TB();of();af();FB();nf();sf();MB();cf();JB();lf();mf();KB();df();uf();XB();gf();ff();sM();hf();cM();bf();wM();Rf();xf();kM();PM();kf();TM();Af();Pf();EM();IM();vf();MM();Tf();});var LM=n(()=>{});var VM=n(()=>{});var Tee,JM=n(()=>{Tee={Blueprint:"blueprint",Mask:"mask"};});var HM=n(()=>{});var jee,GM=n(()=>{jee={Blueprint:"blueprint",Mask:"mask"};});var OM=n(()=>{});var mi,KM=n(()=>{mi={Blueprint:"blueprint",Mask:"mask"};});var $M=n(()=>{});var QM=n(()=>{});var YM=n(()=>{});var Eee,XM=n(()=>{Eee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var ZM=n(()=>{});var Cee,qM=n(()=>{Cee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var eW=n(()=>{});var Iee,rW=n(()=>{Iee={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var tW=n(()=>{});var oW=n(()=>{});var iW=n(()=>{});var Dee,aW=n(()=>{Dee={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Uee,nW=n(()=>{Uee={Open:"open",Resolved:"resolved",Closed:"closed"};});var sW=n(()=>{});var Nee,pW=n(()=>{Nee={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var Fee,cW=n(()=>{Fee={Open:"open",Resolved:"resolved",Closed:"closed"};});var lW=n(()=>{});var Bee,mW=n(()=>{Bee={Enabled:"enabled",Disabled:"disabled"};});var dW=n(()=>{});var uW=n(()=>{});var Mee,gW=n(()=>{Mee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var fW=n(()=>{});var hW=n(()=>{});var Wee,yW=n(()=>{Wee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var bW=n(()=>{});var RW=n(()=>{});var xW=n(()=>{});var Lee,wW=n(()=>{Lee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var Vee,_W=n(()=>{Vee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var kW=n(()=>{});var Jee,AW=n(()=>{Jee={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var Hee,PW=n(()=>{Hee={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};});var zW=n(()=>{});var Gee,SW=n(()=>{Gee={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};});var vW=n(()=>{});var Oee,TW=n(()=>{Oee={TraceErrors:"trace:errors",TraceFeedbackScore:"trace:feedback_score",TraceThreadFeedbackScore:"trace_thread:feedback_score",PromptCreated:"prompt:created",PromptCommitted:"prompt:committed",TraceGuardrailsTriggered:"trace:guardrails_triggered",PromptDeleted:"prompt:deleted",ExperimentFinished:"experiment:finished",TraceCost:"trace:cost",TraceLatency:"trace:latency"};});var jW=n(()=>{});var Kee,EW=n(()=>{Kee={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var CW=n(()=>{});var IW=n(()=>{});var DW=n(()=>{});var UW=n(()=>{});var NW=n(()=>{});var FW=n(()=>{});var BW=n(()=>{});var MW=n(()=>{});var $ee,WW=n(()=>{$ee={Manual:"manual",Automated:"automated"};});var LW=n(()=>{});var VW=n(()=>{});var JW=n(()=>{});var Qee,HW=n(()=>{Qee={Trace:"trace",Thread:"thread"};});var GW=n(()=>{});var OW=n(()=>{});var Yee,KW=n(()=>{Yee={Trace:"trace",Thread:"thread"};});var $W=n(()=>{});var Xee,QW=n(()=>{Xee={Trace:"trace",Thread:"thread"};});var YW=n(()=>{});var XW=n(()=>{});var Zee,ZW=n(()=>{Zee={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var qee,qW=n(()=>{qee={Passed:"passed",Failed:"failed"};});var e0=n(()=>{});var r0=n(()=>{});var t0=n(()=>{});var o0=n(()=>{});var ere,i0=n(()=>{ere={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};});var a0=n(()=>{});var n0=n(()=>{});var s0=n(()=>{});var p0=n(()=>{});var c0=n(()=>{});var l0=n(()=>{});var m0=n(()=>{});var d0=n(()=>{});var u0=n(()=>{});var rre,g0=n(()=>{rre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var f0=n(()=>{});var h0=n(()=>{});var y0=n(()=>{});var b0=n(()=>{});var tre,R0=n(()=>{tre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var ore,x0=n(()=>{ore={Production:"production",Experiment:"experiment",Both:"both"};});var w0=n(()=>{});var _0=n(()=>{});var ire,k0=n(()=>{ire={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var are,A0=n(()=>{are={Production:"production",Experiment:"experiment",Both:"both"};});var P0=n(()=>{});var z0=n(()=>{});var S0=n(()=>{});var v0=n(()=>{});var T0=n(()=>{});var j0=n(()=>{});var E0=n(()=>{});var C0=n(()=>{});var I0=n(()=>{});var D0=n(()=>{});var U0=n(()=>{});var N0=n(()=>{});var nre,F0=n(()=>{nre={Production:"production",Experiment:"experiment",Both:"both"};});var B0=n(()=>{});var sre,M0=n(()=>{sre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var W0=n(()=>{});var L0=n(()=>{});var V0=n(()=>{});var J0=n(()=>{});var H0=n(()=>{});var pre,G0=n(()=>{pre={Production:"production",Experiment:"experiment",Both:"both"};});var O0=n(()=>{});var K0=n(()=>{});var $0=n(()=>{});var Q0=n(()=>{});var Y0=n(()=>{});var cre,X0=n(()=>{cre={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var lre,Z0=n(()=>{lre={Production:"production",Experiment:"experiment",Both:"both"};});var q0=n(()=>{});var eL=n(()=>{});var rL=n(()=>{});var tL=n(()=>{});var oL=n(()=>{});var iL=n(()=>{});var aL=n(()=>{});var nL=n(()=>{});var sL=n(()=>{});var pL=n(()=>{});var cL=n(()=>{});var lL=n(()=>{});var mL=n(()=>{});var dL=n(()=>{});var mre,uL=n(()=>{mre={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var gL=n(()=>{});var dre,fL=n(()=>{dre={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var hL=n(()=>{});var yL=n(()=>{});var bL=n(()=>{});var ure,RL=n(()=>{ure={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var gre,xL=n(()=>{gre={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var wL=n(()=>{});var fre,_L=n(()=>{fre={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var kL=n(()=>{});var AL=n(()=>{});var PL=n(()=>{});var zL=n(()=>{});var SL=n(()=>{});var vL=n(()=>{});var TL=n(()=>{});var jL=n(()=>{});var EL=n(()=>{});var CL=n(()=>{});var IL=n(()=>{});var hre,DL=n(()=>{hre={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var UL=n(()=>{});var yre,NL=n(()=>{yre={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var bre,FL=n(()=>{bre={Passed:"passed",Failed:"failed"};});var Rre,BL=n(()=>{Rre={Passed:"passed",Failed:"failed"};});var ML=n(()=>{});var WL=n(()=>{});var LL=n(()=>{});var VL=n(()=>{});var JL=n(()=>{});var HL=n(()=>{});var GL=n(()=>{});var xre,OL=n(()=>{xre={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var KL=n(()=>{});var wre,$L=n(()=>{wre={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var _re,QL=n(()=>{_re={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var YL=n(()=>{});var XL=n(()=>{});var ZL=n(()=>{});var qL=n(()=>{});var kre,eV=n(()=>{kre={Trace:"trace",Span:"span"};});var rV=n(()=>{});var tV=n(()=>{});var oV=n(()=>{});var iV=n(()=>{});var aV=n(()=>{});var nV=n(()=>{});var sV=n(()=>{});var pV=n(()=>{});var cV=n(()=>{});var lV=n(()=>{});var mV=n(()=>{});var dV=n(()=>{});var uV=n(()=>{});var gV=n(()=>{});var fV=n(()=>{});var Are,hV=n(()=>{Are={Workspace:"workspace",Insights:"insights"};});var Pre,yV=n(()=>{Pre={MultiProject:"multi_project",Experiments:"experiments"};});var bV=n(()=>{});var zre,RV=n(()=>{zre={MultiProject:"multi_project",Experiments:"experiments"};});var xV=n(()=>{});var Sre,wV=n(()=>{Sre={MultiProject:"multi_project",Experiments:"experiments"};});var _V=n(()=>{});var kV=n(()=>{});var AV=n(()=>{});var PV=n(()=>{});var zV=n(()=>{});var SV=n(()=>{});var vre,vV=n(()=>{vre={Pending:"PENDING",Processing:"PROCESSING",Completed:"COMPLETED",Failed:"FAILED"};});var TV=n(()=>{});var jV=n(()=>{});var EV=n(()=>{});var CV=n(()=>{});var Tre,IV=n(()=>{Tre={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var DV=n(()=>{});var jre,UV=n(()=>{jre={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var NV=n(()=>{});var FV=n(()=>{});var BV=n(()=>{});var Ere,MV=n(()=>{Ere={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var Cre,WV=n(()=>{Cre={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var LV=n(()=>{});var VV=n(()=>{});var jf,JV=n(()=>{jf={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var HV=n(()=>{});var GV=n(()=>{});var Ire,OV=n(()=>{Ire={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Ef,KV=n(()=>{Ef={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var Dre,$V=n(()=>{Dre={Private:"private",Public:"public"};});var Ure,QV=n(()=>{Ure={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Nre,YV=n(()=>{Nre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var XV=n(()=>{});var ZV=n(()=>{});var qV=n(()=>{});var eJ=n(()=>{});var rJ=n(()=>{});var tJ=n(()=>{});var Fre,oJ=n(()=>{Fre={Private:"private",Public:"public"};});var iJ=n(()=>{});var Bre,aJ=n(()=>{Bre={Trace:"trace",Span:"span"};});var nJ=n(()=>{});var sJ=n(()=>{});var pJ=n(()=>{});var cJ=n(()=>{});var lJ=n(()=>{});var mJ=n(()=>{});var dJ=n(()=>{});var uJ=n(()=>{});var gJ=n(()=>{});var fJ=n(()=>{});var hJ=n(()=>{});var yJ=n(()=>{});var bJ=n(()=>{});var RJ=n(()=>{});var xJ=n(()=>{});var wJ=n(()=>{});var _J=n(()=>{});var kJ=n(()=>{});var AJ=n(()=>{});var PJ=n(()=>{});var Mre,zJ=n(()=>{Mre={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var SJ=n(()=>{});var Cf,If=n(()=>{Cf={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var Wre,vJ=n(()=>{Wre={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var TJ=n(()=>{});var Df,Uf=n(()=>{Df={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var jJ=n(()=>{});var EJ=n(()=>{});var CJ=n(()=>{});var IJ=n(()=>{});var DJ=n(()=>{});var UJ=n(()=>{});var Lre,NJ=n(()=>{Lre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var FJ=n(()=>{});var BJ=n(()=>{});var MJ=n(()=>{});var WJ=n(()=>{});var LJ=n(()=>{});var VJ=n(()=>{});var JJ=n(()=>{});var HJ=n(()=>{});var GJ=n(()=>{});var Vre,OJ=n(()=>{Vre={Passed:"passed",Failed:"failed"};});var Jre,KJ=n(()=>{Jre={Default:"default",Hidden:"hidden"};});var $J=n(()=>{});var Hre,QJ=n(()=>{Hre={Default:"default",Hidden:"hidden"};});var YJ=n(()=>{});var XJ=n(()=>{});var Gre,ZJ=n(()=>{Gre={Passed:"passed",Failed:"failed"};});var Ore,qJ=n(()=>{Ore={Default:"default",Hidden:"hidden"};});var eH=n(()=>{});var rH=n(()=>{});var Kre,tH=n(()=>{Kre={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var $re,oH=n(()=>{$re={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Qre,iH=n(()=>{Qre={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var aH=n(()=>{});var nH=n(()=>{});var Yre,sH=n(()=>{Yre={Passed:"passed",Failed:"failed"};});var pH=n(()=>{});var Xre,cH=n(()=>{Xre={Passed:"passed",Failed:"failed"};});var Zre,lH=n(()=>{Zre={Passed:"passed",Failed:"failed"};});var mH=n(()=>{});var dH=n(()=>{});var uH=n(()=>{});var qre,gH=n(()=>{qre={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var Nf,fH=n(()=>{Nf={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var hH=n(()=>{});var ete,yH=n(()=>{ete={Running:"running",Completed:"completed",Cancelled:"cancelled"};});var rte,bH=n(()=>{rte={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var RH=n(()=>{});var xH=n(()=>{});var wH=n(()=>{});var _H=n(()=>{});var kH=n(()=>{});var AH=n(()=>{});var PH=n(()=>{});var zH=n(()=>{});var SH=n(()=>{});var vH=n(()=>{});var TH=n(()=>{});var jH=n(()=>{});var Ff,Bf=n(()=>{Ff={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var EH=n(()=>{});var tte,CH=n(()=>{tte={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var IH=n(()=>{});var ote,DH=n(()=>{ote={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var UH=n(()=>{});var ite,NH=n(()=>{ite={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var FH=n(()=>{});var BH=n(()=>{});var MH=n(()=>{});var ate,WH=n(()=>{ate={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var nte,LH=n(()=>{nte={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var VH=n(()=>{});var JH=n(()=>{});var HH=n(()=>{});var GH=n(()=>{});var OH=n(()=>{});var KH=n(()=>{});var $H=n(()=>{});var QH=n(()=>{});var YH=n(()=>{});var XH=n(()=>{});var ste,ZH=n(()=>{ste={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var pte,qH=n(()=>{pte={Passed:"passed",Failed:"failed"};});var e1=n(()=>{});var r1=n(()=>{});var t1=n(()=>{});var cte,o1=n(()=>{cte={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var lte,i1=n(()=>{lte={Passed:"passed",Failed:"failed"};});var a1=n(()=>{});var n1=n(()=>{});var s1=n(()=>{});var p1=n(()=>{});var c1=n(()=>{});var l1=n(()=>{});var m1=n(()=>{});var d1=n(()=>{});var u1=n(()=>{});var g1=n(()=>{});var f1=n(()=>{});var h1=n(()=>{});var y1=n(()=>{});var b1=n(()=>{});var R1=n(()=>{});var x1=n(()=>{});var w1=n(()=>{});var _1=n(()=>{});var mte,k1=n(()=>{mte={Count:"count",Errors:"errors",AvgDuration:"avg_duration",TotalCost:"total_cost"};});var A1=n(()=>{});var P1=n(()=>{});var z1=n(()=>{});var S1=n(()=>{});var v1=n(()=>{});var T1=n(()=>{});var j1=n(()=>{});var E1=n(()=>{});var dte,C1=n(()=>{dte={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var ute,I1=n(()=>{ute={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var D1=n(()=>{});var gte,U1=n(()=>{gte={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var N1=n(()=>{});var F1=n(()=>{});var B1=n(()=>{});var M1=n(()=>{});var W1=n(()=>{});var fte,L1=n(()=>{fte={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var hte,V1=n(()=>{hte={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var J1=n(()=>{});var yte,H1=n(()=>{yte={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var G1=n(()=>{});var O1=n(()=>{});var K1=n(()=>{});var $1=n(()=>{});var Q1=n(()=>{});var bte,Y1=n(()=>{bte={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var X1=n(()=>{});var Z1=n(()=>{});var Rte,q1=n(()=>{Rte={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var xte,eG=n(()=>{xte={Connect:"connect",Endpoint:"endpoint"};});var rG=n(()=>{});var tG=n(()=>{});var oG=n(()=>{});var wte,iG=n(()=>{wte={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};});var aG=n(()=>{});var nG=n(()=>{});var sG=n(()=>{});var pG=n(()=>{});var _te,cG=n(()=>{_te={Trace:"trace",Thread:"thread",Span:"span"};});var lG=n(()=>{});var mG=n(()=>{});var dG=n(()=>{});var uG=n(()=>{});var gG=n(()=>{});var fG=n(()=>{});var hG=n(()=>{});var yG=n(()=>{});var bG=n(()=>{});var RG=n(()=>{});var xG=n(()=>{});var wG=n(()=>{});var _G=n(()=>{});var kG=n(()=>{});var AG=n(()=>{});var PG=n(()=>{});var zG=n(()=>{});var kte,SG=n(()=>{kte={Pending:"pending",Completed:"completed",Failed:"failed"};});var vG=n(()=>{});var TG=n(()=>{});var jG=n(()=>{});var Ate,EG=n(()=>{Ate={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var Pte,CG=n(()=>{Pte={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var IG=n(()=>{});var DG=n(()=>{});var UG=n(()=>{});var NG=n(()=>{});var FG=n(()=>{});var zte,BG=n(()=>{zte={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var MG=n(()=>{});var WG=n(()=>{});var oo,Mf=n(()=>{oo={Required:"required",Optional:"optional"};});var LG=n(()=>{});var VG=n(()=>{});var JG=n(()=>{});var HG=n(()=>{});var GG=n(()=>{});var OG=n(()=>{});var KG=n(()=>{});var Ste,$G=n(()=>{Ste={Private:"private",Public:"public"};});var QG=n(()=>{});var vte,YG=n(()=>{vte={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var Tte,XG=n(()=>{Tte={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 ZG=n(()=>{});var qG=n(()=>{});var jte,eO=n(()=>{jte={Private:"private",Public:"public"};});var rO=n(()=>{});var tO=n(()=>{});var oO=n(()=>{});var iO=n(()=>{});var aO=n(()=>{});var nO=n(()=>{});var Ete,sO=n(()=>{Ete={Private:"private",Public:"public"};});var pO=n(()=>{});var cO=n(()=>{});var Cte,lO=n(()=>{Cte={Text:"text",Chat:"chat"};});var mO=n(()=>{});var dO=n(()=>{});var Ite,uO=n(()=>{Ite={Text:"text",Chat:"chat"};});var Dte,gO=n(()=>{Dte={Text:"text",Chat:"chat"};});var fO=n(()=>{});var Ute,hO=n(()=>{Ute={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var yO=n(()=>{});var bO=n(()=>{});var RO=n(()=>{});var Nte,xO=n(()=>{Nte={Text:"text",Chat:"chat"};});var Fte,wO=n(()=>{Fte={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var Bte,_O=n(()=>{Bte={PromptVersion:"prompt_version",Mask:"mask"};});var kO=n(()=>{});var AO=n(()=>{});var PO=n(()=>{});var zO=n(()=>{});var SO=n(()=>{});var Mte,vO=n(()=>{Mte={Text:"text",Chat:"chat"};});var Wte,TO=n(()=>{Wte={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var Lte,jO=n(()=>{Lte={PromptVersion:"prompt_version",Mask:"mask"};});var Vte,EO=n(()=>{Vte={Text:"text",Chat:"chat"};});var Jte,CO=n(()=>{Jte={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var IO=n(()=>{});var Hte,DO=n(()=>{Hte={PromptVersion:"prompt_version",Mask:"mask"};});var UO=n(()=>{});var NO=n(()=>{});var Gte,FO=n(()=>{Gte={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var BO=n(()=>{});var Ote,MO=n(()=>{Ote={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var WO=n(()=>{});var LO=n(()=>{});var Kte,VO=n(()=>{Kte={Form:"form",Json:"json",Basic:"basic"};});var $te,JO=n(()=>{$te={Form:"form",Json:"json",Basic:"basic"};});var HO=n(()=>{});var Qte,GO=n(()=>{Qte={Form:"form",Json:"json",Basic:"basic"};});var OO=n(()=>{});var Yte,KO=n(()=>{Yte={TraceDaily:"trace_daily",Experiment:"experiment",DatasetVersion:"dataset_version",TestSuiteVersion:"test_suite_version",AlertEvent:"alert_event",Optimization:"optimization",PromptVersion:"prompt_version"};});var $O=n(()=>{});var QO=n(()=>{});var Xte,YO=n(()=>{Xte={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var XO=n(()=>{});var ZO=n(()=>{});var Zte,qO=n(()=>{Zte={AgentInsights:"agent_insights"};});var eK=n(()=>{});var rK=n(()=>{});var tK=n(()=>{});var qte,oK=n(()=>{qte={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};});var iK=n(()=>{});var aK=n(()=>{});var nK=n(()=>{});var sK=n(()=>{});var eoe,pK=n(()=>{eoe={Organization:"organization",Workspace:"workspace",Project:"project"};});var roe,cK=n(()=>{roe={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var lK=n(()=>{});var toe,mK=n(()=>{toe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var dK=n(()=>{});var ooe,uK=n(()=>{ooe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var gK=n(()=>{});var ioe,fK=n(()=>{ioe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var hK=n(()=>{});var yK=n(()=>{});var bK=n(()=>{});var RK=n(()=>{});var xK=n(()=>{});var wK=n(()=>{});var _K=n(()=>{});var aoe,kK=n(()=>{aoe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var noe,AK=n(()=>{noe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var PK=n(()=>{});var soe,zK=n(()=>{soe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var SK=n(()=>{});var poe,vK=n(()=>{poe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var TK=n(()=>{});var coe,jK=n(()=>{coe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var EK=n(()=>{});var CK=n(()=>{});var IK=n(()=>{});var DK=n(()=>{});var UK=n(()=>{});var loe,NK=n(()=>{loe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var moe,FK=n(()=>{moe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var doe,BK=n(()=>{doe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var MK=n(()=>{});var Rr,Wf=n(()=>{Rr={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var WK=n(()=>{});var uoe,LK=n(()=>{uoe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var goe,VK=n(()=>{goe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var JK=n(()=>{});var HK=n(()=>{});var GK=n(()=>{});var OK=n(()=>{});var foe,KK=n(()=>{foe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var hoe,$K=n(()=>{hoe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var QK=n(()=>{});var YK=n(()=>{});var XK=n(()=>{});var ZK=n(()=>{});var qK=n(()=>{});var e$=n(()=>{});var r$=n(()=>{});var t$=n(()=>{});var o$=n(()=>{});var i$=n(()=>{});var a$=n(()=>{});var n$=n(()=>{});var s$=n(()=>{});var p$=n(()=>{});var c$=n(()=>{});var l$=n(()=>{});var m$=n(()=>{});var d$=n(()=>{});var u$=n(()=>{});var g$=n(()=>{});var f$=n(()=>{});var h$=n(()=>{});var y$=n(()=>{});var b$=n(()=>{});var yoe,R$=n(()=>{yoe={Function:"function"};});var boe,x$=n(()=>{boe={Function:"function"};});var w$=n(()=>{});var _$=n(()=>{});var k$=n(()=>{});var A$=n(()=>{});var P$=n(()=>{});var Roe,z$=n(()=>{Roe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var S$=n(()=>{});var xoe,v$=n(()=>{xoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var T$=n(()=>{});var woe,j$=n(()=>{woe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var E$=n(()=>{});var _oe,C$=n(()=>{_oe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var I$=n(()=>{});var D$=n(()=>{});var koe,U$=n(()=>{koe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Aoe,N$=n(()=>{Aoe={Default:"default",Hidden:"hidden"};});var Poe,F$=n(()=>{Poe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var B$=n(()=>{});var M$=n(()=>{});var zoe,W$=n(()=>{zoe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var L$=n(()=>{});var Soe,V$=n(()=>{Soe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var J$=n(()=>{});var voe,H$=n(()=>{voe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var G$=n(()=>{});var O$=n(()=>{});var K$=n(()=>{});var $$=n(()=>{});var Q$=n(()=>{});var Toe,Y$=n(()=>{Toe={Active:"active",Inactive:"inactive"};});var X$=n(()=>{});var Z$=n(()=>{});var q$=n(()=>{});var eQ=n(()=>{});var rQ=n(()=>{});var joe,tQ=n(()=>{joe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Eoe,oQ=n(()=>{Eoe={Default:"default",Hidden:"hidden"};});var iQ=n(()=>{});var Coe,aQ=n(()=>{Coe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var nQ=n(()=>{});var sQ=n(()=>{});var pQ=n(()=>{});var cQ=n(()=>{});var lQ=n(()=>{});var mQ=n(()=>{});var dQ=n(()=>{});var uQ=n(()=>{});var Ioe,gQ=n(()=>{Ioe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var fQ=n(()=>{});var Doe,hQ=n(()=>{Doe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var yQ=n(()=>{});var Uoe,bQ=n(()=>{Uoe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var Noe,RQ=n(()=>{Noe={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var xQ=n(()=>{});var wQ=n(()=>{});var _Q=n(()=>{});var kQ=n(()=>{});var AQ=n(()=>{});var PQ=n(()=>{});var zQ=n(()=>{});var Foe,SQ=n(()=>{Foe={Success:"success",Failure:"failure"};});var vQ=n(()=>{});var TQ=n(()=>{});var jQ=n(()=>{});var EQ=n(()=>{});var CQ=n(()=>{});var IQ=n(()=>{});var DQ=n(()=>{});var UQ=n(()=>{});var NQ=n(()=>{});var FQ=n(()=>{});var BQ=n(()=>{});var MQ=n(()=>{});var WQ=n(()=>{});var Lf=n(()=>{LM();VM();JM();HM();GM();OM();KM();$M();QM();YM();XM();ZM();qM();eW();rW();tW();oW();iW();aW();nW();sW();pW();cW();lW();mW();dW();uW();gW();fW();hW();yW();bW();RW();xW();wW();_W();kW();AW();PW();zW();SW();vW();TW();jW();EW();CW();IW();DW();UW();NW();FW();BW();MW();WW();LW();VW();JW();HW();GW();OW();KW();$W();QW();YW();XW();ZW();qW();e0();r0();t0();o0();i0();a0();n0();s0();p0();c0();l0();m0();d0();u0();g0();f0();h0();y0();b0();R0();x0();w0();_0();k0();A0();P0();z0();S0();v0();T0();j0();E0();C0();I0();D0();U0();N0();F0();B0();M0();W0();L0();V0();J0();H0();G0();O0();K0();$0();Q0();Y0();X0();Z0();q0();eL();rL();tL();oL();iL();aL();nL();sL();pL();cL();lL();mL();dL();uL();gL();fL();hL();yL();bL();RL();xL();wL();_L();kL();AL();PL();zL();SL();vL();TL();jL();EL();CL();IL();DL();UL();NL();FL();BL();ML();WL();LL();VL();JL();HL();GL();OL();KL();$L();QL();YL();XL();ZL();qL();eV();rV();tV();oV();iV();aV();nV();sV();pV();cV();lV();mV();dV();uV();gV();fV();hV();yV();bV();RV();xV();wV();_V();kV();AV();PV();zV();SV();vV();TV();jV();EV();CV();IV();DV();UV();NV();FV();BV();MV();WV();LV();VV();JV();HV();GV();OV();KV();$V();QV();YV();XV();ZV();qV();eJ();rJ();tJ();oJ();iJ();aJ();nJ();sJ();pJ();cJ();lJ();mJ();dJ();uJ();gJ();fJ();hJ();yJ();bJ();RJ();xJ();wJ();_J();kJ();AJ();PJ();zJ();SJ();If();vJ();TJ();Uf();jJ();EJ();CJ();IJ();DJ();UJ();NJ();FJ();BJ();MJ();WJ();LJ();VJ();JJ();HJ();GJ();OJ();KJ();$J();QJ();YJ();XJ();ZJ();qJ();eH();rH();tH();oH();iH();aH();nH();sH();pH();cH();lH();mH();dH();uH();gH();fH();hH();yH();bH();RH();xH();wH();_H();kH();AH();PH();zH();SH();vH();TH();jH();Bf();EH();CH();IH();DH();UH();NH();FH();BH();MH();WH();LH();VH();JH();HH();GH();OH();KH();$H();QH();YH();XH();ZH();qH();e1();r1();t1();o1();i1();a1();n1();s1();p1();c1();l1();m1();d1();u1();g1();f1();h1();y1();b1();R1();x1();w1();_1();k1();A1();P1();z1();S1();v1();T1();j1();E1();C1();I1();D1();U1();N1();F1();B1();M1();W1();L1();V1();J1();H1();G1();O1();K1();$1();Q1();Y1();X1();Z1();q1();eG();rG();tG();oG();iG();aG();nG();sG();pG();cG();lG();mG();dG();uG();gG();fG();hG();yG();bG();RG();xG();wG();_G();kG();AG();PG();zG();SG();vG();TG();jG();EG();CG();IG();DG();UG();NG();FG();BG();MG();WG();Mf();LG();VG();JG();HG();GG();OG();KG();$G();QG();YG();XG();ZG();qG();eO();rO();tO();oO();iO();aO();nO();sO();pO();cO();lO();mO();dO();uO();gO();fO();hO();yO();bO();RO();xO();wO();_O();kO();AO();PO();zO();SO();vO();TO();jO();EO();CO();IO();DO();UO();NO();FO();BO();MO();WO();LO();VO();JO();HO();GO();OO();KO();$O();QO();YO();XO();ZO();qO();eK();rK();tK();oK();iK();aK();nK();sK();pK();cK();lK();mK();dK();uK();gK();fK();hK();yK();bK();RK();xK();wK();_K();kK();AK();PK();zK();SK();vK();TK();jK();EK();CK();IK();DK();UK();NK();FK();BK();MK();Wf();WK();LK();VK();JK();HK();GK();OK();KK();$K();QK();YK();XK();ZK();qK();e$();r$();t$();o$();i$();a$();n$();s$();p$();c$();l$();m$();d$();u$();g$();f$();h$();y$();b$();R$();x$();w$();_$();k$();A$();P$();z$();S$();v$();T$();j$();E$();C$();I$();D$();U$();N$();F$();B$();M$();W$();L$();V$();J$();H$();G$();O$();K$();$$();Q$();Y$();X$();Z$();q$();eQ();rQ();tQ();oQ();iQ();aQ();nQ();sQ();pQ();cQ();lQ();mQ();dQ();uQ();gQ();fQ();hQ();yQ();bQ();RQ();xQ();wQ();_Q();kQ();AQ();PQ();zQ();SQ();vQ();TQ();jQ();EQ();CQ();IQ();DQ();UQ();NQ();FQ();BQ();MQ();WQ();});var ie={};V(ie,{AgentBlueprintHistoryType:()=>Tee,AgentBlueprintPublicType:()=>jee,AgentBlueprintWriteType:()=>mi,AgentConfigValueHistoryType:()=>Eee,AgentConfigValuePublicType:()=>Cee,AgentConfigValueWriteType:()=>Iee,AgentInsightsIssueSeverity:()=>Dee,AgentInsightsIssueStatus:()=>Uee,AgentInsightsIssueUpdateStatus:()=>FN,AgentInsightsIssueWithDetailsSeverity:()=>Nee,AgentInsightsIssueWithDetailsStatus:()=>Fee,AgentInsightsJobStatus:()=>Bee,AgentInsightsJobUpdateStatus:()=>KN,AlertAlertType:()=>Mee,AlertPublicAlertType:()=>Wee,AlertTriggerConfigPublicType:()=>Lee,AlertTriggerConfigType:()=>Vee,AlertTriggerConfigWriteType:()=>Jee,AlertTriggerEventType:()=>Hee,AlertTriggerPublicEventType:()=>Gee,AlertTriggerWriteEventType:()=>Oee,AlertWriteAlertType:()=>Kee,AnnotationQueueItemPublicSource:()=>$ee,AnnotationQueuePublicScope:()=>Qee,AnnotationQueueScope:()=>Yee,AnnotationQueueWriteScope:()=>Xee,AssertionResultBatchEntityType:()=>oF,AssertionResultBatchItemSource:()=>Zee,AssertionResultBatchItemStatus:()=>qee,AssistantMessageRole:()=>ere,AttachmentListRequestEntityType:()=>sF,AutomationRuleEvaluatorAction:()=>rre,AutomationRuleEvaluatorObjectObjectPublicAction:()=>tre,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>ore,AutomationRuleEvaluatorPublicAction:()=>ire,AutomationRuleEvaluatorPublicTriggerScope:()=>are,AutomationRuleEvaluatorTriggerScope:()=>nre,AutomationRuleEvaluatorUpdateAction:()=>sre,AutomationRuleEvaluatorUpdateTriggerScope:()=>pre,AutomationRuleEvaluatorWriteAction:()=>cre,AutomationRuleEvaluatorWriteTriggerScope:()=>lre,BadGatewayError:()=>li,BadRequestError:()=>N,BreakdownConfigField:()=>mre,BreakdownConfigPublicField:()=>dre,BridgeCommandItemType:()=>ure,BridgeCommandResultRequestStatus:()=>qB,BridgeCommandStatus:()=>gre,BridgeCommandSubmitRequestType:()=>rM,BridgeCommandType:()=>fre,CheckName:()=>hre,CheckPublicName:()=>yre,CheckPublicResult:()=>bre,CheckResult:()=>Rre,ColumnCompareTypesItem:()=>xre,ColumnPublicTypesItem:()=>wre,ColumnTypesItem:()=>_re,CompleteMultipartUploadRequestEntityType:()=>kre,ConflictError:()=>X,CreateDatasetItemsFromJsonRequestFormat:()=>PF,CreatePromptVersionDetailTemplateStructure:()=>EB,CreateSessionRequestType:()=>fB,DashboardPublicScope:()=>Are,DashboardPublicType:()=>Pre,DashboardUpdatePublicType:()=>zre,DashboardWriteType:()=>Sre,DatasetExportJobPublicStatus:()=>vre,DatasetItemCompareSource:()=>Tre,DatasetItemFilterOperator:()=>jre,DatasetItemPublicSource:()=>Ere,DatasetItemSource:()=>Cre,DatasetItemWriteSource:()=>jf,DatasetPublicStatus:()=>Ire,DatasetPublicType:()=>Ef,DatasetPublicVisibility:()=>Dre,DatasetStatus:()=>Ure,DatasetType:()=>Nre,DatasetUpdateVisibility:()=>SF,DatasetVisibility:()=>Fre,DatasetWriteType:()=>Cp,DatasetWriteVisibility:()=>TF,DeleteAttachmentsRequestEntityType:()=>Bre,DownloadAttachmentRequestEntityType:()=>cF,EvaluatorItemCompareType:()=>Mre,EvaluatorItemPublicType:()=>Cf,EvaluatorItemType:()=>Wre,EvaluatorItemWriteType:()=>Df,ExperimentEvaluationMethod:()=>Lre,ExperimentItemCompareStatus:()=>Vre,ExperimentItemCompareTraceVisibilityMode:()=>Jre,ExperimentItemPublicTraceVisibilityMode:()=>Hre,ExperimentItemStatus:()=>Gre,ExperimentItemTraceVisibilityMode:()=>Ore,ExperimentPublicEvaluationMethod:()=>Kre,ExperimentPublicStatus:()=>$re,ExperimentPublicType:()=>Qre,ExperimentRunSummaryCompareStatus:()=>Yre,ExperimentRunSummaryPublicStatus:()=>Xre,ExperimentRunSummaryStatus:()=>Zre,ExperimentStatus:()=>qre,ExperimentType:()=>Nf,ExperimentUpdateStatus:()=>ete,ExperimentUpdateType:()=>rte,ExperimentWriteEvaluationMethod:()=>Dp,ExperimentWriteStatus:()=>UF,ExperimentWriteType:()=>FF,FeedbackScoreBatchItemSource:()=>Ff,FeedbackScoreBatchItemThreadSource:()=>tte,FeedbackScoreCompareSource:()=>ote,FeedbackScoreExperimentItemBulkWriteViewSource:()=>ite,FeedbackScorePublicSource:()=>ate,FeedbackScoreSource:()=>nte,FindAgentInsightsIssuesRequestSeverity:()=>MN,FindAgentInsightsIssuesRequestStatus:()=>LN,FindFeedbackDefinitionsRequestType:()=>LF,FindFeedbackScoreNames1RequestType:()=>mM,FindReportFailuresRequestType:()=>LB,ForbiddenError:()=>fe,GetSpanStatsRequestType:()=>uM,GetSpansByProjectRequestType:()=>fM,GetWebhookExamplesRequestAlertType:()=>XN,GoneError:()=>ct,GuardrailName:()=>ste,GuardrailResult:()=>pte,GuardrailWriteName:()=>cte,GuardrailWriteResult:()=>lte,InternalServerError:()=>lt,KpiCardRequestEntityType:()=>RB,KpiMetricType:()=>mte,ListRunnersRequestStatus:()=>oM,LlmAsJudgeMessagePublicRole:()=>dte,LlmAsJudgeMessageRole:()=>ute,LlmAsJudgeMessageWriteRole:()=>gte,LlmAsJudgeOutputSchemaPublicType:()=>fte,LlmAsJudgeOutputSchemaType:()=>hte,LlmAsJudgeOutputSchemaWriteType:()=>yte,LocalRunnerJobResultRequestStatus:()=>aM,LocalRunnerJobStatus:()=>bte,LocalRunnerStatus:()=>Rte,LocalRunnerType:()=>xte,LogItemLevel:()=>wte,ManualEvaluationRequestEntityType:()=>_te,NotFoundError:()=>U,NotImplementedError:()=>Wr,OllieReportStatus:()=>kte,OptimizationPublicStatus:()=>Ate,OptimizationStatus:()=>Pte,OptimizationUpdateStatus:()=>mB,OptimizationWriteStatus:()=>zte,ParamPresence:()=>oo,ProjectDetailedVisibility:()=>Ste,ProjectMetricRequestPublicInterval:()=>wB,ProjectMetricRequestPublicMetricType:()=>kB,ProjectMetricResponsePublicInterval:()=>vte,ProjectMetricResponsePublicMetricType:()=>Tte,ProjectPublicVisibility:()=>jte,ProjectUpdateVisibility:()=>PB,ProjectVisibility:()=>Ete,ProjectWriteVisibility:()=>SB,PromptDetailTemplateStructure:()=>Cte,PromptPublicTemplateStructure:()=>Ite,PromptTemplateStructure:()=>Dte,PromptType:()=>Ute,PromptVersionDetailTemplateStructure:()=>Nte,PromptVersionDetailType:()=>Fte,PromptVersionDetailVersionType:()=>Bte,PromptVersionPublicTemplateStructure:()=>Mte,PromptVersionPublicType:()=>Wte,PromptVersionPublicVersionType:()=>Lte,PromptVersionTemplateStructure:()=>Vte,PromptVersionType:()=>Jte,PromptVersionVersionType:()=>Hte,PromptWriteTemplateStructure:()=>IB,PromptWriteType:()=>UB,ProviderApiKeyProvider:()=>Gte,ProviderApiKeyPublicProvider:()=>Ote,ProviderApiKeyWriteProvider:()=>XF,ProviderAuthConfigPublicSendAs:()=>Kte,ProviderAuthConfigSendAs:()=>$te,ProviderAuthConfigWriteSendAs:()=>Qte,RecentActivityItemPublicType:()=>Yte,ReportCompleteRequestStatus:()=>GB,ReportFailureType:()=>Zte,ReportedIssueSeverity:()=>Xte,ResponseFormatType:()=>qte,RetentionRulePublicLevel:()=>eoe,RetentionRulePublicRetention:()=>roe,RetentionRuleWriteRetention:()=>QB,ScoreConditionOperator:()=>toe,ScoreConditionPublicOperator:()=>ooe,ScoreConditionWriteOperator:()=>ioe,ServiceUnavailableError:()=>to,SpanExperimentItemBulkWriteViewSource:()=>aoe,SpanExperimentItemBulkWriteViewType:()=>noe,SpanFilterOperator:()=>soe,SpanFilterPublicOperator:()=>poe,SpanFilterWriteOperator:()=>coe,SpanPublicSource:()=>loe,SpanPublicType:()=>moe,SpanSearchStreamRequestPublicExcludeItem:()=>yM,SpanSearchStreamRequestPublicType:()=>RM,SpanSource:()=>doe,SpanType:()=>Rr,SpanUpdateSource:()=>uoe,SpanUpdateType:()=>goe,SpanWriteSource:()=>foe,SpanWriteType:()=>hoe,StartMultipartUploadRequestEntityType:()=>mF,TooManyRequestsError:()=>Qe,ToolCallType:()=>yoe,ToolType:()=>boe,TraceExperimentItemBulkWriteViewSource:()=>Roe,TraceFilterOperator:()=>xoe,TraceFilterPublicOperator:()=>woe,TraceFilterWriteOperator:()=>_oe,TracePublicSource:()=>koe,TracePublicVisibilityMode:()=>Aoe,TraceSearchStreamRequestPublicExcludeItem:()=>SM,TraceSource:()=>Poe,TraceThreadFilterOperator:()=>zoe,TraceThreadFilterPublicOperator:()=>Soe,TraceThreadFilterWriteOperator:()=>voe,TraceThreadStatus:()=>Toe,TraceUpdateSource:()=>joe,TraceVisibilityMode:()=>Eoe,TraceWriteSource:()=>Coe,UnauthorizedError:()=>O,UnprocessableEntityError:()=>ae,UploadAttachmentRequestEntityType:()=>uF,ValueEntryCompareSource:()=>Ioe,ValueEntryExperimentItemBulkWriteViewSource:()=>Doe,ValueEntryPublicSource:()=>Uoe,ValueEntrySource:()=>Noe,WebhookTestResultStatus:()=>Foe,WorkspaceSpanMetricRequestInterval:()=>UM,WorkspaceSpanMetricRequestMetricType:()=>FM,agentConfigs:()=>sg,agentInsights:()=>Sp,agentInsightsEnrollment:()=>mg,agentInsightsJobs:()=>vp,alerts:()=>Tp,annotationQueues:()=>yg,assertionResults:()=>jp,attachments:()=>Ep,automationRuleEvaluators:()=>kg,chatCompletions:()=>Pg,check:()=>zg,dashboards:()=>vg,datasets:()=>Ip,environments:()=>Ig,experiments:()=>Up,feedbackDefinitions:()=>Np,guardrails:()=>Wg,insightsViews:()=>Vg,llmModels:()=>Jg,llmProviderKey:()=>Fp,manualEvaluation:()=>Og,mcpOAuth:()=>$g,ollama:()=>Qg,ollieState:()=>Yg,openTelemetryIngestion:()=>Xg,optimizations:()=>Bp,pairing:()=>Mp,projects:()=>Wp,prompts:()=>Lp,redirect:()=>pf,reportFailures:()=>Vp,reports:()=>Jp,retentionRules:()=>Hp,runners:()=>Gp,serviceToggles:()=>yf,spans:()=>Op,systemAnalyticsQueries:()=>wf,systemUsage:()=>_f,traces:()=>Kp,welcomeWizard:()=>zf,workspacePermissions:()=>Sf,workspaces:()=>$p});var oe=n(()=>{IN();WM();Lf();});function z(...p){let o={};for(let[e,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=e.toLowerCase();t!=null?o[i]=t:i in o&&delete o[i];}return o}function T(...p){let o={};for(let[e,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=e.toLowerCase();t!=null&&(o[i]=t);}return o}var $=n(()=>{});var Vf,Jf=n(()=>{Vf={get:async(p,o)=>typeof p=="function"?p(o):p};});function Hf(p){return p==null?Boe:p instanceof io?p:(p=p!=null?p:{},(p.level)!=null||(p.level=Ve.Info),(p.logger)!=null||(p.logger=new mt),(p.silent)!=null||(p.silent=true),new io(p))}var Ve,LQ,mt,io,Boe,Qp=n(()=>{Ve={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},LQ={[Ve.Debug]:1,[Ve.Info]:2,[Ve.Warn]:3,[Ve.Error]:4},mt=class{debug(o,...e){console.debug(o,...e);}info(o,...e){console.info(o,...e);}warn(o,...e){console.warn(o,...e);}error(o,...e){console.error(o,...e);}},io=class{constructor(o){this.level=LQ[o.level],this.logger=o.logger,this.silent=o.silent;}shouldLog(o){return !this.silent&&this.level<=LQ[o]}isDebug(){return this.shouldLog(Ve.Debug)}debug(o,...e){this.isDebug()&&this.logger.debug(o,...e);}isInfo(){return this.shouldLog(Ve.Info)}info(o,...e){this.isInfo()&&this.logger.info(o,...e);}isWarn(){return this.shouldLog(Ve.Warn)}warn(o,...e){this.isWarn()&&this.logger.warn(o,...e);}isError(){return this.shouldLog(Ve.Error)}error(o,...e){this.isError()&&this.logger.error(o,...e);}};Boe=new io({level:Ve.Info,logger:new mt,silent:true});});function VQ(p,o){if(p===void 0||p===null)return "";let e=String(p);return o?encodeURIComponent(e):e}function Gf(p,o="",e){let t=[];for(let[i,a]of Object.entries(p)){let s=o?`${o}[${i}]`:i;if(a!==void 0)if(Array.isArray(a)){if(a.length===0)continue;for(let c=0;c<a.length;c++){let l=a[c];if(l!==void 0)if(typeof l=="object"&&!Array.isArray(l)&&l!==null){let m=e.arrayFormat==="indices"?`${s}[${c}]`:s;t.push(...Gf(l,m,e));}else {let m=e.arrayFormat==="indices"?`${s}[${c}]`:s,u=e.encode?encodeURIComponent(m):m;t.push(`${u}=${VQ(l,e.encode)}`);}}}else if(typeof a=="object"&&a!==null){if(Object.keys(a).length===0)continue;t.push(...Gf(a,s,e));}else {let c=e.encode?encodeURIComponent(s):s;t.push(`${c}=${VQ(a,e.encode)}`);}}return t}function dt(p,o){return p==null||typeof p!="object"?"":Gf(p,"",{...Woe,...o}).join("&")}var Woe,di=n(()=>{Woe={arrayFormat:"indices",encode:true};});function JQ(p,o){let e=dt(o,{arrayFormat:"repeat"});return e?`${p}?${e}`:p}var HQ=n(()=>{di();});function GQ(p){let o={get bodyUsed(){return p.bodyUsed},stream:()=>p.body,arrayBuffer:p.arrayBuffer.bind(p),blob:p.blob.bind(p)};return "bytes"in p&&typeof p.bytes=="function"&&(o.bytes=p.bytes.bind(p)),o}var OQ=n(()=>{});async function Yp(p,o){switch(o){case "binary-response":return GQ(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 ci(e)}catch{return {ok:false,error:{reason:"non-json",statusCode:p.status,rawBody:e}}}}var Of=n(()=>{Br();OQ();});async function KQ(p){var e,t,i;let o=(e=p.headers.get("Content-Type"))==null?void 0:e.toLowerCase();if(o==null||o.length===0)return Yp(p);switch(o.indexOf(";")!==-1&&(o=(i=(t=o.split(";")[0])==null?void 0:t.trim())!=null?i:""),o){case "application/hal+json":case "application/json":case "application/ld+json":case "application/problem+json":case "application/vnd.api+json":case "text/json":{let a=await p.text();return a.length>0?ci(a):void 0}default:if(o.startsWith("application/vnd.")&&o.endsWith("+json")){let a=await p.text();return a.length>0?ci(a):void 0}return await p.text()}}var $Q=n(()=>{Br();Of();});async function QQ(){return fetch}var YQ=n(()=>{});async function XQ({body:p,type:o}){return o==="form"?dt(p,{arrayFormat:"repeat",encode:true}):o.includes("json")?$e(p):p}var ZQ=n(()=>{Br();di();});var Lr,Kf=n(()=>{typeof globalThis.Headers!="undefined"?Lr=globalThis.Headers:Lr=class qQ{constructor(o){if(this.headers=new Map,o)if(o instanceof qQ)o.forEach((e,t)=>this.append(t,e));else if(Array.isArray(o))for(let[e,t]of o)if(typeof e=="string"&&typeof t=="string")this.append(e,t);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[e,t]of Object.entries(o))if(typeof t=="string")this.append(e,t);else throw new TypeError("Header values must be strings")}append(o,e){let t=o.toLowerCase(),i=this.headers.get(t)||[];this.headers.set(t,[...i,e]);}delete(o){let e=o.toLowerCase();this.headers.delete(e);}get(o){let e=o.toLowerCase(),t=this.headers.get(e);return t?t.join(", "):null}has(o){let e=o.toLowerCase();return this.headers.has(e)}set(o,e){let t=o.toLowerCase();this.headers.set(t,[e]);}forEach(o,e){let t=e?o.bind(e):o;this.headers.forEach((i,a)=>t(i.join(", "),a,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[o,e]of this.headers.entries())yield [o,e.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let o of this.headers.values())yield o.join(", ");}[Symbol.iterator](){return this.entries()}};});function e4(p){let o=new AbortController,e=setTimeout(()=>o.abort(Loe),p);return {signal:o.signal,abortId:e}}function r4(...p){let o=p.length===1&&Array.isArray(p[0])?p[0]:p,e=new AbortController;for(let t of o){if(t.aborted){e.abort(t==null?void 0:t.reason);break}t.addEventListener("abort",()=>e.abort(t==null?void 0:t.reason),{signal:e.signal});}return e.signal}var Loe,t4=n(()=>{Loe="timeout";});var o4,i4=n(()=>{t4();o4=async(p,o,e,t,i,a,s,c,l)=>{let m=[],u;if(a!=null){let{signal:g,abortId:h}=e4(a);u=h,m.push(g);}s!=null&&m.push(s);let d=r4(m),f=await p(o,{method:e,headers:t,body:i,signal:d,credentials:c?"include":void 0,duplex:l});return u!=null&&clearTimeout(u),f};});function qp(p){return {headers:p.headers,redirected:p.redirected,status:p.status,statusText:p.statusText,type:p.type,url:p.url}}var Xp,Zp,$f=n(()=>{Kf();Xp={headers:new Lr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},Zp={headers:new Lr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};});function Voe(p){let o=1+Math.random()*.2;return p*o}function Joe(p){let o=1+(Math.random()-.5)*.2;return p*o}function Hoe(p,o){let e=p.headers.get("Retry-After");if(e){let i=parseInt(e,10);if(!Number.isNaN(i)&&i>0)return Math.min(i*1e3,6e4);let a=new Date(e);if(!Number.isNaN(a.getTime())){let s=a.getTime()-Date.now();if(s>0)return Math.min(Math.max(s,0),6e4)}}let t=p.headers.get("X-RateLimit-Reset");if(t){let i=parseInt(t,10);if(!Number.isNaN(i)){let a=i*1e3-Date.now();if(a>0)return Voe(Math.min(a,6e4))}}return Joe(Math.min(1e3*2**o,6e4))}async function a4(p,o=2){let e=await p();for(let t=0;t<o&&([408,429].includes(e.status)||e.status>=500);++t){let i=Hoe(e,t);await new Promise(a=>setTimeout(a,i)),e=await p();}return e}var n4=n(()=>{});function Qf(p){let o={};for(let[e,t]of p instanceof Lr?p.entries():Object.entries(p))Goe.has(e.toLowerCase())?o[e]="[REDACTED]":o[e]=t;return o}function Ooe(p){if(p==null)return p;let o={};for(let[e,t]of Object.entries(p))Yf.has(e.toLowerCase())?o[e]="[REDACTED]":o[e]=t;return o}function ut(p){let o=p.indexOf("://");if(o===-1)return p;let e=o+3,t=p.indexOf("/",e),i=p.indexOf("?",e),a=p.indexOf("#",e),s=Math.min(t===-1?p.length:t,i===-1?p.length:i,a===-1?p.length:a),c=-1;for(let h=e;h<s;h++)p[h]==="@"&&(c=h);if(c!==-1&&(p=`${p.slice(0,e)}[REDACTED]@${p.slice(c+1)}`),i=p.indexOf("?"),i===-1)return p;a=p.indexOf("#",i);let l=a!==-1?a:p.length,m=p.slice(i+1,l);if(m.length===0)return p;let u=m.toLowerCase();if(!(u.includes("token")||u.includes("key")||u.includes("password")||u.includes("passwd")||u.includes("secret")||u.includes("session")||u.includes("auth")))return p;let f=[],g=m.split("&");for(let h of g){let y=h.indexOf("=");if(y===-1){f.push(h);continue}let w=h.slice(0,y),A=Yf.has(w.toLowerCase());if(!A&&w.includes("%"))try{let C=decodeURIComponent(w);A=Yf.has(C.toLowerCase());}catch{}f.push(A?`${w}=[REDACTED]`:h);}return p.slice(0,i+1)+f.join("&")+p.slice(l)}async function Koe(p){var e;let o=new Lr;if(o.set("Accept",p.responseType==="json"?"application/json":p.responseType==="text"?"text/plain":"*/*"),p.body!==void 0&&p.contentType!=null&&o.set("Content-Type",p.contentType),p.headers==null)return o;for(let[t,i]of Object.entries(p.headers)){let a=await Vf.get(i,{endpointMetadata:(e=p.endpointMetadata)!=null?e:{}});if(typeof a=="string"){o.set(t,a);continue}a!=null&&o.set(t,`${a}`);}return o}async function $oe(p){var s,c,l;let o=JQ(p.url,p.queryParameters),e=await XQ({body:p.body,type:(s=p.requestType)!=null?s:"other"}),t=(c=p.fetchFn)!=null?c:await QQ(),i=await Koe(p),a=Hf(p.logging);if(a.isDebug()){let m={method:p.method,url:ut(o),headers:Qf(i),queryParameters:Ooe(p.queryParameters),hasBody:e!=null};a.debug("Making HTTP request",m);}try{let m=await a4(async()=>o4(t,o,p.method,i,e,p.timeoutMs,p.abortSignal,p.withCredentials,p.duplex),p.maxRetries);if(m.status>=200&&m.status<400){if(a.isDebug()){let d={method:p.method,url:ut(o),statusCode:m.status,responseHeaders:Qf(m.headers)};a.debug("HTTP request succeeded",d);}return {ok:!0,body:await Yp(m,p.responseType),headers:m.headers,rawResponse:qp(m)}}else {if(a.isError()){let u={method:p.method,url:ut(o),statusCode:m.status,responseHeaders:Qf(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 KQ(m)},rawResponse:qp(m)}}}catch(m){if((l=p.abortSignal)!=null&&l.aborted){if(a.isError()){let u={method:p.method,url:ut(o)};a.error("HTTP request was aborted",u);}return {ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Xp}}else if(m instanceof Error&&m.name==="AbortError"){if(a.isError()){let u={method:p.method,url:ut(o),timeoutMs:p.timeoutMs};a.error("HTTP request timed out",u);}return {ok:false,error:{reason:"timeout"},rawResponse:Xp}}else if(m instanceof Error){if(a.isError()){let u={method:p.method,url:ut(o),errorMessage:m.message};a.error("HTTP request failed with error",u);}return {ok:false,error:{reason:"unknown",errorMessage:m.message},rawResponse:Zp}}if(a.isError()){let u={method:p.method,url:ut(o),error:$e(m)};a.error("HTTP request failed with unknown error",u);}return {ok:false,error:{reason:"unknown",errorMessage:$e(m)},rawResponse:Zp}}}var Goe,Yf,S,s4=n(()=>{Br();Qp();HQ();Jf();$Q();YQ();ZQ();Of();Kf();i4();$f();n4();Goe=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"]);Yf=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=$oe;});var p4=n(()=>{});var P,c4=n(()=>{P=class p extends Promise{constructor(o){super(e=>{e(void 0);}),this.innerPromise=o;}static fromFunction(o,...e){return new p(o(...e))}static interceptFunction(o){return (...e)=>p.fromPromise(o(...e))}static fromPromise(o){return new p(o)}static fromExecutor(o){let e=new Promise(o);return new p(e)}static fromResult(o){let e=Promise.resolve(o);return new p(e)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:o})=>o)),this.unwrappedPromise}then(o,e){return this.unwrap().then(o,e)}catch(o){return this.unwrap().catch(o)}finally(o){return this.unwrap().finally(o)}async withRawResponse(){return await this.innerPromise}};});var x,l4=n(()=>{x={get:async p=>typeof p=="function"?p():p};});var m4=n(()=>{Jf();s4();p4();c4();$f();l4();});async function Qoe(p){let{data:o,filename:e,contentLength:t,contentType:i}=await Zf(p),a={body:o,headers:{}};return e&&(a.headers["Content-Disposition"]=`attachment; filename="${e}"`),i&&(a.headers["Content-Type"]=i),t!=null&&(a.headers["Content-Length"]=t.toString()),a}async function Xf(p){let{data:o,filename:e,contentType:t}=await Zf(p,{noSniffFileSize:true});return {data:o,filename:e,contentType:t}}async function Zf(p,{noSniffFileSize:o}={}){var e,t,i,a,s;if(Yoe(p))return Zf({data:p},{noSniffFileSize:o});if("path"in p){let c=await import('fs');if(!c||!c.createReadStream)throw new Error("File path uploads are not supported in this environment.");let l=c.createReadStream(p.path),m=(e=p.contentLength)!=null?e:o===true?void 0:await d4(p.path),u=(t=p.filename)!=null?t:u4(p.path);return {data:l,filename:u,contentType:p.contentType,contentLength:m}}if("data"in p){let c=p.data,l=(i=p.contentLength)!=null?i:await Zoe(c,{noSniffFileSize:o}),m=(a=p.filename)!=null?a:Xoe(c);return {data:c,filename:m,contentType:(s=p.contentType)!=null?s:qoe(c),contentLength:l}}throw new Error(`Invalid FileUpload of type ${typeof p}: ${JSON.stringify(p)}`)}function Yoe(p){return f4(p)||h4(p)||y4(p)||oie(p)||qf(p)||eh(p)||rie(p)||tie(p)}async function d4(p){try{let o=await import('fs');return !o||!o.promises||!o.promises.stat?void 0:(await o.promises.stat(p)).size}catch{return}}function Xoe(p){if(eie(p))return p.name;if(g4(p))return u4(p.path.toString())}async function Zoe(p,{noSniffFileSize:o}={}){if(f4(p))return p.length;if(h4(p)||y4(p))return p.byteLength;if(qf(p)||eh(p))return p.size;if(o!==true&&g4(p))return await d4(p.path.toString())}function qoe(p){if(qf(p)||eh(p))return p.type}function u4(p){let o=p.lastIndexOf("/"),e=p.lastIndexOf("\\"),t=Math.max(o,e);return t>=0?p.substring(t+1):p}function eie(p){return typeof p=="object"&&p!=null&&"name"in p}function g4(p){return typeof p=="object"&&p!=null&&"path"in p}function rie(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function tie(p){return typeof p=="object"&&p!=null&&"getReader"in p}function f4(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function h4(p){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(p)}function y4(p){return typeof ArrayBuffer!="undefined"&&p instanceof ArrayBuffer}function oie(p){return typeof Uint8Array!="undefined"&&p instanceof Uint8Array}function qf(p){return typeof Blob!="undefined"&&p instanceof Blob}function eh(p){return typeof File!="undefined"&&p instanceof File}var b4=n(()=>{});var R4=n(()=>{});var ui={};V(ui,{toBinaryUploadRequest:()=>Qoe,toMultipartDataPart:()=>Xf});var rh=n(()=>{b4();R4();});var x4=n(()=>{di();});function iie(){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 ao,w4=n(()=>{ao=iie();});var th=n(()=>{w4();});async function ih(){return new oh}function aie(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function _4(p){return typeof p=="object"&&p!=null&&"getReader"in p}function nie(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function sie(p){return ArrayBuffer.isView(p)}async function pie(p){if(ao.type==="node"){let{Readable:o}=await import('stream');if(p instanceof o){let e=[];for await(let t of p)e.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(e)}}if(_4(p)){let o=p.getReader(),e=[];try{for(;;){let{done:s,value:c}=await o.read();if(s)break;e.push(c);}}finally{o.releaseLock();}let t=e.reduce((s,c)=>s+c.length,0),i=new Uint8Array(t),a=0;for(let s of e)i.set(s,a),a+=s.length;return Buffer.from(i)}throw new Error(`Unsupported stream type: ${typeof p}. Expected Node.js Readable stream or Web ReadableStream.`)}async function cie(p,o){if(aie(p)||_4(p)){let e=await pie(p);return new Blob([e],{type:o})}return p instanceof Blob?p:nie(p)?new Blob([p],{type:o}):p instanceof ArrayBuffer?new Blob([p],{type:o}):sie(p)?new Blob([p],{type:o}):typeof p=="string"?new Blob([p],{type:o}):typeof p=="object"&&p!==null?new Blob([$e(p)],{type:o!=null?o:"application/json"}):new Blob([String(p)],{type:o})}var oh,k4=n(()=>{rh();Br();th();oh=class{constructor(){this.fd=new FormData;}async setup(){}append(o,e){this.fd.append(o,String(e));}async appendFile(o,e){let{data:t,filename:i,contentType:a}=await Xf(e),s=await cie(t,a);i?this.fd.append(o,s,i):this.fd.append(o,s);}getRequest(){return {body:this.fd,headers:{},duplex:"half"}}};});var A4=n(()=>{x4();k4();});var gi={};V(gi,{ConsoleLogger:()=>mt,LogLevel:()=>Ve,Logger:()=>io,createLogger:()=>Hf});var P4=n(()=>{Qp();});var K,he=n(()=>{K={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};});function se(p,o){return `Expected ${o}. Received ${lie(p)}.`}function lie(p){if(Array.isArray(p))return "list";if(p===null)return "null";if(p instanceof BigInt)return "BigInt";switch(typeof p){case "string":return `"${p}"`;case "bigint":case "number":case "boolean":case "undefined":return `${p}`}return typeof p}var ze=n(()=>{});function ye(p){return {...p,json:z4(p.json),parse:z4(p.parse)}}function z4(p){return (o,e)=>{let t=p(o,e),{skipValidation:i=false}=e!=null?e:{};return !t.ok&&i?(console.warn(["Failed to validate.",...t.errors.map(a=>" - "+(a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message))].join(`
|
|
3
|
-
`)),{ok:true,value:o}):t}}var mr=n(()=>{});function ec(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var ah=n(()=>{});var no,nh=n(()=>{ah();no=class p extends Error{constructor(e){super(e.map(ec).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var so,sh=n(()=>{ah();so=class p extends Error{constructor(e){super(e.map(ec).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ce(p){return {nullable:()=>mie(p),optional:()=>ph(p),optionalNullable:()=>die(p),transform:o=>ch(p,o),parseOrThrow:(o,e)=>{let t=p.parse(o,e);if(t.ok)return t.value;throw new so(t.errors)},jsonOrThrow:(o,e)=>{let t=p.json(o,e);if(t.ok)return t.value;throw new no(t.errors)}}}function mie(p){let o={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.NULLABLE};return {...o,...ce(o)}}function ph(p){let o={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL};return {...o,...ce(o)}}function die(p){let o={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL_NULLABLE};return {...o,...ce(o)}}function ch(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);return a.ok?{ok:true,value:o.transform(a.value)}:a},json:(t,i)=>{let a=o.untransform(t);return p.json(a,i)},getType:()=>p.getType()};return {...e,...ce(e)}}var S4=n(()=>{he();nh();sh();});var Ie=n(()=>{S4();nh();sh();});function v4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o=="bigint"?{ok:true,value:o}:typeof o=="number"?{ok:true,value:BigInt(o)}:{ok:false,errors:[{path:e,message:se(o,"bigint | number")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="bigint"?{ok:false,errors:[{path:e,message:se(o,"bigint")}]}:{ok:true,value:o},getType:()=>K.BIGINT};return {...ye(p),...ce(p)}}var T4=n(()=>{he();ze();mr();Ie();});var j4=n(()=>{T4();});function E4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:e,message:se(o,"string")}]}:uie.test(o)?{ok:true,value:new Date(o)}:{ok:false,errors:[{path:e,message:se(o,"ISO 8601 date string")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>o instanceof Date?{ok:true,value:o.toISOString()}:{ok:false,errors:[{path:e,message:se(o,"Date object")}]},getType:()=>K.DATE};return {...ye(p),...ce(p)}}var uie,C4=n(()=>{he();ze();mr();Ie();uie=/^([+-]?\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 I4=n(()=>{C4();});function be(p,o){return ()=>{let e={parse:o,json:o,getType:()=>p};return {...ye(e),...ce(e)}}}var dr=n(()=>{Ie();mr();});function rc(p){let o=new Set(p);return be(K.ENUM,(t,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:se(t,"string")}]}:!o.has(t)&&!i?{ok:false,errors:[{path:a,message:se(t,"enum")}]}:{ok:true,value:t})()}var D4=n(()=>{he();dr();ze();});var lh=n(()=>{D4();});function U4(p){let o=mh(p);return {...o,...ce(o)}}function mh(p){return {parse:(o,e)=>po(p).parse(o,e),json:(o,e)=>po(p).json(o,e),getType:()=>po(p).getType()}}function po(p){let o=p;return o.__zurg_memoized==null&&(o.__zurg_memoized=p()),o.__zurg_memoized}var dh=n(()=>{Ie();});function fi(p){return Object.entries(p)}var uh=n(()=>{});function hi(p,o){let e=new Set(o);return Object.entries(p).reduce((t,[i,a])=>(e.has(i)&&(t[i]=a),t),{})}var gh=n(()=>{});function xr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let o=p;for(;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(p)===o}var yi=n(()=>{});function bi(p){return Object.keys(p)}var fh=n(()=>{});function N4(p,o){let e=[],t=[];for(let i of p)o(i)?e.push(i):t.push(i);return [e,t]}var F4=n(()=>{});function Ze(p){return {withParsedProperties:o=>hh(p,o)}}function hh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);if(!a.ok)return a;let s=Object.entries(o).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,i)=>{var c;if(!xr(t))return {ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:se(t,"object")}]};let a=new Set(Object.keys(o)),s=hi(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,i)},getType:()=>p.getType()};return {...e,...ce(e),...Ze(e)}}var B4=n(()=>{gh();ze();yi();Ie();});var Ri=n(()=>{B4();});function M4(p,o){return {rawKey:p,valueSchema:o,isProperty:true}}function Vr(p){return p.isProperty}var yh=n(()=>{});function tc(p){let o={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Vr(t)?t.rawKey:e),_getParsedProperties:()=>bi(p),parse:(e,t)=>{let i={},a=[];for(let[s,c]of fi(p)){let l=Vr(c)?c.rawKey:s,m=Vr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};i[l]=u,V4(m)&&a.push(l);}return W4({value:e,requiredKeys:a,getProperty:s=>{let c=i[s];if(c!=null)return {transformedKey:c.parsedKey,transform:l=>{var m;return c.valueSchema.parse(l,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],s]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},json:(e,t)=>{let i=[];for(let[a,s]of fi(p)){let c=Vr(s)?s.valueSchema:s;V4(c)&&i.push(a);}return W4({value:e,requiredKeys:i,getProperty:a=>{let s=p[a];if(s!=null)return Vr(s)?{transformedKey:s.rawKey,transform:c=>{var l;return s.valueSchema.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}:{transformedKey:a,transform:c=>{var l;return s.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},getType:()=>K.OBJECT};return {...ye(o),...ce(o),...Ze(o),...gt(o)}}function W4({value:p,requiredKeys:o,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:i=false,breadcrumbsPrefix:a=[]}){if(!xr(p))return {ok:false,errors:[{path:a,message:se(p,"object")}]};let s=new Set(o),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...o.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||i?{ok:true,value:l}:{ok:false,errors:c}}function gt(p){return {extend:o=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...o._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...o._getRawProperties()],parse:(t,i)=>L4({extensionKeys:o._getRawProperties(),value:t,transformBase:a=>p.parse(a,i),transformExtension:a=>o.parse(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>L4({extensionKeys:o._getParsedProperties(),value:t,transformBase:a=>p.json(a,i),transformExtension:a=>o.json(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.OBJECT};return {...e,...ce(e),...Ze(e),...gt(e)}},passthrough:()=>{let o=new Set(p._getRawProperties()),e=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(i,a)=>{let s=p.parse(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))o.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(i,a)=>{let s=p.json(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>K.OBJECT};return {...t,...ce(t),...Ze(t),...gt(t)}}}}function L4({extensionKeys:p,value:o,transformBase:e,transformExtension:t,breadcrumbsPrefix:i=[]}){if(!xr(o))return {ok:false,errors:[{path:i,message:se(o,"object")}]};let a=new Set(p),[s,c]=N4(bi(o),u=>a.has(u)),l=e(hi(o,c)),m=t(hi(o,s));return l.ok&&m.ok?{ok:true,value:{...l.value,...m.value}}:{ok:false,errors:[...l.ok?[]:l.errors,...m.ok?[]:m.errors]}}function V4(p){return !gie(p)}function gie(p){switch(p.getType()){case K.ANY:case K.UNKNOWN:case K.OPTIONAL:case K.OPTIONAL_NULLABLE:return true;default:return false}}var bh=n(()=>{he();uh();gh();ze();yi();fh();mr();F4();Ri();Ie();yh();});function J4(p){return tc(p)}var H4=n(()=>{bh();});var Rh=n(()=>{bh();H4();yh();});function G4(p){let o={...mh(p),_getRawProperties:()=>po(p)._getRawProperties(),_getParsedProperties:()=>po(p)._getParsedProperties()};return {...o,...ce(o),...Ze(o),...gt(o)}}var O4=n(()=>{Rh();Ri();Ie();dh();});var K4=n(()=>{dh();O4();});function oc(p){let o={parse:(e,t)=>$4(e,(i,a)=>{var s;return p.parse(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>$4(e,(i,a)=>{var s;return p.json(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>K.LIST};return {...ye(o),...ce(o)}}function $4(p,o){return Array.isArray(p)?p.map((t,i)=>o(t,i)).reduce((t,i)=>{if(t.ok&&i.ok)return {ok:true,value:[...t.value,i.value]};let a=[];return t.ok||a.push(...t.errors),i.ok||a.push(...i.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:se(p,"list"),path:[]}]}}var Q4=n(()=>{he();ze();mr();Ie();});var xh=n(()=>{Q4();});function Y4(p){return be(K.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`${p.toString()}`)}]})()}var X4=n(()=>{he();dr();ze();});function Z4(p){return be(K.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`"${p}"`)}]})()}var q4=n(()=>{he();dr();ze();});var e6=n(()=>{X4();q4();});var r6,t6=n(()=>{he();dr();r6=be(K.ANY,p=>({ok:true,value:p}));});var o6,i6=n(()=>{he();dr();ze();o6=be(K.BOOLEAN,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"boolean")}]});});var a6,n6=n(()=>{he();dr();a6=be(K.NEVER,(p,{breadcrumbsPrefix:o=[]}={})=>({ok:false,errors:[{path:o,message:"Expected never"}]}));});var s6,p6=n(()=>{he();dr();ze();s6=be(K.NUMBER,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"number")}]});});var c6,l6=n(()=>{he();dr();ze();c6=be(K.STRING,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"string")}]});});var m6,d6=n(()=>{he();dr();m6=be(K.UNKNOWN,p=>({ok:true,value:p}));});var u6=n(()=>{t6();i6();n6();p6();l6();d6();});function f6(p,o){let e={parse:(t,i)=>g6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.parse(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.parse(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>g6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.json(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.json(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.RECORD};return {...ye(e),...ce(e)}}function g6({value:p,isKeyNumeric:o,transformKey:e,transformValue:t,breadcrumbsPrefix:i=[]}){return xr(p)?fi(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(o){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:se(p,"object")}]}}var h6=n(()=>{he();uh();ze();yi();mr();Ie();});var y6=n(()=>{h6();});function b6(p){let o=oc(p),e={parse:(t,i)=>{let a=o.parse(t,i);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,i)=>{var s;return t instanceof Set?o.json([...t],i):{ok:false,errors:[{path:(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],message:se(t,"Set")}]}},getType:()=>K.SET};return {...ye(e),...ce(e)}}var R6=n(()=>{he();ze();mr();xh();Ie();});var x6=n(()=>{R6();});function _6(p){let o={parse:(e,t)=>w6((i,a)=>i.parse(e,a),p,t),json:(e,t)=>w6((i,a)=>i.json(e,a),p,t),getType:()=>K.UNDISCRIMINATED_UNION};return {...ye(o),...ce(o)}}function w6(p,o,e){let t=[];for(let[i,a]of o.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${i}] ${c.message}`});}return {ok:false,errors:t}}var k6=n(()=>{he();mr();Ie();});var A6=n(()=>{k6();});function P6(p,o){return {parsedDiscriminant:p,rawDiscriminant:o}}var z6=n(()=>{});function v6(p,o){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,i=rc(bi(o)),a={parse:(s,c)=>S6({value:s,discriminant:e,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return i.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],e]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.parse(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),json:(s,c)=>S6({value:s,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:l=>{var m;return i.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>K.UNION};return {...ye(a),...ce(a),...Ze(a)}}function S6({value:p,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!xr(p))return {ok:false,errors:[{path:c,message:se(p,"object")}]};let{[o]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${o}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=i(u.value);if(d==null)return a?{ok:true,value:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,o],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var T6=n(()=>{he();ze();yi();fh();mr();lh();Ri();Ie();});var j6=n(()=>{z6();T6();});var E6=n(()=>{j4();I4();lh();K4();xh();e6();Rh();Ri();u6();y6();Ie();x6();A6();j6();});var r={};V(r,{JsonError:()=>no,ParseError:()=>so,any:()=>r6,bigint:()=>v4,boolean:()=>o6,booleanLiteral:()=>Y4,date:()=>E4,discriminant:()=>P6,enum_:()=>rc,getObjectLikeUtils:()=>Ze,getObjectUtils:()=>gt,getSchemaUtils:()=>ce,isProperty:()=>Vr,lazy:()=>U4,lazyObject:()=>G4,list:()=>oc,never:()=>a6,number:()=>s6,object:()=>tc,objectWithoutOptionalProperties:()=>J4,optional:()=>ph,property:()=>M4,record:()=>f6,set:()=>b6,string:()=>c6,stringLiteral:()=>Z4,transform:()=>ch,undiscriminatedUnion:()=>_6,union:()=>v6,unknown:()=>m6,withParsedProperties:()=>hh});var C6=n(()=>{E6();});function I6(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 D6=n(()=>{});function N6(p,...o){if(!p)return "";if(o.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return U6(p,...o)}let t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=B6(a);s&&(e.pathname=F6(e.pathname,s));}return i&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return U6(p,...o)}function U6(p,...o){if(o.length===0)return p;let e=p,t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=B6(a);s&&(e=F6(e,s));}return i&&!e.endsWith("/")&&(e+="/"),e}function F6(p,o){return p.endsWith("/")?p+o:`${p}/${o}`}function B6(p){if(!p)return p;let o=0,e=p.length;return p.startsWith("/")&&(o=1),p.endsWith("/")&&(e=p.length-1),o===0&&e===p.length?p:p.slice(o,e)}var M6=n(()=>{});var _={};V(_,{encodePathParam:()=>I6,join:()=>N6,toQueryString:()=>dt});var W6=n(()=>{D6();M6();di();});var b=n(()=>{m4();rh();A4();P4();th();C6();W6();});function M(p){let o=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":ao.type,"X-Fern-Runtime-Version":ao.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:gi.createLogger(p==null?void 0:p.logging),headers:o}}var Z=n(()=>{$();b();});var v,Q=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,o,e,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:o});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:o});case "timeout":throw new Mr(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:o});default:throw new k({message:"Unknown error",rawResponse:o})}}var q=n(()=>{J();});var xi,L6=n(()=>{b();xi=r.object({blueprintName:r.property("blueprint_name",r.string())});});var wh,_h=n(()=>{b();wh=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 wi,V6=n(()=>{b();_h();wi=r.object({projectId:r.property("project_id",r.string()),envs:r.list(wh)});});var _i,J6=n(()=>{b();_i=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var kh=n(()=>{L6();V6();J6();});var H6=n(()=>{kh();});var ic={};V(ic,{AgentConfigEnvSetByName:()=>xi,AgentConfigEnvUpdate:()=>wi,AgentConfigRemoveValues:()=>_i});var G6=n(()=>{H6();});var ac,Ah=n(()=>{b();ac=r.enum_(["open","resolved","closed"]);});var ki,O6=n(()=>{b();Ah();ki=r.object({projectId:r.property("project_id",r.string()),status:ac});});var L,pe=n(()=>{b();L=r.record(r.string(),r.unknown());});var Ph,zh=n(()=>{b();Ph=r.enum_(["critical","high","medium","low"]);});var Sh,vh=n(()=>{b();pe();zh();Sh=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),tracesQuery:r.property("traces_query",r.string().optional()),severity:Ph,count:r.number(),totalCount:r.property("total_count",r.number()),usersImpacted:r.property("users_impacted",r.number()),totalUsers:r.property("total_users",r.number()),metadata:L.optional()});});var Ai,K6=n(()=>{b();vh();Ai=r.object({projectId:r.property("project_id",r.string()),reportDay:r.property("report_day",r.string()),issues:r.list(Sh)});});var Th=n(()=>{O6();K6();});var $6=n(()=>{Th();});var nc,Q6=n(()=>{b();nc=r.enum_(["critical","high","medium","low"]);});var sc,Y6=n(()=>{b();sc=r.enum_(["open","resolved","closed"]);});var jh=n(()=>{Ah();Q6();Y6();});var pc={};V(pc,{AgentInsightsIssueUpdate:()=>ki,AgentInsightsIssueUpdateStatus:()=>ac,AgentInsightsReport:()=>Ai,FindAgentInsightsIssuesRequestSeverity:()=>nc,FindAgentInsightsIssuesRequestStatus:()=>sc});var X6=n(()=>{$6();jh();});var Pi,Z6=n(()=>{b();Pi=r.object({enrolled:r.boolean(),projectIds:r.property("project_ids",r.list(r.string()))});});var Eh=n(()=>{Z6();});var q6=n(()=>{Eh();});var cc={};V(cc,{Request:()=>Pi});var e2=n(()=>{q6();});var lc,Ch=n(()=>{b();lc=r.enum_(["enabled","disabled"]);});var zi,r2=n(()=>{b();Ch();zi=r.object({status:lc});});var Ih=n(()=>{r2();});var t2=n(()=>{Ih();});var Dh=n(()=>{Ch();});var mc={};V(mc,{AgentInsightsJobUpdate:()=>zi,AgentInsightsJobUpdateStatus:()=>lc});var o2=n(()=>{t2();Dh();});var dc,i2=n(()=>{b();dc=r.enum_(["general","slack","pagerduty"]);});var Uh=n(()=>{i2();});var uc={};V(uc,{GetWebhookExamplesRequestAlertType:()=>dc});var a2=n(()=>{Uh();});var Nh,Fh=n(()=>{b();Nh=r.enum_([">","<","="]);});var Bh,Mh=n(()=>{b();Fh();Bh=r.object({scoreName:r.property("score_name",r.string()),operator:Nh,value:r.number()});});var Wh,Lh=n(()=>{b();Mh();Wh=r.object({conditions:r.list(Bh)});});var Vh,Jh=n(()=>{b();Lh();Vh=r.object({groups:r.list(Wh)});});var Hh,Gh=n(()=>{b();Jh();Hh=r.object({enabled:r.boolean().optional(),conditions:Vh.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Oh,Kh=n(()=>{b();Oh=r.enum_(["trace","thread"]);});var Si,$h=n(()=>{b();Gh();Kh();Si=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:Oh,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Hh.optional()});});var vi,n2=n(()=>{b();$h();vi=r.object({annotationQueues:r.property("annotation_queues",r.list(Si))});});var Ti,s2=n(()=>{b();Ti=r.object({ids:r.list(r.string())});});var Qh,Yh=n(()=>{b();Qh=r.enum_([">","<","="]);});var Xh,Zh=n(()=>{b();Yh();Xh=r.object({scoreName:r.property("score_name",r.string()),operator:Qh,value:r.number()});});var qh,ey=n(()=>{b();Zh();qh=r.object({conditions:r.list(Xh)});});var ry,ty=n(()=>{b();ey();ry=r.object({groups:r.list(qh)});});var ji,gc=n(()=>{b();ty();ji=r.object({enabled:r.boolean().optional(),conditions:ry.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Ei,p2=n(()=>{b();gc();Ei=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:ji.optional()});});var oy=n(()=>{n2();s2();p2();});var c2=n(()=>{oy();});var fc={};V(fc,{AnnotationQueueBatchWrite:()=>vi,AnnotationQueueItemIdsPublic:()=>Ti,AnnotationQueueUpdate:()=>Ei});var l2=n(()=>{c2();});var iy,ay=n(()=>{b();iy=r.enum_(["ui","sdk","online_scoring"]);});var ny,sy=n(()=>{b();ny=r.enum_(["passed","failed"]);});var py,cy=n(()=>{b();ay();sy();py=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:ny,reason:r.string().optional(),source:iy});});var hc,ly=n(()=>{b();hc=r.enum_(["TRACE","SPAN","THREAD"]);});var Ci,m2=n(()=>{b();cy();ly();Ci=r.object({entityType:r.property("entity_type",hc),assertionResults:r.property("assertion_results",r.list(py))});});var my=n(()=>{m2();});var d2=n(()=>{my();});var dy=n(()=>{ly();});var yc={};V(yc,{AssertionResultBatch:()=>Ci,AssertionResultBatchEntityType:()=>hc});var u2=n(()=>{d2();dy();});var bc,uy=n(()=>{b();bc=r.enum_(["trace","span"]);});var Ii,g2=n(()=>{b();uy();Ii=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",bc),entityId:r.property("entity_id",r.string()),path:r.string()});});var gy=n(()=>{g2();});var Rc={};V(Rc,{Request:()=>fie});var fie,f2=n(()=>{b();fie=r.record(r.string(),r.unknown());});var h2=n(()=>{gy();f2();});var xc,y2=n(()=>{b();xc=r.enum_(["trace","span"]);});var wc,b2=n(()=>{b();wc=r.enum_(["trace","span"]);});var _c,R2=n(()=>{b();_c=r.enum_(["trace","span"]);});var fy=n(()=>{y2();b2();uy();R2();});var co={};V(co,{AttachmentListRequestEntityType:()=>xc,DownloadAttachmentRequestEntityType:()=>wc,StartMultipartUploadRequest:()=>Ii,StartMultipartUploadRequestEntityType:()=>bc,UploadAttachmentRequestEntityType:()=>_c,uploadAttachment:()=>Rc});var x2=n(()=>{h2();fy();});var Di,kc=n(()=>{b();Di=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var wr,lo=n(()=>{b();wr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var Ui,Ac=n(()=>{b();pe();Ui=r.object({role:r.string(),content:L});});var hy,yy=n(()=>{b();hy=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var by,Ry=n(()=>{b();by=r.enum_(["text","json_object","json_schema"]);});var xy,wy=n(()=>{b();yy();Ry();xy=r.object({type:by.optional(),jsonSchema:hy.optional()});});var _y,ky=n(()=>{b();_y=r.object({includeUsage:r.boolean().optional()});});var Ay,Py=n(()=>{b();Ay=r.enum_(["function"]);});var zy,Sy=n(()=>{b();kc();Py();zy=r.object({type:Ay.optional(),function:Di.optional()});});var Ni,w2=n(()=>{b();kc();lo();Ac();wy();ky();Sy();Ni=r.object({model:r.string().optional(),messages:r.list(Ui).optional(),temperature:r.number().optional(),topP:r.number().optional(),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:_y.optional(),stop:r.list(r.string()).optional(),maxTokens:r.number().optional(),maxCompletionTokens:r.number().optional(),presencePenalty:r.number().optional(),frequencyPenalty:r.number().optional(),logitBias:r.record(r.string(),r.number()).optional(),user:r.string().optional(),responseFormat:xy.optional(),seed:r.number().optional(),tools:r.list(zy).optional(),toolChoice:r.record(r.string(),r.unknown()).optional(),parallelToolCalls:r.boolean().optional(),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.string().optional(),serviceTier:r.string().optional(),logprobs:r.boolean().optional(),topLogprobs:r.number().optional(),functions:r.list(Di).optional(),functionCall:wr.optional()});});var vy=n(()=>{w2();});var _2=n(()=>{vy();});var Pc={};V(Pc,{ChatCompletionRequest:()=>Ni});var k2=n(()=>{_2();});var Ty,jy=n(()=>{b();Ty=r.enum_(["llm_judge","code_metric"]);});var _r,mo=n(()=>{b();jy();pe();_r=r.object({name:r.string(),type:Ty,config:L});});var qe,ft=n(()=>{b();qe=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Ey,Cy=n(()=>{b();Ey=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var Fi,A2=n(()=>{b();mo();ft();Cy();Fi=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Ey),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Iy,Dy=n(()=>{b();Iy=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 Bi,P2=n(()=>{b();mo();ft();Dy();Bi=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Iy),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Mi,z2=n(()=>{b();Mi=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 Wi,S2=n(()=>{b();Wi=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Li,v2=n(()=>{b();Li=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Uy,Ny=n(()=>{b();Uy=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Vi,zc=n(()=>{b();Ny();Vi=r.object({field:r.string().optional(),operator:Uy.optional(),key:r.string().optional(),value:r.string().optional()});});var Fy,By=n(()=>{b();mo();ft();pe();Fy=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(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var Ji,T2=n(()=>{b();zc();By();Ji=r.object({ids:r.list(r.string()).optional(),filters:r.list(Vi).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:Fy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var My,Wy=n(()=>{b();My=r.enum_(["manual","trace","span","sdk"]);});var Ly,Vy=n(()=>{b();Ly=r.enum_(["llm_judge","code_metric"]);});var Se,kr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Jy,Hy=n(()=>{b();Vy();kr();Jy=r.object({name:r.string(),type:Ly,config:Se});});var Gy,Oy=n(()=>{b();Gy=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Hi,Ky=n(()=>{b();Wy();Hy();Oy();pe();Hi=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:My,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Jy).optional(),executionPolicy:r.property("execution_policy",Gy.optional())});});var Gi,j2=n(()=>{b();Ky();Gi=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(Hi),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var Oi,E2=n(()=>{b();Oi=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 Ki,C2=n(()=>{b();zc();Ki=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Vi).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var Sc,$y=n(()=>{b();Sc=r.enum_(["private","public"]);});var $i,I2=n(()=>{b();$y();$i=r.object({name:r.string(),description:r.string().optional(),visibility:Sc.optional(),tags:r.list(r.string()).optional()});});var Qi,D2=n(()=>{b();Qi=r.object({versionRef:r.property("version_ref",r.string())});});var Yi,U2=n(()=>{b();Yi=r.object({versionName:r.property("version_name",r.string())});});var Xi,N2=n(()=>{b();Xi=r.object({tag:r.string()});});var Zi,F2=n(()=>{b();Zi=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var vc,Qy=n(()=>{b();vc=r.enum_(["dataset","evaluation_suite"]);});var Tc,Yy=n(()=>{b();Tc=r.enum_(["private","public"]);});var qi,B2=n(()=>{b();Qy();Yy();qi=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:vc.optional(),visibility:Tc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var Xy=n(()=>{A2();P2();z2();S2();v2();T2();j2();E2();C2();I2();D2();U2();N2();F2();B2();});var Zy,qy=n(()=>{b();Zy=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var uo,eb=n(()=>{b();qy();uo=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:Zy.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 jc={};V(jc,{Response:()=>hie});var hie,M2=n(()=>{b();eb();hie=r.list(uo);});var W2=n(()=>{M2();Xy();});var Ec,L2=n(()=>{b();Ec=r.enum_(["json","jsonl"]);});var rb=n(()=>{L2();$y();Qy();Yy();});var go={};V(go,{CreateDatasetItemsFromJsonRequestFormat:()=>Ec,CreateDatasetItemsFromSpansRequest:()=>Fi,CreateDatasetItemsFromTracesRequest:()=>Bi,DatasetExpansionWrite:()=>Mi,DatasetIdentifier:()=>Wi,DatasetIdentifierPublic:()=>Li,DatasetItemBatchUpdate:()=>Ji,DatasetItemBatchWrite:()=>Gi,DatasetItemStreamRequest:()=>Oi,DatasetItemsDelete:()=>Ki,DatasetUpdate:()=>$i,DatasetUpdateVisibility:()=>Sc,DatasetVersionRestorePublic:()=>Qi,DatasetVersionRetrieveRequestPublic:()=>Yi,DatasetVersionTag:()=>Xi,DatasetVersionUpdatePublic:()=>Zi,DatasetWrite:()=>qi,DatasetWriteType:()=>vc,DatasetWriteVisibility:()=>Tc,getDatasetExportJobs:()=>jc});var V2=n(()=>{W2();rb();});var ea,J2=n(()=>{b();ea=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ra,H2=n(()=>{b();ra=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var tb=n(()=>{J2();H2();});var G2=n(()=>{tb();});var Cc={};V(Cc,{EnvironmentUpdate:()=>ea,EnvironmentWrite:()=>ra});var O2=n(()=>{G2();});var ta,Ic=n(()=>{b();ta=r.object({name:r.string(),value:r.number()});});var ob,ib=n(()=>{b();ob=r.enum_(["running","completed","cancelled"]);});var ab,nb=n(()=>{b();ab=r.enum_(["regular","trial","mini-batch","mutation"]);});var oa,sb=n(()=>{b();Ic();ib();nb();pe();oa=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:ab.optional(),status:ob.optional(),experimentScores:r.property("experiment_scores",r.list(ta).optional())});});var ia,K2=n(()=>{b();sb();ia=r.object({ids:r.list(r.string()),update:oa,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Jr,aa=n(()=>{b();Jr=r.object({id:r.string(),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var pb,cb=n(()=>{b();pe();Ac();aa();pb=r.object({model:r.string(),messages:r.list(Ui),configs:r.record(r.string(),L).optional(),promptVersions:r.property("prompt_versions",r.list(Jr).optional()),experimentName:r.property("experiment_name",r.string().optional())});});var na,$2=n(()=>{b();cb();aa();na=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(pb),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(Jr).optional())});});var lb,mb=n(()=>{b();lb=r.enum_(["ui","sdk","online_scoring"]);});var db,ub=n(()=>{b();db=r.enum_(["ui","sdk","online_scoring"]);});var gb,fb=n(()=>{b();ub();gb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:db.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var hb,yb=n(()=>{b();mb();fb();hb=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:lb,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),gb).optional())});});var er,sa=n(()=>{b();er=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var pa,Dc=n(()=>{b();pa=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var bb,Rb=n(()=>{b();bb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xb,wb=n(()=>{b();xb=r.enum_(["general","tool","llm","guardrail"]);});var _b,kb=n(()=>{b();Dc();sa();Rb();wb();_b=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:xb.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",pa.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:bb.optional(),environment:r.string().optional()});});var Ab,Pb=n(()=>{b();Ab=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var zb,Sb=n(()=>{b();Dc();sa();Pb();zb=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",pa.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Ab.optional(),environment:r.string().optional()});});var vb,Tb=n(()=>{b();yb();sa();kb();Sb();vb=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",er.optional()),trace:zb.optional(),spans:r.list(_b).optional(),feedbackScores:r.property("feedback_scores",r.list(hb).optional())});});var ca,Q2=n(()=>{b();Tb();ca=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(vb)});});var la,Y2=n(()=>{b();la=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 jb,Eb=n(()=>{b();jb=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var ge,ht=n(()=>{b();ge=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Cb,Ib=n(()=>{b();Cb=r.enum_(["passed","failed"]);});var Db,Ub=n(()=>{b();Db=r.enum_(["default","hidden"]);});var Nb,Fb=n(()=>{b();Nb=r.enum_(["ui","sdk","online_scoring"]);});var Bb,Mb=n(()=>{b();Bb=r.enum_(["ui","sdk","online_scoring"]);});var Wb,Lb=n(()=>{b();Mb();Wb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Bb.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Pe,yt=n(()=>{b();Fb();Lb();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Nb,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Wb).optional())});});var le,Ye=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ma,Uc=n(()=>{b();Eb();ht();ft();Ib();Ub();yt();Ye();ma=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),traceMetadata:r.property("trace_metadata",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Db.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",qe.optional()),assertionResults:r.property("assertion_results",r.list(jb).optional()),status:Cb.optional()});});var da,X2=n(()=>{b();Uc();da=r.object({experimentItems:r.property("experiment_items",r.list(ma))});});var ua,Z2=n(()=>{b();ua=r.object({ids:r.list(r.string())});});var ga,q2=n(()=>{b();ga=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 Vb,Jb=n(()=>{b();Vb=r.object({name:r.string(),value:r.number()});});var Je,fo=n(()=>{b();Je=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Nc,Hb=n(()=>{b();Nc=r.object({id:r.string()});});var Fc,Gb=n(()=>{b();Fc=r.enum_(["dataset","evaluation_suite"]);});var Bc,Ob=n(()=>{b();Bc=r.enum_(["running","completed","cancelled"]);});var Mc,Kb=n(()=>{b();Mc=r.enum_(["regular","trial","mini-batch","mutation"]);});var fa,eY=n(()=>{b();Jb();fo();Hb();Gb();Ob();Kb();fa=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),type:Mc.optional(),evaluationMethod:r.property("evaluation_method",Fc.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Bc.optional(),experimentScores:r.property("experiment_scores",r.list(Vb).optional()),promptVersion:r.property("prompt_version",Nc.optional()),promptVersions:r.property("prompt_versions",r.list(Nc).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var $b=n(()=>{K2();$2();Q2();Y2();X2();Z2();q2();eY();});var rY=n(()=>{$b();});var Qb=n(()=>{Gb();Ob();Kb();});var Wc={};V(Wc,{ExperimentBatchUpdate:()=>ia,ExperimentExecutionRequest:()=>na,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ca,ExperimentItemStreamRequest:()=>la,ExperimentItemsBatch:()=>da,ExperimentItemsDelete:()=>ua,ExperimentStreamRequestPublic:()=>ga,ExperimentWrite:()=>fa,ExperimentWriteEvaluationMethod:()=>Fc,ExperimentWriteStatus:()=>Bc,ExperimentWriteType:()=>Mc});var tY=n(()=>{rY();Qb();});var Lc,oY=n(()=>{b();Lc=r.enum_(["numerical","categorical","boolean"]);});var Yb=n(()=>{oY();});var Vc={};V(Vc,{FindFeedbackDefinitionsRequestType:()=>Lc});var iY=n(()=>{Yb();});var Xb,Zb=n(()=>{b();Xb=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var qb,eR=n(()=>{b();qb=r.enum_(["passed","failed"]);});var rR,tR=n(()=>{b();Zb();eR();pe();rR=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:Xb,result:qb,config:L,details:L});});var ha,aY=n(()=>{b();tR();ha=r.object({guardrails:r.list(rR)});});var oR=n(()=>{aY();});var nY=n(()=>{oR();});var Jc={};V(Jc,{GuardrailBatchWrite:()=>ha});var sY=n(()=>{nY();});var Hc={};V(Hc,{Response:()=>yie});var yie,pY=n(()=>{b();yie=r.string();});var cY=n(()=>{pY();});var ho={};V(ho,{getLlmModels:()=>Hc});var lY=n(()=>{cY();});var iR,aR=n(()=>{b();iR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var nR,sR=n(()=>{b();nR=r.enum_(["form","json","basic"]);});var bt,ya=n(()=>{b();aR();sR();bt=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",nR.optional()),credentials:r.list(iR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var ba,mY=n(()=>{b();ya();ba=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",bt.optional())});});var pR,cR=n(()=>{b();pR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var lR,mR=n(()=>{b();lR=r.enum_(["form","json","basic"]);});var dR,uR=n(()=>{b();cR();mR();dR=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",lR.optional()),credentials:r.list(pR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Gc,gR=n(()=>{b();Gc=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Ra,dY=n(()=>{b();uR();gR();Ra=r.object({provider:Gc,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",dR.optional())});});var xa,uY=n(()=>{b();ya();xa=r.object({providerId:r.property("provider_id",r.string().optional()),authConfig:r.property("auth_config",bt.optional())});});var fR=n(()=>{mY();dY();uY();});var gY=n(()=>{fR();});var hR=n(()=>{gR();});var Oc={};V(Oc,{ProviderApiKeyUpdate:()=>ba,ProviderApiKeyWrite:()=>Ra,ProviderApiKeyWriteProvider:()=>Gc,ProviderAuthCheck:()=>xa});var fY=n(()=>{gY();hR();});var wa,hY=n(()=>{b();wa=r.object({clientName:r.property("client_name",r.string()),redirectUris:r.property("redirect_uris",r.list(r.string())),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional())});});var _a,yY=n(()=>{b();_a=r.object({clientId:r.property("client_id",r.string()),redirectUri:r.property("redirect_uri",r.string()),codeChallenge:r.property("code_challenge",r.string()),codeChallengeMethod:r.property("code_challenge_method",r.string()),resource:r.string(),state:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),csrf:r.string().optional()});});var ka,bY=n(()=>{b();ka=r.object({token:r.string().optional(),clientId:r.property("client_id",r.string().optional())});});var Aa,RY=n(()=>{b();Aa=r.object({grantType:r.property("grant_type",r.string().optional()),code:r.string().optional(),redirectUri:r.property("redirect_uri",r.string().optional()),clientId:r.property("client_id",r.string().optional()),codeVerifier:r.property("code_verifier",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional())});});var yR=n(()=>{hY();yY();bY();RY();});var xY=n(()=>{yR();});var Kc={};V(Kc,{ClientRegistrationRequest:()=>wa,ConsentRequest:()=>_a,RevokeRequest:()=>ka,TokenRequest:()=>Aa});var wY=n(()=>{xY();});var bR,RR=n(()=>{b();bR=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var $c={};V($c,{Response:()=>bie});var bie,_Y=n(()=>{b();RR();bie=r.list(bR);});var kY=n(()=>{_Y();});var yo={};V(yo,{listModels:()=>$c});var AY=n(()=>{kY();});var He,Hr=n(()=>{b();He=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Qc,xR=n(()=>{b();Qc=r.enum_(["running","completed","cancelled","initialized","error"]);});var Pa,PY=n(()=>{b();Hr();Ye();xR();Pa=r.object({name:r.string().optional(),status:Qc.optional(),errorInfo:r.property("error_info",He.optional()),metadata:le.optional()});});var wR=n(()=>{PY();});var zY=n(()=>{wR();});var _R=n(()=>{xR();});var Yc={};V(Yc,{OptimizationUpdate:()=>Pa,OptimizationUpdateStatus:()=>Qc});var SY=n(()=>{zY();_R();});var za,vY=n(()=>{b();za=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Xc,kR=n(()=>{b();Xc=r.enum_(["connect","endpoint"]);});var Sa,TY=n(()=>{b();kR();Sa=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:Xc});});var AR=n(()=>{vY();TY();});var jY=n(()=>{AR();});var PR=n(()=>{kR();});var Zc={};V(Zc,{ActivateRequest:()=>za,CreateSessionRequest:()=>Sa,CreateSessionRequestType:()=>Xc});var EY=n(()=>{jY();PR();});var qc,zR=n(()=>{b();qc=r.enum_(["traces","spans","threads"]);});var va,CY=n(()=>{b();zR();va=r.object({entityType:r.property("entity_type",qc),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var SR,vR=n(()=>{b();SR=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var TR,jR=n(()=>{b();vR();TR=r.object({field:SR.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ER,CR=n(()=>{b();ER=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Ar,bo=n(()=>{b();CR();Ar=r.object({field:r.string().optional(),operator:ER.optional(),key:r.string().optional(),value:r.string().optional()});});var IR,DR=n(()=>{b();IR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Pr,Ro=n(()=>{b();DR();Pr=r.object({field:r.string().optional(),operator:IR.optional(),key:r.string().optional(),value:r.string().optional()});});var UR,NR=n(()=>{b();UR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Rt,Ta=n(()=>{b();NR();Rt=r.object({field:r.string().optional(),operator:UR.optional(),key:r.string().optional(),value:r.string().optional()});});var el,FR=n(()=>{b();el=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var rl,BR=n(()=>{b();rl=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 ja,IY=n(()=>{b();jR();bo();Ro();Ta();FR();BR();ja=r.object({metricType:r.property("metric_type",rl.optional()),interval:el.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(Ar).optional()),traceFilters:r.property("trace_filters",r.list(Pr).optional()),threadFilters:r.property("thread_filters",r.list(Rt).optional()),breakdown:TR.optional()});});var Ea,DY=n(()=>{b();Ea=r.object({name:r.string(),includeStats:r.boolean().optional()});});var tl,MR=n(()=>{b();tl=r.enum_(["private","public"]);});var Ca,UY=n(()=>{b();MR();Ca=r.object({name:r.string().optional(),description:r.string().optional(),visibility:tl.optional()});});var ol,WR=n(()=>{b();ol=r.enum_(["private","public"]);});var Ia,NY=n(()=>{b();WR();Ia=r.object({name:r.string(),visibility:ol.optional(),description:r.string().optional()});});var LR=n(()=>{CY();IY();DY();UY();NY();});var FY=n(()=>{LR();});var VR=n(()=>{zR();FR();BR();MR();WR();});var il={};V(il,{KpiCardRequest:()=>va,KpiCardRequestEntityType:()=>qc,ProjectMetricRequestPublic:()=>ja,ProjectMetricRequestPublicInterval:()=>el,ProjectMetricRequestPublicMetricType:()=>rl,ProjectRetrieveDetailed:()=>Ea,ProjectUpdate:()=>Ca,ProjectUpdateVisibility:()=>tl,ProjectWrite:()=>Ia,ProjectWriteVisibility:()=>ol});var BY=n(()=>{FY();VR();});var JR,HR=n(()=>{b();JR=r.record(r.string(),r.unknown());});var GR,OR=n(()=>{b();GR=r.enum_(["text","chat"]);});var KR,$R=n(()=>{b();KR=r.enum_(["mustache","jinja2","python"]);});var QR,YR=n(()=>{b();QR=r.enum_(["prompt_version","mask"]);});var De,Da=n(()=>{b();HR();OR();$R();YR();De=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:JR.optional(),type:KR.optional(),versionType:r.property("version_type",QR.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",GR.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var al,XR=n(()=>{b();al=r.enum_(["text","chat"]);});var Ua,MY=n(()=>{b();Da();XR();Ua=r.object({name:r.string(),version:De,templateStructure:r.property("template_structure",al.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Na,WY=n(()=>{b();Na=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var ZR,qR=n(()=>{b();ZR=r.object({tags:r.list(r.string()).optional()});});var Fa,LY=n(()=>{b();qR();Fa=r.object({ids:r.list(r.string()),update:ZR,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Ba,VY=n(()=>{b();Ba=r.object({commits:r.list(r.string())});});var Ma,JY=n(()=>{b();Ma=r.object({environments:r.list(r.string())});});var Wa,HY=n(()=>{b();Wa=r.object({ids:r.list(r.string())});});var La,GY=n(()=>{b();La=r.object({name:r.string(),commit:r.string().optional(),environment:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var nl,ex=n(()=>{b();nl=r.enum_(["text","chat"]);});var sl,rx=n(()=>{b();sl=r.enum_(["mustache","jinja2","python"]);});var Va,OY=n(()=>{b();kr();ex();rx();Va=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:sl.optional(),templateStructure:r.property("template_structure",nl.optional()),tags:r.list(r.string()).optional()});});var tx=n(()=>{MY();WY();LY();VY();JY();HY();GY();OY();});var xo,pl=n(()=>{b();xo=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 cl={};V(cl,{Response:()=>Rie});var Rie,KY=n(()=>{b();pl();Rie=r.list(xo);});var ll={};V(ll,{Response:()=>xie});var xie,$Y=n(()=>{b();Da();xie=r.list(De);});var QY=n(()=>{KY();tx();$Y();});var ox=n(()=>{XR();ex();rx();});var xt={};V(xt,{CreatePromptVersionDetail:()=>Ua,CreatePromptVersionDetailTemplateStructure:()=>al,PromptUpdatable:()=>Na,PromptVersionBatchUpdate:()=>Fa,PromptVersionCommitsRequestPublic:()=>Ba,PromptVersionEnvironmentUpdate:()=>Ma,PromptVersionIdsRequestDetail:()=>Wa,PromptVersionRetrieveDetail:()=>La,PromptWrite:()=>Va,PromptWriteTemplateStructure:()=>nl,PromptWriteType:()=>sl,getPromptsByCommits:()=>cl,retrievePromptVersionsByIds:()=>ll});var YY=n(()=>{QY();ox();});var ml,XY=n(()=>{b();ml=r.enum_(["agent_insights"]);});var ix=n(()=>{XY();});var dl={};V(dl,{FindReportFailuresRequestType:()=>ml});var ZY=n(()=>{ix();});var ul,ax=n(()=>{b();ul=r.enum_(["pending","completed","failed"]);});var Ja,qY=n(()=>{b();pe();ax();Ja=r.object({content:r.string().optional(),status:ul,sessionId:r.property("session_id",r.string().optional()),recommendedActions:r.property("recommended_actions",L.optional()),failureReason:r.property("failure_reason",r.string().optional())});});var nx=n(()=>{qY();});var e9=n(()=>{nx();});var sx=n(()=>{ax();});var gl={};V(gl,{ReportCompleteRequest:()=>Ja,ReportCompleteRequestStatus:()=>ul});var r9=n(()=>{e9();sx();});var fl,px=n(()=>{b();fl=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ha,t9=n(()=>{b();px();Ha=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:fl,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var cx=n(()=>{t9();});var o9=n(()=>{cx();});var lx=n(()=>{px();});var hl={};V(hl,{RetentionRuleWrite:()=>Ha,RetentionRuleWriteRetention:()=>fl});var i9=n(()=>{o9();lx();});var Ga,a9=n(()=>{b();Ga=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var yl,mx=n(()=>{b();yl=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Oa,n9=n(()=>{b();pe();mx();Oa=r.object({status:yl,result:L.optional(),error:L.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var bl,dx=n(()=>{b();bl=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Ka,s9=n(()=>{b();pe();dx();Ka=r.object({type:bl,args:L,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var $a,Rl=n(()=>{b();$a=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 Qa,p9=n(()=>{b();pe();Rl();Qa=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()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:$a.optional()});});var Ya,c9=n(()=>{b();Ya=r.object({capabilities:r.list(r.string()).optional()});});var xl,ux=n(()=>{b();xl=r.enum_(["pending","running","completed","failed","cancelled"]);});var Xa,l9=n(()=>{b();pe();ux();Xa=r.object({status:xl,result:L.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var gx=n(()=>{a9();n9();s9();p9();c9();l9();});var Za,wl=n(()=>{b();Za=r.object({stream:r.string(),text:r.string()});});var _l={};V(_l,{Request:()=>wie});var wie,m9=n(()=>{b();wl();wie=r.list(Za);});var kl={};V(kl,{Response:()=>_ie});var _ie,d9=n(()=>{b();wl();_ie=r.list(Za);});var fx,hx=n(()=>{b();fx=r.enum_(["pending","running","completed","failed","cancelled"]);});var wt,Al=n(()=>{b();pe();Rl();hx();wt=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:fx.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()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:$a.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 Pl={};V(Pl,{Response:()=>kie});var kie,u9=n(()=>{Al();kie=wt.nullable();});var zl={};V(zl,{Request:()=>Aie});var Aie,g9=n(()=>{b();Aie=r.record(r.string(),r.unknown());});var Sl={};V(Sl,{Request:()=>Pie});var Pie,f9=n(()=>{b();Pie=r.record(r.string(),r.unknown());});var h9=n(()=>{m9();d9();u9();g9();f9();gx();});var vl,y9=n(()=>{b();vl=r.enum_(["pairing","connected","disconnected"]);});var yx=n(()=>{mx();dx();y9();ux();});var ur={};V(ur,{BridgeCommandNextRequest:()=>Ga,BridgeCommandResultRequest:()=>Oa,BridgeCommandResultRequestStatus:()=>yl,BridgeCommandSubmitRequest:()=>Ka,BridgeCommandSubmitRequestType:()=>bl,CreateLocalRunnerJobRequest:()=>Qa,ListRunnersRequestStatus:()=>vl,LocalRunnerHeartbeatRequest:()=>Ya,LocalRunnerJobResultRequest:()=>Xa,LocalRunnerJobResultRequestStatus:()=>xl,appendJobLogs:()=>_l,getJobLogs:()=>kl,nextJob:()=>Pl,patchChecklist:()=>zl,registerAgents:()=>Sl});var b9=n(()=>{h9();yx();});var bx,Rx=n(()=>{b();bx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xx,wx=n(()=>{b();xx=r.enum_(["general","tool","llm","guardrail"]);});var qa,_x=n(()=>{b();Hr();Ye();Rx();wx();qa=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:xx.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",He.optional()),ttft:r.number().optional(),source:bx.optional(),environment:r.string().optional()});});var en,R9=n(()=>{b();_x();en=r.object({ids:r.list(r.string()),update:qa,mergeTags:r.property("merge_tags",r.boolean().optional())});});var _t,rn=n(()=>{b();_t=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var kx,Ax=n(()=>{b();kx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Px,zx=n(()=>{b();Px=r.enum_(["general","tool","llm","guardrail"]);});var tn,Sx=n(()=>{b();rn();fo();Ax();zx();tn=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:Px.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",_t.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:kx.optional(),environment:r.string().optional()});});var on,x9=n(()=>{b();Sx();on=r.object({spans:r.list(tn)});});var Tl,vx=n(()=>{b();Tl=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source","environment"]);});var jl,Tx=n(()=>{b();jl=r.enum_(["general","tool","llm","guardrail"]);});var an,w9=n(()=>{b();bo();vx();Tx();an=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:jl.optional(),filters:r.list(Ar).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(Tl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var jx=n(()=>{R9();x9();w9();});var _9=n(()=>{jx();});var El,k9=n(()=>{b();El=r.enum_(["general","tool","llm","guardrail"]);});var Cl,A9=n(()=>{b();Cl=r.enum_(["general","tool","llm","guardrail"]);});var Il,P9=n(()=>{b();Il=r.enum_(["general","tool","llm","guardrail"]);});var Ex=n(()=>{k9();A9();P9();vx();Tx();});var Dl={};V(Dl,{FindFeedbackScoreNames1RequestType:()=>El,GetSpanStatsRequestType:()=>Cl,GetSpansByProjectRequestType:()=>Il,SpanBatchUpdate:()=>en,SpanBatchWrite:()=>on,SpanSearchStreamRequestPublic:()=>an,SpanSearchStreamRequestPublicExcludeItem:()=>Tl,SpanSearchStreamRequestPublicType:()=>jl});var z9=n(()=>{_9();Ex();});var nn,S9=n(()=>{b();nn=r.object({query:r.string()});});var sn,v9=n(()=>{b();sn=r.object({query:r.string(),projectId:r.property("project_id",r.string().optional())});});var Cx=n(()=>{S9();v9();});var T9=n(()=>{Cx();});var Ul={};V(Ul,{AnalyticsQueryRequest:()=>nn,ScopedAnalyticsQueryRequest:()=>sn});var j9=n(()=>{T9();});var pn,E9=n(()=>{b();pn=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var cn,C9=n(()=>{b();cn=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var ln,I9=n(()=>{b();ln=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 Ix,Dx=n(()=>{b();Ix=r.enum_(["ui","sdk","online_scoring"]);});var Ux,Nx=n(()=>{b();Dx();Ux=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:Ix,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),threadId:r.property("thread_id",r.string())});});var mn,D9=n(()=>{b();Nx();mn=r.object({scores:r.list(Ux)});});var Fx,Bx=n(()=>{b();Fx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var dn,Mx=n(()=>{b();Hr();Ye();Bx();dn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",He.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:Fx.optional(),environment:r.string().optional()});});var un,U9=n(()=>{b();Mx();un=r.object({ids:r.list(r.string()),update:dn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Wx,Lx=n(()=>{b();Wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var gn,Vx=n(()=>{b();rn();fo();Lx();gn=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",_t.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Wx.optional(),environment:r.string().optional()});});var fn,N9=n(()=>{b();Vx();fn=r.object({traces:r.list(gn)});});var Nl,Jx=n(()=>{b();Nl=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source","environment"]);});var hn,F9=n(()=>{b();Ro();Jx();hn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Pr).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),exclude:r.list(Nl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var yn,B9=n(()=>{b();yn=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 bn,Hx=n(()=>{b();bn=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 Rn,M9=n(()=>{b();Hx();Rn=r.object({ids:r.list(r.string()),update:bn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Gx,Ox=n(()=>{b();Gx=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rr,kt=n(()=>{b();Ox();rr=r.object({field:r.string().optional(),operator:Gx.optional(),key:r.string().optional(),value:r.string().optional()});});var xn,W9=n(()=>{b();kt();xn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(rr).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Kx=n(()=>{E9();C9();I9();D9();U9();N9();F9();B9();M9();W9();});var L9=n(()=>{Kx();});var $x=n(()=>{Jx();});var Fl={};V(Fl,{BatchDeleteByProject:()=>pn,DeleteThreadFeedbackScores:()=>cn,DeleteTraceThreads:()=>ln,FeedbackScoreBatchThread:()=>mn,TraceBatchUpdate:()=>un,TraceBatchWrite:()=>fn,TraceSearchStreamRequestPublic:()=>hn,TraceSearchStreamRequestPublicExcludeItem:()=>Nl,TraceThreadBatchIdentifier:()=>yn,TraceThreadBatchUpdate:()=>Rn,TraceThreadSearchStreamRequest:()=>xn});var V9=n(()=>{L9();$x();});var wn,J9=n(()=>{b();wn=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 Qx=n(()=>{J9();});var H9=n(()=>{Qx();});var Bl={};V(Bl,{WelcomeWizardSubmission:()=>wn});var G9=n(()=>{H9();});var Yx,Xx=n(()=>{b();Yx=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var Zx,qx=n(()=>{b();Xx();Zx=r.object({field:Yx.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ew,rw=n(()=>{b();ew=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var tr,At=n(()=>{b();rw();tr=r.object({field:r.string().optional(),operator:ew.optional(),key:r.string().optional(),value:r.string().optional()});});var Ml,tw=n(()=>{b();Ml=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Wl,ow=n(()=>{b();Wl=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 _n,O9=n(()=>{b();qx();At();tw();ow();_n=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),metricType:r.property("metric_type",Wl.optional()),interval:Ml.optional(),breakdown:Zx.optional(),filters:r.list(tr).optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kn,K9=n(()=>{b();kn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional())});});var iw=n(()=>{O9();K9();});var $9=n(()=>{iw();});var aw=n(()=>{tw();ow();});var Ll={};V(Ll,{WorkspaceSpanMetricRequest:()=>_n,WorkspaceSpanMetricRequestInterval:()=>Ml,WorkspaceSpanMetricRequestMetricType:()=>Wl,WorkspaceTokenUsageNamesRequest:()=>kn});var Q9=n(()=>{$9();aw();});var Y9=n(()=>{kh();G6();Th();X6();jh();Eh();e2();Ih();o2();Dh();a2();Uh();oy();l2();my();u2();dy();gy();x2();fy();vy();k2();Xy();V2();rb();tb();O2();$b();tY();Qb();iY();Yb();oR();sY();lY();fR();fY();hR();yR();wY();AY();wR();SY();_R();AR();EY();PR();LR();BY();VR();tx();YY();ox();ZY();ix();nx();r9();sx();cx();i9();lx();gx();b9();yx();jx();z9();Ex();Cx();j9();Kx();V9();$x();Qx();G9();iw();Q9();aw();});var nw,sw=n(()=>{b();nw=r.enum_(["required","optional"]);});var pw,cw=n(()=>{b();sw();pw=r.object({name:r.string(),type:r.string(),presence:nw.optional()});});var lw,mw=n(()=>{b();cw();lw=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(pw).optional(),timeout:r.number().optional()});});var dw,uw=n(()=>{b();dw=r.enum_(["blueprint","mask"]);});var gw,fw=n(()=>{b();gw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var hw,yw=n(()=>{b();fw();hw=r.object({key:r.string(),value:r.string().optional(),type:gw,description:r.string().optional()});});var bw,Rw=n(()=>{b();uw();yw();bw=r.object({id:r.string().optional(),name:r.string().optional(),type:dw,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(hw)});});var xw,ww=n(()=>{b();xw=r.enum_(["blueprint","mask"]);});var _w,kw=n(()=>{b();_w=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Aw,Pw=n(()=>{b();kw();Aw=r.object({key:r.string(),value:r.string().optional(),type:_w,description:r.string().optional()});});var Pt,X9=n(()=>{b();ww();Pw();Pt=r.object({id:r.string().optional(),name:r.string().optional(),type:xw,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(Aw)});});var zw,Sw=n(()=>{b();zw=r.enum_(["blueprint","mask"]);});var vw,Tw=n(()=>{b();vw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var jw,Ew=n(()=>{b();Tw();jw=r.object({key:r.string(),value:r.string().optional(),type:vw,description:r.string().optional()});});var Cw,Iw=n(()=>{b();Sw();Ew();Cw=r.object({id:r.string().optional(),type:zw,description:r.string().optional(),values:r.list(jw)});});var Vl,Z9=n(()=>{b();Iw();Vl=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Cw});});var Dw,Uw=n(()=>{b();Dw=r.enum_(["critical","high","medium","low"]);});var Nw,Fw=n(()=>{b();Nw=r.enum_(["open","resolved","closed"]);});var Bw,Mw=n(()=>{b();Uw();Fw();Bw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Nw.optional(),severity:Dw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),totalOccurrences:r.property("total_occurrences",r.number().optional()),latestCount:r.property("latest_count",r.number().optional()),total:r.number().optional(),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),firstSeen:r.property("first_seen",r.string().optional()),lastSeen:r.property("last_seen",r.string().optional()),daysReported:r.property("days_reported",r.number().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var Ww,Lw=n(()=>{b();pe();Ww=r.object({reportDay:r.property("report_day",r.string().optional()),count:r.number().optional(),totalCount:r.property("total_count",r.number().optional()),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),metadata:L.optional()});});var Vw,q9=n(()=>{b();Mw();Vw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Bw).optional()});});var Jw,Hw=n(()=>{b();Jw=r.enum_(["critical","high","medium","low"]);});var Gw,Ow=n(()=>{b();Gw=r.enum_(["open","resolved","closed"]);});var Kw,eX=n(()=>{b();Lw();Hw();Ow();Kw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Gw.optional(),severity:Jw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),details:r.list(Ww).optional()});});var $w,Qw=n(()=>{b();$w=r.enum_(["enabled","disabled"]);});var An,rX=n(()=>{b();Qw();An=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:$w.optional(),autoFirstRunEnrolled:r.property("auto_first_run_enrolled",r.boolean().optional()),autoFirstRunAt:r.property("auto_first_run_at",r.date().optional()),lastScanAt:r.property("last_scan_at",r.date().optional()),lastFailureReason:r.property("last_failure_reason",r.string().optional()),lastFailureDetail:r.property("last_failure_detail",r.string().optional()),lastFailedAt:r.property("last_failed_at",r.date().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var ve,Gr=n(()=>{b();ve=r.object({name:r.string(),value:r.number()});});var zr,wo=n(()=>{b();zr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Yw,Xw=n(()=>{b();Gr();wo();Yw=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:zr.optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var Zw,qw=n(()=>{b();Zw=r.enum_(["general","slack","pagerduty"]);});var e_,r_=n(()=>{b();e_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var t_,o_=n(()=>{b();r_();t_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:e_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var i_,a_=n(()=>{b();i_=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 n_,s_=n(()=>{b();o_();a_();n_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",i_),triggerConfigs:r.property("trigger_configs",r.list(t_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var p_,c_=n(()=>{b();p_=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 zie,tX=n(()=>{b();qw();s_();c_();zie=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Zw.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:p_,triggers:r.list(n_).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 l_,m_=n(()=>{b();l_=r.enum_(["general","slack","pagerduty"]);});var d_,u_=n(()=>{b();d_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var g_,f_=n(()=>{b();u_();g_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:d_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var h_,y_=n(()=>{b();h_=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 b_,R_=n(()=>{b();f_();y_();b_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",h_),triggerConfigs:r.property("trigger_configs",r.list(g_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var x_,w_=n(()=>{b();x_=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 Pn,__=n(()=>{b();m_();R_();w_();Pn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",l_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:x_,triggers:r.list(b_).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 zn,oX=n(()=>{b();__();zn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pn).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var k_,A_=n(()=>{b();k_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var P_,z_=n(()=>{b();A_();P_=r.object({id:r.string().optional(),type:k_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional())});});var S_,v_=n(()=>{b();S_=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var T_,j_=n(()=>{b();z_();v_();T_=r.object({id:r.string().optional(),eventType:r.property("event_type",S_),triggerConfigs:r.property("trigger_configs",r.list(P_).optional())});});var E_,C_=n(()=>{b();E_=r.enum_(["general","slack","pagerduty"]);});var I_,D_=n(()=>{b();I_=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 Sn,iX=n(()=>{b();j_();C_();D_();Sn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",E_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:I_,triggers:r.list(T_).optional(),projectId:r.property("project_id",r.string().optional())});});var Jl,aX=n(()=>{b();pe();Jl=r.object({results:r.list(L).optional()});});var U_,N_=n(()=>{b();U_=r.object({username:r.string().optional(),status:r.number().optional()});});var F_,B_=n(()=>{b();F_=r.enum_(["trace","thread"]);});var M_,W_=n(()=>{b();gc();N_();B_();Gr();M_=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:F_,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:ji.optional(),reviewers:r.list(U_).optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var L_,V_=n(()=>{b();L_=r.enum_([">","<","="]);});var J_,H_=n(()=>{b();V_();J_=r.object({scoreName:r.property("score_name",r.string()),operator:L_,value:r.number()});});var G_,O_=n(()=>{b();H_();G_=r.object({conditions:r.list(J_)});});var K_,$_=n(()=>{b();O_();K_=r.object({groups:r.list(G_)});});var Q_,Y_=n(()=>{b();$_();Q_=r.object({enabled:r.boolean().optional(),conditions:K_.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Sie,nX=n(()=>{b();W_();Sie=r.object({annotationQueues:r.property("annotation_queues",r.list(M_))});});var Hl,sX=n(()=>{b();Hl=r.object({ids:r.list(r.string())});});var X_,Z_=n(()=>{b();X_=r.enum_(["manual","automated"]);});var q_,ek=n(()=>{b();Z_();q_=r.object({id:r.string().optional(),source:X_.optional()});});var rk,pX=n(()=>{b();ek();rk=r.object({content:r.list(q_).optional()});});var tk,ok=n(()=>{b();tk=r.enum_(["trace","thread"]);});var ik,ak=n(()=>{b();ik=r.object({username:r.string().optional(),status:r.number().optional()});});var Or,vn=n(()=>{b();Or=r.object({name:r.string(),value:r.number()});});var Tn,nk=n(()=>{b();Y_();ok();ak();vn();Tn=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:tk,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Q_.optional(),reviewers:r.list(ik).optional(),feedbackScores:r.property("feedback_scores",r.list(Or).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 sk,cX=n(()=>{b();nk();sk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Tn).optional(),sortableBy:r.list(r.string()).optional()});});var pk,ck=n(()=>{b();pk=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var lk,mk=n(()=>{b();lk=r.object({name:r.string(),value:r.number()});});var dk,uk=n(()=>{b();dk=r.object({name:r.string(),value:r.number()});});var gk,fk=n(()=>{b();gk=r.enum_(["system","user","assistant","tool","function"]);});var hk,yk=n(()=>{b();hk=r.enum_(["function"]);});var jn,Gl=n(()=>{b();lo();yk();jn=r.object({id:r.string().optional(),index:r.number().optional(),type:hk.optional(),function:wr.optional()});});var bk,Rk=n(()=>{b();fk();lo();Gl();bk=r.object({role:gk.optional(),content:r.string().optional(),reasoningContent:r.string().optional(),name:r.string().optional(),toolCalls:r.list(jn).optional(),refusal:r.string().optional(),functionCall:wr.optional()});});var xk,wk=n(()=>{b();xk=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 _k,lX=n(()=>{b();wk();_k=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(xk).optional(),sortableBy:r.list(r.string()).optional()});});var kk,Ak=n(()=>{b();kk=r.object({url:r.string()});});var Pk,zk=n(()=>{b();Pk=r.object({url:r.string()});});var Sk,vk=n(()=>{b();Sk=r.object({url:r.string()});});var Tk,mX=n(()=>{b();Tk=r.record(r.string(),r.unknown());});var jk,dX=n(()=>{b();jk=r.object({issuer:r.string().optional(),authorizationEndpoint:r.property("authorization_endpoint",r.string().optional()),tokenEndpoint:r.property("token_endpoint",r.string().optional()),revocationEndpoint:r.property("revocation_endpoint",r.string().optional()),registrationEndpoint:r.property("registration_endpoint",r.string().optional()),responseTypesSupported:r.property("response_types_supported",r.list(r.string()).optional()),grantTypesSupported:r.property("grant_types_supported",r.list(r.string()).optional()),codeChallengeMethodsSupported:r.property("code_challenge_methods_supported",r.list(r.string()).optional()),tokenEndpointAuthMethodsSupported:r.property("token_endpoint_auth_methods_supported",r.list(r.string()).optional())});});var Ek,Ck=n(()=>{b();Ek=r.object({id:r.string().optional(),name:r.string().optional(),isDefault:r.property("is_default",r.boolean().optional())});});var Ik,uX=n(()=>{b();Ck();Ik=r.object({clientName:r.property("client_name",r.string().optional()),clientLogoUri:r.property("client_logo_uri",r.string().optional()),workspaces:r.list(Ek).optional(),csrfToken:r.property("csrf_token",r.string().optional())});});var Dk,Uk=n(()=>{b();Dk=r.enum_(["evaluator","annotation_queue_router"]);});var Nk,Fk=n(()=>{b();Nk=r.object({url:r.string(),detail:r.string().optional()});});var Bk,Mk=n(()=>{b();Bk=r.object({url:r.string()});});var Wk,Lk=n(()=>{b();Ak();Fk();Mk();Wk=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Nk.optional()),videoUrl:r.property("video_url",Bk.optional()),audioUrl:r.property("audio_url",kk.optional())});});var Vk,Jk=n(()=>{b();Vk=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var zt,En=n(()=>{b();Lk();Jk();zt=r.object({role:Vk,content:r.string().optional(),contentArray:r.property("content_array",r.list(Wk).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var St,Cn=n(()=>{b();pe();St=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",L.optional())});});var Hk,Gk=n(()=>{b();Hk=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var vt,In=n(()=>{b();Gk();vt=r.object({name:r.string(),type:Hk,description:r.string()});});var Dn,Ol=n(()=>{b();En();Cn();In();Dn=r.object({model:St,messages:r.list(zt),variables:r.record(r.string(),r.string()),schema:r.list(vt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Ok,Kk=n(()=>{b();Ok=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,_o=n(()=>{b();Kk();Sr=r.object({field:r.string().optional(),operator:Ok.optional(),key:r.string().optional(),value:r.string().optional()});});var $k,Qk=n(()=>{b();Ol();_o();$k=r.object({filters:r.list(Sr).optional(),code:Dn.optional()});});var Un,Kl=n(()=>{b();En();Cn();In();Un=r.object({model:St,messages:r.list(zt),variables:r.record(r.string(),r.string()),schema:r.list(vt)});});var Yk,Xk=n(()=>{b();At();Kl();Yk=r.object({filters:r.list(tr).optional(),code:Un.optional()});});var Nn,$l=n(()=>{b();Nn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zk,qk=n(()=>{b();At();$l();Zk=r.object({filters:r.list(tr).optional(),code:Nn.optional()});});var Fn,Ql=n(()=>{b();En();Cn();In();Fn=r.object({model:St,messages:r.list(zt),schema:r.list(vt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var eA,rA=n(()=>{b();kt();Ql();eA=r.object({filters:r.list(rr).optional(),code:Fn.optional()});});var Bn,Yl=n(()=>{b();Bn=r.object({metric:r.string()});});var tA,oA=n(()=>{b();kt();Yl();tA=r.object({filters:r.list(rr).optional(),code:Bn.optional()});});var iA,aA=n(()=>{b();iA=r.enum_(["production","experiment","both"]);});var Mn,Xl=n(()=>{b();Mn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var nA,sA=n(()=>{b();_o();Xl();nA=r.object({filters:r.list(Sr).optional(),code:Mn.optional()});});var pA,cA=n(()=>{b();pA=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var ko,vie,gX=n(()=>{b();Uk();Qk();Xk();qk();rA();oA();aA();sA();cA();ko=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(pA).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",iA.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:Dk}),vie=r.union("type",{llm_as_judge:$k.extend(ko),user_defined_metric_python:nA.extend(ko),trace_thread_llm_as_judge:eA.extend(ko),trace_thread_user_defined_metric_python:tA.extend(ko),span_llm_as_judge:Yk.extend(ko),span_user_defined_metric_python:Zk.extend(ko)}).transform({transform:p=>p,untransform:p=>p});});var lA,mA=n(()=>{b();lA=r.object({url:r.string(),detail:r.string().optional()});});var dA,uA=n(()=>{b();dA=r.object({url:r.string()});});var gA,fA=n(()=>{b();zk();mA();uA();gA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",lA.optional()),videoUrl:r.property("video_url",dA.optional()),audioUrl:r.property("audio_url",Pk.optional())});});var hA,yA=n(()=>{b();hA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Tt,Wn=n(()=>{b();fA();yA();Tt=r.object({role:hA,content:r.string().optional(),contentArray:r.property("content_array",r.list(gA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,gr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var jt,Ln=n(()=>{b();gr();jt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var bA,RA=n(()=>{b();bA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Et,Vn=n(()=>{b();RA();Et=r.object({name:r.string(),type:bA,description:r.string()});});var xA,wA=n(()=>{b();Wn();Ln();Vn();xA=r.object({model:jt,messages:r.list(Tt),variables:r.record(r.string(),r.string()),schema:r.list(Et),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Jn,Zl=n(()=>{b();wA();Ro();Jn=r.object({filters:r.list(Pr).optional(),code:xA.optional()});});var _A,kA=n(()=>{b();_A=r.object({url:r.string(),detail:r.string().optional()});});var AA,PA=n(()=>{b();AA=r.object({url:r.string()});});var zA,SA=n(()=>{b();vk();kA();PA();zA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",_A.optional()),videoUrl:r.property("video_url",AA.optional()),audioUrl:r.property("audio_url",Sk.optional())});});var vA,TA=n(()=>{b();vA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Ct,Hn=n(()=>{b();SA();TA();Ct=r.object({role:vA,content:r.string().optional(),contentArray:r.property("content_array",r.list(zA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var It,Gn=n(()=>{b();kr();It=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var jA,EA=n(()=>{b();jA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Dt,On=n(()=>{b();EA();Dt=r.object({name:r.string(),type:jA,description:r.string()});});var CA,IA=n(()=>{b();Hn();Gn();On();CA=r.object({model:It,messages:r.list(Ct),variables:r.record(r.string(),r.string()),schema:r.list(Dt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var DA,UA=n(()=>{b();DA=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Kn,ql=n(()=>{b();UA();Kn=r.object({field:r.string().optional(),operator:DA.optional(),key:r.string().optional(),value:r.string().optional()});});var NA,FA=n(()=>{b();IA();ql();NA=r.object({filters:r.list(Kn).optional(),code:CA.optional()});});var BA,MA=n(()=>{b();BA=r.enum_(["evaluator","annotation_queue_router"]);});var WA,LA=n(()=>{b();WA=r.enum_(["production","experiment","both"]);});var VA,JA=n(()=>{b();Wn();Ln();Vn();VA=r.object({model:jt,messages:r.list(Tt),variables:r.record(r.string(),r.string()),schema:r.list(Et)});});var $n,em=n(()=>{b();bo();JA();$n=r.object({filters:r.list(Ar).optional(),code:VA.optional()});});var HA,GA=n(()=>{b();HA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Qn,rm=n(()=>{b();bo();GA();Qn=r.object({filters:r.list(Ar).optional(),code:HA.optional()});});var OA,KA=n(()=>{b();Wn();Ln();Vn();OA=r.object({model:jt,messages:r.list(Tt),schema:r.list(Et),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Yn,tm=n(()=>{b();Ta();KA();Yn=r.object({filters:r.list(Rt).optional(),code:OA.optional()});});var $A,QA=n(()=>{b();$A=r.object({metric:r.string()});});var Xn,om=n(()=>{b();Ta();QA();Xn=r.object({filters:r.list(Rt).optional(),code:$A.optional()});});var YA,XA=n(()=>{b();YA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zn,im=n(()=>{b();Ro();XA();Zn=r.object({filters:r.list(Pr).optional(),code:YA.optional()});});var qn,am=n(()=>{b();qn=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var Ao,ZA,qA=n(()=>{b();Zl();MA();LA();em();rm();tm();om();im();am();Ao=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(qn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",WA.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:BA}),ZA=r.union("type",{llm_as_judge:Jn.extend(Ao),user_defined_metric_python:Zn.extend(Ao),trace_thread_llm_as_judge:Yn.extend(Ao),trace_thread_user_defined_metric_python:Xn.extend(Ao),span_llm_as_judge:$n.extend(Ao),span_user_defined_metric_python:Qn.extend(Ao)}).transform({transform:p=>p,untransform:p=>p});});var eP,fX=n(()=>{b();qA();eP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ZA).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var rP,tP=n(()=>{b();rP=r.enum_(["evaluator","annotation_queue_router"]);});var oP,iP=n(()=>{b();oP=r.enum_(["production","experiment","both"]);});var Po,aP,hX=n(()=>{b();Zl();tP();iP();em();rm();tm();om();im();am();Po=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(qn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",oP.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:rP}),aP=r.union("type",{llm_as_judge:Jn.extend(Po),user_defined_metric_python:Zn.extend(Po),trace_thread_llm_as_judge:Yn.extend(Po),trace_thread_user_defined_metric_python:Xn.extend(Po),span_llm_as_judge:$n.extend(Po),span_user_defined_metric_python:Qn.extend(Po)}).transform({transform:p=>p,untransform:p=>p});});var nP,sP=n(()=>{b();nP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var es,nm=n(()=>{b();sP();es=r.object({field:r.string().optional(),operator:nP.optional(),key:r.string().optional(),value:r.string().optional()});});var pP,cP=n(()=>{b();Hn();Gn();On();pP=r.object({model:It,messages:r.list(Ct),variables:r.record(r.string(),r.string()),schema:r.list(Dt)});});var lP,mP=n(()=>{b();nm();cP();lP=r.object({filters:r.list(es).optional(),code:pP.optional()});});var dP,uP=n(()=>{b();dP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var gP,fP=n(()=>{b();nm();uP();gP=r.object({filters:r.list(es).optional(),code:dP.optional()});});var hP,yP=n(()=>{b();hP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rs,sm=n(()=>{b();yP();rs=r.object({field:r.string().optional(),operator:hP.optional(),key:r.string().optional(),value:r.string().optional()});});var bP,RP=n(()=>{b();Hn();Gn();On();bP=r.object({model:It,messages:r.list(Ct),schema:r.list(Dt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var xP,wP=n(()=>{b();sm();RP();xP=r.object({filters:r.list(rs).optional(),code:bP.optional()});});var _P,kP=n(()=>{b();_P=r.object({metric:r.string()});});var AP,PP=n(()=>{b();sm();kP();AP=r.object({filters:r.list(rs).optional(),code:_P.optional()});});var zP,SP=n(()=>{b();zP=r.enum_(["evaluator","annotation_queue_router"]);});var vP,TP=n(()=>{b();Ol();_o();vP=r.object({filters:r.list(Sr).optional(),code:Dn.optional()});});var jP,EP=n(()=>{b();At();Kl();jP=r.object({filters:r.list(tr).optional(),code:Un.optional()});});var CP,IP=n(()=>{b();At();$l();CP=r.object({filters:r.list(tr).optional(),code:Nn.optional()});});var DP,UP=n(()=>{b();kt();Ql();DP=r.object({filters:r.list(rr).optional(),code:Fn.optional()});});var NP,FP=n(()=>{b();kt();Yl();NP=r.object({filters:r.list(rr).optional(),code:Bn.optional()});});var BP,MP=n(()=>{b();BP=r.enum_(["production","experiment","both"]);});var WP,LP=n(()=>{b();_o();Xl();WP=r.object({filters:r.list(Sr).optional(),code:Mn.optional()});});var zo,VP,yX=n(()=>{b();SP();TP();EP();IP();UP();FP();MP();LP();zo=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",BP.optional()),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:zP}),VP=r.union("type",{llm_as_judge:vP.extend(zo),user_defined_metric_python:WP.extend(zo),trace_thread_llm_as_judge:DP.extend(zo),trace_thread_user_defined_metric_python:NP.extend(zo),span_llm_as_judge:jP.extend(zo),span_user_defined_metric_python:CP.extend(zo)}).transform({transform:p=>p,untransform:p=>p});});var JP,HP=n(()=>{b();JP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var GP,OP=n(()=>{b();ql();HP();GP=r.object({filters:r.list(Kn).optional(),code:JP.optional()});});var KP,$P=n(()=>{b();KP=r.enum_(["evaluator","annotation_queue_router"]);});var QP,YP=n(()=>{b();QP=r.enum_(["production","experiment","both"]);});var So,XP,bX=n(()=>{b();FA();mP();fP();wP();PP();OP();$P();YP();So=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",QP.optional()),action:KP}),XP=r.union("type",{llm_as_judge:NA.extend(So),user_defined_metric_python:GP.extend(So),trace_thread_llm_as_judge:xP.extend(So),trace_thread_user_defined_metric_python:AP.extend(So),span_llm_as_judge:lP.extend(So),span_user_defined_metric_python:gP.extend(So)}).transform({transform:p=>p,untransform:p=>p});});var ZP,qP=n(()=>{b();ZP=r.object({value:r.number().optional()});});var de,RX=n(()=>{b();de=r.object({ids:r.list(r.string())});});var ez,rz=n(()=>{b();ez=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var vo,xX=n(()=>{b();rz();vo=r.object({biInformation:r.property("bi_information",r.list(ez).optional())});});var tz,wX=n(()=>{b();Rw();tz=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(bw).optional()});});var oz,iz=n(()=>{b();oz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var az,nz=n(()=>{b();iz();az=r.object({details:oz.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 sz,pz=n(()=>{b();sz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var cz,lz=n(()=>{b();pz();cz=r.object({details:sz.optional()});});var mz,dz=n(()=>{b();mz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var ts,pm=n(()=>{b();dz();ts=r.object({details:mz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var uz,gz=n(()=>{b();uz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var fz,hz=n(()=>{b();gz();fz=r.object({details:uz.optional()});});var yz,bz=n(()=>{b();yz=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Rz,xz=n(()=>{b();Rz=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var wz,_X=n(()=>{b();bz();xz();pe();wz=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:Rz.optional(),status:yz.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 _z,kz=n(()=>{b();_z=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Az,Pz=n(()=>{b();kz();pe();Az=r.object({commandId:r.property("command_id",r.string().optional()),type:_z.optional(),args:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var zz,kX=n(()=>{b();Pz();zz=r.object({commands:r.list(Az).optional()});});var Sz,AX=n(()=>{b();Sz=r.object({commandId:r.property("command_id",r.string().optional())});});var vz,Tz=n(()=>{b();vz=r.object({categories:r.record(r.string(),r.number())});});var jz,Ez=n(()=>{b();Tz();jz=r.object({details:vz.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 Cz,Iz=n(()=>{b();Cz=r.object({categories:r.record(r.string(),r.number())});});var Dz,Uz=n(()=>{b();Iz();Dz=r.object({details:Cz.optional()});});var Nz,Fz=n(()=>{b();Nz=r.object({categories:r.record(r.string(),r.number())});});var os,cm=n(()=>{b();Fz();os=r.object({details:Nz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Bz,Mz=n(()=>{b();Bz=r.object({categories:r.record(r.string(),r.number())});});var Wz,Lz=n(()=>{b();Mz();Wz=r.object({details:Bz.optional()});});var Vz,Jz=n(()=>{b();lo();Gl();Vz=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.string().optional(),toolCalls:r.list(jn).optional(),functionCall:wr.optional()});});var Hz,Gz=n(()=>{b();Hz=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var Oz,Kz=n(()=>{b();Gz();Oz=r.object({content:r.list(Hz).optional()});});var $z,Qz=n(()=>{b();Rk();Jz();Kz();$z=r.object({index:r.number().optional(),message:bk.optional(),delta:Vz.optional(),finishReason:r.string().optional(),logprobs:Oz.optional()});});var Yz,Xz=n(()=>{b();Yz=r.object({reasoningTokens:r.number().optional()});});var Zz,qz=n(()=>{b();Zz=r.object({cachedTokens:r.number().optional()});});var eS,rS=n(()=>{b();Xz();qz();eS=r.object({totalTokens:r.number().optional(),promptTokens:r.number().optional(),promptTokensDetails:Zz.optional(),completionTokens:r.number().optional(),completionTokensDetails:Yz.optional()});});var tS,PX=n(()=>{b();Qz();rS();tS=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list($z).optional(),usage:eS.optional(),systemFingerprint:r.string().optional(),serviceTier:r.string().optional()});});var oS,iS=n(()=>{b();oS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var aS,nS=n(()=>{b();aS=r.enum_(["passed","failed"]);});var sS,pS=n(()=>{b();iS();nS();sS=r.object({name:oS.optional(),result:aS.optional()});});var cS,lS=n(()=>{b();cS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var mS,dS=n(()=>{b();mS=r.enum_(["passed","failed"]);});var uS,gS=n(()=>{b();lS();dS();uS=r.object({name:cS.optional(),result:mS.optional()});});var fS,hS=n(()=>{b();fS=r.object({typeName:r.string().optional()});});var Tie,zX=n(()=>{b();hS();Tie=r.object({type:fS.optional(),closed:r.boolean().optional()});});var yS,bS=n(()=>{b();yS=r.object({typeName:r.string().optional()});});var jie,SX=n(()=>{b();bS();jie=r.object({type:yS.optional(),closed:r.boolean().optional()});});var RS,vX=n(()=>{b();RS=r.object({clientId:r.property("client_id",r.string().optional()),clientIdIssuedAt:r.property("client_id_issued_at",r.number().optional()),clientName:r.property("client_name",r.string().optional()),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional()),redirectUris:r.property("redirect_uris",r.list(r.string()).optional()),tokenEndpointAuthMethod:r.property("token_endpoint_auth_method",r.string().optional()),grantTypes:r.property("grant_types",r.list(r.string()).optional()),responseTypes:r.property("response_types",r.list(r.string()).optional())});});var xS,wS=n(()=>{b();xS=r.enum_(["string","number","object","boolean","array","null"]);});var _S,kS=n(()=>{b();wS();_S=r.object({name:r.string().optional(),types:r.list(xS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var AS,PS=n(()=>{b();AS=r.enum_(["string","number","object","boolean","array","null"]);});var zS,SS=n(()=>{b();PS();zS=r.object({name:r.string().optional(),types:r.list(AS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var vS,TS=n(()=>{b();vS=r.enum_(["string","number","object","boolean","array","null"]);});var jS,ES=n(()=>{b();TS();jS=r.object({name:r.string().optional(),types:r.list(vS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var CS,IS=n(()=>{b();CS=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ut,is=n(()=>{b();Ut=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var DS,US=n(()=>{b();DS=r.enum_(["trace","span"]);});var NS,FS=n(()=>{b();NS=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var lm,TX=n(()=>{b();US();FS();lm=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",DS),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(NS))});});var BS,jX=n(()=>{b();BS=r.object({redirectTo:r.property("redirect_to",r.string().optional())});});var MS,WS=n(()=>{b();MS=r.object({value:r.number().optional()});});var LS,EX=n(()=>{b();LS=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var HS,GS=n(()=>{b();HS=r.enum_(["workspace","insights"]);});var OS,KS=n(()=>{b();OS=r.enum_(["multi_project","experiments"]);});var or,$S=n(()=>{b();GS();KS();gr();or=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:OS.optional(),scope:HS.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 Nt,CX=n(()=>{b();$S();Nt=r.object({content:r.list(or).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var QS,YS=n(()=>{b();QS=r.enum_(["multi_project","experiments"]);});var as,IX=n(()=>{b();YS();gr();as=r.object({name:r.string().optional(),type:QS.optional(),description:r.string().optional(),config:_e.optional()});});var XS,ZS=n(()=>{b();XS=r.enum_(["multi_project","experiments"]);});var ns,DX=n(()=>{b();ZS();kr();ns=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:XS.optional(),description:r.string().optional(),config:Se});});var Eie,UX=n(()=>{b();Eie=r.object({time:r.date(),value:r.number().optional()});});var qS,ev=n(()=>{b();qS=r.object({time:r.date(),value:r.number().optional()});});var rv,tv=n(()=>{b();rv=r.enum_(["unknown","processing","completed","failed"]);});var ov,iv=n(()=>{b();ov=r.enum_(["dataset","evaluation_suite"]);});var ss,mm=n(()=>{b();ss=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 av,nv=n(()=>{b();av=r.enum_(["private","public"]);});var Cie,NX=n(()=>{b();tv();iv();mm();nv();Cie=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:ov.optional(),visibility:av.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:rv.optional(),latestVersion:r.property("latest_version",ss.optional())});});var Iie,FX=n(()=>{b();Iie=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 sv,pv=n(()=>{b();sv=r.enum_(["manual","trace","span","sdk"]);});var cv,lv=n(()=>{b();cv=r.enum_(["passed","failed"]);});var mv,dv=n(()=>{b();lv();mv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:cv.optional()});});var ps,dm=n(()=>{b();pv();mo();ft();Uc();dv();pe();ps=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:sv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),experimentItems:r.property("experiment_items",r.list(ma).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),mv).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 uv,BX=n(()=>{b();dm();uv=r.object({generatedSamples:r.property("generated_samples",r.list(ps).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var Die,MX=n(()=>{b();dm();Die=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(ps),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var gv,WX=n(()=>{b();gv=r.record(r.string(),r.unknown());});var fv,hv=n(()=>{b();fv=r.enum_(["manual","trace","span","sdk"]);});var yv,bv=n(()=>{b();yv=r.enum_(["llm_judge","code_metric"]);});var Rv,xv=n(()=>{b();Rv=r.record(r.string(),r.unknown());});var wv,_v=n(()=>{b();bv();xv();wv=r.object({name:r.string(),type:yv,config:Rv});});var cs,um=n(()=>{b();cs=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var kv,Av=n(()=>{b();kv=r.enum_(["passed","failed"]);});var Pv,zv=n(()=>{b();Pv=r.enum_(["default","hidden"]);});var Sv,vv=n(()=>{b();Sv=r.enum_(["ui","sdk","online_scoring"]);});var Tv,jv=n(()=>{b();Tv=r.enum_(["ui","sdk","online_scoring"]);});var Ev,Cv=n(()=>{b();jv();Ev=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Tv.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Iv,Dv=n(()=>{b();vv();Cv();Iv=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Sv,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Ev).optional())});});var ls,Uv=n(()=>{b();ls=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Nv,Fv=n(()=>{b();ck();IS();um();Av();zv();Dv();Uv();Nv=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:ls.optional(),output:ls.optional(),traceMetadata:r.property("trace_metadata",ls.optional()),feedbackScores:r.property("feedback_scores",r.list(Iv).optional()),comments:r.list(CS).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",Pv.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",cs.optional()),assertionResults:r.property("assertion_results",r.list(pk).optional()),status:kv.optional()});});var Bv,Mv=n(()=>{b();Bv=r.enum_(["passed","failed"]);});var Wv,Lv=n(()=>{b();Mv();Wv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Bv.optional()});});var Vv,Jv=n(()=>{b();hv();_v();um();Fv();Lv();pe();Vv=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:fv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(wv).optional(),executionPolicy:r.property("execution_policy",cs.optional()),experimentItems:r.property("experiment_items",r.list(Nv).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),Wv).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Hv,LX=n(()=>{b();SS();Jv();Hv=r.object({content:r.list(Vv).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(zS).optional(),sortableBy:r.list(r.string()).optional()});});var Gv,Ov=n(()=>{b();Gv=r.enum_(["manual","trace","span","sdk"]);});var Kv,$v=n(()=>{b();Kv=r.enum_(["llm_judge","code_metric"]);});var ms,gm=n(()=>{b();$v();gr();ms=r.object({name:r.string(),type:Kv,config:_e});});var ds,fm=n(()=>{b();ds=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Qv,Yv=n(()=>{b();Qv=r.enum_(["default","hidden"]);});var us,Xv=n(()=>{b();Yv();us=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",Qv.optional())});});var Zv,qv=n(()=>{b();Zv=r.enum_(["passed","failed"]);});var eT,rT=n(()=>{b();qv();eT=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Zv.optional()});});var gs,tT=n(()=>{b();Ov();gm();fm();Xv();rT();pe();gs=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:Gv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(ms).optional(),executionPolicy:r.property("execution_policy",ds.optional()),experimentItems:r.property("experiment_items",r.list(us).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),eT).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 oT,VX=n(()=>{b();ES();tT();oT=r.object({content:r.list(gs).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(jS).optional(),sortableBy:r.list(r.string()).optional()});});var iT,aT=n(()=>{b();iT=r.enum_(["unknown","processing","completed","failed"]);});var nT,sT=n(()=>{b();nT=r.enum_(["dataset","evaluation_suite"]);});var pT,cT=n(()=>{b();pT=r.enum_(["private","public"]);});var fs,hm=n(()=>{b();fs=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 To,lT=n(()=>{b();aT();sT();cT();hm();To=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:nT.optional(),visibility:pT.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:iT.optional(),latestVersion:r.property("latest_version",fs.optional())});});var hs,JX=n(()=>{b();lT();hs=r.object({content:r.list(To).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var mT,dT=n(()=>{b();mT=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var uT,HX=n(()=>{b();dT();uT=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:mT.optional()});});var Kr,gT=n(()=>{b();gm();fm();Kr=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(ms).optional(),executionPolicy:r.property("execution_policy",ds.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 fT,GX=n(()=>{b();gT();fT=r.object({content:r.list(Kr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var hT,yT=n(()=>{b();hT=r.enum_(["trace","span"]);});var Uie,OX=n(()=>{b();yT();Uie=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",hT),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var ys,KX=n(()=>{b();ys=r.object({name:r.string(),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var jo,$X=n(()=>{b();jo=r.object({ids:r.list(r.string())});});var Nie,QX=n(()=>{b();Nie=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 bs,bT=n(()=>{b();bs=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 RT,YX=n(()=>{b();bT();RT=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(bs).optional(),sortableBy:r.list(r.string()).optional()});});var Rs,ym=n(()=>{b();Rs=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var xT,wT=n(()=>{b();xT=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Ft,xs=n(()=>{b();Ft=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Eo,XX=n(()=>{b();Eo=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Fie,ZX=n(()=>{b();Fie=r.object({errors:r.list(r.string()).optional()});});var Bie,qX=n(()=>{b();Bie=r.object({errors:r.list(r.string()).optional()});});var Mie,e5=n(()=>{b();Mie=r.object({errors:r.list(r.string()).optional()});});var Wie,r5=n(()=>{b();Wie=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Lie,t5=n(()=>{b();Lie=r.object({errors:r.list(r.string()).optional()});});var ws,o5=n(()=>{b();ws=r.object({exists:r.boolean().optional()});});var _T,kT=n(()=>{b();_T=r.enum_(["dataset","evaluation_suite"]);});var AT,PT=n(()=>{b();AT=r.enum_(["running","completed","cancelled"]);});var zT,ST=n(()=>{b();zT=r.enum_(["regular","trial","mini-batch","mutation"]);});var Vie,i5=n(()=>{b();mk();ht();mm();kT();Ic();PT();ST();Gr();Ye();wo();aa();Vie=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:zT.optional(),evaluationMethod:r.property("evaluation_method",_T.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),comments:r.list(ge).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:AT.optional(),experimentScores:r.property("experiment_scores",r.list(ta).optional()),promptVersion:r.property("prompt_version",Jr.optional()),promptVersions:r.property("prompt_versions",r.list(Jr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",ss.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(lk).optional())});});var vT,TT=n(()=>{b();vT=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var jT,a5=n(()=>{b();TT();jT=r.object({experiments:r.list(vT).optional(),totalItems:r.property("total_items",r.number().optional())});});var ET,CT=n(()=>{b();Xw();ET=r.object({label:r.string().optional(),aggregations:Yw.optional()});});var IT,n5=n(()=>{b();CT();IT=r.object({content:r.record(r.string(),ET).optional()});});var DT,UT=n(()=>{b();DT=r.object({label:r.string().optional()});});var NT,FT=n(()=>{b();NT=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var BT,MT=n(()=>{b();FT();BT=r.object({groupsDetails:r.property("groups_details",r.list(NT).optional())});});var WT,s5=n(()=>{b();UT();MT();WT=r.object({content:r.record(r.string(),DT).optional(),details:BT.optional()});});var LT,VT=n(()=>{b();LT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var JT,HT=n(()=>{b();JT=r.enum_(["general","tool","llm","guardrail"]);});var _s,bm=n(()=>{b();ht();Hr();yt();Ye();VT();HT();_s=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:JT.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",He.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:LT.optional(),environment:r.string().optional()});});var GT,OT=n(()=>{b();GT=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var KT,$T=n(()=>{b();pS();KT=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(sS).optional()});});var QT,YT=n(()=>{b();QT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var XT,ZT=n(()=>{b();XT=r.enum_(["default","hidden"]);});var ks,Rm=n(()=>{b();ht();Hr();OT();yt();$T();Ye();YT();ZT();ks=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",He.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(KT).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",XT.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:GT.optional(),source:QT.optional(),environment:r.string().optional()});});var qT,ej=n(()=>{b();yt();Ye();bm();Rm();qT=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:ks.optional(),spans:r.list(_s).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var Jie,p5=n(()=>{b();ej();Jie=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(qT)});});var rj,tj=n(()=>{b();rj=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var oj,ij=n(()=>{b();oj=r.enum_(["dataset","evaluation_suite"]);});var aj,nj=n(()=>{b();aj=r.enum_(["running","completed","cancelled"]);});var sj,pj=n(()=>{b();sj=r.enum_(["regular","trial","mini-batch","mutation"]);});var cj,lj=n(()=>{b();cj=r.object({name:r.string(),value:r.number()});});var Ge,Co=n(()=>{b();Ge=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var As,xm=n(()=>{b();As=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Ps,mj=n(()=>{b();uk();is();hm();ij();nj();pj();lj();vn();Co();xm();pl();Ps=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),type:sj.optional(),evaluationMethod:r.property("evaluation_method",oj.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Or).optional()),comments:r.list(Ut).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:As.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:aj.optional(),experimentScores:r.property("experiment_scores",r.list(cj).optional()),promptVersion:r.property("prompt_version",xo.optional()),promptVersions:r.property("prompt_versions",r.list(xo).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",fs.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(dk).optional())});});var zs,c5=n(()=>{b();mj();zs=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ps).optional(),sortableBy:r.list(r.string()).optional()});});var Hie,l5=n(()=>{pe();Hie=L;});var dj,uj=n(()=>{b();dj=r.object({max:r.number(),min:r.number()});});var gj,fj=n(()=>{b();uj();gj=r.object({details:dj.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 hj,Gie,m5=n(()=>{b();nz();Ez();fj();hj=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()}),Gie=r.union("type",{numerical:gj.extend(hj),categorical:jz.extend(hj),boolean:az.extend(hj)}).transform({transform:p=>p,untransform:p=>p});});var yj,bj=n(()=>{b();yj=r.object({max:r.number(),min:r.number()});});var Rj,xj=n(()=>{b();bj();Rj=r.object({details:yj.optional()});});var wj,_j,d5=n(()=>{b();lz();Uz();xj();wj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),_j=r.union("type",{numerical:Rj.extend(wj),categorical:Dz.extend(wj),boolean:cz.extend(wj)}).transform({transform:p=>p,untransform:p=>p});});var kj,Aj=n(()=>{b();kj=r.object({max:r.number(),min:r.number()});});var Ss,wm=n(()=>{b();Aj();Ss=r.object({details:kj.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 Pj,zj,Sj=n(()=>{b();pm();cm();wm();Pj=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()}),zj=r.union("type",{numerical:Ss.extend(Pj),categorical:os.extend(Pj),boolean:ts.extend(Pj)}).transform({transform:p=>p,untransform:p=>p});});var vj,u5=n(()=>{b();Sj();vj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(zj).optional()});});var Tj,jj,g5=n(()=>{b();pm();cm();wm();Tj=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()}),jj=r.union("type",{numerical:Ss.extend(Tj),categorical:os.extend(Tj),boolean:ts.extend(Tj)}).transform({transform:p=>p,untransform:p=>p});});var Ej,Cj=n(()=>{b();Ej=r.object({name:r.string(),value:r.number()});});var Ij,Dj=n(()=>{b();Ij=r.enum_(["ui","sdk","online_scoring"]);});var Uj,Nj=n(()=>{b();Dj();Uj=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:Ij,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),id:r.string()});});var vs,f5=n(()=>{b();Nj();vs=r.object({scores:r.list(Uj)});});var Fj,Bj=n(()=>{b();Fj=r.object({name:r.string().optional(),type:r.string().optional()});});var Mj,h5=n(()=>{b();Bj();Mj=r.object({scores:r.list(Fj).optional()});});var Wj,Lj=n(()=>{b();Wj=r.object({name:r.string().optional(),type:r.string().optional()});});var $r,y5=n(()=>{b();Lj();$r=r.object({scores:r.list(Wj).optional()});});var Vj,Jj=n(()=>{b();Vj=r.enum_(["ui","sdk","online_scoring"]);});var Hj,Gj=n(()=>{b();Hj=r.enum_(["ui","sdk","online_scoring"]);});var Oj,Kj=n(()=>{b();Gj();Oj=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Hj.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Io,_m=n(()=>{b();Jj();Kj();Io=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Vj,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Oj).optional())});});var $j,Qj=n(()=>{b();$j=r.object({max:r.number(),min:r.number()});});var Yj,Xj=n(()=>{b();Qj();Yj=r.object({details:$j.optional()});});var Zj,qj,b5=n(()=>{b();hz();Lz();Xj();Zj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),qj=r.union("type",{numerical:Yj.extend(Zj),categorical:Wz.extend(Zj),boolean:fz.extend(Zj)}).transform({transform:p=>p,untransform:p=>p});});var eE,R5=n(()=>{b();eE=r.object({reportId:r.string().optional()});});var rE,tE=n(()=>{b();rE=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var oE,iE=n(()=>{b();oE=r.enum_(["passed","failed"]);});var aE,nE=n(()=>{b();tE();iE();pe();aE=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:rE,result:oE,config:L,details:L});});var Oie,x5=n(()=>{b();nE();Oie=r.object({guardrails:r.list(aE)});});var sE,pE=n(()=>{b();gS();sE=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(uS).optional()});});var Kie,w5=n(()=>{b();Kie=r.object({ids:r.list(r.string())});});var cE,lE=n(()=>{b();cE=r.object({activeLocks:r.property("active_locks",r.number().optional()),lockedBy:r.property("locked_by",r.list(r.string()).optional())});});var mE,dE=n(()=>{b();mE=r.enum_(["count","errors","avg_duration","total_cost"]);});var uE,gE=n(()=>{b();dE();uE=r.object({type:mE.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var fE,_5=n(()=>{b();gE();fE=r.object({stats:r.list(uE).optional()});});var hE,yE=n(()=>{b();hE=r.enum_(["pairing","connected","disconnected"]);});var bE,RE=n(()=>{b();bE=r.enum_(["connect","endpoint"]);});var Ts,xE=n(()=>{b();mw();pe();yE();RE();Ts=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:hE.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(lw).optional(),capabilities:r.list(r.string()).optional(),checklist:L.optional(),type:bE.optional()});});var wE,k5=n(()=>{b();wE=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var _E,A5=n(()=>{b();Al();_E=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(wt).optional()});});var kE,P5=n(()=>{b();xE();kE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ts).optional()});});var AE,z5=n(()=>{b();AE=r.object({acquired:r.boolean().optional(),itemId:r.property("item_id",r.string().optional()),lockedBy:r.property("locked_by",r.string().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var PE,S5=n(()=>{b();lE();PE=r.object({locks:r.record(r.string(),cE).optional()});});var zE,SE=n(()=>{b();zE=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var vE,TE=n(()=>{b();SE();vE=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:zE.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var jE,v5=n(()=>{b();TE();jE=r.object({content:r.list(vE).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var EE,CE=n(()=>{b();EE=r.enum_(["trace","thread","span"]);});var js,T5=n(()=>{b();CE();js=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",EE)});});var Es,j5=n(()=>{b();Es=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var $ie,E5=n(()=>{b();$ie=r.object({error:r.string().optional(),errorDescription:r.property("error_description",r.string().optional())});});var km,C5=n(()=>{b();km=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var Am,I5=n(()=>{b();Am=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var IE,DE=n(()=>{b();IE=r.enum_(["pending","completed","failed"]);});var UE,NE=n(()=>{b();pe();DE();UE=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),sessionId:r.property("session_id",r.string().optional()),content:r.string().optional(),recommendedActions:r.property("recommended_actions",L.optional()),status:IE.optional(),failureReason:r.property("failure_reason",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FE,D5=n(()=>{b();NE();FE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(UE).optional()});});var BE,ME=n(()=>{b();BE=r.enum_(["running","completed","cancelled","initialized","error"]);});var WE,LE=n(()=>{b();pe();WE=r.object({type:r.string(),parameters:L.optional()});});var VE,JE=n(()=>{b();LE();VE=r.object({metrics:r.list(WE)});});var HE,GE=n(()=>{b();pe();HE=r.object({model:r.string(),parameters:L.optional()});});var OE,KE=n(()=>{b();pe();OE=r.object({type:r.string(),parameters:L.optional()});});var $E,QE=n(()=>{b();$E=r.object({role:r.string(),content:r.string()});});var YE,XE=n(()=>{b();QE();YE=r.object({messages:r.list($E)});});var ZE,qE=n(()=>{b();JE();GE();KE();XE();ZE=r.object({datasetName:r.property("dataset_name",r.string()),prompt:YE,llmModel:r.property("llm_model",HE),evaluation:VE,optimizer:OE});});var Qie,U5=n(()=>{b();Hr();Gr();Ye();ME();qE();Qie=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:BE,metadata:le.optional(),studioConfig:r.property("studio_config",ZE.optional()),errorInfo:r.property("error_info",He.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var eC,rC=n(()=>{b();eC=r.enum_(["running","completed","cancelled","initialized","error"]);});var tC,oC=n(()=>{b();gr();tC=r.object({type:r.string(),parameters:_e.optional()});});var iC,aC=n(()=>{b();oC();iC=r.object({metrics:r.list(tC)});});var nC,sC=n(()=>{b();gr();nC=r.object({model:r.string(),parameters:_e.optional()});});var pC,cC=n(()=>{b();gr();pC=r.object({type:r.string(),parameters:_e.optional()});});var lC,mC=n(()=>{b();lC=r.object({role:r.string(),content:r.string()});});var dC,uC=n(()=>{b();mC();dC=r.object({messages:r.list(lC)});});var gC,fC=n(()=>{b();aC();sC();cC();uC();gC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:dC,llmModel:r.property("llm_model",nC),evaluation:iC,optimizer:pC});});var Cs,hC=n(()=>{b();xs();vn();Co();rC();fC();Cs=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:eC,metadata:Ge.optional(),studioConfig:r.property("studio_config",gC.optional()),errorInfo:r.property("error_info",Ft.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Or).optional()),experimentScores:r.property("experiment_scores",r.list(Or).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 Is,N5=n(()=>{b();hC();Is=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cs).optional(),sortableBy:r.list(r.string()).optional()});});var yC,bC=n(()=>{b();kr();yC=r.object({type:r.string(),parameters:Se.optional()});});var RC,xC=n(()=>{b();bC();RC=r.object({metrics:r.list(yC)});});var wC,_C=n(()=>{b();kr();wC=r.object({model:r.string(),parameters:Se.optional()});});var kC,AC=n(()=>{b();kr();kC=r.object({type:r.string(),parameters:Se.optional()});});var PC,zC=n(()=>{b();PC=r.object({role:r.string(),content:r.string()});});var SC,vC=n(()=>{b();zC();SC=r.object({messages:r.list(PC)});});var TC,jC=n(()=>{b();xC();_C();AC();vC();TC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:SC,llmModel:r.property("llm_model",wC),evaluation:RC,optimizer:kC});});var EC,F5=n(()=>{b();EC=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var CC,IC=n(()=>{b();CC=r.enum_(["running","completed","cancelled","initialized","error"]);});var Pm,B5=n(()=>{b();rn();fo();jC();IC();Pm=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:CC,metadata:Je.optional(),studioConfig:r.property("studio_config",TC.optional()),errorInfo:r.property("error_info",_t.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var DC,M5=n(()=>{b();kS();DC=r.object({columns:r.list(_S).optional()});});var UC,NC=n(()=>{b();xm();UC=r.object({value:As.optional()});});var FC,BC=n(()=>{b();FC=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var MC,WC=n(()=>{b();MC=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var LC,VC=n(()=>{b();LC=r.enum_(["private","public"]);});var Yie,W5=n(()=>{b();ym();Gr();wo();VC();Yie=r.object({id:r.string().optional(),name:r.string(),visibility:LC.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Rs.optional())});});var JC,HC=n(()=>{b();JC=r.enum_(["private","public"]);});var GC,L5=n(()=>{b();wT();Cj();BC();HC();GC=r.object({id:r.string().optional(),name:r.string(),visibility:JC.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(Ej).optional()),duration:FC.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",xT.optional())});});var OC,KC=n(()=>{b();OC=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var $C,QC=n(()=>{b();$C=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 YC,XC=n(()=>{b();ev();YC=r.object({name:r.string().optional(),data:r.list(qS).optional()});});var ZC,V5=n(()=>{b();KC();QC();XC();ZC=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",$C.optional()),interval:OC.optional(),results:r.list(YC).optional()});});var qC,eI=n(()=>{b();qC=r.enum_(["private","public"]);});var Ds,rI=n(()=>{b();eI();Ds=r.object({id:r.string().optional(),name:r.string(),visibility:qC.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 tI,J5=n(()=>{b();rI();tI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ds).optional(),sortableBy:r.list(r.string()).optional()});});var oI,iI,aI=n(()=>{b();qP();WS();NC();oI=r.object({name:r.string().optional()}),iI=r.union("type",{PERCENTAGE:UC.extend(oI),COUNT:MS.extend(oI),AVG:ZP.extend(oI)}).transform({transform:p=>p,untransform:p=>p});});var Qr,H5=n(()=>{b();aI();Qr=r.object({stats:r.list(iI).optional()});});var nI,sI=n(()=>{b();ym();Gr();wo();nI=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Rs.optional())});});var pI,G5=n(()=>{b();sI();pI=r.object({content:r.list(nI).optional()});});var cI,lI=n(()=>{b();cI=r.enum_(["text","chat"]);});var mI,dI=n(()=>{b();mI=r.enum_(["mustache","jinja2","python"]);});var uI,gI=n(()=>{b();uI=r.enum_(["text","chat"]);});var fI,hI=n(()=>{b();fI=r.enum_(["mustache","jinja2","python"]);});var yI,bI=n(()=>{b();yI=r.enum_(["prompt_version","mask"]);});var zm,RI=n(()=>{b();pe();gI();hI();bI();zm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:L.optional(),type:fI.optional(),versionType:r.property("version_type",yI.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",uI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Xie,O5=n(()=>{b();pe();lI();dI();RI();Xie=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:mI.optional(),templateStructure:r.property("template_structure",cI.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",zm.optional()),requestedVersion:r.property("requested_version",zm.optional())});});var xI,wI=n(()=>{b();xI=r.enum_(["text","chat"]);});var Sm,K5=n(()=>{b();wI();Da();Sm=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",xI.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",De.optional()),requestedVersion:r.property("requested_version",De.optional())});});var _I,kI=n(()=>{b();_I=r.enum_(["text","chat"]);});var AI,PI=n(()=>{b();kI();AI=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",_I.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 Us,$5=n(()=>{b();PI();Us=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(AI).optional(),sortableBy:r.list(r.string()).optional()});});var zI,SI=n(()=>{b();zI=r.enum_(["text","chat"]);});var vI,TI=n(()=>{b();vI=r.enum_(["mustache","jinja2","python"]);});var jI,EI=n(()=>{b();jI=r.enum_(["prompt_version","mask"]);});var CI,II=n(()=>{b();gr();SI();TI();EI();CI=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:_e.optional(),type:vI.optional(),versionType:r.property("version_type",jI.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",zI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var DI,Q5=n(()=>{b();II();DI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(CI).optional(),sortableBy:r.list(r.string()).optional()});});var UI,NI=n(()=>{b();UI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Zie,Y5=n(()=>{b();NI();ya();Zie=r.object({id:r.string().optional(),provider:UI,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",bt.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 FI,BI=n(()=>{b();FI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var MI,WI=n(()=>{b();MI=r.enum_(["form","json","basic"]);});var LI,VI=n(()=>{b();JS();WI();LI=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",MI.optional()),credentials:r.list(VS).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Ns,JI=n(()=>{b();BI();VI();Ns=r.object({id:r.string().optional(),provider:FI,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",LI.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 HI,X5=n(()=>{b();JI();HI=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Ns).optional(),sortableBy:r.list(r.string()).optional()});});var GI,OI=n(()=>{b();GI=r.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var KI,$I=n(()=>{b();OI();KI=r.object({type:GI.optional(),id:r.string().optional(),name:r.string().optional(),resourceId:r.property("resource_id",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var QI,Z5=n(()=>{b();$I();QI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(KI).optional()});});var YI,XI=n(()=>{b();YI=r.enum_(["agent_insights"]);});var Fs,ZI=n(()=>{b();XI();Fs=r.object({id:r.string().optional(),type:YI,projectId:r.property("project_id",r.string()),reason:r.string(),detail:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var qI,q5=n(()=>{b();ZI();qI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fs).optional()});});var Bs,e3=n(()=>{b();Bs=r.object({projectId:r.property("project_id",r.string().optional()),enabled:r.boolean().optional(),scheduleTime:r.property("schedule_time",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var eD,r3=n(()=>{b();eD=r.object({enrolled:r.number().optional(),cleared:r.number().optional(),unknownProjectIds:r.property("unknown_project_ids",r.list(r.string()).optional()),alreadyRunProjectIds:r.property("already_run_project_ids",r.list(r.string()).optional())});});var vr,vm=n(()=>{b();vr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var rD,tD=n(()=>{b();rD=r.enum_(["organization","workspace","project"]);});var oD,iD=n(()=>{b();oD=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Do,aD=n(()=>{b();tD();iD();Do=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:rD.optional(),retention:oD,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 nD,t3=n(()=>{b();aD();nD=r.object({content:r.list(Do).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var sD,o3=n(()=>{b();sD=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),exportEnabled:r.boolean(),costIntelligenceEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),demoDataEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),ollieEnabled:r.boolean(),projectHomepageEnabled:r.boolean(),onlineScoringTracingEnabled:r.boolean(),annotationQueueAutomationEnabled:r.boolean(),defaultPageSize:r.number().optional()});});var qie,i3=n(()=>{b();bm();qie=r.object({spans:r.list(_s)});});var pD,cD=n(()=>{b();pD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var lD,mD=n(()=>{b();lD=r.enum_(["general","tool","llm","guardrail"]);});var Ms,dD=n(()=>{b();is();xs();_m();Co();cD();mD();Ms=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:lD.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ft.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Io).optional()),comments:r.list(Ut).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:pD.optional(),environment:r.string().optional()});});var uD,a3=n(()=>{b();dD();uD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ms).optional(),sortableBy:r.list(r.string()).optional()});});var gD,fD=n(()=>{b();gD=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var hD,n3=n(()=>{b();fD();hD=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(gD).optional())});});var yD,s3=n(()=>{b();yD=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var bD,p3=n(()=>{b();bD=r.object({accessToken:r.property("access_token",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional()),tokenType:r.property("token_type",r.string().optional()),expiresIn:r.property("expires_in",r.number().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional())});});var Ws,c3=n(()=>{b();Ws=r.object({names:r.list(r.string()).optional()});});var eae,l3=n(()=>{b();Rm();eae=r.object({traces:r.list(ks)});});var RD,xD=n(()=>{b();RD=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var wD,m3=n(()=>{b();xD();wD=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(RD).optional())});});var _D,kD=n(()=>{b();_D=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var AD,PD=n(()=>{b();AD=r.enum_(["default","hidden"]);});var Ls,zD=n(()=>{b();is();xs();tj();_m();pE();Co();kD();PD();Ls=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ft.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Io).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Io).optional()),comments:r.list(Ut).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(sE).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",AD.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:rj.optional(),source:_D.optional(),environment:r.string().optional()});});var SD,d3=n(()=>{b();zD();SD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ls).optional(),sortableBy:r.list(r.string()).optional()});});var vD,TD=n(()=>{b();vD=r.enum_(["active","inactive"]);});var Vs,jD=n(()=>{b();ht();yt();Ye();TD();Vs=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:vD.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(ge).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),environment:r.string().optional()});});var Tm,u3=n(()=>{b();Tm=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 ED,g3=n(()=>{b();jD();ED=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vs).optional(),sortableBy:r.list(r.string()).optional()});});var CD,ID=n(()=>{b();CD=r.object({workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var DD,f3=n(()=>{b();ID();DD=r.object({breakdown:r.list(CD).optional()});});var UD,h3=n(()=>{b();UD=r.object({userName:r.property("user_name",r.string().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),resource:r.string().optional(),expiresAt:r.property("expires_at",r.date().optional())});});var ND,y3=n(()=>{b();ND=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var FD,BD=n(()=>{b();FD=r.enum_(["success","failure"]);});var MD,b3=n(()=>{b();BD();MD=r.object({status:FD.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 WD,R3=n(()=>{b();WD=r.object({completed:r.boolean().optional()});});var Js,x3=n(()=>{b();Js=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 rae,w3=n(()=>{b();rae=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 Hs,_3=n(()=>{b();vm();Hs=r.object({results:r.list(vr).optional()});});var Uo,k3=n(()=>{b();Uo=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 LD,A3=n(()=>{b();vm();LD=r.object({results:r.list(vr).optional()});});var VD,P3=n(()=>{b();VD=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var JD,z3=n(()=>{b();WC();JD=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(MC).optional()});});var S3=n(()=>{mw();Rw();uw();X9();ww();Iw();Sw();Z9();_h();yw();fw();Pw();kw();Ew();Tw();Mw();Lw();q9();Uw();Fw();eX();Hw();Ow();rX();Qw();Xw();tX();qw();oX();__();m_();s_();o_();f_();u_();r_();z_();A_();a_();R_();y_();j_();v_();iX();C_();aX();W_();gc();Y_();Gh();nX();sX();ek();Z_();pX();cX();nk();ok();N_();ak();B_();$h();Kh();Eb();cy();ay();sy();ck();mk();uk();Rk();fk();wk();lX();Ak();zk();vk();mX();dX();uX();gX();Uk();Qk();Zl();FA();qA();MA();LA();fX();hX();tP();iP();Xk();em();mP();qk();rm();fP();rA();tm();wP();oA();om();PP();aA();yX();SP();TP();EP();IP();UP();FP();MP();LP();sA();im();OP();bX();$P();YP();qP();RX();rz();xX();wX();nz();lz();pm();hz();iz();pz();dz();gz();qx();Xx();jR();vR();_X();kX();Pz();kz();bz();AX();xz();Ez();Uz();cm();Lz();Tz();Iz();Fz();Mz();Qz();PX();pS();iS();gS();lS();dS();nS();zX();SX();bS();hS();vX();kS();SS();PS();ES();TS();wS();ht();IS();is();TX();US();Xz();ey();O_();Lh();ty();$_();Jh();jX();WS();EX();aR();JS();cR();CX();$S();GS();KS();IX();YS();DX();ZS();UX();ev();NX();FX();BX();eb();qy();dm();MX();WX();Jv();hv();zc();Ny();LX();VX();tT();Ov();pv();By();Ky();Wy();JX();lT();aT();sT();cT();tv();iv();HX();dT();GX();gT();mm();hm();nv();OX();yT();KX();$X();Jz();QX();YX();bT();ym();wT();Hr();Dc();xs();rn();XX();ZX();qX();e5();r5();t5();mo();_v();bv();gm();$v();jy();Hy();Vy();ft();um();fm();Oy();o5();i5();kT();a5();n5();s5();TT();Uc();ej();Tb();p5();Fv();Av();zv();Xv();Yv();OT();tj();Ib();Ub();c5();mj();ij();nj();pj();dv();Lv();Mv();rT();qv();lv();Ic();lj();Jb();PT();ST();sb();ib();nb();l5();m5();d5();u5();Sj();g5();yt();Gr();Cj();vn();f5();Nj();Dj();Nx();Dx();Dv();vv();yb();mb();h5();y5();_m();Jj();Fb();b5();kc();lo();R5();UT();CT();FT();MT();nE();x5();tE();iE();$T();pE();tR();Zb();eR();w5();Fk();mA();kA();lE();Ye();Uv();sa();Co();fo();pe();xv();HR();gr();kr();yy();_5();gE();dE();Ol();wA();IA();En();Lk();fA();SA();Wn();yA();Jk();Hn();TA();Cn();Ln();Gn();In();Vn();RA();Gk();On();EA();xE();k5();Al();Rl();A5();hx();wl();P5();yE();RE();z5();S5();TE();SE();v5();Gz();Kz();T5();CE();j5();Ac();FS();fj();xj();wm();Xj();uj();bj();Aj();Qj();E5();C5();I5();RR();NE();D5();DE();U5();N5();hC();rC();ME();qE();fC();jC();F5();B5();IC();M5();cw();sw();NC();wo();BC();xm();WC();W5();L5();HC();V5();KC();QC();J5();rI();eI();cA();am();aI();H5();G5();sI();VC();O5();K5();wI();$5();PI();kI();lI();qz();dI();cb();RI();Da();OR();$R();YR();aa();pl();Hb();Q5();II();SI();TI();EI();gI();hI();qR();bI();Y5();X5();NI();JI();BI();ya();VI();WI();sR();uR();mR();$I();OI();Z5();vh();zh();ZI();q5();XI();e3();r3();wy();Ry();vm();XC();t3();aD();tD();iD();Zh();Yh();H_();V_();Mh();Fh();Bj();Lj();o3();bm();i3();Cy();kb();Rb();wb();At();rw();bo();CR();nm();sP();Kl();JA();cP();a3();dD();cD();mD();VT();n3();HT();_x();Rx();wx();$l();GA();uP();Sx();Ax();zx();s3();ky();JE();aC();xC();GE();sC();_C();QE();mC();zC();LE();oC();bC();KE();cC();AC();XE();uC();vC();p3();c3();Sy();Gl();yk();Py();Rm();l3();m3();Dy();Sb();Pb();_o();Kk();Ro();DR();ql();UA();d3();zD();kD();PD();YT();jD();kt();Ox();Ta();NR();sm();yP();u3();Ql();KA();RP();g3();TD();Hx();Yl();QA();kP();Mx();Bx();ZT();Vx();Lx();rS();f3();Xl();XA();HP();h3();Lb();Cv();jv();fb();ub();Kj();Gj();Mb();Mk();uA();PA();c_();y3();w_();b3();BD();D_();R3();x3();Ck();w3();_3();k3();A3();P3();ID();fD();xD();z3();});var G={};V(G,{ActivateRequest:()=>za,Agent:()=>lw,AgentBlueprintHistory:()=>bw,AgentBlueprintHistoryType:()=>dw,AgentBlueprintPublic:()=>Pt,AgentBlueprintPublicType:()=>xw,AgentBlueprintWrite:()=>Cw,AgentBlueprintWriteType:()=>zw,AgentConfigCreateWrite:()=>Vl,AgentConfigEnv:()=>wh,AgentConfigEnvSetByName:()=>xi,AgentConfigEnvUpdate:()=>wi,AgentConfigRemoveValues:()=>_i,AgentConfigValueHistory:()=>hw,AgentConfigValueHistoryType:()=>gw,AgentConfigValuePublic:()=>Aw,AgentConfigValuePublicType:()=>_w,AgentConfigValueWrite:()=>jw,AgentConfigValueWriteType:()=>vw,AgentInsightsIssue:()=>Bw,AgentInsightsIssueDetail:()=>Ww,AgentInsightsIssuePage:()=>Vw,AgentInsightsIssueSeverity:()=>Dw,AgentInsightsIssueStatus:()=>Nw,AgentInsightsIssueUpdate:()=>ki,AgentInsightsIssueUpdateStatus:()=>ac,AgentInsightsIssueWithDetails:()=>Kw,AgentInsightsIssueWithDetailsSeverity:()=>Jw,AgentInsightsIssueWithDetailsStatus:()=>Gw,AgentInsightsJob:()=>An,AgentInsightsJobStatus:()=>$w,AgentInsightsJobUpdate:()=>zi,AgentInsightsJobUpdateStatus:()=>lc,AgentInsightsReport:()=>Ai,AggregationData:()=>Yw,Alert:()=>zie,AlertAlertType:()=>Zw,AlertPagePublic:()=>zn,AlertPublic:()=>Pn,AlertPublicAlertType:()=>l_,AlertTrigger:()=>n_,AlertTriggerConfig:()=>t_,AlertTriggerConfigPublic:()=>g_,AlertTriggerConfigPublicType:()=>d_,AlertTriggerConfigType:()=>e_,AlertTriggerConfigWrite:()=>P_,AlertTriggerConfigWriteType:()=>k_,AlertTriggerEventType:()=>i_,AlertTriggerPublic:()=>b_,AlertTriggerPublicEventType:()=>h_,AlertTriggerWrite:()=>T_,AlertTriggerWriteEventType:()=>S_,AlertWrite:()=>Sn,AlertWriteAlertType:()=>E_,AnalyticsQueryRequest:()=>nn,AnalyticsQueryResponse:()=>Jl,AnnotationQueue:()=>M_,AnnotationQueueAutomation:()=>ji,AnnotationQueueAutomationPublic:()=>Q_,AnnotationQueueAutomationWrite:()=>Hh,AnnotationQueueBatch:()=>Sie,AnnotationQueueBatchWrite:()=>vi,AnnotationQueueItemIds:()=>Hl,AnnotationQueueItemIdsPublic:()=>Ti,AnnotationQueueItemPublic:()=>q_,AnnotationQueueItemPublicSource:()=>X_,AnnotationQueueItemsPublic:()=>rk,AnnotationQueuePagePublic:()=>sk,AnnotationQueuePublic:()=>Tn,AnnotationQueuePublicScope:()=>tk,AnnotationQueueReviewer:()=>U_,AnnotationQueueReviewerPublic:()=>ik,AnnotationQueueScope:()=>F_,AnnotationQueueUpdate:()=>Ei,AnnotationQueueWrite:()=>Si,AnnotationQueueWriteScope:()=>Oh,AssertionResult:()=>jb,AssertionResultBatch:()=>Ci,AssertionResultBatchEntityType:()=>hc,AssertionResultBatchItem:()=>py,AssertionResultBatchItemSource:()=>iy,AssertionResultBatchItemStatus:()=>ny,AssertionResultCompare:()=>pk,AssertionScoreAverage:()=>lk,AssertionScoreAveragePublic:()=>dk,AssistantMessage:()=>bk,AssistantMessageRole:()=>gk,Attachment:()=>xk,AttachmentListRequestEntityType:()=>xc,AttachmentPage:()=>_k,AudioUrl:()=>kk,AudioUrlPublic:()=>Pk,AudioUrlWrite:()=>Sk,AuthDetailsHolder:()=>Tk,AuthorizationServerMetadata:()=>jk,AuthorizeContext:()=>Ik,AutomationRuleEvaluator:()=>vie,AutomationRuleEvaluatorAction:()=>Dk,AutomationRuleEvaluatorLlmAsJudge:()=>$k,AutomationRuleEvaluatorLlmAsJudgePublic:()=>Jn,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>NA,AutomationRuleEvaluatorObjectObjectPublic:()=>ZA,AutomationRuleEvaluatorObjectObjectPublicAction:()=>BA,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>WA,AutomationRuleEvaluatorPagePublic:()=>eP,AutomationRuleEvaluatorPublic:()=>aP,AutomationRuleEvaluatorPublicAction:()=>rP,AutomationRuleEvaluatorPublicTriggerScope:()=>oP,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Yk,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>$n,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>lP,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>Zk,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Qn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>gP,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>eA,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Yn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>xP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>tA,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Xn,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>AP,AutomationRuleEvaluatorTriggerScope:()=>iA,AutomationRuleEvaluatorUpdate:()=>VP,AutomationRuleEvaluatorUpdateAction:()=>zP,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>vP,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>jP,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>CP,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>DP,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>NP,AutomationRuleEvaluatorUpdateTriggerScope:()=>BP,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>WP,AutomationRuleEvaluatorUserDefinedMetricPython:()=>nA,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Zn,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>GP,AutomationRuleEvaluatorWrite:()=>XP,AutomationRuleEvaluatorWriteAction:()=>KP,AutomationRuleEvaluatorWriteTriggerScope:()=>QP,AvgValueStatPublic:()=>ZP,BatchDelete:()=>de,BatchDeleteByProject:()=>pn,BiInformation:()=>ez,BiInformationResponse:()=>vo,BlueprintPageHistory:()=>tz,BooleanFeedbackDefinition:()=>az,BooleanFeedbackDefinitionCreate:()=>cz,BooleanFeedbackDefinitionPublic:()=>ts,BooleanFeedbackDefinitionUpdate:()=>fz,BooleanFeedbackDetail:()=>oz,BooleanFeedbackDetailCreate:()=>sz,BooleanFeedbackDetailPublic:()=>mz,BooleanFeedbackDetailUpdate:()=>uz,BreakdownConfig:()=>Zx,BreakdownConfigField:()=>Yx,BreakdownConfigPublic:()=>TR,BreakdownConfigPublicField:()=>SR,BridgeCommand:()=>wz,BridgeCommandBatchResponse:()=>zz,BridgeCommandItem:()=>Az,BridgeCommandItemType:()=>_z,BridgeCommandNextRequest:()=>Ga,BridgeCommandResultRequest:()=>Oa,BridgeCommandResultRequestStatus:()=>yl,BridgeCommandStatus:()=>yz,BridgeCommandSubmitRequest:()=>Ka,BridgeCommandSubmitRequestType:()=>bl,BridgeCommandSubmitResponse:()=>Sz,BridgeCommandType:()=>Rz,CategoricalFeedbackDefinition:()=>jz,CategoricalFeedbackDefinitionCreate:()=>Dz,CategoricalFeedbackDefinitionPublic:()=>os,CategoricalFeedbackDefinitionUpdate:()=>Wz,CategoricalFeedbackDetail:()=>vz,CategoricalFeedbackDetailCreate:()=>Cz,CategoricalFeedbackDetailPublic:()=>Nz,CategoricalFeedbackDetailUpdate:()=>Bz,ChatCompletionChoice:()=>$z,ChatCompletionRequest:()=>Ni,ChatCompletionResponse:()=>tS,Check:()=>sS,CheckName:()=>oS,CheckPublic:()=>uS,CheckPublicName:()=>cS,CheckPublicResult:()=>mS,CheckResult:()=>aS,ChunkedOutputJsonNode:()=>Tie,ChunkedOutputJsonNodePublic:()=>jie,ChunkedOutputJsonNodePublicType:()=>yS,ChunkedOutputJsonNodeType:()=>fS,ClientRegistrationRequest:()=>wa,ClientRegistrationResponse:()=>RS,Column:()=>_S,ColumnCompare:()=>zS,ColumnCompareTypesItem:()=>AS,ColumnPublic:()=>jS,ColumnPublicTypesItem:()=>vS,ColumnTypesItem:()=>xS,Comment:()=>ge,CommentCompare:()=>CS,CommentPublic:()=>Ut,CompleteMultipartUploadRequest:()=>lm,CompleteMultipartUploadRequestEntityType:()=>DS,CompletionTokensDetails:()=>Yz,ConditionGroup:()=>qh,ConditionGroupPublic:()=>G_,ConditionGroupWrite:()=>Wh,Conditions:()=>ry,ConditionsPublic:()=>K_,ConditionsWrite:()=>Vh,ConsentRequest:()=>_a,ConsentResponse:()=>BS,CountValueStatPublic:()=>MS,CreateDatasetItemsFromJsonRequestFormat:()=>Ec,CreateDatasetItemsFromSpansRequest:()=>Fi,CreateDatasetItemsFromTracesRequest:()=>Bi,CreateLocalRunnerJobRequest:()=>Qa,CreatePromptVersionDetail:()=>Ua,CreatePromptVersionDetailTemplateStructure:()=>al,CreateSessionRequest:()=>Sa,CreateSessionRequestType:()=>Xc,CreateSessionResponse:()=>LS,Credential:()=>iR,CredentialPublic:()=>VS,CredentialWrite:()=>pR,DashboardPagePublic:()=>Nt,DashboardPublic:()=>or,DashboardPublicScope:()=>HS,DashboardPublicType:()=>OS,DashboardUpdatePublic:()=>as,DashboardUpdatePublicType:()=>QS,DashboardWrite:()=>ns,DashboardWriteType:()=>XS,DataPointDouble:()=>Eie,DataPointNumberPublic:()=>qS,Dataset:()=>Cie,DatasetExpansion:()=>Iie,DatasetExpansionResponse:()=>uv,DatasetExpansionWrite:()=>Mi,DatasetExportJobPublic:()=>uo,DatasetExportJobPublicStatus:()=>Zy,DatasetIdentifier:()=>Wi,DatasetIdentifierPublic:()=>Li,DatasetItem:()=>ps,DatasetItemBatch:()=>Die,DatasetItemBatchUpdate:()=>Ji,DatasetItemBatchWrite:()=>Gi,DatasetItemChangesPublic:()=>gv,DatasetItemCompare:()=>Vv,DatasetItemCompareSource:()=>fv,DatasetItemFilter:()=>Vi,DatasetItemFilterOperator:()=>Uy,DatasetItemPageCompare:()=>Hv,DatasetItemPagePublic:()=>oT,DatasetItemPublic:()=>gs,DatasetItemPublicSource:()=>Gv,DatasetItemSource:()=>sv,DatasetItemStreamRequest:()=>Oi,DatasetItemUpdate:()=>Fy,DatasetItemWrite:()=>Hi,DatasetItemWriteSource:()=>My,DatasetItemsDelete:()=>Ki,DatasetPagePublic:()=>hs,DatasetPublic:()=>To,DatasetPublicStatus:()=>iT,DatasetPublicType:()=>nT,DatasetPublicVisibility:()=>pT,DatasetStatus:()=>rv,DatasetType:()=>ov,DatasetUpdate:()=>$i,DatasetUpdateVisibility:()=>Sc,DatasetVersionDiff:()=>uT,DatasetVersionDiffStats:()=>mT,DatasetVersionPagePublic:()=>fT,DatasetVersionPublic:()=>Kr,DatasetVersionRestorePublic:()=>Qi,DatasetVersionRetrieveRequestPublic:()=>Yi,DatasetVersionSummary:()=>ss,DatasetVersionSummaryPublic:()=>fs,DatasetVersionTag:()=>Xi,DatasetVersionUpdatePublic:()=>Zi,DatasetVisibility:()=>av,DatasetWrite:()=>qi,DatasetWriteType:()=>vc,DatasetWriteVisibility:()=>Tc,DeleteAttachmentsRequest:()=>Uie,DeleteAttachmentsRequestEntityType:()=>hT,DeleteFeedbackScore:()=>ys,DeleteIdsHolder:()=>jo,DeleteThreadFeedbackScores:()=>cn,DeleteTraceThreads:()=>ln,Delta:()=>Vz,DownloadAttachmentRequestEntityType:()=>wc,Environment:()=>Nie,EnvironmentPagePublic:()=>RT,EnvironmentPublic:()=>bs,EnvironmentUpdate:()=>ea,EnvironmentWrite:()=>ra,ErrorCountWithDeviation:()=>Rs,ErrorCountWithDeviationDetailed:()=>xT,ErrorInfo:()=>He,ErrorInfoExperimentItemBulkWriteView:()=>pa,ErrorInfoPublic:()=>Ft,ErrorInfoWrite:()=>_t,ErrorMessage:()=>Eo,ErrorMessageDetail:()=>Fie,ErrorMessageDetailed:()=>Bie,ErrorMessageHistory:()=>Mie,ErrorMessagePublic:()=>Wie,ErrorMessageWrite:()=>Lie,EvaluatorItem:()=>_r,EvaluatorItemCompare:()=>wv,EvaluatorItemCompareType:()=>yv,EvaluatorItemPublic:()=>ms,EvaluatorItemPublicType:()=>Kv,EvaluatorItemType:()=>Ty,EvaluatorItemWrite:()=>Jy,EvaluatorItemWriteType:()=>Ly,ExecutionPolicy:()=>qe,ExecutionPolicyCompare:()=>cs,ExecutionPolicyPublic:()=>ds,ExecutionPolicyWrite:()=>Gy,ExistenceResponse:()=>ws,Experiment:()=>Vie,ExperimentBatchUpdate:()=>ia,ExperimentEvaluationMethod:()=>_T,ExperimentExecutionRequest:()=>na,ExperimentExecutionResponse:()=>jT,ExperimentGroupAggregationsResponse:()=>IT,ExperimentGroupResponse:()=>WT,ExperimentInfo:()=>vT,ExperimentItem:()=>ma,ExperimentItemBulkRecord:()=>qT,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>vb,ExperimentItemBulkUpload:()=>Jie,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ca,ExperimentItemCompare:()=>Nv,ExperimentItemCompareStatus:()=>kv,ExperimentItemCompareTraceVisibilityMode:()=>Pv,ExperimentItemPublic:()=>us,ExperimentItemPublicTraceVisibilityMode:()=>Qv,ExperimentItemReference:()=>GT,ExperimentItemReferencePublic:()=>rj,ExperimentItemStatus:()=>Cb,ExperimentItemStreamRequest:()=>la,ExperimentItemTraceVisibilityMode:()=>Db,ExperimentItemsBatch:()=>da,ExperimentItemsDelete:()=>ua,ExperimentPagePublic:()=>zs,ExperimentPublic:()=>Ps,ExperimentPublicEvaluationMethod:()=>oj,ExperimentPublicStatus:()=>aj,ExperimentPublicType:()=>sj,ExperimentRunSummary:()=>mv,ExperimentRunSummaryCompare:()=>Wv,ExperimentRunSummaryCompareStatus:()=>Bv,ExperimentRunSummaryPublic:()=>eT,ExperimentRunSummaryPublicStatus:()=>Zv,ExperimentRunSummaryStatus:()=>cv,ExperimentScore:()=>ta,ExperimentScorePublic:()=>cj,ExperimentScoreWrite:()=>Vb,ExperimentStatus:()=>AT,ExperimentStreamRequestPublic:()=>ga,ExperimentType:()=>zT,ExperimentUpdate:()=>oa,ExperimentUpdateStatus:()=>ob,ExperimentUpdateType:()=>ab,ExperimentWrite:()=>fa,ExperimentWriteEvaluationMethod:()=>Fc,ExperimentWriteStatus:()=>Bc,ExperimentWriteType:()=>Mc,ExportTraceServiceRequest:()=>Hie,Feedback:()=>Gie,FeedbackCreate:()=>_j,FeedbackDefinitionPagePublic:()=>vj,FeedbackObjectPublic:()=>zj,FeedbackPublic:()=>jj,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>ve,FeedbackScoreAverageDetailed:()=>Ej,FeedbackScoreAveragePublic:()=>Or,FeedbackScoreBatch:()=>vs,FeedbackScoreBatchItem:()=>Uj,FeedbackScoreBatchItemSource:()=>Ij,FeedbackScoreBatchItemThread:()=>Ux,FeedbackScoreBatchItemThreadSource:()=>Ix,FeedbackScoreBatchThread:()=>mn,FeedbackScoreCompare:()=>Iv,FeedbackScoreCompareSource:()=>Sv,FeedbackScoreExperimentItemBulkWriteView:()=>hb,FeedbackScoreExperimentItemBulkWriteViewSource:()=>lb,FeedbackScoreNames:()=>Mj,FeedbackScoreNamesPublic:()=>$r,FeedbackScorePublic:()=>Io,FeedbackScorePublicSource:()=>Vj,FeedbackScoreSource:()=>Nb,FeedbackUpdate:()=>qj,FindAgentInsightsIssuesRequestSeverity:()=>nc,FindAgentInsightsIssuesRequestStatus:()=>sc,FindFeedbackDefinitionsRequestType:()=>Lc,FindFeedbackScoreNames1RequestType:()=>El,FindReportFailuresRequestType:()=>ml,Function:()=>Di,FunctionCall:()=>wr,GenerateReportResponse:()=>eE,GetSpanStatsRequestType:()=>Cl,GetSpansByProjectRequestType:()=>Il,GetWebhookExamplesRequestAlertType:()=>dc,GroupContent:()=>DT,GroupContentWithAggregations:()=>ET,GroupDetail:()=>NT,GroupDetails:()=>BT,Guardrail:()=>aE,GuardrailBatch:()=>Oie,GuardrailBatchWrite:()=>ha,GuardrailName:()=>rE,GuardrailResult:()=>oE,GuardrailWrite:()=>rR,GuardrailWriteName:()=>Xb,GuardrailWriteResult:()=>qb,GuardrailsValidation:()=>KT,GuardrailsValidationPublic:()=>sE,IdsHolder:()=>Kie,ImageUrl:()=>Nk,ImageUrlPublic:()=>lA,ImageUrlWrite:()=>_A,ItemLockInfo:()=>cE,JsonListString:()=>le,JsonListStringCompare:()=>ls,JsonListStringExperimentItemBulkWriteView:()=>er,JsonListStringPublic:()=>Ge,JsonListStringWrite:()=>Je,JsonNode:()=>L,JsonNodeCompare:()=>Rv,JsonNodeDetail:()=>JR,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>hy,KpiCardRequest:()=>va,KpiCardRequestEntityType:()=>qc,KpiCardResponse:()=>fE,KpiMetric:()=>uE,KpiMetricType:()=>mE,ListRunnersRequestStatus:()=>vl,LlmAsJudgeCode:()=>Dn,LlmAsJudgeCodePublic:()=>xA,LlmAsJudgeCodeWrite:()=>CA,LlmAsJudgeMessage:()=>zt,LlmAsJudgeMessageContent:()=>Wk,LlmAsJudgeMessageContentPublic:()=>gA,LlmAsJudgeMessageContentWrite:()=>zA,LlmAsJudgeMessagePublic:()=>Tt,LlmAsJudgeMessagePublicRole:()=>hA,LlmAsJudgeMessageRole:()=>Vk,LlmAsJudgeMessageWrite:()=>Ct,LlmAsJudgeMessageWriteRole:()=>vA,LlmAsJudgeModelParameters:()=>St,LlmAsJudgeModelParametersPublic:()=>jt,LlmAsJudgeModelParametersWrite:()=>It,LlmAsJudgeOutputSchema:()=>vt,LlmAsJudgeOutputSchemaPublic:()=>Et,LlmAsJudgeOutputSchemaPublicType:()=>bA,LlmAsJudgeOutputSchemaType:()=>Hk,LlmAsJudgeOutputSchemaWrite:()=>Dt,LlmAsJudgeOutputSchemaWriteType:()=>jA,LocalRunner:()=>Ts,LocalRunnerHeartbeatRequest:()=>Ya,LocalRunnerHeartbeatResponse:()=>wE,LocalRunnerJob:()=>wt,LocalRunnerJobMetadata:()=>$a,LocalRunnerJobPage:()=>_E,LocalRunnerJobResultRequest:()=>Xa,LocalRunnerJobResultRequestStatus:()=>xl,LocalRunnerJobStatus:()=>fx,LocalRunnerLogEntry:()=>Za,LocalRunnerPage:()=>kE,LocalRunnerStatus:()=>hE,LocalRunnerType:()=>bE,LockResponse:()=>AE,LocksResponse:()=>PE,LogItem:()=>vE,LogItemLevel:()=>zE,LogPage:()=>jE,LogProb:()=>Hz,LogProbs:()=>Oz,ManualEvaluationRequest:()=>js,ManualEvaluationRequestEntityType:()=>EE,ManualEvaluationResponse:()=>Es,Message:()=>Ui,MultipartUploadPart:()=>NS,NumericalFeedbackDefinition:()=>gj,NumericalFeedbackDefinitionCreate:()=>Rj,NumericalFeedbackDefinitionPublic:()=>Ss,NumericalFeedbackDefinitionUpdate:()=>Yj,NumericalFeedbackDetail:()=>dj,NumericalFeedbackDetailCreate:()=>yj,NumericalFeedbackDetailPublic:()=>kj,NumericalFeedbackDetailUpdate:()=>$j,OAuthError:()=>$ie,OllamaConnectionTestResponse:()=>km,OllamaInstanceBaseUrlRequest:()=>Am,OllamaModel:()=>bR,OllieReport:()=>UE,OllieReportPage:()=>FE,OllieReportStatus:()=>IE,Optimization:()=>Qie,OptimizationPagePublic:()=>Is,OptimizationPublic:()=>Cs,OptimizationPublicStatus:()=>eC,OptimizationStatus:()=>BE,OptimizationStudioConfig:()=>ZE,OptimizationStudioConfigPublic:()=>gC,OptimizationStudioConfigWrite:()=>TC,OptimizationStudioLog:()=>EC,OptimizationUpdate:()=>Pa,OptimizationUpdateStatus:()=>Qc,OptimizationWrite:()=>Pm,OptimizationWriteStatus:()=>CC,PageColumns:()=>DC,Param:()=>pw,ParamPresence:()=>nw,PercentageValueStatPublic:()=>UC,PercentageValues:()=>zr,PercentageValuesDetailed:()=>FC,PercentageValuesPublic:()=>As,Permission:()=>MC,Project:()=>Yie,ProjectDetailed:()=>GC,ProjectDetailedVisibility:()=>JC,ProjectMetricRequestPublic:()=>ja,ProjectMetricRequestPublicInterval:()=>el,ProjectMetricRequestPublicMetricType:()=>rl,ProjectMetricResponsePublic:()=>ZC,ProjectMetricResponsePublicInterval:()=>OC,ProjectMetricResponsePublicMetricType:()=>$C,ProjectPagePublic:()=>tI,ProjectPublic:()=>Ds,ProjectPublicVisibility:()=>qC,ProjectReference:()=>pA,ProjectReferencePublic:()=>qn,ProjectRetrieveDetailed:()=>Ea,ProjectStatItemObjectPublic:()=>iI,ProjectStatsPublic:()=>Qr,ProjectStatsSummary:()=>pI,ProjectStatsSummaryItem:()=>nI,ProjectUpdate:()=>Ca,ProjectUpdateVisibility:()=>tl,ProjectVisibility:()=>LC,ProjectWrite:()=>Ia,ProjectWriteVisibility:()=>ol,Prompt:()=>Xie,PromptDetail:()=>Sm,PromptDetailTemplateStructure:()=>xI,PromptPagePublic:()=>Us,PromptPublic:()=>AI,PromptPublicTemplateStructure:()=>_I,PromptTemplateStructure:()=>cI,PromptTokensDetails:()=>Zz,PromptType:()=>mI,PromptUpdatable:()=>Na,PromptVariant:()=>pb,PromptVersion:()=>zm,PromptVersionBatchUpdate:()=>Fa,PromptVersionCommitsRequestPublic:()=>Ba,PromptVersionDetail:()=>De,PromptVersionDetailTemplateStructure:()=>GR,PromptVersionDetailType:()=>KR,PromptVersionDetailVersionType:()=>QR,PromptVersionEnvironmentUpdate:()=>Ma,PromptVersionIdsRequestDetail:()=>Wa,PromptVersionLink:()=>Jr,PromptVersionLinkPublic:()=>xo,PromptVersionLinkWrite:()=>Nc,PromptVersionPagePublic:()=>DI,PromptVersionPublic:()=>CI,PromptVersionPublicTemplateStructure:()=>zI,PromptVersionPublicType:()=>vI,PromptVersionPublicVersionType:()=>jI,PromptVersionRetrieveDetail:()=>La,PromptVersionTemplateStructure:()=>uI,PromptVersionType:()=>fI,PromptVersionUpdate:()=>ZR,PromptVersionVersionType:()=>yI,PromptWrite:()=>Va,PromptWriteTemplateStructure:()=>nl,PromptWriteType:()=>sl,ProviderApiKey:()=>Zie,ProviderApiKeyPagePublic:()=>HI,ProviderApiKeyProvider:()=>UI,ProviderApiKeyPublic:()=>Ns,ProviderApiKeyPublicProvider:()=>FI,ProviderApiKeyUpdate:()=>ba,ProviderApiKeyWrite:()=>Ra,ProviderApiKeyWriteProvider:()=>Gc,ProviderAuthCheck:()=>xa,ProviderAuthConfig:()=>bt,ProviderAuthConfigPublic:()=>LI,ProviderAuthConfigPublicSendAs:()=>MI,ProviderAuthConfigSendAs:()=>nR,ProviderAuthConfigWrite:()=>dR,ProviderAuthConfigWriteSendAs:()=>lR,RecentActivityItemPublic:()=>KI,RecentActivityItemPublicType:()=>GI,RecentActivityPagePublic:()=>QI,ReportCompleteRequest:()=>Ja,ReportCompleteRequestStatus:()=>ul,ReportFailure:()=>Fs,ReportFailurePage:()=>qI,ReportFailureType:()=>YI,ReportPreference:()=>Bs,ReportedIssue:()=>Sh,ReportedIssueSeverity:()=>Ph,Request:()=>Pi,Response:()=>eD,ResponseFormat:()=>xy,ResponseFormatType:()=>by,Result:()=>vr,ResultsNumberPublic:()=>YC,RetentionRulePagePublic:()=>nD,RetentionRulePublic:()=>Do,RetentionRulePublicLevel:()=>rD,RetentionRulePublicRetention:()=>oD,RetentionRuleWrite:()=>Ha,RetentionRuleWriteRetention:()=>fl,RevokeRequest:()=>ka,ScopedAnalyticsQueryRequest:()=>sn,ScoreCondition:()=>Xh,ScoreConditionOperator:()=>Qh,ScoreConditionPublic:()=>J_,ScoreConditionPublicOperator:()=>L_,ScoreConditionWrite:()=>Bh,ScoreConditionWriteOperator:()=>Nh,ScoreName:()=>Fj,ScoreNamePublic:()=>Wj,ServiceTogglesConfig:()=>sD,Span:()=>_s,SpanBatch:()=>qie,SpanBatchUpdate:()=>en,SpanBatchWrite:()=>on,SpanEnrichmentOptions:()=>Ey,SpanExperimentItemBulkWriteView:()=>_b,SpanExperimentItemBulkWriteViewSource:()=>bb,SpanExperimentItemBulkWriteViewType:()=>xb,SpanFilter:()=>tr,SpanFilterOperator:()=>ew,SpanFilterPublic:()=>Ar,SpanFilterPublicOperator:()=>ER,SpanFilterWrite:()=>es,SpanFilterWriteOperator:()=>nP,SpanLlmAsJudgeCode:()=>Un,SpanLlmAsJudgeCodePublic:()=>VA,SpanLlmAsJudgeCodeWrite:()=>pP,SpanPagePublic:()=>uD,SpanPublic:()=>Ms,SpanPublicSource:()=>pD,SpanPublicType:()=>lD,SpanSearchStreamRequestPublic:()=>an,SpanSearchStreamRequestPublicExcludeItem:()=>Tl,SpanSearchStreamRequestPublicType:()=>jl,SpanSource:()=>LT,SpanType:()=>JT,SpanUpdate:()=>qa,SpanUpdateSource:()=>bx,SpanUpdateType:()=>xx,SpanUserDefinedMetricPythonCode:()=>Nn,SpanUserDefinedMetricPythonCodePublic:()=>HA,SpanUserDefinedMetricPythonCodeWrite:()=>dP,SpanWrite:()=>tn,SpanWriteSource:()=>kx,SpanWriteType:()=>Px,SpansCountResponse:()=>hD,StartMultipartUploadRequest:()=>Ii,StartMultipartUploadRequestEntityType:()=>bc,StartMultipartUploadResponse:()=>yD,StreamOptions:()=>_y,StudioEvaluation:()=>VE,StudioEvaluationPublic:()=>iC,StudioEvaluationWrite:()=>RC,StudioLlmModel:()=>HE,StudioLlmModelPublic:()=>nC,StudioLlmModelWrite:()=>wC,StudioMessage:()=>$E,StudioMessagePublic:()=>lC,StudioMessageWrite:()=>PC,StudioMetric:()=>WE,StudioMetricPublic:()=>tC,StudioMetricWrite:()=>yC,StudioOptimizer:()=>OE,StudioOptimizerPublic:()=>pC,StudioOptimizerWrite:()=>kC,StudioPrompt:()=>YE,StudioPromptPublic:()=>dC,StudioPromptWrite:()=>SC,TokenRequest:()=>Aa,TokenResponse:()=>bD,TokenUsageNames:()=>Ws,Tool:()=>zy,ToolCall:()=>jn,ToolCallType:()=>hk,ToolType:()=>Ay,Trace:()=>ks,TraceBatch:()=>eae,TraceBatchUpdate:()=>un,TraceBatchWrite:()=>fn,TraceCountResponse:()=>wD,TraceEnrichmentOptions:()=>Iy,TraceExperimentItemBulkWriteView:()=>zb,TraceExperimentItemBulkWriteViewSource:()=>Ab,TraceFilter:()=>Sr,TraceFilterOperator:()=>Ok,TraceFilterPublic:()=>Pr,TraceFilterPublicOperator:()=>IR,TraceFilterWrite:()=>Kn,TraceFilterWriteOperator:()=>DA,TracePagePublic:()=>SD,TracePublic:()=>Ls,TracePublicSource:()=>_D,TracePublicVisibilityMode:()=>AD,TraceSearchStreamRequestPublic:()=>hn,TraceSearchStreamRequestPublicExcludeItem:()=>Nl,TraceSource:()=>QT,TraceThread:()=>Vs,TraceThreadBatchIdentifier:()=>yn,TraceThreadBatchUpdate:()=>Rn,TraceThreadFilter:()=>rr,TraceThreadFilterOperator:()=>Gx,TraceThreadFilterPublic:()=>Rt,TraceThreadFilterPublicOperator:()=>UR,TraceThreadFilterWrite:()=>rs,TraceThreadFilterWriteOperator:()=>hP,TraceThreadIdentifier:()=>Tm,TraceThreadLlmAsJudgeCode:()=>Fn,TraceThreadLlmAsJudgeCodePublic:()=>OA,TraceThreadLlmAsJudgeCodeWrite:()=>bP,TraceThreadPage:()=>ED,TraceThreadSearchStreamRequest:()=>xn,TraceThreadStatus:()=>vD,TraceThreadUpdate:()=>bn,TraceThreadUserDefinedMetricPythonCode:()=>Bn,TraceThreadUserDefinedMetricPythonCodePublic:()=>$A,TraceThreadUserDefinedMetricPythonCodeWrite:()=>_P,TraceUpdate:()=>dn,TraceUpdateSource:()=>Fx,TraceVisibilityMode:()=>XT,TraceWrite:()=>gn,TraceWriteSource:()=>Wx,UploadAttachmentRequestEntityType:()=>_c,Usage:()=>eS,UsageByWorkspaceProjectUserResponse:()=>DD,UserDefinedMetricPythonCode:()=>Mn,UserDefinedMetricPythonCodePublic:()=>YA,UserDefinedMetricPythonCodeWrite:()=>JP,ValidatedToken:()=>UD,ValueEntry:()=>Wb,ValueEntryCompare:()=>Ev,ValueEntryCompareSource:()=>Tv,ValueEntryExperimentItemBulkWriteView:()=>gb,ValueEntryExperimentItemBulkWriteViewSource:()=>db,ValueEntryPublic:()=>Oj,ValueEntryPublicSource:()=>Hj,ValueEntrySource:()=>Bb,VideoUrl:()=>Bk,VideoUrlPublic:()=>dA,VideoUrlWrite:()=>AA,Webhook:()=>p_,WebhookExamples:()=>ND,WebhookPublic:()=>x_,WebhookTestResult:()=>MD,WebhookTestResultStatus:()=>FD,WebhookWrite:()=>I_,WelcomeWizardSubmission:()=>wn,WelcomeWizardTracking:()=>WD,WorkspaceConfiguration:()=>Js,WorkspaceInfo:()=>Ek,WorkspaceMetricRequest:()=>rae,WorkspaceMetricResponse:()=>Hs,WorkspaceMetricsSummaryRequest:()=>Uo,WorkspaceMetricsSummaryResponse:()=>LD,WorkspaceNameHolder:()=>VD,WorkspaceProjectUserCount:()=>CD,WorkspaceSpanMetricRequest:()=>_n,WorkspaceSpanMetricRequestInterval:()=>Ml,WorkspaceSpanMetricRequestMetricType:()=>Wl,WorkspaceSpansCount:()=>gD,WorkspaceTokenUsageNamesRequest:()=>kn,WorkspaceTraceCount:()=>RD,WorkspaceUserPermissions:()=>JD,agentConfigs:()=>ic,agentInsights:()=>pc,agentInsightsEnrollment:()=>cc,agentInsightsJobs:()=>mc,alerts:()=>uc,annotationQueues:()=>fc,assertionResults:()=>yc,attachments:()=>co,chatCompletions:()=>Pc,datasets:()=>go,environments:()=>Cc,experiments:()=>Wc,feedbackDefinitions:()=>Vc,guardrails:()=>Jc,llmModels:()=>ho,llmProviderKey:()=>Oc,mcpOAuth:()=>Kc,ollama:()=>yo,optimizations:()=>Yc,pairing:()=>Zc,projects:()=>il,prompts:()=>xt,reportFailures:()=>dl,reports:()=>gl,retentionRules:()=>hl,runners:()=>ur,spans:()=>Dl,systemAnalyticsQueries:()=>Ul,traces:()=>Fl,welcomeWizard:()=>Bl,workspaces:()=>Ll});var te=n(()=>{Y9();S3();});var jm,v3=n(()=>{Z();$();b();Q();q();J();te();oe();jm=class{constructor(o={}){this._options=M(o);}createAgentConfig(o,e){return P.fromPromise(this.__createAgentConfig(o,e))}async __createAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Vl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(o,e){return P.fromPromise(this.__updateAgentConfig(o,e))}async __updateAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Vl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(o,e,t={},i){return P.fromPromise(this.__createBlueprintFromMask(o,e,t,i))}async __createBlueprintFromMask(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/masks/${_.encodePathParam(e)}`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/agent-configs/blueprints/projects/{project_id}/masks/{mask_id}")}createOrUpdateEnvs(o,e){return P.fromPromise(this.__createOrUpdateEnvs(o,e))}async __createOrUpdateEnvs(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(o,e,t={},i){return P.fromPromise(this.__getBlueprintByEnv(o,e,t,i))}async __getBlueprintByEnv(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Pt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}setEnvByBlueprintName(o,e,t,i){return P.fromPromise(this.__setEnvByBlueprintName(o,e,t,i))}async __setEnvByBlueprintName(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:xi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}deleteEnv(o,e,t={},i){return P.fromPromise(this.__deleteEnv(o,e,t,i))}async __deleteEnv(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"DELETE",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===401?new O(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"DELETE","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}getBlueprintById(o,e={},t){return P.fromPromise(this.__getBlueprintById(o,e,t))}async __getBlueprintById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Pt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}")}getBlueprintByName(o,e,t={},i){return P.fromPromise(this.__getBlueprintByName(o,e,t,i))}async __getBlueprintByName(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/names/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Pt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/projects/{project_id}/names/{name}")}getBlueprintHistory(o,e={},t){return P.fromPromise(this.__getBlueprintHistory(o,e,t))}async __getBlueprintHistory(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/history/projects/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:tz.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/history/projects/{project_id}")}getDeltaById(o,e={},t){return P.fromPromise(this.__getDeltaById(o,e,t))}async __getDeltaById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}/deltas`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Pt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}/deltas")}getLatestBlueprint(o,e={},t){return P.fromPromise(this.__getLatestBlueprint(o,e,t))}async __getLatestBlueprint(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/latest/projects/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Pt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/latest/projects/{project_id}")}removeConfigKeys(o,e){return P.fromPromise(this.__removeConfigKeys(o,e))}async __removeConfigKeys(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_i.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===401?new O(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var Em,T3=n(()=>{Z();$();b();Q();q();J();te();oe();Em=class{constructor(o={}){this._options=M(o);}findAgentInsightsIssues(o,e){return P.fromPromise(this.__findAgentInsightsIssues(o,e))}async __findAgentInsightsIssues(o,e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,fromDate:i,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=o,d={project_id:t,from_date:i,to_date:a,status:s!=null?sc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?nc.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l,page:m,size:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/agent-insights/issues"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Vw.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new N(g.error.body,g.rawResponse);case 401:throw new O(g.error.body,g.rawResponse);default:throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}return j(g.error,g.rawResponse,"GET","/v1/private/agent-insights/issues")}reportAgentInsightsIssues(o,e){return P.fromPromise(this.__reportAgentInsightsIssues(o,e))}async __reportAgentInsightsIssues(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-insights/issues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ai.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(o,e,t){return P.fromPromise(this.__getAgentInsightsIssueById(o,e,t))}async __getAgentInsightsIssueById(o,e,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,fromDate:a,toDate:s}=e,c={project_id:i,from_date:a,to_date:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Kw.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 401:throw new O(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/private/agent-insights/issues/{issue_id}")}updateAgentInsightsIssue(o,e,t){return P.fromPromise(this.__updateAgentInsightsIssue(o,e,t))}async __updateAgentInsightsIssue(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ki.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/issues/{issue_id}")}};});var Cm,j3=n(()=>{Z();$();b();Q();q();J();te();Cm=class{constructor(o={}){this._options=M(o);}enrolProjectsInAutoFirstRun(o,e){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(o,e))}async __enrolProjectsInAutoFirstRun(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/agent-insights/enrollment"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:eD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var Im,E3=n(()=>{Z();$();b();Q();q();J();te();oe();Im=class{constructor(o={}){this._options=M(o);}getAgentInsightsJob(o,e={},t){return P.fromPromise(this.__getAgentInsightsJob(o,e,t))}async __getAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/agent-insights/jobs/{projectId}")}createAgentInsightsJob(o,e={},t){return P.fromPromise(this.__createAgentInsightsJob(o,e,t))}async __createAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}")}updateAgentInsightsJob(o,e,t){return P.fromPromise(this.__updateAgentInsightsJob(o,e,t))}async __updateAgentInsightsJob(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/jobs/{projectId}")}triggerAgentInsightsJob(o,e={},t){return P.fromPromise(this.__triggerAgentInsightsJob(o,e,t))}async __triggerAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}/trigger`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}/trigger")}};});var Dm,C3=n(()=>{Z();$();b();Q();q();J();te();oe();Dm=class{constructor(o={}){this._options=M(o);}findAlerts(o={},e){return P.fromPromise(this.__findAlerts(o,e))}async __findAlerts(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,sorting:a,filters:s}=o,c={page:t,size:i,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:zn.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/alerts")}createAlert(o,e){return P.fromPromise(this.__createAlert(o,e))}async __createAlert(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(o,e){return P.fromPromise(this.__deleteAlertBatch(o,e))}async __deleteAlertBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(o,e={},t){return P.fromPromise(this.__getAlertById(o,e,t))}async __getAlertById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Pn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/alerts/{id}")}updateAlert(o,e,t){return P.fromPromise(this.__updateAlert(o,e,t))}async __updateAlert(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);case 422:throw new ae(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/alerts/{id}")}getWebhookExamples(o={},e){return P.fromPromise(this.__getWebhookExamples(o,e))}async __getWebhookExamples(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=o,i={alert_type:t!=null?dc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ND.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/alerts/webhooks/examples")}testWebhook(o,e){return P.fromPromise(this.__testWebhook(o,e))}async __testWebhook(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:MD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var Um,I3=n(()=>{Z();$();b();Q();q();J();te();oe();Um=class{constructor(o={}){this._options=M(o);}addItemsToAnnotationQueue(o,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(o,e,t))}async __addItemsToAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/add")}findAnnotationQueues(o={},e){return P.fromPromise(this.__findAnnotationQueues(o,e))}async __findAnnotationQueues(o={},e){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:i,name:a,filters:s,sorting:c}=o,l={page:t,size:i,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:sk.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/annotation-queues")}createAnnotationQueue(o,e){return P.fromPromise(this.__createAnnotationQueue(o,e))}async __createAnnotationQueue(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Si.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(o,e){return P.fromPromise(this.__createAnnotationQueueBatch(o,e))}async __createAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(o,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(o,e))}async __deleteAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(o,e={},t){return P.fromPromise(this.__getAnnotationQueueById(o,e,t))}async __getAnnotationQueueById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Tn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{id}")}updateAnnotationQueue(o,e={},t){return P.fromPromise(this.__updateAnnotationQueue(o,e,t))}async __updateAnnotationQueue(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ei.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/annotation-queues/{id}")}getAnnotationQueueLocks(o,e={},t){return P.fromPromise(this.__getAnnotationQueueLocks(o,e,t))}async __getAnnotationQueueLocks(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/locks`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:PE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{queueId}/locks")}lockAnnotationQueueItem(o,e,t={},i){return P.fromPromise(this.__lockAnnotationQueueItem(o,e,t,i))}async __lockAnnotationQueueItem(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/${_.encodePathParam(e)}/lock`),method:"PUT",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:AE.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/annotation-queues/{queueId}/items/{itemId}/lock")}removeItemsFromAnnotationQueue(o,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(o,e,t))}async __removeItemsFromAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/delete")}searchAnnotationQueueItems(o,e,t){return P.fromPromise(this.__searchAnnotationQueueItems(o,e,t))}async __searchAnnotationQueueItems(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/search`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:rk.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/search")}};});var Nm,D3=n(()=>{Z();$();b();Q();q();J();te();Nm=class{constructor(o={}){this._options=M(o);}storeAssertionsBatch(o,e){return P.fromPromise(this.__storeAssertionsBatch(o,e))}async __storeAssertionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ci.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/assertion-results")}};});var Fm,U3=n(()=>{Z();$();b();Q();q();J();te();oe();Fm=class{constructor(o={}){this._options=M(o);}attachmentList(o,e){return P.fromPromise(this.__attachmentList(o,e))}async __attachmentList(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,projectId:a,entityType:s,entityId:c,path:l}=o,m={page:t,size:i,project_id:a,entity_type:xc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:_k.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/list")}completeMultiPartUpload(o,e){return P.fromPromise(this.__completeMultiPartUpload(o,e))}async __completeMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(o,e){return P.fromPromise(this.__deleteAttachments(o,e))}async __deleteAttachments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(o,e){return P.fromPromise(this.__downloadAttachment(o,e))}async __downloadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{workspaceName:t,containerId:i,entityType:a,entityId:s,fileName:c,mimeType:l}=o,m={workspace_name:t,container_id:i,entity_type:wc.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:s,file_name:c,mime_type:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:d.body,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/download")}startMultiPartUpload(o,e){return P.fromPromise(this.__startMultiPartUpload(o,e))}async __startMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ii.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(o,e){return P.fromPromise(this.__uploadAttachment(o,e))}async __uploadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{fileName:t,projectName:i,mimeType:a,entityType:s,entityId:c,body:l}=o,m={file_name:t,project_name:i,mime_type:a,entity_type:_c.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:co.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"PUT","/v1/private/attachment/upload")}};});var Bm,N3=n(()=>{Z();$();b();Q();q();J();te();Bm=class{constructor(o={}){this._options=M(o);}findEvaluators(o={},e){return P.fromPromise(this.__findEvaluators(o,e))}async __findEvaluators(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{projectId:t,id:i,name:a,filters:s,sorting:c,page:l,size:m}=o,u={project_id:t,id:i,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:eP.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/automations/evaluators")}createAutomationRuleEvaluator(o,e){return P.fromPromise(this.__createAutomationRuleEvaluator(o,e))}async __createAutomationRuleEvaluator(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:XP.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(o,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(o,e))}async __deleteAutomationRuleEvaluatorBatch(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:i}=o,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:de.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(o,e={},t){return P.fromPromise(this.__getEvaluatorById(o,e,t))}async __getEvaluatorById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:i}=e,a={project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:aP.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}")}updateAutomationRuleEvaluator(o,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(o,e,t))}async __updateAutomationRuleEvaluator(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:VP.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/automations/evaluators/{id}")}getEvaluatorLogsById(o,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(o,e,t))}async __getEvaluatorLogsById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:i}=e,a={size:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:jE.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 Mm,F3=n(()=>{Z();$();b();Q();q();J();te();Mm=class{constructor(o={}){this._options=M(o);}createChatCompletions(o={},e){return P.fromPromise(this.__createChatCompletions(o,e))}async __createChatCompletions(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ni.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:tS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/chat/completions")}};});var Wm,B3=n(()=>{Z();$();b();Q();q();J();te();oe();Wm=class{constructor(o={}){this._options=M(o);}access(o,e){return P.fromPromise(this.__access(o,e))}async __access(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tk.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(o){return P.fromPromise(this.__getWorkspaceName(o))}async __getWorkspaceName(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/auth/workspace"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:VD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 403:throw new fe(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/auth/workspace")}};});var Lm,M3=n(()=>{Z();$();b();Q();q();J();te();oe();Lm=class{constructor(o={}){this._options=M(o);}findDashboards(o={},e){return P.fromPromise(this.__findDashboards(o,e))}async __findDashboards(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/dashboards")}createDashboard(o,e){return P.fromPromise(this.__createDashboard(o,e))}async __createDashboard(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ns.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(o,e={},t){return P.fromPromise(this.__getDashboardById(o,e,t))}async __getDashboardById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/dashboards/{dashboardId}")}deleteDashboard(o,e={},t){return P.fromPromise(this.__deleteDashboard(o,e,t))}async __deleteDashboard(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/dashboards/{dashboardId}")}updateDashboard(o,e,t){return P.fromPromise(this.__updateDashboard(o,e,t))}async __updateDashboard(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(o,e){return P.fromPromise(this.__deleteDashboardsBatch(o,e))}async __deleteDashboardsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards/delete-batch")}};});var Vm,W3=n(()=>{Z();$();b();Br();Q();q();J();te();oe();Vm=class{constructor(o={}){this._options=M(o);}applyDatasetItemChanges(o,e,t){return P.fromPromise(this.__applyDatasetItemChanges(o,e,t))}async __applyDatasetItemChanges(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:i,body:a}=e,s={override:i},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:gv.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:Kr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new X(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"POST","/v1/private/datasets/{id}/items/changes")}batchUpdateDatasetItems(o,e){return P.fromPromise(this.__batchUpdateDatasetItems(o,e))}async __batchUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(o={},e){return P.fromPromise(this.__findDatasets(o,e))}async __findDatasets(o={},e){var y,w,A,C,I,D,F,B,Y,ne,we;let{page:t,size:i,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=o,f={page:t,size:i,with_experiments_only:a,with_optimizations_only:s,prompt_id:c,project_id:l,name:m,sorting:u,filters:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((B=(F=e==null?void 0:e.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?B:60)*1e3,maxRetries:(ne=e==null?void 0:e.maxRetries)!=null?ne:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:hs.parseOrThrow(h.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:h.rawResponse};if(h.error.reason==="status-code")throw new k({statusCode:h.error.statusCode,body:h.error.body,rawResponse:h.rawResponse});return j(h.error,h.rawResponse,"GET","/v1/private/datasets")}createDataset(o,e){return P.fromPromise(this.__createDataset(o,e))}async __createDataset(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:qi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(o,e){return P.fromPromise(this.__createOrUpdateDatasetItems(o,e))}async __createOrUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Gi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(o,e){return P.fromPromise(this.__createDatasetItemsFromCsv(o,e))}async __createDatasetItemsFromCsv(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await ih();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId);let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-csv")}createDatasetItemsFromJson(o,e){return P.fromPromise(this.__createDatasetItemsFromJson(o,e))}async __createDatasetItemsFromJson(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await ih();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId),t.append("format",Ec.jsonOrThrow(o.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-json"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-json")}createDatasetItemsFromSpans(o,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(o,e,t))}async __createDatasetItemsFromSpans(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-spans`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Fi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(o,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(o,e,t))}async __createDatasetItemsFromTraces(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-traces`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(o,e={},t){return P.fromPromise(this.__getDatasetById(o,e,t))}async __getDatasetById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:To.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}")}updateDataset(o,e,t){return P.fromPromise(this.__updateDataset(o,e,t))}async __updateDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$i.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(o,e={},t){return P.fromPromise(this.__deleteDataset(o,e,t))}async __deleteDataset(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/datasets/{id}")}deleteDatasetByName(o,e){return P.fromPromise(this.__deleteDatasetByName(o,e))}async __deleteDatasetByName(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(o={},e){return P.fromPromise(this.__deleteDatasetItems(o,e))}async __deleteDatasetItems(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ki.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(o,e){return P.fromPromise(this.__deleteDatasetsBatch(o,e))}async __deleteDatasetsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(o,e={},t){return P.fromPromise(this.__downloadDatasetExport(o,e,t))}async __downloadDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/download`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,responseType:"streaming",timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:a.body,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}/download")}expandDataset(o,e,t){return P.fromPromise(this.__expandDataset(o,e,t))}async __expandDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/expansions`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Mi.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:uv.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/expansions")}findDatasetItemsWithExperimentItems(o,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(o,e,t))}async __findDatasetItemsWithExperimentItems(o,e,t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:i,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Hv.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(o,e){return P.fromPromise(this.__getDatasetByIdentifier(o,e))}async __getDatasetByIdentifier(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Li.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:To.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(o,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(o,e,t))}async __getDatasetExperimentItemsStats(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:i,filters:a}=e,s={experiment_ids:i,filters:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/stats`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Qr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/stats")}getDatasetExportJob(o,e={},t){return P.fromPromise(this.__getDatasetExportJob(o,e,t))}async __getDatasetExportJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:uo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}")}getDatasetExportJobs(o){return P.fromPromise(this.__getDatasetExportJobs(o))}async __getDatasetExportJobs(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:go.getDatasetExportJobs.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/datasets/export-jobs")}getDatasetItemById(o,e={},t){return P.fromPromise(this.__getDatasetItemById(o,e,t))}async __getDatasetItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:gs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/items/{itemId}")}patchDatasetItem(o,e,t){return P.fromPromise(this.__patchDatasetItem(o,e,t))}async __patchDatasetItem(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/items/{itemId}")}getDatasetItems(o,e={},t){return P.fromPromise(this.__getDatasetItems(o,e,t))}async __getDatasetItems(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,version:s,filters:c,truncate:l}=e,m={page:i,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:oT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/datasets/{id}/items")}getDatasetItemsOutputColumns(o,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(o,e,t))}async __getDatasetItemsOutputColumns(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:i}=e,a={experiment_ids:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/output/columns`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:DC.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/output/columns")}markDatasetExportJobViewed(o,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(o,e,t))}async __markDatasetExportJobViewed(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/mark-viewed`),method:"PUT",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/export-jobs/{jobId}/mark-viewed")}startDatasetExport(o,e={},t){return P.fromPromise(this.__startDatasetExport(o,e,t))}async __startDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/export`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:uo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(o,e){return P.fromPromise(this.__streamDatasetItems(o,e))}async __streamDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(o,e={},t){return P.fromPromise(this.__compareDatasetVersions(o,e,t))}async __compareDatasetVersions(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/diff`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data: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/datasets/{id}/versions/diff")}createVersionTag(o,e,t,i){return P.fromPromise(this.__createVersionTag(o,e,t,i))}async __createVersionTag(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Xi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/datasets/{id}/versions/hash/{versionHash}/tags")}deleteVersionTag(o,e,t,i={},a){return P.fromPromise(this.__deleteVersionTag(o,e,t,i,a))}async __deleteVersionTag(o,e,t,i={},a){var l,m,u,d,f,g,h,y,w,A,C;let s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=a==null?void 0:a.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),a==null?void 0:a.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(o,e={},t){return P.fromPromise(this.__listDatasetVersions(o,e,t))}async __listDatasetVersions(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:fT.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw l.error.statusCode===400?new N(l.error.body,l.rawResponse):new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/versions")}restoreDatasetVersion(o,e,t){return P.fromPromise(this.__restoreDatasetVersion(o,e,t))}async __restoreDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/restore`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Kr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/restore")}retrieveDatasetVersion(o,e,t){return P.fromPromise(this.__retrieveDatasetVersion(o,e,t))}async __retrieveDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/retrieve`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Yi.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:Kr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(o,e,t={},i){return P.fromPromise(this.__updateDatasetVersion(o,e,t,i))}async __updateDatasetVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Zi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Kr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Jm,L3=n(()=>{Z();$();b();Q();q();J();te();oe();Jm=class{constructor(o={}){this._options=M(o);}findEnvironments(o){return P.fromPromise(this.__findEnvironments(o))}async __findEnvironments(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/environments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:RT.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/environments")}createEnvironment(o,e){return P.fromPromise(this.__createEnvironment(o,e))}async __createEnvironment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(o,e){return P.fromPromise(this.__deleteEnvironmentsBatch(o,e))}async __deleteEnvironmentsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(o,e={},t){return P.fromPromise(this.__getEnvironmentById(o,e,t))}async __getEnvironmentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:bs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/environments/{id}")}updateEnvironment(o,e={},t){return P.fromPromise(this.__updateEnvironment(o,e,t))}async __updateEnvironment(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/environments/{id}")}};});var Hm,V3=n(()=>{Z();$();b();Q();q();J();te();oe();Hm=class{constructor(o={}){this._options=M(o);}batchUpdateExperiments(o,e){return P.fromPromise(this.__batchUpdateExperiments(o,e))}async __batchUpdateExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/experiments/batch")}findExperiments(o={},e){return P.fromPromise(this.__findExperiments(o,e))}async __findExperiments(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Fr,ai;let{page:t,size:i,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=o,A={page:t,size:i,datasetId:a,optimization_id:s,types:c,name:l,dataset_deleted:m,prompt_id:u,project_id:d,project_deleted:f,sorting:g,filters:h,experiment_ids:y,force_sorting:w},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Fr=e==null?void 0:e.maxRetries)!=null?Fr:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ai=this._options)==null?void 0:ai.fetch,logging:this._options.logging});if(I.ok)return {data:zs.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw I.error.statusCode===400?new N(I.error.body,I.rawResponse):new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/experiments")}createExperiment(o,e){return P.fromPromise(this.__createExperiment(o,e))}async __createExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(o,e){return P.fromPromise(this.__createExperimentItems(o,e))}async __createExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(o,e){return P.fromPromise(this.__deleteExperimentItems(o,e))}async __deleteExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(o,e){return P.fromPromise(this.__deleteExperimentsById(o,e))}async __deleteExperimentsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(o,e){return P.fromPromise(this.__executeExperiment(o,e))}async __executeExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:na.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:jT.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(o,e){return P.fromPromise(this.__experimentItemsBulk(o,e))}async __experimentItemsBulk(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ca.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(o={},e){return P.fromPromise(this.__findFeedbackScoreNames(o,e))}async __findFeedbackScoreNames(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:i}=o,a={experiment_ids:t,project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/experiments/feedback-scores/names")}findExperimentGroups(o={},e){return P.fromPromise(this.__findExperimentGroups(o,e))}async __findExperimentGroups(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:WT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups")}findExperimentGroupsAggregations(o={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(o,e))}async __findExperimentGroupsAggregations(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:IT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups/aggregations")}finishExperiments(o,e){return P.fromPromise(this.__finishExperiments(o,e))}async __finishExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(o,e={},t){return P.fromPromise(this.__getExperimentById(o,e,t))}async __getExperimentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ps.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/{id}")}updateExperiment(o,e,t){return P.fromPromise(this.__updateExperiment(o,e,t))}async __updateExperiment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/experiments/{id}")}getExperimentItemById(o,e={},t){return P.fromPromise(this.__getExperimentItemById(o,e,t))}async __getExperimentItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:us.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/items/{id}")}streamExperimentItems(o,e){return P.fromPromise(this.__streamExperimentItems(o,e))}async __streamExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:la.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(o,e){return P.fromPromise(this.__streamExperiments(o,e))}async __streamExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/stream")}};});var Gm,J3=n(()=>{Z();$();b();Q();q();J();te();oe();Gm=class{constructor(o={}){this._options=M(o);}findFeedbackDefinitions(o={},e){return P.fromPromise(this.__findFeedbackDefinitions(o,e))}async __findFeedbackDefinitions(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,type:s}=o,c={page:t,size:i,name:a,type:s!=null?Lc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:vj.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/feedback-definitions")}createFeedbackDefinition(o,e){return P.fromPromise(this.__createFeedbackDefinition(o,e))}async __createFeedbackDefinition(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_j.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(o,e,t))}async __getFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:jj.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/feedback-definitions/{id}")}updateFeedbackDefinition(o,e,t){return P.fromPromise(this.__updateFeedbackDefinition(o,e,t))}async __updateFeedbackDefinition(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qj.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(o,e,t))}async __deleteFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionsBatch(o,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(o,e))}async __deleteFeedbackDefinitionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Om,H3=n(()=>{Z();$();b();Q();q();J();te();Om=class{constructor(o={}){this._options=M(o);}createGuardrails(o,e){return P.fromPromise(this.__createGuardrails(o,e))}async __createGuardrails(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/guardrails")}};});var Km,G3=n(()=>{Z();$();b();Q();q();J();te();oe();Km=class{constructor(o={}){this._options=M(o);}findInsightsViews(o={},e){return P.fromPromise(this.__findInsightsViews(o,e))}async __findInsightsViews(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/insights-views")}createInsightsView(o,e){return P.fromPromise(this.__createInsightsView(o,e))}async __createInsightsView(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ns.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(o,e={},t){return P.fromPromise(this.__getInsightsViewById(o,e,t))}async __getInsightsViewById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/insights-views/{insightsViewId}")}deleteInsightsView(o,e={},t){return P.fromPromise(this.__deleteInsightsView(o,e,t))}async __deleteInsightsView(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/insights-views/{insightsViewId}")}updateInsightsView(o,e,t){return P.fromPromise(this.__updateInsightsView(o,e,t))}async __updateInsightsView(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(o,e){return P.fromPromise(this.__deleteInsightsViewsBatch(o,e))}async __deleteInsightsViewsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views/delete-batch")}};});var $m,O3=n(()=>{Z();$();b();Q();q();J();te();$m=class{constructor(o={}){this._options=M(o);}getLlmModels(o){return P.fromPromise(this.__getLlmModels(o))}async __getLlmModels(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm/models"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ho.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 Qm,K3=n(()=>{Z();$();b();Q();q();J();te();oe();Qm=class{constructor(o={}){this._options=M(o);}deleteLlmProviderApiKeysBatch(o,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(o,e))}async __deleteLlmProviderApiKeysBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(o){return P.fromPromise(this.__findLlmProviderKeys(o))}async __findLlmProviderKeys(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:HI.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm-provider-key")}storeLlmProviderApiKey(o,e){return P.fromPromise(this.__storeLlmProviderApiKey(o,e))}async __storeLlmProviderApiKey(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(o,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(o,e,t))}async __getLlmProviderApiKeyById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ns.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/llm-provider-key/{id}")}updateLlmProviderApiKey(o,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(o,e,t))}async __updateLlmProviderApiKey(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/llm-provider-key/{id}")}testLlmProviderAuthConfig(o={},e){return P.fromPromise(this.__testLlmProviderAuthConfig(o,e))}async __testLlmProviderAuthConfig(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/auth-config/test"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Ym,$3=n(()=>{Z();$();b();Q();q();J();te();oe();Ym=class{constructor(o={}){this._options=M(o);}evaluateSpans(o,e){return P.fromPromise(this.__evaluateSpans(o,e))}async __evaluateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(o,e){return P.fromPromise(this.__evaluateThreads(o,e))}async __evaluateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(o,e){return P.fromPromise(this.__evaluateTraces(o,e))}async __evaluateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Xm,Q3=n(()=>{Z();$();b();Q();q();J();te();oe();Xm=class{constructor(o={}){this._options=M(o);}authorize(o,e){return P.fromPromise(this.__authorize(o,e))}async __authorize(o,e){var g,h,y,w,A,C,I,D,F,B,Y;let{clientId:t,redirectUri:i,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=o,u={client_id:t,redirect_uri:i,response_type:a,code_challenge:s,code_challenge_method:c,resource:l,state:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"oauth/authorize"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/oauth/authorize")}consent(o,e){return P.fromPromise(this.__consent(o,e))}async __consent(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/authorize"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:BS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(o,e){return P.fromPromise(this.__getAuthorizeContext(o,e))}async __getAuthorizeContext(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:i}=o,a={client_id:t,redirect_uri:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"oauth/authorize/context"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ik.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/oauth/authorize/context")}getOAuthAuthorizationServerMetadata(o){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(o))}async __getOAuthAuthorizationServerMetadata(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,".well-known/oauth-authorization-server"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jk.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/.well-known/oauth-authorization-server")}registerOAuthClient(o,e){return P.fromPromise(this.__registerOAuthClient(o,e))}async __registerOAuthClient(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/register"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:RS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===429?new Qe(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/register")}revoke(o={},e){return P.fromPromise(this.__revoke(o,e))}async __revoke(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/revoke"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/revoke")}token(o={},e){return P.fromPromise(this.__token(o,e))}async __token(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/token"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:Aa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:bD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/token")}validateOAuthToken(o){return P.fromPromise(this.__validateOAuthToken(o))}async __validateOAuthToken(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"opik/auth-oauth"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:UD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/opik/auth-oauth")}};});var Zm,Y3=n(()=>{Z();$();b();Q();q();J();te();oe();Zm=class{constructor(o={}){this._options=M(o);}listModels(o,e){return P.fromPromise(this.__listModels(o,e))}async __listModels(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Am.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yo.listModels.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 500:throw new lt(i.error.body,i.rawResponse);case 503:throw new to(Eo.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/models")}testConnection(o,e){return P.fromPromise(this.__testConnection(o,e))}async __testConnection(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Am.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:km.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 502:throw new li(km.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 503:throw new to(Eo.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var qm,X3=n(()=>{Z();$();b();Q();q();J();oe();qm=class{constructor(o={}){this._options=M(o);}downloadOllieState(o){return P.fromPromise(this.__downloadOllieState(o))}async __downloadOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,responseType:"streaming",timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 404:throw new U(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/ollie/state")}replaceOllieState(o,e){return P.fromPromise(this.__replaceOllieState(o,e))}async __replaceOllieState(o,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await ui.toBinaryUploadRequest(o),i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,"v1/private/ollie/state"),method:"PUT",headers:i,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/ollie/state")}deleteOllieState(o){return P.fromPromise(this.__deleteOllieState(o))}async __deleteOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/ollie/state")}};});var ed,Z3=n(()=>{Z();$();b();Q();q();J();ed=class{constructor(o={}){this._options=M(o);}receiveProtobufTraces(o){return P.fromPromise(this.__receiveProtobufTraces(o))}async __receiveProtobufTraces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/v1/private/otel/v1/traces")}};});var rd,q3=n(()=>{Z();$();b();Q();q();J();te();oe();rd=class{constructor(o={}){this._options=M(o);}findOptimizations(o={},e){return P.fromPromise(this.__findOptimizations(o,e))}async __findOptimizations(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:t,size:i,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=o,d={page:t,size:i,dataset_id:a,name:s,dataset_name:c,dataset_deleted:l,project_id:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Is.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/optimizations")}createOptimization(o,e){return P.fromPromise(this.__createOptimization(o,e))}async __createOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(o,e){return P.fromPromise(this.__upsertOptimization(o,e))}async __upsertOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(o,e){return P.fromPromise(this.__deleteOptimizationsById(o,e))}async __deleteOptimizationsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(o,e={},t){return P.fromPromise(this.__getOptimizationById(o,e,t))}async __getOptimizationById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/{id}")}updateOptimizationsById(o,e={},t){return P.fromPromise(this.__updateOptimizationsById(o,e,t))}async __updateOptimizationsById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/optimizations/{id}")}getStudioOptimizationLogs(o,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(o,e,t))}async __getStudioOptimizationLogs(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/studio/${_.encodePathParam(o)}/logs`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:EC.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 td,e8=n(()=>{Z();$();b();Q();q();J();te();oe();td=class{constructor(o={}){this._options=M(o);}activatePairingSession(o,e,t){return P.fromPromise(this.__activatePairingSession(o,e,t))}async __activatePairingSession(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/pairing/sessions/${_.encodePathParam(o)}/activate`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:za.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/pairing/sessions/{sessionId}/activate")}createPairingSession(o,e){return P.fromPromise(this.__createPairingSession(o,e))}async __createPairingSession(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 429:throw new Qe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/pairing/sessions")}};});var od,r8=n(()=>{Z();$();b();Q();q();J();te();oe();od=class{constructor(o={}){this._options=M(o);}findAlertsByProject(o,e={},t){return P.fromPromise(this.__findAlertsByProject(o,e,t))}async __findAlertsByProject(o,e={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:i,size:a,sorting:s,filters:c}=e,l={page:i,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=t==null?void 0:t.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),t==null?void 0:t.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,`v1/private/projects/${_.encodePathParam(o)}/alerts`),method:"GET",headers:m,queryParameters:{...l,...t==null?void 0:t.queryParams},timeoutMs:((C=(A=t==null?void 0:t.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=t==null?void 0:t.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:zn.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw u.error.statusCode===400?new N(u.error.body,u.rawResponse):new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/projects/{projectId}/alerts")}findDashboardsByProject(o,e={},t){return P.fromPromise(this.__findDashboardsByProject(o,e,t))}async __findDashboardsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/dashboards`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/dashboards")}findDatasetsByProject(o,e={},t){return P.fromPromise(this.__findDatasetsByProject(o,e,t))}async __findDatasetsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,d={page:i,size:a,with_experiments_only:s,with_optimizations_only:c,name:l,sorting:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:hs.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/datasets")}findExperimentsByProject(o,e={},t){return P.fromPromise(this.__findExperimentsByProject(o,e,t))}async __findExperimentsByProject(o,e={},t){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:i,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,y={page:i,size:a,datasetId:s,optimization_id:c,types:l,name:m,dataset_deleted:u,sorting:d,filters:f,experiment_ids:g,force_sorting:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=t==null?void 0:t.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),t==null?void 0:t.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,`v1/private/projects/${_.encodePathParam(o)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ne=t==null?void 0:t.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=t==null?void 0:t.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data: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 N(A.error.body,A.rawResponse):new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/projects/{projectId}/experiments")}findOptimizationsByProject(o,e={},t){return P.fromPromise(this.__findOptimizationsByProject(o,e,t))}async __findOptimizationsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,d={page:i,size:a,dataset_id:s,dataset_name:c,name:l,dataset_deleted:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Is.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/optimizations")}getPromptsByProject(o,e={},t){return P.fromPromise(this.__getPromptsByProject(o,e,t))}async __getPromptsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/prompts`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Us.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/prompts")}findProjects(o={},e){return P.fromPromise(this.__findProjects(o,e))}async __findProjects(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,sorting:s}=o,c={page:t,size:i,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:tI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/projects")}createProject(o,e){return P.fromPromise(this.__createProject(o,e))}async __createProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects")}getProjectById(o,e={},t){return P.fromPromise(this.__getProjectById(o,e,t))}async __getProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ds.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}")}deleteProjectById(o,e={},t){return P.fromPromise(this.__deleteProjectById(o,e,t))}async __deleteProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/projects/{id}")}updateProject(o,e={},t){return P.fromPromise(this.__updateProject(o,e,t))}async __updateProject(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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 N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/projects/{id}")}deleteProjectsBatch(o,e){return P.fromPromise(this.__deleteProjectsBatch(o,e))}async __deleteProjectsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(o={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(o,e))}async __findFeedbackScoreNamesByProjectIds(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=o,i={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Mj.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/projects/feedback-scores/names")}findTokenUsageNames(o,e={},t){return P.fromPromise(this.__findTokenUsageNames(o,e,t))}async __findTokenUsageNames(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/token-usage/names`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ws.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}/token-usage/names")}getProjectKpiCards(o,e,t){return P.fromPromise(this.__getProjectKpiCards(o,e,t))}async __getProjectKpiCards(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/kpi-cards`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/kpi-cards")}getProjectMetrics(o,e={},t){return P.fromPromise(this.__getProjectMetrics(o,e,t))}async __getProjectMetrics(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/metrics`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ja.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:ZC.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/metrics")}getProjectStats(o={},e){return P.fromPromise(this.__getProjectStats(o,e))}async __getProjectStats(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{page:t,size:i,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=o,u={page:t,size:i,name:a,filters:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),sorting:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/projects/stats"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:pI.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/projects/stats")}retrieveProject(o,e){return P.fromPromise(this.__retrieveProject(o,e))}async __retrieveProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ea.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:GC.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(o,e={},t){return P.fromPromise(this.__getRecentActivity(o,e,t))}async __getRecentActivity(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/activities`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:QI.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 500:throw new lt(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/activities")}};});var id,t8=n(()=>{Z();$();b();Q();q();J();te();oe();id=class{constructor(o={}){this._options=M(o);}getPrompts(o={},e){return P.fromPromise(this.__getPrompts(o,e))}async __getPrompts(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Us.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts")}createPrompt(o,e){return P.fromPromise(this.__createPrompt(o,e))}async __createPrompt(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Va.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(o,e){return P.fromPromise(this.__createPromptVersion(o,e))}async __createPromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(o,e){return P.fromPromise(this.__updatePromptVersions(o,e))}async __updatePromptVersions(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(o,e={},t){return P.fromPromise(this.__getPromptById(o,e,t))}async __getPromptById(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:i,environment:a}=e,s={mask_id:i,environment:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Sm.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/prompts/{id}")}updatePrompt(o,e,t){return P.fromPromise(this.__updatePrompt(o,e,t))}async __updatePrompt(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Na.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/prompts/{id}")}deletePrompt(o,e={},t){return P.fromPromise(this.__deletePrompt(o,e,t))}async __deletePrompt(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/prompts/{id}")}deletePromptsBatch(o,e){return P.fromPromise(this.__deletePromptsBatch(o,e))}async __deletePromptsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(o,e={},t){return P.fromPromise(this.__getPromptByCommit(o,e,t))}async __getPromptByCommit(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/by-commit/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sm.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/prompts/by-commit/{commit}")}getPromptVersionById(o,e={},t){return P.fromPromise(this.__getPromptVersionById(o,e,t))}async __getPromptVersionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:De.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/prompts/versions/{versionId}")}getPromptVersionByNumber(o,e,t={},i){return P.fromPromise(this.__getPromptVersionByNumber(o,e,t,i))}async __getPromptVersionByNumber(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/by-number/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"GET","/v1/private/prompts/{promptId}/versions/by-number/{versionNumber}")}getPromptVersions(o,e={},t){return P.fromPromise(this.__getPromptVersions(o,e,t))}async __getPromptVersions(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,search:s,sorting:c,filters:l}=e,m={page:i,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:DI.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts/{id}/versions")}getPromptsByCommits(o,e){return P.fromPromise(this.__getPromptsByCommits(o,e))}async __getPromptsByCommits(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xt.getPromptsByCommits.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(o,e,t={},i){return P.fromPromise(this.__restorePromptVersion(o,e,t,i))}async __restorePromptVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/restore`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/prompts/{promptId}/versions/{versionId}/restore")}retrievePromptVersion(o,e){return P.fromPromise(this.__retrievePromptVersion(o,e))}async __retrievePromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:La.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(o,e){return P.fromPromise(this.__retrievePromptVersionsByIds(o,e))}async __retrievePromptVersionsByIds(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve-by-ids"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xt.retrievePromptVersionsByIds.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(o,e,t){return P.fromPromise(this.__setPromptVersionEnvironment(o,e,t))}async __setPromptVersionEnvironment(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}/environments`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ma.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/prompts/versions/{versionId}/environments")}};});var ad,o8=n(()=>{Z();$();b();Q();q();J();oe();ad=class{constructor(o={}){this._options=M(o);}datasetsRedirect(o,e){return P.fromPromise(this.__datasetsRedirect(o,e))}async __datasetsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:i,path:a}=o,s={dataset_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/datasets")}experimentsRedirect(o,e){return P.fromPromise(this.__experimentsRedirect(o,e))}async __experimentsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:i,workspaceName:a,path:s}=o,c={dataset_id:t,experiment_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/experiments")}optimizationsRedirect(o,e){return P.fromPromise(this.__optimizationsRedirect(o,e))}async __optimizationsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:i,workspaceName:a,path:s}=o,c={dataset_id:t,optimization_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/optimizations")}projectsRedirect(o,e){return P.fromPromise(this.__projectsRedirect(o,e))}async __projectsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:i,path:a}=o,s={trace_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/projects")}};});var nd,i8=n(()=>{Z();$();b();Q();q();J();te();oe();nd=class{constructor(o={}){this._options=M(o);}findReportFailures(o,e){return P.fromPromise(this.__findReportFailures(o,e))}async __findReportFailures(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:i,page:a,size:s}=o,c={type:ml.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/report-failures"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:qI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===401?new O(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/report-failures")}createReportFailure(o,e){return P.fromPromise(this.__createReportFailure(o,e))}async __createReportFailure(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/report-failures"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/report-failures")}};});var sd,a8=n(()=>{Z();$();b();Q();q();J();te();oe();sd=class{constructor(o={}){this._options=M(o);}completeReport(o,e,t,i){return P.fromPromise(this.__completeReport(o,e,t,i))}async __completeReport(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/${_.encodePathParam(e)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Ja.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/projects/{projectId}/reports/{reportId}/complete")}generateReport(o,e={},t){return P.fromPromise(this.__generateReport(o,e,t))}async __generateReport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/generate`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:eE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{projectId}/reports/generate")}getReportPreference(o,e={},t){return P.fromPromise(this.__getReportPreference(o,e,t))}async __getReportPreference(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Bs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{projectId}/reports/preferences")}updateReportPreference(o,e,t){return P.fromPromise(this.__updateReportPreference(o,e,t))}async __updateReportPreference(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Bs.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/projects/{projectId}/reports/preferences")}getReports(o,e={},t){return P.fromPromise(this.__getReports(o,e,t))}async __getReports(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:FE.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/reports")}};});var pd,n8=n(()=>{Z();$();b();Q();q();J();te();oe();pd=class{constructor(o={}){this._options=M(o);}findRetentionRules(o={},e){return P.fromPromise(this.__findRetentionRules(o,e))}async __findRetentionRules(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:i,includeInactive:a}=o,s={page:t,size:i,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:nD.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/retention/rules")}createRetentionRule(o,e){return P.fromPromise(this.__createRetentionRule(o,e))}async __createRetentionRule(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Do.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(o,e={},t){return P.fromPromise(this.__getRetentionRuleById(o,e,t))}async __getRetentionRuleById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Do.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/retention/rules/{ruleId}")}deactivateRetentionRule(o,e={},t){return P.fromPromise(this.__deactivateRetentionRule(o,e,t))}async __deactivateRetentionRule(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/retention/rules/{ruleId}")}};});var cd,s8=n(()=>{Z();$();b();Q();q();J();te();oe();cd=class{constructor(o={}){this._options=M(o);}getJobLogs(o,e={},t){return P.fromPromise(this.__getJobLogs(o,e,t))}async __getJobLogs(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:i}=e,a={offset:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:ur.getJobLogs.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}/logs")}appendJobLogs(o,e,t){return P.fromPromise(this.__appendJobLogs(o,e,t))}async __appendJobLogs(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.appendJobLogs.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/logs")}cancelJob(o,e={},t){return P.fromPromise(this.__cancelJob(o,e,t))}async __cancelJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/cancel`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/cancel")}createBridgeCommand(o,e,t){return P.fromPromise(this.__createBridgeCommand(o,e,t))}async __createBridgeCommand(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:Sz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands")}createJob(o,e){return P.fromPromise(this.__createJob(o,e))}async __createJob(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new U(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(o,e={},t){return P.fromPromise(this.__getRunner(o,e,t))}async __getRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ts.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/{runnerId}")}disconnectRunner(o,e={},t){return P.fromPromise(this.__disconnectRunner(o,e,t))}async __disconnectRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/local-runners/{runnerId}")}getBridgeCommand(o,e,t={},i){return P.fromPromise(this.__getBridgeCommand(o,e,t,i))}async __getBridgeCommand(o,e,t={},i){var u,d,f,g,h,y,w,A,C,I,D;let{wait:a,timeout:s}=t,c={wait:a,timeout:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=i==null?void 0:i.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),i==null?void 0:i.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}`),method:"GET",headers:l,queryParameters:{...c,...i==null?void 0:i.queryParams},timeoutMs:((A=(w=i==null?void 0:i.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=i==null?void 0:i.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:wz.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}")}getJob(o,e={},t){return P.fromPromise(this.__getJob(o,e,t))}async __getJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:wt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}")}heartbeat(o,e={},t){return P.fromPromise(this.__heartbeat(o,e,t))}async __heartbeat(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/heartbeats`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ya.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:wE.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 ct(Eo.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/heartbeats")}listJobs(o,e={},t){return P.fromPromise(this.__listJobs(o,e,t))}async __listJobs(o,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,page:a,size:s}=e,c={project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:_E.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/jobs")}listRunners(o,e){return P.fromPromise(this.__listRunners(o,e))}async __listRunners(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:i,page:a,size:s}=o,c={project_id:t,status:i!=null?vl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:kE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners")}nextBridgeCommands(o,e={},t){return P.fromPromise(this.__nextBridgeCommands(o,e,t))}async __nextBridgeCommands(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/next`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ga.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:zz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/next")}nextJob(o,e={},t){return P.fromPromise(this.__nextJob(o,e,t))}async __nextJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs/next`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ur.nextJob.Response.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/jobs/next")}patchChecklist(o,e,t){return P.fromPromise(this.__patchChecklist(o,e,t))}async __patchChecklist(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.patchChecklist.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/local-runners/{runnerId}/checklist")}registerAgents(o,e,t){return P.fromPromise(this.__registerAgents(o,e,t))}async __registerAgents(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.registerAgents.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/local-runners/{runnerId}/agents")}reportBridgeResult(o,e,t,i){return P.fromPromise(this.__reportBridgeResult(o,e,t,i))}async __reportBridgeResult(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Oa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}/results")}reportJobResult(o,e,t){return P.fromPromise(this.__reportJobResult(o,e,t))}async __reportJobResult(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/results`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/results")}};});var ld,p8=n(()=>{Z();$();b();Q();q();J();te();ld=class{constructor(o={}){this._options=M(o);}getServiceToggles(o){return P.fromPromise(this.__getServiceToggles(o))}async __getServiceToggles(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/toggles"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:sD.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 md,c8=n(()=>{Z();$();b();Q();q();J();te();oe();md=class{constructor(o={}){this._options=M(o);}addSpanComment(o,e,t){return P.fromPromise(this.__addSpanComment(o,e,t))}async __addSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/comments")}addSpanFeedbackScore(o,e,t){return P.fromPromise(this.__addSpanFeedbackScore(o,e,t))}async __addSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/spans/{id}/feedback-scores")}createSpans(o,e){return P.fromPromise(this.__createSpans(o,e))}async __createSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:on.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(o,e){return P.fromPromise(this.__batchUpdateSpans(o,e))}async __batchUpdateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:en.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(o={},e){return P.fromPromise(this.__getSpansByProject(o,e))}async __getSpansByProject(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Fr,ai;let{page:t,size:i,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=o,A={page:t,size:i,project_name:a,project_id:s,trace_id:c,type:l!=null?Il.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:m,truncate:u,strip_attachments:d,sorting:f,exclude:g,search:h,from_time:y==null?void 0:y.toISOString(),to_time:w==null?void 0:w.toISOString()},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Fr=e==null?void 0:e.maxRetries)!=null?Fr:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ai=this._options)==null?void 0:ai.fetch,logging:this._options.logging});if(I.ok)return {data:uD.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/spans")}createSpan(o,e){return P.fromPromise(this.__createSpan(o,e))}async __createSpan(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:tn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans")}getSpanById(o,e={},t){return P.fromPromise(this.__getSpanById(o,e,t))}async __getSpanById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ms.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/{id}")}deleteSpanById(o,e={},t){return P.fromPromise(this.__deleteSpanById(o,e,t))}async __deleteSpanById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new Wr(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/spans/{id}")}updateSpan(o,e,t){return P.fromPromise(this.__updateSpan(o,e,t))}async __updateSpan(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/{id}")}deleteSpanComments(o,e){return P.fromPromise(this.__deleteSpanComments(o,e))}async __deleteSpanComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(o,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(o,e,t))}async __deleteSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ys.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/feedback-scores/delete")}findFeedbackScoreNames1(o={},e){return P.fromPromise(this.__findFeedbackScoreNames1(o,e))}async __findFeedbackScoreNames1(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:i}=o,a={project_id:t,type:i!=null?El.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/feedback-scores/names")}getSpanComment(o,e,t={},i){return P.fromPromise(this.__getSpanComment(o,e,t,i))}async __getSpanComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/spans/{spanId}/comments/{commentId}")}getSpanStats(o={},e){return P.fromPromise(this.__getSpanStats(o,e))}async __getSpanStats(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,projectName:i,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=o,d={project_id:t,project_name:i,trace_id:a,type:s!=null?Cl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:c,search:l,from_time:m==null?void 0:m.toISOString(),to_time:u==null?void 0:u.toISOString()},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Qr.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/spans/stats")}scoreBatchOfSpans(o,e){return P.fromPromise(this.__scoreBatchOfSpans(o,e))}async __scoreBatchOfSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(o={},e){return P.fromPromise(this.__searchSpans(o,e))}async __searchSpans(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:an.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:i,source:a}=o,s={project_id:t,project_name:i,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/spans/exists"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:ws.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/spans/exists")}updateSpanComment(o,e,t){return P.fromPromise(this.__updateSpanComment(o,e,t))}async __updateSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/comments/{commentId}")}};});var dd,l8=n(()=>{Z();$();b();Q();q();J();te();oe();dd=class{constructor(o={}){this._options=M(o);}executeAnalyticsQuery(o,e,t){return P.fromPromise(this.__executeAnalyticsQuery(o,e,t))}async __executeAnalyticsQuery(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/internal/analytics-queries/projects/${_.encodePathParam(o)}`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:nn.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:Jl.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 501:throw new Wr(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/internal/analytics-queries/projects/{projectId}")}executeScopedAnalyticsQuery(o,e){return P.fromPromise(this.__executeScopedAnalyticsQuery(o,e))}async __executeScopedAnalyticsQuery(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Jl.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 501:throw new Wr(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/internal/analytics-queries")}};});var ud,m8=n(()=>{Z();$();b();Q();q();J();te();ud=class{constructor(o={}){this._options=M(o);}getDatasetBiInfo(o){return P.fromPromise(this.__getDatasetBiInfo(o))}async __getDatasetBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-datasets")}getExperimentBiInfo(o){return P.fromPromise(this.__getExperimentBiInfo(o))}async __getExperimentBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-experiments")}getSpansBiInfo(o){return P.fromPromise(this.__getSpansBiInfo(o))}async __getSpansBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-spans")}getSpansCountBreakdownForWorkspaces(o){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(o))}async __getSpansCountBreakdownForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts-breakdown"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:DD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts-breakdown")}getSpansCountForWorkspaces(o){return P.fromPromise(this.__getSpansCountForWorkspaces(o))}async __getSpansCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:hD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts")}getTracesBiInfo(o){return P.fromPromise(this.__getTracesBiInfo(o))}async __getTracesBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-traces")}getTracesCountForWorkspaces(o){return P.fromPromise(this.__getTracesCountForWorkspaces(o))}async __getTracesCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:wD.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 gd,d8=n(()=>{Z();$();b();Q();q();J();te();oe();gd=class{constructor(o={}){this._options=M(o);}addThreadComment(o,e,t){return P.fromPromise(this.__addThreadComment(o,e,t))}async __addThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/threads/{id}/comments")}addTraceComment(o,e,t){return P.fromPromise(this.__addTraceComment(o,e,t))}async __addTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/comments")}addTraceFeedbackScore(o,e,t){return P.fromPromise(this.__addTraceFeedbackScore(o,e,t))}async __addTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/traces/{id}/feedback-scores")}createTraces(o,e){return P.fromPromise(this.__createTraces(o,e))}async __createTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(o,e){return P.fromPromise(this.__batchUpdateTraces(o,e))}async __batchUpdateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:un.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(o,e){return P.fromPromise(this.__batchUpdateThreads(o,e))}async __batchUpdateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Rn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(o={},e){return P.fromPromise(this.__closeTraceThread(o,e))}async __closeTraceThread(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(o={},e){return P.fromPromise(this.__getTracesByProject(o,e))}async __getTracesByProject(o={},e){var I,D,F,B,Y,ne,we,je,Ee,Ce,Fr;let{page:t,size:i,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=o,w={page:t,size:i,project_name:a,project_id:s,filters:c,truncate:l,strip_attachments:m,sorting:u,exclude:d,search:f,from_time:g==null?void 0:g.toISOString(),to_time:h==null?void 0:h.toISOString(),annotation_queue_id:y},A=z((I=this._options)==null?void 0:I.headers,T({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),e==null?void 0:e.headers),C=await S({url:_.join((Y=(B=await x.get(this._options.baseUrl))!=null?B:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...e==null?void 0:e.queryParams},timeoutMs:((je=(we=e==null?void 0:e.timeoutInSeconds)!=null?we:(ne=this._options)==null?void 0:ne.timeoutInSeconds)!=null?je:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Fr=this._options)==null?void 0:Fr.fetch,logging:this._options.logging});if(C.ok)return {data:SD.parseOrThrow(C.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:C.rawResponse};if(C.error.reason==="status-code")throw new k({statusCode:C.error.statusCode,body:C.error.body,rawResponse:C.rawResponse});return j(C.error,C.rawResponse,"GET","/v1/private/traces")}createTrace(o,e){return P.fromPromise(this.__createTrace(o,e))}async __createTrace(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:gn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces")}getTraceById(o,e={},t){return P.fromPromise(this.__getTraceById(o,e,t))}async __getTraceById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ls.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/traces/{id}")}deleteTraceById(o,e={},t){return P.fromPromise(this.__deleteTraceById(o,e,t))}async __deleteTraceById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/traces/{id}")}updateTrace(o,e,t){return P.fromPromise(this.__updateTrace(o,e,t))}async __updateTrace(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/{id}")}deleteThreadComments(o,e){return P.fromPromise(this.__deleteThreadComments(o,e))}async __deleteThreadComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(o,e){return P.fromPromise(this.__deleteThreadFeedbackScores(o,e))}async __deleteThreadFeedbackScores(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(o,e){return P.fromPromise(this.__deleteTraceComments(o,e))}async __deleteTraceComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(o,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(o,e,t))}async __deleteTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ys.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/feedback-scores/delete")}deleteTraceThreads(o,e){return P.fromPromise(this.__deleteTraceThreads(o,e))}async __deleteTraceThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ln.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(o,e){return P.fromPromise(this.__deleteTraces(o,e))}async __deleteTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(o={},e){return P.fromPromise(this.__findFeedbackScoreNames2(o,e))}async __findFeedbackScoreNames2(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/feedback-scores/names")}findTraceThreadsFeedbackScoreNames(o={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(o,e))}async __findTraceThreadsFeedbackScoreNames(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/feedback-scores/names")}getTraceStats(o={},e){return P.fromPromise(this.__getTraceStats(o,e))}async __getTraceStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Qr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(o,e,t={},i){return P.fromPromise(this.__getThreadComment(o,e,t,i))}async __getThreadComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/{threadId}/comments/{commentId}")}getTraceThreadStats(o={},e){return P.fromPromise(this.__getTraceThreadStats(o,e))}async __getTraceThreadStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Qr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/threads/stats")}getTraceComment(o,e,t={},i){return P.fromPromise(this.__getTraceComment(o,e,t,i))}async __getTraceComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/{traceId}/comments/{commentId}")}getTraceThread(o,e){return P.fromPromise(this.__getTraceThread(o,e))}async __getTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Vs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(o={},e){return P.fromPromise(this.__getTraceThreads(o,e))}async __getTraceThreads(o={},e){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:t,size:i,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g,annotationQueueId:h}=o,y={page:t,size:i,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString(),annotation_queue_id:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,"v1/private/traces/threads"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ne=e==null?void 0:e.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:ED.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(o,e){return P.fromPromise(this.__openTraceThread(o,e))}async __openTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(o,e){return P.fromPromise(this.__scoreBatchOfThreads(o,e))}async __scoreBatchOfThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(o,e){return P.fromPromise(this.__scoreBatchOfTraces(o,e))}async __scoreBatchOfTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(o={},e){return P.fromPromise(this.__searchTraceThreads(o,e))}async __searchTraceThreads(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(o={},e){return P.fromPromise(this.__searchTraces(o,e))}async __searchTraces(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/traces/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:i,source:a,threadOnly:s}=o,c={project_id:t,project_name:i,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/traces/exists"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:ws.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/traces/exists")}updateThread(o,e,t){return P.fromPromise(this.__updateThread(o,e,t))}async __updateThread(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:bn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/{threadModelId}")}updateThreadComment(o,e,t){return P.fromPromise(this.__updateThreadComment(o,e,t))}async __updateThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/comments/{commentId}")}updateTraceComment(o,e,t){return P.fromPromise(this.__updateTraceComment(o,e,t))}async __updateTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/comments/{commentId}")}};});var fd,u8=n(()=>{Z();$();b();Q();q();J();te();fd=class{constructor(o={}){this._options=M(o);}getWelcomeWizardStatus(o){return P.fromPromise(this.__getWelcomeWizardStatus(o))}async __getWelcomeWizardStatus(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:WD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/welcome-wizard")}submitWelcomeWizard(o={},e){return P.fromPromise(this.__submitWelcomeWizard(o,e))}async __submitWelcomeWizard(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/welcome-wizard")}};});var hd,g8=n(()=>{Z();$();b();Q();q();J();te();oe();hd=class{constructor(o={}){this._options=M(o);}getWorkspaceUserPermissions(o){return P.fromPromise(this.__getWorkspaceUserPermissions(o))}async __getWorkspaceUserPermissions(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:JD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new N(t.error.body,t.rawResponse);case 401:throw new O(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/workspace-permissions")}};});var yd,f8=n(()=>{Z();$();b();Q();q();J();te();oe();yd=class{constructor(o={}){this._options=M(o);}costsSummary(o,e){return P.fromPromise(this.__costsSummary(o,e))}async __costsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(o){return P.fromPromise(this.__getWorkspaceConfiguration(o))}async __getWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Js.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/workspaces/configurations")}upsertWorkspaceConfiguration(o,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(o,e))}async __upsertWorkspaceConfiguration(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Js.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(o){return P.fromPromise(this.__deleteWorkspaceConfiguration(o))}async __deleteWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/workspaces/configurations")}getCost(o,e){return P.fromPromise(this.__getCost(o,e))}async __getCost(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(o,e){return P.fromPromise(this.__getMetric(o,e))}async __getMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(o,e){return P.fromPromise(this.__getWorkspaceSpanMetric(o,e))}async __getWorkspaceSpanMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_n.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(o={},e){return P.fromPromise(this.__getWorkspaceTokenUsageNames(o,e))}async __getWorkspaceTokenUsageNames(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/token-usage/names"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ws.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(o,e){return P.fromPromise(this.__metricsSummary(o,e))}async __metricsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var Gs,h8=n(()=>{v3();T3();j3();E3();C3();I3();D3();U3();N3();F3();B3();M3();W3();L3();V3();J3();H3();G3();O3();K3();$3();Q3();Y3();X3();Z3();q3();e8();r8();t8();o8();i8();a8();n8();s8();p8();c8();l8();m8();d8();u8();g8();f8();Z();$();b();Q();q();J();Gs=class{constructor(o={}){this._options=M(o);}get mcpOAuth(){var o;return (o=this._mcpOAuth)!=null?o:this._mcpOAuth=new Xm(this._options)}get agentInsightsEnrollment(){var o;return (o=this._agentInsightsEnrollment)!=null?o:this._agentInsightsEnrollment=new Cm(this._options)}get systemAnalyticsQueries(){var o;return (o=this._systemAnalyticsQueries)!=null?o:this._systemAnalyticsQueries=new dd(this._options)}get systemUsage(){var o;return (o=this._systemUsage)!=null?o:this._systemUsage=new ud(this._options)}get agentConfigs(){var o;return (o=this._agentConfigs)!=null?o:this._agentConfigs=new jm(this._options)}get agentInsightsJobs(){var o;return (o=this._agentInsightsJobs)!=null?o:this._agentInsightsJobs=new Im(this._options)}get agentInsights(){var o;return (o=this._agentInsights)!=null?o:this._agentInsights=new Em(this._options)}get alerts(){var o;return (o=this._alerts)!=null?o:this._alerts=new Dm(this._options)}get annotationQueues(){var o;return (o=this._annotationQueues)!=null?o:this._annotationQueues=new Um(this._options)}get assertionResults(){var o;return (o=this._assertionResults)!=null?o:this._assertionResults=new Nm(this._options)}get attachments(){var o;return (o=this._attachments)!=null?o:this._attachments=new Fm(this._options)}get check(){var o;return (o=this._check)!=null?o:this._check=new Wm(this._options)}get automationRuleEvaluators(){var o;return (o=this._automationRuleEvaluators)!=null?o:this._automationRuleEvaluators=new Bm(this._options)}get chatCompletions(){var o;return (o=this._chatCompletions)!=null?o:this._chatCompletions=new Mm(this._options)}get dashboards(){var o;return (o=this._dashboards)!=null?o:this._dashboards=new Lm(this._options)}get datasets(){var o;return (o=this._datasets)!=null?o:this._datasets=new Vm(this._options)}get environments(){var o;return (o=this._environments)!=null?o:this._environments=new Jm(this._options)}get experiments(){var o;return (o=this._experiments)!=null?o:this._experiments=new Hm(this._options)}get feedbackDefinitions(){var o;return (o=this._feedbackDefinitions)!=null?o:this._feedbackDefinitions=new Gm(this._options)}get guardrails(){var o;return (o=this._guardrails)!=null?o:this._guardrails=new Om(this._options)}get insightsViews(){var o;return (o=this._insightsViews)!=null?o:this._insightsViews=new Km(this._options)}get llmModels(){var o;return (o=this._llmModels)!=null?o:this._llmModels=new $m(this._options)}get llmProviderKey(){var o;return (o=this._llmProviderKey)!=null?o:this._llmProviderKey=new Qm(this._options)}get runners(){var o;return (o=this._runners)!=null?o:this._runners=new cd(this._options)}get manualEvaluation(){var o;return (o=this._manualEvaluation)!=null?o:this._manualEvaluation=new Ym(this._options)}get ollama(){var o;return (o=this._ollama)!=null?o:this._ollama=new Zm(this._options)}get ollieState(){var o;return (o=this._ollieState)!=null?o:this._ollieState=new qm(this._options)}get openTelemetryIngestion(){var o;return (o=this._openTelemetryIngestion)!=null?o:this._openTelemetryIngestion=new ed(this._options)}get optimizations(){var o;return (o=this._optimizations)!=null?o:this._optimizations=new rd(this._options)}get pairing(){var o;return (o=this._pairing)!=null?o:this._pairing=new td(this._options)}get projects(){var o;return (o=this._projects)!=null?o:this._projects=new od(this._options)}get prompts(){var o;return (o=this._prompts)!=null?o:this._prompts=new id(this._options)}get reportFailures(){var o;return (o=this._reportFailures)!=null?o:this._reportFailures=new nd(this._options)}get reports(){var o;return (o=this._reports)!=null?o:this._reports=new sd(this._options)}get retentionRules(){var o;return (o=this._retentionRules)!=null?o:this._retentionRules=new pd(this._options)}get serviceToggles(){var o;return (o=this._serviceToggles)!=null?o:this._serviceToggles=new ld(this._options)}get spans(){var o;return (o=this._spans)!=null?o:this._spans=new md(this._options)}get traces(){var o;return (o=this._traces)!=null?o:this._traces=new gd(this._options)}get welcomeWizard(){var o;return (o=this._welcomeWizard)!=null?o:this._welcomeWizard=new fd(this._options)}get workspacePermissions(){var o;return (o=this._workspacePermissions)!=null?o:this._workspacePermissions=new hd(this._options)}get workspaces(){var o;return (o=this._workspaces)!=null?o:this._workspaces=new yd(this._options)}get redirect(){var o;return (o=this._redirect)!=null?o:this._redirect=new ad(this._options)}isAlive(o){return P.fromPromise(this.__isAlive(o))}async __isAlive(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ping"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ping")}version(o){return P.fromPromise(this.__version(o))}async __version(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ver"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ver")}};});var y8=n(()=>{});var b8,R8=n(()=>{Qp();(e=>(e.LogLevel=Ve,e.ConsoleLogger=mt))(b8||(b8={}));});var x8=n(()=>{y8();R8();});var w8=n(()=>{x8();});var Tr=n(()=>{oe();h8();Q();J();w8();te();});var ue,ir=n(()=>{ue=()=>v7$1();});function oae(p){return p.templateStructure==="text"}function iae(p){return p.templateStructure==="chat"}var jr,bd=n(()=>{jr=class{static serializePromptToInfoDict(o){let e;return oae(o)?e=o.prompt:iae(o)?e=o.messages:e="",{name:o.name,...o.id&&{id:o.id},template_structure:o.templateStructure,version:{...o.versionId&&{id:o.versionId},...o.commit&&{commit:o.commit},template:e}}}static normalizeMetadata(o){if(!o)return {};if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{let e=JSON.parse(o);if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}catch{}return null}static promptAlreadyInjected(o,e,t){let i=this.normalizeMetadata(o);return i===null?true:(Array.isArray(i.opik_prompts)?i.opik_prompts:[]).some(s=>{var c;return s.id===e&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(o,e,t,i){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(o))!=null?m:{},c=(u=this.normalizeMetadata(e))!=null?u:{},l=i&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(o,e){var s,c;let{prompts:t,appendPrompts:i,...a}=o;if(!t||t.length===0){if(a.metadata&&e){let l=(s=this.normalizeMetadata(e))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(e,a.metadata,t,i!=null?i:false)}}static processTraceUpdate(o,e){return this.processUpdate(o,e)}static processSpanUpdate(o,e){return this.processUpdate(o,e)}};});var Rd,_8=n(()=>{ro();ir();re();bd();Rd=class p{constructor(o,e){this.data=o;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.spanFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=o=>{var i;let e=jr.processSpanUpdate(o,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return Le()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=o=>{var c,l;let e=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&E.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(l=this.data.environment)!=null?l:""}" from the parent span will be used instead.`);let a={id:ue(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var xd,k8=n(()=>{ro();ir();re();_8();bd();xd=class{constructor(o,e){this.data=o;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.traceFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=o=>{var c,l,m;let e=(l=(c=this.data.projectName)!=null?c:o.projectName)!=null?l:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&E.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(m=this.data.environment)!=null?m:""}" from the parent trace will be used instead.`);let a={id:ue(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new Rd(a,this.opik);return this.spans.push(s),s};this.update=o=>{var i;let e=jr.processTraceUpdate(o,this.data.metadata),t={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return Le()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var A8,Os,aae,nae,P8,z8,S8,v8,HD=n(()=>{A8={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"},Os={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},aae=p=>Object.entries(p).map(([o,e])=>`${o}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),nae=p=>p.replace(/\/api\/?$/,""),P8=p=>Buffer.from(p).toString("base64"),z8=(p,o,e)=>{let t=aae(e),i=nae(p),a=i.endsWith("/")?i:`${i}/`,s=o.startsWith("/")?o.slice(1):o;return `${a}${s}?${t}`},S8=({datasetId:p,experimentId:o,baseUrl:e})=>z8(e,A8.EXPERIMENTS,{[Os.EXPERIMENT_ID]:o,[Os.DATASET_ID]:p,[Os.PATH]:P8(e)}),v8=(p,o)=>z8(o,A8.PROJECTS,{[Os.TRACE_ID]:p,[Os.PATH]:P8(o)});});var sae,wd,Ks,Ue,Bt=n(()=>{re();sae=300,wd=100,Ks=class{constructor({action:o,batchSize:e=wd,delay:t,enableBatch:i,name:a="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(o,e)=>{if(this.queue.set(o,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(o,e)=>{let t=this.queue.get(o);t&&(this.queue.set(o,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let o=new Map(this.queue);this.queue.clear(),E.debug(`Adding ${o.size} items to ${this.name} promise:`,o),this.promise=this.promise.finally(()=>(E.debug(`Flushing ${this.name}:`,o),this.action(o))).catch(e=>{E.error(`Failed to flush ${this.name}:`,e,o);}),await this.promise;};this.action=o,this.batchSize=e,this.delay=t,this.enableBatch=i,this.name=a;}},Ue=class{constructor({delay:o=sae,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:i=true,createBatchSize:a=wd,updateBatchSize:s=wd,deleteBatchSize:c=wd,name:l="BatchQueue"}={}){this.create=o=>{let e=this.getId(o);this.createQueue.add(e,o);};this.get=async o=>{let e=this.createQueue.queue.get(o);return e||this.getEntity(o)};this.update=(o,e)=>{if(this.createQueue.queue.get(o)){this.createQueue.update(o,e);return}let i=this.updateQueue.queue.get(o);this.updateQueue.add(o,{...i,...e});};this.delete=o=>{if(this.createQueue.queue.has(o)){this.createQueue.queue.delete(o);return}this.deleteQueue.add(o);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new Ks({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:o,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new Ks({action:async m=>{await this.createQueue.flush();let u=Array.from(m.entries());for(let[d,f]of u)await this.updateEntity(d,f);},delay:o,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new Ks({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:o,enableBatch:i,batchSize:c,name:`${l}:deleteQueue`});}};});var pae,_d,T8=n(()=>{zp();re();Bt();pae="suite_assertion",_d=class extends Ue{constructor(e,t,i="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${i}`});this.api=e;this.entityType=i;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,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(i=>({id:i.entityId,name:i.name,value:i.status==="passed"?1:0,categoryName:pae,reason:i.reason,source:i.source,projectName:i.projectName,projectId:i.projectId}));await this.api.traces.scoreBatchOfTraces({scores:t},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(){throw new Error("Not implemented")}};});var kd,cae,j8,lae,mae,No,GD=n(()=>{re();kd=["input","output"],cae=1024*1024,j8=p=>({opik_truncated:true,reason:Number.isFinite(p)?`<omitted_due_to_size_${Math.round(p)}MB_error_code_413_400>`:"<omitted_unserializable_error_code_413_400>"}),lae=p=>{try{let o=JSON.stringify(p);return o?Buffer.byteLength(o,"utf8")/cae:0}catch{return 1/0}},mae=(p,o)=>{let e={};for(let s of kd)p[s]!=null&&(e[s]=lae(p[s]));if(Object.keys(e).length===0)return {result:p,truncated:[]};let t={};for(let s of kd)e[s]!==void 0&&e[s]>o&&(t[s]=j8(e[s]));if(kd.reduce((s,c)=>{var l;return s+(t[c]?0:(l=e[c])!=null?l:0)},0)>o)for(let s of kd)e[s]!==void 0&&t[s]===void 0&&(t[s]=j8(e[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},No=(p,o,e="span",t)=>{if(!o||o<=0)return p;let{result:i,truncated:a}=mae(p,o);if(a.length>0){let s=e.charAt(0).toUpperCase()+e.slice(1);E.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${o} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return i};});var Yr,dae,uae,gae,fae,hae,yae,bae,Rae,E8,xae,C8,I8=n(()=>{Yr=(p,o,e=0)=>{if(p.length<e+o.length)return false;for(let t=0;t<o.length;t++)if(p[e+t]!==o[t])return false;return true},dae=[137,80,78,71,13,10,26,10],uae=[255,216,255],gae=[71,73,70,56,55,97],fae=[71,73,70,56,57,97],hae=[82,73,70,70],yae=[87,69,66,80],bae=[37,80,68,70],Rae=[102,116,121,112],E8=p=>{if(Yr(p,dae))return "image/png";if(Yr(p,uae)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(Yr(p,gae)||Yr(p,fae))return "image/gif";if(Yr(p,hae)&&Yr(p,yae,8))return "image/webp";if(Yr(p,bae))return "application/pdf";if(Yr(p,Rae,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let e=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(e.startsWith("{")||e.startsWith("["))return "application/json"}catch{}return null},xae={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","application/pdf":"pdf","image/svg+xml":"svg","video/mp4":"mp4","application/json":"json"},C8=p=>{var o;return (o=xae[p])!=null?o:"bin"};});var wae,_ae,kae,D8,Aae,Pae,zae,OD,U8,N8=n(()=>{I8();wae=["input","output","metadata"],_ae=(p,o)=>{let e=Math.floor(Math.random()*99999999)+1,t=C8(o);return `${p}-attachment-${e}-${Date.now()}-sdk.${t}`},kae=p=>{let o=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,e=Buffer.from(o,"base64");return e.length>0?e:null},D8=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,Aae=61,Pae=/data:[^,]*;base64,$/,zae=(p,o,e,t)=>{if(p.length<t)return p;let i=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!D8(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&D8(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===Aae&&u<2;)m++,u++;if(m-l>=t){let f=kae(p.slice(l,m)),g=f?E8(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&Pae.test(p.slice(y,l))&&(h=y);let w=_ae(o,g);i.push(p.slice(a,h)),i.push(`[${w}]`),a=m,e.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(i.push(p.slice(a)),i.join("")):p},OD=(p,o,e,t,i)=>{if(typeof p=="string")return zae(p,o,e,t);if(Array.isArray(p)){if(i.has(p))return p;i.add(p);let a=false,s=p.map(c=>{let l=OD(c,o,e,t,i);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(i.has(p))return p;i.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=OD(l,o,e,t,i);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},U8=(p,o)=>{let e=Math.max(4,Math.floor(o/4)*4),t=[],i={};for(let a of wae){let s=p[a];if(s==null)continue;let c=OD(s,a,t,e,new WeakSet);c!==s&&(i[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...i},attachments:t}};});var Sae,F8,B8,M8=n(()=>{Sae="BEMinIO",F8=async(p,o,e)=>{let t=await fetch(p,{method:"PUT",body:o,headers:e});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},B8=async(p,o,e,t)=>{let{data:i,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(i.length/5242880)),l=Buffer.from(o.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:e.entityType,entityId:e.entityId,path:l,projectName:e.projectName},p.requestOptions);if(m.uploadId===Sae){let d={"Content-Type":s,"Comet-Workspace":o.workspaceName,...o.extraHeaders};o.apiKey&&(d.authorization=o.apiKey),await F8(m.preSignUrls[0],i,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=i.subarray(f,f+5242880),h=await F8(m.preSignUrls[d],g);if(!h)throw new Error(`attachment upload part ${d+1} returned no ETag; cannot complete multipart upload`);u.push({eTag:h,partNumber:d+1});}await p.attachments.completeMultiPartUpload({fileName:a,entityType:e.entityType,entityId:e.entityId,fileSize:i.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:e.projectName},p.requestOptions);};});var Ad,KD=n(()=>{re();N8();M8();Ad=async(p,o,e,t)=>{let i;try{i=U8(t,o.minSizeBytes);}catch(a){return E.warn(`Attachment extraction skipped for ${e.entityType} '${e.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return i.attachments.length===0?t:(await Promise.all(i.attachments.map(a=>B8(p,o,e,a).catch(s=>{E.warn(`Failed to upload extracted attachment '${a.fileName}' for ${e.entityType} '${e.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),i.result)};});var Pd,W8=n(()=>{Bt();GD();pt();KD();Pd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Ad(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(No(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=No(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"span",e);await this.api.spans.updateSpan(e,{body:a},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var zd,L8=n(()=>{Bt();zd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var Sd,V8=n(()=>{Bt();GD();pt();KD();Sd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Ad(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(No(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=No(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"trace",e);await this.api.traces.updateTrace(e,{body:a},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var vd,J8=n(()=>{Bt();vd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var Td,H8=n(()=>{Tr();Td=class extends Gs{constructor(e){var i;let t={...e==null?void 0:e.headers,...(i=e==null?void 0:e.requestOptions)==null?void 0:i.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var jd,G8=n(()=>{Bt();jd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function O8(){return $D||($D=await vae()),$D}var $D,K8=n(()=>{$D=null;});var Fo,Ed=n(()=>{oe();ir();K8();Fo=class p{constructor(o,e){let{id:t,traceId:i,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=o;this.id=t||ue(),this.traceId=i,this.spanId=a,this.source=s||jf.Sdk,this.description=c!=null?c:e,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(o=false){return o?{...this.data,id:this.id}:{...this.data}}async contentHash(){let o={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(o.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(o.executionPolicy=this.executionPolicy);let e=Tae(o);return (await O8()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(o){return new p({id:o.id,traceId:o.traceId,spanId:o.spanId,source:o.source,...o.evaluators&&{evaluators:o.evaluators},...o.executionPolicy&&{executionPolicy:o.executionPolicy},...o.data},o.description)}};});async function Ne(p,o,e){var c;if(e===0)return [];let t=new TextDecoder$1("utf-8"),i=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
|
|
3
|
+
`)),{ok:true,value:o}):t}}var mr=n(()=>{});function ec(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var ah=n(()=>{});var no,nh=n(()=>{ah();no=class p extends Error{constructor(e){super(e.map(ec).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});var so,sh=n(()=>{ah();so=class p extends Error{constructor(e){super(e.map(ec).join("; "));this.errors=e;Object.setPrototypeOf(this,p.prototype);}};});function ce(p){return {nullable:()=>mie(p),optional:()=>ph(p),optionalNullable:()=>die(p),transform:o=>ch(p,o),parseOrThrow:(o,e)=>{let t=p.parse(o,e);if(t.ok)return t.value;throw new so(t.errors)},jsonOrThrow:(o,e)=>{let t=p.json(o,e);if(t.ok)return t.value;throw new no(t.errors)}}}function mie(p){let o={parse:(e,t)=>e==null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.NULLABLE};return {...o,...ce(o)}}function ph(p){let o={parse:(e,t)=>e==null?{ok:true,value:void 0}:p.parse(e,t),json:(e,t)=>t!=null&&t.omitUndefined&&e===void 0?{ok:true,value:void 0}:e==null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL};return {...o,...ce(o)}}function die(p){let o={parse:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.parse(e,t),json:(e,t)=>e===void 0?{ok:true,value:void 0}:e===null?{ok:true,value:null}:p.json(e,t),getType:()=>K.OPTIONAL_NULLABLE};return {...o,...ce(o)}}function ch(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);return a.ok?{ok:true,value:o.transform(a.value)}:a},json:(t,i)=>{let a=o.untransform(t);return p.json(a,i)},getType:()=>p.getType()};return {...e,...ce(e)}}var S4=n(()=>{he();nh();sh();});var Ie=n(()=>{S4();nh();sh();});function v4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o=="bigint"?{ok:true,value:o}:typeof o=="number"?{ok:true,value:BigInt(o)}:{ok:false,errors:[{path:e,message:se(o,"bigint | number")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="bigint"?{ok:false,errors:[{path:e,message:se(o,"bigint")}]}:{ok:true,value:o},getType:()=>K.BIGINT};return {...ye(p),...ce(p)}}var T4=n(()=>{he();ze();mr();Ie();});var j4=n(()=>{T4();});function E4(){let p={parse:(o,{breadcrumbsPrefix:e=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:e,message:se(o,"string")}]}:uie.test(o)?{ok:true,value:new Date(o)}:{ok:false,errors:[{path:e,message:se(o,"ISO 8601 date string")}]},json:(o,{breadcrumbsPrefix:e=[]}={})=>o instanceof Date?{ok:true,value:o.toISOString()}:{ok:false,errors:[{path:e,message:se(o,"Date object")}]},getType:()=>K.DATE};return {...ye(p),...ce(p)}}var uie,C4=n(()=>{he();ze();mr();Ie();uie=/^([+-]?\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 I4=n(()=>{C4();});function be(p,o){return ()=>{let e={parse:o,json:o,getType:()=>p};return {...ye(e),...ce(e)}}}var dr=n(()=>{Ie();mr();});function rc(p){let o=new Set(p);return be(K.ENUM,(t,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:se(t,"string")}]}:!o.has(t)&&!i?{ok:false,errors:[{path:a,message:se(t,"enum")}]}:{ok:true,value:t})()}var D4=n(()=>{he();dr();ze();});var lh=n(()=>{D4();});function U4(p){let o=mh(p);return {...o,...ce(o)}}function mh(p){return {parse:(o,e)=>po(p).parse(o,e),json:(o,e)=>po(p).json(o,e),getType:()=>po(p).getType()}}function po(p){let o=p;return o.__zurg_memoized==null&&(o.__zurg_memoized=p()),o.__zurg_memoized}var dh=n(()=>{Ie();});function fi(p){return Object.entries(p)}var uh=n(()=>{});function hi(p,o){let e=new Set(o);return Object.entries(p).reduce((t,[i,a])=>(e.has(i)&&(t[i]=a),t),{})}var gh=n(()=>{});function xr(p){if(typeof p!="object"||p===null)return false;if(Object.getPrototypeOf(p)===null)return true;let o=p;for(;Object.getPrototypeOf(o)!==null;)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(p)===o}var yi=n(()=>{});function bi(p){return Object.keys(p)}var fh=n(()=>{});function N4(p,o){let e=[],t=[];for(let i of p)o(i)?e.push(i):t.push(i);return [e,t]}var F4=n(()=>{});function Ze(p){return {withParsedProperties:o=>hh(p,o)}}function hh(p,o){let e={parse:(t,i)=>{let a=p.parse(t,i);if(!a.ok)return a;let s=Object.entries(o).reduce((c,[l,m])=>({...c,[l]:typeof m=="function"?m(a.value):m}),{});return {ok:true,value:{...a.value,...s}}},json:(t,i)=>{var c;if(!xr(t))return {ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:se(t,"object")}]};let a=new Set(Object.keys(o)),s=hi(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,i)},getType:()=>p.getType()};return {...e,...ce(e),...Ze(e)}}var B4=n(()=>{gh();ze();yi();Ie();});var Ri=n(()=>{B4();});function M4(p,o){return {rawKey:p,valueSchema:o,isProperty:true}}function Vr(p){return p.isProperty}var yh=n(()=>{});function tc(p){let o={_getRawProperties:()=>Object.entries(p).map(([e,t])=>Vr(t)?t.rawKey:e),_getParsedProperties:()=>bi(p),parse:(e,t)=>{let i={},a=[];for(let[s,c]of fi(p)){let l=Vr(c)?c.rawKey:s,m=Vr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};i[l]=u,V4(m)&&a.push(l);}return W4({value:e,requiredKeys:a,getProperty:s=>{let c=i[s];if(c!=null)return {transformedKey:c.parsedKey,transform:l=>{var m;return c.valueSchema.parse(l,{...t,breadcrumbsPrefix:[...(m=t==null?void 0:t.breadcrumbsPrefix)!=null?m:[],s]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},json:(e,t)=>{let i=[];for(let[a,s]of fi(p)){let c=Vr(s)?s.valueSchema:s;V4(c)&&i.push(a);}return W4({value:e,requiredKeys:i,getProperty:a=>{let s=p[a];if(s!=null)return Vr(s)?{transformedKey:s.rawKey,transform:c=>{var l;return s.valueSchema.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}:{transformedKey:a,transform:c=>{var l;return s.json(c,{...t,breadcrumbsPrefix:[...(l=t==null?void 0:t.breadcrumbsPrefix)!=null?l:[],a]})}}},unrecognizedObjectKeys:t==null?void 0:t.unrecognizedObjectKeys,skipValidation:t==null?void 0:t.skipValidation,breadcrumbsPrefix:t==null?void 0:t.breadcrumbsPrefix,omitUndefined:t==null?void 0:t.omitUndefined})},getType:()=>K.OBJECT};return {...ye(o),...ce(o),...Ze(o),...gt(o)}}function W4({value:p,requiredKeys:o,getProperty:e,unrecognizedObjectKeys:t="fail",skipValidation:i=false,breadcrumbsPrefix:a=[]}){if(!xr(p))return {ok:false,errors:[{path:a,message:se(p,"object")}]};let s=new Set(o),c=[],l={};for(let[m,u]of Object.entries(p)){let d=e(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...o.filter(m=>s.has(m)).map(m=>({path:a,message:`Missing required key "${m}"`}))),c.length===0||i?{ok:true,value:l}:{ok:false,errors:c}}function gt(p){return {extend:o=>{let e={_getParsedProperties:()=>[...p._getParsedProperties(),...o._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...o._getRawProperties()],parse:(t,i)=>L4({extensionKeys:o._getRawProperties(),value:t,transformBase:a=>p.parse(a,i),transformExtension:a=>o.parse(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>L4({extensionKeys:o._getParsedProperties(),value:t,transformBase:a=>p.json(a,i),transformExtension:a=>o.json(a,i),breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.OBJECT};return {...e,...ce(e),...Ze(e),...gt(e)}},passthrough:()=>{let o=new Set(p._getRawProperties()),e=new Set(p._getParsedProperties()),t={_getParsedProperties:()=>p._getParsedProperties(),_getRawProperties:()=>p._getRawProperties(),parse:(i,a)=>{let s=p.parse(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))o.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},json:(i,a)=>{let s=p.json(i,{...a,unrecognizedObjectKeys:"passthrough"});if(!s.ok)return s;let c={};if(typeof i=="object"&&i!=null)for(let[l,m]of Object.entries(i))e.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>K.OBJECT};return {...t,...ce(t),...Ze(t),...gt(t)}}}}function L4({extensionKeys:p,value:o,transformBase:e,transformExtension:t,breadcrumbsPrefix:i=[]}){if(!xr(o))return {ok:false,errors:[{path:i,message:se(o,"object")}]};let a=new Set(p),[s,c]=N4(bi(o),u=>a.has(u)),l=e(hi(o,c)),m=t(hi(o,s));return l.ok&&m.ok?{ok:true,value:{...l.value,...m.value}}:{ok:false,errors:[...l.ok?[]:l.errors,...m.ok?[]:m.errors]}}function V4(p){return !gie(p)}function gie(p){switch(p.getType()){case K.ANY:case K.UNKNOWN:case K.OPTIONAL:case K.OPTIONAL_NULLABLE:return true;default:return false}}var bh=n(()=>{he();uh();gh();ze();yi();fh();mr();F4();Ri();Ie();yh();});function J4(p){return tc(p)}var H4=n(()=>{bh();});var Rh=n(()=>{bh();H4();yh();});function G4(p){let o={...mh(p),_getRawProperties:()=>po(p)._getRawProperties(),_getParsedProperties:()=>po(p)._getParsedProperties()};return {...o,...ce(o),...Ze(o),...gt(o)}}var O4=n(()=>{Rh();Ri();Ie();dh();});var K4=n(()=>{dh();O4();});function oc(p){let o={parse:(e,t)=>$4(e,(i,a)=>{var s;return p.parse(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(e,t)=>$4(e,(i,a)=>{var s;return p.json(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>K.LIST};return {...ye(o),...ce(o)}}function $4(p,o){return Array.isArray(p)?p.map((t,i)=>o(t,i)).reduce((t,i)=>{if(t.ok&&i.ok)return {ok:true,value:[...t.value,i.value]};let a=[];return t.ok||a.push(...t.errors),i.ok||a.push(...i.errors),{ok:false,errors:a}},{ok:true,value:[]}):{ok:false,errors:[{message:se(p,"list"),path:[]}]}}var Q4=n(()=>{he();ze();mr();Ie();});var xh=n(()=>{Q4();});function Y4(p){return be(K.BOOLEAN_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`${p.toString()}`)}]})()}var X4=n(()=>{he();dr();ze();});function Z4(p){return be(K.STRING_LITERAL,(e,{breadcrumbsPrefix:t=[]}={})=>e===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:se(e,`"${p}"`)}]})()}var q4=n(()=>{he();dr();ze();});var e6=n(()=>{X4();q4();});var r6,t6=n(()=>{he();dr();r6=be(K.ANY,p=>({ok:true,value:p}));});var o6,i6=n(()=>{he();dr();ze();o6=be(K.BOOLEAN,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"boolean")}]});});var a6,n6=n(()=>{he();dr();a6=be(K.NEVER,(p,{breadcrumbsPrefix:o=[]}={})=>({ok:false,errors:[{path:o,message:"Expected never"}]}));});var s6,p6=n(()=>{he();dr();ze();s6=be(K.NUMBER,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"number")}]});});var c6,l6=n(()=>{he();dr();ze();c6=be(K.STRING,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:se(p,"string")}]});});var m6,d6=n(()=>{he();dr();m6=be(K.UNKNOWN,p=>({ok:true,value:p}));});var u6=n(()=>{t6();i6();n6();p6();l6();d6();});function f6(p,o){let e={parse:(t,i)=>g6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.parse(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.parse(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),json:(t,i)=>g6({value:t,isKeyNumeric:p.getType()===K.NUMBER,transformKey:a=>{var s;return p.json(a,{...i,breadcrumbsPrefix:[...(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],`${a} (key)`]})},transformValue:(a,s)=>{var c;return o.json(a,{...i,breadcrumbsPrefix:[...(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],`${s}`]})},breadcrumbsPrefix:i==null?void 0:i.breadcrumbsPrefix}),getType:()=>K.RECORD};return {...ye(e),...ce(e)}}function g6({value:p,isKeyNumeric:o,transformKey:e,transformValue:t,breadcrumbsPrefix:i=[]}){return xr(p)?fi(p).reduce((a,[s,c])=>{if(c===void 0)return a;let l=a,m=s;if(o){let g=s.length>0?Number(s):NaN;Number.isNaN(g)||(m=g);}let u=e(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:se(p,"object")}]}}var h6=n(()=>{he();uh();ze();yi();mr();Ie();});var y6=n(()=>{h6();});function b6(p){let o=oc(p),e={parse:(t,i)=>{let a=o.parse(t,i);return a.ok?{ok:true,value:new Set(a.value)}:a},json:(t,i)=>{var s;return t instanceof Set?o.json([...t],i):{ok:false,errors:[{path:(s=i==null?void 0:i.breadcrumbsPrefix)!=null?s:[],message:se(t,"Set")}]}},getType:()=>K.SET};return {...ye(e),...ce(e)}}var R6=n(()=>{he();ze();mr();xh();Ie();});var x6=n(()=>{R6();});function _6(p){let o={parse:(e,t)=>w6((i,a)=>i.parse(e,a),p,t),json:(e,t)=>w6((i,a)=>i.json(e,a),p,t),getType:()=>K.UNDISCRIMINATED_UNION};return {...ye(o),...ce(o)}}function w6(p,o,e){let t=[];for(let[i,a]of o.entries()){let s=p(a,{...e,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${i}] ${c.message}`});}return {ok:false,errors:t}}var k6=n(()=>{he();mr();Ie();});var A6=n(()=>{k6();});function P6(p,o){return {parsedDiscriminant:p,rawDiscriminant:o}}var z6=n(()=>{});function v6(p,o){let e=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,i=rc(bi(o)),a={parse:(s,c)=>S6({value:s,discriminant:e,transformedDiscriminant:t,transformDiscriminantValue:l=>{var m;return i.parse(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],e]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.parse(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),json:(s,c)=>S6({value:s,discriminant:t,transformedDiscriminant:e,transformDiscriminantValue:l=>{var m;return i.json(l,{allowUnrecognizedEnumValues:c==null?void 0:c.allowUnrecognizedUnionMembers,breadcrumbsPrefix:[...(m=c==null?void 0:c.breadcrumbsPrefix)!=null?m:[],t]})},getAdditionalPropertiesSchema:l=>o[l],allowUnrecognizedUnionMembers:c==null?void 0:c.allowUnrecognizedUnionMembers,transformAdditionalProperties:(l,m)=>m.json(l,c),breadcrumbsPrefix:c==null?void 0:c.breadcrumbsPrefix}),getType:()=>K.UNION};return {...ye(a),...ce(a),...Ze(a)}}function S6({value:p,discriminant:o,transformedDiscriminant:e,transformDiscriminantValue:t,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!xr(p))return {ok:false,errors:[{path:c,message:se(p,"object")}]};let{[o]:l,...m}=p;if(l==null)return {ok:false,errors:[{path:c,message:`Missing discriminant ("${o}")`}]};let u=t(l);if(!u.ok)return {ok:false,errors:u.errors};let d=i(u.value);if(d==null)return a?{ok:true,value:{[e]:u.value,...m}}:{ok:false,errors:[{path:[...c,o],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[e]:l,...f.value}}:f}var T6=n(()=>{he();ze();yi();fh();mr();lh();Ri();Ie();});var j6=n(()=>{z6();T6();});var E6=n(()=>{j4();I4();lh();K4();xh();e6();Rh();Ri();u6();y6();Ie();x6();A6();j6();});var r={};V(r,{JsonError:()=>no,ParseError:()=>so,any:()=>r6,bigint:()=>v4,boolean:()=>o6,booleanLiteral:()=>Y4,date:()=>E4,discriminant:()=>P6,enum_:()=>rc,getObjectLikeUtils:()=>Ze,getObjectUtils:()=>gt,getSchemaUtils:()=>ce,isProperty:()=>Vr,lazy:()=>U4,lazyObject:()=>G4,list:()=>oc,never:()=>a6,number:()=>s6,object:()=>tc,objectWithoutOptionalProperties:()=>J4,optional:()=>ph,property:()=>M4,record:()=>f6,set:()=>b6,string:()=>c6,stringLiteral:()=>Z4,transform:()=>ch,undiscriminatedUnion:()=>_6,union:()=>v6,unknown:()=>m6,withParsedProperties:()=>hh});var C6=n(()=>{E6();});function I6(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 D6=n(()=>{});function N6(p,...o){if(!p)return "";if(o.length===0)return p;if(p.includes("://")){let e;try{e=new URL(p);}catch{return U6(p,...o)}let t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=B6(a);s&&(e.pathname=F6(e.pathname,s));}return i&&!e.pathname.endsWith("/")&&(e.pathname+="/"),e.toString()}return U6(p,...o)}function U6(p,...o){if(o.length===0)return p;let e=p,t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=B6(a);s&&(e=F6(e,s));}return i&&!e.endsWith("/")&&(e+="/"),e}function F6(p,o){return p.endsWith("/")?p+o:`${p}/${o}`}function B6(p){if(!p)return p;let o=0,e=p.length;return p.startsWith("/")&&(o=1),p.endsWith("/")&&(e=p.length-1),o===0&&e===p.length?p:p.slice(o,e)}var M6=n(()=>{});var _={};V(_,{encodePathParam:()=>I6,join:()=>N6,toQueryString:()=>dt});var W6=n(()=>{D6();M6();di();});var b=n(()=>{m4();rh();A4();P4();th();C6();W6();});function M(p){let o=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":ao.type,"X-Fern-Runtime-Version":ao.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:gi.createLogger(p==null?void 0:p.logging),headers:o}}var Z=n(()=>{$();b();});var v,Q=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,o,e,t){switch(p.reason){case "non-json":throw new k({statusCode:p.statusCode,body:p.rawBody,rawResponse:o});case "body-is-null":throw new k({statusCode:p.statusCode,rawResponse:o});case "timeout":throw new Mr(`Timeout exceeded when calling ${e} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:o});default:throw new k({message:"Unknown error",rawResponse:o})}}var q=n(()=>{J();});var xi,L6=n(()=>{b();xi=r.object({blueprintName:r.property("blueprint_name",r.string())});});var wh,_h=n(()=>{b();wh=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 wi,V6=n(()=>{b();_h();wi=r.object({projectId:r.property("project_id",r.string()),envs:r.list(wh)});});var _i,J6=n(()=>{b();_i=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),keys:r.list(r.string())});});var kh=n(()=>{L6();V6();J6();});var H6=n(()=>{kh();});var ic={};V(ic,{AgentConfigEnvSetByName:()=>xi,AgentConfigEnvUpdate:()=>wi,AgentConfigRemoveValues:()=>_i});var G6=n(()=>{H6();});var ac,Ah=n(()=>{b();ac=r.enum_(["open","resolved","closed"]);});var ki,O6=n(()=>{b();Ah();ki=r.object({projectId:r.property("project_id",r.string()),status:ac});});var L,pe=n(()=>{b();L=r.record(r.string(),r.unknown());});var Ph,zh=n(()=>{b();Ph=r.enum_(["critical","high","medium","low"]);});var Sh,vh=n(()=>{b();pe();zh();Sh=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),tracesQuery:r.property("traces_query",r.string().optional()),severity:Ph,count:r.number(),totalCount:r.property("total_count",r.number()),usersImpacted:r.property("users_impacted",r.number()),totalUsers:r.property("total_users",r.number()),metadata:L.optional()});});var Ai,K6=n(()=>{b();vh();Ai=r.object({projectId:r.property("project_id",r.string()),reportDay:r.property("report_day",r.string()),issues:r.list(Sh)});});var Th=n(()=>{O6();K6();});var $6=n(()=>{Th();});var nc,Q6=n(()=>{b();nc=r.enum_(["critical","high","medium","low"]);});var sc,Y6=n(()=>{b();sc=r.enum_(["open","resolved","closed"]);});var jh=n(()=>{Ah();Q6();Y6();});var pc={};V(pc,{AgentInsightsIssueUpdate:()=>ki,AgentInsightsIssueUpdateStatus:()=>ac,AgentInsightsReport:()=>Ai,FindAgentInsightsIssuesRequestSeverity:()=>nc,FindAgentInsightsIssuesRequestStatus:()=>sc});var X6=n(()=>{$6();jh();});var Pi,Z6=n(()=>{b();Pi=r.object({enrolled:r.boolean(),projectIds:r.property("project_ids",r.list(r.string()))});});var Eh=n(()=>{Z6();});var q6=n(()=>{Eh();});var cc={};V(cc,{Request:()=>Pi});var e2=n(()=>{q6();});var lc,Ch=n(()=>{b();lc=r.enum_(["enabled","disabled"]);});var zi,r2=n(()=>{b();Ch();zi=r.object({status:lc});});var Ih=n(()=>{r2();});var t2=n(()=>{Ih();});var Dh=n(()=>{Ch();});var mc={};V(mc,{AgentInsightsJobUpdate:()=>zi,AgentInsightsJobUpdateStatus:()=>lc});var o2=n(()=>{t2();Dh();});var dc,i2=n(()=>{b();dc=r.enum_(["general","slack","pagerduty"]);});var Uh=n(()=>{i2();});var uc={};V(uc,{GetWebhookExamplesRequestAlertType:()=>dc});var a2=n(()=>{Uh();});var Nh,Fh=n(()=>{b();Nh=r.enum_([">","<","="]);});var Bh,Mh=n(()=>{b();Fh();Bh=r.object({scoreName:r.property("score_name",r.string()),operator:Nh,value:r.number()});});var Wh,Lh=n(()=>{b();Mh();Wh=r.object({conditions:r.list(Bh)});});var Vh,Jh=n(()=>{b();Lh();Vh=r.object({groups:r.list(Wh)});});var Hh,Gh=n(()=>{b();Jh();Hh=r.object({enabled:r.boolean().optional(),conditions:Vh.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Oh,Kh=n(()=>{b();Oh=r.enum_(["trace","thread"]);});var Si,$h=n(()=>{b();Gh();Kh();Si=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:Oh,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Hh.optional()});});var vi,n2=n(()=>{b();$h();vi=r.object({annotationQueues:r.property("annotation_queues",r.list(Si))});});var Ti,s2=n(()=>{b();Ti=r.object({ids:r.list(r.string())});});var Qh,Yh=n(()=>{b();Qh=r.enum_([">","<","="]);});var Xh,Zh=n(()=>{b();Yh();Xh=r.object({scoreName:r.property("score_name",r.string()),operator:Qh,value:r.number()});});var qh,ey=n(()=>{b();Zh();qh=r.object({conditions:r.list(Xh)});});var ry,ty=n(()=>{b();ey();ry=r.object({groups:r.list(qh)});});var ji,gc=n(()=>{b();ty();ji=r.object({enabled:r.boolean().optional(),conditions:ry.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Ei,p2=n(()=>{b();gc();Ei=r.object({name:r.string().optional(),description:r.string().optional(),instructions:r.string().optional(),commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:ji.optional()});});var oy=n(()=>{n2();s2();p2();});var c2=n(()=>{oy();});var fc={};V(fc,{AnnotationQueueBatchWrite:()=>vi,AnnotationQueueItemIdsPublic:()=>Ti,AnnotationQueueUpdate:()=>Ei});var l2=n(()=>{c2();});var iy,ay=n(()=>{b();iy=r.enum_(["ui","sdk","online_scoring"]);});var ny,sy=n(()=>{b();ny=r.enum_(["passed","failed"]);});var py,cy=n(()=>{b();ay();sy();py=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:ny,reason:r.string().optional(),source:iy});});var hc,ly=n(()=>{b();hc=r.enum_(["TRACE","SPAN","THREAD"]);});var Ci,m2=n(()=>{b();cy();ly();Ci=r.object({entityType:r.property("entity_type",hc),assertionResults:r.property("assertion_results",r.list(py))});});var my=n(()=>{m2();});var d2=n(()=>{my();});var dy=n(()=>{ly();});var yc={};V(yc,{AssertionResultBatch:()=>Ci,AssertionResultBatchEntityType:()=>hc});var u2=n(()=>{d2();dy();});var bc,uy=n(()=>{b();bc=r.enum_(["trace","span"]);});var Ii,g2=n(()=>{b();uy();Ii=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",bc),entityId:r.property("entity_id",r.string()),path:r.string()});});var gy=n(()=>{g2();});var Rc={};V(Rc,{Request:()=>fie});var fie,f2=n(()=>{b();fie=r.record(r.string(),r.unknown());});var h2=n(()=>{gy();f2();});var xc,y2=n(()=>{b();xc=r.enum_(["trace","span"]);});var wc,b2=n(()=>{b();wc=r.enum_(["trace","span"]);});var _c,R2=n(()=>{b();_c=r.enum_(["trace","span"]);});var fy=n(()=>{y2();b2();uy();R2();});var co={};V(co,{AttachmentListRequestEntityType:()=>xc,DownloadAttachmentRequestEntityType:()=>wc,StartMultipartUploadRequest:()=>Ii,StartMultipartUploadRequestEntityType:()=>bc,UploadAttachmentRequestEntityType:()=>_c,uploadAttachment:()=>Rc});var x2=n(()=>{h2();fy();});var Di,kc=n(()=>{b();Di=r.object({name:r.string().optional(),description:r.string().optional(),strict:r.boolean().optional(),parameters:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var wr,lo=n(()=>{b();wr=r.object({name:r.string().optional(),arguments:r.string().optional()});});var Ui,Ac=n(()=>{b();pe();Ui=r.object({role:r.string(),content:L});});var hy,yy=n(()=>{b();hy=r.object({name:r.string().optional(),strict:r.boolean().optional(),schema:r.record(r.string(),r.record(r.string(),r.unknown())).optional()});});var by,Ry=n(()=>{b();by=r.enum_(["text","json_object","json_schema"]);});var xy,wy=n(()=>{b();yy();Ry();xy=r.object({type:by.optional(),jsonSchema:hy.optional()});});var _y,ky=n(()=>{b();_y=r.object({includeUsage:r.boolean().optional()});});var Ay,Py=n(()=>{b();Ay=r.enum_(["function"]);});var zy,Sy=n(()=>{b();kc();Py();zy=r.object({type:Ay.optional(),function:Di.optional()});});var Ni,w2=n(()=>{b();kc();lo();Ac();wy();ky();Sy();Ni=r.object({model:r.string().optional(),messages:r.list(Ui).optional(),temperature:r.number().optional(),topP:r.number().optional(),n:r.number().optional(),stream:r.boolean().optional(),streamOptions:_y.optional(),stop:r.list(r.string()).optional(),maxTokens:r.number().optional(),maxCompletionTokens:r.number().optional(),presencePenalty:r.number().optional(),frequencyPenalty:r.number().optional(),logitBias:r.record(r.string(),r.number()).optional(),user:r.string().optional(),responseFormat:xy.optional(),seed:r.number().optional(),tools:r.list(zy).optional(),toolChoice:r.record(r.string(),r.unknown()).optional(),parallelToolCalls:r.boolean().optional(),store:r.boolean().optional(),metadata:r.record(r.string(),r.string()).optional(),reasoningEffort:r.string().optional(),serviceTier:r.string().optional(),logprobs:r.boolean().optional(),topLogprobs:r.number().optional(),functions:r.list(Di).optional(),functionCall:wr.optional()});});var vy=n(()=>{w2();});var _2=n(()=>{vy();});var Pc={};V(Pc,{ChatCompletionRequest:()=>Ni});var k2=n(()=>{_2();});var Ty,jy=n(()=>{b();Ty=r.enum_(["llm_judge","code_metric"]);});var _r,mo=n(()=>{b();jy();pe();_r=r.object({name:r.string(),type:Ty,config:L});});var qe,ft=n(()=>{b();qe=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Ey,Cy=n(()=>{b();Ey=r.object({includeTags:r.boolean().optional(),includeFeedbackScores:r.boolean().optional(),includeComments:r.boolean().optional(),includeUsage:r.boolean().optional(),includeMetadata:r.boolean().optional()});});var Fi,A2=n(()=>{b();mo();ft();Cy();Fi=r.object({spanIds:r.property("span_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Ey),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Iy,Dy=n(()=>{b();Iy=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 Bi,P2=n(()=>{b();mo();ft();Dy();Bi=r.object({traceIds:r.property("trace_ids",r.list(r.string())),enrichmentOptions:r.property("enrichment_options",Iy),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),fieldMappings:r.property("field_mappings",r.record(r.string(),r.string()).optional())});});var Mi,z2=n(()=>{b();Mi=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 Wi,S2=n(()=>{b();Wi=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Li,v2=n(()=>{b();Li=r.object({datasetName:r.property("dataset_name",r.string()),projectName:r.property("project_name",r.string().optional())});});var Uy,Ny=n(()=>{b();Uy=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Vi,zc=n(()=>{b();Ny();Vi=r.object({field:r.string().optional(),operator:Uy.optional(),key:r.string().optional(),value:r.string().optional()});});var Fy,By=n(()=>{b();mo();ft();pe();Fy=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(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),clearExecutionPolicy:r.property("clear_execution_policy",r.boolean().optional())});});var Ji,T2=n(()=>{b();zc();By();Ji=r.object({ids:r.list(r.string()).optional(),filters:r.list(Vi).optional(),datasetId:r.property("dataset_id",r.string().optional()),update:Fy,mergeTags:r.property("merge_tags",r.boolean().optional())});});var My,Wy=n(()=>{b();My=r.enum_(["manual","trace","span","sdk"]);});var Ly,Vy=n(()=>{b();Ly=r.enum_(["llm_judge","code_metric"]);});var Se,kr=n(()=>{b();Se=r.record(r.string(),r.unknown());});var Jy,Hy=n(()=>{b();Vy();kr();Jy=r.object({name:r.string(),type:Ly,config:Se});});var Gy,Oy=n(()=>{b();Gy=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Hi,Ky=n(()=>{b();Wy();Hy();Oy();pe();Hi=r.object({id:r.string().optional(),traceId:r.property("trace_id",r.string().optional()),spanId:r.property("span_id",r.string().optional()),source:My,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(Jy).optional(),executionPolicy:r.property("execution_policy",Gy.optional())});});var Gi,j2=n(()=>{b();Ky();Gi=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(Hi),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var Oi,E2=n(()=>{b();Oi=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 Ki,C2=n(()=>{b();zc();Ki=r.object({itemIds:r.property("item_ids",r.list(r.string()).optional()),datasetId:r.property("dataset_id",r.string().optional()),filters:r.list(Vi).optional(),batchGroupId:r.property("batch_group_id",r.string().optional())});});var Sc,$y=n(()=>{b();Sc=r.enum_(["private","public"]);});var $i,I2=n(()=>{b();$y();$i=r.object({name:r.string(),description:r.string().optional(),visibility:Sc.optional(),tags:r.list(r.string()).optional()});});var Qi,D2=n(()=>{b();Qi=r.object({versionRef:r.property("version_ref",r.string())});});var Yi,U2=n(()=>{b();Yi=r.object({versionName:r.property("version_name",r.string())});});var Xi,N2=n(()=>{b();Xi=r.object({tag:r.string()});});var Zi,F2=n(()=>{b();Zi=r.object({changeDescription:r.property("change_description",r.string().optional()),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional())});});var vc,Qy=n(()=>{b();vc=r.enum_(["dataset","evaluation_suite"]);});var Tc,Yy=n(()=>{b();Tc=r.enum_(["private","public"]);});var qi,B2=n(()=>{b();Qy();Yy();qi=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:vc.optional(),visibility:Tc.optional(),tags:r.list(r.string()).optional(),description:r.string().optional()});});var Xy=n(()=>{A2();P2();z2();S2();v2();T2();j2();E2();C2();I2();D2();U2();N2();F2();B2();});var Zy,qy=n(()=>{b();Zy=r.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var uo,eb=n(()=>{b();qy();uo=r.object({id:r.string().optional(),datasetId:r.property("dataset_id",r.string().optional()),datasetName:r.property("dataset_name",r.string().optional()),status:Zy.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 jc={};V(jc,{Response:()=>hie});var hie,M2=n(()=>{b();eb();hie=r.list(uo);});var W2=n(()=>{M2();Xy();});var Ec,L2=n(()=>{b();Ec=r.enum_(["json","jsonl"]);});var rb=n(()=>{L2();$y();Qy();Yy();});var go={};V(go,{CreateDatasetItemsFromJsonRequestFormat:()=>Ec,CreateDatasetItemsFromSpansRequest:()=>Fi,CreateDatasetItemsFromTracesRequest:()=>Bi,DatasetExpansionWrite:()=>Mi,DatasetIdentifier:()=>Wi,DatasetIdentifierPublic:()=>Li,DatasetItemBatchUpdate:()=>Ji,DatasetItemBatchWrite:()=>Gi,DatasetItemStreamRequest:()=>Oi,DatasetItemsDelete:()=>Ki,DatasetUpdate:()=>$i,DatasetUpdateVisibility:()=>Sc,DatasetVersionRestorePublic:()=>Qi,DatasetVersionRetrieveRequestPublic:()=>Yi,DatasetVersionTag:()=>Xi,DatasetVersionUpdatePublic:()=>Zi,DatasetWrite:()=>qi,DatasetWriteType:()=>vc,DatasetWriteVisibility:()=>Tc,getDatasetExportJobs:()=>jc});var V2=n(()=>{W2();rb();});var ea,J2=n(()=>{b();ea=r.object({name:r.string().optional(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var ra,H2=n(()=>{b();ra=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional(),color:r.string().optional(),position:r.number().optional()});});var tb=n(()=>{J2();H2();});var G2=n(()=>{tb();});var Cc={};V(Cc,{EnvironmentUpdate:()=>ea,EnvironmentWrite:()=>ra});var O2=n(()=>{G2();});var ta,Ic=n(()=>{b();ta=r.object({name:r.string(),value:r.number()});});var ob,ib=n(()=>{b();ob=r.enum_(["running","completed","cancelled"]);});var ab,nb=n(()=>{b();ab=r.enum_(["regular","trial","mini-batch","mutation"]);});var oa,sb=n(()=>{b();Ic();ib();nb();pe();oa=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:ab.optional(),status:ob.optional(),experimentScores:r.property("experiment_scores",r.list(ta).optional())});});var ia,K2=n(()=>{b();sb();ia=r.object({ids:r.list(r.string()),update:oa,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Jr,aa=n(()=>{b();Jr=r.object({id:r.string(),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),promptId:r.property("prompt_id",r.string().optional()),promptName:r.property("prompt_name",r.string().optional())});});var pb,cb=n(()=>{b();pe();Ac();aa();pb=r.object({model:r.string(),messages:r.list(Ui),configs:r.record(r.string(),L).optional(),promptVersions:r.property("prompt_versions",r.list(Jr).optional()),experimentName:r.property("experiment_name",r.string().optional())});});var na,$2=n(()=>{b();cb();aa();na=r.object({datasetName:r.property("dataset_name",r.string()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),prompts:r.list(pb),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(Jr).optional())});});var lb,mb=n(()=>{b();lb=r.enum_(["ui","sdk","online_scoring"]);});var db,ub=n(()=>{b();db=r.enum_(["ui","sdk","online_scoring"]);});var gb,fb=n(()=>{b();ub();gb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:db.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var hb,yb=n(()=>{b();mb();fb();hb=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:lb,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),gb).optional())});});var er,sa=n(()=>{b();er=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var pa,Dc=n(()=>{b();pa=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var bb,Rb=n(()=>{b();bb=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xb,wb=n(()=>{b();xb=r.enum_(["general","tool","llm","guardrail"]);});var _b,kb=n(()=>{b();Dc();sa();Rb();wb();_b=r.object({id:r.string().optional(),parentSpanId:r.property("parent_span_id",r.string().optional()),name:r.string().optional(),type:xb.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",pa.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:bb.optional(),environment:r.string().optional()});});var Ab,Pb=n(()=>{b();Ab=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var zb,Sb=n(()=>{b();Dc();sa();Pb();zb=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:er.optional(),output:er.optional(),metadata:er.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",pa.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Ab.optional(),environment:r.string().optional()});});var vb,Tb=n(()=>{b();yb();sa();kb();Sb();vb=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",er.optional()),trace:zb.optional(),spans:r.list(_b).optional(),feedbackScores:r.property("feedback_scores",r.list(hb).optional())});});var ca,Q2=n(()=>{b();Tb();ca=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(vb)});});var la,Y2=n(()=>{b();la=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 jb,Eb=n(()=>{b();jb=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var ge,ht=n(()=>{b();ge=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Cb,Ib=n(()=>{b();Cb=r.enum_(["passed","failed"]);});var Db,Ub=n(()=>{b();Db=r.enum_(["default","hidden"]);});var Nb,Fb=n(()=>{b();Nb=r.enum_(["ui","sdk","online_scoring"]);});var Bb,Mb=n(()=>{b();Bb=r.enum_(["ui","sdk","online_scoring"]);});var Wb,Lb=n(()=>{b();Mb();Wb=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Bb.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Pe,yt=n(()=>{b();Fb();Lb();Pe=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Nb,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Wb).optional())});});var le,Ye=n(()=>{b();le=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var ma,Uc=n(()=>{b();Eb();ht();ft();Ib();Ub();yt();Ye();ma=r.object({id:r.string().optional(),experimentId:r.property("experiment_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string()),traceId:r.property("trace_id",r.string()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),input:le.optional(),output:le.optional(),traceMetadata:r.property("trace_metadata",le.optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),duration:r.number().optional(),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),traceVisibilityMode:r.property("trace_visibility_mode",Db.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",qe.optional()),assertionResults:r.property("assertion_results",r.list(jb).optional()),status:Cb.optional()});});var da,X2=n(()=>{b();Uc();da=r.object({experimentItems:r.property("experiment_items",r.list(ma))});});var ua,Z2=n(()=>{b();ua=r.object({ids:r.list(r.string())});});var ga,q2=n(()=>{b();ga=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 Vb,Jb=n(()=>{b();Vb=r.object({name:r.string(),value:r.number()});});var Je,fo=n(()=>{b();Je=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Nc,Hb=n(()=>{b();Nc=r.object({id:r.string()});});var Fc,Gb=n(()=>{b();Fc=r.enum_(["dataset","evaluation_suite"]);});var Bc,Ob=n(()=>{b();Bc=r.enum_(["running","completed","cancelled"]);});var Mc,Kb=n(()=>{b();Mc=r.enum_(["regular","trial","mini-batch","mutation"]);});var fa,eY=n(()=>{b();Jb();fo();Hb();Gb();Ob();Kb();fa=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),type:Mc.optional(),evaluationMethod:r.property("evaluation_method",Fc.optional()),optimizationId:r.property("optimization_id",r.string().optional()),status:Bc.optional(),experimentScores:r.property("experiment_scores",r.list(Vb).optional()),promptVersion:r.property("prompt_version",Nc.optional()),promptVersions:r.property("prompt_versions",r.list(Nc).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional())});});var $b=n(()=>{K2();$2();Q2();Y2();X2();Z2();q2();eY();});var rY=n(()=>{$b();});var Qb=n(()=>{Gb();Ob();Kb();});var Wc={};V(Wc,{ExperimentBatchUpdate:()=>ia,ExperimentExecutionRequest:()=>na,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ca,ExperimentItemStreamRequest:()=>la,ExperimentItemsBatch:()=>da,ExperimentItemsDelete:()=>ua,ExperimentStreamRequestPublic:()=>ga,ExperimentWrite:()=>fa,ExperimentWriteEvaluationMethod:()=>Fc,ExperimentWriteStatus:()=>Bc,ExperimentWriteType:()=>Mc});var tY=n(()=>{rY();Qb();});var Lc,oY=n(()=>{b();Lc=r.enum_(["numerical","categorical","boolean"]);});var Yb=n(()=>{oY();});var Vc={};V(Vc,{FindFeedbackDefinitionsRequestType:()=>Lc});var iY=n(()=>{Yb();});var Xb,Zb=n(()=>{b();Xb=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var qb,eR=n(()=>{b();qb=r.enum_(["passed","failed"]);});var rR,tR=n(()=>{b();Zb();eR();pe();rR=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:Xb,result:qb,config:L,details:L});});var ha,aY=n(()=>{b();tR();ha=r.object({guardrails:r.list(rR)});});var oR=n(()=>{aY();});var nY=n(()=>{oR();});var Jc={};V(Jc,{GuardrailBatchWrite:()=>ha});var sY=n(()=>{nY();});var Hc={};V(Hc,{Response:()=>yie});var yie,pY=n(()=>{b();yie=r.string();});var cY=n(()=>{pY();});var ho={};V(ho,{getLlmModels:()=>Hc});var lY=n(()=>{cY();});var iR,aR=n(()=>{b();iR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var nR,sR=n(()=>{b();nR=r.enum_(["form","json","basic"]);});var bt,ya=n(()=>{b();aR();sR();bt=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",nR.optional()),credentials:r.list(iR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var ba,mY=n(()=>{b();ya();ba=r.object({apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",bt.optional())});});var pR,cR=n(()=>{b();pR=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var lR,mR=n(()=>{b();lR=r.enum_(["form","json","basic"]);});var dR,uR=n(()=>{b();cR();mR();dR=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",lR.optional()),credentials:r.list(pR).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Gc,gR=n(()=>{b();Gc=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Ra,dY=n(()=>{b();uR();gR();Ra=r.object({provider:Gc,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",dR.optional())});});var xa,uY=n(()=>{b();ya();xa=r.object({providerId:r.property("provider_id",r.string().optional()),authConfig:r.property("auth_config",bt.optional())});});var fR=n(()=>{mY();dY();uY();});var gY=n(()=>{fR();});var hR=n(()=>{gR();});var Oc={};V(Oc,{ProviderApiKeyUpdate:()=>ba,ProviderApiKeyWrite:()=>Ra,ProviderApiKeyWriteProvider:()=>Gc,ProviderAuthCheck:()=>xa});var fY=n(()=>{gY();hR();});var wa,hY=n(()=>{b();wa=r.object({clientName:r.property("client_name",r.string()),redirectUris:r.property("redirect_uris",r.list(r.string())),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional())});});var _a,yY=n(()=>{b();_a=r.object({clientId:r.property("client_id",r.string()),redirectUri:r.property("redirect_uri",r.string()),codeChallenge:r.property("code_challenge",r.string()),codeChallengeMethod:r.property("code_challenge_method",r.string()),resource:r.string(),state:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),csrf:r.string().optional()});});var ka,bY=n(()=>{b();ka=r.object({token:r.string().optional(),clientId:r.property("client_id",r.string().optional())});});var Aa,RY=n(()=>{b();Aa=r.object({grantType:r.property("grant_type",r.string().optional()),code:r.string().optional(),redirectUri:r.property("redirect_uri",r.string().optional()),clientId:r.property("client_id",r.string().optional()),codeVerifier:r.property("code_verifier",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional())});});var yR=n(()=>{hY();yY();bY();RY();});var xY=n(()=>{yR();});var Kc={};V(Kc,{ClientRegistrationRequest:()=>wa,ConsentRequest:()=>_a,RevokeRequest:()=>ka,TokenRequest:()=>Aa});var wY=n(()=>{xY();});var bR,RR=n(()=>{b();bR=r.object({name:r.string(),size:r.number().optional(),digest:r.string().optional(),modifiedAt:r.property("modified_at",r.date().optional())});});var $c={};V($c,{Response:()=>bie});var bie,_Y=n(()=>{b();RR();bie=r.list(bR);});var kY=n(()=>{_Y();});var yo={};V(yo,{listModels:()=>$c});var AY=n(()=>{kY();});var He,Hr=n(()=>{b();He=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Qc,xR=n(()=>{b();Qc=r.enum_(["running","completed","cancelled","initialized","error"]);});var Pa,PY=n(()=>{b();Hr();Ye();xR();Pa=r.object({name:r.string().optional(),status:Qc.optional(),errorInfo:r.property("error_info",He.optional()),metadata:le.optional()});});var wR=n(()=>{PY();});var zY=n(()=>{wR();});var _R=n(()=>{xR();});var Yc={};V(Yc,{OptimizationUpdate:()=>Pa,OptimizationUpdateStatus:()=>Qc});var SY=n(()=>{zY();_R();});var za,vY=n(()=>{b();za=r.object({runnerName:r.property("runner_name",r.string()),hmac:r.string()});});var Xc,kR=n(()=>{b();Xc=r.enum_(["connect","endpoint"]);});var Sa,TY=n(()=>{b();kR();Sa=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:Xc});});var AR=n(()=>{vY();TY();});var jY=n(()=>{AR();});var PR=n(()=>{kR();});var Zc={};V(Zc,{ActivateRequest:()=>za,CreateSessionRequest:()=>Sa,CreateSessionRequestType:()=>Xc});var EY=n(()=>{jY();PR();});var qc,zR=n(()=>{b();qc=r.enum_(["traces","spans","threads"]);});var va,CY=n(()=>{b();zR();va=r.object({entityType:r.property("entity_type",qc),filters:r.string().optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional())});});var SR,vR=n(()=>{b();SR=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var TR,jR=n(()=>{b();vR();TR=r.object({field:SR.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ER,CR=n(()=>{b();ER=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Ar,bo=n(()=>{b();CR();Ar=r.object({field:r.string().optional(),operator:ER.optional(),key:r.string().optional(),value:r.string().optional()});});var IR,DR=n(()=>{b();IR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Pr,Ro=n(()=>{b();DR();Pr=r.object({field:r.string().optional(),operator:IR.optional(),key:r.string().optional(),value:r.string().optional()});});var UR,NR=n(()=>{b();UR=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Rt,Ta=n(()=>{b();NR();Rt=r.object({field:r.string().optional(),operator:UR.optional(),key:r.string().optional(),value:r.string().optional()});});var el,FR=n(()=>{b();el=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var rl,BR=n(()=>{b();rl=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 ja,IY=n(()=>{b();jR();bo();Ro();Ta();FR();BR();ja=r.object({metricType:r.property("metric_type",rl.optional()),interval:el.optional(),intervalStart:r.property("interval_start",r.date().optional()),intervalEnd:r.property("interval_end",r.date().optional()),spanFilters:r.property("span_filters",r.list(Ar).optional()),traceFilters:r.property("trace_filters",r.list(Pr).optional()),threadFilters:r.property("thread_filters",r.list(Rt).optional()),breakdown:TR.optional()});});var Ea,DY=n(()=>{b();Ea=r.object({name:r.string(),includeStats:r.boolean().optional()});});var tl,MR=n(()=>{b();tl=r.enum_(["private","public"]);});var Ca,UY=n(()=>{b();MR();Ca=r.object({name:r.string().optional(),description:r.string().optional(),visibility:tl.optional()});});var ol,WR=n(()=>{b();ol=r.enum_(["private","public"]);});var Ia,NY=n(()=>{b();WR();Ia=r.object({name:r.string(),visibility:ol.optional(),description:r.string().optional()});});var LR=n(()=>{CY();IY();DY();UY();NY();});var FY=n(()=>{LR();});var VR=n(()=>{zR();FR();BR();MR();WR();});var il={};V(il,{KpiCardRequest:()=>va,KpiCardRequestEntityType:()=>qc,ProjectMetricRequestPublic:()=>ja,ProjectMetricRequestPublicInterval:()=>el,ProjectMetricRequestPublicMetricType:()=>rl,ProjectRetrieveDetailed:()=>Ea,ProjectUpdate:()=>Ca,ProjectUpdateVisibility:()=>tl,ProjectWrite:()=>Ia,ProjectWriteVisibility:()=>ol});var BY=n(()=>{FY();VR();});var JR,HR=n(()=>{b();JR=r.record(r.string(),r.unknown());});var GR,OR=n(()=>{b();GR=r.enum_(["text","chat"]);});var KR,$R=n(()=>{b();KR=r.enum_(["mustache","jinja2","python"]);});var QR,YR=n(()=>{b();QR=r.enum_(["prompt_version","mask"]);});var De,Da=n(()=>{b();HR();OR();$R();YR();De=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:JR.optional(),type:KR.optional(),versionType:r.property("version_type",QR.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",GR.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var al,XR=n(()=>{b();al=r.enum_(["text","chat"]);});var Ua,MY=n(()=>{b();Da();XR();Ua=r.object({name:r.string(),version:De,templateStructure:r.property("template_structure",al.optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var Na,WY=n(()=>{b();Na=r.object({name:r.string(),description:r.string().optional(),tags:r.list(r.string()).optional()});});var ZR,qR=n(()=>{b();ZR=r.object({tags:r.list(r.string()).optional()});});var Fa,LY=n(()=>{b();qR();Fa=r.object({ids:r.list(r.string()),update:ZR,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Ba,VY=n(()=>{b();Ba=r.object({commits:r.list(r.string())});});var Ma,JY=n(()=>{b();Ma=r.object({environments:r.list(r.string())});});var Wa,HY=n(()=>{b();Wa=r.object({ids:r.list(r.string())});});var La,GY=n(()=>{b();La=r.object({name:r.string(),commit:r.string().optional(),environment:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),projectName:r.property("project_name",r.string().optional())});});var nl,ex=n(()=>{b();nl=r.enum_(["text","chat"]);});var sl,rx=n(()=>{b();sl=r.enum_(["mustache","jinja2","python"]);});var Va,OY=n(()=>{b();kr();ex();rx();Va=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:sl.optional(),templateStructure:r.property("template_structure",nl.optional()),tags:r.list(r.string()).optional()});});var tx=n(()=>{MY();WY();LY();VY();JY();HY();GY();OY();});var xo,pl=n(()=>{b();xo=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 cl={};V(cl,{Response:()=>Rie});var Rie,KY=n(()=>{b();pl();Rie=r.list(xo);});var ll={};V(ll,{Response:()=>xie});var xie,$Y=n(()=>{b();Da();xie=r.list(De);});var QY=n(()=>{KY();tx();$Y();});var ox=n(()=>{XR();ex();rx();});var xt={};V(xt,{CreatePromptVersionDetail:()=>Ua,CreatePromptVersionDetailTemplateStructure:()=>al,PromptUpdatable:()=>Na,PromptVersionBatchUpdate:()=>Fa,PromptVersionCommitsRequestPublic:()=>Ba,PromptVersionEnvironmentUpdate:()=>Ma,PromptVersionIdsRequestDetail:()=>Wa,PromptVersionRetrieveDetail:()=>La,PromptWrite:()=>Va,PromptWriteTemplateStructure:()=>nl,PromptWriteType:()=>sl,getPromptsByCommits:()=>cl,retrievePromptVersionsByIds:()=>ll});var YY=n(()=>{QY();ox();});var ml,XY=n(()=>{b();ml=r.enum_(["agent_insights"]);});var ix=n(()=>{XY();});var dl={};V(dl,{FindReportFailuresRequestType:()=>ml});var ZY=n(()=>{ix();});var ul,ax=n(()=>{b();ul=r.enum_(["pending","completed","failed"]);});var Ja,qY=n(()=>{b();pe();ax();Ja=r.object({content:r.string().optional(),status:ul,sessionId:r.property("session_id",r.string().optional()),recommendedActions:r.property("recommended_actions",L.optional()),failureReason:r.property("failure_reason",r.string().optional())});});var nx=n(()=>{qY();});var e9=n(()=>{nx();});var sx=n(()=>{ax();});var gl={};V(gl,{ReportCompleteRequest:()=>Ja,ReportCompleteRequestStatus:()=>ul});var r9=n(()=>{e9();sx();});var fl,px=n(()=>{b();fl=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Ha,t9=n(()=>{b();px();Ha=r.object({projectId:r.property("project_id",r.string().optional()),organizationLevel:r.property("organization_level",r.boolean().optional()),retention:fl,applyToPast:r.property("apply_to_past",r.boolean().optional())});});var cx=n(()=>{t9();});var o9=n(()=>{cx();});var lx=n(()=>{px();});var hl={};V(hl,{RetentionRuleWrite:()=>Ha,RetentionRuleWriteRetention:()=>fl});var i9=n(()=>{o9();lx();});var Ga,a9=n(()=>{b();Ga=r.object({maxCommands:r.property("max_commands",r.number().optional())});});var yl,mx=n(()=>{b();yl=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Oa,n9=n(()=>{b();pe();mx();Oa=r.object({status:yl,result:L.optional(),error:L.optional(),durationMs:r.property("duration_ms",r.number().optional())});});var bl,dx=n(()=>{b();bl=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Ka,s9=n(()=>{b();pe();dx();Ka=r.object({type:bl,args:L,timeoutSeconds:r.property("timeout_seconds",r.number().optional())});});var $a,Rl=n(()=>{b();$a=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 Qa,p9=n(()=>{b();pe();Rl();Qa=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()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:$a.optional()});});var Ya,c9=n(()=>{b();Ya=r.object({capabilities:r.list(r.string()).optional()});});var xl,ux=n(()=>{b();xl=r.enum_(["pending","running","completed","failed","cancelled"]);});var Xa,l9=n(()=>{b();pe();ux();Xa=r.object({status:xl,result:L.optional(),error:r.string().optional(),traceId:r.property("trace_id",r.string().optional())});});var gx=n(()=>{a9();n9();s9();p9();c9();l9();});var Za,wl=n(()=>{b();Za=r.object({stream:r.string(),text:r.string()});});var _l={};V(_l,{Request:()=>wie});var wie,m9=n(()=>{b();wl();wie=r.list(Za);});var kl={};V(kl,{Response:()=>_ie});var _ie,d9=n(()=>{b();wl();_ie=r.list(Za);});var fx,hx=n(()=>{b();fx=r.enum_(["pending","running","completed","failed","cancelled"]);});var wt,Al=n(()=>{b();pe();Rl();hx();wt=r.object({id:r.string().optional(),runnerId:r.property("runner_id",r.string().optional()),agentName:r.property("agent_name",r.string().optional()),status:fx.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()),promptMasks:r.property("prompt_masks",r.record(r.string(),r.string()).optional()),blueprintName:r.property("blueprint_name",r.string().optional()),metadata:$a.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 Pl={};V(Pl,{Response:()=>kie});var kie,u9=n(()=>{Al();kie=wt.nullable();});var zl={};V(zl,{Request:()=>Aie});var Aie,g9=n(()=>{b();Aie=r.record(r.string(),r.unknown());});var Sl={};V(Sl,{Request:()=>Pie});var Pie,f9=n(()=>{b();Pie=r.record(r.string(),r.unknown());});var h9=n(()=>{m9();d9();u9();g9();f9();gx();});var vl,y9=n(()=>{b();vl=r.enum_(["pairing","connected","disconnected"]);});var yx=n(()=>{mx();dx();y9();ux();});var ur={};V(ur,{BridgeCommandNextRequest:()=>Ga,BridgeCommandResultRequest:()=>Oa,BridgeCommandResultRequestStatus:()=>yl,BridgeCommandSubmitRequest:()=>Ka,BridgeCommandSubmitRequestType:()=>bl,CreateLocalRunnerJobRequest:()=>Qa,ListRunnersRequestStatus:()=>vl,LocalRunnerHeartbeatRequest:()=>Ya,LocalRunnerJobResultRequest:()=>Xa,LocalRunnerJobResultRequestStatus:()=>xl,appendJobLogs:()=>_l,getJobLogs:()=>kl,nextJob:()=>Pl,patchChecklist:()=>zl,registerAgents:()=>Sl});var b9=n(()=>{h9();yx();});var bx,Rx=n(()=>{b();bx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var xx,wx=n(()=>{b();xx=r.enum_(["general","tool","llm","guardrail"]);});var qa,_x=n(()=>{b();Hr();Ye();Rx();wx();qa=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:xx.optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),usage:r.record(r.string(),r.number()).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),errorInfo:r.property("error_info",He.optional()),ttft:r.number().optional(),source:bx.optional(),environment:r.string().optional()});});var en,R9=n(()=>{b();_x();en=r.object({ids:r.list(r.string()),update:qa,mergeTags:r.property("merge_tags",r.boolean().optional())});});var _t,rn=n(()=>{b();_t=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var kx,Ax=n(()=>{b();kx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Px,zx=n(()=>{b();Px=r.enum_(["general","tool","llm","guardrail"]);});var tn,Sx=n(()=>{b();rn();fo();Ax();zx();tn=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:Px.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",_t.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:kx.optional(),environment:r.string().optional()});});var on,x9=n(()=>{b();Sx();on=r.object({spans:r.list(tn)});});var Tl,vx=n(()=>{b();Tl=r.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source","environment"]);});var jl,Tx=n(()=>{b();jl=r.enum_(["general","tool","llm","guardrail"]);});var an,w9=n(()=>{b();bo();vx();Tx();an=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:jl.optional(),filters:r.list(Ar).optional(),limit:r.number().optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),truncate:r.boolean().optional(),exclude:r.list(Tl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var jx=n(()=>{R9();x9();w9();});var _9=n(()=>{jx();});var El,k9=n(()=>{b();El=r.enum_(["general","tool","llm","guardrail"]);});var Cl,A9=n(()=>{b();Cl=r.enum_(["general","tool","llm","guardrail"]);});var Il,P9=n(()=>{b();Il=r.enum_(["general","tool","llm","guardrail"]);});var Ex=n(()=>{k9();A9();P9();vx();Tx();});var Dl={};V(Dl,{FindFeedbackScoreNames1RequestType:()=>El,GetSpanStatsRequestType:()=>Cl,GetSpansByProjectRequestType:()=>Il,SpanBatchUpdate:()=>en,SpanBatchWrite:()=>on,SpanSearchStreamRequestPublic:()=>an,SpanSearchStreamRequestPublicExcludeItem:()=>Tl,SpanSearchStreamRequestPublicType:()=>jl});var z9=n(()=>{_9();Ex();});var nn,S9=n(()=>{b();nn=r.object({query:r.string()});});var sn,v9=n(()=>{b();sn=r.object({query:r.string(),projectId:r.property("project_id",r.string().optional())});});var Cx=n(()=>{S9();v9();});var T9=n(()=>{Cx();});var Ul={};V(Ul,{AnalyticsQueryRequest:()=>nn,ScopedAnalyticsQueryRequest:()=>sn});var j9=n(()=>{T9();});var pn,E9=n(()=>{b();pn=r.object({ids:r.list(r.string()),projectId:r.property("project_id",r.string().optional())});});var cn,C9=n(()=>{b();cn=r.object({projectName:r.property("project_name",r.string()),threadId:r.property("thread_id",r.string()),names:r.list(r.string()),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var ln,I9=n(()=>{b();ln=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 Ix,Dx=n(()=>{b();Ix=r.enum_(["ui","sdk","online_scoring"]);});var Ux,Nx=n(()=>{b();Dx();Ux=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:Ix,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),threadId:r.property("thread_id",r.string())});});var mn,D9=n(()=>{b();Nx();mn=r.object({scores:r.list(Ux)});});var Fx,Bx=n(()=>{b();Fx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var dn,Mx=n(()=>{b();Hr();Ye();Bx();dn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),tagsToAdd:r.property("tags_to_add",r.list(r.string()).optional()),tagsToRemove:r.property("tags_to_remove",r.list(r.string()).optional()),errorInfo:r.property("error_info",He.optional()),threadId:r.property("thread_id",r.string().optional()),ttft:r.number().optional(),source:Fx.optional(),environment:r.string().optional()});});var un,U9=n(()=>{b();Mx();un=r.object({ids:r.list(r.string()),update:dn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Wx,Lx=n(()=>{b();Wx=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var gn,Vx=n(()=>{b();rn();fo();Lx();gn=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Je.optional(),output:Je.optional(),metadata:Je.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",_t.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),ttft:r.number().optional(),threadId:r.property("thread_id",r.string().optional()),source:Wx.optional(),environment:r.string().optional()});});var fn,N9=n(()=>{b();Vx();fn=r.object({traces:r.list(gn)});});var Nl,Jx=n(()=>{b();Nl=r.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","source","environment"]);});var hn,F9=n(()=>{b();Ro();Jx();hn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(Pr).optional(),lastRetrievedId:r.property("last_retrieved_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),exclude:r.list(Nl).optional(),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var yn,B9=n(()=>{b();yn=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 bn,Hx=n(()=>{b();bn=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 Rn,M9=n(()=>{b();Hx();Rn=r.object({ids:r.list(r.string()),update:bn,mergeTags:r.property("merge_tags",r.boolean().optional())});});var Gx,Ox=n(()=>{b();Gx=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rr,kt=n(()=>{b();Ox();rr=r.object({field:r.string().optional(),operator:Gx.optional(),key:r.string().optional(),value:r.string().optional()});});var xn,W9=n(()=>{b();kt();xn=r.object({projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),filters:r.list(rr).optional(),lastRetrievedThreadModelId:r.property("last_retrieved_thread_model_id",r.string().optional()),limit:r.number().optional(),truncate:r.boolean().optional(),stripAttachments:r.property("strip_attachments",r.boolean().optional()),fromTime:r.property("from_time",r.date().optional()),toTime:r.property("to_time",r.date().optional())});});var Kx=n(()=>{E9();C9();I9();D9();U9();N9();F9();B9();M9();W9();});var L9=n(()=>{Kx();});var $x=n(()=>{Jx();});var Fl={};V(Fl,{BatchDeleteByProject:()=>pn,DeleteThreadFeedbackScores:()=>cn,DeleteTraceThreads:()=>ln,FeedbackScoreBatchThread:()=>mn,TraceBatchUpdate:()=>un,TraceBatchWrite:()=>fn,TraceSearchStreamRequestPublic:()=>hn,TraceSearchStreamRequestPublicExcludeItem:()=>Nl,TraceThreadBatchIdentifier:()=>yn,TraceThreadBatchUpdate:()=>Rn,TraceThreadSearchStreamRequest:()=>xn});var V9=n(()=>{L9();$x();});var wn,J9=n(()=>{b();wn=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 Qx=n(()=>{J9();});var H9=n(()=>{Qx();});var Bl={};V(Bl,{WelcomeWizardSubmission:()=>wn});var G9=n(()=>{H9();});var Yx,Xx=n(()=>{b();Yx=r.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var Zx,qx=n(()=>{b();Xx();Zx=r.object({field:Yx.optional(),metadataKey:r.property("metadata_key",r.string().optional()),subMetric:r.property("sub_metric",r.string().optional())});});var ew,rw=n(()=>{b();ew=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var tr,At=n(()=>{b();rw();tr=r.object({field:r.string().optional(),operator:ew.optional(),key:r.string().optional(),value:r.string().optional()});});var Ml,tw=n(()=>{b();Ml=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Wl,ow=n(()=>{b();Wl=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 _n,O9=n(()=>{b();qx();At();tw();ow();_n=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional()),metricType:r.property("metric_type",Wl.optional()),interval:Ml.optional(),breakdown:Zx.optional(),filters:r.list(tr).optional(),intervalStart:r.property("interval_start",r.date()),intervalEnd:r.property("interval_end",r.date().optional()),startBeforeEnd:r.property("start_before_end",r.boolean().optional())});});var kn,K9=n(()=>{b();kn=r.object({projectIds:r.property("project_ids",r.list(r.string()).optional())});});var iw=n(()=>{O9();K9();});var $9=n(()=>{iw();});var aw=n(()=>{tw();ow();});var Ll={};V(Ll,{WorkspaceSpanMetricRequest:()=>_n,WorkspaceSpanMetricRequestInterval:()=>Ml,WorkspaceSpanMetricRequestMetricType:()=>Wl,WorkspaceTokenUsageNamesRequest:()=>kn});var Q9=n(()=>{$9();aw();});var Y9=n(()=>{kh();G6();Th();X6();jh();Eh();e2();Ih();o2();Dh();a2();Uh();oy();l2();my();u2();dy();gy();x2();fy();vy();k2();Xy();V2();rb();tb();O2();$b();tY();Qb();iY();Yb();oR();sY();lY();fR();fY();hR();yR();wY();AY();wR();SY();_R();AR();EY();PR();LR();BY();VR();tx();YY();ox();ZY();ix();nx();r9();sx();cx();i9();lx();gx();b9();yx();jx();z9();Ex();Cx();j9();Kx();V9();$x();Qx();G9();iw();Q9();aw();});var nw,sw=n(()=>{b();nw=r.enum_(["required","optional"]);});var pw,cw=n(()=>{b();sw();pw=r.object({name:r.string(),type:r.string(),presence:nw.optional()});});var lw,mw=n(()=>{b();cw();lw=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(pw).optional(),timeout:r.number().optional()});});var dw,uw=n(()=>{b();dw=r.enum_(["blueprint","mask"]);});var gw,fw=n(()=>{b();gw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var hw,yw=n(()=>{b();fw();hw=r.object({key:r.string(),value:r.string().optional(),type:gw,description:r.string().optional()});});var bw,Rw=n(()=>{b();uw();yw();bw=r.object({id:r.string().optional(),name:r.string().optional(),type:dw,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(hw)});});var xw,ww=n(()=>{b();xw=r.enum_(["blueprint","mask"]);});var _w,kw=n(()=>{b();_w=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var Aw,Pw=n(()=>{b();kw();Aw=r.object({key:r.string(),value:r.string().optional(),type:_w,description:r.string().optional()});});var Pt,X9=n(()=>{b();ww();Pw();Pt=r.object({id:r.string().optional(),name:r.string().optional(),type:xw,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(Aw)});});var zw,Sw=n(()=>{b();zw=r.enum_(["blueprint","mask"]);});var vw,Tw=n(()=>{b();vw=r.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var jw,Ew=n(()=>{b();Tw();jw=r.object({key:r.string(),value:r.string().optional(),type:vw,description:r.string().optional()});});var Cw,Iw=n(()=>{b();Sw();Ew();Cw=r.object({id:r.string().optional(),type:zw,description:r.string().optional(),values:r.list(jw)});});var Vl,Z9=n(()=>{b();Iw();Vl=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),id:r.string().optional(),blueprint:Cw});});var Dw,Uw=n(()=>{b();Dw=r.enum_(["critical","high","medium","low"]);});var Nw,Fw=n(()=>{b();Nw=r.enum_(["open","resolved","closed"]);});var Bw,Mw=n(()=>{b();Uw();Fw();Bw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Nw.optional(),severity:Dw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),totalOccurrences:r.property("total_occurrences",r.number().optional()),latestCount:r.property("latest_count",r.number().optional()),total:r.number().optional(),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),firstSeen:r.property("first_seen",r.string().optional()),lastSeen:r.property("last_seen",r.string().optional()),daysReported:r.property("days_reported",r.number().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var Ww,Lw=n(()=>{b();pe();Ww=r.object({reportDay:r.property("report_day",r.string().optional()),count:r.number().optional(),totalCount:r.property("total_count",r.number().optional()),usersImpacted:r.property("users_impacted",r.number().optional()),totalUsers:r.property("total_users",r.number().optional()),metadata:L.optional()});});var Vw,q9=n(()=>{b();Mw();Vw=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Bw).optional()});});var Jw,Hw=n(()=>{b();Jw=r.enum_(["critical","high","medium","low"]);});var Gw,Ow=n(()=>{b();Gw=r.enum_(["open","resolved","closed"]);});var Kw,eX=n(()=>{b();Lw();Hw();Ow();Kw=r.object({id:r.string().optional(),name:r.string().optional(),description:r.string().optional(),cause:r.string().optional(),suggestedFix:r.property("suggested_fix",r.string().optional()),status:Gw.optional(),severity:Jw.optional(),tracesQuery:r.property("traces_query",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),details:r.list(Ww).optional()});});var $w,Qw=n(()=>{b();$w=r.enum_(["enabled","disabled"]);});var An,rX=n(()=>{b();Qw();An=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:$w.optional(),autoFirstRunEnrolled:r.property("auto_first_run_enrolled",r.boolean().optional()),autoFirstRunAt:r.property("auto_first_run_at",r.date().optional()),lastScanAt:r.property("last_scan_at",r.date().optional()),lastFailureReason:r.property("last_failure_reason",r.string().optional()),lastFailureDetail:r.property("last_failure_detail",r.string().optional()),lastFailedAt:r.property("last_failed_at",r.date().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var ve,Gr=n(()=>{b();ve=r.object({name:r.string(),value:r.number()});});var zr,wo=n(()=>{b();zr=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Yw,Xw=n(()=>{b();Gr();wo();Yw=r.object({experimentCount:r.property("experiment_count",r.number().optional()),traceCount:r.property("trace_count",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),duration:zr.optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),passRateAvg:r.property("pass_rate_avg",r.number().optional()),passedCountSum:r.property("passed_count_sum",r.number().optional()),totalCountSum:r.property("total_count_sum",r.number().optional())});});var Zw,qw=n(()=>{b();Zw=r.enum_(["general","slack","pagerduty"]);});var e_,r_=n(()=>{b();e_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var t_,o_=n(()=>{b();r_();t_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:e_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var i_,a_=n(()=>{b();i_=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 n_,s_=n(()=>{b();o_();a_();n_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",i_),triggerConfigs:r.property("trigger_configs",r.list(t_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var p_,c_=n(()=>{b();p_=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 zie,tX=n(()=>{b();qw();s_();c_();zie=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",Zw.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:p_,triggers:r.list(n_).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 l_,m_=n(()=>{b();l_=r.enum_(["general","slack","pagerduty"]);});var d_,u_=n(()=>{b();d_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var g_,f_=n(()=>{b();u_();g_=r.object({id:r.string().optional(),alertTriggerId:r.property("alert_trigger_id",r.string().optional()),type:d_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var h_,y_=n(()=>{b();h_=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 b_,R_=n(()=>{b();f_();y_();b_=r.object({id:r.string().optional(),alertId:r.property("alert_id",r.string().optional()),eventType:r.property("event_type",h_),triggerConfigs:r.property("trigger_configs",r.list(g_).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var x_,w_=n(()=>{b();x_=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 Pn,__=n(()=>{b();m_();R_();w_();Pn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",l_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:x_,triggers:r.list(b_).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 zn,oX=n(()=>{b();__();zn=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Pn).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var k_,A_=n(()=>{b();k_=r.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var P_,z_=n(()=>{b();A_();P_=r.object({id:r.string().optional(),type:k_,configValue:r.property("config_value",r.record(r.string(),r.string()).optional()),groupIndex:r.property("group_index",r.number().optional())});});var S_,v_=n(()=>{b();S_=r.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var T_,j_=n(()=>{b();z_();v_();T_=r.object({id:r.string().optional(),eventType:r.property("event_type",S_),triggerConfigs:r.property("trigger_configs",r.list(P_).optional())});});var E_,C_=n(()=>{b();E_=r.enum_(["general","slack","pagerduty"]);});var I_,D_=n(()=>{b();I_=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 Sn,iX=n(()=>{b();j_();C_();D_();Sn=r.object({id:r.string().optional(),name:r.string().optional(),enabled:r.boolean().optional(),alertType:r.property("alert_type",E_.optional()),metadata:r.record(r.string(),r.string()).optional(),webhook:I_,triggers:r.list(T_).optional(),projectId:r.property("project_id",r.string().optional())});});var Jl,aX=n(()=>{b();pe();Jl=r.object({results:r.list(L).optional()});});var U_,N_=n(()=>{b();U_=r.object({username:r.string().optional(),status:r.number().optional()});});var F_,B_=n(()=>{b();F_=r.enum_(["trace","thread"]);});var M_,W_=n(()=>{b();gc();N_();B_();Gr();M_=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:F_,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:ji.optional(),reviewers:r.list(U_).optional(),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),itemsCount:r.property("items_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var L_,V_=n(()=>{b();L_=r.enum_([">","<","="]);});var J_,H_=n(()=>{b();V_();J_=r.object({scoreName:r.property("score_name",r.string()),operator:L_,value:r.number()});});var G_,O_=n(()=>{b();H_();G_=r.object({conditions:r.list(J_)});});var K_,$_=n(()=>{b();O_();K_=r.object({groups:r.list(G_)});});var Q_,Y_=n(()=>{b();$_();Q_=r.object({enabled:r.boolean().optional(),conditions:K_.optional(),maxItemsInQueue:r.property("max_items_in_queue",r.number().optional())});});var Sie,nX=n(()=>{b();W_();Sie=r.object({annotationQueues:r.property("annotation_queues",r.list(M_))});});var Hl,sX=n(()=>{b();Hl=r.object({ids:r.list(r.string())});});var X_,Z_=n(()=>{b();X_=r.enum_(["manual","automated"]);});var q_,ek=n(()=>{b();Z_();q_=r.object({id:r.string().optional(),source:X_.optional()});});var rk,pX=n(()=>{b();ek();rk=r.object({content:r.list(q_).optional()});});var tk,ok=n(()=>{b();tk=r.enum_(["trace","thread"]);});var ik,ak=n(()=>{b();ik=r.object({username:r.string().optional(),status:r.number().optional()});});var Or,vn=n(()=>{b();Or=r.object({name:r.string(),value:r.number()});});var Tn,nk=n(()=>{b();Y_();ok();ak();vn();Tn=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:tk,commentsEnabled:r.property("comments_enabled",r.boolean().optional()),feedbackDefinitionNames:r.property("feedback_definition_names",r.list(r.string()).optional()),annotatorsPerItem:r.property("annotators_per_item",r.number().optional()),lockTimeoutSeconds:r.property("lock_timeout_seconds",r.number().optional()),automation:Q_.optional(),reviewers:r.list(ik).optional(),feedbackScores:r.property("feedback_scores",r.list(Or).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 sk,cX=n(()=>{b();nk();sk=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Tn).optional(),sortableBy:r.list(r.string()).optional()});});var pk,ck=n(()=>{b();pk=r.object({value:r.string().optional(),passed:r.boolean().optional(),reason:r.string().optional()});});var lk,mk=n(()=>{b();lk=r.object({name:r.string(),value:r.number()});});var dk,uk=n(()=>{b();dk=r.object({name:r.string(),value:r.number()});});var gk,fk=n(()=>{b();gk=r.enum_(["system","user","assistant","tool","function"]);});var hk,yk=n(()=>{b();hk=r.enum_(["function"]);});var jn,Gl=n(()=>{b();lo();yk();jn=r.object({id:r.string().optional(),index:r.number().optional(),type:hk.optional(),function:wr.optional()});});var bk,Rk=n(()=>{b();fk();lo();Gl();bk=r.object({role:gk.optional(),content:r.string().optional(),reasoningContent:r.string().optional(),name:r.string().optional(),toolCalls:r.list(jn).optional(),refusal:r.string().optional(),functionCall:wr.optional()});});var xk,wk=n(()=>{b();xk=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 _k,lX=n(()=>{b();wk();_k=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(xk).optional(),sortableBy:r.list(r.string()).optional()});});var kk,Ak=n(()=>{b();kk=r.object({url:r.string()});});var Pk,zk=n(()=>{b();Pk=r.object({url:r.string()});});var Sk,vk=n(()=>{b();Sk=r.object({url:r.string()});});var Tk,mX=n(()=>{b();Tk=r.record(r.string(),r.unknown());});var jk,dX=n(()=>{b();jk=r.object({issuer:r.string().optional(),authorizationEndpoint:r.property("authorization_endpoint",r.string().optional()),tokenEndpoint:r.property("token_endpoint",r.string().optional()),revocationEndpoint:r.property("revocation_endpoint",r.string().optional()),registrationEndpoint:r.property("registration_endpoint",r.string().optional()),responseTypesSupported:r.property("response_types_supported",r.list(r.string()).optional()),grantTypesSupported:r.property("grant_types_supported",r.list(r.string()).optional()),codeChallengeMethodsSupported:r.property("code_challenge_methods_supported",r.list(r.string()).optional()),tokenEndpointAuthMethodsSupported:r.property("token_endpoint_auth_methods_supported",r.list(r.string()).optional())});});var Ek,Ck=n(()=>{b();Ek=r.object({id:r.string().optional(),name:r.string().optional(),isDefault:r.property("is_default",r.boolean().optional())});});var Ik,uX=n(()=>{b();Ck();Ik=r.object({clientName:r.property("client_name",r.string().optional()),clientLogoUri:r.property("client_logo_uri",r.string().optional()),workspaces:r.list(Ek).optional(),csrfToken:r.property("csrf_token",r.string().optional())});});var Dk,Uk=n(()=>{b();Dk=r.enum_(["evaluator","annotation_queue_router"]);});var Nk,Fk=n(()=>{b();Nk=r.object({url:r.string(),detail:r.string().optional()});});var Bk,Mk=n(()=>{b();Bk=r.object({url:r.string()});});var Wk,Lk=n(()=>{b();Ak();Fk();Mk();Wk=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",Nk.optional()),videoUrl:r.property("video_url",Bk.optional()),audioUrl:r.property("audio_url",kk.optional())});});var Vk,Jk=n(()=>{b();Vk=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var zt,En=n(()=>{b();Lk();Jk();zt=r.object({role:Vk,content:r.string().optional(),contentArray:r.property("content_array",r.list(Wk).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var St,Cn=n(()=>{b();pe();St=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",L.optional())});});var Hk,Gk=n(()=>{b();Hk=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var vt,In=n(()=>{b();Gk();vt=r.object({name:r.string(),type:Hk,description:r.string()});});var Dn,Ol=n(()=>{b();En();Cn();In();Dn=r.object({model:St,messages:r.list(zt),variables:r.record(r.string(),r.string()),schema:r.list(vt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Ok,Kk=n(()=>{b();Ok=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Sr,_o=n(()=>{b();Kk();Sr=r.object({field:r.string().optional(),operator:Ok.optional(),key:r.string().optional(),value:r.string().optional()});});var $k,Qk=n(()=>{b();Ol();_o();$k=r.object({filters:r.list(Sr).optional(),code:Dn.optional()});});var Un,Kl=n(()=>{b();En();Cn();In();Un=r.object({model:St,messages:r.list(zt),variables:r.record(r.string(),r.string()),schema:r.list(vt)});});var Yk,Xk=n(()=>{b();At();Kl();Yk=r.object({filters:r.list(tr).optional(),code:Un.optional()});});var Nn,$l=n(()=>{b();Nn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zk,qk=n(()=>{b();At();$l();Zk=r.object({filters:r.list(tr).optional(),code:Nn.optional()});});var Fn,Ql=n(()=>{b();En();Cn();In();Fn=r.object({model:St,messages:r.list(zt),schema:r.list(vt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var eA,rA=n(()=>{b();kt();Ql();eA=r.object({filters:r.list(rr).optional(),code:Fn.optional()});});var Bn,Yl=n(()=>{b();Bn=r.object({metric:r.string()});});var tA,oA=n(()=>{b();kt();Yl();tA=r.object({filters:r.list(rr).optional(),code:Bn.optional()});});var iA,aA=n(()=>{b();iA=r.enum_(["production","experiment","both"]);});var Mn,Xl=n(()=>{b();Mn=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var nA,sA=n(()=>{b();_o();Xl();nA=r.object({filters:r.list(Sr).optional(),code:Mn.optional()});});var pA,cA=n(()=>{b();pA=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var ko,vie,gX=n(()=>{b();Uk();Qk();Xk();qk();rA();oA();aA();sA();cA();ko=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(pA).optional(),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",iA.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:Dk}),vie=r.union("type",{llm_as_judge:$k.extend(ko),user_defined_metric_python:nA.extend(ko),trace_thread_llm_as_judge:eA.extend(ko),trace_thread_user_defined_metric_python:tA.extend(ko),span_llm_as_judge:Yk.extend(ko),span_user_defined_metric_python:Zk.extend(ko)}).transform({transform:p=>p,untransform:p=>p});});var lA,mA=n(()=>{b();lA=r.object({url:r.string(),detail:r.string().optional()});});var dA,uA=n(()=>{b();dA=r.object({url:r.string()});});var gA,fA=n(()=>{b();zk();mA();uA();gA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",lA.optional()),videoUrl:r.property("video_url",dA.optional()),audioUrl:r.property("audio_url",Pk.optional())});});var hA,yA=n(()=>{b();hA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Tt,Wn=n(()=>{b();fA();yA();Tt=r.object({role:hA,content:r.string().optional(),contentArray:r.property("content_array",r.list(gA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var _e,gr=n(()=>{b();_e=r.record(r.string(),r.unknown());});var jt,Ln=n(()=>{b();gr();jt=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",_e.optional())});});var bA,RA=n(()=>{b();bA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Et,Vn=n(()=>{b();RA();Et=r.object({name:r.string(),type:bA,description:r.string()});});var xA,wA=n(()=>{b();Wn();Ln();Vn();xA=r.object({model:jt,messages:r.list(Tt),variables:r.record(r.string(),r.string()),schema:r.list(Et),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Jn,Zl=n(()=>{b();wA();Ro();Jn=r.object({filters:r.list(Pr).optional(),code:xA.optional()});});var _A,kA=n(()=>{b();_A=r.object({url:r.string(),detail:r.string().optional()});});var AA,PA=n(()=>{b();AA=r.object({url:r.string()});});var zA,SA=n(()=>{b();vk();kA();PA();zA=r.object({type:r.string(),text:r.string().optional(),imageUrl:r.property("image_url",_A.optional()),videoUrl:r.property("video_url",AA.optional()),audioUrl:r.property("audio_url",Sk.optional())});});var vA,TA=n(()=>{b();vA=r.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Ct,Hn=n(()=>{b();SA();TA();Ct=r.object({role:vA,content:r.string().optional(),contentArray:r.property("content_array",r.list(zA).optional()),stringContent:r.property("string_content",r.boolean().optional()),structuredContent:r.property("structured_content",r.boolean().optional())});});var It,Gn=n(()=>{b();kr();It=r.object({name:r.string(),temperature:r.number().optional(),seed:r.number().optional(),customParameters:r.property("custom_parameters",Se.optional())});});var jA,EA=n(()=>{b();jA=r.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Dt,On=n(()=>{b();EA();Dt=r.object({name:r.string(),type:jA,description:r.string()});});var CA,IA=n(()=>{b();Hn();Gn();On();CA=r.object({model:It,messages:r.list(Ct),variables:r.record(r.string(),r.string()),schema:r.list(Dt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var DA,UA=n(()=>{b();DA=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Kn,ql=n(()=>{b();UA();Kn=r.object({field:r.string().optional(),operator:DA.optional(),key:r.string().optional(),value:r.string().optional()});});var NA,FA=n(()=>{b();IA();ql();NA=r.object({filters:r.list(Kn).optional(),code:CA.optional()});});var BA,MA=n(()=>{b();BA=r.enum_(["evaluator","annotation_queue_router"]);});var WA,LA=n(()=>{b();WA=r.enum_(["production","experiment","both"]);});var VA,JA=n(()=>{b();Wn();Ln();Vn();VA=r.object({model:jt,messages:r.list(Tt),variables:r.record(r.string(),r.string()),schema:r.list(Et)});});var $n,em=n(()=>{b();bo();JA();$n=r.object({filters:r.list(Ar).optional(),code:VA.optional()});});var HA,GA=n(()=>{b();HA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Qn,rm=n(()=>{b();bo();GA();Qn=r.object({filters:r.list(Ar).optional(),code:HA.optional()});});var OA,KA=n(()=>{b();Wn();Ln();Vn();OA=r.object({model:jt,messages:r.list(Tt),schema:r.list(Et),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var Yn,tm=n(()=>{b();Ta();KA();Yn=r.object({filters:r.list(Rt).optional(),code:OA.optional()});});var $A,QA=n(()=>{b();$A=r.object({metric:r.string()});});var Xn,om=n(()=>{b();Ta();QA();Xn=r.object({filters:r.list(Rt).optional(),code:$A.optional()});});var YA,XA=n(()=>{b();YA=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var Zn,im=n(()=>{b();Ro();XA();Zn=r.object({filters:r.list(Pr).optional(),code:YA.optional()});});var qn,am=n(()=>{b();qn=r.object({projectId:r.property("project_id",r.string()),projectName:r.property("project_name",r.string())});});var Ao,ZA,qA=n(()=>{b();Zl();MA();LA();em();rm();tm();om();im();am();Ao=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(qn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",WA.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:BA}),ZA=r.union("type",{llm_as_judge:Jn.extend(Ao),user_defined_metric_python:Zn.extend(Ao),trace_thread_llm_as_judge:Yn.extend(Ao),trace_thread_user_defined_metric_python:Xn.extend(Ao),span_llm_as_judge:$n.extend(Ao),span_user_defined_metric_python:Qn.extend(Ao)}).transform({transform:p=>p,untransform:p=>p});});var eP,fX=n(()=>{b();qA();eP=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(ZA).optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var rP,tP=n(()=>{b();rP=r.enum_(["evaluator","annotation_queue_router"]);});var oP,iP=n(()=>{b();oP=r.enum_(["production","experiment","both"]);});var Po,aP,hX=n(()=>{b();Zl();tP();iP();em();rm();tm();om();im();am();Po=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),projects:r.list(qn).optional(),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",oP.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),action:rP}),aP=r.union("type",{llm_as_judge:Jn.extend(Po),user_defined_metric_python:Zn.extend(Po),trace_thread_llm_as_judge:Yn.extend(Po),trace_thread_user_defined_metric_python:Xn.extend(Po),span_llm_as_judge:$n.extend(Po),span_user_defined_metric_python:Qn.extend(Po)}).transform({transform:p=>p,untransform:p=>p});});var nP,sP=n(()=>{b();nP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var es,nm=n(()=>{b();sP();es=r.object({field:r.string().optional(),operator:nP.optional(),key:r.string().optional(),value:r.string().optional()});});var pP,cP=n(()=>{b();Hn();Gn();On();pP=r.object({model:It,messages:r.list(Ct),variables:r.record(r.string(),r.string()),schema:r.list(Dt)});});var lP,mP=n(()=>{b();nm();cP();lP=r.object({filters:r.list(es).optional(),code:pP.optional()});});var dP,uP=n(()=>{b();dP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var gP,fP=n(()=>{b();nm();uP();gP=r.object({filters:r.list(es).optional(),code:dP.optional()});});var hP,yP=n(()=>{b();hP=r.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var rs,sm=n(()=>{b();yP();rs=r.object({field:r.string().optional(),operator:hP.optional(),key:r.string().optional(),value:r.string().optional()});});var bP,RP=n(()=>{b();Hn();Gn();On();bP=r.object({model:It,messages:r.list(Ct),schema:r.list(Dt),maxCostUsd:r.property("max_cost_usd",r.number().optional())});});var xP,wP=n(()=>{b();sm();RP();xP=r.object({filters:r.list(rs).optional(),code:bP.optional()});});var _P,kP=n(()=>{b();_P=r.object({metric:r.string()});});var AP,PP=n(()=>{b();sm();kP();AP=r.object({filters:r.list(rs).optional(),code:_P.optional()});});var zP,SP=n(()=>{b();zP=r.enum_(["evaluator","annotation_queue_router"]);});var vP,TP=n(()=>{b();Ol();_o();vP=r.object({filters:r.list(Sr).optional(),code:Dn.optional()});});var jP,EP=n(()=>{b();At();Kl();jP=r.object({filters:r.list(tr).optional(),code:Un.optional()});});var CP,IP=n(()=>{b();At();$l();CP=r.object({filters:r.list(tr).optional(),code:Nn.optional()});});var DP,UP=n(()=>{b();kt();Ql();DP=r.object({filters:r.list(rr).optional(),code:Fn.optional()});});var NP,FP=n(()=>{b();kt();Yl();NP=r.object({filters:r.list(rr).optional(),code:Bn.optional()});});var BP,MP=n(()=>{b();BP=r.enum_(["production","experiment","both"]);});var WP,LP=n(()=>{b();_o();Xl();WP=r.object({filters:r.list(Sr).optional(),code:Mn.optional()});});var zo,VP,yX=n(()=>{b();SP();TP();EP();IP();UP();FP();MP();LP();zo=r.object({name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",BP.optional()),projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),action:zP}),VP=r.union("type",{llm_as_judge:vP.extend(zo),user_defined_metric_python:WP.extend(zo),trace_thread_llm_as_judge:DP.extend(zo),trace_thread_user_defined_metric_python:NP.extend(zo),span_llm_as_judge:jP.extend(zo),span_user_defined_metric_python:CP.extend(zo)}).transform({transform:p=>p,untransform:p=>p});});var JP,HP=n(()=>{b();JP=r.object({metric:r.string(),arguments:r.record(r.string(),r.string())});});var GP,OP=n(()=>{b();ql();HP();GP=r.object({filters:r.list(Kn).optional(),code:JP.optional()});});var KP,$P=n(()=>{b();KP=r.enum_(["evaluator","annotation_queue_router"]);});var QP,YP=n(()=>{b();QP=r.enum_(["production","experiment","both"]);});var So,XP,bX=n(()=>{b();FA();mP();fP();wP();PP();OP();$P();YP();So=r.object({projectId:r.property("project_id",r.string().optional()),projectIds:r.property("project_ids",r.list(r.string()).optional()),name:r.string(),samplingRate:r.property("sampling_rate",r.number().optional()),enabled:r.boolean().optional(),triggerScope:r.property("trigger_scope",QP.optional()),action:KP}),XP=r.union("type",{llm_as_judge:NA.extend(So),user_defined_metric_python:GP.extend(So),trace_thread_llm_as_judge:xP.extend(So),trace_thread_user_defined_metric_python:AP.extend(So),span_llm_as_judge:lP.extend(So),span_user_defined_metric_python:gP.extend(So)}).transform({transform:p=>p,untransform:p=>p});});var ZP,qP=n(()=>{b();ZP=r.object({value:r.number().optional()});});var de,RX=n(()=>{b();de=r.object({ids:r.list(r.string())});});var ez,rz=n(()=>{b();ez=r.object({workspaceId:r.property("workspace_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var vo,xX=n(()=>{b();rz();vo=r.object({biInformation:r.property("bi_information",r.list(ez).optional())});});var tz,wX=n(()=>{b();Rw();tz=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(bw).optional()});});var oz,iz=n(()=>{b();oz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var az,nz=n(()=>{b();iz();az=r.object({details:oz.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 sz,pz=n(()=>{b();sz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var cz,lz=n(()=>{b();pz();cz=r.object({details:sz.optional()});});var mz,dz=n(()=>{b();mz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var ts,pm=n(()=>{b();dz();ts=r.object({details:mz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var uz,gz=n(()=>{b();uz=r.object({trueLabel:r.string(),falseLabel:r.string()});});var fz,hz=n(()=>{b();gz();fz=r.object({details:uz.optional()});});var yz,bz=n(()=>{b();yz=r.enum_(["pending","picked_up","completed","failed","timed_out"]);});var Rz,xz=n(()=>{b();Rz=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var wz,_X=n(()=>{b();bz();xz();pe();wz=r.object({commandId:r.property("command_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional()),type:Rz.optional(),status:yz.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 _z,kz=n(()=>{b();_z=r.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var Az,Pz=n(()=>{b();kz();pe();Az=r.object({commandId:r.property("command_id",r.string().optional()),type:_z.optional(),args:L.optional(),timeoutSeconds:r.property("timeout_seconds",r.number().optional()),submittedAt:r.property("submitted_at",r.date().optional())});});var zz,kX=n(()=>{b();Pz();zz=r.object({commands:r.list(Az).optional()});});var Sz,AX=n(()=>{b();Sz=r.object({commandId:r.property("command_id",r.string().optional())});});var vz,Tz=n(()=>{b();vz=r.object({categories:r.record(r.string(),r.number())});});var jz,Ez=n(()=>{b();Tz();jz=r.object({details:vz.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 Cz,Iz=n(()=>{b();Cz=r.object({categories:r.record(r.string(),r.number())});});var Dz,Uz=n(()=>{b();Iz();Dz=r.object({details:Cz.optional()});});var Nz,Fz=n(()=>{b();Nz=r.object({categories:r.record(r.string(),r.number())});});var os,cm=n(()=>{b();Fz();os=r.object({details:Nz.optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Bz,Mz=n(()=>{b();Bz=r.object({categories:r.record(r.string(),r.number())});});var Wz,Lz=n(()=>{b();Mz();Wz=r.object({details:Bz.optional()});});var Vz,Jz=n(()=>{b();lo();Gl();Vz=r.object({role:r.string().optional(),content:r.string().optional(),reasoningContent:r.string().optional(),toolCalls:r.list(jn).optional(),functionCall:wr.optional()});});var Hz,Gz=n(()=>{b();Hz=r.object({token:r.string().optional(),logprob:r.number().optional(),bytes:r.list(r.number()).optional()});});var Oz,Kz=n(()=>{b();Gz();Oz=r.object({content:r.list(Hz).optional()});});var $z,Qz=n(()=>{b();Rk();Jz();Kz();$z=r.object({index:r.number().optional(),message:bk.optional(),delta:Vz.optional(),finishReason:r.string().optional(),logprobs:Oz.optional()});});var Yz,Xz=n(()=>{b();Yz=r.object({reasoningTokens:r.number().optional()});});var Zz,qz=n(()=>{b();Zz=r.object({cachedTokens:r.number().optional()});});var eS,rS=n(()=>{b();Xz();qz();eS=r.object({totalTokens:r.number().optional(),promptTokens:r.number().optional(),promptTokensDetails:Zz.optional(),completionTokens:r.number().optional(),completionTokensDetails:Yz.optional()});});var tS,PX=n(()=>{b();Qz();rS();tS=r.object({id:r.string().optional(),created:r.number().optional(),model:r.string().optional(),choices:r.list($z).optional(),usage:eS.optional(),systemFingerprint:r.string().optional(),serviceTier:r.string().optional()});});var oS,iS=n(()=>{b();oS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var aS,nS=n(()=>{b();aS=r.enum_(["passed","failed"]);});var sS,pS=n(()=>{b();iS();nS();sS=r.object({name:oS.optional(),result:aS.optional()});});var cS,lS=n(()=>{b();cS=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var mS,dS=n(()=>{b();mS=r.enum_(["passed","failed"]);});var uS,gS=n(()=>{b();lS();dS();uS=r.object({name:cS.optional(),result:mS.optional()});});var fS,hS=n(()=>{b();fS=r.object({typeName:r.string().optional()});});var Tie,zX=n(()=>{b();hS();Tie=r.object({type:fS.optional(),closed:r.boolean().optional()});});var yS,bS=n(()=>{b();yS=r.object({typeName:r.string().optional()});});var jie,SX=n(()=>{b();bS();jie=r.object({type:yS.optional(),closed:r.boolean().optional()});});var RS,vX=n(()=>{b();RS=r.object({clientId:r.property("client_id",r.string().optional()),clientIdIssuedAt:r.property("client_id_issued_at",r.number().optional()),clientName:r.property("client_name",r.string().optional()),logoUri:r.property("logo_uri",r.string().optional()),softwareId:r.property("software_id",r.string().optional()),softwareVersion:r.property("software_version",r.string().optional()),clientUri:r.property("client_uri",r.string().optional()),redirectUris:r.property("redirect_uris",r.list(r.string()).optional()),tokenEndpointAuthMethod:r.property("token_endpoint_auth_method",r.string().optional()),grantTypes:r.property("grant_types",r.list(r.string()).optional()),responseTypes:r.property("response_types",r.list(r.string()).optional())});});var xS,wS=n(()=>{b();xS=r.enum_(["string","number","object","boolean","array","null"]);});var _S,kS=n(()=>{b();wS();_S=r.object({name:r.string().optional(),types:r.list(xS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var AS,PS=n(()=>{b();AS=r.enum_(["string","number","object","boolean","array","null"]);});var zS,SS=n(()=>{b();PS();zS=r.object({name:r.string().optional(),types:r.list(AS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var vS,TS=n(()=>{b();vS=r.enum_(["string","number","object","boolean","array","null"]);});var jS,ES=n(()=>{b();TS();jS=r.object({name:r.string().optional(),types:r.list(vS).optional(),filterFieldPrefix:r.property("filter_field_prefix",r.string().optional()),filterField:r.string().optional()});});var CS,IS=n(()=>{b();CS=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Ut,is=n(()=>{b();Ut=r.object({id:r.string().optional(),text:r.string(),sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var DS,US=n(()=>{b();DS=r.enum_(["trace","span"]);});var NS,FS=n(()=>{b();NS=r.object({eTag:r.property("e_tag",r.string()),partNumber:r.property("part_number",r.number())});});var lm,TX=n(()=>{b();US();FS();lm=r.object({fileName:r.property("file_name",r.string()),projectName:r.property("project_name",r.string().optional()),entityType:r.property("entity_type",DS),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(NS))});});var BS,jX=n(()=>{b();BS=r.object({redirectTo:r.property("redirect_to",r.string().optional())});});var MS,WS=n(()=>{b();MS=r.object({value:r.number().optional()});});var LS,EX=n(()=>{b();LS=r.object({sessionId:r.property("session_id",r.string().optional()),runnerId:r.property("runner_id",r.string().optional())});});var VS,JS=n(()=>{b();VS=r.object({key:r.string(),value:r.string().optional(),secret:r.boolean().optional()});});var HS,GS=n(()=>{b();HS=r.enum_(["workspace","insights"]);});var OS,KS=n(()=>{b();OS=r.enum_(["multi_project","experiments"]);});var or,$S=n(()=>{b();GS();KS();gr();or=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string(),slug:r.string().optional(),type:OS.optional(),scope:HS.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 Nt,CX=n(()=>{b();$S();Nt=r.object({content:r.list(or).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.property("sortable_by",r.list(r.string()).optional())});});var QS,YS=n(()=>{b();QS=r.enum_(["multi_project","experiments"]);});var as,IX=n(()=>{b();YS();gr();as=r.object({name:r.string().optional(),type:QS.optional(),description:r.string().optional(),config:_e.optional()});});var XS,ZS=n(()=>{b();XS=r.enum_(["multi_project","experiments"]);});var ns,DX=n(()=>{b();ZS();kr();ns=r.object({projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string(),type:XS.optional(),description:r.string().optional(),config:Se});});var Eie,UX=n(()=>{b();Eie=r.object({time:r.date(),value:r.number().optional()});});var qS,ev=n(()=>{b();qS=r.object({time:r.date(),value:r.number().optional()});});var rv,tv=n(()=>{b();rv=r.enum_(["unknown","processing","completed","failed"]);});var ov,iv=n(()=>{b();ov=r.enum_(["dataset","evaluation_suite"]);});var ss,mm=n(()=>{b();ss=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 av,nv=n(()=>{b();av=r.enum_(["private","public"]);});var Cie,NX=n(()=>{b();tv();iv();mm();nv();Cie=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:ov.optional(),visibility:av.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:rv.optional(),latestVersion:r.property("latest_version",ss.optional())});});var Iie,FX=n(()=>{b();Iie=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 sv,pv=n(()=>{b();sv=r.enum_(["manual","trace","span","sdk"]);});var cv,lv=n(()=>{b();cv=r.enum_(["passed","failed"]);});var mv,dv=n(()=>{b();lv();mv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:cv.optional()});});var ps,dm=n(()=>{b();pv();mo();ft();Uc();dv();pe();ps=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:sv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(_r).optional(),executionPolicy:r.property("execution_policy",qe.optional()),experimentItems:r.property("experiment_items",r.list(ma).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),mv).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 uv,BX=n(()=>{b();dm();uv=r.object({generatedSamples:r.property("generated_samples",r.list(ps).optional()),model:r.string().optional(),totalGenerated:r.property("total_generated",r.number().optional()),generationTime:r.property("generation_time",r.date().optional())});});var Die,MX=n(()=>{b();dm();Die=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(ps),batchGroupId:r.property("batch_group_id",r.string().optional()),copyFromDatasetId:r.property("copy_from_dataset_id",r.string().optional()),copyFromVersionId:r.property("copy_from_version_id",r.string().optional())});});var gv,WX=n(()=>{b();gv=r.record(r.string(),r.unknown());});var fv,hv=n(()=>{b();fv=r.enum_(["manual","trace","span","sdk"]);});var yv,bv=n(()=>{b();yv=r.enum_(["llm_judge","code_metric"]);});var Rv,xv=n(()=>{b();Rv=r.record(r.string(),r.unknown());});var wv,_v=n(()=>{b();bv();xv();wv=r.object({name:r.string(),type:yv,config:Rv});});var cs,um=n(()=>{b();cs=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var kv,Av=n(()=>{b();kv=r.enum_(["passed","failed"]);});var Pv,zv=n(()=>{b();Pv=r.enum_(["default","hidden"]);});var Sv,vv=n(()=>{b();Sv=r.enum_(["ui","sdk","online_scoring"]);});var Tv,jv=n(()=>{b();Tv=r.enum_(["ui","sdk","online_scoring"]);});var Ev,Cv=n(()=>{b();jv();Ev=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Tv.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Iv,Dv=n(()=>{b();vv();Cv();Iv=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Sv,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Ev).optional())});});var ls,Uv=n(()=>{b();ls=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var Nv,Fv=n(()=>{b();ck();IS();um();Av();zv();Dv();Uv();Nv=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:ls.optional(),output:ls.optional(),traceMetadata:r.property("trace_metadata",ls.optional()),feedbackScores:r.property("feedback_scores",r.list(Iv).optional()),comments:r.list(CS).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",Pv.optional()),description:r.string().optional(),executionPolicy:r.property("execution_policy",cs.optional()),assertionResults:r.property("assertion_results",r.list(pk).optional()),status:kv.optional()});});var Bv,Mv=n(()=>{b();Bv=r.enum_(["passed","failed"]);});var Wv,Lv=n(()=>{b();Mv();Wv=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Bv.optional()});});var Vv,Jv=n(()=>{b();hv();_v();um();Fv();Lv();pe();Vv=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:fv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(wv).optional(),executionPolicy:r.property("execution_policy",cs.optional()),experimentItems:r.property("experiment_items",r.list(Nv).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),Wv).optional()),datasetId:r.property("dataset_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var Hv,LX=n(()=>{b();SS();Jv();Hv=r.object({content:r.list(Vv).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(zS).optional(),sortableBy:r.list(r.string()).optional()});});var Gv,Ov=n(()=>{b();Gv=r.enum_(["manual","trace","span","sdk"]);});var Kv,$v=n(()=>{b();Kv=r.enum_(["llm_judge","code_metric"]);});var ms,gm=n(()=>{b();$v();gr();ms=r.object({name:r.string(),type:Kv,config:_e});});var ds,fm=n(()=>{b();ds=r.object({runsPerItem:r.property("runs_per_item",r.number().optional()),passThreshold:r.property("pass_threshold",r.number().optional())});});var Qv,Yv=n(()=>{b();Qv=r.enum_(["default","hidden"]);});var us,Xv=n(()=>{b();Yv();us=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",Qv.optional())});});var Zv,qv=n(()=>{b();Zv=r.enum_(["passed","failed"]);});var eT,rT=n(()=>{b();qv();eT=r.object({passedRuns:r.property("passed_runs",r.number().optional()),totalRuns:r.property("total_runs",r.number().optional()),status:Zv.optional()});});var gs,tT=n(()=>{b();Ov();gm();fm();Xv();rT();pe();gs=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:Gv,data:L,description:r.string().optional(),tags:r.list(r.string()).optional(),evaluators:r.list(ms).optional(),executionPolicy:r.property("execution_policy",ds.optional()),experimentItems:r.property("experiment_items",r.list(us).optional()),runSummariesByExperiment:r.property("run_summaries_by_experiment",r.record(r.string(),eT).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 oT,VX=n(()=>{b();ES();tT();oT=r.object({content:r.list(gs).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),columns:r.list(jS).optional(),sortableBy:r.list(r.string()).optional()});});var iT,aT=n(()=>{b();iT=r.enum_(["unknown","processing","completed","failed"]);});var nT,sT=n(()=>{b();nT=r.enum_(["dataset","evaluation_suite"]);});var pT,cT=n(()=>{b();pT=r.enum_(["private","public"]);});var fs,hm=n(()=>{b();fs=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 To,lT=n(()=>{b();aT();sT();cT();hm();To=r.object({id:r.string().optional(),name:r.string(),projectId:r.property("project_id",r.string().optional()),type:nT.optional(),visibility:pT.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:iT.optional(),latestVersion:r.property("latest_version",fs.optional())});});var hs,JX=n(()=>{b();lT();hs=r.object({content:r.list(To).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),sortableBy:r.list(r.string()).optional()});});var mT,dT=n(()=>{b();mT=r.object({itemsAdded:r.number().optional(),itemsModified:r.number().optional(),itemsDeleted:r.number().optional(),itemsUnchanged:r.number().optional()});});var uT,HX=n(()=>{b();dT();uT=r.object({fromVersion:r.property("from_version",r.string().optional()),toVersion:r.property("to_version",r.string().optional()),statistics:mT.optional()});});var Kr,gT=n(()=>{b();gm();fm();Kr=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(ms).optional(),executionPolicy:r.property("execution_policy",ds.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 fT,GX=n(()=>{b();gT();fT=r.object({content:r.list(Kr).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var hT,yT=n(()=>{b();hT=r.enum_(["trace","span"]);});var Uie,OX=n(()=>{b();yT();Uie=r.object({fileNames:r.property("file_names",r.list(r.string())),entityType:r.property("entity_type",hT),entityId:r.property("entity_id",r.string()),containerId:r.property("container_id",r.string())});});var ys,KX=n(()=>{b();ys=r.object({name:r.string(),author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional())});});var jo,$X=n(()=>{b();jo=r.object({ids:r.list(r.string())});});var Nie,QX=n(()=>{b();Nie=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 bs,bT=n(()=>{b();bs=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 RT,YX=n(()=>{b();bT();RT=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(bs).optional(),sortableBy:r.list(r.string()).optional()});});var Rs,ym=n(()=>{b();Rs=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var xT,wT=n(()=>{b();xT=r.object({count:r.number().optional(),deviation:r.number().optional(),deviationPercentage:r.property("deviation_percentage",r.number().optional())});});var Ft,xs=n(()=>{b();Ft=r.object({exceptionType:r.property("exception_type",r.string()),message:r.string().optional(),traceback:r.string()});});var Eo,XX=n(()=>{b();Eo=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Fie,ZX=n(()=>{b();Fie=r.object({errors:r.list(r.string()).optional()});});var Bie,qX=n(()=>{b();Bie=r.object({errors:r.list(r.string()).optional()});});var Mie,e5=n(()=>{b();Mie=r.object({errors:r.list(r.string()).optional()});});var Wie,r5=n(()=>{b();Wie=r.object({code:r.number().optional(),message:r.string().optional(),details:r.string().optional()});});var Lie,t5=n(()=>{b();Lie=r.object({errors:r.list(r.string()).optional()});});var ws,o5=n(()=>{b();ws=r.object({exists:r.boolean().optional()});});var _T,kT=n(()=>{b();_T=r.enum_(["dataset","evaluation_suite"]);});var AT,PT=n(()=>{b();AT=r.enum_(["running","completed","cancelled"]);});var zT,ST=n(()=>{b();zT=r.enum_(["regular","trial","mini-batch","mutation"]);});var Vie,i5=n(()=>{b();mk();ht();mm();kT();Ic();PT();ST();Gr();Ye();wo();aa();Vie=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:zT.optional(),evaluationMethod:r.property("evaluation_method",_T.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),comments:r.list(ge).optional(),traceCount:r.property("trace_count",r.number().optional()),datasetItemCount:r.property("dataset_item_count",r.number().optional()),createdAt:r.property("created_at",r.date().optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostAvg:r.property("total_estimated_cost_avg",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),status:AT.optional(),experimentScores:r.property("experiment_scores",r.list(ta).optional()),promptVersion:r.property("prompt_version",Jr.optional()),promptVersions:r.property("prompt_versions",r.list(Jr).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",ss.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(lk).optional())});});var vT,TT=n(()=>{b();vT=r.object({experimentId:r.property("experiment_id",r.string().optional()),promptIndex:r.property("prompt_index",r.number().optional())});});var jT,a5=n(()=>{b();TT();jT=r.object({experiments:r.list(vT).optional(),totalItems:r.property("total_items",r.number().optional())});});var ET,CT=n(()=>{b();Xw();ET=r.object({label:r.string().optional(),aggregations:Yw.optional()});});var IT,n5=n(()=>{b();CT();IT=r.object({content:r.record(r.string(),ET).optional()});});var DT,UT=n(()=>{b();DT=r.object({label:r.string().optional()});});var NT,FT=n(()=>{b();NT=r.object({groupSorting:r.property("group_sorting",r.list(r.string()).optional())});});var BT,MT=n(()=>{b();FT();BT=r.object({groupsDetails:r.property("groups_details",r.list(NT).optional())});});var WT,s5=n(()=>{b();UT();MT();WT=r.object({content:r.record(r.string(),DT).optional(),details:BT.optional()});});var LT,VT=n(()=>{b();LT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var JT,HT=n(()=>{b();JT=r.enum_(["general","tool","llm","guardrail"]);});var _s,bm=n(()=>{b();ht();Hr();yt();Ye();VT();HT();_s=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:JT.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",He.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostVersion:r.property("total_estimated_cost_version",r.string().optional()),duration:r.number().optional(),ttft:r.number().optional(),source:LT.optional(),environment:r.string().optional()});});var GT,OT=n(()=>{b();GT=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var KT,$T=n(()=>{b();pS();KT=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(sS).optional()});});var QT,YT=n(()=>{b();QT=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var XT,ZT=n(()=>{b();XT=r.enum_(["default","hidden"]);});var ks,Rm=n(()=>{b();ht();Hr();OT();yt();$T();Ye();YT();ZT();ks=r.object({id:r.string().optional(),projectName:r.property("project_name",r.string().optional()),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:le.optional(),output:le.optional(),metadata:le.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",He.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Pe).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Pe).optional()),comments:r.list(ge).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(KT).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",XT.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:GT.optional(),source:QT.optional(),environment:r.string().optional()});});var qT,ej=n(()=>{b();yt();Ye();bm();Rm();qT=r.object({datasetItemId:r.property("dataset_item_id",r.string()),evaluateTaskResult:r.property("evaluate_task_result",le.optional()),trace:ks.optional(),spans:r.list(_s).optional(),feedbackScores:r.property("feedback_scores",r.list(Pe).optional())});});var Jie,p5=n(()=>{b();ej();Jie=r.object({experimentName:r.property("experiment_name",r.string()),datasetName:r.property("dataset_name",r.string()),experimentId:r.property("experiment_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),items:r.list(qT)});});var rj,tj=n(()=>{b();rj=r.object({id:r.string(),name:r.string(),datasetId:r.property("dataset_id",r.string()),datasetItemId:r.property("dataset_item_id",r.string())});});var oj,ij=n(()=>{b();oj=r.enum_(["dataset","evaluation_suite"]);});var aj,nj=n(()=>{b();aj=r.enum_(["running","completed","cancelled"]);});var sj,pj=n(()=>{b();sj=r.enum_(["regular","trial","mini-batch","mutation"]);});var cj,lj=n(()=>{b();cj=r.object({name:r.string(),value:r.number()});});var Ge,Co=n(()=>{b();Ge=r.undiscriminatedUnion([r.record(r.string(),r.unknown()),r.list(r.record(r.string(),r.unknown())),r.string()]);});var As,xm=n(()=>{b();As=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var Ps,mj=n(()=>{b();uk();is();hm();ij();nj();pj();lj();vn();Co();xm();pl();Ps=r.object({id:r.string().optional(),datasetName:r.property("dataset_name",r.string().nullable()),datasetId:r.property("dataset_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),projectName:r.property("project_name",r.string().optional()),name:r.string().optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),type:sj.optional(),evaluationMethod:r.property("evaluation_method",oj.optional()),optimizationId:r.property("optimization_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Or).optional()),comments:r.list(Ut).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:As.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:aj.optional(),experimentScores:r.property("experiment_scores",r.list(cj).optional()),promptVersion:r.property("prompt_version",xo.optional()),promptVersions:r.property("prompt_versions",r.list(xo).optional()),datasetVersionId:r.property("dataset_version_id",r.string().optional()),datasetVersionSummary:r.property("dataset_version_summary",fs.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(dk).optional())});});var zs,c5=n(()=>{b();mj();zs=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ps).optional(),sortableBy:r.list(r.string()).optional()});});var Hie,l5=n(()=>{pe();Hie=L;});var dj,uj=n(()=>{b();dj=r.object({max:r.number(),min:r.number()});});var gj,fj=n(()=>{b();uj();gj=r.object({details:dj.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 hj,Gie,m5=n(()=>{b();nz();Ez();fj();hj=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()}),Gie=r.union("type",{numerical:gj.extend(hj),categorical:jz.extend(hj),boolean:az.extend(hj)}).transform({transform:p=>p,untransform:p=>p});});var yj,bj=n(()=>{b();yj=r.object({max:r.number(),min:r.number()});});var Rj,xj=n(()=>{b();bj();Rj=r.object({details:yj.optional()});});var wj,_j,d5=n(()=>{b();lz();Uz();xj();wj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),_j=r.union("type",{numerical:Rj.extend(wj),categorical:Dz.extend(wj),boolean:cz.extend(wj)}).transform({transform:p=>p,untransform:p=>p});});var kj,Aj=n(()=>{b();kj=r.object({max:r.number(),min:r.number()});});var Ss,wm=n(()=>{b();Aj();Ss=r.object({details:kj.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 Pj,zj,Sj=n(()=>{b();pm();cm();wm();Pj=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()}),zj=r.union("type",{numerical:Ss.extend(Pj),categorical:os.extend(Pj),boolean:ts.extend(Pj)}).transform({transform:p=>p,untransform:p=>p});});var vj,u5=n(()=>{b();Sj();vj=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(zj).optional()});});var Tj,jj,g5=n(()=>{b();pm();cm();wm();Tj=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()}),jj=r.union("type",{numerical:Ss.extend(Tj),categorical:os.extend(Tj),boolean:ts.extend(Tj)}).transform({transform:p=>p,untransform:p=>p});});var Ej,Cj=n(()=>{b();Ej=r.object({name:r.string(),value:r.number()});});var Ij,Dj=n(()=>{b();Ij=r.enum_(["ui","sdk","online_scoring"]);});var Uj,Nj=n(()=>{b();Dj();Uj=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:Ij,author:r.string().optional(),sourceQueueId:r.property("source_queue_id",r.string().optional()),id:r.string()});});var vs,f5=n(()=>{b();Nj();vs=r.object({scores:r.list(Uj)});});var Fj,Bj=n(()=>{b();Fj=r.object({name:r.string().optional(),type:r.string().optional()});});var Mj,h5=n(()=>{b();Bj();Mj=r.object({scores:r.list(Fj).optional()});});var Wj,Lj=n(()=>{b();Wj=r.object({name:r.string().optional(),type:r.string().optional()});});var $r,y5=n(()=>{b();Lj();$r=r.object({scores:r.list(Wj).optional()});});var Vj,Jj=n(()=>{b();Vj=r.enum_(["ui","sdk","online_scoring"]);});var Hj,Gj=n(()=>{b();Hj=r.enum_(["ui","sdk","online_scoring"]);});var Oj,Kj=n(()=>{b();Gj();Oj=r.object({value:r.number().optional(),reason:r.string().optional(),categoryName:r.property("category_name",r.string().optional()),source:Hj.optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),spanType:r.property("span_type",r.string().optional()),spanId:r.property("span_id",r.string().optional()),sourceQueueId:r.property("source_queue_id",r.string().optional()),author:r.string().optional()});});var Io,_m=n(()=>{b();Jj();Kj();Io=r.object({name:r.string(),categoryName:r.property("category_name",r.string().optional()),value:r.number(),reason:r.string().optional(),source:Vj,sourceQueueId:r.property("source_queue_id",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),valueByAuthor:r.property("value_by_author",r.record(r.string(),Oj).optional())});});var $j,Qj=n(()=>{b();$j=r.object({max:r.number(),min:r.number()});});var Yj,Xj=n(()=>{b();Qj();Yj=r.object({details:$j.optional()});});var Zj,qj,b5=n(()=>{b();hz();Lz();Xj();Zj=r.object({id:r.string().optional(),name:r.string(),description:r.string().optional()}),qj=r.union("type",{numerical:Yj.extend(Zj),categorical:Wz.extend(Zj),boolean:fz.extend(Zj)}).transform({transform:p=>p,untransform:p=>p});});var eE,R5=n(()=>{b();eE=r.object({reportId:r.string().optional()});});var rE,tE=n(()=>{b();rE=r.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var oE,iE=n(()=>{b();oE=r.enum_(["passed","failed"]);});var aE,nE=n(()=>{b();tE();iE();pe();aE=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:rE,result:oE,config:L,details:L});});var Oie,x5=n(()=>{b();nE();Oie=r.object({guardrails:r.list(aE)});});var sE,pE=n(()=>{b();gS();sE=r.object({spanId:r.property("span_id",r.string().optional()),checks:r.list(uS).optional()});});var Kie,w5=n(()=>{b();Kie=r.object({ids:r.list(r.string())});});var cE,lE=n(()=>{b();cE=r.object({activeLocks:r.property("active_locks",r.number().optional()),lockedBy:r.property("locked_by",r.list(r.string()).optional())});});var mE,dE=n(()=>{b();mE=r.enum_(["count","errors","avg_duration","total_cost"]);});var uE,gE=n(()=>{b();dE();uE=r.object({type:mE.optional(),currentValue:r.property("current_value",r.number().optional()),previousValue:r.property("previous_value",r.number().optional())});});var fE,_5=n(()=>{b();gE();fE=r.object({stats:r.list(uE).optional()});});var hE,yE=n(()=>{b();hE=r.enum_(["pairing","connected","disconnected"]);});var bE,RE=n(()=>{b();bE=r.enum_(["connect","endpoint"]);});var Ts,xE=n(()=>{b();mw();pe();yE();RE();Ts=r.object({id:r.string().optional(),name:r.string().optional(),projectId:r.property("project_id",r.string().optional()),status:hE.optional(),connectedAt:r.property("connected_at",r.date().optional()),agents:r.list(lw).optional(),capabilities:r.list(r.string()).optional(),checklist:L.optional(),type:bE.optional()});});var wE,k5=n(()=>{b();wE=r.object({cancelledJobIds:r.property("cancelled_job_ids",r.list(r.string()).optional())});});var _E,A5=n(()=>{b();Al();_E=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(wt).optional()});});var kE,P5=n(()=>{b();xE();kE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ts).optional()});});var AE,z5=n(()=>{b();AE=r.object({acquired:r.boolean().optional(),itemId:r.property("item_id",r.string().optional()),lockedBy:r.property("locked_by",r.string().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var PE,S5=n(()=>{b();lE();PE=r.object({locks:r.record(r.string(),cE).optional()});});var zE,SE=n(()=>{b();zE=r.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var vE,TE=n(()=>{b();SE();vE=r.object({timestamp:r.date().optional(),ruleId:r.property("rule_id",r.string().optional()),level:zE.optional(),message:r.string().optional(),markers:r.record(r.string(),r.string()).optional()});});var jE,v5=n(()=>{b();TE();jE=r.object({content:r.list(vE).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var EE,CE=n(()=>{b();EE=r.enum_(["trace","thread","span"]);});var js,T5=n(()=>{b();CE();js=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",EE)});});var Es,j5=n(()=>{b();Es=r.object({entitiesQueued:r.property("entities_queued",r.number().optional()),rulesApplied:r.property("rules_applied",r.number().optional())});});var $ie,E5=n(()=>{b();$ie=r.object({error:r.string().optional(),errorDescription:r.property("error_description",r.string().optional())});});var km,C5=n(()=>{b();km=r.object({connected:r.boolean().optional(),version:r.string().optional(),errorMessage:r.property("error_message",r.string().optional())});});var Am,I5=n(()=>{b();Am=r.object({baseUrl:r.property("base_url",r.string()),apiKey:r.property("api_key",r.string().optional())});});var IE,DE=n(()=>{b();IE=r.enum_(["pending","completed","failed"]);});var UE,NE=n(()=>{b();pe();DE();UE=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),sessionId:r.property("session_id",r.string().optional()),content:r.string().optional(),recommendedActions:r.property("recommended_actions",L.optional()),status:IE.optional(),failureReason:r.property("failure_reason",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var FE,D5=n(()=>{b();NE();FE=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(UE).optional()});});var BE,ME=n(()=>{b();BE=r.enum_(["running","completed","cancelled","initialized","error"]);});var WE,LE=n(()=>{b();pe();WE=r.object({type:r.string(),parameters:L.optional()});});var VE,JE=n(()=>{b();LE();VE=r.object({metrics:r.list(WE)});});var HE,GE=n(()=>{b();pe();HE=r.object({model:r.string(),parameters:L.optional()});});var OE,KE=n(()=>{b();pe();OE=r.object({type:r.string(),parameters:L.optional()});});var $E,QE=n(()=>{b();$E=r.object({role:r.string(),content:r.string()});});var YE,XE=n(()=>{b();QE();YE=r.object({messages:r.list($E)});});var ZE,qE=n(()=>{b();JE();GE();KE();XE();ZE=r.object({datasetName:r.property("dataset_name",r.string()),prompt:YE,llmModel:r.property("llm_model",HE),evaluation:VE,optimizer:OE});});var Qie,U5=n(()=>{b();Hr();Gr();Ye();ME();qE();Qie=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:BE,metadata:le.optional(),studioConfig:r.property("studio_config",ZE.optional()),errorInfo:r.property("error_info",He.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),experimentScores:r.property("experiment_scores",r.list(ve).optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),baselineObjectiveScore:r.property("baseline_objective_score",r.number().optional()),bestObjectiveScore:r.property("best_objective_score",r.number().optional()),baselineDuration:r.property("baseline_duration",r.number().optional()),bestDuration:r.property("best_duration",r.number().optional()),baselineCost:r.property("baseline_cost",r.number().optional()),bestCost:r.property("best_cost",r.number().optional()),totalOptimizationCost:r.property("total_optimization_cost",r.number().optional())});});var eC,rC=n(()=>{b();eC=r.enum_(["running","completed","cancelled","initialized","error"]);});var tC,oC=n(()=>{b();gr();tC=r.object({type:r.string(),parameters:_e.optional()});});var iC,aC=n(()=>{b();oC();iC=r.object({metrics:r.list(tC)});});var nC,sC=n(()=>{b();gr();nC=r.object({model:r.string(),parameters:_e.optional()});});var pC,cC=n(()=>{b();gr();pC=r.object({type:r.string(),parameters:_e.optional()});});var lC,mC=n(()=>{b();lC=r.object({role:r.string(),content:r.string()});});var dC,uC=n(()=>{b();mC();dC=r.object({messages:r.list(lC)});});var gC,fC=n(()=>{b();aC();sC();cC();uC();gC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:dC,llmModel:r.property("llm_model",nC),evaluation:iC,optimizer:pC});});var Cs,hC=n(()=>{b();xs();vn();Co();rC();fC();Cs=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:eC,metadata:Ge.optional(),studioConfig:r.property("studio_config",gC.optional()),errorInfo:r.property("error_info",Ft.optional()),datasetId:r.property("dataset_id",r.string().optional()),numTrials:r.property("num_trials",r.number().optional()),feedbackScores:r.property("feedback_scores",r.list(Or).optional()),experimentScores:r.property("experiment_scores",r.list(Or).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 Is,N5=n(()=>{b();hC();Is=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Cs).optional(),sortableBy:r.list(r.string()).optional()});});var yC,bC=n(()=>{b();kr();yC=r.object({type:r.string(),parameters:Se.optional()});});var RC,xC=n(()=>{b();bC();RC=r.object({metrics:r.list(yC)});});var wC,_C=n(()=>{b();kr();wC=r.object({model:r.string(),parameters:Se.optional()});});var kC,AC=n(()=>{b();kr();kC=r.object({type:r.string(),parameters:Se.optional()});});var PC,zC=n(()=>{b();PC=r.object({role:r.string(),content:r.string()});});var SC,vC=n(()=>{b();zC();SC=r.object({messages:r.list(PC)});});var TC,jC=n(()=>{b();xC();_C();AC();vC();TC=r.object({datasetName:r.property("dataset_name",r.string()),prompt:SC,llmModel:r.property("llm_model",wC),evaluation:RC,optimizer:kC});});var EC,F5=n(()=>{b();EC=r.object({url:r.string().optional(),lastModified:r.property("last_modified",r.date().optional()),expiresAt:r.property("expires_at",r.date().optional())});});var CC,IC=n(()=>{b();CC=r.enum_(["running","completed","cancelled","initialized","error"]);});var Pm,B5=n(()=>{b();rn();fo();jC();IC();Pm=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:CC,metadata:Je.optional(),studioConfig:r.property("studio_config",TC.optional()),errorInfo:r.property("error_info",_t.optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var DC,M5=n(()=>{b();kS();DC=r.object({columns:r.list(_S).optional()});});var UC,NC=n(()=>{b();xm();UC=r.object({value:As.optional()});});var FC,BC=n(()=>{b();FC=r.object({p50:r.number().optional(),p90:r.number().optional(),p99:r.number().optional()});});var MC,WC=n(()=>{b();MC=r.object({permissionName:r.string().optional(),permissionValue:r.string().optional()});});var LC,VC=n(()=>{b();LC=r.enum_(["private","public"]);});var Yie,W5=n(()=>{b();ym();Gr();wo();VC();Yie=r.object({id:r.string().optional(),name:r.string(),visibility:LC.optional(),description:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),lastUpdatedTraceAt:r.property("last_updated_trace_at",r.date().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Rs.optional())});});var JC,HC=n(()=>{b();JC=r.enum_(["private","public"]);});var GC,L5=n(()=>{b();wT();Cj();BC();HC();GC=r.object({id:r.string().optional(),name:r.string(),visibility:JC.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(Ej).optional()),duration:FC.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",xT.optional())});});var OC,KC=n(()=>{b();OC=r.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var $C,QC=n(()=>{b();$C=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 YC,XC=n(()=>{b();ev();YC=r.object({name:r.string().optional(),data:r.list(qS).optional()});});var ZC,V5=n(()=>{b();KC();QC();XC();ZC=r.object({projectId:r.property("project_id",r.string().optional()),metricType:r.property("metric_type",$C.optional()),interval:OC.optional(),results:r.list(YC).optional()});});var qC,eI=n(()=>{b();qC=r.enum_(["private","public"]);});var Ds,rI=n(()=>{b();eI();Ds=r.object({id:r.string().optional(),name:r.string(),visibility:qC.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 tI,J5=n(()=>{b();rI();tI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ds).optional(),sortableBy:r.list(r.string()).optional()});});var oI,iI,aI=n(()=>{b();qP();WS();NC();oI=r.object({name:r.string().optional()}),iI=r.union("type",{PERCENTAGE:UC.extend(oI),COUNT:MS.extend(oI),AVG:ZP.extend(oI)}).transform({transform:p=>p,untransform:p=>p});});var Qr,H5=n(()=>{b();aI();Qr=r.object({stats:r.list(iI).optional()});});var nI,sI=n(()=>{b();ym();Gr();wo();nI=r.object({projectId:r.property("project_id",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(ve).optional()),duration:zr.optional(),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),totalEstimatedCostSum:r.property("total_estimated_cost_sum",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),traceCount:r.property("trace_count",r.number().optional()),threadCount:r.property("thread_count",r.number().optional()),guardrailsFailedCount:r.property("guardrails_failed_count",r.number().optional()),errorCount:r.property("error_count",Rs.optional())});});var pI,G5=n(()=>{b();sI();pI=r.object({content:r.list(nI).optional()});});var cI,lI=n(()=>{b();cI=r.enum_(["text","chat"]);});var mI,dI=n(()=>{b();mI=r.enum_(["mustache","jinja2","python"]);});var uI,gI=n(()=>{b();uI=r.enum_(["text","chat"]);});var fI,hI=n(()=>{b();fI=r.enum_(["mustache","jinja2","python"]);});var yI,bI=n(()=>{b();yI=r.enum_(["prompt_version","mask"]);});var zm,RI=n(()=>{b();pe();gI();hI();bI();zm=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:L.optional(),type:fI.optional(),versionType:r.property("version_type",yI.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),variables:r.list(r.string()).optional(),templateStructure:r.property("template_structure",uI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var Xie,O5=n(()=>{b();pe();lI();dI();RI();Xie=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:mI.optional(),templateStructure:r.property("template_structure",cI.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",zm.optional()),requestedVersion:r.property("requested_version",zm.optional())});});var xI,wI=n(()=>{b();xI=r.enum_(["text","chat"]);});var Sm,K5=n(()=>{b();wI();Da();Sm=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",xI.optional()),tags:r.list(r.string()).optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),versionCount:r.property("version_count",r.number().optional()),latestVersion:r.property("latest_version",De.optional()),requestedVersion:r.property("requested_version",De.optional())});});var _I,kI=n(()=>{b();_I=r.enum_(["text","chat"]);});var AI,PI=n(()=>{b();kI();AI=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",_I.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 Us,$5=n(()=>{b();PI();Us=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(AI).optional(),sortableBy:r.list(r.string()).optional()});});var zI,SI=n(()=>{b();zI=r.enum_(["text","chat"]);});var vI,TI=n(()=>{b();vI=r.enum_(["mustache","jinja2","python"]);});var jI,EI=n(()=>{b();jI=r.enum_(["prompt_version","mask"]);});var CI,II=n(()=>{b();gr();SI();TI();EI();CI=r.object({id:r.string().optional(),promptId:r.property("prompt_id",r.string().optional()),commit:r.string().optional(),versionNumber:r.property("version_number",r.string().optional()),template:r.string(),metadata:_e.optional(),type:vI.optional(),versionType:r.property("version_type",jI.optional()),environment:r.string().optional(),environments:r.list(r.string()).optional(),changeDescription:r.property("change_description",r.string().optional()),tags:r.list(r.string()).optional(),templateStructure:r.property("template_structure",zI.optional()),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional())});});var DI,Q5=n(()=>{b();II();DI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(CI).optional(),sortableBy:r.list(r.string()).optional()});});var UI,NI=n(()=>{b();UI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Zie,Y5=n(()=>{b();NI();ya();Zie=r.object({id:r.string().optional(),provider:UI,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",bt.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 FI,BI=n(()=>{b();FI=r.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var MI,WI=n(()=>{b();MI=r.enum_(["form","json","basic"]);});var LI,VI=n(()=>{b();JS();WI();LI=r.object({tokenUrl:r.property("token_url",r.string().optional()),sendAs:r.property("send_as",MI.optional()),credentials:r.list(VS).optional(),tokenField:r.property("token_field",r.string().optional()),expiresField:r.property("expires_field",r.string().optional()),fallbackTtlSeconds:r.property("fallback_ttl_seconds",r.number().optional())});});var Ns,JI=n(()=>{b();BI();VI();Ns=r.object({id:r.string().optional(),provider:FI,apiKey:r.property("api_key",r.string().optional()),name:r.string().optional(),providerName:r.property("provider_name",r.string().optional()),headers:r.record(r.string(),r.string()).optional(),configuration:r.record(r.string(),r.string()).optional(),baseUrl:r.property("base_url",r.string().optional()),authConfig:r.property("auth_config",LI.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 HI,X5=n(()=>{b();JI();HI=r.object({size:r.number().optional(),total:r.number().optional(),content:r.list(Ns).optional(),sortableBy:r.list(r.string()).optional()});});var GI,OI=n(()=>{b();GI=r.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var KI,$I=n(()=>{b();OI();KI=r.object({type:GI.optional(),id:r.string().optional(),name:r.string().optional(),resourceId:r.property("resource_id",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional())});});var QI,Z5=n(()=>{b();$I();QI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(KI).optional()});});var YI,XI=n(()=>{b();YI=r.enum_(["agent_insights"]);});var Fs,ZI=n(()=>{b();XI();Fs=r.object({id:r.string().optional(),type:YI,projectId:r.property("project_id",r.string()),reason:r.string(),detail:r.string().optional(),createdAt:r.property("created_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional())});});var qI,q5=n(()=>{b();ZI();qI=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Fs).optional()});});var Bs,e3=n(()=>{b();Bs=r.object({projectId:r.property("project_id",r.string().optional()),enabled:r.boolean().optional(),scheduleTime:r.property("schedule_time",r.string().optional()),customPrompt:r.property("custom_prompt",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional())});});var eD,r3=n(()=>{b();eD=r.object({enrolled:r.number().optional(),cleared:r.number().optional(),unknownProjectIds:r.property("unknown_project_ids",r.list(r.string()).optional()),alreadyRunProjectIds:r.property("already_run_project_ids",r.list(r.string()).optional())});});var vr,vm=n(()=>{b();vr=r.object({name:r.string().optional(),current:r.number().optional(),previous:r.number().optional()});});var rD,tD=n(()=>{b();rD=r.enum_(["organization","workspace","project"]);});var oD,iD=n(()=>{b();oD=r.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Do,aD=n(()=>{b();tD();iD();Do=r.object({id:r.string().optional(),workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),level:rD.optional(),retention:oD,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 nD,t3=n(()=>{b();aD();nD=r.object({content:r.list(Do).optional(),page:r.number().optional(),size:r.number().optional(),total:r.number().optional()});});var sD,o3=n(()=>{b();sD=r.object({pythonEvaluatorEnabled:r.boolean(),traceThreadPythonEvaluatorEnabled:r.boolean(),spanLlmAsJudgeEnabled:r.boolean(),spanUserDefinedMetricPythonEnabled:r.boolean(),guardrailsEnabled:r.boolean(),opikAiEnabled:r.property("opikAIEnabled",r.boolean()),alertsEnabled:r.boolean(),welcomeWizardEnabled:r.boolean(),exportEnabled:r.boolean(),costIntelligenceEnabled:r.boolean(),datasetVersioningEnabled:r.boolean(),datasetExportEnabled:r.boolean(),demoDataEnabled:r.boolean(),openaiProviderEnabled:r.boolean(),anthropicProviderEnabled:r.boolean(),geminiProviderEnabled:r.boolean(),openrouterProviderEnabled:r.boolean(),vertexaiProviderEnabled:r.boolean(),bedrockProviderEnabled:r.boolean(),customllmProviderEnabled:r.boolean(),ollamaProviderEnabled:r.boolean(),ollieEnabled:r.boolean(),agentInsightsEnabled:r.boolean(),projectHomepageEnabled:r.boolean(),onlineScoringTracingEnabled:r.boolean(),annotationQueueAutomationEnabled:r.boolean(),defaultPageSize:r.number().optional()});});var qie,i3=n(()=>{b();bm();qie=r.object({spans:r.list(_s)});});var pD,cD=n(()=>{b();pD=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var lD,mD=n(()=>{b();lD=r.enum_(["general","tool","llm","guardrail"]);});var Ms,dD=n(()=>{b();is();xs();_m();Co();cD();mD();Ms=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:lD.optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),model:r.string().optional(),provider:r.string().optional(),tags:r.list(r.string()).optional(),usage:r.record(r.string(),r.number()).optional(),errorInfo:r.property("error_info",Ft.optional()),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Io).optional()),comments:r.list(Ut).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:pD.optional(),environment:r.string().optional()});});var uD,a3=n(()=>{b();dD();uD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ms).optional(),sortableBy:r.list(r.string()).optional()});});var gD,fD=n(()=>{b();gD=r.object({workspace:r.string().optional(),spanCount:r.property("span_count",r.number().optional())});});var hD,n3=n(()=>{b();fD();hD=r.object({workspacesSpansCount:r.property("workspaces_spans_count",r.list(gD).optional())});});var yD,s3=n(()=>{b();yD=r.object({uploadId:r.property("upload_id",r.string()),preSignUrls:r.property("pre_sign_urls",r.list(r.string()))});});var bD,p3=n(()=>{b();bD=r.object({accessToken:r.property("access_token",r.string().optional()),refreshToken:r.property("refresh_token",r.string().optional()),tokenType:r.property("token_type",r.string().optional()),expiresIn:r.property("expires_in",r.number().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional())});});var Ws,c3=n(()=>{b();Ws=r.object({names:r.list(r.string()).optional()});});var eae,l3=n(()=>{b();Rm();eae=r.object({traces:r.list(ks)});});var RD,xD=n(()=>{b();RD=r.object({workspace:r.string().optional(),traceCount:r.property("trace_count",r.number().optional())});});var wD,m3=n(()=>{b();xD();wD=r.object({workspacesTracesCount:r.property("workspaces_traces_count",r.list(RD).optional())});});var _D,kD=n(()=>{b();_D=r.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var AD,PD=n(()=>{b();AD=r.enum_(["default","hidden"]);});var Ls,zD=n(()=>{b();is();xs();tj();_m();pE();Co();kD();PD();Ls=r.object({id:r.string().optional(),projectId:r.property("project_id",r.string().optional()),name:r.string().optional(),startTime:r.property("start_time",r.date()),endTime:r.property("end_time",r.date().optional()),input:Ge.optional(),output:Ge.optional(),metadata:Ge.optional(),tags:r.list(r.string()).optional(),errorInfo:r.property("error_info",Ft.optional()),usage:r.record(r.string(),r.number()).optional(),createdAt:r.property("created_at",r.date().optional()),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),createdBy:r.property("created_by",r.string().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),feedbackScores:r.property("feedback_scores",r.list(Io).optional()),spanFeedbackScores:r.property("span_feedback_scores",r.list(Io).optional()),comments:r.list(Ut).optional(),guardrailsValidations:r.property("guardrails_validations",r.list(sE).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",AD.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:rj.optional(),source:_D.optional(),environment:r.string().optional()});});var SD,d3=n(()=>{b();zD();SD=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Ls).optional(),sortableBy:r.list(r.string()).optional()});});var vD,TD=n(()=>{b();vD=r.enum_(["active","inactive"]);});var Vs,jD=n(()=>{b();ht();yt();Ye();TD();Vs=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:vD.optional(),numberOfMessages:r.property("number_of_messages",r.number().optional()),totalEstimatedCost:r.property("total_estimated_cost",r.number().optional()),usage:r.record(r.string(),r.number()).optional(),comments:r.list(ge).optional(),tags:r.list(r.string()).optional(),lastUpdatedAt:r.property("last_updated_at",r.date().optional()),lastUpdatedBy:r.property("last_updated_by",r.string().optional()),createdBy:r.property("created_by",r.string().optional()),createdAt:r.property("created_at",r.date().optional()),environment:r.string().optional()});});var Tm,u3=n(()=>{b();Tm=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 ED,g3=n(()=>{b();jD();ED=r.object({page:r.number().optional(),size:r.number().optional(),total:r.number().optional(),content:r.list(Vs).optional(),sortableBy:r.list(r.string()).optional()});});var CD,ID=n(()=>{b();CD=r.object({workspaceId:r.property("workspace_id",r.string().optional()),projectId:r.property("project_id",r.string().optional()),user:r.string().optional(),count:r.number().optional()});});var DD,f3=n(()=>{b();ID();DD=r.object({breakdown:r.list(CD).optional()});});var UD,h3=n(()=>{b();UD=r.object({userName:r.property("user_name",r.string().optional()),workspaceId:r.property("workspace_id",r.string().optional()),workspaceName:r.property("workspace_name",r.string().optional()),resource:r.string().optional(),expiresAt:r.property("expires_at",r.date().optional())});});var ND,y3=n(()=>{b();ND=r.object({responseExamples:r.property("response_examples",r.record(r.string(),r.record(r.string(),r.unknown())).optional())});});var FD,BD=n(()=>{b();FD=r.enum_(["success","failure"]);});var MD,b3=n(()=>{b();BD();MD=r.object({status:FD.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 WD,R3=n(()=>{b();WD=r.object({completed:r.boolean().optional()});});var Js,x3=n(()=>{b();Js=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 rae,w3=n(()=>{b();rae=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 Hs,_3=n(()=>{b();vm();Hs=r.object({results:r.list(vr).optional()});});var Uo,k3=n(()=>{b();Uo=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 LD,A3=n(()=>{b();vm();LD=r.object({results:r.list(vr).optional()});});var VD,P3=n(()=>{b();VD=r.object({workspaceName:r.property("workspace_name",r.string().optional())});});var JD,z3=n(()=>{b();WC();JD=r.object({userName:r.string().optional(),workspaceName:r.string().optional(),permissions:r.list(MC).optional()});});var S3=n(()=>{mw();Rw();uw();X9();ww();Iw();Sw();Z9();_h();yw();fw();Pw();kw();Ew();Tw();Mw();Lw();q9();Uw();Fw();eX();Hw();Ow();rX();Qw();Xw();tX();qw();oX();__();m_();s_();o_();f_();u_();r_();z_();A_();a_();R_();y_();j_();v_();iX();C_();aX();W_();gc();Y_();Gh();nX();sX();ek();Z_();pX();cX();nk();ok();N_();ak();B_();$h();Kh();Eb();cy();ay();sy();ck();mk();uk();Rk();fk();wk();lX();Ak();zk();vk();mX();dX();uX();gX();Uk();Qk();Zl();FA();qA();MA();LA();fX();hX();tP();iP();Xk();em();mP();qk();rm();fP();rA();tm();wP();oA();om();PP();aA();yX();SP();TP();EP();IP();UP();FP();MP();LP();sA();im();OP();bX();$P();YP();qP();RX();rz();xX();wX();nz();lz();pm();hz();iz();pz();dz();gz();qx();Xx();jR();vR();_X();kX();Pz();kz();bz();AX();xz();Ez();Uz();cm();Lz();Tz();Iz();Fz();Mz();Qz();PX();pS();iS();gS();lS();dS();nS();zX();SX();bS();hS();vX();kS();SS();PS();ES();TS();wS();ht();IS();is();TX();US();Xz();ey();O_();Lh();ty();$_();Jh();jX();WS();EX();aR();JS();cR();CX();$S();GS();KS();IX();YS();DX();ZS();UX();ev();NX();FX();BX();eb();qy();dm();MX();WX();Jv();hv();zc();Ny();LX();VX();tT();Ov();pv();By();Ky();Wy();JX();lT();aT();sT();cT();tv();iv();HX();dT();GX();gT();mm();hm();nv();OX();yT();KX();$X();Jz();QX();YX();bT();ym();wT();Hr();Dc();xs();rn();XX();ZX();qX();e5();r5();t5();mo();_v();bv();gm();$v();jy();Hy();Vy();ft();um();fm();Oy();o5();i5();kT();a5();n5();s5();TT();Uc();ej();Tb();p5();Fv();Av();zv();Xv();Yv();OT();tj();Ib();Ub();c5();mj();ij();nj();pj();dv();Lv();Mv();rT();qv();lv();Ic();lj();Jb();PT();ST();sb();ib();nb();l5();m5();d5();u5();Sj();g5();yt();Gr();Cj();vn();f5();Nj();Dj();Nx();Dx();Dv();vv();yb();mb();h5();y5();_m();Jj();Fb();b5();kc();lo();R5();UT();CT();FT();MT();nE();x5();tE();iE();$T();pE();tR();Zb();eR();w5();Fk();mA();kA();lE();Ye();Uv();sa();Co();fo();pe();xv();HR();gr();kr();yy();_5();gE();dE();Ol();wA();IA();En();Lk();fA();SA();Wn();yA();Jk();Hn();TA();Cn();Ln();Gn();In();Vn();RA();Gk();On();EA();xE();k5();Al();Rl();A5();hx();wl();P5();yE();RE();z5();S5();TE();SE();v5();Gz();Kz();T5();CE();j5();Ac();FS();fj();xj();wm();Xj();uj();bj();Aj();Qj();E5();C5();I5();RR();NE();D5();DE();U5();N5();hC();rC();ME();qE();fC();jC();F5();B5();IC();M5();cw();sw();NC();wo();BC();xm();WC();W5();L5();HC();V5();KC();QC();J5();rI();eI();cA();am();aI();H5();G5();sI();VC();O5();K5();wI();$5();PI();kI();lI();qz();dI();cb();RI();Da();OR();$R();YR();aa();pl();Hb();Q5();II();SI();TI();EI();gI();hI();qR();bI();Y5();X5();NI();JI();BI();ya();VI();WI();sR();uR();mR();$I();OI();Z5();vh();zh();ZI();q5();XI();e3();r3();wy();Ry();vm();XC();t3();aD();tD();iD();Zh();Yh();H_();V_();Mh();Fh();Bj();Lj();o3();bm();i3();Cy();kb();Rb();wb();At();rw();bo();CR();nm();sP();Kl();JA();cP();a3();dD();cD();mD();VT();n3();HT();_x();Rx();wx();$l();GA();uP();Sx();Ax();zx();s3();ky();JE();aC();xC();GE();sC();_C();QE();mC();zC();LE();oC();bC();KE();cC();AC();XE();uC();vC();p3();c3();Sy();Gl();yk();Py();Rm();l3();m3();Dy();Sb();Pb();_o();Kk();Ro();DR();ql();UA();d3();zD();kD();PD();YT();jD();kt();Ox();Ta();NR();sm();yP();u3();Ql();KA();RP();g3();TD();Hx();Yl();QA();kP();Mx();Bx();ZT();Vx();Lx();rS();f3();Xl();XA();HP();h3();Lb();Cv();jv();fb();ub();Kj();Gj();Mb();Mk();uA();PA();c_();y3();w_();b3();BD();D_();R3();x3();Ck();w3();_3();k3();A3();P3();ID();fD();xD();z3();});var G={};V(G,{ActivateRequest:()=>za,Agent:()=>lw,AgentBlueprintHistory:()=>bw,AgentBlueprintHistoryType:()=>dw,AgentBlueprintPublic:()=>Pt,AgentBlueprintPublicType:()=>xw,AgentBlueprintWrite:()=>Cw,AgentBlueprintWriteType:()=>zw,AgentConfigCreateWrite:()=>Vl,AgentConfigEnv:()=>wh,AgentConfigEnvSetByName:()=>xi,AgentConfigEnvUpdate:()=>wi,AgentConfigRemoveValues:()=>_i,AgentConfigValueHistory:()=>hw,AgentConfigValueHistoryType:()=>gw,AgentConfigValuePublic:()=>Aw,AgentConfigValuePublicType:()=>_w,AgentConfigValueWrite:()=>jw,AgentConfigValueWriteType:()=>vw,AgentInsightsIssue:()=>Bw,AgentInsightsIssueDetail:()=>Ww,AgentInsightsIssuePage:()=>Vw,AgentInsightsIssueSeverity:()=>Dw,AgentInsightsIssueStatus:()=>Nw,AgentInsightsIssueUpdate:()=>ki,AgentInsightsIssueUpdateStatus:()=>ac,AgentInsightsIssueWithDetails:()=>Kw,AgentInsightsIssueWithDetailsSeverity:()=>Jw,AgentInsightsIssueWithDetailsStatus:()=>Gw,AgentInsightsJob:()=>An,AgentInsightsJobStatus:()=>$w,AgentInsightsJobUpdate:()=>zi,AgentInsightsJobUpdateStatus:()=>lc,AgentInsightsReport:()=>Ai,AggregationData:()=>Yw,Alert:()=>zie,AlertAlertType:()=>Zw,AlertPagePublic:()=>zn,AlertPublic:()=>Pn,AlertPublicAlertType:()=>l_,AlertTrigger:()=>n_,AlertTriggerConfig:()=>t_,AlertTriggerConfigPublic:()=>g_,AlertTriggerConfigPublicType:()=>d_,AlertTriggerConfigType:()=>e_,AlertTriggerConfigWrite:()=>P_,AlertTriggerConfigWriteType:()=>k_,AlertTriggerEventType:()=>i_,AlertTriggerPublic:()=>b_,AlertTriggerPublicEventType:()=>h_,AlertTriggerWrite:()=>T_,AlertTriggerWriteEventType:()=>S_,AlertWrite:()=>Sn,AlertWriteAlertType:()=>E_,AnalyticsQueryRequest:()=>nn,AnalyticsQueryResponse:()=>Jl,AnnotationQueue:()=>M_,AnnotationQueueAutomation:()=>ji,AnnotationQueueAutomationPublic:()=>Q_,AnnotationQueueAutomationWrite:()=>Hh,AnnotationQueueBatch:()=>Sie,AnnotationQueueBatchWrite:()=>vi,AnnotationQueueItemIds:()=>Hl,AnnotationQueueItemIdsPublic:()=>Ti,AnnotationQueueItemPublic:()=>q_,AnnotationQueueItemPublicSource:()=>X_,AnnotationQueueItemsPublic:()=>rk,AnnotationQueuePagePublic:()=>sk,AnnotationQueuePublic:()=>Tn,AnnotationQueuePublicScope:()=>tk,AnnotationQueueReviewer:()=>U_,AnnotationQueueReviewerPublic:()=>ik,AnnotationQueueScope:()=>F_,AnnotationQueueUpdate:()=>Ei,AnnotationQueueWrite:()=>Si,AnnotationQueueWriteScope:()=>Oh,AssertionResult:()=>jb,AssertionResultBatch:()=>Ci,AssertionResultBatchEntityType:()=>hc,AssertionResultBatchItem:()=>py,AssertionResultBatchItemSource:()=>iy,AssertionResultBatchItemStatus:()=>ny,AssertionResultCompare:()=>pk,AssertionScoreAverage:()=>lk,AssertionScoreAveragePublic:()=>dk,AssistantMessage:()=>bk,AssistantMessageRole:()=>gk,Attachment:()=>xk,AttachmentListRequestEntityType:()=>xc,AttachmentPage:()=>_k,AudioUrl:()=>kk,AudioUrlPublic:()=>Pk,AudioUrlWrite:()=>Sk,AuthDetailsHolder:()=>Tk,AuthorizationServerMetadata:()=>jk,AuthorizeContext:()=>Ik,AutomationRuleEvaluator:()=>vie,AutomationRuleEvaluatorAction:()=>Dk,AutomationRuleEvaluatorLlmAsJudge:()=>$k,AutomationRuleEvaluatorLlmAsJudgePublic:()=>Jn,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>NA,AutomationRuleEvaluatorObjectObjectPublic:()=>ZA,AutomationRuleEvaluatorObjectObjectPublicAction:()=>BA,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>WA,AutomationRuleEvaluatorPagePublic:()=>eP,AutomationRuleEvaluatorPublic:()=>aP,AutomationRuleEvaluatorPublicAction:()=>rP,AutomationRuleEvaluatorPublicTriggerScope:()=>oP,AutomationRuleEvaluatorSpanLlmAsJudge:()=>Yk,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>$n,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>lP,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>Zk,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Qn,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>gP,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>eA,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>Yn,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>xP,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>tA,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>Xn,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>AP,AutomationRuleEvaluatorTriggerScope:()=>iA,AutomationRuleEvaluatorUpdate:()=>VP,AutomationRuleEvaluatorUpdateAction:()=>zP,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>vP,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>jP,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>CP,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>DP,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>NP,AutomationRuleEvaluatorUpdateTriggerScope:()=>BP,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>WP,AutomationRuleEvaluatorUserDefinedMetricPython:()=>nA,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>Zn,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>GP,AutomationRuleEvaluatorWrite:()=>XP,AutomationRuleEvaluatorWriteAction:()=>KP,AutomationRuleEvaluatorWriteTriggerScope:()=>QP,AvgValueStatPublic:()=>ZP,BatchDelete:()=>de,BatchDeleteByProject:()=>pn,BiInformation:()=>ez,BiInformationResponse:()=>vo,BlueprintPageHistory:()=>tz,BooleanFeedbackDefinition:()=>az,BooleanFeedbackDefinitionCreate:()=>cz,BooleanFeedbackDefinitionPublic:()=>ts,BooleanFeedbackDefinitionUpdate:()=>fz,BooleanFeedbackDetail:()=>oz,BooleanFeedbackDetailCreate:()=>sz,BooleanFeedbackDetailPublic:()=>mz,BooleanFeedbackDetailUpdate:()=>uz,BreakdownConfig:()=>Zx,BreakdownConfigField:()=>Yx,BreakdownConfigPublic:()=>TR,BreakdownConfigPublicField:()=>SR,BridgeCommand:()=>wz,BridgeCommandBatchResponse:()=>zz,BridgeCommandItem:()=>Az,BridgeCommandItemType:()=>_z,BridgeCommandNextRequest:()=>Ga,BridgeCommandResultRequest:()=>Oa,BridgeCommandResultRequestStatus:()=>yl,BridgeCommandStatus:()=>yz,BridgeCommandSubmitRequest:()=>Ka,BridgeCommandSubmitRequestType:()=>bl,BridgeCommandSubmitResponse:()=>Sz,BridgeCommandType:()=>Rz,CategoricalFeedbackDefinition:()=>jz,CategoricalFeedbackDefinitionCreate:()=>Dz,CategoricalFeedbackDefinitionPublic:()=>os,CategoricalFeedbackDefinitionUpdate:()=>Wz,CategoricalFeedbackDetail:()=>vz,CategoricalFeedbackDetailCreate:()=>Cz,CategoricalFeedbackDetailPublic:()=>Nz,CategoricalFeedbackDetailUpdate:()=>Bz,ChatCompletionChoice:()=>$z,ChatCompletionRequest:()=>Ni,ChatCompletionResponse:()=>tS,Check:()=>sS,CheckName:()=>oS,CheckPublic:()=>uS,CheckPublicName:()=>cS,CheckPublicResult:()=>mS,CheckResult:()=>aS,ChunkedOutputJsonNode:()=>Tie,ChunkedOutputJsonNodePublic:()=>jie,ChunkedOutputJsonNodePublicType:()=>yS,ChunkedOutputJsonNodeType:()=>fS,ClientRegistrationRequest:()=>wa,ClientRegistrationResponse:()=>RS,Column:()=>_S,ColumnCompare:()=>zS,ColumnCompareTypesItem:()=>AS,ColumnPublic:()=>jS,ColumnPublicTypesItem:()=>vS,ColumnTypesItem:()=>xS,Comment:()=>ge,CommentCompare:()=>CS,CommentPublic:()=>Ut,CompleteMultipartUploadRequest:()=>lm,CompleteMultipartUploadRequestEntityType:()=>DS,CompletionTokensDetails:()=>Yz,ConditionGroup:()=>qh,ConditionGroupPublic:()=>G_,ConditionGroupWrite:()=>Wh,Conditions:()=>ry,ConditionsPublic:()=>K_,ConditionsWrite:()=>Vh,ConsentRequest:()=>_a,ConsentResponse:()=>BS,CountValueStatPublic:()=>MS,CreateDatasetItemsFromJsonRequestFormat:()=>Ec,CreateDatasetItemsFromSpansRequest:()=>Fi,CreateDatasetItemsFromTracesRequest:()=>Bi,CreateLocalRunnerJobRequest:()=>Qa,CreatePromptVersionDetail:()=>Ua,CreatePromptVersionDetailTemplateStructure:()=>al,CreateSessionRequest:()=>Sa,CreateSessionRequestType:()=>Xc,CreateSessionResponse:()=>LS,Credential:()=>iR,CredentialPublic:()=>VS,CredentialWrite:()=>pR,DashboardPagePublic:()=>Nt,DashboardPublic:()=>or,DashboardPublicScope:()=>HS,DashboardPublicType:()=>OS,DashboardUpdatePublic:()=>as,DashboardUpdatePublicType:()=>QS,DashboardWrite:()=>ns,DashboardWriteType:()=>XS,DataPointDouble:()=>Eie,DataPointNumberPublic:()=>qS,Dataset:()=>Cie,DatasetExpansion:()=>Iie,DatasetExpansionResponse:()=>uv,DatasetExpansionWrite:()=>Mi,DatasetExportJobPublic:()=>uo,DatasetExportJobPublicStatus:()=>Zy,DatasetIdentifier:()=>Wi,DatasetIdentifierPublic:()=>Li,DatasetItem:()=>ps,DatasetItemBatch:()=>Die,DatasetItemBatchUpdate:()=>Ji,DatasetItemBatchWrite:()=>Gi,DatasetItemChangesPublic:()=>gv,DatasetItemCompare:()=>Vv,DatasetItemCompareSource:()=>fv,DatasetItemFilter:()=>Vi,DatasetItemFilterOperator:()=>Uy,DatasetItemPageCompare:()=>Hv,DatasetItemPagePublic:()=>oT,DatasetItemPublic:()=>gs,DatasetItemPublicSource:()=>Gv,DatasetItemSource:()=>sv,DatasetItemStreamRequest:()=>Oi,DatasetItemUpdate:()=>Fy,DatasetItemWrite:()=>Hi,DatasetItemWriteSource:()=>My,DatasetItemsDelete:()=>Ki,DatasetPagePublic:()=>hs,DatasetPublic:()=>To,DatasetPublicStatus:()=>iT,DatasetPublicType:()=>nT,DatasetPublicVisibility:()=>pT,DatasetStatus:()=>rv,DatasetType:()=>ov,DatasetUpdate:()=>$i,DatasetUpdateVisibility:()=>Sc,DatasetVersionDiff:()=>uT,DatasetVersionDiffStats:()=>mT,DatasetVersionPagePublic:()=>fT,DatasetVersionPublic:()=>Kr,DatasetVersionRestorePublic:()=>Qi,DatasetVersionRetrieveRequestPublic:()=>Yi,DatasetVersionSummary:()=>ss,DatasetVersionSummaryPublic:()=>fs,DatasetVersionTag:()=>Xi,DatasetVersionUpdatePublic:()=>Zi,DatasetVisibility:()=>av,DatasetWrite:()=>qi,DatasetWriteType:()=>vc,DatasetWriteVisibility:()=>Tc,DeleteAttachmentsRequest:()=>Uie,DeleteAttachmentsRequestEntityType:()=>hT,DeleteFeedbackScore:()=>ys,DeleteIdsHolder:()=>jo,DeleteThreadFeedbackScores:()=>cn,DeleteTraceThreads:()=>ln,Delta:()=>Vz,DownloadAttachmentRequestEntityType:()=>wc,Environment:()=>Nie,EnvironmentPagePublic:()=>RT,EnvironmentPublic:()=>bs,EnvironmentUpdate:()=>ea,EnvironmentWrite:()=>ra,ErrorCountWithDeviation:()=>Rs,ErrorCountWithDeviationDetailed:()=>xT,ErrorInfo:()=>He,ErrorInfoExperimentItemBulkWriteView:()=>pa,ErrorInfoPublic:()=>Ft,ErrorInfoWrite:()=>_t,ErrorMessage:()=>Eo,ErrorMessageDetail:()=>Fie,ErrorMessageDetailed:()=>Bie,ErrorMessageHistory:()=>Mie,ErrorMessagePublic:()=>Wie,ErrorMessageWrite:()=>Lie,EvaluatorItem:()=>_r,EvaluatorItemCompare:()=>wv,EvaluatorItemCompareType:()=>yv,EvaluatorItemPublic:()=>ms,EvaluatorItemPublicType:()=>Kv,EvaluatorItemType:()=>Ty,EvaluatorItemWrite:()=>Jy,EvaluatorItemWriteType:()=>Ly,ExecutionPolicy:()=>qe,ExecutionPolicyCompare:()=>cs,ExecutionPolicyPublic:()=>ds,ExecutionPolicyWrite:()=>Gy,ExistenceResponse:()=>ws,Experiment:()=>Vie,ExperimentBatchUpdate:()=>ia,ExperimentEvaluationMethod:()=>_T,ExperimentExecutionRequest:()=>na,ExperimentExecutionResponse:()=>jT,ExperimentGroupAggregationsResponse:()=>IT,ExperimentGroupResponse:()=>WT,ExperimentInfo:()=>vT,ExperimentItem:()=>ma,ExperimentItemBulkRecord:()=>qT,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>vb,ExperimentItemBulkUpload:()=>Jie,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>ca,ExperimentItemCompare:()=>Nv,ExperimentItemCompareStatus:()=>kv,ExperimentItemCompareTraceVisibilityMode:()=>Pv,ExperimentItemPublic:()=>us,ExperimentItemPublicTraceVisibilityMode:()=>Qv,ExperimentItemReference:()=>GT,ExperimentItemReferencePublic:()=>rj,ExperimentItemStatus:()=>Cb,ExperimentItemStreamRequest:()=>la,ExperimentItemTraceVisibilityMode:()=>Db,ExperimentItemsBatch:()=>da,ExperimentItemsDelete:()=>ua,ExperimentPagePublic:()=>zs,ExperimentPublic:()=>Ps,ExperimentPublicEvaluationMethod:()=>oj,ExperimentPublicStatus:()=>aj,ExperimentPublicType:()=>sj,ExperimentRunSummary:()=>mv,ExperimentRunSummaryCompare:()=>Wv,ExperimentRunSummaryCompareStatus:()=>Bv,ExperimentRunSummaryPublic:()=>eT,ExperimentRunSummaryPublicStatus:()=>Zv,ExperimentRunSummaryStatus:()=>cv,ExperimentScore:()=>ta,ExperimentScorePublic:()=>cj,ExperimentScoreWrite:()=>Vb,ExperimentStatus:()=>AT,ExperimentStreamRequestPublic:()=>ga,ExperimentType:()=>zT,ExperimentUpdate:()=>oa,ExperimentUpdateStatus:()=>ob,ExperimentUpdateType:()=>ab,ExperimentWrite:()=>fa,ExperimentWriteEvaluationMethod:()=>Fc,ExperimentWriteStatus:()=>Bc,ExperimentWriteType:()=>Mc,ExportTraceServiceRequest:()=>Hie,Feedback:()=>Gie,FeedbackCreate:()=>_j,FeedbackDefinitionPagePublic:()=>vj,FeedbackObjectPublic:()=>zj,FeedbackPublic:()=>jj,FeedbackScore:()=>Pe,FeedbackScoreAverage:()=>ve,FeedbackScoreAverageDetailed:()=>Ej,FeedbackScoreAveragePublic:()=>Or,FeedbackScoreBatch:()=>vs,FeedbackScoreBatchItem:()=>Uj,FeedbackScoreBatchItemSource:()=>Ij,FeedbackScoreBatchItemThread:()=>Ux,FeedbackScoreBatchItemThreadSource:()=>Ix,FeedbackScoreBatchThread:()=>mn,FeedbackScoreCompare:()=>Iv,FeedbackScoreCompareSource:()=>Sv,FeedbackScoreExperimentItemBulkWriteView:()=>hb,FeedbackScoreExperimentItemBulkWriteViewSource:()=>lb,FeedbackScoreNames:()=>Mj,FeedbackScoreNamesPublic:()=>$r,FeedbackScorePublic:()=>Io,FeedbackScorePublicSource:()=>Vj,FeedbackScoreSource:()=>Nb,FeedbackUpdate:()=>qj,FindAgentInsightsIssuesRequestSeverity:()=>nc,FindAgentInsightsIssuesRequestStatus:()=>sc,FindFeedbackDefinitionsRequestType:()=>Lc,FindFeedbackScoreNames1RequestType:()=>El,FindReportFailuresRequestType:()=>ml,Function:()=>Di,FunctionCall:()=>wr,GenerateReportResponse:()=>eE,GetSpanStatsRequestType:()=>Cl,GetSpansByProjectRequestType:()=>Il,GetWebhookExamplesRequestAlertType:()=>dc,GroupContent:()=>DT,GroupContentWithAggregations:()=>ET,GroupDetail:()=>NT,GroupDetails:()=>BT,Guardrail:()=>aE,GuardrailBatch:()=>Oie,GuardrailBatchWrite:()=>ha,GuardrailName:()=>rE,GuardrailResult:()=>oE,GuardrailWrite:()=>rR,GuardrailWriteName:()=>Xb,GuardrailWriteResult:()=>qb,GuardrailsValidation:()=>KT,GuardrailsValidationPublic:()=>sE,IdsHolder:()=>Kie,ImageUrl:()=>Nk,ImageUrlPublic:()=>lA,ImageUrlWrite:()=>_A,ItemLockInfo:()=>cE,JsonListString:()=>le,JsonListStringCompare:()=>ls,JsonListStringExperimentItemBulkWriteView:()=>er,JsonListStringPublic:()=>Ge,JsonListStringWrite:()=>Je,JsonNode:()=>L,JsonNodeCompare:()=>Rv,JsonNodeDetail:()=>JR,JsonNodePublic:()=>_e,JsonNodeWrite:()=>Se,JsonSchema:()=>hy,KpiCardRequest:()=>va,KpiCardRequestEntityType:()=>qc,KpiCardResponse:()=>fE,KpiMetric:()=>uE,KpiMetricType:()=>mE,ListRunnersRequestStatus:()=>vl,LlmAsJudgeCode:()=>Dn,LlmAsJudgeCodePublic:()=>xA,LlmAsJudgeCodeWrite:()=>CA,LlmAsJudgeMessage:()=>zt,LlmAsJudgeMessageContent:()=>Wk,LlmAsJudgeMessageContentPublic:()=>gA,LlmAsJudgeMessageContentWrite:()=>zA,LlmAsJudgeMessagePublic:()=>Tt,LlmAsJudgeMessagePublicRole:()=>hA,LlmAsJudgeMessageRole:()=>Vk,LlmAsJudgeMessageWrite:()=>Ct,LlmAsJudgeMessageWriteRole:()=>vA,LlmAsJudgeModelParameters:()=>St,LlmAsJudgeModelParametersPublic:()=>jt,LlmAsJudgeModelParametersWrite:()=>It,LlmAsJudgeOutputSchema:()=>vt,LlmAsJudgeOutputSchemaPublic:()=>Et,LlmAsJudgeOutputSchemaPublicType:()=>bA,LlmAsJudgeOutputSchemaType:()=>Hk,LlmAsJudgeOutputSchemaWrite:()=>Dt,LlmAsJudgeOutputSchemaWriteType:()=>jA,LocalRunner:()=>Ts,LocalRunnerHeartbeatRequest:()=>Ya,LocalRunnerHeartbeatResponse:()=>wE,LocalRunnerJob:()=>wt,LocalRunnerJobMetadata:()=>$a,LocalRunnerJobPage:()=>_E,LocalRunnerJobResultRequest:()=>Xa,LocalRunnerJobResultRequestStatus:()=>xl,LocalRunnerJobStatus:()=>fx,LocalRunnerLogEntry:()=>Za,LocalRunnerPage:()=>kE,LocalRunnerStatus:()=>hE,LocalRunnerType:()=>bE,LockResponse:()=>AE,LocksResponse:()=>PE,LogItem:()=>vE,LogItemLevel:()=>zE,LogPage:()=>jE,LogProb:()=>Hz,LogProbs:()=>Oz,ManualEvaluationRequest:()=>js,ManualEvaluationRequestEntityType:()=>EE,ManualEvaluationResponse:()=>Es,Message:()=>Ui,MultipartUploadPart:()=>NS,NumericalFeedbackDefinition:()=>gj,NumericalFeedbackDefinitionCreate:()=>Rj,NumericalFeedbackDefinitionPublic:()=>Ss,NumericalFeedbackDefinitionUpdate:()=>Yj,NumericalFeedbackDetail:()=>dj,NumericalFeedbackDetailCreate:()=>yj,NumericalFeedbackDetailPublic:()=>kj,NumericalFeedbackDetailUpdate:()=>$j,OAuthError:()=>$ie,OllamaConnectionTestResponse:()=>km,OllamaInstanceBaseUrlRequest:()=>Am,OllamaModel:()=>bR,OllieReport:()=>UE,OllieReportPage:()=>FE,OllieReportStatus:()=>IE,Optimization:()=>Qie,OptimizationPagePublic:()=>Is,OptimizationPublic:()=>Cs,OptimizationPublicStatus:()=>eC,OptimizationStatus:()=>BE,OptimizationStudioConfig:()=>ZE,OptimizationStudioConfigPublic:()=>gC,OptimizationStudioConfigWrite:()=>TC,OptimizationStudioLog:()=>EC,OptimizationUpdate:()=>Pa,OptimizationUpdateStatus:()=>Qc,OptimizationWrite:()=>Pm,OptimizationWriteStatus:()=>CC,PageColumns:()=>DC,Param:()=>pw,ParamPresence:()=>nw,PercentageValueStatPublic:()=>UC,PercentageValues:()=>zr,PercentageValuesDetailed:()=>FC,PercentageValuesPublic:()=>As,Permission:()=>MC,Project:()=>Yie,ProjectDetailed:()=>GC,ProjectDetailedVisibility:()=>JC,ProjectMetricRequestPublic:()=>ja,ProjectMetricRequestPublicInterval:()=>el,ProjectMetricRequestPublicMetricType:()=>rl,ProjectMetricResponsePublic:()=>ZC,ProjectMetricResponsePublicInterval:()=>OC,ProjectMetricResponsePublicMetricType:()=>$C,ProjectPagePublic:()=>tI,ProjectPublic:()=>Ds,ProjectPublicVisibility:()=>qC,ProjectReference:()=>pA,ProjectReferencePublic:()=>qn,ProjectRetrieveDetailed:()=>Ea,ProjectStatItemObjectPublic:()=>iI,ProjectStatsPublic:()=>Qr,ProjectStatsSummary:()=>pI,ProjectStatsSummaryItem:()=>nI,ProjectUpdate:()=>Ca,ProjectUpdateVisibility:()=>tl,ProjectVisibility:()=>LC,ProjectWrite:()=>Ia,ProjectWriteVisibility:()=>ol,Prompt:()=>Xie,PromptDetail:()=>Sm,PromptDetailTemplateStructure:()=>xI,PromptPagePublic:()=>Us,PromptPublic:()=>AI,PromptPublicTemplateStructure:()=>_I,PromptTemplateStructure:()=>cI,PromptTokensDetails:()=>Zz,PromptType:()=>mI,PromptUpdatable:()=>Na,PromptVariant:()=>pb,PromptVersion:()=>zm,PromptVersionBatchUpdate:()=>Fa,PromptVersionCommitsRequestPublic:()=>Ba,PromptVersionDetail:()=>De,PromptVersionDetailTemplateStructure:()=>GR,PromptVersionDetailType:()=>KR,PromptVersionDetailVersionType:()=>QR,PromptVersionEnvironmentUpdate:()=>Ma,PromptVersionIdsRequestDetail:()=>Wa,PromptVersionLink:()=>Jr,PromptVersionLinkPublic:()=>xo,PromptVersionLinkWrite:()=>Nc,PromptVersionPagePublic:()=>DI,PromptVersionPublic:()=>CI,PromptVersionPublicTemplateStructure:()=>zI,PromptVersionPublicType:()=>vI,PromptVersionPublicVersionType:()=>jI,PromptVersionRetrieveDetail:()=>La,PromptVersionTemplateStructure:()=>uI,PromptVersionType:()=>fI,PromptVersionUpdate:()=>ZR,PromptVersionVersionType:()=>yI,PromptWrite:()=>Va,PromptWriteTemplateStructure:()=>nl,PromptWriteType:()=>sl,ProviderApiKey:()=>Zie,ProviderApiKeyPagePublic:()=>HI,ProviderApiKeyProvider:()=>UI,ProviderApiKeyPublic:()=>Ns,ProviderApiKeyPublicProvider:()=>FI,ProviderApiKeyUpdate:()=>ba,ProviderApiKeyWrite:()=>Ra,ProviderApiKeyWriteProvider:()=>Gc,ProviderAuthCheck:()=>xa,ProviderAuthConfig:()=>bt,ProviderAuthConfigPublic:()=>LI,ProviderAuthConfigPublicSendAs:()=>MI,ProviderAuthConfigSendAs:()=>nR,ProviderAuthConfigWrite:()=>dR,ProviderAuthConfigWriteSendAs:()=>lR,RecentActivityItemPublic:()=>KI,RecentActivityItemPublicType:()=>GI,RecentActivityPagePublic:()=>QI,ReportCompleteRequest:()=>Ja,ReportCompleteRequestStatus:()=>ul,ReportFailure:()=>Fs,ReportFailurePage:()=>qI,ReportFailureType:()=>YI,ReportPreference:()=>Bs,ReportedIssue:()=>Sh,ReportedIssueSeverity:()=>Ph,Request:()=>Pi,Response:()=>eD,ResponseFormat:()=>xy,ResponseFormatType:()=>by,Result:()=>vr,ResultsNumberPublic:()=>YC,RetentionRulePagePublic:()=>nD,RetentionRulePublic:()=>Do,RetentionRulePublicLevel:()=>rD,RetentionRulePublicRetention:()=>oD,RetentionRuleWrite:()=>Ha,RetentionRuleWriteRetention:()=>fl,RevokeRequest:()=>ka,ScopedAnalyticsQueryRequest:()=>sn,ScoreCondition:()=>Xh,ScoreConditionOperator:()=>Qh,ScoreConditionPublic:()=>J_,ScoreConditionPublicOperator:()=>L_,ScoreConditionWrite:()=>Bh,ScoreConditionWriteOperator:()=>Nh,ScoreName:()=>Fj,ScoreNamePublic:()=>Wj,ServiceTogglesConfig:()=>sD,Span:()=>_s,SpanBatch:()=>qie,SpanBatchUpdate:()=>en,SpanBatchWrite:()=>on,SpanEnrichmentOptions:()=>Ey,SpanExperimentItemBulkWriteView:()=>_b,SpanExperimentItemBulkWriteViewSource:()=>bb,SpanExperimentItemBulkWriteViewType:()=>xb,SpanFilter:()=>tr,SpanFilterOperator:()=>ew,SpanFilterPublic:()=>Ar,SpanFilterPublicOperator:()=>ER,SpanFilterWrite:()=>es,SpanFilterWriteOperator:()=>nP,SpanLlmAsJudgeCode:()=>Un,SpanLlmAsJudgeCodePublic:()=>VA,SpanLlmAsJudgeCodeWrite:()=>pP,SpanPagePublic:()=>uD,SpanPublic:()=>Ms,SpanPublicSource:()=>pD,SpanPublicType:()=>lD,SpanSearchStreamRequestPublic:()=>an,SpanSearchStreamRequestPublicExcludeItem:()=>Tl,SpanSearchStreamRequestPublicType:()=>jl,SpanSource:()=>LT,SpanType:()=>JT,SpanUpdate:()=>qa,SpanUpdateSource:()=>bx,SpanUpdateType:()=>xx,SpanUserDefinedMetricPythonCode:()=>Nn,SpanUserDefinedMetricPythonCodePublic:()=>HA,SpanUserDefinedMetricPythonCodeWrite:()=>dP,SpanWrite:()=>tn,SpanWriteSource:()=>kx,SpanWriteType:()=>Px,SpansCountResponse:()=>hD,StartMultipartUploadRequest:()=>Ii,StartMultipartUploadRequestEntityType:()=>bc,StartMultipartUploadResponse:()=>yD,StreamOptions:()=>_y,StudioEvaluation:()=>VE,StudioEvaluationPublic:()=>iC,StudioEvaluationWrite:()=>RC,StudioLlmModel:()=>HE,StudioLlmModelPublic:()=>nC,StudioLlmModelWrite:()=>wC,StudioMessage:()=>$E,StudioMessagePublic:()=>lC,StudioMessageWrite:()=>PC,StudioMetric:()=>WE,StudioMetricPublic:()=>tC,StudioMetricWrite:()=>yC,StudioOptimizer:()=>OE,StudioOptimizerPublic:()=>pC,StudioOptimizerWrite:()=>kC,StudioPrompt:()=>YE,StudioPromptPublic:()=>dC,StudioPromptWrite:()=>SC,TokenRequest:()=>Aa,TokenResponse:()=>bD,TokenUsageNames:()=>Ws,Tool:()=>zy,ToolCall:()=>jn,ToolCallType:()=>hk,ToolType:()=>Ay,Trace:()=>ks,TraceBatch:()=>eae,TraceBatchUpdate:()=>un,TraceBatchWrite:()=>fn,TraceCountResponse:()=>wD,TraceEnrichmentOptions:()=>Iy,TraceExperimentItemBulkWriteView:()=>zb,TraceExperimentItemBulkWriteViewSource:()=>Ab,TraceFilter:()=>Sr,TraceFilterOperator:()=>Ok,TraceFilterPublic:()=>Pr,TraceFilterPublicOperator:()=>IR,TraceFilterWrite:()=>Kn,TraceFilterWriteOperator:()=>DA,TracePagePublic:()=>SD,TracePublic:()=>Ls,TracePublicSource:()=>_D,TracePublicVisibilityMode:()=>AD,TraceSearchStreamRequestPublic:()=>hn,TraceSearchStreamRequestPublicExcludeItem:()=>Nl,TraceSource:()=>QT,TraceThread:()=>Vs,TraceThreadBatchIdentifier:()=>yn,TraceThreadBatchUpdate:()=>Rn,TraceThreadFilter:()=>rr,TraceThreadFilterOperator:()=>Gx,TraceThreadFilterPublic:()=>Rt,TraceThreadFilterPublicOperator:()=>UR,TraceThreadFilterWrite:()=>rs,TraceThreadFilterWriteOperator:()=>hP,TraceThreadIdentifier:()=>Tm,TraceThreadLlmAsJudgeCode:()=>Fn,TraceThreadLlmAsJudgeCodePublic:()=>OA,TraceThreadLlmAsJudgeCodeWrite:()=>bP,TraceThreadPage:()=>ED,TraceThreadSearchStreamRequest:()=>xn,TraceThreadStatus:()=>vD,TraceThreadUpdate:()=>bn,TraceThreadUserDefinedMetricPythonCode:()=>Bn,TraceThreadUserDefinedMetricPythonCodePublic:()=>$A,TraceThreadUserDefinedMetricPythonCodeWrite:()=>_P,TraceUpdate:()=>dn,TraceUpdateSource:()=>Fx,TraceVisibilityMode:()=>XT,TraceWrite:()=>gn,TraceWriteSource:()=>Wx,UploadAttachmentRequestEntityType:()=>_c,Usage:()=>eS,UsageByWorkspaceProjectUserResponse:()=>DD,UserDefinedMetricPythonCode:()=>Mn,UserDefinedMetricPythonCodePublic:()=>YA,UserDefinedMetricPythonCodeWrite:()=>JP,ValidatedToken:()=>UD,ValueEntry:()=>Wb,ValueEntryCompare:()=>Ev,ValueEntryCompareSource:()=>Tv,ValueEntryExperimentItemBulkWriteView:()=>gb,ValueEntryExperimentItemBulkWriteViewSource:()=>db,ValueEntryPublic:()=>Oj,ValueEntryPublicSource:()=>Hj,ValueEntrySource:()=>Bb,VideoUrl:()=>Bk,VideoUrlPublic:()=>dA,VideoUrlWrite:()=>AA,Webhook:()=>p_,WebhookExamples:()=>ND,WebhookPublic:()=>x_,WebhookTestResult:()=>MD,WebhookTestResultStatus:()=>FD,WebhookWrite:()=>I_,WelcomeWizardSubmission:()=>wn,WelcomeWizardTracking:()=>WD,WorkspaceConfiguration:()=>Js,WorkspaceInfo:()=>Ek,WorkspaceMetricRequest:()=>rae,WorkspaceMetricResponse:()=>Hs,WorkspaceMetricsSummaryRequest:()=>Uo,WorkspaceMetricsSummaryResponse:()=>LD,WorkspaceNameHolder:()=>VD,WorkspaceProjectUserCount:()=>CD,WorkspaceSpanMetricRequest:()=>_n,WorkspaceSpanMetricRequestInterval:()=>Ml,WorkspaceSpanMetricRequestMetricType:()=>Wl,WorkspaceSpansCount:()=>gD,WorkspaceTokenUsageNamesRequest:()=>kn,WorkspaceTraceCount:()=>RD,WorkspaceUserPermissions:()=>JD,agentConfigs:()=>ic,agentInsights:()=>pc,agentInsightsEnrollment:()=>cc,agentInsightsJobs:()=>mc,alerts:()=>uc,annotationQueues:()=>fc,assertionResults:()=>yc,attachments:()=>co,chatCompletions:()=>Pc,datasets:()=>go,environments:()=>Cc,experiments:()=>Wc,feedbackDefinitions:()=>Vc,guardrails:()=>Jc,llmModels:()=>ho,llmProviderKey:()=>Oc,mcpOAuth:()=>Kc,ollama:()=>yo,optimizations:()=>Yc,pairing:()=>Zc,projects:()=>il,prompts:()=>xt,reportFailures:()=>dl,reports:()=>gl,retentionRules:()=>hl,runners:()=>ur,spans:()=>Dl,systemAnalyticsQueries:()=>Ul,traces:()=>Fl,welcomeWizard:()=>Bl,workspaces:()=>Ll});var te=n(()=>{Y9();S3();});var jm,v3=n(()=>{Z();$();b();Q();q();J();te();oe();jm=class{constructor(o={}){this._options=M(o);}createAgentConfig(o,e){return P.fromPromise(this.__createAgentConfig(o,e))}async __createAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Vl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints")}updateAgentConfig(o,e){return P.fromPromise(this.__updateAgentConfig(o,e))}async __updateAgentConfig(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Vl.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PATCH","/v1/private/agent-configs/blueprints")}createBlueprintFromMask(o,e,t={},i){return P.fromPromise(this.__createBlueprintFromMask(o,e,t,i))}async __createBlueprintFromMask(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/masks/${_.encodePathParam(e)}`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/agent-configs/blueprints/projects/{project_id}/masks/{mask_id}")}createOrUpdateEnvs(o,e){return P.fromPromise(this.__createOrUpdateEnvs(o,e))}async __createOrUpdateEnvs(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/environments")}getBlueprintByEnv(o,e,t={},i){return P.fromPromise(this.__getBlueprintByEnv(o,e,t,i))}async __getBlueprintByEnv(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Pt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}setEnvByBlueprintName(o,e,t,i){return P.fromPromise(this.__setEnvByBlueprintName(o,e,t,i))}async __setEnvByBlueprintName(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:xi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 401:throw new O(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}deleteEnv(o,e,t={},i){return P.fromPromise(this.__deleteEnv(o,e,t,i))}async __deleteEnv(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/agent-configs/blueprints/environments/${_.encodePathParam(o)}/projects/${_.encodePathParam(e)}`),method:"DELETE",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===401?new O(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"DELETE","/v1/private/agent-configs/blueprints/environments/{env_name}/projects/{project_id}")}getBlueprintById(o,e={},t){return P.fromPromise(this.__getBlueprintById(o,e,t))}async __getBlueprintById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Pt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}")}getBlueprintByName(o,e,t={},i){return P.fromPromise(this.__getBlueprintByName(o,e,t,i))}async __getBlueprintByName(o,e,t={},i){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:a}=t,s={mask_id:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=i==null?void 0:i.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),i==null?void 0:i.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/projects/${_.encodePathParam(o)}/names/${_.encodePathParam(e)}`),method:"GET",headers:c,queryParameters:{...s,...i==null?void 0:i.queryParams},timeoutMs:((w=(y=i==null?void 0:i.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=i==null?void 0:i.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Pt.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/projects/{project_id}/names/{name}")}getBlueprintHistory(o,e={},t){return P.fromPromise(this.__getBlueprintHistory(o,e,t))}async __getBlueprintHistory(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/agent-configs/blueprints/history/projects/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:tz.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 401:throw new O(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/agent-configs/blueprints/history/projects/{project_id}")}getDeltaById(o,e={},t){return P.fromPromise(this.__getDeltaById(o,e,t))}async __getDeltaById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-configs/blueprints/${_.encodePathParam(o)}/deltas`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Pt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/agent-configs/blueprints/{blueprint_id}/deltas")}getLatestBlueprint(o,e={},t){return P.fromPromise(this.__getLatestBlueprint(o,e,t))}async __getLatestBlueprint(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=e,a={mask_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/agent-configs/blueprints/latest/projects/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Pt.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 401:throw new O(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"GET","/v1/private/agent-configs/blueprints/latest/projects/{project_id}")}removeConfigKeys(o,e){return P.fromPromise(this.__removeConfigKeys(o,e))}async __removeConfigKeys(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_i.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===401?new O(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/agent-configs/blueprints/remove-keys")}};});var Em,T3=n(()=>{Z();$();b();Q();q();J();te();oe();Em=class{constructor(o={}){this._options=M(o);}findAgentInsightsIssues(o,e){return P.fromPromise(this.__findAgentInsightsIssues(o,e))}async __findAgentInsightsIssues(o,e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,fromDate:i,toDate:a,status:s,severity:c,sorting:l,page:m,size:u}=o,d={project_id:t,from_date:i,to_date:a,status:s!=null?sc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?nc.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l,page:m,size:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/agent-insights/issues"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Vw.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")switch(g.error.statusCode){case 400:throw new N(g.error.body,g.rawResponse);case 401:throw new O(g.error.body,g.rawResponse);default:throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse})}return j(g.error,g.rawResponse,"GET","/v1/private/agent-insights/issues")}reportAgentInsightsIssues(o,e){return P.fromPromise(this.__reportAgentInsightsIssues(o,e))}async __reportAgentInsightsIssues(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-insights/issues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ai.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/agent-insights/issues")}getAgentInsightsIssueById(o,e,t){return P.fromPromise(this.__getAgentInsightsIssueById(o,e,t))}async __getAgentInsightsIssueById(o,e,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,fromDate:a,toDate:s}=e,c={project_id:i,from_date:a,to_date:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Kw.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 401:throw new O(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/private/agent-insights/issues/{issue_id}")}updateAgentInsightsIssue(o,e,t){return P.fromPromise(this.__updateAgentInsightsIssue(o,e,t))}async __updateAgentInsightsIssue(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/issues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ki.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/issues/{issue_id}")}};});var Cm,j3=n(()=>{Z();$();b();Q();q();J();te();Cm=class{constructor(o={}){this._options=M(o);}enrolProjectsInAutoFirstRun(o,e){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(o,e))}async __enrolProjectsInAutoFirstRun(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/agent-insights/enrollment"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:eD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/internal/agent-insights/enrollment")}};});var Im,E3=n(()=>{Z();$();b();Q();q();J();te();oe();Im=class{constructor(o={}){this._options=M(o);}getAgentInsightsJob(o,e={},t){return P.fromPromise(this.__getAgentInsightsJob(o,e,t))}async __getAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/agent-insights/jobs/{projectId}")}createAgentInsightsJob(o,e={},t){return P.fromPromise(this.__createAgentInsightsJob(o,e,t))}async __createAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}")}updateAgentInsightsJob(o,e,t){return P.fromPromise(this.__updateAgentInsightsJob(o,e,t))}async __updateAgentInsightsJob(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:zi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:An.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/jobs/{projectId}")}triggerAgentInsightsJob(o,e={},t){return P.fromPromise(this.__triggerAgentInsightsJob(o,e,t))}async __triggerAgentInsightsJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/agent-insights/jobs/${_.encodePathParam(o)}/trigger`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/agent-insights/jobs/{projectId}/trigger")}};});var Dm,C3=n(()=>{Z();$();b();Q();q();J();te();oe();Dm=class{constructor(o={}){this._options=M(o);}findAlerts(o={},e){return P.fromPromise(this.__findAlerts(o,e))}async __findAlerts(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,sorting:a,filters:s}=o,c={page:t,size:i,sorting:a,filters:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:zn.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/alerts")}createAlert(o,e){return P.fromPromise(this.__createAlert(o,e))}async __createAlert(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/alerts")}deleteAlertBatch(o,e){return P.fromPromise(this.__deleteAlertBatch(o,e))}async __deleteAlertBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/delete")}getAlertById(o,e={},t){return P.fromPromise(this.__getAlertById(o,e,t))}async __getAlertById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Pn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/alerts/{id}")}updateAlert(o,e,t){return P.fromPromise(this.__updateAlert(o,e,t))}async __updateAlert(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Sn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);case 422:throw new ae(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/alerts/{id}")}getWebhookExamples(o={},e){return P.fromPromise(this.__getWebhookExamples(o,e))}async __getWebhookExamples(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=o,i={alert_type:t!=null?dc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ND.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/alerts/webhooks/examples")}testWebhook(o,e){return P.fromPromise(this.__testWebhook(o,e))}async __testWebhook(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:MD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/alerts/webhooks/tests")}};});var Um,I3=n(()=>{Z();$();b();Q();q();J();te();oe();Um=class{constructor(o={}){this._options=M(o);}addItemsToAnnotationQueue(o,e,t){return P.fromPromise(this.__addItemsToAnnotationQueue(o,e,t))}async __addItemsToAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/add")}findAnnotationQueues(o={},e){return P.fromPromise(this.__findAnnotationQueues(o,e))}async __findAnnotationQueues(o={},e){var d,f,g,h,y,w,A,C,I,D,F;let{page:t,size:i,name:a,filters:s,sorting:c}=o,l={page:t,size:i,name:a,filters:s,sorting:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=e==null?void 0:e.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),e==null?void 0:e.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...e==null?void 0:e.queryParams},timeoutMs:((C=(A=e==null?void 0:e.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=e==null?void 0:e.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:sk.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/annotation-queues")}createAnnotationQueue(o,e){return P.fromPromise(this.__createAnnotationQueue(o,e))}async __createAnnotationQueue(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Si.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues")}createAnnotationQueueBatch(o,e){return P.fromPromise(this.__createAnnotationQueueBatch(o,e))}async __createAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/batch")}deleteAnnotationQueueBatch(o,e){return P.fromPromise(this.__deleteAnnotationQueueBatch(o,e))}async __deleteAnnotationQueueBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/annotation-queues/delete")}getAnnotationQueueById(o,e={},t){return P.fromPromise(this.__getAnnotationQueueById(o,e,t))}async __getAnnotationQueueById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Tn.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{id}")}updateAnnotationQueue(o,e={},t){return P.fromPromise(this.__updateAnnotationQueue(o,e,t))}async __updateAnnotationQueue(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ei.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/annotation-queues/{id}")}getAnnotationQueueLocks(o,e={},t){return P.fromPromise(this.__getAnnotationQueueLocks(o,e,t))}async __getAnnotationQueueLocks(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/locks`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:PE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/annotation-queues/{queueId}/locks")}lockAnnotationQueueItem(o,e,t={},i){return P.fromPromise(this.__lockAnnotationQueueItem(o,e,t,i))}async __lockAnnotationQueueItem(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/${_.encodePathParam(e)}/lock`),method:"PUT",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:AE.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/annotation-queues/{queueId}/items/{itemId}/lock")}removeItemsFromAnnotationQueue(o,e,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(o,e,t))}async __removeItemsFromAnnotationQueue(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/delete")}searchAnnotationQueueItems(o,e,t){return P.fromPromise(this.__searchAnnotationQueueItems(o,e,t))}async __searchAnnotationQueueItems(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/search`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ti.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:rk.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/search")}};});var Nm,D3=n(()=>{Z();$();b();Q();q();J();te();Nm=class{constructor(o={}){this._options=M(o);}storeAssertionsBatch(o,e){return P.fromPromise(this.__storeAssertionsBatch(o,e))}async __storeAssertionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ci.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/assertion-results")}};});var Fm,U3=n(()=>{Z();$();b();Q();q();J();te();oe();Fm=class{constructor(o={}){this._options=M(o);}attachmentList(o,e){return P.fromPromise(this.__attachmentList(o,e))}async __attachmentList(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,projectId:a,entityType:s,entityId:c,path:l}=o,m={page:t,size:i,project_id:a,entity_type:xc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:_k.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/list")}completeMultiPartUpload(o,e){return P.fromPromise(this.__completeMultiPartUpload(o,e))}async __completeMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-complete")}deleteAttachments(o,e){return P.fromPromise(this.__deleteAttachments(o,e))}async __deleteAttachments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:lm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/delete")}downloadAttachment(o,e){return P.fromPromise(this.__downloadAttachment(o,e))}async __downloadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{workspaceName:t,containerId:i,entityType:a,entityId:s,fileName:c,mimeType:l}=o,m={workspace_name:t,container_id:i,entity_type:wc.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:s,file_name:c,mime_type:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},responseType:"streaming",timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:d.body,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/attachment/download")}startMultiPartUpload(o,e){return P.fromPromise(this.__startMultiPartUpload(o,e))}async __startMultiPartUpload(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ii.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/attachment/upload-start")}uploadAttachment(o,e){return P.fromPromise(this.__uploadAttachment(o,e))}async __uploadAttachment(o,e){var f,g,h,y,w,A,C,I,D,F,B;let{fileName:t,projectName:i,mimeType:a,entityType:s,entityId:c,body:l}=o,m={file_name:t,project_name:i,mime_type:a,entity_type:_c.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...e==null?void 0:e.queryParams},requestType:"json",body:co.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new fe(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"PUT","/v1/private/attachment/upload")}};});var Bm,N3=n(()=>{Z();$();b();Q();q();J();te();Bm=class{constructor(o={}){this._options=M(o);}findEvaluators(o={},e){return P.fromPromise(this.__findEvaluators(o,e))}async __findEvaluators(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{projectId:t,id:i,name:a,filters:s,sorting:c,page:l,size:m}=o,u={project_id:t,id:i,name:a,filters:s,sorting:c,page:l,size:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:eP.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/automations/evaluators")}createAutomationRuleEvaluator(o,e){return P.fromPromise(this.__createAutomationRuleEvaluator(o,e))}async __createAutomationRuleEvaluator(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:XP.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/automations/evaluators")}deleteAutomationRuleEvaluatorBatch(o,e){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(o,e))}async __deleteAutomationRuleEvaluatorBatch(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,body:i}=o,a={project_id:t},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...e==null?void 0:e.queryParams},requestType:"json",body:de.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(o,e={},t){return P.fromPromise(this.__getEvaluatorById(o,e,t))}async __getEvaluatorById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:i}=e,a={project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:aP.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/automations/evaluators/{id}")}updateAutomationRuleEvaluator(o,e,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(o,e,t))}async __updateAutomationRuleEvaluator(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:VP.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/automations/evaluators/{id}")}getEvaluatorLogsById(o,e={},t){return P.fromPromise(this.__getEvaluatorLogsById(o,e,t))}async __getEvaluatorLogsById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:i}=e,a={size:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:jE.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 Mm,F3=n(()=>{Z();$();b();Q();q();J();te();Mm=class{constructor(o={}){this._options=M(o);}createChatCompletions(o={},e){return P.fromPromise(this.__createChatCompletions(o,e))}async __createChatCompletions(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ni.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:tS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/chat/completions")}};});var Wm,B3=n(()=>{Z();$();b();Q();q();J();te();oe();Wm=class{constructor(o={}){this._options=M(o);}access(o,e){return P.fromPromise(this.__access(o,e))}async __access(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tk.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/auth")}getWorkspaceName(o){return P.fromPromise(this.__getWorkspaceName(o))}async __getWorkspaceName(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/auth/workspace"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:VD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 403:throw new fe(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/auth/workspace")}};});var Lm,M3=n(()=>{Z();$();b();Q();q();J();te();oe();Lm=class{constructor(o={}){this._options=M(o);}findDashboards(o={},e){return P.fromPromise(this.__findDashboards(o,e))}async __findDashboards(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/dashboards")}createDashboard(o,e){return P.fromPromise(this.__createDashboard(o,e))}async __createDashboard(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ns.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards")}getDashboardById(o,e={},t){return P.fromPromise(this.__getDashboardById(o,e,t))}async __getDashboardById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/dashboards/{dashboardId}")}deleteDashboard(o,e={},t){return P.fromPromise(this.__deleteDashboard(o,e,t))}async __deleteDashboard(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/dashboards/{dashboardId}")}updateDashboard(o,e,t){return P.fromPromise(this.__updateDashboard(o,e,t))}async __updateDashboard(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(o,e){return P.fromPromise(this.__deleteDashboardsBatch(o,e))}async __deleteDashboardsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/dashboards/delete-batch")}};});var Vm,W3=n(()=>{Z();$();b();Br();Q();q();J();te();oe();Vm=class{constructor(o={}){this._options=M(o);}applyDatasetItemChanges(o,e,t){return P.fromPromise(this.__applyDatasetItemChanges(o,e,t))}async __applyDatasetItemChanges(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:i,body:a}=e,s={override:i},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/changes`),method:"POST",headers:c,contentType:"application/json",queryParameters:{...s,...t==null?void 0:t.queryParams},requestType:"json",body:gv.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:Kr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 409:throw new X(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"POST","/v1/private/datasets/{id}/items/changes")}batchUpdateDatasetItems(o,e){return P.fromPromise(this.__batchUpdateDatasetItems(o,e))}async __batchUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ji.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/datasets/items/batch")}findDatasets(o={},e){return P.fromPromise(this.__findDatasets(o,e))}async __findDatasets(o={},e){var y,w,A,C,I,D,F,B,Y,ne,we;let{page:t,size:i,withExperimentsOnly:a,withOptimizationsOnly:s,promptId:c,projectId:l,name:m,sorting:u,filters:d}=o,f={page:t,size:i,with_experiments_only:a,with_optimizations_only:s,prompt_id:c,project_id:l,name:m,sorting:u,filters:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=e==null?void 0:e.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),e==null?void 0:e.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...e==null?void 0:e.queryParams},timeoutMs:((B=(F=e==null?void 0:e.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?B:60)*1e3,maxRetries:(ne=e==null?void 0:e.maxRetries)!=null?ne:(Y=this._options)==null?void 0:Y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(we=this._options)==null?void 0:we.fetch,logging:this._options.logging});if(h.ok)return {data:hs.parseOrThrow(h.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:h.rawResponse};if(h.error.reason==="status-code")throw new k({statusCode:h.error.statusCode,body:h.error.body,rawResponse:h.rawResponse});return j(h.error,h.rawResponse,"GET","/v1/private/datasets")}createDataset(o,e){return P.fromPromise(this.__createDataset(o,e))}async __createDataset(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:qi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets")}createOrUpdateDatasetItems(o,e){return P.fromPromise(this.__createOrUpdateDatasetItems(o,e))}async __createOrUpdateDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Gi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/datasets/items")}createDatasetItemsFromCsv(o,e){return P.fromPromise(this.__createDatasetItemsFromCsv(o,e))}async __createDatasetItemsFromCsv(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await ih();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId);let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-csv")}createDatasetItemsFromJson(o,e){return P.fromPromise(this.__createDatasetItemsFromJson(o,e))}async __createDatasetItemsFromJson(o,e){var c,l,m,u,d,f,g,h,y,w,A;let t=await ih();t.append("file",$e(o.file)),t.append("dataset_id",o.datasetId),t.append("format",Ec.jsonOrThrow(o.format,{unrecognizedObjectKeys:"strip",omitUndefined:true}));let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-json"),method:"POST",headers:a,queryParameters:e==null?void 0:e.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-json")}createDatasetItemsFromSpans(o,e,t){return P.fromPromise(this.__createDatasetItemsFromSpans(o,e,t))}async __createDatasetItemsFromSpans(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-spans`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Fi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(o,e,t){return P.fromPromise(this.__createDatasetItemsFromTraces(o,e,t))}async __createDatasetItemsFromTraces(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/from-traces`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(o,e={},t){return P.fromPromise(this.__getDatasetById(o,e,t))}async __getDatasetById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:To.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}")}updateDataset(o,e,t){return P.fromPromise(this.__updateDataset(o,e,t))}async __updateDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:$i.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/{id}")}deleteDataset(o,e={},t){return P.fromPromise(this.__deleteDataset(o,e,t))}async __deleteDataset(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/datasets/{id}")}deleteDatasetByName(o,e){return P.fromPromise(this.__deleteDatasetByName(o,e))}async __deleteDatasetByName(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete")}deleteDatasetItems(o={},e){return P.fromPromise(this.__deleteDatasetItems(o,e))}async __deleteDatasetItems(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ki.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/delete")}deleteDatasetsBatch(o,e){return P.fromPromise(this.__deleteDatasetsBatch(o,e))}async __deleteDatasetsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/delete-batch")}downloadDatasetExport(o,e={},t){return P.fromPromise(this.__downloadDatasetExport(o,e,t))}async __downloadDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/download`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,responseType:"streaming",timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:a.body,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}/download")}expandDataset(o,e,t){return P.fromPromise(this.__expandDataset(o,e,t))}async __expandDataset(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/expansions`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Mi.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:uv.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/expansions")}findDatasetItemsWithExperimentItems(o,e,t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(o,e,t))}async __findDatasetItemsWithExperimentItems(o,e,t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,experimentIds:s,filters:c,sorting:l,search:m,truncate:u}=e,d={page:i,size:a,experiment_ids:s,filters:c,sorting:l,search:m,truncate:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Hv.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(o,e){return P.fromPromise(this.__getDatasetByIdentifier(o,e))}async __getDatasetByIdentifier(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Li.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:To.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/retrieve")}getDatasetExperimentItemsStats(o,e,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(o,e,t))}async __getDatasetExperimentItemsStats(o,e,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:i,filters:a}=e,s={experiment_ids:i,filters:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/stats`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Qr.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/stats")}getDatasetExportJob(o,e={},t){return P.fromPromise(this.__getDatasetExportJob(o,e,t))}async __getDatasetExportJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:uo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/export-jobs/{jobId}")}getDatasetExportJobs(o){return P.fromPromise(this.__getDatasetExportJobs(o))}async __getDatasetExportJobs(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/datasets/export-jobs"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:go.getDatasetExportJobs.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/datasets/export-jobs")}getDatasetItemById(o,e={},t){return P.fromPromise(this.__getDatasetItemById(o,e,t))}async __getDatasetItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:gs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/items/{itemId}")}patchDatasetItem(o,e,t){return P.fromPromise(this.__patchDatasetItem(o,e,t))}async __patchDatasetItem(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Hi.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/items/{itemId}")}getDatasetItems(o,e={},t){return P.fromPromise(this.__getDatasetItems(o,e,t))}async __getDatasetItems(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,version:s,filters:c,truncate:l}=e,m={page:i,size:a,version:s,filters:c,truncate:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:oT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/datasets/{id}/items")}getDatasetItemsOutputColumns(o,e={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(o,e,t))}async __getDatasetItemsOutputColumns(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:i}=e,a={experiment_ids:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items/output/columns`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:DC.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items/output/columns")}markDatasetExportJobViewed(o,e={},t){return P.fromPromise(this.__markDatasetExportJobViewed(o,e,t))}async __markDatasetExportJobViewed(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/export-jobs/${_.encodePathParam(o)}/mark-viewed`),method:"PUT",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/datasets/export-jobs/{jobId}/mark-viewed")}startDatasetExport(o,e={},t){return P.fromPromise(this.__startDatasetExport(o,e,t))}async __startDatasetExport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/export`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:uo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetItems(o,e){return P.fromPromise(this.__streamDatasetItems(o,e))}async __streamDatasetItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Oi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/datasets/items/stream")}compareDatasetVersions(o,e={},t){return P.fromPromise(this.__compareDatasetVersions(o,e,t))}async __compareDatasetVersions(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/diff`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data: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/datasets/{id}/versions/diff")}createVersionTag(o,e,t,i){return P.fromPromise(this.__createVersionTag(o,e,t,i))}async __createVersionTag(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Xi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/datasets/{id}/versions/hash/{versionHash}/tags")}deleteVersionTag(o,e,t,i={},a){return P.fromPromise(this.__deleteVersionTag(o,e,t,i,a))}async __deleteVersionTag(o,e,t,i={},a){var l,m,u,d,f,g,h,y,w,A,C;let s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=a==null?void 0:a.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),a==null?void 0:a.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}listDatasetVersions(o,e={},t){return P.fromPromise(this.__listDatasetVersions(o,e,t))}async __listDatasetVersions(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:fT.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw l.error.statusCode===400?new N(l.error.body,l.rawResponse):new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/datasets/{id}/versions")}restoreDatasetVersion(o,e,t){return P.fromPromise(this.__restoreDatasetVersion(o,e,t))}async __restoreDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/restore`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Qi.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Kr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/restore")}retrieveDatasetVersion(o,e,t){return P.fromPromise(this.__retrieveDatasetVersion(o,e,t))}async __retrieveDatasetVersion(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/retrieve`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Yi.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:Kr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}updateDatasetVersion(o,e,t={},i){return P.fromPromise(this.__updateDatasetVersion(o,e,t,i))}async __updateDatasetVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/versions/hash/${_.encodePathParam(e)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Zi.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Kr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}};});var Jm,L3=n(()=>{Z();$();b();Q();q();J();te();oe();Jm=class{constructor(o={}){this._options=M(o);}findEnvironments(o){return P.fromPromise(this.__findEnvironments(o))}async __findEnvironments(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/environments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:RT.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/environments")}createEnvironment(o,e){return P.fromPromise(this.__createEnvironment(o,e))}async __createEnvironment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments")}deleteEnvironmentsBatch(o,e){return P.fromPromise(this.__deleteEnvironmentsBatch(o,e))}async __deleteEnvironmentsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/environments/delete")}getEnvironmentById(o,e={},t){return P.fromPromise(this.__getEnvironmentById(o,e,t))}async __getEnvironmentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:bs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/environments/{id}")}updateEnvironment(o,e={},t){return P.fromPromise(this.__updateEnvironment(o,e,t))}async __updateEnvironment(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/environments/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/environments/{id}")}};});var Hm,V3=n(()=>{Z();$();b();Q();q();J();te();oe();Hm=class{constructor(o={}){this._options=M(o);}batchUpdateExperiments(o,e){return P.fromPromise(this.__batchUpdateExperiments(o,e))}async __batchUpdateExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/experiments/batch")}findExperiments(o={},e){return P.fromPromise(this.__findExperiments(o,e))}async __findExperiments(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Fr,ai;let{page:t,size:i,datasetId:a,optimizationId:s,types:c,name:l,datasetDeleted:m,promptId:u,projectId:d,projectDeleted:f,sorting:g,filters:h,experimentIds:y,forceSorting:w}=o,A={page:t,size:i,datasetId:a,optimization_id:s,types:c,name:l,dataset_deleted:m,prompt_id:u,project_id:d,project_deleted:f,sorting:g,filters:h,experiment_ids:y,force_sorting:w},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Fr=e==null?void 0:e.maxRetries)!=null?Fr:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ai=this._options)==null?void 0:ai.fetch,logging:this._options.logging});if(I.ok)return {data:zs.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw I.error.statusCode===400?new N(I.error.body,I.rawResponse):new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/experiments")}createExperiment(o,e){return P.fromPromise(this.__createExperiment(o,e))}async __createExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments")}createExperimentItems(o,e){return P.fromPromise(this.__createExperimentItems(o,e))}async __createExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items")}deleteExperimentItems(o,e){return P.fromPromise(this.__deleteExperimentItems(o,e))}async __deleteExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/delete")}deleteExperimentsById(o,e){return P.fromPromise(this.__deleteExperimentsById(o,e))}async __deleteExperimentsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/delete")}executeExperiment(o,e){return P.fromPromise(this.__executeExperiment(o,e))}async __executeExperiment(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:na.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:jT.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/execute")}experimentItemsBulk(o,e){return P.fromPromise(this.__experimentItemsBulk(o,e))}async __experimentItemsBulk(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ca.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/experiments/items/bulk")}findFeedbackScoreNames(o={},e){return P.fromPromise(this.__findFeedbackScoreNames(o,e))}async __findFeedbackScoreNames(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:t,projectId:i}=o,a={experiment_ids:t,project_id:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/experiments/feedback-scores/names")}findExperimentGroups(o={},e){return P.fromPromise(this.__findExperimentGroups(o,e))}async __findExperimentGroups(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:WT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups")}findExperimentGroupsAggregations(o={},e){return P.fromPromise(this.__findExperimentGroupsAggregations(o,e))}async __findExperimentGroupsAggregations(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{groups:t,types:i,name:a,projectId:s,projectDeleted:c,filters:l}=o,m={groups:t,types:i,name:a,project_id:s,project_deleted:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:IT.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw d.error.statusCode===400?new N(d.error.body,d.rawResponse):new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/experiments/groups/aggregations")}finishExperiments(o,e){return P.fromPromise(this.__finishExperiments(o,e))}async __finishExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/finish")}getExperimentById(o,e={},t){return P.fromPromise(this.__getExperimentById(o,e,t))}async __getExperimentById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ps.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/{id}")}updateExperiment(o,e,t){return P.fromPromise(this.__updateExperiment(o,e,t))}async __updateExperiment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:oa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/experiments/{id}")}getExperimentItemById(o,e={},t){return P.fromPromise(this.__getExperimentItemById(o,e,t))}async __getExperimentItemById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/experiments/items/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:us.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/items/{id}")}streamExperimentItems(o,e){return P.fromPromise(this.__streamExperimentItems(o,e))}async __streamExperimentItems(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:la.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/items/stream")}streamExperiments(o,e){return P.fromPromise(this.__streamExperiments(o,e))}async __streamExperiments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/experiments/stream")}};});var Gm,J3=n(()=>{Z();$();b();Q();q();J();te();oe();Gm=class{constructor(o={}){this._options=M(o);}findFeedbackDefinitions(o={},e){return P.fromPromise(this.__findFeedbackDefinitions(o,e))}async __findFeedbackDefinitions(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,type:s}=o,c={page:t,size:i,name:a,type:s!=null?Lc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:vj.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/feedback-definitions")}createFeedbackDefinition(o,e){return P.fromPromise(this.__createFeedbackDefinition(o,e))}async __createFeedbackDefinition(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_j.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions")}getFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__getFeedbackDefinitionById(o,e,t))}async __getFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:jj.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/feedback-definitions/{id}")}updateFeedbackDefinition(o,e,t){return P.fromPromise(this.__updateFeedbackDefinition(o,e,t))}async __updateFeedbackDefinition(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qj.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionById(o,e={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(o,e,t))}async __deleteFeedbackDefinitionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/feedback-definitions/{id}")}deleteFeedbackDefinitionsBatch(o,e){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(o,e))}async __deleteFeedbackDefinitionsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/feedback-definitions/delete")}};});var Om,H3=n(()=>{Z();$();b();Q();q();J();te();Om=class{constructor(o={}){this._options=M(o);}createGuardrails(o,e){return P.fromPromise(this.__createGuardrails(o,e))}async __createGuardrails(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/guardrails")}};});var Km,G3=n(()=>{Z();$();b();Q();q();J();te();oe();Km=class{constructor(o={}){this._options=M(o);}findInsightsViews(o={},e){return P.fromPromise(this.__findInsightsViews(o,e))}async __findInsightsViews(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/insights-views")}createInsightsView(o,e){return P.fromPromise(this.__createInsightsView(o,e))}async __createInsightsView(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ns.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:or.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views")}getInsightsViewById(o,e={},t){return P.fromPromise(this.__getInsightsViewById(o,e,t))}async __getInsightsViewById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:or.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/insights-views/{insightsViewId}")}deleteInsightsView(o,e={},t){return P.fromPromise(this.__deleteInsightsView(o,e,t))}async __deleteInsightsView(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/insights-views/{insightsViewId}")}updateInsightsView(o,e,t){return P.fromPromise(this.__updateInsightsView(o,e,t))}async __updateInsightsView(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:as.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:or.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(o,e){return P.fromPromise(this.__deleteInsightsViewsBatch(o,e))}async __deleteInsightsViewsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/insights-views/delete-batch")}};});var $m,O3=n(()=>{Z();$();b();Q();q();J();te();$m=class{constructor(o={}){this._options=M(o);}getLlmModels(o){return P.fromPromise(this.__getLlmModels(o))}async __getLlmModels(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm/models"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:ho.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 Qm,K3=n(()=>{Z();$();b();Q();q();J();te();oe();Qm=class{constructor(o={}){this._options=M(o);}deleteLlmProviderApiKeysBatch(o,e){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(o,e))}async __deleteLlmProviderApiKeysBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/delete")}findLlmProviderKeys(o){return P.fromPromise(this.__findLlmProviderKeys(o))}async __findLlmProviderKeys(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/llm-provider-key"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:HI.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm-provider-key")}storeLlmProviderApiKey(o,e){return P.fromPromise(this.__storeLlmProviderApiKey(o,e))}async __storeLlmProviderApiKey(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 401:throw new O(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key")}getLlmProviderApiKeyById(o,e={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(o,e,t))}async __getLlmProviderApiKeyById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ns.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/llm-provider-key/{id}")}updateLlmProviderApiKey(o,e={},t){return P.fromPromise(this.__updateLlmProviderApiKey(o,e,t))}async __updateLlmProviderApiKey(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/llm-provider-key/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/llm-provider-key/{id}")}testLlmProviderAuthConfig(o={},e){return P.fromPromise(this.__testLlmProviderAuthConfig(o,e))}async __testLlmProviderAuthConfig(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/auth-config/test"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 403:throw new fe(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/llm-provider-key/auth-config/test")}};});var Ym,$3=n(()=>{Z();$();b();Q();q();J();te();oe();Ym=class{constructor(o={}){this._options=M(o);}evaluateSpans(o,e){return P.fromPromise(this.__evaluateSpans(o,e))}async __evaluateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/spans")}evaluateThreads(o,e){return P.fromPromise(this.__evaluateThreads(o,e))}async __evaluateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/threads")}evaluateTraces(o,e){return P.fromPromise(this.__evaluateTraces(o,e))}async __evaluateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Es.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/manual-evaluation/traces")}};});var Xm,Q3=n(()=>{Z();$();b();Q();q();J();te();oe();Xm=class{constructor(o={}){this._options=M(o);}authorize(o,e){return P.fromPromise(this.__authorize(o,e))}async __authorize(o,e){var g,h,y,w,A,C,I,D,F,B,Y;let{clientId:t,redirectUri:i,responseType:a,codeChallenge:s,codeChallengeMethod:c,resource:l,state:m}=o,u={client_id:t,redirect_uri:i,response_type:a,code_challenge:s,code_challenge_method:c,resource:l,state:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"oauth/authorize"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:void 0,rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/oauth/authorize")}consent(o,e){return P.fromPromise(this.__consent(o,e))}async __consent(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/authorize"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_a.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:BS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/authorize")}getAuthorizeContext(o,e){return P.fromPromise(this.__getAuthorizeContext(o,e))}async __getAuthorizeContext(o,e){var l,m,u,d,f,g,h,y,w,A,C;let{clientId:t,redirectUri:i}=o,a={client_id:t,redirect_uri:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"oauth/authorize/context"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ik.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/oauth/authorize/context")}getOAuthAuthorizationServerMetadata(o){return P.fromPromise(this.__getOAuthAuthorizationServerMetadata(o))}async __getOAuthAuthorizationServerMetadata(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,".well-known/oauth-authorization-server"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:jk.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/.well-known/oauth-authorization-server")}registerOAuthClient(o,e){return P.fromPromise(this.__registerOAuthClient(o,e))}async __registerOAuthClient(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/register"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:RS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===429?new Qe(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/register")}revoke(o={},e){return P.fromPromise(this.__revoke(o,e))}async __revoke(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/revoke"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/revoke")}token(o={},e){return P.fromPromise(this.__token(o,e))}async __token(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/token"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:e==null?void 0:e.queryParams,requestType:"form",body:Aa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:bD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/oauth/token")}validateOAuthToken(o){return P.fromPromise(this.__validateOAuthToken(o))}async __validateOAuthToken(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"opik/auth-oauth"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:UD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/opik/auth-oauth")}};});var Zm,Y3=n(()=>{Z();$();b();Q();q();J();te();oe();Zm=class{constructor(o={}){this._options=M(o);}listModels(o,e){return P.fromPromise(this.__listModels(o,e))}async __listModels(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Am.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yo.listModels.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 500:throw new lt(i.error.body,i.rawResponse);case 503:throw new to(Eo.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/models")}testConnection(o,e){return P.fromPromise(this.__testConnection(o,e))}async __testConnection(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Am.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:km.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 422:throw new ae(i.error.body,i.rawResponse);case 502:throw new li(km.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 503:throw new to(Eo.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/ollama/test-connection")}};});var qm,X3=n(()=>{Z();$();b();Q();q();J();oe();qm=class{constructor(o={}){this._options=M(o);}downloadOllieState(o){return P.fromPromise(this.__downloadOllieState(o))}async __downloadOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,responseType:"streaming",timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 401:throw new O(t.error.body,t.rawResponse);case 404:throw new U(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/ollie/state")}replaceOllieState(o,e){return P.fromPromise(this.__replaceOllieState(o,e))}async __replaceOllieState(o,e){var s,c,l,m,u,d,f,g,h,y,w;let t=await ui.toBinaryUploadRequest(o),i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=e==null?void 0:e.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,e==null?void 0:e.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,"v1/private/ollie/state"),method:"PUT",headers:i,contentType:"application/gzip",queryParameters:e==null?void 0:e.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=e==null?void 0:e.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=e==null?void 0:e.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/ollie/state")}deleteOllieState(o){return P.fromPromise(this.__deleteOllieState(o))}async __deleteOllieState(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/ollie/state"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===401?new O(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/ollie/state")}};});var ed,Z3=n(()=>{Z();$();b();Q();q();J();ed=class{constructor(o={}){this._options=M(o);}receiveProtobufTraces(o){return P.fromPromise(this.__receiveProtobufTraces(o))}async __receiveProtobufTraces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/otel/v1/traces"),method:"POST",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"POST","/v1/private/otel/v1/traces")}};});var rd,q3=n(()=>{Z();$();b();Q();q();J();te();oe();rd=class{constructor(o={}){this._options=M(o);}findOptimizations(o={},e){return P.fromPromise(this.__findOptimizations(o,e))}async __findOptimizations(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:t,size:i,datasetId:a,name:s,datasetName:c,datasetDeleted:l,projectId:m,filters:u}=o,d={page:t,size:i,dataset_id:a,name:s,dataset_name:c,dataset_deleted:l,project_id:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Is.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/optimizations")}createOptimization(o,e){return P.fromPromise(this.__createOptimization(o,e))}async __createOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations")}upsertOptimization(o,e){return P.fromPromise(this.__upsertOptimization(o,e))}async __upsertOptimization(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Pm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/optimizations")}deleteOptimizationsById(o,e){return P.fromPromise(this.__deleteOptimizationsById(o,e))}async __deleteOptimizationsById(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:jo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/optimizations/delete")}getOptimizationById(o,e={},t){return P.fromPromise(this.__getOptimizationById(o,e,t))}async __getOptimizationById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Cs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/{id}")}updateOptimizationsById(o,e={},t){return P.fromPromise(this.__updateOptimizationsById(o,e,t))}async __updateOptimizationsById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pa.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/optimizations/{id}")}getStudioOptimizationLogs(o,e={},t){return P.fromPromise(this.__getStudioOptimizationLogs(o,e,t))}async __getStudioOptimizationLogs(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/optimizations/studio/${_.encodePathParam(o)}/logs`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:EC.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 td,e8=n(()=>{Z();$();b();Q();q();J();te();oe();td=class{constructor(o={}){this._options=M(o);}activatePairingSession(o,e,t){return P.fromPromise(this.__activatePairingSession(o,e,t))}async __activatePairingSession(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/pairing/sessions/${_.encodePathParam(o)}/activate`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:za.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new fe(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/pairing/sessions/{sessionId}/activate")}createPairingSession(o,e){return P.fromPromise(this.__createPairingSession(o,e))}async __createPairingSession(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LS.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 429:throw new Qe(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/pairing/sessions")}};});var od,r8=n(()=>{Z();$();b();Q();q();J();te();oe();od=class{constructor(o={}){this._options=M(o);}findAlertsByProject(o,e={},t){return P.fromPromise(this.__findAlertsByProject(o,e,t))}async __findAlertsByProject(o,e={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:i,size:a,sorting:s,filters:c}=e,l={page:i,size:a,sorting:s,filters:c},m=z((d=this._options)==null?void 0:d.headers,T({"Comet-Workspace":(g=t==null?void 0:t.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),t==null?void 0:t.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,`v1/private/projects/${_.encodePathParam(o)}/alerts`),method:"GET",headers:m,queryParameters:{...l,...t==null?void 0:t.queryParams},timeoutMs:((C=(A=t==null?void 0:t.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=t==null?void 0:t.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:zn.parseOrThrow(u.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:u.rawResponse};if(u.error.reason==="status-code")throw u.error.statusCode===400?new N(u.error.body,u.rawResponse):new k({statusCode:u.error.statusCode,body:u.error.body,rawResponse:u.rawResponse});return j(u.error,u.rawResponse,"GET","/v1/private/projects/{projectId}/alerts")}findDashboardsByProject(o,e={},t){return P.fromPromise(this.__findDashboardsByProject(o,e,t))}async __findDashboardsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/dashboards`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Nt.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/dashboards")}findDatasetsByProject(o,e={},t){return P.fromPromise(this.__findDatasetsByProject(o,e,t))}async __findDatasetsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=e,d={page:i,size:a,with_experiments_only:s,with_optimizations_only:c,name:l,sorting:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/datasets`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:hs.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/datasets")}findExperimentsByProject(o,e={},t){return P.fromPromise(this.__findExperimentsByProject(o,e,t))}async __findExperimentsByProject(o,e={},t){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:i,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=e,y={page:i,size:a,datasetId:s,optimization_id:c,types:l,name:m,dataset_deleted:u,sorting:d,filters:f,experiment_ids:g,force_sorting:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=t==null?void 0:t.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),t==null?void 0:t.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,`v1/private/projects/${_.encodePathParam(o)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((we=(ne=t==null?void 0:t.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=t==null?void 0:t.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data: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 N(A.error.body,A.rawResponse):new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/projects/{projectId}/experiments")}findOptimizationsByProject(o,e={},t){return P.fromPromise(this.__findOptimizationsByProject(o,e,t))}async __findOptimizationsByProject(o,e={},t){var h,y,w,A,C,I,D,F,B,Y,ne;let{page:i,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=e,d={page:i,size:a,dataset_id:s,dataset_name:c,name:l,dataset_deleted:m,filters:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=t==null?void 0:t.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),t==null?void 0:t.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,`v1/private/projects/${_.encodePathParam(o)}/optimizations`),method:"GET",headers:f,queryParameters:{...d,...t==null?void 0:t.queryParams},timeoutMs:((F=(D=t==null?void 0:t.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=t==null?void 0:t.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Is.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw g.error.statusCode===400?new N(g.error.body,g.rawResponse):new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/projects/{projectId}/optimizations")}getPromptsByProject(o,e={},t){return P.fromPromise(this.__getPromptsByProject(o,e,t))}async __getPromptsByProject(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,name:s,sorting:c,filters:l}=e,m={page:i,size:a,name:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/projects/${_.encodePathParam(o)}/prompts`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Us.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/projects/{projectId}/prompts")}findProjects(o={},e){return P.fromPromise(this.__findProjects(o,e))}async __findProjects(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{page:t,size:i,name:a,sorting:s}=o,c={page:t,size:i,name:a,sorting:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:tI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/projects")}createProject(o,e){return P.fromPromise(this.__createProject(o,e))}async __createProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects")}getProjectById(o,e={},t){return P.fromPromise(this.__getProjectById(o,e,t))}async __getProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ds.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}")}deleteProjectById(o,e={},t){return P.fromPromise(this.__deleteProjectById(o,e,t))}async __deleteProjectById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===409?new X(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/projects/{id}")}updateProject(o,e={},t){return P.fromPromise(this.__updateProject(o,e,t))}async __updateProject(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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 N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/projects/{id}")}deleteProjectsBatch(o,e){return P.fromPromise(this.__deleteProjectsBatch(o,e))}async __deleteProjectsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/projects/delete")}findFeedbackScoreNamesByProjectIds(o={},e){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(o,e))}async __findFeedbackScoreNamesByProjectIds(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectIds:t}=o,i={project_ids:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Mj.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/projects/feedback-scores/names")}findTokenUsageNames(o,e={},t){return P.fromPromise(this.__findTokenUsageNames(o,e,t))}async __findTokenUsageNames(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/token-usage/names`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ws.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}/token-usage/names")}getProjectKpiCards(o,e,t){return P.fromPromise(this.__getProjectKpiCards(o,e,t))}async __getProjectKpiCards(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/kpi-cards`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:va.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:fE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/kpi-cards")}getProjectMetrics(o,e={},t){return P.fromPromise(this.__getProjectMetrics(o,e,t))}async __getProjectMetrics(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/metrics`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ja.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:ZC.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{id}/metrics")}getProjectStats(o={},e){return P.fromPromise(this.__getProjectStats(o,e))}async __getProjectStats(o={},e){var g,h,y,w,A,C,I,D,F,B,Y;let{page:t,size:i,name:a,filters:s,fromTime:c,toTime:l,sorting:m}=o,u={page:t,size:i,name:a,filters:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString(),sorting:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=e==null?void 0:e.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),e==null?void 0:e.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/projects/stats"),method:"GET",headers:d,queryParameters:{...u,...e==null?void 0:e.queryParams},timeoutMs:((D=(I=e==null?void 0:e.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(B=e==null?void 0:e.maxRetries)!=null?B:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Y=this._options)==null?void 0:Y.fetch,logging:this._options.logging});if(f.ok)return {data:pI.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/projects/stats")}retrieveProject(o,e){return P.fromPromise(this.__retrieveProject(o,e))}async __retrieveProject(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ea.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:GC.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/projects/retrieve")}getRecentActivity(o,e={},t){return P.fromPromise(this.__getRecentActivity(o,e,t))}async __getRecentActivity(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/activities`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:QI.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 500:throw new lt(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/activities")}};});var id,t8=n(()=>{Z();$();b();Q();q();J();te();oe();id=class{constructor(o={}){this._options=M(o);}getPrompts(o={},e){return P.fromPromise(this.__getPrompts(o,e))}async __getPrompts(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{page:t,size:i,name:a,projectId:s,sorting:c,filters:l}=o,m={page:t,size:i,name:a,project_id:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Us.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts")}createPrompt(o,e){return P.fromPromise(this.__createPrompt(o,e))}async __createPrompt(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Va.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts")}createPromptVersion(o,e){return P.fromPromise(this.__createPromptVersion(o,e))}async __createPromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ua.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions")}updatePromptVersions(o,e){return P.fromPromise(this.__updatePromptVersions(o,e))}async __updatePromptVersions(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/prompts/versions")}getPromptById(o,e={},t){return P.fromPromise(this.__getPromptById(o,e,t))}async __getPromptById(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:i,environment:a}=e,s={mask_id:i,environment:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Sm.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/private/prompts/{id}")}updatePrompt(o,e,t){return P.fromPromise(this.__updatePrompt(o,e,t))}async __updatePrompt(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Na.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/prompts/{id}")}deletePrompt(o,e={},t){return P.fromPromise(this.__deletePrompt(o,e,t))}async __deletePrompt(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/prompts/{id}")}deletePromptsBatch(o,e){return P.fromPromise(this.__deletePromptsBatch(o,e))}async __deletePromptsBatch(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/delete")}getPromptByCommit(o,e={},t){return P.fromPromise(this.__getPromptByCommit(o,e,t))}async __getPromptByCommit(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/by-commit/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Sm.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/prompts/by-commit/{commit}")}getPromptVersionById(o,e={},t){return P.fromPromise(this.__getPromptVersionById(o,e,t))}async __getPromptVersionById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:De.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/prompts/versions/{versionId}")}getPromptVersionByNumber(o,e,t={},i){return P.fromPromise(this.__getPromptVersionByNumber(o,e,t,i))}async __getPromptVersionByNumber(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/by-number/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"GET","/v1/private/prompts/{promptId}/versions/by-number/{versionNumber}")}getPromptVersions(o,e={},t){return P.fromPromise(this.__getPromptVersions(o,e,t))}async __getPromptVersions(o,e={},t){var f,g,h,y,w,A,C,I,D,F,B;let{page:i,size:a,search:s,sorting:c,filters:l}=e,m={page:i,size:a,search:s,sorting:c,filters:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=t==null?void 0:t.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),t==null?void 0:t.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions`),method:"GET",headers:u,queryParameters:{...m,...t==null?void 0:t.queryParams},timeoutMs:((I=(C=t==null?void 0:t.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=t==null?void 0:t.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:DI.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/prompts/{id}/versions")}getPromptsByCommits(o,e){return P.fromPromise(this.__getPromptsByCommits(o,e))}async __getPromptsByCommits(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xt.getPromptsByCommits.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/retrieve-by-commits")}restorePromptVersion(o,e,t={},i){return P.fromPromise(this.__restorePromptVersion(o,e,t,i))}async __restorePromptVersion(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/prompts/${_.encodePathParam(o)}/versions/${_.encodePathParam(e)}/restore`),method:"POST",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:De.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/prompts/{promptId}/versions/{versionId}/restore")}retrievePromptVersion(o,e){return P.fromPromise(this.__retrievePromptVersion(o,e))}async __retrievePromptVersion(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:La.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:De.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve")}retrievePromptVersionsByIds(o,e){return P.fromPromise(this.__retrievePromptVersionsByIds(o,e))}async __retrievePromptVersionsByIds(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve-by-ids"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xt.retrievePromptVersionsByIds.Response.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/prompts/versions/retrieve-by-ids")}setPromptVersionEnvironment(o,e,t){return P.fromPromise(this.__setPromptVersionEnvironment(o,e,t))}async __setPromptVersionEnvironment(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/prompts/versions/${_.encodePathParam(o)}/environments`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ma.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/prompts/versions/{versionId}/environments")}};});var ad,o8=n(()=>{Z();$();b();Q();q();J();oe();ad=class{constructor(o={}){this._options=M(o);}datasetsRedirect(o,e){return P.fromPromise(this.__datasetsRedirect(o,e))}async __datasetsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{datasetId:t,workspaceName:i,path:a}=o,s={dataset_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/datasets")}experimentsRedirect(o,e){return P.fromPromise(this.__experimentsRedirect(o,e))}async __experimentsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,experimentId:i,workspaceName:a,path:s}=o,c={dataset_id:t,experiment_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/experiments")}optimizationsRedirect(o,e){return P.fromPromise(this.__optimizationsRedirect(o,e))}async __optimizationsRedirect(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{datasetId:t,optimizationId:i,workspaceName:a,path:s}=o,c={dataset_id:t,optimization_id:i,workspace_name:a,path:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/optimizations")}projectsRedirect(o,e){return P.fromPromise(this.__projectsRedirect(o,e))}async __projectsRedirect(o,e){var m,u,d,f,g,h,y,w,A,C,I;let{traceId:t,workspaceName:i,path:a}=o,s={trace_id:t,workspace_name:i,path:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/projects")}};});var nd,i8=n(()=>{Z();$();b();Q();q();J();te();oe();nd=class{constructor(o={}){this._options=M(o);}findReportFailures(o,e){return P.fromPromise(this.__findReportFailures(o,e))}async __findReportFailures(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:i,page:a,size:s}=o,c={type:ml.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/report-failures"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:qI.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===401?new O(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/report-failures")}createReportFailure(o,e){return P.fromPromise(this.__createReportFailure(o,e))}async __createReportFailure(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/report-failures"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Fs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/report-failures")}};});var sd,a8=n(()=>{Z();$();b();Q();q();J();te();oe();sd=class{constructor(o={}){this._options=M(o);}completeReport(o,e,t,i){return P.fromPromise(this.__completeReport(o,e,t,i))}async __completeReport(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/${_.encodePathParam(e)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Ja.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/projects/{projectId}/reports/{reportId}/complete")}generateReport(o,e={},t){return P.fromPromise(this.__generateReport(o,e,t))}async __generateReport(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/generate`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:eE.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new fe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/projects/{projectId}/reports/generate")}getReportPreference(o,e={},t){return P.fromPromise(this.__getReportPreference(o,e,t))}async __getReportPreference(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Bs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{projectId}/reports/preferences")}updateReportPreference(o,e,t){return P.fromPromise(this.__updateReportPreference(o,e,t))}async __updateReportPreference(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bs.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Bs.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/projects/{projectId}/reports/preferences")}getReports(o,e={},t){return P.fromPromise(this.__getReports(o,e,t))}async __getReports(o,e={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=e,s={page:i,size:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=t==null?void 0:t.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),t==null?void 0:t.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports`),method:"GET",headers:c,queryParameters:{...s,...t==null?void 0:t.queryParams},timeoutMs:((w=(y=t==null?void 0:t.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=t==null?void 0:t.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:FE.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/projects/{projectId}/reports")}};});var pd,n8=n(()=>{Z();$();b();Q();q();J();te();oe();pd=class{constructor(o={}){this._options=M(o);}findRetentionRules(o={},e){return P.fromPromise(this.__findRetentionRules(o,e))}async __findRetentionRules(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{page:t,size:i,includeInactive:a}=o,s={page:t,size:i,include_inactive:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:nD.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/retention/rules")}createRetentionRule(o,e){return P.fromPromise(this.__createRetentionRule(o,e))}async __createRetentionRule(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Do.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/retention/rules")}getRetentionRuleById(o,e={},t){return P.fromPromise(this.__getRetentionRuleById(o,e,t))}async __getRetentionRuleById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Do.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/retention/rules/{ruleId}")}deactivateRetentionRule(o,e={},t){return P.fromPromise(this.__deactivateRetentionRule(o,e,t))}async __deactivateRetentionRule(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/retention/rules/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/retention/rules/{ruleId}")}};});var cd,s8=n(()=>{Z();$();b();Q();q();J();te();oe();cd=class{constructor(o={}){this._options=M(o);}getJobLogs(o,e={},t){return P.fromPromise(this.__getJobLogs(o,e,t))}async __getJobLogs(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:i}=e,a={offset:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:ur.getJobLogs.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}/logs")}appendJobLogs(o,e,t){return P.fromPromise(this.__appendJobLogs(o,e,t))}async __appendJobLogs(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.appendJobLogs.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/logs")}cancelJob(o,e={},t){return P.fromPromise(this.__cancelJob(o,e,t))}async __cancelJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/cancel`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/cancel")}createBridgeCommand(o,e,t){return P.fromPromise(this.__createBridgeCommand(o,e,t))}async __createBridgeCommand(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:Sz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new X(a.error.body,a.rawResponse);case 429:throw new Qe(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands")}createJob(o,e){return P.fromPromise(this.__createJob(o,e))}async __createJob(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Qa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 404:throw new U(i.error.body,i.rawResponse);case 409:throw new X(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/local-runners/jobs")}getRunner(o,e={},t){return P.fromPromise(this.__getRunner(o,e,t))}async __getRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ts.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/{runnerId}")}disconnectRunner(o,e={},t){return P.fromPromise(this.__disconnectRunner(o,e,t))}async __disconnectRunner(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/local-runners/{runnerId}")}getBridgeCommand(o,e,t={},i){return P.fromPromise(this.__getBridgeCommand(o,e,t,i))}async __getBridgeCommand(o,e,t={},i){var u,d,f,g,h,y,w,A,C,I,D;let{wait:a,timeout:s}=t,c={wait:a,timeout:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=i==null?void 0:i.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),i==null?void 0:i.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}`),method:"GET",headers:l,queryParameters:{...c,...i==null?void 0:i.queryParams},timeoutMs:((A=(w=i==null?void 0:i.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=i==null?void 0:i.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:wz.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}")}getJob(o,e={},t){return P.fromPromise(this.__getJob(o,e,t))}async __getJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}`),method:"GET",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:wt.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}")}heartbeat(o,e={},t){return P.fromPromise(this.__heartbeat(o,e,t))}async __heartbeat(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/heartbeats`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ya.jsonOrThrow(e,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:wE.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 ct(Eo.parseOrThrow(a.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/heartbeats")}listJobs(o,e={},t){return P.fromPromise(this.__listJobs(o,e,t))}async __listJobs(o,e={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,page:a,size:s}=e,c={project_id:i,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=t==null?void 0:t.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),t==null?void 0:t.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs`),method:"GET",headers:l,queryParameters:{...c,...t==null?void 0:t.queryParams},timeoutMs:((A=(w=t==null?void 0:t.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=t==null?void 0:t.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:_E.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners/{runnerId}/jobs")}listRunners(o,e){return P.fromPromise(this.__listRunners(o,e))}async __listRunners(o,e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,status:i,page:a,size:s}=o,c={project_id:t,status:i!=null?vl.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,page:a,size:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:kE.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw m.error.statusCode===404?new U(m.error.body,m.rawResponse):new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/local-runners")}nextBridgeCommands(o,e={},t){return P.fromPromise(this.__nextBridgeCommands(o,e,t))}async __nextBridgeCommands(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/next`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ga.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:zz.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/next")}nextJob(o,e={},t){return P.fromPromise(this.__nextJob(o,e,t))}async __nextJob(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/jobs/next`),method:"POST",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:ur.nextJob.Response.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/jobs/next")}patchChecklist(o,e,t){return P.fromPromise(this.__patchChecklist(o,e,t))}async __patchChecklist(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.patchChecklist.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/local-runners/{runnerId}/checklist")}registerAgents(o,e,t){return P.fromPromise(this.__registerAgents(o,e,t))}async __registerAgents(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ur.registerAgents.Request.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/local-runners/{runnerId}/agents")}reportBridgeResult(o,e,t,i){return P.fromPromise(this.__reportBridgeResult(o,e,t,i))}async __reportBridgeResult(o,e,t,i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/bridge/commands/${_.encodePathParam(e)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Oa.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new X(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"POST","/v1/private/local-runners/{runnerId}/bridge/commands/{commandId}/results")}reportJobResult(o,e,t){return P.fromPromise(this.__reportJobResult(o,e,t))}async __reportJobResult(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/results`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body: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:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/results")}};});var ld,p8=n(()=>{Z();$();b();Q();q();J();te();ld=class{constructor(o={}){this._options=M(o);}getServiceToggles(o){return P.fromPromise(this.__getServiceToggles(o))}async __getServiceToggles(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/toggles"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:sD.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 md,c8=n(()=>{Z();$();b();Q();q();J();te();oe();md=class{constructor(o={}){this._options=M(o);}addSpanComment(o,e,t){return P.fromPromise(this.__addSpanComment(o,e,t))}async __addSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/comments")}addSpanFeedbackScore(o,e,t){return P.fromPromise(this.__addSpanFeedbackScore(o,e,t))}async __addSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/spans/{id}/feedback-scores")}createSpans(o,e){return P.fromPromise(this.__createSpans(o,e))}async __createSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:on.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/batch")}batchUpdateSpans(o,e){return P.fromPromise(this.__batchUpdateSpans(o,e))}async __batchUpdateSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:en.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/spans/batch")}getSpansByProject(o={},e){return P.fromPromise(this.__getSpansByProject(o,e))}async __getSpansByProject(o={},e){var D,F,B,Y,ne,we,je,Ee,Ce,Fr,ai;let{page:t,size:i,projectName:a,projectId:s,traceId:c,type:l,filters:m,truncate:u,stripAttachments:d,sorting:f,exclude:g,search:h,fromTime:y,toTime:w}=o,A={page:t,size:i,project_name:a,project_id:s,trace_id:c,type:l!=null?Il.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:m,truncate:u,strip_attachments:d,sorting:f,exclude:g,search:h,from_time:y==null?void 0:y.toISOString(),to_time:w==null?void 0:w.toISOString()},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(B=e==null?void 0:e.workspaceName)!=null?B:(F=this._options)==null?void 0:F.workspaceName}),e==null?void 0:e.headers),I=await S({url:_.join((ne=(Y=await x.get(this._options.baseUrl))!=null?Y:await x.get(this._options.environment))!=null?ne:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...e==null?void 0:e.queryParams},timeoutMs:((Ee=(je=e==null?void 0:e.timeoutInSeconds)!=null?je:(we=this._options)==null?void 0:we.timeoutInSeconds)!=null?Ee:60)*1e3,maxRetries:(Fr=e==null?void 0:e.maxRetries)!=null?Fr:(Ce=this._options)==null?void 0:Ce.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ai=this._options)==null?void 0:ai.fetch,logging:this._options.logging});if(I.ok)return {data:uD.parseOrThrow(I.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:I.rawResponse};if(I.error.reason==="status-code")throw new k({statusCode:I.error.statusCode,body:I.error.body,rawResponse:I.rawResponse});return j(I.error,I.rawResponse,"GET","/v1/private/spans")}createSpan(o,e){return P.fromPromise(this.__createSpan(o,e))}async __createSpan(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:tn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new X(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans")}getSpanById(o,e={},t){return P.fromPromise(this.__getSpanById(o,e,t))}async __getSpanById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ms.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/{id}")}deleteSpanById(o,e={},t){return P.fromPromise(this.__deleteSpanById(o,e,t))}async __deleteSpanById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===501?new Wr(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/spans/{id}")}updateSpan(o,e,t){return P.fromPromise(this.__updateSpan(o,e,t))}async __updateSpan(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qa.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/{id}")}deleteSpanComments(o,e){return P.fromPromise(this.__deleteSpanComments(o,e))}async __deleteSpanComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/comments/delete")}deleteSpanFeedbackScore(o,e,t){return P.fromPromise(this.__deleteSpanFeedbackScore(o,e,t))}async __deleteSpanFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ys.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/spans/{id}/feedback-scores/delete")}findFeedbackScoreNames1(o={},e){return P.fromPromise(this.__findFeedbackScoreNames1(o,e))}async __findFeedbackScoreNames1(o={},e){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:t,type:i}=o,a={project_id:t,type:i!=null?El.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=e==null?void 0:e.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),e==null?void 0:e.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...e==null?void 0:e.queryParams},timeoutMs:((y=(h=e==null?void 0:e.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=e==null?void 0:e.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:$r.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/feedback-scores/names")}getSpanComment(o,e,t={},i){return P.fromPromise(this.__getSpanComment(o,e,t,i))}async __getSpanComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/spans/{spanId}/comments/{commentId}")}getSpanStats(o={},e){return P.fromPromise(this.__getSpanStats(o,e))}async __getSpanStats(o={},e){var h,y,w,A,C,I,D,F,B,Y,ne;let{projectId:t,projectName:i,traceId:a,type:s,filters:c,search:l,fromTime:m,toTime:u}=o,d={project_id:t,project_name:i,trace_id:a,type:s!=null?Cl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:c,search:l,from_time:m==null?void 0:m.toISOString(),to_time:u==null?void 0:u.toISOString()},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=e==null?void 0:e.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),e==null?void 0:e.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...e==null?void 0:e.queryParams},timeoutMs:((F=(D=e==null?void 0:e.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(Y=e==null?void 0:e.maxRetries)!=null?Y:(B=this._options)==null?void 0:B.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(ne=this._options)==null?void 0:ne.fetch,logging:this._options.logging});if(g.ok)return {data:Qr.parseOrThrow(g.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:g.rawResponse};if(g.error.reason==="status-code")throw new k({statusCode:g.error.statusCode,body:g.error.body,rawResponse:g.rawResponse});return j(g.error,g.rawResponse,"GET","/v1/private/spans/stats")}scoreBatchOfSpans(o,e){return P.fromPromise(this.__scoreBatchOfSpans(o,e))}async __scoreBatchOfSpans(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/spans/feedback-scores")}searchSpans(o={},e){return P.fromPromise(this.__searchSpans(o,e))}async __searchSpans(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:an.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/spans/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var m,u,d,f,g,h,y,w,A,C,I;let{projectId:t,projectName:i,source:a}=o,s={project_id:t,project_name:i,source:a},c=z((m=this._options)==null?void 0:m.headers,T({"Comet-Workspace":(d=e==null?void 0:e.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),e==null?void 0:e.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/spans/exists"),method:"GET",headers:c,queryParameters:{...s,...e==null?void 0:e.queryParams},timeoutMs:((w=(y=e==null?void 0:e.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=e==null?void 0:e.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:ws.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/spans/exists")}updateSpanComment(o,e,t){return P.fromPromise(this.__updateSpanComment(o,e,t))}async __updateSpanComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/spans/comments/{commentId}")}};});var dd,l8=n(()=>{Z();$();b();Q();q();J();te();oe();dd=class{constructor(o={}){this._options=M(o);}executeAnalyticsQuery(o,e,t){return P.fromPromise(this.__executeAnalyticsQuery(o,e,t))}async __executeAnalyticsQuery(o,e,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/internal/analytics-queries/projects/${_.encodePathParam(o)}`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:nn.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:Jl.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new ae(a.error.body,a.rawResponse);case 501:throw new Wr(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/internal/analytics-queries/projects/{projectId}")}executeScopedAnalyticsQuery(o,e){return P.fromPromise(this.__executeScopedAnalyticsQuery(o,e))}async __executeScopedAnalyticsQuery(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Jl.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);case 501:throw new Wr(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/internal/analytics-queries")}};});var ud,m8=n(()=>{Z();$();b();Q();q();J();te();ud=class{constructor(o={}){this._options=M(o);}getDatasetBiInfo(o){return P.fromPromise(this.__getDatasetBiInfo(o))}async __getDatasetBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-datasets"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-datasets")}getExperimentBiInfo(o){return P.fromPromise(this.__getExperimentBiInfo(o))}async __getExperimentBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-experiments"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-experiments")}getSpansBiInfo(o){return P.fromPromise(this.__getSpansBiInfo(o))}async __getSpansBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-spans"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-spans")}getSpansCountBreakdownForWorkspaces(o){return P.fromPromise(this.__getSpansCountBreakdownForWorkspaces(o))}async __getSpansCountBreakdownForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts-breakdown"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:DD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts-breakdown")}getSpansCountForWorkspaces(o){return P.fromPromise(this.__getSpansCountForWorkspaces(o))}async __getSpansCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-span-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:hD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/workspace-span-counts")}getTracesBiInfo(o){return P.fromPromise(this.__getTracesBiInfo(o))}async __getTracesBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/bi-traces"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:vo.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/internal/usage/bi-traces")}getTracesCountForWorkspaces(o){return P.fromPromise(this.__getTracesCountForWorkspaces(o))}async __getTracesCountForWorkspaces(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/internal/usage/workspace-trace-counts"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:wD.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 gd,d8=n(()=>{Z();$();b();Q();q();J();te();oe();gd=class{constructor(o={}){this._options=M(o);}addThreadComment(o,e,t){return P.fromPromise(this.__addThreadComment(o,e,t))}async __addThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/threads/{id}/comments")}addTraceComment(o,e,t){return P.fromPromise(this.__addTraceComment(o,e,t))}async __addTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/comments")}addTraceFeedbackScore(o,e,t){return P.fromPromise(this.__addTraceFeedbackScore(o,e,t))}async __addTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Pe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PUT","/v1/private/traces/{id}/feedback-scores")}createTraces(o,e){return P.fromPromise(this.__createTraces(o,e))}async __createTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:fn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/batch")}batchUpdateTraces(o,e){return P.fromPromise(this.__batchUpdateTraces(o,e))}async __batchUpdateTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:un.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/batch")}batchUpdateThreads(o,e){return P.fromPromise(this.__batchUpdateThreads(o,e))}async __batchUpdateThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Rn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PATCH","/v1/private/traces/threads/batch")}closeTraceThread(o={},e){return P.fromPromise(this.__closeTraceThread(o,e))}async __closeTraceThread(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/close")}getTracesByProject(o={},e){return P.fromPromise(this.__getTracesByProject(o,e))}async __getTracesByProject(o={},e){var I,D,F,B,Y,ne,we,je,Ee,Ce,Fr;let{page:t,size:i,projectName:a,projectId:s,filters:c,truncate:l,stripAttachments:m,sorting:u,exclude:d,search:f,fromTime:g,toTime:h,annotationQueueId:y}=o,w={page:t,size:i,project_name:a,project_id:s,filters:c,truncate:l,strip_attachments:m,sorting:u,exclude:d,search:f,from_time:g==null?void 0:g.toISOString(),to_time:h==null?void 0:h.toISOString(),annotation_queue_id:y},A=z((I=this._options)==null?void 0:I.headers,T({"Comet-Workspace":(F=e==null?void 0:e.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),e==null?void 0:e.headers),C=await S({url:_.join((Y=(B=await x.get(this._options.baseUrl))!=null?B:await x.get(this._options.environment))!=null?Y:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...e==null?void 0:e.queryParams},timeoutMs:((je=(we=e==null?void 0:e.timeoutInSeconds)!=null?we:(ne=this._options)==null?void 0:ne.timeoutInSeconds)!=null?je:60)*1e3,maxRetries:(Ce=e==null?void 0:e.maxRetries)!=null?Ce:(Ee=this._options)==null?void 0:Ee.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Fr=this._options)==null?void 0:Fr.fetch,logging:this._options.logging});if(C.ok)return {data:SD.parseOrThrow(C.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:C.rawResponse};if(C.error.reason==="status-code")throw new k({statusCode:C.error.statusCode,body:C.error.body,rawResponse:C.rawResponse});return j(C.error,C.rawResponse,"GET","/v1/private/traces")}createTrace(o,e){return P.fromPromise(this.__createTrace(o,e))}async __createTrace(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:gn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces")}getTraceById(o,e={},t){return P.fromPromise(this.__getTraceById(o,e,t))}async __getTraceById(o,e={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=e,a={strip_attachments:i},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=t==null?void 0:t.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),t==null?void 0:t.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"GET",headers:s,queryParameters:{...a,...t==null?void 0:t.queryParams},timeoutMs:((y=(h=t==null?void 0:t.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=t==null?void 0:t.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Ls.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/traces/{id}")}deleteTraceById(o,e={},t){return P.fromPromise(this.__deleteTraceById(o,e,t))}async __deleteTraceById(o,e={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"DELETE",headers:i,queryParameters:t==null?void 0:t.queryParams,timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"DELETE","/v1/private/traces/{id}")}updateTrace(o,e,t){return P.fromPromise(this.__updateTrace(o,e,t))}async __updateTrace(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:dn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/{id}")}deleteThreadComments(o,e){return P.fromPromise(this.__deleteThreadComments(o,e))}async __deleteThreadComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/comments/delete")}deleteThreadFeedbackScores(o,e){return P.fromPromise(this.__deleteThreadFeedbackScores(o,e))}async __deleteThreadFeedbackScores(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:cn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/feedback-scores/delete")}deleteTraceComments(o,e){return P.fromPromise(this.__deleteTraceComments(o,e))}async __deleteTraceComments(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:de.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/comments/delete")}deleteTraceFeedbackScore(o,e,t){return P.fromPromise(this.__deleteTraceFeedbackScore(o,e,t))}async __deleteTraceFeedbackScore(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ys.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/traces/{id}/feedback-scores/delete")}deleteTraceThreads(o,e){return P.fromPromise(this.__deleteTraceThreads(o,e))}async __deleteTraceThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:ln.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/delete")}deleteTraces(o,e){return P.fromPromise(this.__deleteTraces(o,e))}async __deleteTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new ae(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/delete")}findFeedbackScoreNames2(o={},e){return P.fromPromise(this.__findFeedbackScoreNames2(o,e))}async __findFeedbackScoreNames2(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/feedback-scores/names")}findTraceThreadsFeedbackScoreNames(o={},e){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(o,e))}async __findTraceThreadsFeedbackScoreNames(o={},e){var c,l,m,u,d,f,g,h,y,w,A;let{projectId:t}=o,i={project_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=e==null?void 0:e.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),e==null?void 0:e.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...e==null?void 0:e.queryParams},timeoutMs:((h=(g=e==null?void 0:e.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=e==null?void 0:e.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:$r.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/feedback-scores/names")}getTraceStats(o={},e){return P.fromPromise(this.__getTraceStats(o,e))}async __getTraceStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Qr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(o,e,t={},i){return P.fromPromise(this.__getThreadComment(o,e,t,i))}async __getThreadComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/{threadId}/comments/{commentId}")}getTraceThreadStats(o={},e){return P.fromPromise(this.__getTraceThreadStats(o,e))}async __getTraceThreadStats(o={},e){var f,g,h,y,w,A,C,I,D,F,B;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l}=o,m={project_id:t,project_name:i,filters:a,search:s,from_time:c==null?void 0:c.toISOString(),to_time:l==null?void 0:l.toISOString()},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=e==null?void 0:e.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),e==null?void 0:e.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...e==null?void 0:e.queryParams},timeoutMs:((I=(C=e==null?void 0:e.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=e==null?void 0:e.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(B=this._options)==null?void 0:B.fetch,logging:this._options.logging});if(d.ok)return {data:Qr.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse});return j(d.error,d.rawResponse,"GET","/v1/private/traces/threads/stats")}getTraceComment(o,e,t={},i){return P.fromPromise(this.__getTraceComment(o,e,t,i))}async __getTraceComment(o,e,t={},i){var c,l,m,u,d,f,g,h,y,w,A;let a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=i==null?void 0:i.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),i==null?void 0:i.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments/${_.encodePathParam(e)}`),method:"GET",headers:a,queryParameters:i==null?void 0:i.queryParams,timeoutMs:((h=(g=i==null?void 0:i.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=i==null?void 0:i.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ge.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/{traceId}/comments/{commentId}")}getTraceThread(o,e){return P.fromPromise(this.__getTraceThread(o,e))}async __getTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Vs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===404?new U(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/retrieve")}getTraceThreads(o={},e){return P.fromPromise(this.__getTraceThreads(o,e))}async __getTraceThreads(o={},e){var C,I,D,F,B,Y,ne,we,je,Ee,Ce;let{page:t,size:i,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters:m,sorting:u,search:d,fromTime:f,toTime:g,annotationQueueId:h}=o,y={page:t,size:i,project_name:a,project_id:s,truncate:c,strip_attachments:l,filters:m,sorting:u,search:d,from_time:f==null?void 0:f.toISOString(),to_time:g==null?void 0:g.toISOString(),annotation_queue_id:h},w=z((C=this._options)==null?void 0:C.headers,T({"Comet-Workspace":(D=e==null?void 0:e.workspaceName)!=null?D:(I=this._options)==null?void 0:I.workspaceName}),e==null?void 0:e.headers),A=await S({url:_.join((B=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?B:v.Default,"v1/private/traces/threads"),method:"GET",headers:w,queryParameters:{...y,...e==null?void 0:e.queryParams},timeoutMs:((we=(ne=e==null?void 0:e.timeoutInSeconds)!=null?ne:(Y=this._options)==null?void 0:Y.timeoutInSeconds)!=null?we:60)*1e3,maxRetries:(Ee=e==null?void 0:e.maxRetries)!=null?Ee:(je=this._options)==null?void 0:je.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(Ce=this._options)==null?void 0:Ce.fetch,logging:this._options.logging});if(A.ok)return {data:ED.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")throw new k({statusCode:A.error.statusCode,body:A.error.body,rawResponse:A.rawResponse});return j(A.error,A.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(o,e){return P.fromPromise(this.__openTraceThread(o,e))}async __openTraceThread(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Tm.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/open")}scoreBatchOfThreads(o,e){return P.fromPromise(this.__scoreBatchOfThreads(o,e))}async __scoreBatchOfThreads(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:mn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/threads/feedback-scores")}scoreBatchOfTraces(o,e){return P.fromPromise(this.__scoreBatchOfTraces(o,e))}async __scoreBatchOfTraces(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:vs.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"PUT","/v1/private/traces/feedback-scores")}searchTraceThreads(o={},e){return P.fromPromise(this.__searchTraceThreads(o,e))}async __searchTraceThreads(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:xn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/traces/threads/search")}searchTraces(o={},e){return P.fromPromise(this.__searchTraces(o,e))}async __searchTraces(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:hn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 401:throw new O(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"POST","/v1/private/traces/search")}exist(o={},e){return P.fromPromise(this.__exist(o,e))}async __exist(o={},e){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:t,projectName:i,source:a,threadOnly:s}=o,c={project_id:t,project_name:i,source:a,thread_only:s},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=e==null?void 0:e.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),e==null?void 0:e.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/traces/exists"),method:"GET",headers:l,queryParameters:{...c,...e==null?void 0:e.queryParams},timeoutMs:((A=(w=e==null?void 0:e.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=e==null?void 0:e.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:ws.parseOrThrow(m.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:m.rawResponse};if(m.error.reason==="status-code")throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse});return j(m.error,m.rawResponse,"GET","/v1/private/traces/exists")}updateThread(o,e,t){return P.fromPromise(this.__updateThread(o,e,t))}async __updateThread(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:bn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/{threadModelId}")}updateThreadComment(o,e,t){return P.fromPromise(this.__updateThreadComment(o,e,t))}async __updateThreadComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/threads/comments/{commentId}")}updateTraceComment(o,e,t){return P.fromPromise(this.__updateTraceComment(o,e,t))}async __updateTraceComment(o,e,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=e,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ge.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/traces/comments/{commentId}")}};});var fd,u8=n(()=>{Z();$();b();Q();q();J();te();fd=class{constructor(o={}){this._options=M(o);}getWelcomeWizardStatus(o){return P.fromPromise(this.__getWelcomeWizardStatus(o))}async __getWelcomeWizardStatus(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/welcome-wizard"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:WD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/welcome-wizard")}submitWelcomeWizard(o={},e){return P.fromPromise(this.__submitWelcomeWizard(o,e))}async __submitWelcomeWizard(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:wn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/welcome-wizard")}};});var hd,g8=n(()=>{Z();$();b();Q();q();J();te();oe();hd=class{constructor(o={}){this._options=M(o);}getWorkspaceUserPermissions(o){return P.fromPromise(this.__getWorkspaceUserPermissions(o))}async __getWorkspaceUserPermissions(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspace-permissions"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:JD.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")switch(t.error.statusCode){case 400:throw new N(t.error.body,t.rawResponse);case 401:throw new O(t.error.body,t.rawResponse);default:throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse})}return j(t.error,t.rawResponse,"GET","/v1/private/workspace-permissions")}};});var yd,f8=n(()=>{Z();$();b();Q();q();J();te();oe();yd=class{constructor(o={}){this._options=M(o);}costsSummary(o,e){return P.fromPromise(this.__costsSummary(o,e))}async __costsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vr.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs/summaries")}getWorkspaceConfiguration(o){return P.fromPromise(this.__getWorkspaceConfiguration(o))}async __getWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:Js.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/workspaces/configurations")}upsertWorkspaceConfiguration(o,e){return P.fromPromise(this.__upsertWorkspaceConfiguration(o,e))}async __upsertWorkspaceConfiguration(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Js.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Js.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 400:throw new N(i.error.body,i.rawResponse);case 422:throw new ae(i.error.body,i.rawResponse);default:throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse})}return j(i.error,i.rawResponse,"PUT","/v1/private/workspaces/configurations")}deleteWorkspaceConfiguration(o){return P.fromPromise(this.__deleteWorkspaceConfiguration(o))}async __deleteWorkspaceConfiguration(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"v1/private/workspaces/configurations"),method:"DELETE",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:void 0,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw t.error.statusCode===404?new U(t.error.body,t.rawResponse):new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"DELETE","/v1/private/workspaces/configurations")}getCost(o,e){return P.fromPromise(this.__getCost(o,e))}async __getCost(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/costs")}getMetric(o,e){return P.fromPromise(this.__getMetric(o,e))}async __getMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics")}getWorkspaceSpanMetric(o,e){return P.fromPromise(this.__getWorkspaceSpanMetric(o,e))}async __getWorkspaceSpanMetric(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:_n.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Hs.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/spans")}getWorkspaceTokenUsageNames(o={},e){return P.fromPromise(this.__getWorkspaceTokenUsageNames(o,e))}async __getWorkspaceTokenUsageNames(o={},e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/token-usage/names"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ws.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/token-usage/names")}metricsSummary(o,e){return P.fromPromise(this.__metricsSummary(o,e))}async __metricsSummary(o,e){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=e==null?void 0:e.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),e==null?void 0:e.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:e==null?void 0:e.queryParams,requestType:"json",body:Uo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=e==null?void 0:e.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=e==null?void 0:e.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:e==null?void 0:e.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LD.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===400?new N(i.error.body,i.rawResponse):new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/workspaces/metrics/summaries")}};});var Gs,h8=n(()=>{v3();T3();j3();E3();C3();I3();D3();U3();N3();F3();B3();M3();W3();L3();V3();J3();H3();G3();O3();K3();$3();Q3();Y3();X3();Z3();q3();e8();r8();t8();o8();i8();a8();n8();s8();p8();c8();l8();m8();d8();u8();g8();f8();Z();$();b();Q();q();J();Gs=class{constructor(o={}){this._options=M(o);}get mcpOAuth(){var o;return (o=this._mcpOAuth)!=null?o:this._mcpOAuth=new Xm(this._options)}get agentInsightsEnrollment(){var o;return (o=this._agentInsightsEnrollment)!=null?o:this._agentInsightsEnrollment=new Cm(this._options)}get systemAnalyticsQueries(){var o;return (o=this._systemAnalyticsQueries)!=null?o:this._systemAnalyticsQueries=new dd(this._options)}get systemUsage(){var o;return (o=this._systemUsage)!=null?o:this._systemUsage=new ud(this._options)}get agentConfigs(){var o;return (o=this._agentConfigs)!=null?o:this._agentConfigs=new jm(this._options)}get agentInsightsJobs(){var o;return (o=this._agentInsightsJobs)!=null?o:this._agentInsightsJobs=new Im(this._options)}get agentInsights(){var o;return (o=this._agentInsights)!=null?o:this._agentInsights=new Em(this._options)}get alerts(){var o;return (o=this._alerts)!=null?o:this._alerts=new Dm(this._options)}get annotationQueues(){var o;return (o=this._annotationQueues)!=null?o:this._annotationQueues=new Um(this._options)}get assertionResults(){var o;return (o=this._assertionResults)!=null?o:this._assertionResults=new Nm(this._options)}get attachments(){var o;return (o=this._attachments)!=null?o:this._attachments=new Fm(this._options)}get check(){var o;return (o=this._check)!=null?o:this._check=new Wm(this._options)}get automationRuleEvaluators(){var o;return (o=this._automationRuleEvaluators)!=null?o:this._automationRuleEvaluators=new Bm(this._options)}get chatCompletions(){var o;return (o=this._chatCompletions)!=null?o:this._chatCompletions=new Mm(this._options)}get dashboards(){var o;return (o=this._dashboards)!=null?o:this._dashboards=new Lm(this._options)}get datasets(){var o;return (o=this._datasets)!=null?o:this._datasets=new Vm(this._options)}get environments(){var o;return (o=this._environments)!=null?o:this._environments=new Jm(this._options)}get experiments(){var o;return (o=this._experiments)!=null?o:this._experiments=new Hm(this._options)}get feedbackDefinitions(){var o;return (o=this._feedbackDefinitions)!=null?o:this._feedbackDefinitions=new Gm(this._options)}get guardrails(){var o;return (o=this._guardrails)!=null?o:this._guardrails=new Om(this._options)}get insightsViews(){var o;return (o=this._insightsViews)!=null?o:this._insightsViews=new Km(this._options)}get llmModels(){var o;return (o=this._llmModels)!=null?o:this._llmModels=new $m(this._options)}get llmProviderKey(){var o;return (o=this._llmProviderKey)!=null?o:this._llmProviderKey=new Qm(this._options)}get runners(){var o;return (o=this._runners)!=null?o:this._runners=new cd(this._options)}get manualEvaluation(){var o;return (o=this._manualEvaluation)!=null?o:this._manualEvaluation=new Ym(this._options)}get ollama(){var o;return (o=this._ollama)!=null?o:this._ollama=new Zm(this._options)}get ollieState(){var o;return (o=this._ollieState)!=null?o:this._ollieState=new qm(this._options)}get openTelemetryIngestion(){var o;return (o=this._openTelemetryIngestion)!=null?o:this._openTelemetryIngestion=new ed(this._options)}get optimizations(){var o;return (o=this._optimizations)!=null?o:this._optimizations=new rd(this._options)}get pairing(){var o;return (o=this._pairing)!=null?o:this._pairing=new td(this._options)}get projects(){var o;return (o=this._projects)!=null?o:this._projects=new od(this._options)}get prompts(){var o;return (o=this._prompts)!=null?o:this._prompts=new id(this._options)}get reportFailures(){var o;return (o=this._reportFailures)!=null?o:this._reportFailures=new nd(this._options)}get reports(){var o;return (o=this._reports)!=null?o:this._reports=new sd(this._options)}get retentionRules(){var o;return (o=this._retentionRules)!=null?o:this._retentionRules=new pd(this._options)}get serviceToggles(){var o;return (o=this._serviceToggles)!=null?o:this._serviceToggles=new ld(this._options)}get spans(){var o;return (o=this._spans)!=null?o:this._spans=new md(this._options)}get traces(){var o;return (o=this._traces)!=null?o:this._traces=new gd(this._options)}get welcomeWizard(){var o;return (o=this._welcomeWizard)!=null?o:this._welcomeWizard=new fd(this._options)}get workspacePermissions(){var o;return (o=this._workspacePermissions)!=null?o:this._workspacePermissions=new hd(this._options)}get workspaces(){var o;return (o=this._workspaces)!=null?o:this._workspaces=new yd(this._options)}get redirect(){var o;return (o=this._redirect)!=null?o:this._redirect=new ad(this._options)}isAlive(o){return P.fromPromise(this.__isAlive(o))}async __isAlive(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ping"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ping")}version(o){return P.fromPromise(this.__version(o))}async __version(o){var i,a,s,c,l,m,u,d,f,g,h;let e=z((i=this._options)==null?void 0:i.headers,T({"Comet-Workspace":(s=o==null?void 0:o.workspaceName)!=null?s:(a=this._options)==null?void 0:a.workspaceName}),o==null?void 0:o.headers),t=await S({url:_.join((l=(c=await x.get(this._options.baseUrl))!=null?c:await x.get(this._options.environment))!=null?l:v.Default,"is-alive/ver"),method:"GET",headers:e,queryParameters:o==null?void 0:o.queryParams,timeoutMs:((d=(u=o==null?void 0:o.timeoutInSeconds)!=null?u:(m=this._options)==null?void 0:m.timeoutInSeconds)!=null?d:60)*1e3,maxRetries:(g=o==null?void 0:o.maxRetries)!=null?g:(f=this._options)==null?void 0:f.maxRetries,withCredentials:true,abortSignal:o==null?void 0:o.abortSignal,fetchFn:(h=this._options)==null?void 0:h.fetch,logging:this._options.logging});if(t.ok)return {data:t.body,rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/is-alive/ver")}};});var y8=n(()=>{});var b8,R8=n(()=>{Qp();(e=>(e.LogLevel=Ve,e.ConsoleLogger=mt))(b8||(b8={}));});var x8=n(()=>{y8();R8();});var w8=n(()=>{x8();});var Tr=n(()=>{oe();h8();Q();J();w8();te();});var ue,ir=n(()=>{ue=()=>v7$1();});function oae(p){return p.templateStructure==="text"}function iae(p){return p.templateStructure==="chat"}var jr,bd=n(()=>{jr=class{static serializePromptToInfoDict(o){let e;return oae(o)?e=o.prompt:iae(o)?e=o.messages:e="",{name:o.name,...o.id&&{id:o.id},template_structure:o.templateStructure,version:{...o.versionId&&{id:o.versionId},...o.commit&&{commit:o.commit},template:e}}}static normalizeMetadata(o){if(!o)return {};if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{let e=JSON.parse(o);if(typeof e=="object"&&e!==null&&!Array.isArray(e))return e}catch{}return null}static promptAlreadyInjected(o,e,t){let i=this.normalizeMetadata(o);return i===null?true:(Array.isArray(i.opik_prompts)?i.opik_prompts:[]).some(s=>{var c;return s.id===e&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(o,e,t,i){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(o))!=null?m:{},c=(u=this.normalizeMetadata(e))!=null?u:{},l=i&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(o,e){var s,c;let{prompts:t,appendPrompts:i,...a}=o;if(!t||t.length===0){if(a.metadata&&e){let l=(s=this.normalizeMetadata(e))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(e,a.metadata,t,i!=null?i:false)}}static processTraceUpdate(o,e){return this.processUpdate(o,e)}static processSpanUpdate(o,e){return this.processUpdate(o,e)}};});var Rd,_8=n(()=>{ro();ir();re();bd();Rd=class p{constructor(o,e){this.data=o;this.opik=e;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.spanFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=o=>{var i;let e=jr.processSpanUpdate(o,this.data.metadata),t={parentSpanId:this.data.parentSpanId,projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,traceId:this.data.traceId,...e};return Le()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=o=>{var c,l;let e=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&E.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(l=this.data.environment)!=null?l:""}" from the parent span will be used instead.`);let a={id:ue(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var xd,k8=n(()=>{ro();ir();re();_8();bd();xd=class{constructor(o,e){this.data=o;this.opik=e;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var e;Le()&&this.opik.traceFeedbackScoresBatchQueue.create({...o,projectName:(e=this.data.projectName)!=null?e:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=o=>{var c,l,m;let e=(l=(c=this.data.projectName)!=null?c:o.projectName)!=null?l:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&E.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(m=this.data.environment)!=null?m:""}" from the parent trace will be used instead.`);let a={id:ue(),startTime:new Date,source:this.data.source,...i,projectName:e,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};Le()&&this.opik.spanBatchQueue.create(a);let s=new Rd(a,this.opik);return this.spans.push(s),s};this.update=o=>{var i;let e=jr.processTraceUpdate(o,this.data.metadata),t={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...e};return Le()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var A8,Os,aae,nae,P8,z8,S8,v8,HD=n(()=>{A8={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"},Os={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},aae=p=>Object.entries(p).map(([o,e])=>`${o}=${encodeURIComponent(e)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),nae=p=>p.replace(/\/api\/?$/,""),P8=p=>Buffer.from(p).toString("base64"),z8=(p,o,e)=>{let t=aae(e),i=nae(p),a=i.endsWith("/")?i:`${i}/`,s=o.startsWith("/")?o.slice(1):o;return `${a}${s}?${t}`},S8=({datasetId:p,experimentId:o,baseUrl:e})=>z8(e,A8.EXPERIMENTS,{[Os.EXPERIMENT_ID]:o,[Os.DATASET_ID]:p,[Os.PATH]:P8(e)}),v8=(p,o)=>z8(o,A8.PROJECTS,{[Os.TRACE_ID]:p,[Os.PATH]:P8(o)});});var sae,wd,Ks,Ue,Bt=n(()=>{re();sae=300,wd=100,Ks=class{constructor({action:o,batchSize:e=wd,delay:t,enableBatch:i,name:a="ActionQueue"}){this.timerId=null;this.promise=Promise.resolve();this.queue=new Map;this.debounceFlush=()=>{this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(()=>this.flush(),this.delay);};this.add=(o,e)=>{if(this.queue.set(o,e),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(o,e)=>{let t=this.queue.get(o);t&&(this.queue.set(o,{...t,...e}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let o=new Map(this.queue);this.queue.clear(),E.debug(`Adding ${o.size} items to ${this.name} promise:`,o),this.promise=this.promise.finally(()=>(E.debug(`Flushing ${this.name}:`,o),this.action(o))).catch(e=>{E.error(`Failed to flush ${this.name}:`,e,o);}),await this.promise;};this.action=o,this.batchSize=e,this.delay=t,this.enableBatch=i,this.name=a;}},Ue=class{constructor({delay:o=sae,enableCreateBatch:e=true,enableUpdateBatch:t=false,enableDeleteBatch:i=true,createBatchSize:a=wd,updateBatchSize:s=wd,deleteBatchSize:c=wd,name:l="BatchQueue"}={}){this.create=o=>{let e=this.getId(o);this.createQueue.add(e,o);};this.get=async o=>{let e=this.createQueue.queue.get(o);return e||this.getEntity(o)};this.update=(o,e)=>{if(this.createQueue.queue.get(o)){this.createQueue.update(o,e);return}let i=this.updateQueue.queue.get(o);this.updateQueue.add(o,{...i,...e});};this.delete=o=>{if(this.createQueue.queue.has(o)){this.createQueue.queue.delete(o);return}this.deleteQueue.add(o);};this.flush=async()=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteQueue.flush();};this.name=l,this.createQueue=new Ks({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:o,enableBatch:e,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new Ks({action:async m=>{await this.createQueue.flush();let u=Array.from(m.entries());for(let[d,f]of u)await this.updateEntity(d,f);},delay:o,enableBatch:t,batchSize:s,name:`${l}:updateQueue`}),this.deleteQueue=new Ks({action:async m=>{await this.createQueue.flush(),await this.updateQueue.flush(),await this.deleteEntities(Array.from(m.keys()));},delay:o,enableBatch:i,batchSize:c,name:`${l}:deleteQueue`});}};});var pae,_d,T8=n(()=>{zp();re();Bt();pae="suite_assertion",_d=class extends Ue{constructor(e,t,i="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${i}`});this.api=e;this.entityType=i;this.useLegacyFallback=false;}getId(e){return {entityId:e.entityId,name:e.name}}async createEntities(e){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(e);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:e},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,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(i=>({id:i.entityId,name:i.name,value:i.status==="passed"?1:0,categoryName:pae,reason:i.reason,source:i.source,projectName:i.projectName,projectId:i.projectId}));await this.api.traces.scoreBatchOfTraces({scores:t},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(){throw new Error("Not implemented")}};});var kd,cae,j8,lae,mae,No,GD=n(()=>{re();kd=["input","output"],cae=1024*1024,j8=p=>({opik_truncated:true,reason:Number.isFinite(p)?`<omitted_due_to_size_${Math.round(p)}MB_error_code_413_400>`:"<omitted_unserializable_error_code_413_400>"}),lae=p=>{try{let o=JSON.stringify(p);return o?Buffer.byteLength(o,"utf8")/cae:0}catch{return 1/0}},mae=(p,o)=>{let e={};for(let s of kd)p[s]!=null&&(e[s]=lae(p[s]));if(Object.keys(e).length===0)return {result:p,truncated:[]};let t={};for(let s of kd)e[s]!==void 0&&e[s]>o&&(t[s]=j8(e[s]));if(kd.reduce((s,c)=>{var l;return s+(t[c]?0:(l=e[c])!=null?l:0)},0)>o)for(let s of kd)e[s]!==void 0&&t[s]===void 0&&(t[s]=j8(e[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},No=(p,o,e="span",t)=>{if(!o||o<=0)return p;let{result:i,truncated:a}=mae(p,o);if(a.length>0){let s=e.charAt(0).toUpperCase()+e.slice(1);E.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${o} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return i};});var Yr,dae,uae,gae,fae,hae,yae,bae,Rae,E8,xae,C8,I8=n(()=>{Yr=(p,o,e=0)=>{if(p.length<e+o.length)return false;for(let t=0;t<o.length;t++)if(p[e+t]!==o[t])return false;return true},dae=[137,80,78,71,13,10,26,10],uae=[255,216,255],gae=[71,73,70,56,55,97],fae=[71,73,70,56,57,97],hae=[82,73,70,70],yae=[87,69,66,80],bae=[37,80,68,70],Rae=[102,116,121,112],E8=p=>{if(Yr(p,dae))return "image/png";if(Yr(p,uae)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(Yr(p,gae)||Yr(p,fae))return "image/gif";if(Yr(p,hae)&&Yr(p,yae,8))return "image/webp";if(Yr(p,bae))return "application/pdf";if(Yr(p,Rae,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let e=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(e.startsWith("{")||e.startsWith("["))return "application/json"}catch{}return null},xae={"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","application/pdf":"pdf","image/svg+xml":"svg","video/mp4":"mp4","application/json":"json"},C8=p=>{var o;return (o=xae[p])!=null?o:"bin"};});var wae,_ae,kae,D8,Aae,Pae,zae,OD,U8,N8=n(()=>{I8();wae=["input","output","metadata"],_ae=(p,o)=>{let e=Math.floor(Math.random()*99999999)+1,t=C8(o);return `${p}-attachment-${e}-${Date.now()}-sdk.${t}`},kae=p=>{let o=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,e=Buffer.from(o,"base64");return e.length>0?e:null},D8=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,Aae=61,Pae=/data:[^,]*;base64,$/,zae=(p,o,e,t)=>{if(p.length<t)return p;let i=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!D8(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&D8(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===Aae&&u<2;)m++,u++;if(m-l>=t){let f=kae(p.slice(l,m)),g=f?E8(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&Pae.test(p.slice(y,l))&&(h=y);let w=_ae(o,g);i.push(p.slice(a,h)),i.push(`[${w}]`),a=m,e.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(i.push(p.slice(a)),i.join("")):p},OD=(p,o,e,t,i)=>{if(typeof p=="string")return zae(p,o,e,t);if(Array.isArray(p)){if(i.has(p))return p;i.add(p);let a=false,s=p.map(c=>{let l=OD(c,o,e,t,i);return l!==c&&(a=true),l});return a?s:p}if(p!==null&&typeof p=="object"){if(i.has(p))return p;i.add(p);let a=false,s={};for(let[c,l]of Object.entries(p)){let m=OD(l,o,e,t,i);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},U8=(p,o)=>{let e=Math.max(4,Math.floor(o/4)*4),t=[],i={};for(let a of wae){let s=p[a];if(s==null)continue;let c=OD(s,a,t,e,new WeakSet);c!==s&&(i[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...i},attachments:t}};});var Sae,F8,B8,M8=n(()=>{Sae="BEMinIO",F8=async(p,o,e)=>{let t=await fetch(p,{method:"PUT",body:o,headers:e});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},B8=async(p,o,e,t)=>{let{data:i,fileName:a,mimeType:s}=t,c=Math.max(1,Math.ceil(i.length/5242880)),l=Buffer.from(o.apiUrl,"utf8").toString("base64"),m=await p.attachments.startMultiPartUpload({fileName:a,numOfFileParts:c,mimeType:s,entityType:e.entityType,entityId:e.entityId,path:l,projectName:e.projectName},p.requestOptions);if(m.uploadId===Sae){let d={"Content-Type":s,"Comet-Workspace":o.workspaceName,...o.extraHeaders};o.apiKey&&(d.authorization=o.apiKey),await F8(m.preSignUrls[0],i,d);return}let u=[];for(let d=0;d<m.preSignUrls.length;d++){let f=d*5242880,g=i.subarray(f,f+5242880),h=await F8(m.preSignUrls[d],g);if(!h)throw new Error(`attachment upload part ${d+1} returned no ETag; cannot complete multipart upload`);u.push({eTag:h,partNumber:d+1});}await p.attachments.completeMultiPartUpload({fileName:a,entityType:e.entityType,entityId:e.entityId,fileSize:i.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:e.projectName},p.requestOptions);};});var Ad,KD=n(()=>{re();N8();M8();Ad=async(p,o,e,t)=>{let i;try{i=U8(t,o.minSizeBytes);}catch(a){return E.warn(`Attachment extraction skipped for ${e.entityType} '${e.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return i.attachments.length===0?t:(await Promise.all(i.attachments.map(a=>B8(p,o,e,a).catch(s=>{E.warn(`Failed to upload extracted attachment '${a.fileName}' for ${e.entityType} '${e.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),i.result)};});var Pd,W8=n(()=>{Bt();GD();pt();KD();Pd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Ad(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(No(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(e){return await this.api.spans.getSpanById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=No(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"span",e);await this.api.spans.updateSpan(e,{body:a},this.api.requestOptions);}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var zd,L8=n(()=>{Bt();zd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.spans.scoreBatchOfSpans({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var Sd,V8=n(()=>{Bt();GD();pt();KD();Sd=class extends Ue{constructor(e,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=e;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(e){return e.id}async extractAttachments(e,t){return this.attachmentUpload?Ad(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:e.projectName},e):e}async createEntities(e){var i;let t=[];for(let a of e){let s=await this.extractAttachments(a,a.id);t.push(No(s,(i=this.maxPayloadSizeMb)!=null?i:Ke.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(e){return await this.api.traces.getTraceById(e,{},this.api.requestOptions)}async updateEntity(e,t){var s;let i=await this.extractAttachments(t,e),a=No(i,(s=this.maxPayloadSizeMb)!=null?s:Ke.maxPayloadSizeMb,"trace",e);await this.api.traces.updateTrace(e,{body:a},this.api.requestOptions);}async deleteEntities(e){await this.api.traces.deleteTraces({ids:e},this.api.requestOptions);}};});var vd,J8=n(()=>{Bt();vd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=e;}getId(e){return {id:e.id,name:e.name}}async createEntities(e){await this.api.traces.scoreBatchOfTraces({scores:e},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(e){for(let t of e)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var Td,H8=n(()=>{Tr();Td=class extends Gs{constructor(e){var i;let t={...e==null?void 0:e.headers,...(i=e==null?void 0:e.requestOptions)==null?void 0:i.headers};(e==null?void 0:e.apiKey)!==void 0&&(t.authorization=e.apiKey);super({...e,headers:t});this.setHeaders=e=>{this.requestOptions.headers=e;};this.requestOptions=(e==null?void 0:e.requestOptions)||{};}};});var jd,G8=n(()=>{Bt();jd=class extends Ue{constructor(e,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=e;}getId(e){return e.id||""}async createEntities(e){for(let t of e)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(e){try{return await this.api.datasets.getDatasetById(e,this.api.requestOptions)}catch{return}}async updateEntity(e,t){await this.api.datasets.updateDataset(e,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(e){await this.api.datasets.deleteDatasetsBatch({ids:e},this.api.requestOptions);}};});async function O8(){return $D||($D=await vae()),$D}var $D,K8=n(()=>{$D=null;});var Fo,Ed=n(()=>{oe();ir();K8();Fo=class p{constructor(o,e){let{id:t,traceId:i,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=o;this.id=t||ue(),this.traceId=i,this.spanId=a,this.source=s||jf.Sdk,this.description=c!=null?c:e,this.evaluators=l,this.executionPolicy=m,this.data={...u,...c!==void 0?{description:c}:{}};}getContent(o=false){return o?{...this.data,id:this.id}:{...this.data}}async contentHash(){let o={...this.getContent()};this.evaluators&&this.evaluators.length>0&&(o.evaluators=this.evaluators),this.executionPolicy&&Object.keys(this.executionPolicy).length>0&&(o.executionPolicy=this.executionPolicy);let e=Tae(o);return (await O8()).h32(e,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(o){return new p({id:o.id,traceId:o.traceId,spanId:o.spanId,source:o.source,...o.evaluators&&{evaluators:o.evaluators},...o.executionPolicy&&{executionPolicy:o.executionPolicy},...o.data},o.description)}};});async function Ne(p,o,e){var c;if(e===0)return [];let t=new TextDecoder$1("utf-8"),i=[],a="",s=p.getReader();try{for(;;){let{done:l,value:m}=await s.read();if(l)break;let u=m;a+=t.decode(u,{stream:!0});let d=a.split(`
|
|
4
4
|
`);a=(c=d.pop())!=null?c:"";for(let f of d)if(!(!f.trim()||f==="{}"||f==="[]"||f==="null"))try{let g=JSON.parse(f),h=o.parse(g,{unrecognizedObjectKeys:"strip"});if(h.ok){if(i.push(h.value),e!==void 0&&i.length>=e)return s.releaseLock(),i}else 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=o.parse(l,{unrecognizedObjectKeys:"strip"});m.ok?i.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 i}function ar(p,o){let e=[];for(let t=0;t<p.length;t+=o.maxBatchSize)e.push(p.slice(t,t+o.maxBatchSize));return e}var Xr=n(()=>{re();});async function Bo(p,o){let{datasetName:e,projectName:t,datasetVersion:i,nbSamples:a,lastRetrievedId:s}=o;if(a===0)return [];let c=[],l=a,m=s;for(;;){let u=Math.min(l!=null?l:$8,$8),d=await p.api.datasets.streamDatasetItems({datasetName:e,projectName:t,lastRetrievedId:m,steamLimit:u,datasetVersion:i}),f=await Ne(d,G.DatasetItemPublic,u);if(f.length===0)break;let g=f.map(h=>Fo.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 $8,QD=n(()=>{Ed();Xr();Tr();$8=2e3;});var $s,Cd=n(()=>{QD();$s=class{constructor(o,e,t,i){this.datasetName=o,this.datasetId=e,this.versionInfo=t,this.opik=i;}get name(){return this.datasetName}get id(){return this.datasetId}get versionId(){return this.versionInfo.id}get versionHash(){return this.versionInfo.versionHash}get versionName(){return this.versionInfo.versionName}get tags(){return this.versionInfo.tags}get isLatest(){return this.versionInfo.isLatest}get itemsTotal(){return this.versionInfo.itemsTotal}get itemsAdded(){return this.versionInfo.itemsAdded}get itemsModified(){return this.versionInfo.itemsModified}get itemsDeleted(){return this.versionInfo.itemsDeleted}get changeDescription(){return this.versionInfo.changeDescription}get createdAt(){return this.versionInfo.createdAt}get createdBy(){return this.versionInfo.createdBy}getVersionInfo(){return this.versionInfo}async getItems(o,e){return (await Bo(this.opik,{datasetName:this.datasetName,datasetVersion:this.versionInfo.versionHash,nbSamples:o,lastRetrievedId:e})).map(i=>i.getContent(true))}async toJson(o={}){let t=(await this.getItems()).map(i=>{let a={...i};for(let[s,c]of Object.entries(o))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return Tae(t)}};});var ke,Mt=n(()=>{re();ke=class extends Error{constructor(o){var e;super(o.message),this.name=this.constructor.name,this.code=o.code,this.statusCode=o.statusCode,this.details=o.details,this.originalError=o.originalError,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 Q8=n(()=>{});var YD,XD=n(()=>{YD={DATASET_NOT_FOUND:p=>`Dataset with name '${p}' not found`,DATASET_ITEM_NOT_FOUND:p=>`Dataset item with id '${p}' not found`,DATASET_ITEM_MISSING_ID:p=>`Item at index ${p} is missing an ID required for update`,INVALID_JSON_FORMAT:p=>`Invalid JSON format${p?": "+p:""}`,JSON_NOT_ARRAY:"JSON input must be an array of objects",ITEM_NOT_OBJECT:(p,o)=>`Item at position ${p} is not an object (${o})`,INSERTION_FAILED:p=>`Failed to insert items from JSON: ${p}`,DATASET_JSON_PARSE_ERROR:p=>`Failed to parse JSON input: ${p}`,DATASET_VERSION_NOT_FOUND:(p,o)=>`Dataset version '${p}' not found in dataset '${o}'`};});var Y8,Id,Qs,ZD=n(()=>{XD();Mt();Y8={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID",DATASET_VERSION_NOT_FOUND:"DATASET_VERSION_NOT_FOUND"},Id=class extends ke{constructor(o){super({message:YD.DATASET_ITEM_MISSING_ID(o),code:Y8.DATASET_ITEM_MISSING_ID});}},Qs=class extends ke{constructor(o,e){super({message:YD.DATASET_VERSION_NOT_FOUND(o,e),code:Y8.DATASET_VERSION_NOT_FOUND});}};});var X8=n(()=>{XD();ZD();});var Cae,Dd,Z8=n(()=>{Mt();Cae={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},Dd=class extends ke{constructor(o){super({message:o,code:Cae.SEARCH_TIMEOUT});}};});var q8=n(()=>{});var eZ=n(()=>{Z8();q8();});var Ud,Nd,Mo,Ys=n(()=>{Ud=class extends Error{constructor(o){super(o),this.name="AnnotationQueueError";}},Nd=class extends Ud{constructor(o){super(`Annotation queue with ID '${o}' not found`),this.name="AnnotationQueueNotFoundError";}},Mo=class extends Ud{constructor(o,e){let t=e!==void 0?` at index ${e}`:"";super(`${o} object${t} has no ID`),this.name="AnnotationQueueItemMissingIdError";}};});var Er,Wo,Fd=n(()=>{Mt();Er=class extends ke{constructor(o){super({message:o,code:"CONFIG_NOT_FOUND"}),this.name="ConfigNotFoundError";}},Wo=class extends ke{constructor(o){super({message:o,code:"CONFIG_MISMATCH"}),this.name="ConfigMismatchError";}};});var Bd,Md,Wd,qD=n(()=>{Bd=class extends Error{constructor(o){super(o),this.name="EnvironmentError";}},Md=class extends Bd{constructor(o){super(`Environment '${o}' already exists in this workspace.`),this.name="EnvironmentAlreadyExistsError";}},Wd=class extends Bd{constructor(o){super(o),this.name="EnvironmentConfigurationError";}};});var eU=n(()=>{Mt();Q8();X8();eZ();Ys();Fd();qD();});var Ld,rZ=n(()=>{Ld={JSON_NOT_ARRAY:p=>`JSON input must be an array of objects${p?` (${p})`:""}`,JSON_PARSE_ERROR:"Failed to parse JSON input",JSON_ITEM_NOT_OBJECT:(p,o)=>`Item at position ${p} is not an object (${o})`};});var rU,Vd,Jd,Hd,tZ=n(()=>{Mt();rZ();rU={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Vd=class extends ke{constructor(o){let e=o instanceof Error?o:new Error(String(o));super({message:Ld.JSON_PARSE_ERROR,code:rU.JSON_PARSE_ERROR,originalError:e});}},Jd=class extends ke{constructor(o){super({message:Ld.JSON_NOT_ARRAY(o),code:rU.JSON_NOT_ARRAY});}},Hd=class extends ke{constructor(o,e){super({message:Ld.JSON_ITEM_NOT_OBJECT(o,e),code:rU.JSON_ITEM_NOT_OBJECT});}};});var fr,Gd=n(()=>{ir();Ed();Cd();QD();Xr();re();eU();tZ();J();fr=class{constructor({name:o,description:e,id:t,projectName:i},a){this.opik=a;this.idToHash=new Map;this.hashes=new Set;this.id=t||ue(),this.name=o,this.description=e,this.projectName=i;}async insert(o){if(!o||o.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let e=await this.getDeduplicatedItems(o),t=ar(e,{maxBatchSize:1e3}),i=ue();try{let a=0;for(let s of t)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:s,batchGroupId:i,projectName:this.projectName}),a+=s.length,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(o){if(!(!o||o.length===0)){for(let e=0;e<o.length;e++)if(!o[e].id)throw new Id(e);await this.insert(o);}}async delete(o){if(!o||o.length===0){E.info("No item IDs provided for deletion");return}let e=ar(o,{maxBatchSize:100}),t=ue();for await(let i of e){E.debug("Deleting dataset items batch",{batchSize:i.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:i,batchGroupId:t});for(let a of i)if(this.idToHash.has(a)){let s=this.idToHash.get(a);this.hashes.delete(s),this.idToHash.delete(a);}}this.cachedItemsCount=void 0;}async clear(){let e=(await this.getItems()).map(t=>t.id).filter(Boolean);e.length!==0&&await this.delete(e);}async getTags(){var e;return (e=(await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName})).tags)!=null?e:[]}async getItemsCount(){if(this.cachedItemsCount===void 0){let o=await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName});this.cachedItemsCount=o.datasetItemsCount;}return this.cachedItemsCount}async getItems(o,e){return (await Bo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:e})).map(i=>i.getContent(true))}async getRawItems(o,e){return Bo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:e})}async insertFromJson(o,e={},t=[]){let i;try{i=JSON.parse(o);}catch(s){throw new Vd(s)}if(!Array.isArray(i))throw new Jd(typeof i);if(i.length===0)return;for(let s=0;s<i.length;s++){let c=i[s];if(typeof c!="object"||c===null)throw new Hd(s,typeof c)}let a=i.map(s=>{let c=s,l={};for(let[m,u]of Object.entries(c)){if(t.includes(m))continue;let d=e[m]||m;l[d]=u;}return l});await this.insert(a);}async toJson(o={}){let t=(await this.getItems()).map(i=>{let a={...i};for(let[s,c]of Object.entries(o))if(s in a){let l=a[s];delete a[s],a[c]=l;}return a});return Tae(t)}async getDeduplicatedItems(o){let e=[];for(let t of o){let i=new Fo(t),a=await i.contentHash();if(this.hashes.has(a)){E.debug("Duplicate item found - skipping",{contentHash:a,datasetId:this.id});continue}e.push(i.toApiModel()),this.hashes.add(a),this.idToHash.set(i.id,a);}return e}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){E.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let o=await Bo(this.opik,{datasetName:this.name,projectName:this.projectName});this.clearHashState();for(let e of o){let t=await e.contentHash();this.idToHash.set(e.id,t),this.hashes.add(t);}E.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:o.length});}catch(o){if(o instanceof k&&o.statusCode===404){E.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw o}}async getVersionView(o){let e=await this.findVersionByName(o);if(!e)throw new Qs(o,this.name);return new $s(this.name,this.id,e,this.opik)}async getCurrentVersionName(){let o=await this.getVersionInfo();return o==null?void 0:o.versionName}async getVersionInfo(){var o;try{let t=(o=(await this.opik.api.datasets.listDatasetVersions(this.id,{page:1,size:1})).content)!=null?o:[];return t.length===0?void 0:t[0]}catch(e){if(e instanceof k&&e.statusCode===404)return;throw e}}async findVersionByName(o){try{return await this.opik.api.datasets.retrieveDatasetVersion(this.id,{versionName:o})}catch(e){if(e instanceof k&&e.statusCode===404)return;throw e}}};});var tU,Wt,oZ=n(()=>{tU=class extends Error{constructor(o){super(o),this.name="DatasetError";}},Wt=class extends tU{constructor(o){super(`Dataset with name '${o}' not found`),this.name="DatasetNotFoundError";}};});var oU=n(()=>{Gd();Ed();Cd();oZ();});var Xs,Od,iU=n(()=>{Xs=class{constructor(o){if(!o.datasetItemId)throw new Error("datasetItemId is required");if(!o.traceId)throw new Error("traceId is required");this.datasetItemId=o.datasetItemId,this.traceId=o.traceId,this.projectName=o.projectName;}},Od=class p{constructor(o){this.id=o.id,this.datasetItemId=o.datasetItemId,this.traceId=o.traceId,this.datasetItemData=o.datasetItemData,this.evaluationTaskOutput=o.evaluationTaskOutput,this.feedbackScores=[...o.feedbackScores];}static fromRestExperimentItemCompare(o){var t,i;let e=(i=(t=o.feedbackScores)==null?void 0:t.map(a=>({categoryName:a.categoryName,name:a.name,reason:a.reason,value:a.value,source:a.source})))!=null?i:[];return new p({id:o.id,traceId:o.traceId,datasetItemId:o.datasetItemId,datasetItemData:o.input,evaluationTaskOutput:o.output,feedbackScores:e})}};});var Cr,Kd=n(()=>{ir();iU();Xr();re();Tr();HD();pt();Cr=class{constructor({id:o,name:e,datasetName:t,prompts:i,tags:a,projectName:s},c){this.opik=c;this.id=o||ue(),this._name=e,this.datasetName=t,this.prompts=i,this.tags=a,this.projectName=s;}get name(){return this._name}async ensureNameLoaded(){if(this._name!==void 0)return this._name;let o=await this.opik.api.experiments.getExperimentById(this.id);if(this._name=o.name,!this._name)throw new Error("Experiment name is not loaded");return this._name}async insert(o){if(o.length===0)return;let e=o.map(i=>({id:ue(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId,projectName:i.projectName})),t=ar(e,{maxBatchSize:50});try{for(let i of t)await this.opik.api.experiments.createExperimentItems({experimentItems:i});E.debug(`Inserted ${o.length} items into experiment ${this.id}`);}catch(i){throw E.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(o){let e=[],{maxResults:i,truncate:a=false}=o||{},s,c=true;try{for(;c&&!(i!==void 0&&e.length>=i);){let l=i?Math.min(i-e.length,2e3):2e3,m=await this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:l,lastRetrievedId:s,truncate:a});try{let u=await Ne(m,G.ExperimentItemCompare,l);if(u.length===0){c=!1;break}for(let d of u){let f=Od.fromRestExperimentItemCompare(d);if(e.push(f),i!==void 0&&e.length>=i){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${i?` (limited by maxResults=${i})`:""}`),e}async getUrl(){if(!this.datasetName)throw new Error("Cannot get URL: the associated dataset has been deleted or is unavailable");let o=await this.opik.getDataset(this.datasetName,this.projectName),e=this.opik.config.apiUrl||Ke.apiUrl;return S8({datasetId:o.id,experimentId:this.id,baseUrl:e})}};});var $d,aU=n(()=>{Kd();$d=class extends Cr{constructor(o,e){super(o,e),this.passRate=o.passRate,this.passedCount=o.passedCount,this.totalCount=o.totalCount,this.assertionScores=o.assertionScores;}};});var Qd,nU=n(()=>{Qd={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(o){try{let e=JSON.parse(o);return Array.isArray(e)&&e.leng
|
|
|
19
19
|
`),(l[u].length>0||u<l.length-1)&&(m+=ene()+l[u]);return p.call(o==="stdout"?process.stdout:process.stderr,m,i,a)}return p.call(o==="stdout"?process.stdout:process.stderr,t,i,a)}}function p7(){var p;vU||(s7=typeof((p=process.stdout)==null?void 0:p.isTTY)=="boolean"&&process.stdout.isTTY,vU=process.stdout.write.bind(process.stdout),i7=process.stderr.write.bind(process.stderr),process.stdout.write=n7(vU,"stdout"),process.stderr.write=n7(i7,"stderr"));}function c7(p){var e;let o=(e=Ru.get(p))!=null?e:[];return Ru.delete(p),o}var zU,SU,o7,vU,i7,a7,s7,Ru,jU=n(()=>{du();zU=[245,166,35],SU=[224,62,45],o7=20,vU=null,i7=null,a7=0,s7=false,Ru=new Map;});function one(p,o){if(p==null)return p;switch(o){case "boolean":return typeof p=="boolean"?p:Qo(String(p),"boolean");case "float":case "integer":{if(typeof p=="number")return p;let e=Qo(String(p),"float");if(typeof e=="number"&&Number.isNaN(e))throw new TypeError(`Cannot cast "${p}" to number`);return o==="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 rne,tne,l7,xu,lp,m7=n(()=>{zp();ag();fu();fU();cp();PU();re();ir();uu();du();jU();rne=500,tne=3e5,l7=1e4,xu=class{constructor(o,e,t){this.shutdownRequested=false;this.heartbeatTimer=null;this.pollTimer=null;this.cancelledJobs=new Map;this.activeTasks=new Set;this.pollFailures=0;var i,a;this.api=o,this.runnerId=e,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!=null?i: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 o=setInterval(()=>{this.heartbeatTick().catch(e=>{E.debug("Heartbeat tick error",{error:e});});},this.heartbeatIntervalMs);o.unref(),this.heartbeatTimer=o;}async heartbeatTick(){var o;if(!this.shutdownRequested)try{let t=(o=(await this.api.runners.heartbeat(this.runnerId)).cancelledJobIds)!=null?o:[],i=Date.now();for(let a of t)this.cancelledJobs.set(a,i);this.pruneCancelledJobs(i);}catch(e){if(e instanceof ct){E.info("Runner deregistered (410), shutting down"),this.shutdown();return}E.debug("Heartbeat error",{error:e});}}startPolling(){this.pollTick(1e3);}pollTick(o){if(this.shutdownRequested)return;(async()=>{if(this.shutdownRequested)return;let t=o;try{let i=await this.api.runners.nextJob(this.runnerId);if(this.pollFailures=0,t=1e3,i===null){this.scheduleNextPoll(rne,t);return}this.spawnJob(i);}catch(i){if(this.pollFailures++,this.pollFailures===1){let s=i instanceof k?i.statusCode:void 0;E.warn("Unable to reach Opik server"+(s?` (API ${s})`:"")+". Retrying...",{error:i});}else E.debug("Poll error",{error:i});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(o),Math.min(o*2,this.backoffCapMs));});}scheduleNextPoll(o,e){if(this.shutdownRequested)return;let t=setTimeout(()=>this.pollTick(e),o);t.unref(),this.pollTimer=t;}spawnJob(o){let e=this.executeJob(o).finally(()=>{this.activeTasks.delete(e);});this.activeTasks.add(e);}async executeJob(o){var s,c;let e=(s=o.id)!=null?s:"",t=(c=o.agentName)!=null?c:"";if(this.cancelledJobs.has(e)){E.debug(`Skipping cancelled job ${e}`),this.cancelledJobs.delete(e);return}if(!Yo().get(t)){E.error(`Unknown agent '${t}' for job ${e}`),await this.reportJobResult(e,{status:"failed",error:`Unknown agent: ${t}`,traceId:o.traceId});return}let a=ue();await this.reportJobResult(e,{status:"running",traceId:a});try{let l=await this.invokeAgent(o,e,a);await hu().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 hu().catch(()=>{}),await this.sendJobLogs(e);let m=o.timeout,u=l instanceof lp?`Job timed out after ${m}s`:l instanceof Error?`${l.name}: ${l.message}`:String(l);l instanceof lp?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(o,e,t){var h,y;let i=(h=o.agentName)!=null?h:"",a=(y=o.inputs)!=null?y:{},s=o.maskId,c=o.blueprintName,l=o.promptMasks,m=Yo().get(i),u=m.params.map(w=>{let A=a[w.name];if(!(w.presence===oo.Optional&&A===void 0&&!(w.name in a)))return one(A,w.type)}),d=()=>YZ({traceId:t,jobId:e},()=>kZ(l,()=>s||c?gu({blueprintName:c,maskId:s},()=>m.func(...u)):m.func(...u))),f=Promise.resolve(d()),g=o.timeout;return g&&g>0?Promise.race([f,new Promise((w,A)=>{setTimeout(()=>A(new lp("Job timed out")),g*1e3).unref();})]):f}normalizeResult(o){return o!=null&&typeof o!="string"&&typeof o!="number"&&typeof o!="boolean"&&!Array.isArray(o)&&typeof o!="object"&&(o=String(o)),typeof o=="object"&&o!==null&&!Array.isArray(o)?o:{result:o}}async reportJobResult(o,e){try{await this.api.runners.reportJobResult(o,e);}catch(t){E.warn(`Failed to report result for job ${o}`,{error:t});}}async sendJobLogs(o){let e=c7(o);if(e.length!==0)try{await this.api.runners.appendJobLogs(o,{body:e});}catch{E.debug(`Failed to send logs for job ${o}`);}}pruneCancelledJobs(o){let e=o-tne;for(let[t,i]of this.cancelledJobs)i<=e&&this.cancelledJobs.delete(t);if(this.cancelledJobs.size>l7){let t=[...this.cancelledJobs.entries()].sort((a,s)=>a[1]-s[1]),i=t.length-l7;for(let a=0;a<i;a++)this.cancelledJobs.delete(t[a][0]);}}jitteredBackoff(o){return Math.min(o,this.backoffCapMs)*(.5+Math.random()*.5)}};lp=class extends Error{constructor(o){super(o),this.name="TimeoutError";}};});function EU(){process.env.OPIK_RUNNER_MODE==="true"&&(d7||(d7=true,ine().catch(p=>{E.error("Runner activation failed",{error:p});})));}async function ine(){var m,u;let p=(m=process.env.OPIK_RUNNER_ID)!=null?m:"",o=(u=process.env.OPIK_PROJECT_NAME)!=null?u:"";if(!p){E.error("OPIK_RUNNER_ID not set, cannot activate runner");return}ane(p,o),p7();let e=new br,t=e.api;function i(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=Yo(),g={};for(let[h,y]of f)g[h]=i(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=Yo();if(s.size>0){let d={};for(let[f,g]of s)d[f]=i(g);try{await t.runners.registerAgents(p,{body:d});}catch{E.debug("Failed to register agents on startup");}}e7(a),E.info("Runner activated");let c=new xu(t,p);c.start();let l=()=>{u7=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",()=>{u7||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 ane(p,o){let e=[" \u2800\u20DD","opik ",`runner: ${p}`];o&&e.push(` project: ${o}`),console.log(e.join("")),console.log();}var d7,u7,CU=n(()=>{re();Vo();uu();m7();jU();d7=false,u7=false;});function pne(p){return !!p&&(typeof p=="object"||typeof p=="function")&&typeof p.then=="function"}function cne({name:p,parentSpan:o,projectName:e,trace:t,type:i="llm",environment:a}){var l;E.debug("Creating new span:",{name:p,parentSpan:o==null?void 0:o.data.id,projectName:e,type:i,environment:a});let s=t;if(s)a!==void 0&&a!==s.data.environment&&E.warn(`Nested @track requested environment "${a}", but the enclosing trace already uses "${(l=s.data.environment)!=null?l:"(none)"}". The outer environment will be used.`);else {let m=QZ();s=yu().trace({name:p,projectName:e,...a!==void 0?{environment:a}:{},...m?{id:m}:{}});}let c=s.span({name:p,parentSpanId:o==null?void 0:o.data.id,projectName:e,type:i});return E.debug("Span created with ID:",c.data.id),{span:c,trace:s}}function lne({args:p,span:o,trace:e}){if(E.debug("Starting span execution:",{spanId:o.data.id,traceId:e==null?void 0:e.data.id}),p.length===0)return;let t={arguments:p};E.debug("Recording span input"),o.update({input:t}),e&&(E.debug("Recording trace input"),e.update({input:t}));}function g7({result:p,span:o,trace:e,enrichSpan:t}){E.debug("Recording successful execution:",{spanId:o.data.id,traceId:e==null?void 0:e.data.id});let i=typeof p=="object"?p:{result:p},a=new Date,s={endTime:a,output:i};if(t){let c=t(p);Object.assign(s,c);}o.update(s),e&&e.update({endTime:a,output:i});}function mne(p){var o;try{let e=p instanceof Error?p:new Error(String(p));return {message:e.message,exceptionType:e.name,traceback:p instanceof Error&&(o=e.stack)!=null?o:""}}catch{return {message:"<thrown value could not be described>",exceptionType:"Error",traceback:""}}}function f7({span:p,error:o,trace:e}){let t=mne(o);E.error("Recording execution error:",{spanId:p.data.id,traceId:e==null?void 0:e.data.id,error:o instanceof Error?{name:t.exceptionType,message:t.message,stack:t.traceback}:o}),p.update({errorInfo:t}),p.end(),e&&(e.update({errorInfo:t}),e.end());}function wu({name:p,projectName:o,type:e,enrichSpan:t,environment:i}={},a){return function(...c){if(!Le())return a.apply(this,c);let l=Kt.getStore(),{span:m,trace:u}=cne({name:p!=null?p:a.name||sne,parentSpan:l==null?void 0:l.span,projectName:o,trace:l==null?void 0:l.trace,type:e,environment:i}),d=!l,f=this;return Kt.run({span:m,trace:u},()=>{let g=d?u:void 0;try{lne({args:c,span:m,trace:g});let h=a.apply(f,c);return pne(h)?h.then(y=>(g7({span:m,result:y,trace:g,enrichSpan:t}),y),y=>{throw f7({span:m,error:y,trace:g}),y}):(g7({span:m,result:h,trace:g,enrichSpan:t}),h)}catch(h){throw f7({span:m,error:h,trace:g}),h}})}}function et(p,o){if(typeof p=="function")return wu({},p);let e=p;if(o){let t=wu(e,o);return e.entrypoint&&dne(o,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 wu(e,s)}let[,,i]=t;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let a=i.value;return i.value=wu(e,a),i}}function dne(p,o,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 i=e.projectName||yu().config.projectName,a=(m=e.params)!=null?m:r7(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}));qZ({func:o,name:t,project:i,params:l,docstring:""}),EU();}function yu(){return IU===null&&(IU=new br),IU}var sne,Kt,$t,IU,Ur=n(()=>{Vo();ro();re();du();uu();CU();sne="track.decorator",Kt=new AsyncLocalStorage,$t=()=>{let{span:p,trace:o}=Kt.getStore()||{};if(!(!p||!o))return {span:p,trace:o}};IU=null;});function une(p,o){var e;if(p!=null)return o==="prompt"?(e=p.commit)!=null?e:void 0:o==="prompt_commit"?xU(p,o):p}function DU(p){let{values:o,fieldNames:e,blueprintId:t,blueprintVersion:i,isFallback:a,maskId:s}=p,c={...o};return Object.defineProperties(c,{blueprintId:{value:t,enumerable:false,writable:false},blueprintVersion:{value:i,enumerable:false,writable:false},isFallback:{value:a,enumerable:false,writable:false}}),new Proxy(c,{get(m,u){return typeof u!="string"||gne.has(u)||e.has(u)&&fne({blueprintId:t,blueprintVersion:i,maskId:s,fieldNames:e,values:o}),Reflect.get(m,u)}})}function fne(p){let o=$t();if(!o)return;let{blueprintId:e,blueprintVersion:t,maskId:i,fieldNames:a,values:s}=p,c={};for(let u of a){let d=s[u];if(d===void 0)continue;let f=cu(d);c[u]={value:une(d,f),type:f};}let l={_blueprint_id:e,blueprint_version:t,values:c};i!==void 0&&(l._mask_id=i);let m={agent_configuration:l};o.span.update({metadata:m}),o.trace.update({metadata:m});}var gne,h7=n(()=>{Ur();cp();gne=new Set(["blueprintId","blueprintVersion","isFallback"]);});function b7(){let p=process.env.OPIK_CONFIG_TTL_SECONDS;if(p!==void 0){let o=parseInt(p,10);if(!isNaN(o))return o}return hne}function R7(p,o,e,t=null){return FU.getOrCreate(p,o,e,t)}function BU(p,o,e,t,i,a=null){let s=FU.getOrCreate(p,o,e,a);t!==null&&s.update(t),i!==null&&e===null&&(s.setRefreshCallback(i),FU.ensureRefreshTimerStarted());}var hne,yne,y7,UU,NU,FU,x7=n(()=>{re();hne=300,yne=1e3,y7=100;UU=class{constructor(o){this._blueprint=null;this._lastFetchMs=null;this._refreshCallback=null;this._ttlMs=o*1e3;}setRefreshCallback(o){this._refreshCallback===null&&(this._refreshCallback=o);}update(o){this._blueprint=o,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 o=await this._refreshCallback();o!==null&&this.update(o);}catch(o){E.debug("Background blueprint cache refresh failed",o);}}},NU=class{constructor(){this._entries=new Map;this._intervalHandle=null;this._refreshRunning=false;}getOrCreate(o,e,t,i=null){let a=`${o}::${e!=null?e:""}::${t!=null?t:""}::${i!=null?i:""}`,s=this._entries.get(a);return s||(s=new UU(b7()),this._entries.set(a,s)),s}ensureRefreshTimerStarted(){if(this._intervalHandle!==null)return;let o=Math.max(b7()*1e3,yne);this._intervalHandle=setInterval(()=>{this._refreshAllStale();},o),this._intervalHandle.unref();}async _refreshAllStale(){if(!this._refreshRunning){this._refreshRunning=true;try{let o=[...this._entries.values()].filter(e=>e.isStale());for(let e=0;e<o.length;e+=y7)await Promise.all(o.slice(e,e+y7).map(t=>t.tryBackgroundRefresh()));}finally{this._refreshRunning=false;}}}clear(){this._intervalHandle!==null&&(clearInterval(this._intervalHandle),this._intervalHandle=null),this._refreshRunning=false,this._entries.clear();}},FU=new NU;});var cZ={};V(cZ,{OpikClient:()=>br,clients:()=>bu,resetDefaultProjectWarning:()=>bne});function bne(){MU=false;}var bu,MU,Rne,_u,br,Vo=n(()=>{pt();ro();Tr();oe();Bf();k8();ir();re();HD();T8();W8();L8();V8();J8();H8();G8();oU();Kd();aU();nZ();Lf();pU();Xr();gU();qd();op();Lt();Ir();wZ();uU();fU();iu();su();eU();RU();_U();lu();cp();h7();fu();x7();Ur();bd();Fd();qD();pt();bu=[],MU=false;Rne=Xd+500,_u=class _u{constructor(o){this.displayTraceLog=(o,e)=>{if(e===this.lastProjectNameLogged||!this.config.apiUrl)return;let t=v8(o,this.config.apiUrl);E.info(`Started logging traces to the "${e}" project at ${kp(t)}`),this.lastProjectNameLogged=e;};this.trace=o=>{E.debug("Creating new trace with data:",o);let e=this.resolveProjectName(o.projectName),t=o.environment!==void 0?o.environment:this.config.environment,i=new xd({id:ue(),startTime:new Date,source:"sdk",...o,projectName:e,...t!==void 0?{environment:t}:{}},this);return Le()&&(this.traceBatchQueue.create(i.data),E.debug("Trace added to the queue with ID:",i.data.id),this.displayTraceLog(i.data.id,e)),i};this.getDataset=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting dataset with name "${o}"`);try{await this.datasetBatchQueue.flush();let i=await this.api.datasets.getDatasetByIdentifier({datasetName:o,projectName:t});return new fr({...i,projectName:t},this)}catch(i){throw i instanceof k&&i.statusCode===404?new Wt(o):i}};this.createDataset=async(o,e,t)=>{let i=this.resolveProjectName(t);E.debug(`Creating dataset with name "${o}"`);let a=new fr({name:o,description:e,projectName:i},this);try{return this.datasetBatchQueue.create({name:a.name,description:a.description,id:a.id,projectName:i}),E.debug("Dataset added to the queue with name:",a.name),a}catch(s){throw E.error(`Failed to create dataset "${o}"`,{error:s}),new Error(`Error creating dataset "${o}": ${s}`)}};this.getOrCreateDataset=async(o,e,t)=>{E.debug(`Attempting to retrieve or create dataset with name: "${o}"`);try{return await this.getDataset(o,t)}catch(i){if(i instanceof Wt)return E.info(`Dataset "${o}" not found. Proceeding to create a new one.`),this.createDataset(o,e,t);throw E.error(`Error retrieving dataset "${o}":`,i),i}};this.getDatasets=async(o=100,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting all datasets (limit: ${o})`);try{await this.datasetBatchQueue.flush();let i;try{i=await this.getProjectIdByName(t);}catch{}let a=await this.api.datasets.findDatasets({size:o,...i&&{projectId:i}}),s=[];for(let c of a.content||[])s.push(new fr({...c,projectName:t},this));return E.info(`Retrieved ${s.length} datasets`),s}catch(i){throw E.error("Failed to retrieve datasets",{error:i}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async(o,e)=>{E.debug(`Deleting dataset with name "${o}"`);try{let t=await this.getDataset(o,e);if(!t.id)throw new Error(`Cannot delete dataset "${o}": ID not available`);this.datasetBatchQueue.delete(t.id);}catch(t){throw E.error(`Failed to delete dataset "${o}"`,{error:t}),new Error(`Failed to delete dataset "${o}": ${t}`)}};this.createTestSuite=async o=>{E.debug(`Creating test suite with name "${o.name}"`);let{TestSuite:e}=await import('./suite-VIYUUSFV.js');return e.create(this,o)};this.getTestSuite=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting test suite with name "${o}"`);let{TestSuite:i}=await import('./suite-VIYUUSFV.js');return i.get(this,o,t)};this.getOrCreateTestSuite=async o=>{E.debug(`Attempting to retrieve or create test suite with name: "${o.name}"`);let{TestSuite:e}=await import('./suite-VIYUUSFV.js');return e.getOrCreate(this,o)};this.deleteTestSuite=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Deleting test suite with name "${o}"`);let{TestSuite:i}=await import('./suite-VIYUUSFV.js');await i.delete(this,o,t);};this.getTestSuites=async(o=1e3,e)=>{var i;let t=this.resolveProjectName(e);E.debug(`Getting all test suites (limit: ${o})`);try{await this.datasetBatchQueue.flush();let a=await this.resolveProjectId(t),{TestSuite:s}=await import('./suite-VIYUUSFV.js'),c=[],l=1,m=100;for(;c.length<o;){let d=(i=(await this.api.datasets.findDatasets({page:l,size:m,...a&&{projectId:a}})).content)!=null?i:[];if(d.length===0)break;for(let f of d){if(c.length>=o)break;f.type===Ef.EvaluationSuite&&c.push(new s(new fr({...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 o=>this.createAnnotationQueueInternal(o,Zr);this.createThreadsAnnotationQueue=async o=>this.createAnnotationQueueInternal(o,qr);this.getTracesAnnotationQueue=async o=>this.fetchAnnotationQueueById(o,"trace",Zr);this.getThreadsAnnotationQueue=async o=>this.fetchAnnotationQueueById(o,"thread",qr);this.getTracesAnnotationQueues=async o=>(await this.getAnnotationQueuesByScope("trace",o)).map(t=>new Zr(t,this));this.getThreadsAnnotationQueues=async o=>(await this.getAnnotationQueuesByScope("thread",o)).map(t=>new qr(t,this));this.deleteTracesAnnotationQueue=async o=>this.deleteAnnotationQueueById(o,"traces");this.deleteThreadsAnnotationQueue=async o=>this.deleteAnnotationQueueById(o,"threads");this.createExperiment=async({datasetName:o,name:e,experimentConfig:t,prompts:i,type:a=Nf.Regular,optimizationId:s,datasetVersionId:c,evaluationMethod:l,tags:m,projectName:u})=>{if(E.debug(`Creating experiment for dataset "${o}"`),!o)throw new Error("Dataset name is required to create an experiment");let[d,f]=aZ(t,i),g=this.resolveProjectName(u),h=ue(),y=new Cr({id:h,name:e,datasetName:o,prompts:i,tags:m,projectName:g},this);try{return await this.api.experiments.createExperiment({id:h,datasetName:o,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 "${o}"`,{error:w}),new Error(`Error creating experiment: ${w}`)}};this.updateExperiment=async(o,e)=>{if(!o)throw new Error("id is required to update an experiment");let{name:t,experimentConfig:i}=e;if(!t&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");E.debug(`Updating experiment with ID "${o}"`);let a={};t!==void 0&&(a.name=t),i!==void 0&&(a.metadata=i);try{await this.api.experiments.updateExperiment(o,{body:a});}catch(s){throw E.error(`Failed to update experiment with ID "${o}"`,{error:s}),s}};this.getExperimentById=async o=>{var e,t;E.debug(`Getting experiment with ID "${o}"`);try{let i=await this.api.experiments.getExperimentById(o);return new Cr({id:i.id,name:i.name,datasetName:(e=i.datasetName)!=null?e:void 0,projectName:(t=i.projectName)!=null?t:void 0},this)}catch(i){throw i instanceof k&&i.statusCode===404?new Zs(`No experiment found with ID '${o}'`):(E.error(`Failed to get experiment with ID "${o}"`,{error:i}),i)}};this.getExperimentsByName=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting experiments with name "${o}"`);try{let i=await this.api.experiments.streamExperiments({name:o,projectName:t});return (await Ne(i,G.ExperimentPublic)).map(s=>{var c,l;return new Cr({id:s.id,name:s.name,datasetName:(c=s.datasetName)!=null?c:void 0,projectName:(l=s.projectName)!=null?l:void 0},this)})}catch(i){throw E.error(`Failed to get experiments with name "${o}"`,{error:i}),i}};this.getExperiment=async(o,e)=>{E.debug(`Getting experiment with name "${o}"`);let t=await this.getExperimentsByName(o,e);if(t.length===0)throw new Zs(o);return t[0]};this.getDatasetExperiments=async(o,e=100,t)=>{E.debug(`Getting experiments for dataset "${o}"`);let i=await this.getDataset(o,t);try{return await this.findExperimentsByDatasetId(i.id,e,a=>{var s;return new Cr({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 "${o}"`,{error:a}),a}};this.getTestSuiteExperiments=async(o,e=100,t)=>{E.debug(`Getting experiments for test suite "${o}"`);let i=await this.getDataset(o,t);try{return await this.findExperimentsByDatasetId(i.id,e,a=>{var s;return new $d({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 "${o}"`,{error:a}),a}};this.findExperimentsByDatasetId=async(o,e,t)=>{var c;let i=Math.min(100,e),a=[],s=1;for(;a.length<e;){let l=await this.api.experiments.findExperiments({page:s,size:i,datasetId:o}),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 o=>{E.debug(`Deleting experiment with ID "${o}"`);try{await this.api.experiments.deleteExperimentsById({ids:[o]});}catch(e){throw E.error(`Failed to delete experiment with ID "${o}"`,{error:e}),e}};this.createPromptInternal=async(o,e,t,i,a,s,c,l,m)=>{var u;E.debug(`Creating ${l}`,{name:o});try{let d=await RZ(this.api.prompts,o,this.api.requestOptions);a(d);let f=(u=i.type)!=null?u:Fe.MUSTACHE,g=xZ({prompt:e,metadata:i.metadata},d,f),h;if(g?(E.debug(`Creating new ${l} version`,{name:o}),h=await this.api.prompts.createPromptVersion({name:o,version:{template:e,metadata:i.metadata,type:f},templateStructure:t,projectName:m},this.api.requestOptions)):(E.debug(`Returning existing ${l} version`,{name:o}),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:o}),i.description||i.tags?await w.updateProperties({description:i.description,tags:i.tags}):w}catch(d){if(d instanceof k||d instanceof Mr)return E.warn(`Failed to sync ${l} '${o}' 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:o,error:d}),d}};this.createPrompt=async o=>{let e=this.resolveProjectName(o.projectName);return this.createPromptInternal(o.name,o.prompt,Re.Text,o,()=>{},(t,i)=>sr.fromApiResponse(t,i,this,e),()=>{var t;return new sr({name:o.name,prompt:o.prompt,metadata:o.metadata,type:(t=o.type)!=null?t:Fe.MUSTACHE,description:o.description,tags:o.tags,projectName:e,synced:false},this)},"prompt",e)};this.createChatPrompt=async o=>{let e=this.resolveProjectName(o.projectName),t=JSON.stringify(o.messages);return this.createPromptInternal(o.name,t,Re.Chat,o,i=>{if(i&&i.templateStructure&&i.templateStructure!==Re.Chat)throw new Vt(o.name,i.templateStructure,Re.Chat)},(i,a)=>pr.fromApiResponse(i,a,this,e),()=>{var i;return new pr({name:o.name,messages:structuredClone(o.messages),metadata:o.metadata,type:(i=o.type)!=null?i:Fe.MUSTACHE,description:o.description,tags:o.tags,projectName:e,synced:false},this)},"chat prompt",e)};this.getPrompt=async o=>this.getPromptWithCache(o,Re.Text,(e,t,i)=>sr.fromApiResponse(e,t,this,i),"prompt");this.getChatPrompt=async o=>this.getPromptWithCache(o,Re.Chat,(e,t,i)=>pr.fromApiResponse(e,t,this,i),"chat prompt");this.getPromptWithCache=async(o,e,t,i)=>{if(o.commit&&o.version)throw new Error("Provide either `commit` or `version`, not both. Prefer `version` \u2014 `commit` is deprecated.");if(E.debug(`Getting ${i}`,o),o.commit&&o.environment)throw new Error("'commit' and 'environment' are mutually exclusive; pass at most one.");if(o.version&&o.environment)throw new Error("'version' and 'environment' are mutually exclusive; pass at most one.");let a=this.resolveProjectName(o.projectName),s=async u=>{var d;try{let f,g;if(u){if(g=await this.api.prompts.getPromptVersionById(u,{},this.api.requestOptions),!g.promptId)return null;f=await this.api.prompts.getPromptById(g.promptId,{},this.api.requestOptions);}else {let y;try{y=await this.getProjectIdByName(a);}catch{}if(f=(d=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:o.name}]),size:1,...y&&{projectId:y}},this.api.requestOptions)).content)==null?void 0:d[0],!f)return E.debug(`${i.charAt(0).toUpperCase()+i.slice(1)} not found`,{name:o.name}),null;let A={name:o.name,projectName:a,...o.commit?{commit:o.commit}:{},...o.version?{versionNumber:o.version}:{},...o.environment?{environment:o.environment}:{}};g=await this.api.prompts.retrievePromptVersion(A,this.api.requestOptions);}let h=g.templateStructure;if(e===Re.Text){if(h&&h!==Re.Text)throw new Vt(o.name,h,Re.Text)}else if(!h||h!==Re.Chat)throw new Vt(o.name,h!=null?h:"undefined",Re.Chat);return t(f,g,a)}catch(f){if(f instanceof k&&f.statusCode===404)return null;throw E.error(`Failed to get ${i}`,{name:o.name,error:f}),f}},c=await tu(o.name,o.commit,a,e,()=>s(),this.config.promptCacheTtlSeconds,void 0,o.version,o.environment),l=c!=null&&c.id?AZ(c.id):null,m=l?await tu(o.name,o.commit,a,e,()=>s(l),this.config.promptCacheTtlSeconds,l,o.version):c;if(m!==null){let u=$t();u&&(jr.promptAlreadyInjected(u.trace.data.metadata,m.id,m.commit)||u.trace.update({prompts:[m],appendPrompts:true}),jr.promptAlreadyInjected(u.span.data.metadata,m.id,m.commit)||u.span.update({prompts:[m],appendPrompts:true}));}return m};this.searchPrompts=async o=>{var e;E.debug("Searching prompts",{filterString:o});try{let t;if(o){let l=hr.forPrompts(o).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===Re.Text?sr.fromApiResponse(c,l,this,u):m===Re.Chat?pr.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 o=>{E.debug("Deleting prompts in batch",{count:o.length});try{await this.api.prompts.deletePromptsBatch({ids:o},this.api.requestOptions),ru().evictByIds(o),E.info("Successfully deleted prompts",{count:o.length});}catch(e){throw E.error("Failed to delete prompts",{count:o.length,error:e}),e}};this.setPromptEnvironments=async o=>{let e;try{e=await this.api.prompts.retrievePromptVersion({name:o.promptName,versionNumber:o.version,projectName:this.resolveProjectName(o.projectName)},this.api.requestOptions);}catch(i){throw i instanceof k&&i.statusCode===404?o.version!==void 0?new Lo(`No version '${o.version}' found for prompt '${o.promptName}'.`):new Lo(`No prompt found with name '${o.promptName}'.`):i}let t=Array.from(new Set(o.environments));try{await this.api.prompts.setPromptVersionEnvironment(e.id,{environments:t},this.api.requestOptions);}catch(i){throw i instanceof k&&(i.statusCode===404||i.statusCode===409)?new Yd(`One or more environments in [${t.join(", ")}] are not registered in this workspace.`):i}ru().invalidateForPrompt(o.promptName,this.resolveProjectName(o.projectName));};this.searchTraces=async o=>{let{exclude:e,...t}=o!=null?o:{};return this.executeSearch("traces",t,au,(i,a,s,c,l)=>WZ(i,a,s,c,l,e))};this.searchThreads=async o=>this.executeSearch("threads",o!=null?o:{},nu,VZ);this.searchSpans=async o=>{let{exclude:e,...t}=o!=null?o:{};return this.executeSearch("spans",t,HZ,(i,a,s,c,l)=>JZ(i,a,s,c,l,e))};this.createEnvironment=async(o,e)=>{let t=ue();try{await this.api.environments.createEnvironment({id:t,name:o,description:e==null?void 0:e.description,color:e==null?void 0:e.color});}catch(i){throw i instanceof k&&i.statusCode===409?new Md(o):i}return this.api.environments.getEnvironmentById(t)};this.getEnvironments=async()=>{var e;return (e=(await this.api.environments.findEnvironments()).content)!=null?e:[]};this.updateEnvironment=async(o,e)=>{if((e==null?void 0:e.color)!==void 0&&_u.BUILTIN_ENVIRONMENT_NAMES.has(o))throw new Wd(`Cannot change the colour of the built-in environment '${o}'. Colour updates are not allowed for 'production', 'staging', or 'development'.`);let t=await this._findEnvironmentByName(o,true);return await this.api.environments.updateEnvironment(t.id,{description:e==null?void 0:e.description,color:e==null?void 0:e.color}),this.api.environments.getEnvironmentById(t.id)};this.deleteEnvironment=async o=>{let e=await this._findEnvironmentByName(o,false);e&&await this.api.environments.deleteEnvironmentsBatch({ids:[e.id]});};this._findEnvironmentByName=async(o,e)=>{let i=(await this.getEnvironments()).find(a=>a.name===o);if(!i&&e)throw new Error(`No environment found with name "${o}".`);return i};this.flush=async o=>{var t;let e=(t=o==null?void 0:o.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(i){E.error("Error during flush operation:",{error:i instanceof Error?i.message:i});}};this.createConfig=async(o,e)=>{var l,m;let t=(l=e==null?void 0:e.projectName)!=null?l:this.config.projectName;this._validatePromptProjects(o,t);let i=new Ot(t,this),a=wU(o),s=await i.getBlueprint(),c;if(s)c=await i.updateBlueprint({values:a,description:e==null?void 0:e.description});else try{c=await i.createBlueprint({values:a,description:e==null?void 0:e.description});}catch(u){if(u instanceof k&&u.statusCode===409)c=await i.updateBlueprint({values:a,description:e==null?void 0:e.description});else throw u}return (m=c.name)!=null?m:c.id};this.setConfigEnv=async o=>{var s;let e=(s=o.projectName)!=null?s:this.config.projectName,i=await new Ot(e,this).getBlueprint({name:o.version});if(!i)throw new Er(`No config version "${o.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:o.env,blueprintId:i.id}]});};this.updatePromptVersionTags=async(o,e)=>{var t;E.debug("Updating prompt version tags",{count:o.length,options:e});try{await this.api.prompts.updatePromptVersions({ids:o,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:o.length});}catch(i){throw E.error("Failed to update prompt version tags",{count:o.length,error:i}),i}};var a;E.debug("Initializing OpikClient with config:",o),this.config=Pp(o);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};o!=null&&o.headers&&(E.debug("Initializing OpikClient with additional headers:",o==null?void 0:o.headers),e.requestOptions={headers:o==null?void 0:o.headers}),this.api=new Td(e);let t=this.config.holdUntilFlush?1440*60*1e3:this.config.batchDelayMs,i=this.config.isAttachmentExtractionActive?{minSizeBytes:(a=this.config.minBase64EmbeddedAttachmentSize)!=null?a:Ke.minBase64EmbeddedAttachmentSize,apiUrl:this.config.apiUrl,workspaceName:this.config.workspaceName,apiKey:this.config.apiKey||void 0,extraHeaders:o==null?void 0:o.headers}:void 0;this.spanBatchQueue=new Pd(this.api,t,this.config.maxPayloadSizeMb,i),this.traceBatchQueue=new Sd(this.api,t,this.config.maxPayloadSizeMb,i),this.spanFeedbackScoresBatchQueue=new zd(this.api,t),this.traceFeedbackScoresBatchQueue=new vd(this.api,t),this.traceAssertionResultsBatchQueue=new _d(this.api,t,"TRACE"),this.datasetBatchQueue=new jd(this.api,t),bu.push(this);}resolveProjectName(o){return o!==void 0?o:(!MU&&this.config.projectName===Ke.projectName&&(MU=true,E.warn(`No project name configured. Traces are being logged to "Default Project".
|
|
22
|
+
`);});}function ane(p,o){let e=[" \u2800\u20DD","opik ",`runner: ${p}`];o&&e.push(` project: ${o}`),console.log(e.join("")),console.log();}var d7,u7,CU=n(()=>{re();Vo();uu();m7();jU();d7=false,u7=false;});function pne(p){return !!p&&(typeof p=="object"||typeof p=="function")&&typeof p.then=="function"}function cne({name:p,parentSpan:o,projectName:e,trace:t,type:i="llm",environment:a}){var l;E.debug("Creating new span:",{name:p,parentSpan:o==null?void 0:o.data.id,projectName:e,type:i,environment:a});let s=t;if(s)a!==void 0&&a!==s.data.environment&&E.warn(`Nested @track requested environment "${a}", but the enclosing trace already uses "${(l=s.data.environment)!=null?l:"(none)"}". The outer environment will be used.`);else {let m=QZ();s=yu().trace({name:p,projectName:e,...a!==void 0?{environment:a}:{},...m?{id:m}:{}});}let c=s.span({name:p,parentSpanId:o==null?void 0:o.data.id,projectName:e,type:i});return E.debug("Span created with ID:",c.data.id),{span:c,trace:s}}function lne({args:p,span:o,trace:e}){if(E.debug("Starting span execution:",{spanId:o.data.id,traceId:e==null?void 0:e.data.id}),p.length===0)return;let t={arguments:p};E.debug("Recording span input"),o.update({input:t}),e&&(E.debug("Recording trace input"),e.update({input:t}));}function g7({result:p,span:o,trace:e,enrichSpan:t}){E.debug("Recording successful execution:",{spanId:o.data.id,traceId:e==null?void 0:e.data.id});let i=typeof p=="object"?p:{result:p},a=new Date,s={endTime:a,output:i};if(t){let c=t(p);Object.assign(s,c);}o.update(s),e&&e.update({endTime:a,output:i});}function mne(p){var o;try{let e=p instanceof Error?p:new Error(String(p));return {message:e.message,exceptionType:e.name,traceback:p instanceof Error&&(o=e.stack)!=null?o:""}}catch{return {message:"<thrown value could not be described>",exceptionType:"Error",traceback:""}}}function f7({span:p,error:o,trace:e}){let t=mne(o);E.error("Recording execution error:",{spanId:p.data.id,traceId:e==null?void 0:e.data.id,error:o instanceof Error?{name:t.exceptionType,message:t.message,stack:t.traceback}:o}),p.update({errorInfo:t}),p.end(),e&&(e.update({errorInfo:t}),e.end());}function wu({name:p,projectName:o,type:e,enrichSpan:t,environment:i}={},a){return function(...c){if(!Le())return a.apply(this,c);let l=Kt.getStore(),{span:m,trace:u}=cne({name:p!=null?p:a.name||sne,parentSpan:l==null?void 0:l.span,projectName:o,trace:l==null?void 0:l.trace,type:e,environment:i}),d=!l,f=this;return Kt.run({span:m,trace:u},()=>{let g=d?u:void 0;try{lne({args:c,span:m,trace:g});let h=a.apply(f,c);return pne(h)?h.then(y=>(g7({span:m,result:y,trace:g,enrichSpan:t}),y),y=>{throw f7({span:m,error:y,trace:g}),y}):(g7({span:m,result:h,trace:g,enrichSpan:t}),h)}catch(h){throw f7({span:m,error:h,trace:g}),h}})}}function et(p,o){if(typeof p=="function")return wu({},p);let e=p;if(o){let t=wu(e,o);return e.entrypoint&&dne(o,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 wu(e,s)}let[,,i]=t;if(!i||typeof i.value!="function")throw new Error("track decorator can only be applied to methods");let a=i.value;return i.value=wu(e,a),i}}function dne(p,o,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 i=e.projectName||yu().config.projectName,a=(m=e.params)!=null?m:r7(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}));qZ({func:o,name:t,project:i,params:l,docstring:""}),EU();}function yu(){return IU===null&&(IU=new br),IU}var sne,Kt,$t,IU,Ur=n(()=>{Vo();ro();re();du();uu();CU();sne="track.decorator",Kt=new AsyncLocalStorage,$t=()=>{let{span:p,trace:o}=Kt.getStore()||{};if(!(!p||!o))return {span:p,trace:o}};IU=null;});function une(p,o){var e;if(p!=null)return o==="prompt"?(e=p.commit)!=null?e:void 0:o==="prompt_commit"?xU(p,o):p}function DU(p){let{values:o,fieldNames:e,blueprintId:t,blueprintVersion:i,isFallback:a,maskId:s}=p,c={...o};return Object.defineProperties(c,{blueprintId:{value:t,enumerable:false,writable:false},blueprintVersion:{value:i,enumerable:false,writable:false},isFallback:{value:a,enumerable:false,writable:false}}),new Proxy(c,{get(m,u){return typeof u!="string"||gne.has(u)||e.has(u)&&fne({blueprintId:t,blueprintVersion:i,maskId:s,fieldNames:e,values:o}),Reflect.get(m,u)}})}function fne(p){let o=$t();if(!o)return;let{blueprintId:e,blueprintVersion:t,maskId:i,fieldNames:a,values:s}=p,c={};for(let u of a){let d=s[u];if(d===void 0)continue;let f=cu(d);c[u]={value:une(d,f),type:f};}let l={_blueprint_id:e,blueprint_version:t,values:c};i!==void 0&&(l._mask_id=i);let m={agent_configuration:l};o.span.update({metadata:m}),o.trace.update({metadata:m});}var gne,h7=n(()=>{Ur();cp();gne=new Set(["blueprintId","blueprintVersion","isFallback"]);});function b7(){let p=process.env.OPIK_CONFIG_TTL_SECONDS;if(p!==void 0){let o=parseInt(p,10);if(!isNaN(o))return o}return hne}function R7(p,o,e,t=null){return FU.getOrCreate(p,o,e,t)}function BU(p,o,e,t,i,a=null){let s=FU.getOrCreate(p,o,e,a);t!==null&&s.update(t),i!==null&&e===null&&(s.setRefreshCallback(i),FU.ensureRefreshTimerStarted());}var hne,yne,y7,UU,NU,FU,x7=n(()=>{re();hne=300,yne=1e3,y7=100;UU=class{constructor(o){this._blueprint=null;this._lastFetchMs=null;this._refreshCallback=null;this._ttlMs=o*1e3;}setRefreshCallback(o){this._refreshCallback===null&&(this._refreshCallback=o);}update(o){this._blueprint=o,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 o=await this._refreshCallback();o!==null&&this.update(o);}catch(o){E.debug("Background blueprint cache refresh failed",o);}}},NU=class{constructor(){this._entries=new Map;this._intervalHandle=null;this._refreshRunning=false;}getOrCreate(o,e,t,i=null){let a=`${o}::${e!=null?e:""}::${t!=null?t:""}::${i!=null?i:""}`,s=this._entries.get(a);return s||(s=new UU(b7()),this._entries.set(a,s)),s}ensureRefreshTimerStarted(){if(this._intervalHandle!==null)return;let o=Math.max(b7()*1e3,yne);this._intervalHandle=setInterval(()=>{this._refreshAllStale();},o),this._intervalHandle.unref();}async _refreshAllStale(){if(!this._refreshRunning){this._refreshRunning=true;try{let o=[...this._entries.values()].filter(e=>e.isStale());for(let e=0;e<o.length;e+=y7)await Promise.all(o.slice(e,e+y7).map(t=>t.tryBackgroundRefresh()));}finally{this._refreshRunning=false;}}}clear(){this._intervalHandle!==null&&(clearInterval(this._intervalHandle),this._intervalHandle=null),this._refreshRunning=false,this._entries.clear();}},FU=new NU;});var cZ={};V(cZ,{OpikClient:()=>br,clients:()=>bu,resetDefaultProjectWarning:()=>bne});function bne(){MU=false;}var bu,MU,Rne,_u,br,Vo=n(()=>{pt();ro();Tr();oe();Bf();k8();ir();re();HD();T8();W8();L8();V8();J8();H8();G8();oU();Kd();aU();nZ();Lf();pU();Xr();gU();qd();op();Lt();Ir();wZ();uU();fU();iu();su();eU();RU();_U();lu();cp();h7();fu();x7();Ur();bd();Fd();qD();pt();bu=[],MU=false;Rne=Xd+500,_u=class _u{constructor(o){this.displayTraceLog=(o,e)=>{if(e===this.lastProjectNameLogged||!this.config.apiUrl)return;let t=v8(o,this.config.apiUrl);E.info(`Started logging traces to the "${e}" project at ${kp(t)}`),this.lastProjectNameLogged=e;};this.trace=o=>{E.debug("Creating new trace with data:",o);let e=this.resolveProjectName(o.projectName),t=o.environment!==void 0?o.environment:this.config.environment,i=new xd({id:ue(),startTime:new Date,source:"sdk",...o,projectName:e,...t!==void 0?{environment:t}:{}},this);return Le()&&(this.traceBatchQueue.create(i.data),E.debug("Trace added to the queue with ID:",i.data.id),this.displayTraceLog(i.data.id,e)),i};this.getDataset=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting dataset with name "${o}"`);try{await this.datasetBatchQueue.flush();let i=await this.api.datasets.getDatasetByIdentifier({datasetName:o,projectName:t});return new fr({...i,projectName:t},this)}catch(i){throw i instanceof k&&i.statusCode===404?new Wt(o):i}};this.createDataset=async(o,e,t)=>{let i=this.resolveProjectName(t);E.debug(`Creating dataset with name "${o}"`);let a=new fr({name:o,description:e,projectName:i},this);try{return this.datasetBatchQueue.create({name:a.name,description:a.description,id:a.id,projectName:i}),E.debug("Dataset added to the queue with name:",a.name),a}catch(s){throw E.error(`Failed to create dataset "${o}"`,{error:s}),new Error(`Error creating dataset "${o}": ${s}`)}};this.getOrCreateDataset=async(o,e,t)=>{E.debug(`Attempting to retrieve or create dataset with name: "${o}"`);try{return await this.getDataset(o,t)}catch(i){if(i instanceof Wt)return E.info(`Dataset "${o}" not found. Proceeding to create a new one.`),this.createDataset(o,e,t);throw E.error(`Error retrieving dataset "${o}":`,i),i}};this.getDatasets=async(o=100,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting all datasets (limit: ${o})`);try{await this.datasetBatchQueue.flush();let i;try{i=await this.getProjectIdByName(t);}catch{}let a=await this.api.datasets.findDatasets({size:o,...i&&{projectId:i}}),s=[];for(let c of a.content||[])s.push(new fr({...c,projectName:t},this));return E.info(`Retrieved ${s.length} datasets`),s}catch(i){throw E.error("Failed to retrieve datasets",{error:i}),new Error("Failed to retrieve datasets")}};this.deleteDataset=async(o,e)=>{E.debug(`Deleting dataset with name "${o}"`);try{let t=await this.getDataset(o,e);if(!t.id)throw new Error(`Cannot delete dataset "${o}": ID not available`);this.datasetBatchQueue.delete(t.id);}catch(t){throw E.error(`Failed to delete dataset "${o}"`,{error:t}),new Error(`Failed to delete dataset "${o}": ${t}`)}};this.createTestSuite=async o=>{E.debug(`Creating test suite with name "${o.name}"`);let{TestSuite:e}=await import('./suite-Z2UN7XTC.js');return e.create(this,o)};this.getTestSuite=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting test suite with name "${o}"`);let{TestSuite:i}=await import('./suite-Z2UN7XTC.js');return i.get(this,o,t)};this.getOrCreateTestSuite=async o=>{E.debug(`Attempting to retrieve or create test suite with name: "${o.name}"`);let{TestSuite:e}=await import('./suite-Z2UN7XTC.js');return e.getOrCreate(this,o)};this.deleteTestSuite=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Deleting test suite with name "${o}"`);let{TestSuite:i}=await import('./suite-Z2UN7XTC.js');await i.delete(this,o,t);};this.getTestSuites=async(o=1e3,e)=>{var i;let t=this.resolveProjectName(e);E.debug(`Getting all test suites (limit: ${o})`);try{await this.datasetBatchQueue.flush();let a=await this.resolveProjectId(t),{TestSuite:s}=await import('./suite-Z2UN7XTC.js'),c=[],l=1,m=100;for(;c.length<o;){let d=(i=(await this.api.datasets.findDatasets({page:l,size:m,...a&&{projectId:a}})).content)!=null?i:[];if(d.length===0)break;for(let f of d){if(c.length>=o)break;f.type===Ef.EvaluationSuite&&c.push(new s(new fr({...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 o=>this.createAnnotationQueueInternal(o,Zr);this.createThreadsAnnotationQueue=async o=>this.createAnnotationQueueInternal(o,qr);this.getTracesAnnotationQueue=async o=>this.fetchAnnotationQueueById(o,"trace",Zr);this.getThreadsAnnotationQueue=async o=>this.fetchAnnotationQueueById(o,"thread",qr);this.getTracesAnnotationQueues=async o=>(await this.getAnnotationQueuesByScope("trace",o)).map(t=>new Zr(t,this));this.getThreadsAnnotationQueues=async o=>(await this.getAnnotationQueuesByScope("thread",o)).map(t=>new qr(t,this));this.deleteTracesAnnotationQueue=async o=>this.deleteAnnotationQueueById(o,"traces");this.deleteThreadsAnnotationQueue=async o=>this.deleteAnnotationQueueById(o,"threads");this.createExperiment=async({datasetName:o,name:e,experimentConfig:t,prompts:i,type:a=Nf.Regular,optimizationId:s,datasetVersionId:c,evaluationMethod:l,tags:m,projectName:u})=>{if(E.debug(`Creating experiment for dataset "${o}"`),!o)throw new Error("Dataset name is required to create an experiment");let[d,f]=aZ(t,i),g=this.resolveProjectName(u),h=ue(),y=new Cr({id:h,name:e,datasetName:o,prompts:i,tags:m,projectName:g},this);try{return await this.api.experiments.createExperiment({id:h,datasetName:o,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 "${o}"`,{error:w}),new Error(`Error creating experiment: ${w}`)}};this.updateExperiment=async(o,e)=>{if(!o)throw new Error("id is required to update an experiment");let{name:t,experimentConfig:i}=e;if(!t&&!i)throw new Error("At least one of 'name' or 'experimentConfig' must be provided to update an experiment");E.debug(`Updating experiment with ID "${o}"`);let a={};t!==void 0&&(a.name=t),i!==void 0&&(a.metadata=i);try{await this.api.experiments.updateExperiment(o,{body:a});}catch(s){throw E.error(`Failed to update experiment with ID "${o}"`,{error:s}),s}};this.getExperimentById=async o=>{var e,t;E.debug(`Getting experiment with ID "${o}"`);try{let i=await this.api.experiments.getExperimentById(o);return new Cr({id:i.id,name:i.name,datasetName:(e=i.datasetName)!=null?e:void 0,projectName:(t=i.projectName)!=null?t:void 0},this)}catch(i){throw i instanceof k&&i.statusCode===404?new Zs(`No experiment found with ID '${o}'`):(E.error(`Failed to get experiment with ID "${o}"`,{error:i}),i)}};this.getExperimentsByName=async(o,e)=>{let t=this.resolveProjectName(e);E.debug(`Getting experiments with name "${o}"`);try{let i=await this.api.experiments.streamExperiments({name:o,projectName:t});return (await Ne(i,G.ExperimentPublic)).map(s=>{var c,l;return new Cr({id:s.id,name:s.name,datasetName:(c=s.datasetName)!=null?c:void 0,projectName:(l=s.projectName)!=null?l:void 0},this)})}catch(i){throw E.error(`Failed to get experiments with name "${o}"`,{error:i}),i}};this.getExperiment=async(o,e)=>{E.debug(`Getting experiment with name "${o}"`);let t=await this.getExperimentsByName(o,e);if(t.length===0)throw new Zs(o);return t[0]};this.getDatasetExperiments=async(o,e=100,t)=>{E.debug(`Getting experiments for dataset "${o}"`);let i=await this.getDataset(o,t);try{return await this.findExperimentsByDatasetId(i.id,e,a=>{var s;return new Cr({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 "${o}"`,{error:a}),a}};this.getTestSuiteExperiments=async(o,e=100,t)=>{E.debug(`Getting experiments for test suite "${o}"`);let i=await this.getDataset(o,t);try{return await this.findExperimentsByDatasetId(i.id,e,a=>{var s;return new $d({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 "${o}"`,{error:a}),a}};this.findExperimentsByDatasetId=async(o,e,t)=>{var c;let i=Math.min(100,e),a=[],s=1;for(;a.length<e;){let l=await this.api.experiments.findExperiments({page:s,size:i,datasetId:o}),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 o=>{E.debug(`Deleting experiment with ID "${o}"`);try{await this.api.experiments.deleteExperimentsById({ids:[o]});}catch(e){throw E.error(`Failed to delete experiment with ID "${o}"`,{error:e}),e}};this.createPromptInternal=async(o,e,t,i,a,s,c,l,m)=>{var u;E.debug(`Creating ${l}`,{name:o});try{let d=await RZ(this.api.prompts,o,this.api.requestOptions);a(d);let f=(u=i.type)!=null?u:Fe.MUSTACHE,g=xZ({prompt:e,metadata:i.metadata},d,f),h;if(g?(E.debug(`Creating new ${l} version`,{name:o}),h=await this.api.prompts.createPromptVersion({name:o,version:{template:e,metadata:i.metadata,type:f},templateStructure:t,projectName:m},this.api.requestOptions)):(E.debug(`Returning existing ${l} version`,{name:o}),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:o}),i.description||i.tags?await w.updateProperties({description:i.description,tags:i.tags}):w}catch(d){if(d instanceof k||d instanceof Mr)return E.warn(`Failed to sync ${l} '${o}' 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:o,error:d}),d}};this.createPrompt=async o=>{let e=this.resolveProjectName(o.projectName);return this.createPromptInternal(o.name,o.prompt,Re.Text,o,()=>{},(t,i)=>sr.fromApiResponse(t,i,this,e),()=>{var t;return new sr({name:o.name,prompt:o.prompt,metadata:o.metadata,type:(t=o.type)!=null?t:Fe.MUSTACHE,description:o.description,tags:o.tags,projectName:e,synced:false},this)},"prompt",e)};this.createChatPrompt=async o=>{let e=this.resolveProjectName(o.projectName),t=JSON.stringify(o.messages);return this.createPromptInternal(o.name,t,Re.Chat,o,i=>{if(i&&i.templateStructure&&i.templateStructure!==Re.Chat)throw new Vt(o.name,i.templateStructure,Re.Chat)},(i,a)=>pr.fromApiResponse(i,a,this,e),()=>{var i;return new pr({name:o.name,messages:structuredClone(o.messages),metadata:o.metadata,type:(i=o.type)!=null?i:Fe.MUSTACHE,description:o.description,tags:o.tags,projectName:e,synced:false},this)},"chat prompt",e)};this.getPrompt=async o=>this.getPromptWithCache(o,Re.Text,(e,t,i)=>sr.fromApiResponse(e,t,this,i),"prompt");this.getChatPrompt=async o=>this.getPromptWithCache(o,Re.Chat,(e,t,i)=>pr.fromApiResponse(e,t,this,i),"chat prompt");this.getPromptWithCache=async(o,e,t,i)=>{if(o.commit&&o.version)throw new Error("Provide either `commit` or `version`, not both. Prefer `version` \u2014 `commit` is deprecated.");if(E.debug(`Getting ${i}`,o),o.commit&&o.environment)throw new Error("'commit' and 'environment' are mutually exclusive; pass at most one.");if(o.version&&o.environment)throw new Error("'version' and 'environment' are mutually exclusive; pass at most one.");let a=this.resolveProjectName(o.projectName),s=async u=>{var d;try{let f,g;if(u){if(g=await this.api.prompts.getPromptVersionById(u,{},this.api.requestOptions),!g.promptId)return null;f=await this.api.prompts.getPromptById(g.promptId,{},this.api.requestOptions);}else {let y;try{y=await this.getProjectIdByName(a);}catch{}if(f=(d=(await this.api.prompts.getPrompts({filters:JSON.stringify([{field:"name",operator:"=",value:o.name}]),size:1,...y&&{projectId:y}},this.api.requestOptions)).content)==null?void 0:d[0],!f)return E.debug(`${i.charAt(0).toUpperCase()+i.slice(1)} not found`,{name:o.name}),null;let A={name:o.name,projectName:a,...o.commit?{commit:o.commit}:{},...o.version?{versionNumber:o.version}:{},...o.environment?{environment:o.environment}:{}};g=await this.api.prompts.retrievePromptVersion(A,this.api.requestOptions);}let h=g.templateStructure;if(e===Re.Text){if(h&&h!==Re.Text)throw new Vt(o.name,h,Re.Text)}else if(!h||h!==Re.Chat)throw new Vt(o.name,h!=null?h:"undefined",Re.Chat);return t(f,g,a)}catch(f){if(f instanceof k&&f.statusCode===404)return null;throw E.error(`Failed to get ${i}`,{name:o.name,error:f}),f}},c=await tu(o.name,o.commit,a,e,()=>s(),this.config.promptCacheTtlSeconds,void 0,o.version,o.environment),l=c!=null&&c.id?AZ(c.id):null,m=l?await tu(o.name,o.commit,a,e,()=>s(l),this.config.promptCacheTtlSeconds,l,o.version):c;if(m!==null){let u=$t();u&&(jr.promptAlreadyInjected(u.trace.data.metadata,m.id,m.commit)||u.trace.update({prompts:[m],appendPrompts:true}),jr.promptAlreadyInjected(u.span.data.metadata,m.id,m.commit)||u.span.update({prompts:[m],appendPrompts:true}));}return m};this.searchPrompts=async o=>{var e;E.debug("Searching prompts",{filterString:o});try{let t;if(o){let l=hr.forPrompts(o).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===Re.Text?sr.fromApiResponse(c,l,this,u):m===Re.Chat?pr.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 o=>{E.debug("Deleting prompts in batch",{count:o.length});try{await this.api.prompts.deletePromptsBatch({ids:o},this.api.requestOptions),ru().evictByIds(o),E.info("Successfully deleted prompts",{count:o.length});}catch(e){throw E.error("Failed to delete prompts",{count:o.length,error:e}),e}};this.setPromptEnvironments=async o=>{let e;try{e=await this.api.prompts.retrievePromptVersion({name:o.promptName,versionNumber:o.version,projectName:this.resolveProjectName(o.projectName)},this.api.requestOptions);}catch(i){throw i instanceof k&&i.statusCode===404?o.version!==void 0?new Lo(`No version '${o.version}' found for prompt '${o.promptName}'.`):new Lo(`No prompt found with name '${o.promptName}'.`):i}let t=Array.from(new Set(o.environments));try{await this.api.prompts.setPromptVersionEnvironment(e.id,{environments:t},this.api.requestOptions);}catch(i){throw i instanceof k&&(i.statusCode===404||i.statusCode===409)?new Yd(`One or more environments in [${t.join(", ")}] are not registered in this workspace.`):i}ru().invalidateForPrompt(o.promptName,this.resolveProjectName(o.projectName));};this.searchTraces=async o=>{let{exclude:e,...t}=o!=null?o:{};return this.executeSearch("traces",t,au,(i,a,s,c,l)=>WZ(i,a,s,c,l,e))};this.searchThreads=async o=>this.executeSearch("threads",o!=null?o:{},nu,VZ);this.searchSpans=async o=>{let{exclude:e,...t}=o!=null?o:{};return this.executeSearch("spans",t,HZ,(i,a,s,c,l)=>JZ(i,a,s,c,l,e))};this.createEnvironment=async(o,e)=>{let t=ue();try{await this.api.environments.createEnvironment({id:t,name:o,description:e==null?void 0:e.description,color:e==null?void 0:e.color});}catch(i){throw i instanceof k&&i.statusCode===409?new Md(o):i}return this.api.environments.getEnvironmentById(t)};this.getEnvironments=async()=>{var e;return (e=(await this.api.environments.findEnvironments()).content)!=null?e:[]};this.updateEnvironment=async(o,e)=>{if((e==null?void 0:e.color)!==void 0&&_u.BUILTIN_ENVIRONMENT_NAMES.has(o))throw new Wd(`Cannot change the colour of the built-in environment '${o}'. Colour updates are not allowed for 'production', 'staging', or 'development'.`);let t=await this._findEnvironmentByName(o,true);return await this.api.environments.updateEnvironment(t.id,{description:e==null?void 0:e.description,color:e==null?void 0:e.color}),this.api.environments.getEnvironmentById(t.id)};this.deleteEnvironment=async o=>{let e=await this._findEnvironmentByName(o,false);e&&await this.api.environments.deleteEnvironmentsBatch({ids:[e.id]});};this._findEnvironmentByName=async(o,e)=>{let i=(await this.getEnvironments()).find(a=>a.name===o);if(!i&&e)throw new Error(`No environment found with name "${o}".`);return i};this.flush=async o=>{var t;let e=(t=o==null?void 0:o.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(i){E.error("Error during flush operation:",{error:i instanceof Error?i.message:i});}};this.createConfig=async(o,e)=>{var l,m;let t=(l=e==null?void 0:e.projectName)!=null?l:this.config.projectName;this._validatePromptProjects(o,t);let i=new Ot(t,this),a=wU(o),s=await i.getBlueprint(),c;if(s)c=await i.updateBlueprint({values:a,description:e==null?void 0:e.description});else try{c=await i.createBlueprint({values:a,description:e==null?void 0:e.description});}catch(u){if(u instanceof k&&u.statusCode===409)c=await i.updateBlueprint({values:a,description:e==null?void 0:e.description});else throw u}return (m=c.name)!=null?m:c.id};this.setConfigEnv=async o=>{var s;let e=(s=o.projectName)!=null?s:this.config.projectName,i=await new Ot(e,this).getBlueprint({name:o.version});if(!i)throw new Er(`No config version "${o.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:o.env,blueprintId:i.id}]});};this.updatePromptVersionTags=async(o,e)=>{var t;E.debug("Updating prompt version tags",{count:o.length,options:e});try{await this.api.prompts.updatePromptVersions({ids:o,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:o.length});}catch(i){throw E.error("Failed to update prompt version tags",{count:o.length,error:i}),i}};var a;E.debug("Initializing OpikClient with config:",o),this.config=Pp(o);let e={apiKey:this.config.apiKey,environment:this.config.apiUrl,workspaceName:this.config.workspaceName};o!=null&&o.headers&&(E.debug("Initializing OpikClient with additional headers:",o==null?void 0:o.headers),e.requestOptions={headers:o==null?void 0:o.headers}),this.api=new Td(e);let t=this.config.holdUntilFlush?1440*60*1e3:this.config.batchDelayMs,i=this.config.isAttachmentExtractionActive?{minSizeBytes:(a=this.config.minBase64EmbeddedAttachmentSize)!=null?a:Ke.minBase64EmbeddedAttachmentSize,apiUrl:this.config.apiUrl,workspaceName:this.config.workspaceName,apiKey:this.config.apiKey||void 0,extraHeaders:o==null?void 0:o.headers}:void 0;this.spanBatchQueue=new Pd(this.api,t,this.config.maxPayloadSizeMb,i),this.traceBatchQueue=new Sd(this.api,t,this.config.maxPayloadSizeMb,i),this.spanFeedbackScoresBatchQueue=new zd(this.api,t),this.traceFeedbackScoresBatchQueue=new vd(this.api,t),this.traceAssertionResultsBatchQueue=new _d(this.api,t,"TRACE"),this.datasetBatchQueue=new jd(this.api,t),bu.push(this);}resolveProjectName(o){return o!==void 0?o:(!MU&&this.config.projectName===Ke.projectName&&(MU=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(o){let e=await this.api.projects.retrieveProject({name:o});if(!(e!=null&&e.id))throw new Error(`Project "${o}" not found`);return e.id}async resolveProjectId(o){if(o!==void 0)return this.getProjectIdByName(o)}async createAnnotationQueueInternal(o,e){let{name:t,projectName:i,description:a,instructions:s,commentsEnabled:c,feedbackDefinitionNames:l}=o,m=e.SCOPE;E.debug(`Creating ${m} annotation queue "${t}"`);let u=i!=null?i:this.config.projectName;try{let d=await this.getProjectIdByName(u),f=ue();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(o,e,t){E.debug(`Getting ${e} annotation queue with ID "${o}"`);try{let i=await this.api.annotationQueues.getAnnotationQueueById(o);if(i.scope!==e)throw new Error(`Annotation queue "${o}" is not a ${e} queue (scope: ${i.scope})`);return new t(i,this)}catch(i){if(i instanceof k){if(i.statusCode===404)throw new Nd(o);E.error(`Failed to get ${e} annotation queue with ID "${o}"`,{error:i});}throw i}}async getAnnotationQueuesByScope(o,e){let{projectName:t,maxResults:i=1e3}=e!=null?e:{};E.debug(`Getting ${o} annotation queues (project: ${t!=null?t:"all"}, limit: ${i})`);try{let a;if(t){let l=await this.getProjectIdByName(t);a=JSON.stringify([{field:"project_id",operator:"=",value:l},{field:"scope",operator:"=",value:o}]);}else a=JSON.stringify([{field:"scope",operator:"=",value:o}]);let c=(await this.api.annotationQueues.findAnnotationQueues({size:i,filters:a})).content||[];return E.info(`Retrieved ${c.length} ${o} annotation queues`),c}catch(a){throw E.error(`Failed to retrieve ${o} annotation queues`,{error:a}),a}}async deleteAnnotationQueueById(o,e){E.debug(`Deleting ${e} annotation queue with ID "${o}"`);try{await this.api.annotationQueues.deleteAnnotationQueueBatch({ids:[o]}),E.debug(`Successfully deleted ${e} annotation queue with ID "${o}"`);}catch(t){throw E.error(`Failed to delete ${e} annotation queue with ID "${o}"`,{error:t}),t}}async executeSearch(o,e,t,i){let{projectName:a,filterString:s,maxResults:c=1e3,truncate:l=true,waitForAtLeast:m,waitForTimeout:u=60}=e;E.debug(`Searching ${o}`,{projectName:a,filterString:s,maxResults:c,truncate:l,waitForAtLeast:m,waitForTimeout:u});let d=t(s),f=a!=null?a:this.config.projectName,g=()=>i(this.api,f,d,c,l);if(m===void 0)return await g();let h=await LZ(g,m,u*1e3,5e3);if(h.length<m)throw new Dd(`Timeout after ${u} seconds: expected ${m} ${o}, but only ${h.length} were found.`);return h}logFeedbackScores(o,e){var t;for(let i of o)e.create({...i,projectName:(t=i.projectName)!=null?t:this.config.projectName,source:Ff.Sdk});}logTracesFeedbackScores(o){this.logFeedbackScores(o,this.traceFeedbackScoresBatchQueue);}logSpansFeedbackScores(o){this.logFeedbackScores(o,this.spanFeedbackScoresBatchQueue);}getOrCreateConfig(o){return this._getOrCreateConfigImpl(o)}_validatePromptProjects(o,e){for(let[t,i]of Object.entries(o))if(i instanceof nr&&i.projectName!==void 0&&i.projectName!==e)throw new Wo(`Field "${t}": prompt project "${i.projectName}" does not match config project "${e}". All prompts referenced in a config must belong to the same project as the config.`)}async _allPromptsSynced(o){let e=Object.values(o).filter(a=>a instanceof nr&&!a.synced);if(e.length===0)return true;let t=Symbol(),i;try{if(await Promise.race([Promise.allSettled(e.map(s=>s.ready())).then(()=>{}),new Promise(s=>{i=setTimeout(()=>s(t),Rne);})])===t)return E.debug("Timed out waiting for prompt sync before creating config."),!1}finally{clearTimeout(i);}return e.every(a=>a.synced)}_makeFallbackConfig(o,e){return DU({values:o,fieldNames:new Set(Object.keys(o)),blueprintId:void 0,blueprintVersion:void 0,isFallback:true,maskId:e})}async _fetchBlueprintFromBackend(o,e){let{blueprintName:t,isLatest:i,hasNamedVersion:a,namedVersion:s,effectiveEnv:c,maskId:l,projectName:m,effectiveVersion:u,fallback:d}=e,f=R7(m,c,l!=null?l:null,u);if(!f.isStale())return f.getBlueprint();let g=null;try{t?g=await o.getBlueprint({name:t,maskId:l}):i?g=await o.getBlueprint({maskId:l}):a?g=await o.getBlueprint({name:s,maskId:l}):g=await o.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?i?()=>o.getBlueprint({maskId:void 0}):()=>o.getBlueprint({env:c,maskId:void 0}):null;return BU(m,c,l!=null?l:null,g,h,u),g}async _resolveNullBlueprint(o,e){let{projectName:t,effectiveEnv:i,effectiveVersion:a,maskId:s,hasNamedVersion:c,hasExplicitEnv:l,isExplicitBlueprintFromContext:m,isLatest:u,fallback:d}=e;if(c||l||m)throw new Er(`No config found for project "${t}" with the specified selector`);if(!u){let h=null;try{h=await o.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 Er(`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 Er(`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 o.createBlueprint({values:wU(d)});}catch(h){if(h instanceof k&&h.statusCode===409){let y=await o.getBlueprint({maskId:void 0});if(!y)throw new Er(`Failed to create or fetch config in project "${t}".`);g=y;}else throw h}return BU(t,i,s!=null?s:null,g,null,a),g}_buildConfigFromBlueprint(o,e,t){var s;let i=Object.fromEntries(o.keys().map(c=>[c,o.getRawEntry(c)]));if(e!==void 0){let c=Object.keys(e).filter(l=>i[l]===void 0);if(c.length>0){let l=(s=o.name)!=null?s:o.id;throw new Wo(`Config version "${l}" is missing expected field(s): ${c.join(", ")}. The retrieved version does not contain all fields declared in the fallback.`)}}let a=$Z(i,o.values,e!==void 0?Object.keys(e):void 0);return DU({values:a,fieldNames:new Set(Object.keys(e!=null?e:a)),blueprintId:o.id,blueprintVersion:o.name,isFallback:false,maskId:t})}async _getOrCreateConfigImpl(o){var h,y,w,A;if(!Kt.getStore())throw new Error("getOrCreateConfig() must be called inside a track() function");if((o==null?void 0:o.version)!==void 0&&(o==null?void 0:o.env)!==void 0)throw new Error("Only one of 'version' or 'env' may be specified in getOrCreateConfig().");let e=o==null?void 0:o.fallback,t=(h=o==null?void 0:o.projectName)!=null?h:this.config.projectName,i=(y=AU())!=null?y:void 0,a=(w=t7())!=null?w:void 0,s=a!==void 0,c=new Ot(t,this),l=(o==null?void 0:o.version)==="latest",m=(o==null?void 0:o.version)!==void 0&&!l,u=o!=null&&o.version?null:(A=o==null?void 0:o.env)!=null?A:"prod",d=a!=null?a:m?o.version:null,f=await this._fetchBlueprintFromBackend(c,{blueprintName:a,isLatest:l,hasNamedVersion:m,namedVersion:o==null?void 0:o.version,effectiveEnv:u,maskId:i,projectName:t,effectiveVersion:d,fallback:e});if(f!==null&&!(f instanceof yr))return f;let g=f;if(!g){let C=await this._resolveNullBlueprint(c,{projectName:t,effectiveEnv:u,effectiveVersion:d,maskId:i,hasNamedVersion:m,hasExplicitEnv:(o==null?void 0:o.env)!==void 0,isExplicitBlueprintFromContext:s,isLatest:l,fallback:e});if(!(C instanceof yr))return C;g=C;}return this._buildConfigFromBlueprint(g,e,i)}};_u.BUILTIN_ENVIRONMENT_NAMES=new Set(["production","staging","development"]);br=_u;});var w7,WU=n(()=>{w7="__opik_task_error__";});function _7(p,o){if(!o||typeof o!="object")throw new Error("Arguments must be an object");let e=p.validationSchema,i=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(o);if(!i.success){let a=i.error.issues.map(c=>c.path[0]).filter(Boolean),s=[...new Set(a)];throw new Error(xne(p,o,s))}}function xne(p,o,e){let t=Object.keys(o),i=e.filter(a=>!(a in o));return `Metric '${p.name}' is skipped, missing required arguments: ${i.join(", ")}. Available arguments: ${t.join(", ")}.`}var k7=n(()=>{});var Au,A7=n(()=>{re();Au=class{static calculateAverageScores(o){if(!o||o.length===0)return new Map;let e=new Map;for(let i of o)if(!(!i||!i.scoreResults||i.scoreResults.length===0))for(let a of i.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((i,a)=>{t.set(a,i.count>0?i.sum/i.count:0);}),t}static formatScore(o){return o.toFixed(4)}static formatTime(o){let e=Math.floor(o/3600),t=Math.floor(o%3600/60),i=Math.floor(o%60);return `${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static async generateResultTable(o,e,t,i,a){if(o.length===0){E.info(`
|
|
@@ -96,7 +96,7 @@ ${e}
|
|
|
96
96
|
Analyze the following text and provide your verdict score, and reason in the specified JSON format:
|
|
97
97
|
|
|
98
98
|
${p}
|
|
99
|
-
`}var X7=n(()=>{});var Eu,Ae,Cu,at=n(()=>{Eu=class p extends Error{constructor(o){super(o),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Ae=class p extends Eu{constructor(e,t){super(e);this.cause=t;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Cu=class p extends Eu{constructor(e,t){super(e);this.cause=t;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}};});function cr(p){try{return JSON.parse(p)}catch{return Xne(p)}}function Xne(p){try{let o=p.indexOf("{"),e=p.lastIndexOf("}");if(o===-1||e===-1||o>=e)throw new Error("No valid JSON object found in content");let t=p.substring(o,e+1);return JSON.parse(t)}catch(o){let e=o instanceof Error?o.message:String(o);throw new Cu(`Failed to extract JSON from content: ${e}`,o instanceof Error?o:void 0)}}var qo=n(()=>{at();});function Z7(p,o){try{let e=cr(p),t=
|
|
99
|
+
`}var X7=n(()=>{});var Eu,Ae,Cu,at=n(()=>{Eu=class p extends Error{constructor(o){super(o),this.name="MetricError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Ae=class p extends Eu{constructor(e,t){super(e);this.cause=t;this.name="MetricComputationError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}},Cu=class p extends Eu{constructor(e,t){super(e);this.cause=t;this.name="JSONParsingError",Error.captureStackTrace&&Error.captureStackTrace(this,p);}};});function cr(p){try{return JSON.parse(p)}catch{return Xne(p)}}function Xne(p){try{let o=p.indexOf("{"),e=p.lastIndexOf("}");if(o===-1||e===-1||o>=e)throw new Error("No valid JSON object found in content");let t=p.substring(o,e+1);return JSON.parse(t)}catch(o){let e=o instanceof Error?o.message:String(o);throw new Cu(`Failed to extract JSON from content: ${e}`,o instanceof Error?o:void 0)}}var qo=n(()=>{at();});function Z7(p,o){try{let e=cr(p),t=e.score;if(t==null)throw new Error(`Moderation score is required but got ${t}`);let i=Number(t);if(isNaN(i)||i<0||i>1)throw new Error(`Moderation score must be between 0.0 and 1.0, got ${i}`);return {name:o,value:i,reason:String(e.reason||"")}}catch(e){let t=e instanceof Error?e.message:String(e);throw E.error(`Failed to parse model output: ${t}`),new Ae("Failed to calculate moderation score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var q7=n(()=>{at();qo();re();});var Zne,qne,Iu,eq=n(()=>{Zt();X7();q7();Zne=z$1.object({output:z$1.string()}),qne=z$1.object({score:z$1.number(),reason:z$1.string()}),Iu=class extends Oe{constructor(e){var i,a;let t=(i=e==null?void 0:e.name)!=null?i:"moderation_metric";super(t,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=Zne;this.fewShotExamples=(a=e==null?void 0:e.fewShotExamples)!=null?a:[];}async score(e){let{output:t}=e,i=Y7(t,this.fewShotExamples),a=this.buildModelOptions(),s=await this.model.generateString(i,qne,a);return Z7(s,this.name)}};});var rq=n(()=>{eq();});function tq(p,o){return `
|
|
100
100
|
You are an impartial judge tasked with evaluating the quality and usefulness of AI-generated responses.
|
|
101
101
|
Your evaluation should consider the following key factors:
|
|
102
102
|
- Helpfulness: How well does it solve the user's problem?
|
|
@@ -132,7 +132,7 @@ ${p}
|
|
|
132
132
|
AI Response: ${o}
|
|
133
133
|
|
|
134
134
|
Provide your evaluation in the specified JSON format.
|
|
135
|
-
`}var oq=n(()=>{});function iq(p,o){try{let e=cr(p),t=
|
|
135
|
+
`}var oq=n(()=>{});function iq(p,o){try{let e=cr(p),t=e.score;if(t==null)throw new Error(`Usefulness score is required but got ${t}`);let i=Number(t);if(isNaN(i)||i<0||i>1)throw new Error(`Usefulness score must be between 0.0 and 1.0, got ${i}`);return {name:o,value:i,reason:String(e.reason||"")}}catch(e){let t=e instanceof Error?e.message:String(e);throw E.error(`Failed to parse model output: ${t}`),new Ae("Failed to calculate usefulness score. The model output could not be parsed.",e instanceof Error?e:void 0)}}var aq=n(()=>{at();qo();re();});var ese,rse,Du,nq=n(()=>{Zt();oq();aq();ese=z$1.object({input:z$1.string(),output:z$1.string()}),rse=z$1.object({score:z$1.number(),reason:z$1.string()}),Du=class extends Oe{constructor(e){var i;let t=(i=e==null?void 0:e.name)!=null?i:"usefulness_metric";super(t,{model:e==null?void 0:e.model,trackMetric:e==null?void 0:e.trackMetric,temperature:e==null?void 0:e.temperature,seed:e==null?void 0:e.seed,maxTokens:e==null?void 0:e.maxTokens,modelSettings:e==null?void 0:e.modelSettings});this.validationSchema=ese;}async score(e){let{input:t,output:i}=e,a=tq(t,i),s=this.buildModelOptions(),c=await this.model.generateString(a,rse,s);return iq(c,this.name)}};});var sq=n(()=>{nq();});function pq(p,o){return p.length===0?"":`
|
|
136
136
|
|
|
137
137
|
EXAMPLES:
|
|
138
138
|
|