opik 2.3.8 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),wM=require('fs'),_M=require('os'),Mae=require('path'),Wae=require('ini');require('dotenv/config');var uuid=require('uuid'),crypto=require('crypto'),bme=require('xxhash-wasm'),Rme=require('fast-json-stable-stringify'),util=require('util'),Sme=require('mustache'),jte=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),Wme=require('fast-deep-equal'),async_hooks=require('async_hooks'),Lp=require('chalk'),yde=require('boxen'),zod=require('zod'),Rde=require('ora'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),ai$1=require('ai');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var wM__default=/*#__PURE__*/_interopDefault(wM);var _M__default=/*#__PURE__*/_interopDefault(_M);var Mae__default=/*#__PURE__*/_interopDefault(Mae);var Wae__default=/*#__PURE__*/_interopDefault(Wae);var bme__default=/*#__PURE__*/_interopDefault(bme);var Rme__default=/*#__PURE__*/_interopDefault(Rme);var Sme__default=/*#__PURE__*/_interopDefault(Sme);var jte__default=/*#__PURE__*/_interopDefault(jte);var Wme__default=/*#__PURE__*/_interopDefault(Wme);var Lp__default=/*#__PURE__*/_interopDefault(Lp);var yde__default=/*#__PURE__*/_interopDefault(yde);var Rde__default=/*#__PURE__*/_interopDefault(Rde);var zae=Object.create;var po=Object.defineProperty;var gM=Object.getOwnPropertyDescriptor;var Sae=Object.getOwnPropertyNames;var vae=Object.prototype.hasOwnProperty;var fM=(p,o)=>(o=Symbol[p])?o:Symbol.for("Symbol."+p),xi=p=>{throw TypeError(p)};var Tae=(p,o,r)=>o in p?po(p,o,{enumerable:true,configurable:true,writable:true,value:r}):p[o]=r;var n=(p,o)=>()=>(p&&(o=p(p=0)),o);var L=(p,o)=>{for(var r in o)po(p,r,{get:o[r],enumerable:true});},jae=(p,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Sae(o))!vae.call(p,i)&&i!==r&&po(p,i,{get:()=>o[i],enumerable:!(t=gM(o,i))||t.enumerable});return p};var Cae=p=>jae(po({},"__esModule",{value:true}),p);var hM=p=>{var o;return [,,,zae((o=void 0)!=null?o:null)]},yM=["class","method","getter","setter","accessor","field","value","get","set"],Ri=p=>p!==void 0&&typeof p!="function"?xi("Function expected"):p,Eae=(p,o,r,t,i)=>({kind:yM[p],name:o,metadata:t,addInitializer:a=>r._?xi("Already initialized"):i.push(Ri(a||null))}),nf=(p,o)=>Tae(o,fM("metadata"),p[3]),bM=(p,o,r,t)=>{for(var i=0,a=p[o>>1],s=a&&a.length;i<s;i++)a[i].call(r);return t},RM=(p,o,r,t,i,a)=>{var c,l,m,u,d=o&7,f=false,g=false,h=2,y=yM[d+5],A=p[h]||(p[h]=[]),C=((i=i.prototype),gM(i,r));for(var I=t.length-1;I>=0;I--)m=Eae(d,r,l={},p[3],A),(m.static=f,m.private=g,u=m.access={has:D=>r in D},(u.get=D=>D[r]),d>2),c=(0, t[I])(C[y],m),l._=1,Ri(c)&&(C[y]=c);return C&&po(i,r,C),i};function Zp(p,o=p){return ansiEscapes.link(o,p)}var Fae;exports.logger=void 0;exports.setLoggerLevel=void 0;exports.disableLogger=void 0;var ne=n(()=>{Fae={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};exports.logger=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),exports.setLoggerLevel=p=>{exports.logger.settings.minLevel=Fae[p];},exports.disableLogger=()=>{exports.logger.settings.minLevel=100;};exports.setLoggerLevel(process.env.OPIK_LOG_LEVEL||"INFO");});function pf(p){return Object.fromEntries(Object.entries(p).filter(([,o])=>o!==void 0))}function qp(p){if(p!==void 0)return ["1","true","yes"].includes(String(p).toLowerCase())}function Lae(){return pf({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,environment:process.env.OPIK_ENVIRONMENT,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:qp(process.env.OPIK_HOLD_UNTIL_FLUSH),trackDisable:qp(process.env.OPIK_TRACK_DISABLE),maxPayloadSizeMb:process.env.OPIK_MAX_PAYLOAD_SIZE_MB&&Number.isFinite(Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB))?Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB):void 0,isAttachmentExtractionActive:qp(process.env.OPIK_IS_ATTACHMENT_EXTRACTION_ACTIVE),minBase64EmbeddedAttachmentSize:process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE&&Number.isFinite(Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE))?Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE):void 0,promptCacheTtlSeconds:process.env.OPIK_PROMPT_CACHE_TTL_SECONDS?Math.max(1,parseInt(process.env.OPIK_PROMPT_CACHE_TTL_SECONDS,10)||1):void 0})}function Gae(p){return p.replace(/^~(?=$|\/|\\)/,_M__default.default.homedir())}function Jae(){let p=process.env.OPIK_CONFIG_PATH||Vae,o=Gae(p);if(!wM__default.default.existsSync(o)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${o}`);return {}}try{let r=Wae__default.default.parse(wM__default.default.readFileSync(o,"utf8"));return r.opik?pf({apiKey:r.opik.api_key,apiUrl:r.opik.url_override,projectName:r.opik.project_name,workspaceName:r.opik.workspace,trackDisable:qp(r.opik.track_disable)}):{}}catch(r){return exports.logger.error(`Error loading config file ${o}: ${r}`),{}}}function ec(p){let o=Lae(),r=Jae(),{headers:t,...i}=p||{};return Hae({...Xe,...r,...o,...pf(i)})}function Hae(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");if(p.trackDisable)return p;let o=Kae(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 Kae(p){
|
|
1
|
+
'use strict';var ansiEscapes=require('ansi-escapes'),tslog=require('tslog'),wM=require('fs'),_M=require('os'),Mae=require('path'),Wae=require('ini');require('dotenv/config');var uuid=require('uuid'),crypto=require('crypto'),bme=require('xxhash-wasm'),Rme=require('fast-json-stable-stringify'),util=require('util'),Sme=require('mustache'),jte=require('nunjucks'),dateFns=require('date-fns'),jestDiff=require('jest-diff'),Wme=require('fast-deep-equal'),async_hooks=require('async_hooks'),Lp=require('chalk'),yde=require('boxen'),zod=require('zod'),Rde=require('ora'),openai=require('@ai-sdk/openai'),anthropic=require('@ai-sdk/anthropic'),google=require('@ai-sdk/google'),ai$1=require('ai');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var wM__default=/*#__PURE__*/_interopDefault(wM);var _M__default=/*#__PURE__*/_interopDefault(_M);var Mae__default=/*#__PURE__*/_interopDefault(Mae);var Wae__default=/*#__PURE__*/_interopDefault(Wae);var bme__default=/*#__PURE__*/_interopDefault(bme);var Rme__default=/*#__PURE__*/_interopDefault(Rme);var Sme__default=/*#__PURE__*/_interopDefault(Sme);var jte__default=/*#__PURE__*/_interopDefault(jte);var Wme__default=/*#__PURE__*/_interopDefault(Wme);var Lp__default=/*#__PURE__*/_interopDefault(Lp);var yde__default=/*#__PURE__*/_interopDefault(yde);var Rde__default=/*#__PURE__*/_interopDefault(Rde);var zae=Object.create;var po=Object.defineProperty;var gM=Object.getOwnPropertyDescriptor;var Sae=Object.getOwnPropertyNames;var vae=Object.prototype.hasOwnProperty;var fM=(p,o)=>(o=Symbol[p])?o:Symbol.for("Symbol."+p),xi=p=>{throw TypeError(p)};var Tae=(p,o,r)=>o in p?po(p,o,{enumerable:true,configurable:true,writable:true,value:r}):p[o]=r;var n=(p,o)=>()=>(p&&(o=p(p=0)),o);var L=(p,o)=>{for(var r in o)po(p,r,{get:o[r],enumerable:true});},jae=(p,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Sae(o))!vae.call(p,i)&&i!==r&&po(p,i,{get:()=>o[i],enumerable:!(t=gM(o,i))||t.enumerable});return p};var Cae=p=>jae(po({},"__esModule",{value:true}),p);var hM=p=>{var o;return [,,,zae((o=void 0)!=null?o:null)]},yM=["class","method","getter","setter","accessor","field","value","get","set"],Ri=p=>p!==void 0&&typeof p!="function"?xi("Function expected"):p,Eae=(p,o,r,t,i)=>({kind:yM[p],name:o,metadata:t,addInitializer:a=>r._?xi("Already initialized"):i.push(Ri(a||null))}),nf=(p,o)=>Tae(o,fM("metadata"),p[3]),bM=(p,o,r,t)=>{for(var i=0,a=p[o>>1],s=a&&a.length;i<s;i++)a[i].call(r);return t},RM=(p,o,r,t,i,a)=>{var c,l,m,u,d=o&7,f=false,g=false,h=2,y=yM[d+5],A=p[h]||(p[h]=[]),C=((i=i.prototype),gM(i,r));for(var I=t.length-1;I>=0;I--)m=Eae(d,r,l={},p[3],A),(m.static=f,m.private=g,u=m.access={has:D=>r in D},(u.get=D=>D[r]),d>2),c=(0, t[I])(C[y],m),l._=1,Ri(c)&&(C[y]=c);return C&&po(i,r,C),i};function Zp(p,o=p){return ansiEscapes.link(o,p)}var Fae;exports.logger=void 0;exports.setLoggerLevel=void 0;exports.disableLogger=void 0;var ne=n(()=>{Fae={SILLY:0,TRACE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,FATAL:6};exports.logger=new tslog.Logger({hideLogPositionForProduction:true,prettyLogTemplate:"{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} "}),exports.setLoggerLevel=p=>{exports.logger.settings.minLevel=Fae[p];},exports.disableLogger=()=>{exports.logger.settings.minLevel=100;};exports.setLoggerLevel(process.env.OPIK_LOG_LEVEL||"INFO");});function pf(p){return Object.fromEntries(Object.entries(p).filter(([,o])=>o!==void 0))}function qp(p){if(p!==void 0)return ["1","true","yes"].includes(String(p).toLowerCase())}function Lae(){return pf({apiKey:process.env.OPIK_API_KEY,apiUrl:process.env.OPIK_URL_OVERRIDE,projectName:process.env.OPIK_PROJECT_NAME,workspaceName:process.env.OPIK_WORKSPACE,environment:process.env.OPIK_ENVIRONMENT,batchDelayMs:process.env.OPIK_BATCH_DELAY_MS?Number(process.env.OPIK_BATCH_DELAY_MS):void 0,holdUntilFlush:qp(process.env.OPIK_HOLD_UNTIL_FLUSH),trackDisable:qp(process.env.OPIK_TRACK_DISABLE),maxPayloadSizeMb:process.env.OPIK_MAX_PAYLOAD_SIZE_MB&&Number.isFinite(Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB))?Number(process.env.OPIK_MAX_PAYLOAD_SIZE_MB):void 0,isAttachmentExtractionActive:qp(process.env.OPIK_IS_ATTACHMENT_EXTRACTION_ACTIVE),minBase64EmbeddedAttachmentSize:process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE&&Number.isFinite(Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE))?Number(process.env.OPIK_MIN_BASE64_EMBEDDED_ATTACHMENT_SIZE):void 0,promptCacheTtlSeconds:process.env.OPIK_PROMPT_CACHE_TTL_SECONDS?Math.max(1,parseInt(process.env.OPIK_PROMPT_CACHE_TTL_SECONDS,10)||1):void 0})}function Gae(p){return p.replace(/^~(?=$|\/|\\)/,_M__default.default.homedir())}function Jae(){let p=process.env.OPIK_CONFIG_PATH||Vae,o=Gae(p);if(!wM__default.default.existsSync(o)){if(process.env.OPIK_CONFIG_PATH)throw new Error(`Config file not found at ${o}`);return {}}try{let r=Wae__default.default.parse(wM__default.default.readFileSync(o,"utf8"));return r.opik?pf({apiKey:r.opik.api_key,apiUrl:r.opik.url_override,projectName:r.opik.project_name,workspaceName:r.opik.workspace,trackDisable:qp(r.opik.track_disable)}):{}}catch(r){return exports.logger.error(`Error loading config file ${o}: ${r}`),{}}}function ec(p){let o=Lae(),r=Jae(),{headers:t,...i}=p||{};return Hae({...Xe,...r,...o,...pf(i)})}function Hae(p){if(!p.apiUrl)throw new Error("OPIK_URL_OVERRIDE is not set");if(p.trackDisable)return p;let o=Kae(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 Kae(p){let{hostname:o}=new URL(p);return o==="comet.com"||o.endsWith(".comet.com")}var Vae,Xe,ut=n(()=>{ne();Vae=Mae__default.default.join(_M__default.default.homedir(),".opik.config"),Xe={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 Qae(p){lf.setTracingActive(p);}function He(){return lf.isTracingActive()}function Oae(){lf.resetToConfigDefault();}var cf,lf,co=n(()=>{ut();cf=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=!ec().trackDisable,this.tracingActive}catch{return true}}},lf=new cf;});function wi(p,o){return JSON.parse(p,o)}var Te,kr=n(()=>{Te=(p,o,r)=>JSON.stringify(p,o,r);});function $ae({message:p,statusCode:o,body:r}){let t=[];return p!=null&&t.push(p),o!=null&&t.push(`Status code: ${o.toString()}`),r!=null&&t.push(`Body: ${Te(r,void 0,2)}`),t.join(`
|
|
2
2
|
`)}var k,rc=n(()=>{kr();k=class extends Error{constructor({message:o,statusCode:r,body:t,rawResponse:i}){super($ae({message:o,statusCode:r,body:t})),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.statusCode=r,this.body=t,this.rawResponse=i;}};});var Jr,kM=n(()=>{Jr=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 G=n(()=>{rc();kM();});var _i,AM=n(()=>{G();_i=class extends k{constructor(o,r){super({message:"BadGatewayError",statusCode:502,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var N,PM=n(()=>{G();N=class extends k{constructor(o,r){super({message:"BadRequestError",statusCode:400,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Q,zM=n(()=>{G();Q=class extends k{constructor(o,r){super({message:"ConflictError",statusCode:409,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var te,SM=n(()=>{G();te=class extends k{constructor(o,r){super({message:"ForbiddenError",statusCode:403,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var gt,mf=n(()=>{G();gt=class extends k{constructor(o,r){super({message:"GoneError",statusCode:410,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ft,vM=n(()=>{G();ft=class extends k{constructor(o,r){super({message:"InternalServerError",statusCode:500,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var U,TM=n(()=>{G();U=class extends k{constructor(o,r){super({message:"NotFoundError",statusCode:404,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var Re,jM=n(()=>{G();Re=class extends k{constructor(o,r){super({message:"NotImplementedError",statusCode:501,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var ge,CM=n(()=>{G();ge=class extends k{constructor(o,r){super({message:"ServiceUnavailableError",statusCode:503,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var de,EM=n(()=>{G();de=class extends k{constructor(o,r){super({message:"TooManyRequestsError",statusCode:429,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var O,IM=n(()=>{G();O=class extends k{constructor(o,r){super({message:"UnauthorizedError",statusCode:401,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var K,DM=n(()=>{G();K=class extends k{constructor(o,r){super({message:"UnprocessableEntityError",statusCode:422,body:o,rawResponse:r}),Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name;}};});var UM=n(()=>{AM();PM();zM();SM();mf();vM();TM();jM();CM();EM();IM();DM();});var df=n(()=>{});var NM=n(()=>{df();});var uf={};var FM=n(()=>{NM();});var gf=n(()=>{});var BM=n(()=>{gf();});var MM,WM=n(()=>{MM={Open:"open",Resolved:"resolved",Closed:"closed"};});var VM,LM=n(()=>{VM={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var GM,JM=n(()=>{GM={Open:"open",Resolved:"resolved",Closed:"closed"};});var ff=n(()=>{WM();LM();JM();});var tc={};L(tc,{AgentInsightsIssueUpdateStatus:()=>MM,FindAgentInsightsIssuesRequestSeverity:()=>VM,FindAgentInsightsIssuesRequestStatus:()=>GM});var HM=n(()=>{BM();ff();});var hf=n(()=>{});var KM=n(()=>{hf();});var yf={};var QM=n(()=>{KM();});var bf=n(()=>{});var OM=n(()=>{bf();});var $M,YM=n(()=>{$M={Enabled:"enabled",Disabled:"disabled"};});var Rf=n(()=>{YM();});var oc={};L(oc,{AgentInsightsJobUpdateStatus:()=>$M});var XM=n(()=>{OM();Rf();});var xf=n(()=>{});var ZM=n(()=>{xf();});var qM,eW=n(()=>{qM={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var wf=n(()=>{eW();});var ic={};L(ic,{GetWebhookExamplesRequestAlertType:()=>qM});var rW=n(()=>{ZM();wf();});var tW=n(()=>{});var _f={};var oW=n(()=>{tW();});var kf=n(()=>{});var iW=n(()=>{kf();});var Af={};var aW=n(()=>{iW();});var Pf=n(()=>{});var nW=n(()=>{Pf();});var sW,pW=n(()=>{sW={Trace:"TRACE",Span:"SPAN",Thread:"THREAD"};});var zf=n(()=>{pW();});var ac={};L(ac,{AssertionResultBatchEntityType:()=>sW});var cW=n(()=>{nW();zf();});var Sf=n(()=>{});var lW=n(()=>{Sf();});var mW,dW=n(()=>{mW={Trace:"trace",Span:"span"};});var uW,gW=n(()=>{uW={Trace:"trace",Span:"span"};});var fW,hW=n(()=>{fW={Trace:"trace",Span:"span"};});var yW,bW=n(()=>{yW={Trace:"trace",Span:"span"};});var vf=n(()=>{dW();gW();hW();bW();});var nc={};L(nc,{AttachmentListRequestEntityType:()=>mW,DownloadAttachmentRequestEntityType:()=>uW,StartMultipartUploadRequestEntityType:()=>fW,UploadAttachmentRequestEntityType:()=>yW});var RW=n(()=>{lW();vf();});var Tf=n(()=>{});var xW=n(()=>{Tf();});var jf={};var wW=n(()=>{xW();});var Cf=n(()=>{});var _W=n(()=>{Cf();});var Ef={};var kW=n(()=>{_W();});var AW=n(()=>{});var If={};var PW=n(()=>{AW();});var Df=n(()=>{});var zW=n(()=>{Df();});var Uf={};var SW=n(()=>{zW();});var Nf=n(()=>{});var vW=n(()=>{Nf();});var Ff={};var TW=n(()=>{vW();});var Bf=n(()=>{});var jW=n(()=>{Bf();});var CW,EW=n(()=>{CW={Json:"json",Jsonl:"jsonl"};});var IW,DW=n(()=>{IW={Private:"private",Public:"public"};});var sc,Mf=n(()=>{sc={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var UW,NW=n(()=>{UW={Private:"private",Public:"public"};});var Wf=n(()=>{EW();DW();Mf();NW();});var pc={};L(pc,{CreateDatasetItemsFromJsonRequestFormat:()=>CW,DatasetUpdateVisibility:()=>IW,DatasetWriteType:()=>sc,DatasetWriteVisibility:()=>UW});var FW=n(()=>{jW();Wf();});var Vf=n(()=>{});var BW=n(()=>{Vf();});var Lf={};var MW=n(()=>{BW();});var Gf=n(()=>{});var WW=n(()=>{Gf();});var cc,Jf=n(()=>{cc={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var VW,LW=n(()=>{VW={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var GW,JW=n(()=>{GW={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var Hf=n(()=>{Jf();LW();JW();});var lc={};L(lc,{ExperimentWriteEvaluationMethod:()=>cc,ExperimentWriteStatus:()=>VW,ExperimentWriteType:()=>GW});var HW=n(()=>{WW();Hf();});var Kf=n(()=>{});var KW=n(()=>{Kf();});var QW,OW=n(()=>{QW={Numerical:"numerical",Categorical:"categorical",Boolean:"boolean"};});var Qf=n(()=>{OW();});var mc={};L(mc,{FindFeedbackDefinitionsRequestType:()=>QW});var $W=n(()=>{KW();Qf();});var Of=n(()=>{});var YW=n(()=>{Of();});var XW,ZW=n(()=>{XW={Queued:"queued",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var $f=n(()=>{ZW();});var dc={};L(dc,{FindGuardrailModelsRequestLatestRunStatus:()=>XW});var qW=n(()=>{YW();$f();});var Yf=n(()=>{});var eV=n(()=>{Yf();});var rV,tV=n(()=>{rV={OnRequest:"on_request",Global:"global"};});var Xf=n(()=>{tV();});var uc={};L(uc,{FindGuardrailPoliciesRequestExecutionScope:()=>rV});var oV=n(()=>{eV();Xf();});var Zf=n(()=>{});var iV=n(()=>{Zf();});var qf={};var aV=n(()=>{iV();});var eh=n(()=>{});var nV=n(()=>{eh();});var rh={};var sV=n(()=>{nV();});var pV=n(()=>{});var th={};var cV=n(()=>{pV();});var oh=n(()=>{});var lV=n(()=>{oh();});var mV,dV=n(()=>{mV={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var ih=n(()=>{dV();});var gc={};L(gc,{ProviderApiKeyWriteProvider:()=>mV});var uV=n(()=>{lV();ih();});var gV=n(()=>{});var ah={};var fV=n(()=>{gV();});var nh=n(()=>{});var hV=n(()=>{nh();});var sh={};var yV=n(()=>{hV();});var bV=n(()=>{});var ph={};var RV=n(()=>{bV();});var xV=n(()=>{});var ch={};var wV=n(()=>{xV();});var _V=n(()=>{});var lh={};var kV=n(()=>{_V();});var mh=n(()=>{});var AV=n(()=>{mh();});var PV,zV=n(()=>{PV={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var dh=n(()=>{zV();});var fc={};L(fc,{OptimizationUpdateStatus:()=>PV});var SV=n(()=>{AV();dh();});var uh=n(()=>{});var vV=n(()=>{uh();});var TV,jV=n(()=>{TV={Connect:"connect",Endpoint:"endpoint"};});var gh=n(()=>{jV();});var hc={};L(hc,{CreateSessionRequestType:()=>TV});var CV=n(()=>{vV();gh();});var fh=n(()=>{});var EV=n(()=>{fh();});var IV,DV=n(()=>{IV={Traces:"traces",Spans:"spans",Threads:"threads"};});var UV,NV=n(()=>{UV={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var FV,BV=n(()=>{FV={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 MV,WV=n(()=>{MV={Private:"private",Public:"public"};});var VV,LV=n(()=>{VV={Private:"private",Public:"public"};});var hh=n(()=>{DV();NV();BV();WV();LV();});var yc={};L(yc,{KpiCardRequestEntityType:()=>IV,ProjectMetricRequestPublicInterval:()=>UV,ProjectMetricRequestPublicMetricType:()=>FV,ProjectUpdateVisibility:()=>MV,ProjectWriteVisibility:()=>VV});var GV=n(()=>{EV();hh();});var yh=n(()=>{});var JV=n(()=>{yh();});var HV,KV=n(()=>{HV={Text:"text",Chat:"chat"};});var QV,OV=n(()=>{QV={Text:"text",Chat:"chat"};});var $V,YV=n(()=>{$V={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var bh=n(()=>{KV();OV();YV();});var bc={};L(bc,{CreatePromptVersionDetailTemplateStructure:()=>HV,PromptWriteTemplateStructure:()=>QV,PromptWriteType:()=>$V});var XV=n(()=>{JV();bh();});var Rh=n(()=>{});var ZV=n(()=>{Rh();});var xh={};var qV=n(()=>{ZV();});var wh=n(()=>{});var e0=n(()=>{wh();});var r0,t0=n(()=>{r0={AgentInsights:"agent_insights"};});var _h=n(()=>{t0();});var Rc={};L(Rc,{FindReportFailuresRequestType:()=>r0});var o0=n(()=>{e0();_h();});var kh=n(()=>{});var i0=n(()=>{kh();});var a0,n0=n(()=>{a0={Pending:"pending",Completed:"completed",Failed:"failed"};});var Ah=n(()=>{n0();});var xc={};L(xc,{ReportCompleteRequestStatus:()=>a0});var s0=n(()=>{i0();Ah();});var Ph=n(()=>{});var p0=n(()=>{Ph();});var c0,l0=n(()=>{c0={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var zh=n(()=>{l0();});var wc={};L(wc,{RetentionRuleWriteRetention:()=>c0});var m0=n(()=>{p0();zh();});var Sh=n(()=>{});var d0=n(()=>{Sh();});var u0,g0=n(()=>{u0={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var f0,h0=n(()=>{f0={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var y0,b0=n(()=>{y0={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var R0,x0=n(()=>{R0={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var vh=n(()=>{g0();h0();b0();x0();});var _c={};L(_c,{BridgeCommandResultRequestStatus:()=>u0,BridgeCommandSubmitRequestType:()=>f0,ListRunnersRequestStatus:()=>y0,LocalRunnerJobResultRequestStatus:()=>R0});var w0=n(()=>{d0();vh();});var _0=n(()=>{});var Th={};var k0=n(()=>{_0();});var jh=n(()=>{});var A0=n(()=>{jh();});var P0,z0=n(()=>{P0={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var S0,v0=n(()=>{S0={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var T0,j0=n(()=>{T0={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var C0,E0=n(()=>{C0={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 I0,D0=n(()=>{I0={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var Ch=n(()=>{z0();v0();j0();E0();D0();});var kc={};L(kc,{FindFeedbackScoreNames1RequestType:()=>P0,GetSpanStatsRequestType:()=>S0,GetSpansByProjectRequestType:()=>T0,SpanSearchStreamRequestPublicExcludeItem:()=>C0,SpanSearchStreamRequestPublicType:()=>I0});var U0=n(()=>{A0();Ch();});var Eh=n(()=>{});var N0=n(()=>{Eh();});var Ih={};var F0=n(()=>{N0();});var Dh=n(()=>{});var B0=n(()=>{Dh();});var Uh={};var M0=n(()=>{B0();});var Nh=n(()=>{});var W0=n(()=>{Nh();});var Fh={};var V0=n(()=>{W0();});var Bh=n(()=>{});var L0=n(()=>{Bh();});var G0,J0=n(()=>{G0={Name:"name",StartTime:"start_time",EndTime:"end_time",Input:"input",Output:"output",Metadata:"metadata",Tags:"tags",ErrorInfo:"error_info",Usage:"usage",CreatedAt:"created_at",CreatedBy:"created_by",LastUpdatedBy:"last_updated_by",FeedbackScores:"feedback_scores",SpanFeedbackScores:"span_feedback_scores",Comments:"comments",GuardrailsValidations:"guardrails_validations",TotalEstimatedCost:"total_estimated_cost",SpanCount:"span_count",LlmSpanCount:"llm_span_count",HasToolSpans:"has_tool_spans",Duration:"duration",Ttft:"ttft",ThreadId:"thread_id",VisibilityMode:"visibility_mode",Providers:"providers",Experiment:"experiment",AnnotationQueues:"annotation_queues",Source:"source",Environment:"environment"};});var Mh=n(()=>{J0();});var Ac={};L(Ac,{TraceSearchStreamRequestPublicExcludeItem:()=>G0});var H0=n(()=>{L0();Mh();});var Wh=n(()=>{});var K0=n(()=>{Wh();});var Q0,O0=n(()=>{Q0={Widget:"widget"};});var $0,Y0=n(()=>{$0={User:"user",Ollie:"ollie",Agent:"agent"};});var X0,Z0=n(()=>{X0={Html:"html"};});var q0,eL=n(()=>{q0={User:"user",Ollie:"ollie",Agent:"agent"};});var rL,tL=n(()=>{rL={Html:"html"};});var Vh=n(()=>{O0();Y0();Z0();eL();tL();});var Pc={};L(Pc,{ViewCreateArea:()=>Q0,ViewCreateAuthor:()=>$0,ViewCreateType:()=>X0,ViewVersionCreateAuthor:()=>q0,ViewVersionCreateType:()=>rL});var oL=n(()=>{K0();Vh();});var Lh=n(()=>{});var iL=n(()=>{Lh();});var Gh={};var aL=n(()=>{iL();});var nL=n(()=>{});var Jh={};var sL=n(()=>{nL();});var Hh=n(()=>{});var pL=n(()=>{Hh();});var cL,lL=n(()=>{cL={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var mL,dL=n(()=>{mL={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 Kh=n(()=>{lL();dL();});var zc={};L(zc,{WorkspaceSpanMetricRequestInterval:()=>cL,WorkspaceSpanMetricRequestMetricType:()=>mL});var uL=n(()=>{pL();Kh();});var gL=n(()=>{df();FM();gf();HM();ff();hf();QM();bf();XM();Rf();xf();rW();wf();oW();kf();aW();Pf();cW();zf();Sf();RW();vf();Tf();wW();Cf();kW();PW();Df();SW();Nf();TW();Bf();FW();Wf();Vf();MW();Gf();HW();Hf();Kf();$W();Qf();Of();qW();$f();Yf();oV();Xf();Zf();aV();eh();sV();cV();oh();uV();ih();fV();nh();yV();RV();wV();kV();mh();SV();dh();uh();CV();gh();fh();GV();hh();yh();XV();bh();Rh();qV();wh();o0();_h();kh();s0();Ah();Ph();m0();zh();Sh();w0();vh();k0();jh();U0();Ch();Eh();F0();Dh();M0();Nh();V0();Bh();H0();Mh();Wh();oL();Vh();Lh();aL();sL();Hh();uL();Kh();});var fL=n(()=>{});var hL=n(()=>{});var Yae,yL=n(()=>{Yae={Blueprint:"blueprint",Mask:"mask"};});var bL=n(()=>{});var Xae,RL=n(()=>{Xae={Blueprint:"blueprint",Mask:"mask"};});var xL=n(()=>{});var ki,wL=n(()=>{ki={Blueprint:"blueprint",Mask:"mask"};});var _L=n(()=>{});var kL=n(()=>{});var AL=n(()=>{});var Zae,PL=n(()=>{Zae={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var zL=n(()=>{});var qae,SL=n(()=>{qae={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var vL=n(()=>{});var ene,TL=n(()=>{ene={String:"string",Integer:"integer",Float:"float",Boolean:"boolean",Prompt:"prompt",PromptCommit:"prompt_commit"};});var jL=n(()=>{});var CL=n(()=>{});var EL=n(()=>{});var rne,IL=n(()=>{rne={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var tne,DL=n(()=>{tne={Open:"open",Resolved:"resolved",Closed:"closed"};});var UL=n(()=>{});var one,NL=n(()=>{one={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var ine,FL=n(()=>{ine={Open:"open",Resolved:"resolved",Closed:"closed"};});var BL=n(()=>{});var ane,ML=n(()=>{ane={Enabled:"enabled",Disabled:"disabled"};});var WL=n(()=>{});var VL=n(()=>{});var nne,LL=n(()=>{nne={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var GL=n(()=>{});var JL=n(()=>{});var sne,HL=n(()=>{sne={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var KL=n(()=>{});var QL=n(()=>{});var OL=n(()=>{});var pne,$L=n(()=>{pne={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var cne,YL=n(()=>{cne={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var XL=n(()=>{});var lne,ZL=n(()=>{lne={ScopeProject:"scope:project",ThresholdFeedbackScore:"threshold:feedback_score",ThresholdCost:"threshold:cost",ThresholdLatency:"threshold:latency",ThresholdErrors:"threshold:errors",FilterGuardrailType:"filter:guardrail_type"};});var mne,qL=n(()=>{mne={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 eG=n(()=>{});var dne,rG=n(()=>{dne={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 tG=n(()=>{});var une,oG=n(()=>{une={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 iG=n(()=>{});var gne,aG=n(()=>{gne={General:"general",Slack:"slack",Pagerduty:"pagerduty"};});var nG=n(()=>{});var sG=n(()=>{});var pG=n(()=>{});var cG=n(()=>{});var lG=n(()=>{});var mG=n(()=>{});var dG=n(()=>{});var uG=n(()=>{});var gG=n(()=>{});var fG=n(()=>{});var hG=n(()=>{});var fne,yG=n(()=>{fne={Manual:"manual",Automated:"automated"};});var bG=n(()=>{});var RG=n(()=>{});var xG=n(()=>{});var hne,wG=n(()=>{hne={Trace:"trace",Thread:"thread"};});var _G=n(()=>{});var kG=n(()=>{});var AG=n(()=>{});var PG=n(()=>{});var yne,zG=n(()=>{yne={Trace:"trace",Thread:"thread"};});var SG=n(()=>{});var bne,vG=n(()=>{bne={Trace:"trace",Thread:"thread"};});var TG=n(()=>{});var jG=n(()=>{});var Rne,CG=n(()=>{Rne={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var xne,EG=n(()=>{xne={Passed:"passed",Failed:"failed"};});var IG=n(()=>{});var DG=n(()=>{});var UG=n(()=>{});var NG=n(()=>{});var wne,FG=n(()=>{wne={System:"system",User:"user",Assistant:"assistant",Tool:"tool",Function:"function"};});var BG=n(()=>{});var MG=n(()=>{});var WG=n(()=>{});var _ne,VG=n(()=>{_ne={Running:"running",Failed:"failed"};});var LG=n(()=>{});var GG=n(()=>{});var JG=n(()=>{});var HG=n(()=>{});var KG=n(()=>{});var QG=n(()=>{});var OG=n(()=>{});var kne,$G=n(()=>{kne={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var YG=n(()=>{});var XG=n(()=>{});var ZG=n(()=>{});var qG=n(()=>{});var Ane,eJ=n(()=>{Ane={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var Pne,rJ=n(()=>{Pne={Production:"production",Experiment:"experiment",Both:"both"};});var tJ=n(()=>{});var oJ=n(()=>{});var zne,iJ=n(()=>{zne={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var Sne,aJ=n(()=>{Sne={Production:"production",Experiment:"experiment",Both:"both"};});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 vne,bJ=n(()=>{vne={Production:"production",Experiment:"experiment",Both:"both"};});var RJ=n(()=>{});var Tne,xJ=n(()=>{Tne={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var wJ=n(()=>{});var _J=n(()=>{});var kJ=n(()=>{});var AJ=n(()=>{});var PJ=n(()=>{});var jne,zJ=n(()=>{jne={Production:"production",Experiment:"experiment",Both:"both"};});var SJ=n(()=>{});var vJ=n(()=>{});var TJ=n(()=>{});var jJ=n(()=>{});var CJ=n(()=>{});var Cne,EJ=n(()=>{Cne={Evaluator:"evaluator",AnnotationQueueRouter:"annotation_queue_router"};});var Ene,IJ=n(()=>{Ene={Production:"production",Experiment:"experiment",Both:"both"};});var DJ=n(()=>{});var UJ=n(()=>{});var NJ=n(()=>{});var FJ=n(()=>{});var BJ=n(()=>{});var MJ=n(()=>{});var WJ=n(()=>{});var VJ=n(()=>{});var LJ=n(()=>{});var GJ=n(()=>{});var JJ=n(()=>{});var HJ=n(()=>{});var KJ=n(()=>{});var QJ=n(()=>{});var Ine,OJ=n(()=>{Ine={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var $J=n(()=>{});var Dne,YJ=n(()=>{Dne={None:"none",Tags:"tags",Metadata:"metadata",Name:"name",ErrorInfo:"error_info",ErrorType:"error_type",Model:"model",Provider:"provider",Type:"type",GuardrailName:"guardrail_name"};});var XJ=n(()=>{});var ZJ=n(()=>{});var qJ=n(()=>{});var Une,e1=n(()=>{Une={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var Nne,r1=n(()=>{Nne={Pending:"pending",PickedUp:"picked_up",Completed:"completed",Failed:"failed",TimedOut:"timed_out"};});var t1=n(()=>{});var Fne,o1=n(()=>{Fne={ReadFile:"ReadFile",WriteFile:"WriteFile",EditFile:"EditFile",ListFiles:"ListFiles",SearchFiles:"SearchFiles",Exec:"Exec"};});var i1=n(()=>{});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 Bne,f1=n(()=>{Bne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var h1=n(()=>{});var Mne,y1=n(()=>{Mne={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var Wne,b1=n(()=>{Wne={Passed:"passed",Failed:"failed"};});var Vne,R1=n(()=>{Vne={Passed:"passed",Failed:"failed"};});var x1=n(()=>{});var w1=n(()=>{});var _1=n(()=>{});var k1=n(()=>{});var A1=n(()=>{});var P1=n(()=>{});var z1=n(()=>{});var Lne,S1=n(()=>{Lne={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var v1=n(()=>{});var Gne,T1=n(()=>{Gne={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var Jne,j1=n(()=>{Jne={String:"string",Number:"number",Object:"object",Boolean:"boolean",Array:"array",Null:"null"};});var C1=n(()=>{});var E1=n(()=>{});var I1=n(()=>{});var D1=n(()=>{});var Hne,U1=n(()=>{Hne={Trace:"trace",Span:"span"};});var N1=n(()=>{});var F1=n(()=>{});var B1=n(()=>{});var M1=n(()=>{});var W1=n(()=>{});var V1=n(()=>{});var L1=n(()=>{});var G1=n(()=>{});var J1=n(()=>{});var H1=n(()=>{});var K1=n(()=>{});var Q1=n(()=>{});var O1=n(()=>{});var $1=n(()=>{});var Y1=n(()=>{});var Kne,X1=n(()=>{Kne={Workspace:"workspace",Insights:"insights"};});var Qne,Z1=n(()=>{Qne={MultiProject:"multi_project",Experiments:"experiments"};});var q1=n(()=>{});var eH=n(()=>{});var One,rH=n(()=>{One={MultiProject:"multi_project",Experiments:"experiments"};});var tH=n(()=>{});var oH=n(()=>{});var $ne,iH=n(()=>{$ne={MultiProject:"multi_project",Experiments:"experiments"};});var aH=n(()=>{});var nH=n(()=>{});var sH=n(()=>{});var pH=n(()=>{});var cH=n(()=>{});var lH=n(()=>{});var Yne,mH=n(()=>{Yne={Pending:"PENDING",Processing:"PROCESSING",Completed:"COMPLETED",Failed:"FAILED"};});var dH=n(()=>{});var uH=n(()=>{});var gH=n(()=>{});var fH=n(()=>{});var Xne,hH=n(()=>{Xne={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var yH=n(()=>{});var Zne,bH=n(()=>{Zne={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 RH=n(()=>{});var xH=n(()=>{});var wH=n(()=>{});var qne,_H=n(()=>{qne={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var ese,kH=n(()=>{ese={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var AH=n(()=>{});var PH=n(()=>{});var Qh,zH=n(()=>{Qh={Manual:"manual",Trace:"trace",Span:"span",Sdk:"sdk"};});var SH=n(()=>{});var vH=n(()=>{});var rse,TH=n(()=>{rse={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var Oh,jH=n(()=>{Oh={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var tse,CH=n(()=>{tse={Private:"private",Public:"public"};});var ose,EH=n(()=>{ose={Unknown:"unknown",Processing:"processing",Completed:"completed",Failed:"failed"};});var ise,IH=n(()=>{ise={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var DH=n(()=>{});var UH=n(()=>{});var NH=n(()=>{});var FH=n(()=>{});var BH=n(()=>{});var MH=n(()=>{});var ase,WH=n(()=>{ase={Private:"private",Public:"public"};});var VH=n(()=>{});var LH=n(()=>{});var nse,GH=n(()=>{nse={Trace:"trace",Span:"span"};});var JH=n(()=>{});var HH=n(()=>{});var KH=n(()=>{});var QH=n(()=>{});var OH=n(()=>{});var $H=n(()=>{});var YH=n(()=>{});var XH=n(()=>{});var ZH=n(()=>{});var qH=n(()=>{});var eK=n(()=>{});var rK=n(()=>{});var tK=n(()=>{});var oK=n(()=>{});var iK=n(()=>{});var aK=n(()=>{});var nK=n(()=>{});var sK=n(()=>{});var pK=n(()=>{});var cK=n(()=>{});var lK=n(()=>{});var sse,mK=n(()=>{sse={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var dK=n(()=>{});var $h,Yh=n(()=>{$h={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var pse,uK=n(()=>{pse={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var gK=n(()=>{});var Xh,Zh=n(()=>{Xh={LlmJudge:"llm_judge",CodeMetric:"code_metric"};});var fK=n(()=>{});var hK=n(()=>{});var yK=n(()=>{});var bK=n(()=>{});var RK=n(()=>{});var xK=n(()=>{});var cse,wK=n(()=>{cse={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var _K=n(()=>{});var kK=n(()=>{});var AK=n(()=>{});var PK=n(()=>{});var zK=n(()=>{});var SK=n(()=>{});var vK=n(()=>{});var TK=n(()=>{});var jK=n(()=>{});var lse,CK=n(()=>{lse={Passed:"passed",Failed:"failed"};});var mse,EK=n(()=>{mse={Default:"default",Hidden:"hidden"};});var IK=n(()=>{});var dse,DK=n(()=>{dse={Default:"default",Hidden:"hidden"};});var UK=n(()=>{});var NK=n(()=>{});var use,FK=n(()=>{use={Passed:"passed",Failed:"failed"};});var gse,BK=n(()=>{gse={Default:"default",Hidden:"hidden"};});var MK=n(()=>{});var WK=n(()=>{});var fse,VK=n(()=>{fse={Dataset:"dataset",EvaluationSuite:"evaluation_suite"};});var hse,LK=n(()=>{hse={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var yse,GK=n(()=>{yse={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var JK=n(()=>{});var HK=n(()=>{});var bse,KK=n(()=>{bse={Passed:"passed",Failed:"failed"};});var QK=n(()=>{});var Rse,OK=n(()=>{Rse={Passed:"passed",Failed:"failed"};});var xse,$K=n(()=>{xse={Passed:"passed",Failed:"failed"};});var YK=n(()=>{});var XK=n(()=>{});var ZK=n(()=>{});var wse,qK=n(()=>{wse={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var qh,eQ=n(()=>{qh={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var rQ=n(()=>{});var _se,tQ=n(()=>{_se={Running:"running",Completed:"completed",Cancelled:"cancelled",Failed:"failed"};});var kse,oQ=n(()=>{kse={Regular:"regular",Trial:"trial",MiniBatch:"mini-batch",Mutation:"mutation"};});var iQ=n(()=>{});var aQ=n(()=>{});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 gQ=n(()=>{});var fQ=n(()=>{});var ey,ry=n(()=>{ey={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var hQ=n(()=>{});var Ase,yQ=n(()=>{Ase={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var bQ=n(()=>{});var Pse,RQ=n(()=>{Pse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var xQ=n(()=>{});var zse,wQ=n(()=>{zse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var _Q=n(()=>{});var kQ=n(()=>{});var AQ=n(()=>{});var Sse,PQ=n(()=>{Sse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var vse,zQ=n(()=>{vse={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var SQ=n(()=>{});var vQ=n(()=>{});var TQ=n(()=>{});var jQ=n(()=>{});var CQ=n(()=>{});var EQ=n(()=>{});var IQ=n(()=>{});var DQ=n(()=>{});var UQ=n(()=>{});var NQ=n(()=>{});var FQ=n(()=>{});var BQ=n(()=>{});var MQ=n(()=>{});var Tse,WQ=n(()=>{Tse={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var VQ=n(()=>{});var jse,LQ=n(()=>{jse={OnRequest:"on_request",Global:"global"};});var GQ=n(()=>{});var JQ=n(()=>{});var Cse,HQ=n(()=>{Cse={OnRequest:"on_request",Global:"global"};});var KQ=n(()=>{});var QQ=n(()=>{});var Ese,OQ=n(()=>{Ese={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var Ise,$Q=n(()=>{Ise={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var YQ=n(()=>{});var Dse,XQ=n(()=>{Dse={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var ZQ=n(()=>{});var Use,qQ=n(()=>{Use={OnRequest:"on_request",Global:"global"};});var Nse,eO=n(()=>{Nse={Passed:"passed",Failed:"failed"};});var rO=n(()=>{});var tO=n(()=>{});var oO=n(()=>{});var iO=n(()=>{});var aO=n(()=>{});var Fse,nO=n(()=>{Fse={Queued:"queued",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var sO=n(()=>{});var Bse,pO=n(()=>{Bse={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var Mse,cO=n(()=>{Mse={Passed:"passed",Failed:"failed"};});var lO=n(()=>{});var mO=n(()=>{});var dO=n(()=>{});var uO=n(()=>{});var gO=n(()=>{});var fO=n(()=>{});var hO=n(()=>{});var yO=n(()=>{});var bO=n(()=>{});var RO=n(()=>{});var xO=n(()=>{});var wO=n(()=>{});var _O=n(()=>{});var kO=n(()=>{});var AO=n(()=>{});var PO=n(()=>{});var zO=n(()=>{});var Wse,SO=n(()=>{Wse={Count:"count",Errors:"errors",AvgDuration:"avg_duration",TotalCost:"total_cost"};});var vO=n(()=>{});var TO=n(()=>{});var jO=n(()=>{});var CO=n(()=>{});var EO=n(()=>{});var IO=n(()=>{});var DO=n(()=>{});var UO=n(()=>{});var Vse,NO=n(()=>{Vse={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var Lse,FO=n(()=>{Lse={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var BO=n(()=>{});var Gse,MO=n(()=>{Gse={System:"SYSTEM",User:"USER",Ai:"AI",ToolExecutionResult:"TOOL_EXECUTION_RESULT",Custom:"CUSTOM"};});var WO=n(()=>{});var Jse,VO=n(()=>{Jse={Decisions:"decisions"};});var LO=n(()=>{});var Hse,GO=n(()=>{Hse={Decisions:"decisions"};});var JO=n(()=>{});var Kse,HO=n(()=>{Kse={Decisions:"decisions"};});var KO=n(()=>{});var QO=n(()=>{});var Qse,OO=n(()=>{Qse={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var Ose,$O=n(()=>{Ose={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var YO=n(()=>{});var $se,XO=n(()=>{$se={Boolean:"BOOLEAN",Integer:"INTEGER",Double:"DOUBLE"};});var ZO=n(()=>{});var qO=n(()=>{});var e$=n(()=>{});var r$=n(()=>{});var t$=n(()=>{});var Yse,o$=n(()=>{Yse={Pending:"pending",Running:"running",Completed:"completed",Failed:"failed",Cancelled:"cancelled"};});var i$=n(()=>{});var a$=n(()=>{});var Xse,n$=n(()=>{Xse={Pairing:"pairing",Connected:"connected",Disconnected:"disconnected"};});var Zse,s$=n(()=>{Zse={Connect:"connect",Endpoint:"endpoint"};});var p$=n(()=>{});var c$=n(()=>{});var l$=n(()=>{});var qse,m$=n(()=>{qse={Info:"INFO",Warn:"WARN",Error:"ERROR",Debug:"DEBUG",Trace:"TRACE"};});var d$=n(()=>{});var u$=n(()=>{});var g$=n(()=>{});var f$=n(()=>{});var epe,h$=n(()=>{epe={Trace:"trace",Thread:"thread",Span:"span"};});var y$=n(()=>{});var b$=n(()=>{});var R$=n(()=>{});var x$=n(()=>{});var w$=n(()=>{});var _$=n(()=>{});var k$=n(()=>{});var A$=n(()=>{});var P$=n(()=>{});var z$=n(()=>{});var S$=n(()=>{});var v$=n(()=>{});var T$=n(()=>{});var j$=n(()=>{});var C$=n(()=>{});var E$=n(()=>{});var I$=n(()=>{});var D$=n(()=>{});var U$=n(()=>{});var rpe,N$=n(()=>{rpe={Pending:"pending",Completed:"completed",Failed:"failed"};});var F$=n(()=>{});var B$=n(()=>{});var M$=n(()=>{});var tpe,W$=n(()=>{tpe={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var ope,V$=n(()=>{ope={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var L$=n(()=>{});var G$=n(()=>{});var J$=n(()=>{});var H$=n(()=>{});var K$=n(()=>{});var ipe,Q$=n(()=>{ipe={Running:"running",Completed:"completed",Cancelled:"cancelled",Initialized:"initialized",Error:"error"};});var O$=n(()=>{});var $$=n(()=>{});var Y$=n(()=>{});var lo,ty=n(()=>{lo={Required:"required",Optional:"optional"};});var X$=n(()=>{});var Z$=n(()=>{});var q$=n(()=>{});var e4=n(()=>{});var r4=n(()=>{});var t4=n(()=>{});var o4=n(()=>{});var ape,i4=n(()=>{ape={Private:"private",Public:"public"};});var a4=n(()=>{});var npe,n4=n(()=>{npe={Hourly:"HOURLY",Daily:"DAILY",Weekly:"WEEKLY",Total:"TOTAL"};});var spe,s4=n(()=>{spe={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 p4=n(()=>{});var c4=n(()=>{});var ppe,l4=n(()=>{ppe={Private:"private",Public:"public"};});var m4=n(()=>{});var d4=n(()=>{});var u4=n(()=>{});var g4=n(()=>{});var f4=n(()=>{});var h4=n(()=>{});var y4=n(()=>{});var cpe,b4=n(()=>{cpe={Disabled:"disabled",Collecting:"collecting",Ready:"ready",TooLarge:"too_large"};});var lpe,R4=n(()=>{lpe={Private:"private",Public:"public"};});var x4=n(()=>{});var w4=n(()=>{});var _4=n(()=>{});var mpe,k4=n(()=>{mpe={Text:"text",Chat:"chat"};});var A4=n(()=>{});var P4=n(()=>{});var dpe,z4=n(()=>{dpe={Text:"text",Chat:"chat"};});var upe,S4=n(()=>{upe={Text:"text",Chat:"chat"};});var v4=n(()=>{});var gpe,T4=n(()=>{gpe={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var j4=n(()=>{});var C4=n(()=>{});var E4=n(()=>{});var fpe,I4=n(()=>{fpe={Text:"text",Chat:"chat"};});var hpe,D4=n(()=>{hpe={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var ype,U4=n(()=>{ype={PromptVersion:"prompt_version",Mask:"mask"};});var N4=n(()=>{});var F4=n(()=>{});var B4=n(()=>{});var M4=n(()=>{});var W4=n(()=>{});var bpe,V4=n(()=>{bpe={Text:"text",Chat:"chat"};});var Rpe,L4=n(()=>{Rpe={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var xpe,G4=n(()=>{xpe={PromptVersion:"prompt_version",Mask:"mask"};});var wpe,J4=n(()=>{wpe={Text:"text",Chat:"chat"};});var _pe,H4=n(()=>{_pe={Mustache:"mustache",Jinja2:"jinja2",Python:"python"};});var K4=n(()=>{});var kpe,Q4=n(()=>{kpe={PromptVersion:"prompt_version",Mask:"mask"};});var O4=n(()=>{});var $4=n(()=>{});var Ape,Y4=n(()=>{Ape={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var X4=n(()=>{});var Ppe,Z4=n(()=>{Ppe={Openai:"openai",Anthropic:"anthropic",Gemini:"gemini",Openrouter:"openrouter",VertexAi:"vertex-ai",Bedrock:"bedrock",Ollama:"ollama",CustomLlm:"custom-llm",OpikFree:"opik-free"};});var q4=n(()=>{});var e6=n(()=>{});var zpe,r6=n(()=>{zpe={Form:"form",Json:"json",Basic:"basic"};});var Spe,t6=n(()=>{Spe={Form:"form",Json:"json",Basic:"basic"};});var o6=n(()=>{});var vpe,i6=n(()=>{vpe={Form:"form",Json:"json",Basic:"basic"};});var a6=n(()=>{});var Tpe,n6=n(()=>{Tpe={TraceDaily:"trace_daily",Experiment:"experiment",DatasetVersion:"dataset_version",TestSuiteVersion:"test_suite_version",AlertEvent:"alert_event",Optimization:"optimization",PromptVersion:"prompt_version"};});var s6=n(()=>{});var p6=n(()=>{});var jpe,c6=n(()=>{jpe={Critical:"critical",High:"high",Medium:"medium",Low:"low"};});var l6=n(()=>{});var m6=n(()=>{});var Cpe,d6=n(()=>{Cpe={AgentInsights:"agent_insights"};});var u6=n(()=>{});var g6=n(()=>{});var f6=n(()=>{});var Epe,h6=n(()=>{Epe={Text:"text",JsonObject:"json_object",JsonSchema:"json_schema"};});var y6=n(()=>{});var b6=n(()=>{});var R6=n(()=>{});var x6=n(()=>{});var Ipe,w6=n(()=>{Ipe={Organization:"organization",Workspace:"workspace",Project:"project"};});var Dpe,_6=n(()=>{Dpe={Short14D:"short_14d",Base60D:"base_60d",Extended400D:"extended_400d",Unlimited:"unlimited"};});var k6=n(()=>{});var A6=n(()=>{});var Upe,P6=n(()=>{Upe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var z6=n(()=>{});var Npe,S6=n(()=>{Npe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var v6=n(()=>{});var Fpe,T6=n(()=>{Fpe={GreaterThan:">",LessThan:"<",EqualTo:"="};});var j6=n(()=>{});var C6=n(()=>{});var E6=n(()=>{});var I6=n(()=>{});var D6=n(()=>{});var U6=n(()=>{});var N6=n(()=>{});var Bpe,F6=n(()=>{Bpe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Mpe,B6=n(()=>{Mpe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var M6=n(()=>{});var Wpe,W6=n(()=>{Wpe={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 V6=n(()=>{});var Vpe,L6=n(()=>{Vpe={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var G6=n(()=>{});var Lpe,J6=n(()=>{Lpe={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 H6=n(()=>{});var K6=n(()=>{});var Q6=n(()=>{});var O6=n(()=>{});var $6=n(()=>{});var Gpe,Y6=n(()=>{Gpe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Jpe,X6=n(()=>{Jpe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var Hpe,Z6=n(()=>{Hpe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var q6=n(()=>{});exports.OpikSpanType=void 0;var oy=n(()=>{exports.OpikSpanType={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var e2=n(()=>{});var Kpe,r2=n(()=>{Kpe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var Qpe,t2=n(()=>{Qpe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var o2=n(()=>{});var i2=n(()=>{});var a2=n(()=>{});var n2=n(()=>{});var Ope,s2=n(()=>{Ope={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var $pe,p2=n(()=>{$pe={General:"general",Tool:"tool",Llm:"llm",Guardrail:"guardrail"};});var c2=n(()=>{});var l2=n(()=>{});var m2=n(()=>{});var d2=n(()=>{});var u2=n(()=>{});var g2=n(()=>{});var f2=n(()=>{});var h2=n(()=>{});var y2=n(()=>{});var b2=n(()=>{});var R2=n(()=>{});var x2=n(()=>{});var w2=n(()=>{});var _2=n(()=>{});var k2=n(()=>{});var A2=n(()=>{});var P2=n(()=>{});var z2=n(()=>{});var S2=n(()=>{});var v2=n(()=>{});var T2=n(()=>{});var j2=n(()=>{});var C2=n(()=>{});var E2=n(()=>{});var Ype,I2=n(()=>{Ype={Function:"function"};});var D2=n(()=>{});var Xpe,U2=n(()=>{Xpe={EffortNoneOnly:"effortNoneOnly",Refused:"refused"};});var Zpe,N2=n(()=>{Zpe={Function:"function"};});var F2=n(()=>{});var B2=n(()=>{});var M2=n(()=>{});var W2=n(()=>{});var V2=n(()=>{});var L2=n(()=>{});var qpe,G2=n(()=>{qpe={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var J2=n(()=>{});var ece,H2=n(()=>{ece={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 K2=n(()=>{});var rce,Q2=n(()=>{rce={Contains:"contains",NotContains:"not_contains",StartsWith:"starts_with",EndsWith:"ends_with",EqualTo:"=",NotEquals:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",IsEmpty:"is_empty",IsNotEmpty:"is_not_empty",In:"in",NotIn:"not_in"};});var O2=n(()=>{});var tce,$2=n(()=>{tce={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 Y2=n(()=>{});var X2=n(()=>{});var oce,Z2=n(()=>{oce={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var ice,q2=n(()=>{ice={Default:"default",Hidden:"hidden"};});var ace,eY=n(()=>{ace={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var rY=n(()=>{});var tY=n(()=>{});var nce,oY=n(()=>{nce={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 iY=n(()=>{});var sce,aY=n(()=>{sce={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 nY=n(()=>{});var pce,sY=n(()=>{pce={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 pY=n(()=>{});var cY=n(()=>{});var lY=n(()=>{});var mY=n(()=>{});var dY=n(()=>{});var cce,uY=n(()=>{cce={Active:"active",Inactive:"inactive"};});var gY=n(()=>{});var fY=n(()=>{});var hY=n(()=>{});var yY=n(()=>{});var bY=n(()=>{});var lce,RY=n(()=>{lce={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var mce,xY=n(()=>{mce={Default:"default",Hidden:"hidden"};});var wY=n(()=>{});var dce,_Y=n(()=>{dce={Sdk:"sdk",Experiment:"experiment",Playground:"playground",Optimization:"optimization",Evaluator:"evaluator"};});var kY=n(()=>{});var AY=n(()=>{});var PY=n(()=>{});var zY=n(()=>{});var SY=n(()=>{});var vY=n(()=>{});var TY=n(()=>{});var jY=n(()=>{});var uce,CY=n(()=>{uce={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var EY=n(()=>{});var gce,IY=n(()=>{gce={Topic:"TOPIC",Pii:"PII",LlmJudge:"LLM_JUDGE",PromptInjection:"PROMPT_INJECTION",CustomClassifier:"CUSTOM_CLASSIFIER"};});var DY=n(()=>{});var UY=n(()=>{});var fce,NY=n(()=>{fce={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var FY=n(()=>{});var hce,BY=n(()=>{hce={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var MY=n(()=>{});var yce,WY=n(()=>{yce={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var bce,VY=n(()=>{bce={Ui:"ui",Sdk:"sdk",OnlineScoring:"online_scoring"};});var LY=n(()=>{});var GY=n(()=>{});var JY=n(()=>{});var HY=n(()=>{});var Rce,KY=n(()=>{Rce={Widget:"widget"};});var QY=n(()=>{});var xce,OY=n(()=>{xce={Query:"query"};});var $Y=n(()=>{});var wce,YY=n(()=>{wce={User:"user",Ollie:"ollie",Agent:"agent"};});var XY=n(()=>{});var ZY=n(()=>{});var _ce,qY=n(()=>{_ce={User:"user",Ollie:"ollie",Agent:"agent"};});var kce,e9=n(()=>{kce={Html:"html"};});var r9=n(()=>{});var t9=n(()=>{});var o9=n(()=>{});var i9=n(()=>{});var Ace,a9=n(()=>{Ace={Success:"success",Failure:"failure"};});var n9=n(()=>{});var s9=n(()=>{});var p9=n(()=>{});var c9=n(()=>{});var l9=n(()=>{});var m9=n(()=>{});var d9=n(()=>{});var u9=n(()=>{});var g9=n(()=>{});var f9=n(()=>{});var h9=n(()=>{});var y9=n(()=>{});var b9=n(()=>{});var R9=n(()=>{});var iy=n(()=>{fL();hL();yL();bL();RL();xL();wL();_L();kL();AL();PL();zL();SL();vL();TL();jL();CL();EL();IL();DL();UL();NL();FL();BL();ML();WL();VL();LL();GL();JL();HL();KL();QL();OL();$L();YL();XL();ZL();qL();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();CG();EG();IG();DG();UG();NG();FG();BG();MG();WG();VG();LG();GG();JG();HG();KG();QG();OG();$G();YG();XG();ZG();qG();eJ();rJ();tJ();oJ();iJ();aJ();nJ();sJ();pJ();cJ();lJ();mJ();dJ();uJ();gJ();fJ();hJ();yJ();bJ();RJ();xJ();wJ();_J();kJ();AJ();PJ();zJ();SJ();vJ();TJ();jJ();CJ();EJ();IJ();DJ();UJ();NJ();FJ();BJ();MJ();WJ();VJ();LJ();GJ();JJ();HJ();KJ();QJ();OJ();$J();YJ();XJ();ZJ();qJ();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();C1();E1();I1();D1();U1();N1();F1();B1();M1();W1();V1();L1();G1();J1();H1();K1();Q1();O1();$1();Y1();X1();Z1();q1();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();CH();EH();IH();DH();UH();NH();FH();BH();MH();WH();VH();LH();GH();JH();HH();KH();QH();OH();$H();YH();XH();ZH();qH();eK();rK();tK();oK();iK();aK();nK();sK();pK();cK();lK();mK();dK();Yh();uK();gK();Zh();fK();hK();yK();bK();RK();xK();wK();_K();kK();AK();PK();zK();SK();vK();TK();jK();CK();EK();IK();DK();UK();NK();FK();BK();MK();WK();VK();LK();GK();JK();HK();KK();QK();OK();$K();YK();XK();ZK();qK();eQ();rQ();tQ();oQ();iQ();aQ();nQ();sQ();pQ();cQ();lQ();mQ();dQ();uQ();gQ();fQ();ry();hQ();yQ();bQ();RQ();xQ();wQ();_Q();kQ();AQ();PQ();zQ();SQ();vQ();TQ();jQ();CQ();EQ();IQ();DQ();UQ();NQ();FQ();BQ();MQ();WQ();VQ();LQ();GQ();JQ();HQ();KQ();QQ();OQ();$Q();YQ();XQ();ZQ();qQ();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();CO();EO();IO();DO();UO();NO();FO();BO();MO();WO();VO();LO();GO();JO();HO();KO();QO();OO();$O();YO();XO();ZO();qO();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$();C$();E$();I$();D$();U$();N$();F$();B$();M$();W$();V$();L$();G$();J$();H$();K$();Q$();O$();$$();Y$();ty();X$();Z$();q$();e4();r4();t4();o4();i4();a4();n4();s4();p4();c4();l4();m4();d4();u4();g4();f4();h4();y4();b4();R4();x4();w4();_4();k4();A4();P4();z4();S4();v4();T4();j4();C4();E4();I4();D4();U4();N4();F4();B4();M4();W4();V4();L4();G4();J4();H4();K4();Q4();O4();$4();Y4();X4();Z4();q4();e6();r6();t6();o6();i6();a6();n6();s6();p6();c6();l6();m6();d6();u6();g6();f6();h6();y6();b6();R6();x6();w6();_6();k6();A6();P6();z6();S6();v6();T6();j6();C6();E6();I6();D6();U6();N6();F6();B6();M6();W6();V6();L6();G6();J6();H6();K6();Q6();O6();$6();Y6();X6();Z6();q6();oy();e2();r2();t2();o2();i2();a2();n2();s2();p2();c2();l2();m2();d2();u2();g2();f2();h2();y2();b2();R2();x2();w2();_2();k2();A2();P2();z2();S2();v2();T2();j2();C2();E2();I2();D2();U2();N2();F2();B2();M2();W2();V2();L2();G2();J2();H2();K2();Q2();O2();$2();Y2();X2();Z2();q2();eY();rY();tY();oY();iY();aY();nY();sY();pY();cY();lY();mY();dY();uY();gY();fY();hY();yY();bY();RY();xY();wY();_Y();kY();AY();PY();zY();SY();vY();TY();jY();CY();EY();IY();DY();UY();NY();FY();BY();MY();WY();VY();LY();GY();JY();HY();KY();QY();OY();$Y();YY();XY();ZY();qY();e9();r9();t9();o9();i9();a9();n9();s9();p9();c9();l9();m9();d9();u9();g9();f9();h9();y9();b9();R9();});var ie={};L(ie,{AgentBlueprintHistoryType:()=>Yae,AgentBlueprintPublicType:()=>Xae,AgentBlueprintWriteType:()=>ki,AgentConfigValueHistoryType:()=>Zae,AgentConfigValuePublicType:()=>qae,AgentConfigValueWriteType:()=>ene,AgentInsightsIssueSeverity:()=>rne,AgentInsightsIssueStatus:()=>tne,AgentInsightsIssueUpdateStatus:()=>MM,AgentInsightsIssueWithDetailsSeverity:()=>one,AgentInsightsIssueWithDetailsStatus:()=>ine,AgentInsightsJobStatus:()=>ane,AgentInsightsJobUpdateStatus:()=>$M,AlertAlertType:()=>nne,AlertPublicAlertType:()=>sne,AlertTriggerConfigPublicType:()=>pne,AlertTriggerConfigType:()=>cne,AlertTriggerConfigWriteType:()=>lne,AlertTriggerEventType:()=>mne,AlertTriggerPublicEventType:()=>dne,AlertTriggerWriteEventType:()=>une,AlertWriteAlertType:()=>gne,AnnotationQueueItemPublicSource:()=>fne,AnnotationQueuePublicScope:()=>hne,AnnotationQueueScope:()=>yne,AnnotationQueueWriteScope:()=>bne,AssertionResultBatchEntityType:()=>sW,AssertionResultBatchItemSource:()=>Rne,AssertionResultBatchItemStatus:()=>xne,AssistantMessageRole:()=>wne,AttachmentListRequestEntityType:()=>mW,AttemptStatus:()=>_ne,AutomationRuleEvaluatorAction:()=>kne,AutomationRuleEvaluatorObjectObjectPublicAction:()=>Ane,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>Pne,AutomationRuleEvaluatorPublicAction:()=>zne,AutomationRuleEvaluatorPublicTriggerScope:()=>Sne,AutomationRuleEvaluatorTriggerScope:()=>vne,AutomationRuleEvaluatorUpdateAction:()=>Tne,AutomationRuleEvaluatorUpdateTriggerScope:()=>jne,AutomationRuleEvaluatorWriteAction:()=>Cne,AutomationRuleEvaluatorWriteTriggerScope:()=>Ene,BadGatewayError:()=>_i,BadRequestError:()=>N,BreakdownConfigField:()=>Ine,BreakdownConfigPublicField:()=>Dne,BridgeCommandItemType:()=>Une,BridgeCommandResultRequestStatus:()=>u0,BridgeCommandStatus:()=>Nne,BridgeCommandSubmitRequestType:()=>f0,BridgeCommandType:()=>Fne,CheckName:()=>Bne,CheckPublicName:()=>Mne,CheckPublicResult:()=>Wne,CheckResult:()=>Vne,ColumnCompareTypesItem:()=>Lne,ColumnPublicTypesItem:()=>Gne,ColumnTypesItem:()=>Jne,CompleteMultipartUploadRequestEntityType:()=>Hne,ConflictError:()=>Q,CreateDatasetItemsFromJsonRequestFormat:()=>CW,CreatePromptVersionDetailTemplateStructure:()=>HV,CreateSessionRequestType:()=>TV,DashboardPublicScope:()=>Kne,DashboardPublicType:()=>Qne,DashboardUpdatePublicType:()=>One,DashboardWriteType:()=>$ne,DatasetExportJobPublicStatus:()=>Yne,DatasetItemCompareSource:()=>Xne,DatasetItemFilterOperator:()=>Zne,DatasetItemPublicSource:()=>qne,DatasetItemSource:()=>ese,DatasetItemWriteSource:()=>Qh,DatasetPublicStatus:()=>rse,DatasetPublicType:()=>Oh,DatasetPublicVisibility:()=>tse,DatasetStatus:()=>ose,DatasetType:()=>ise,DatasetUpdateVisibility:()=>IW,DatasetVisibility:()=>ase,DatasetWriteType:()=>sc,DatasetWriteVisibility:()=>UW,DeleteAttachmentsRequestEntityType:()=>nse,DownloadAttachmentRequestEntityType:()=>uW,EvaluatorItemCompareType:()=>sse,EvaluatorItemPublicType:()=>$h,EvaluatorItemType:()=>pse,EvaluatorItemWriteType:()=>Xh,ExperimentEvaluationMethod:()=>cse,ExperimentItemCompareStatus:()=>lse,ExperimentItemCompareTraceVisibilityMode:()=>mse,ExperimentItemPublicTraceVisibilityMode:()=>dse,ExperimentItemStatus:()=>use,ExperimentItemTraceVisibilityMode:()=>gse,ExperimentPublicEvaluationMethod:()=>fse,ExperimentPublicStatus:()=>hse,ExperimentPublicType:()=>yse,ExperimentRunSummaryCompareStatus:()=>bse,ExperimentRunSummaryPublicStatus:()=>Rse,ExperimentRunSummaryStatus:()=>xse,ExperimentStatus:()=>wse,ExperimentType:()=>qh,ExperimentUpdateStatus:()=>_se,ExperimentUpdateType:()=>kse,ExperimentWriteEvaluationMethod:()=>cc,ExperimentWriteStatus:()=>VW,ExperimentWriteType:()=>GW,FeedbackScoreBatchItemSource:()=>ey,FeedbackScoreBatchItemThreadSource:()=>Ase,FeedbackScoreCompareSource:()=>Pse,FeedbackScoreExperimentItemBulkWriteViewSource:()=>zse,FeedbackScorePublicSource:()=>Sse,FeedbackScoreSource:()=>vse,FindAgentInsightsIssuesRequestSeverity:()=>VM,FindAgentInsightsIssuesRequestStatus:()=>GM,FindFeedbackDefinitionsRequestType:()=>QW,FindFeedbackScoreNames1RequestType:()=>P0,FindGuardrailModelsRequestLatestRunStatus:()=>XW,FindGuardrailPoliciesRequestExecutionScope:()=>rV,FindReportFailuresRequestType:()=>r0,ForbiddenError:()=>te,GetSpanStatsRequestType:()=>S0,GetSpansByProjectRequestType:()=>T0,GetWebhookExamplesRequestAlertType:()=>qM,GoneError:()=>gt,GuardrailName:()=>Tse,GuardrailPolicyExecutionScope:()=>jse,GuardrailPolicyPublicExecutionScope:()=>Cse,GuardrailPolicyRulePublicType:()=>Ese,GuardrailPolicyRuleType:()=>Ise,GuardrailPolicyRuleWriteType:()=>Dse,GuardrailPolicyWriteExecutionScope:()=>Use,GuardrailResult:()=>Nse,GuardrailTrainingRunStatus:()=>Fse,GuardrailWriteName:()=>Bse,GuardrailWriteResult:()=>Mse,InternalServerError:()=>ft,KpiCardRequestEntityType:()=>IV,KpiMetricType:()=>Wse,ListRunnersRequestStatus:()=>y0,LlmAsJudgeMessagePublicRole:()=>Vse,LlmAsJudgeMessageRole:()=>Lse,LlmAsJudgeMessageWriteRole:()=>Gse,LlmAsJudgeModelParametersApi:()=>Jse,LlmAsJudgeModelParametersPublicApi:()=>Hse,LlmAsJudgeModelParametersWriteApi:()=>Kse,LlmAsJudgeOutputSchemaPublicType:()=>Qse,LlmAsJudgeOutputSchemaType:()=>Ose,LlmAsJudgeOutputSchemaWriteType:()=>$se,LocalRunnerJobResultRequestStatus:()=>R0,LocalRunnerJobStatus:()=>Yse,LocalRunnerStatus:()=>Xse,LocalRunnerType:()=>Zse,LogItemLevel:()=>qse,ManualEvaluationRequestEntityType:()=>epe,NotFoundError:()=>U,NotImplementedError:()=>Re,OllieReportStatus:()=>rpe,OptimizationPublicStatus:()=>tpe,OptimizationStatus:()=>ope,OptimizationUpdateStatus:()=>PV,OptimizationWriteStatus:()=>ipe,ParamPresence:()=>lo,ProjectDetailedVisibility:()=>ape,ProjectMetricRequestPublicInterval:()=>UV,ProjectMetricRequestPublicMetricType:()=>FV,ProjectMetricResponsePublicInterval:()=>npe,ProjectMetricResponsePublicMetricType:()=>spe,ProjectPublicVisibility:()=>ppe,ProjectTopicsStatus:()=>cpe,ProjectUpdateVisibility:()=>MV,ProjectVisibility:()=>lpe,ProjectWriteVisibility:()=>VV,PromptDetailTemplateStructure:()=>mpe,PromptPublicTemplateStructure:()=>dpe,PromptTemplateStructure:()=>upe,PromptType:()=>gpe,PromptVersionDetailTemplateStructure:()=>fpe,PromptVersionDetailType:()=>hpe,PromptVersionDetailVersionType:()=>ype,PromptVersionPublicTemplateStructure:()=>bpe,PromptVersionPublicType:()=>Rpe,PromptVersionPublicVersionType:()=>xpe,PromptVersionTemplateStructure:()=>wpe,PromptVersionType:()=>_pe,PromptVersionVersionType:()=>kpe,PromptWriteTemplateStructure:()=>QV,PromptWriteType:()=>$V,ProviderApiKeyProvider:()=>Ape,ProviderApiKeyPublicProvider:()=>Ppe,ProviderApiKeyWriteProvider:()=>mV,ProviderAuthConfigPublicSendAs:()=>zpe,ProviderAuthConfigSendAs:()=>Spe,ProviderAuthConfigWriteSendAs:()=>vpe,RecentActivityItemPublicType:()=>Tpe,ReportCompleteRequestStatus:()=>a0,ReportFailureType:()=>Cpe,ReportedIssueSeverity:()=>jpe,ResponseFormatType:()=>Epe,RetentionRulePublicLevel:()=>Ipe,RetentionRulePublicRetention:()=>Dpe,RetentionRuleWriteRetention:()=>c0,ScoreConditionOperator:()=>Upe,ScoreConditionPublicOperator:()=>Npe,ScoreConditionWriteOperator:()=>Fpe,ServiceUnavailableError:()=>ge,SpanExperimentItemBulkWriteViewSource:()=>Bpe,SpanExperimentItemBulkWriteViewType:()=>Mpe,SpanFilterOperator:()=>Wpe,SpanFilterPublicOperator:()=>Vpe,SpanFilterWriteOperator:()=>Lpe,SpanPublicSource:()=>Gpe,SpanPublicType:()=>Jpe,SpanSearchStreamRequestPublicExcludeItem:()=>C0,SpanSearchStreamRequestPublicType:()=>I0,SpanSource:()=>Hpe,SpanType:()=>exports.OpikSpanType,SpanUpdateSource:()=>Kpe,SpanUpdateType:()=>Qpe,SpanWriteSource:()=>Ope,SpanWriteType:()=>$pe,StartMultipartUploadRequestEntityType:()=>fW,TooManyRequestsError:()=>de,ToolCallType:()=>Ype,ToolType:()=>Zpe,ToolsParamChatCompletions:()=>Xpe,TraceExperimentItemBulkWriteViewSource:()=>qpe,TraceFilterOperator:()=>ece,TraceFilterPublicOperator:()=>rce,TraceFilterWriteOperator:()=>tce,TracePublicSource:()=>oce,TracePublicVisibilityMode:()=>ice,TraceSearchStreamRequestPublicExcludeItem:()=>G0,TraceSource:()=>ace,TraceThreadFilterOperator:()=>nce,TraceThreadFilterPublicOperator:()=>sce,TraceThreadFilterWriteOperator:()=>pce,TraceThreadStatus:()=>cce,TraceUpdateSource:()=>lce,TraceVisibilityMode:()=>mce,TraceWriteSource:()=>dce,UnauthorizedError:()=>O,UnprocessableEntityError:()=>K,UploadAttachmentRequestEntityType:()=>yW,ValidationDescriptorType:()=>uce,ValidationResultType:()=>gce,ValueEntryCompareSource:()=>fce,ValueEntryExperimentItemBulkWriteViewSource:()=>hce,ValueEntryPublicSource:()=>yce,ValueEntrySource:()=>bce,ViewArea:()=>Rce,ViewCreateArea:()=>Q0,ViewCreateAuthor:()=>$0,ViewCreateType:()=>X0,ViewInputKind:()=>xce,ViewVersionAuthor:()=>wce,ViewVersionCreateAuthor:()=>q0,ViewVersionCreateType:()=>rL,ViewVersionSummaryAuthor:()=>_ce,ViewVersionType:()=>kce,WebhookTestResultStatus:()=>Ace,WorkspaceSpanMetricRequestInterval:()=>cL,WorkspaceSpanMetricRequestMetricType:()=>mL,agentConfigs:()=>uf,agentInsights:()=>tc,agentInsightsEnrollment:()=>yf,agentInsightsJobs:()=>oc,alerts:()=>ic,analyticsQueries:()=>_f,annotationQueues:()=>Af,assertionResults:()=>ac,attachments:()=>nc,automationRuleEvaluators:()=>jf,chatCompletions:()=>Ef,check:()=>If,dashboardSavedQueries:()=>Uf,dashboards:()=>Ff,datasets:()=>pc,environments:()=>Lf,experiments:()=>lc,feedbackDefinitions:()=>mc,guardrailModels:()=>dc,guardrailPolicies:()=>uc,guardrails:()=>qf,insightsViews:()=>rh,llmModels:()=>th,llmProviderKey:()=>gc,manualEvaluation:()=>ah,mcpOAuth:()=>sh,ollama:()=>ph,ollieState:()=>ch,openTelemetryIngestion:()=>lh,optimizations:()=>fc,pairing:()=>hc,projects:()=>yc,prompts:()=>bc,redirect:()=>xh,reportFailures:()=>Rc,reports:()=>xc,retentionRules:()=>wc,runners:()=>_c,serviceToggles:()=>Th,spans:()=>kc,systemAnalyticsQueries:()=>Ih,systemUsage:()=>Uh,topics:()=>Fh,traces:()=>Ac,views:()=>Pc,welcomeWizard:()=>Gh,workspacePermissions:()=>Jh,workspaces:()=>zc});var q=n(()=>{UM();gL();iy();});function z(...p){let o={};for(let[r,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=r.toLowerCase();t!=null?o[i]=t:i in o&&delete o[i];}return o}function T(...p){let o={};for(let[r,t]of p.filter(i=>i!=null).flatMap(i=>Object.entries(i))){let i=r.toLowerCase();t!=null&&(o[i]=t);}return o}var $=n(()=>{});var ay,ny=n(()=>{ay={get:async(p,o)=>typeof p=="function"?p(o):p};});function sy(p){return p==null?Pce:p instanceof mo?p:(p=p!=null?p:{},(p.level)!=null||(p.level=Ke.Info),(p.logger)!=null||(p.logger=new ht),(p.silent)!=null||(p.silent=true),new mo(p))}var Ke,x9,ht,mo,Pce,Sc=n(()=>{Ke={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},x9={[Ke.Debug]:1,[Ke.Info]:2,[Ke.Warn]:3,[Ke.Error]:4},ht=class{debug(o,...r){console.debug(o,...r);}info(o,...r){console.info(o,...r);}warn(o,...r){console.warn(o,...r);}error(o,...r){console.error(o,...r);}},mo=class{constructor(o){this.level=x9[o.level],this.logger=o.logger,this.silent=o.silent;}shouldLog(o){return !this.silent&&this.level<=x9[o]}isDebug(){return this.shouldLog(Ke.Debug)}debug(o,...r){this.isDebug()&&this.logger.debug(o,...r);}isInfo(){return this.shouldLog(Ke.Info)}info(o,...r){this.isInfo()&&this.logger.info(o,...r);}isWarn(){return this.shouldLog(Ke.Warn)}warn(o,...r){this.isWarn()&&this.logger.warn(o,...r);}isError(){return this.shouldLog(Ke.Error)}error(o,...r){this.isError()&&this.logger.error(o,...r);}};Pce=new mo({level:Ke.Info,logger:new ht,silent:true});});function w9(p,o){if(p===void 0||p===null)return "";let r=String(p);return o?encodeURIComponent(r):r}function py(p,o="",r){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=r.arrayFormat==="indices"?`${s}[${c}]`:s;t.push(...py(l,m,r));}else {let m=r.arrayFormat==="indices"?`${s}[${c}]`:s,u=r.encode?encodeURIComponent(m):m;t.push(`${u}=${w9(l,r.encode)}`);}}}else if(typeof a=="object"&&a!==null){if(Object.keys(a).length===0)continue;t.push(...py(a,s,r));}else {let c=r.encode?encodeURIComponent(s):s;t.push(`${c}=${w9(a,r.encode)}`);}}return t}function yt(p,o){return p==null||typeof p!="object"?"":py(p,"",{...Sce,...o}).join("&")}var Sce,Ai=n(()=>{Sce={arrayFormat:"indices",encode:true};});function _9(p,o){let r=yt(o,{arrayFormat:"repeat"});return r?`${p}?${r}`:p}var k9=n(()=>{Ai();});function A9(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 P9=n(()=>{});async function vc(p,o){switch(o){case "binary-response":return A9(p);case "blob":return await p.blob();case "arrayBuffer":return await p.arrayBuffer();case "sse":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "streaming":return p.body==null?{ok:false,error:{reason:"body-is-null",statusCode:p.status}}:p.body;case "text":return await p.text()}let r=await p.text();if(r.length>0)try{return wi(r)}catch{return {ok:false,error:{reason:"non-json",statusCode:p.status,rawBody:r}}}}var cy=n(()=>{kr();P9();});async function z9(p){var r,t,i;let o=(r=p.headers.get("Content-Type"))==null?void 0:r.toLowerCase();if(o==null||o.length===0)return vc(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?wi(a):void 0}default:if(o.startsWith("application/vnd.")&&o.endsWith("+json")){let a=await p.text();return a.length>0?wi(a):void 0}return await p.text()}}var S9=n(()=>{kr();cy();});async function v9(){return fetch}var T9=n(()=>{});async function j9({body:p,type:o}){return o==="form"?yt(p,{arrayFormat:"repeat",encode:true}):o.includes("json")?Te(p):p}var C9=n(()=>{kr();Ai();});var Hr,ly=n(()=>{typeof globalThis.Headers!="undefined"?Hr=globalThis.Headers:Hr=class E9{constructor(o){if(this.headers=new Map,o)if(o instanceof E9)o.forEach((r,t)=>this.append(t,r));else if(Array.isArray(o))for(let[r,t]of o)if(typeof r=="string"&&typeof t=="string")this.append(r,t);else throw new TypeError("Each header entry must be a [string, string] tuple");else for(let[r,t]of Object.entries(o))if(typeof t=="string")this.append(r,t);else throw new TypeError("Header values must be strings")}append(o,r){let t=o.toLowerCase(),i=this.headers.get(t)||[];this.headers.set(t,[...i,r]);}delete(o){let r=o.toLowerCase();this.headers.delete(r);}get(o){let r=o.toLowerCase(),t=this.headers.get(r);return t?t.join(", "):null}has(o){let r=o.toLowerCase();return this.headers.has(r)}set(o,r){let t=o.toLowerCase();this.headers.set(t,[r]);}forEach(o,r){let t=r?o.bind(r):o;this.headers.forEach((i,a)=>t(i.join(", "),a,this));}getSetCookie(){return this.headers.get("set-cookie")||[]}*entries(){for(let[o,r]of this.headers.entries())yield [o,r.join(", ")];}*keys(){yield*this.headers.keys();}*values(){for(let o of this.headers.values())yield o.join(", ");}[Symbol.iterator](){return this.entries()}};});function I9(p){let o=new AbortController,r=setTimeout(()=>o.abort(vce),p);return {signal:o.signal,abortId:r}}function D9(...p){let o=p.length===1&&Array.isArray(p[0])?p[0]:p,r=new AbortController;for(let t of o){if(t.aborted){r.abort(t==null?void 0:t.reason);break}t.addEventListener("abort",()=>r.abort(t==null?void 0:t.reason),{signal:r.signal});}return r.signal}var vce,U9=n(()=>{vce="timeout";});var N9,F9=n(()=>{U9();N9=async(p,o,r,t,i,a,s,c,l)=>{let m=[],u;if(a!=null){let{signal:g,abortId:h}=I9(a);u=h,m.push(g);}s!=null&&m.push(s);let d=D9(m),f=await p(o,{method:r,headers:t,body:i,signal:d,credentials:c?"include":void 0,duplex:l});return u!=null&&clearTimeout(u),f};});function Cc(p){return {headers:p.headers,redirected:p.redirected,status:p.status,statusText:p.statusText,type:p.type,url:p.url}}var Tc,jc,my=n(()=>{ly();Tc={headers:new Hr,redirected:false,status:499,statusText:"Client Closed Request",type:"error",url:""},jc={headers:new Hr,redirected:false,status:0,statusText:"Unknown Error",type:"error",url:""};});function Tce(p){let o=1+Math.random()*.2;return p*o}function jce(p){let o=1+(Math.random()-.5)*.2;return p*o}function Cce(p,o){let r=p.headers.get("Retry-After");if(r){let i=parseInt(r,10);if(!Number.isNaN(i)&&i>0)return Math.min(i*1e3,6e4);let a=new Date(r);if(!Number.isNaN(a.getTime())){let s=a.getTime()-Date.now();if(s>0)return Math.min(Math.max(s,0),6e4)}}let t=p.headers.get("X-RateLimit-Reset");if(t){let i=parseInt(t,10);if(!Number.isNaN(i)){let a=i*1e3-Date.now();if(a>0)return Tce(Math.min(a,6e4))}}return jce(Math.min(1e3*2**o,6e4))}async function B9(p,o=2){let r=await p();for(let t=0;t<o&&([408,429].includes(r.status)||r.status>=500);++t){let i=Cce(r,t);await new Promise(a=>setTimeout(a,i)),r=await p();}return r}var M9=n(()=>{});function dy(p){let o={};for(let[r,t]of p instanceof Hr?p.entries():Object.entries(p))Ece.has(r.toLowerCase())?o[r]="[REDACTED]":o[r]=t;return o}function Ice(p){if(p==null)return p;let o={};for(let[r,t]of Object.entries(p))uy.has(r.toLowerCase())?o[r]="[REDACTED]":o[r]=t;return o}function bt(p){let o=p.indexOf("://");if(o===-1)return p;let r=o+3,t=p.indexOf("/",r),i=p.indexOf("?",r),a=p.indexOf("#",r),s=Math.min(t===-1?p.length:t,i===-1?p.length:i,a===-1?p.length:a),c=-1;for(let h=r;h<s;h++)p[h]==="@"&&(c=h);if(c!==-1&&(p=`${p.slice(0,r)}[REDACTED]@${p.slice(c+1)}`),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=uy.has(w.toLowerCase());if(!A&&w.includes("%"))try{let C=decodeURIComponent(w);A=uy.has(C.toLowerCase());}catch{}f.push(A?`${w}=[REDACTED]`:h);}return p.slice(0,i+1)+f.join("&")+p.slice(l)}async function Dce(p){var r;let o=new Hr;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 ay.get(i,{endpointMetadata:(r=p.endpointMetadata)!=null?r:{}});if(typeof a=="string"){o.set(t,a);continue}a!=null&&o.set(t,`${a}`);}return o}async function Uce(p){var s,c,l;let o=_9(p.url,p.queryParameters),r=await j9({body:p.body,type:(s=p.requestType)!=null?s:"other"}),t=(c=p.fetchFn)!=null?c:await v9(),i=await Dce(p),a=sy(p.logging);if(a.isDebug()){let m={method:p.method,url:bt(o),headers:dy(i),queryParameters:Ice(p.queryParameters),hasBody:r!=null};a.debug("Making HTTP request",m);}try{let m=await B9(async()=>N9(t,o,p.method,i,r,p.timeoutMs,p.abortSignal,p.withCredentials,p.duplex),p.maxRetries);if(m.status>=200&&m.status<400){if(a.isDebug()){let d={method:p.method,url:bt(o),statusCode:m.status,responseHeaders:dy(m.headers)};a.debug("HTTP request succeeded",d);}return {ok:!0,body:await vc(m,p.responseType),headers:m.headers,rawResponse:Cc(m)}}else {if(a.isError()){let u={method:p.method,url:bt(o),statusCode:m.status,responseHeaders:dy(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 z9(m)},rawResponse:Cc(m)}}}catch(m){if((l=p.abortSignal)!=null&&l.aborted){if(a.isError()){let u={method:p.method,url:bt(o)};a.error("HTTP request was aborted",u);}return {ok:false,error:{reason:"unknown",errorMessage:"The user aborted a request"},rawResponse:Tc}}else if(m instanceof Error&&m.name==="AbortError"){if(a.isError()){let u={method:p.method,url:bt(o),timeoutMs:p.timeoutMs};a.error("HTTP request timed out",u);}return {ok:false,error:{reason:"timeout"},rawResponse:Tc}}else if(m instanceof Error){if(a.isError()){let u={method:p.method,url:bt(o),errorMessage:m.message};a.error("HTTP request failed with error",u);}return {ok:false,error:{reason:"unknown",errorMessage:m.message},rawResponse:jc}}if(a.isError()){let u={method:p.method,url:bt(o),error:Te(m)};a.error("HTTP request failed with unknown error",u);}return {ok:false,error:{reason:"unknown",errorMessage:Te(m)},rawResponse:jc}}}var Ece,uy,S,W9=n(()=>{kr();Sc();k9();ny();S9();T9();C9();cy();ly();F9();my();M9();Ece=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"]);uy=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=Uce;});var V9=n(()=>{});var P,L9=n(()=>{P=class p extends Promise{constructor(o){super(r=>{r(void 0);}),this.innerPromise=o;}static fromFunction(o,...r){return new p(o(...r))}static interceptFunction(o){return (...r)=>p.fromPromise(o(...r))}static fromPromise(o){return new p(o)}static fromExecutor(o){let r=new Promise(o);return new p(r)}static fromResult(o){let r=Promise.resolve(o);return new p(r)}unwrap(){return this.unwrappedPromise||(this.unwrappedPromise=this.innerPromise.then(({data:o})=>o)),this.unwrappedPromise}then(o,r){return this.unwrap().then(o,r)}catch(o){return this.unwrap().catch(o)}finally(o){return this.unwrap().finally(o)}async withRawResponse(){return await this.innerPromise}};});var x,G9=n(()=>{x={get:async p=>typeof p=="function"?p():p};});var J9=n(()=>{ny();W9();V9();L9();my();G9();});async function Nce(p){let{data:o,filename:r,contentLength:t,contentType:i}=await fy(p),a={body:o,headers:{}};return r&&(a.headers["Content-Disposition"]=`attachment; filename="${r}"`),i&&(a.headers["Content-Type"]=i),t!=null&&(a.headers["Content-Length"]=t.toString()),a}async function gy(p){let{data:o,filename:r,contentType:t}=await fy(p,{noSniffFileSize:true});return {data:o,filename:r,contentType:t}}async function fy(p,{noSniffFileSize:o}={}){var r,t,i,a,s;if(Fce(p))return fy({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=(r=p.contentLength)!=null?r:o===true?void 0:await H9(p.path),u=(t=p.filename)!=null?t:K9(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 Mce(c,{noSniffFileSize:o}),m=(a=p.filename)!=null?a:Bce(c);return {data:c,filename:m,contentType:(s=p.contentType)!=null?s:Wce(c),contentLength:l}}throw new Error(`Invalid FileUpload of type ${typeof p}: ${JSON.stringify(p)}`)}function Fce(p){return O9(p)||$9(p)||Y9(p)||Jce(p)||hy(p)||yy(p)||Lce(p)||Gce(p)}async function H9(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 Bce(p){if(Vce(p))return p.name;if(Q9(p))return K9(p.path.toString())}async function Mce(p,{noSniffFileSize:o}={}){if(O9(p))return p.length;if($9(p)||Y9(p))return p.byteLength;if(hy(p)||yy(p))return p.size;if(o!==true&&Q9(p))return await H9(p.path.toString())}function Wce(p){if(hy(p)||yy(p))return p.type}function K9(p){let o=p.lastIndexOf("/"),r=p.lastIndexOf("\\"),t=Math.max(o,r);return t>=0?p.substring(t+1):p}function Vce(p){return typeof p=="object"&&p!=null&&"name"in p}function Q9(p){return typeof p=="object"&&p!=null&&"path"in p}function Lce(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function Gce(p){return typeof p=="object"&&p!=null&&"getReader"in p}function O9(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function $9(p){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView(p)}function Y9(p){return typeof ArrayBuffer!="undefined"&&p instanceof ArrayBuffer}function Jce(p){return typeof Uint8Array!="undefined"&&p instanceof Uint8Array}function hy(p){return typeof Blob!="undefined"&&p instanceof Blob}function yy(p){return typeof File!="undefined"&&p instanceof File}var X9=n(()=>{});var Z9=n(()=>{});var Pi={};L(Pi,{toBinaryUploadRequest:()=>Nce,toMultipartDataPart:()=>gy});var by=n(()=>{X9();Z9();});var q9=n(()=>{Ai();});function Hce(){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 uo,e3=n(()=>{uo=Hce();});var Ry=n(()=>{e3();});async function go(){return new xy}function Kce(p){return typeof p=="object"&&p!=null&&("read"in p||"pipe"in p)}function r3(p){return typeof p=="object"&&p!=null&&"getReader"in p}function Qce(p){return typeof Buffer!="undefined"&&Buffer.isBuffer&&Buffer.isBuffer(p)}function Oce(p){return ArrayBuffer.isView(p)}async function $ce(p){if(uo.type==="node"){let{Readable:o}=await import('stream');if(p instanceof o){let r=[];for await(let t of p)r.push(Buffer.isBuffer(t)?t:Buffer.from(t));return Buffer.concat(r)}}if(r3(p)){let o=p.getReader(),r=[];try{for(;;){let{done:s,value:c}=await o.read();if(s)break;r.push(c);}}finally{o.releaseLock();}let t=r.reduce((s,c)=>s+c.length,0),i=new Uint8Array(t),a=0;for(let s of r)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 Yce(p,o){if(Kce(p)||r3(p)){let r=await $ce(p);return new Blob([r],{type:o})}return p instanceof Blob?p:Qce(p)?new Blob([p],{type:o}):p instanceof ArrayBuffer?new Blob([p],{type:o}):Oce(p)?new Blob([p],{type:o}):typeof p=="string"?new Blob([p],{type:o}):typeof p=="object"&&p!==null?new Blob([Te(p)],{type:o!=null?o:"application/json"}):new Blob([String(p)],{type:o})}var xy,t3=n(()=>{by();kr();Ry();xy=class{constructor(){this.fd=new FormData;}async setup(){}append(o,r){this.fd.append(o,String(r));}async appendFile(o,r){let{data:t,filename:i,contentType:a}=await gy(r),s=await Yce(t,a);i?this.fd.append(o,s,i):this.fd.append(o,s);}getRequest(){return {body:this.fd,headers:{},duplex:"half"}}};});var o3=n(()=>{q9();t3();});var zi={};L(zi,{ConsoleLogger:()=>ht,LogLevel:()=>Ke,Logger:()=>mo,createLogger:()=>sy});var i3=n(()=>{Sc();});var ae,xe=n(()=>{ae={BIGINT:"bigint",DATE:"date",ENUM:"enum",LIST:"list",STRING_LITERAL:"stringLiteral",BOOLEAN_LITERAL:"booleanLiteral",OBJECT:"object",ANY:"any",BOOLEAN:"boolean",NUMBER:"number",STRING:"string",UNKNOWN:"unknown",NEVER:"never",RECORD:"record",SET:"set",UNION:"union",UNDISCRIMINATED_UNION:"undiscriminatedUnion",NULLABLE:"nullable",OPTIONAL:"optional",OPTIONAL_NULLABLE:"optionalNullable"};});function ce(p,o){return `Expected ${o}. Received ${Xce(p)}.`}function Xce(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 je=n(()=>{});function we(p){return {...p,json:a3(p.json),parse:a3(p.parse)}}function a3(p){return (o,r)=>{let t=p(o,r),{skipValidation:i=false}=r!=null?r:{};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
3
|
`)),{ok:true,value:o}):t}}var gr=n(()=>{});function Ec(p){return p.path.length===0?p.message:`${p.path.join(" -> ")}: ${p.message}`}var wy=n(()=>{});var fo,_y=n(()=>{wy();fo=class p extends Error{constructor(r){super(r.map(Ec).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});var ho,ky=n(()=>{wy();ho=class p extends Error{constructor(r){super(r.map(Ec).join("; "));this.errors=r;Object.setPrototypeOf(this,p.prototype);}};});function le(p){return {nullable:()=>Zce(p),optional:()=>Ay(p),optionalNullable:()=>qce(p),transform:o=>Py(p,o),parseOrThrow:(o,r)=>{let t=p.parse(o,r);if(t.ok)return t.value;throw new ho(t.errors)},jsonOrThrow:(o,r)=>{let t=p.json(o,r);if(t.ok)return t.value;throw new fo(t.errors)}}}function Zce(p){let o={parse:(r,t)=>r==null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r==null?{ok:true,value:null}:p.json(r,t),getType:()=>ae.NULLABLE};return {...o,...le(o)}}function Ay(p){let o={parse:(r,t)=>r==null?{ok:true,value:void 0}:p.parse(r,t),json:(r,t)=>t!=null&&t.omitUndefined&&r===void 0?{ok:true,value:void 0}:r==null?{ok:true,value:null}:p.json(r,t),getType:()=>ae.OPTIONAL};return {...o,...le(o)}}function qce(p){let o={parse:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.parse(r,t),json:(r,t)=>r===void 0?{ok:true,value:void 0}:r===null?{ok:true,value:null}:p.json(r,t),getType:()=>ae.OPTIONAL_NULLABLE};return {...o,...le(o)}}function Py(p,o){let r={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 {...r,...le(r)}}var n3=n(()=>{xe();_y();ky();});var Fe=n(()=>{n3();_y();ky();});function s3(){let p={parse:(o,{breadcrumbsPrefix:r=[]}={})=>typeof o=="bigint"?{ok:true,value:o}:typeof o=="number"?{ok:true,value:BigInt(o)}:{ok:false,errors:[{path:r,message:ce(o,"bigint | number")}]},json:(o,{breadcrumbsPrefix:r=[]}={})=>typeof o!="bigint"?{ok:false,errors:[{path:r,message:ce(o,"bigint")}]}:{ok:true,value:o},getType:()=>ae.BIGINT};return {...we(p),...le(p)}}var p3=n(()=>{xe();je();gr();Fe();});var c3=n(()=>{p3();});function l3(){let p={parse:(o,{breadcrumbsPrefix:r=[]}={})=>typeof o!="string"?{ok:false,errors:[{path:r,message:ce(o,"string")}]}:ele.test(o)?{ok:true,value:new Date(o)}:{ok:false,errors:[{path:r,message:ce(o,"ISO 8601 date string")}]},json:(o,{breadcrumbsPrefix:r=[]}={})=>o instanceof Date?{ok:true,value:o.toISOString()}:{ok:false,errors:[{path:r,message:ce(o,"Date object")}]},getType:()=>ae.DATE};return {...we(p),...le(p)}}var ele,m3=n(()=>{xe();je();gr();Fe();ele=/^([+-]?\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 d3=n(()=>{m3();});function _e(p,o){return ()=>{let r={parse:o,json:o,getType:()=>p};return {...we(r),...le(r)}}}var fr=n(()=>{Fe();gr();});function Ic(p){let o=new Set(p);return _e(ae.ENUM,(t,{allowUnrecognizedEnumValues:i,breadcrumbsPrefix:a=[]}={})=>typeof t!="string"?{ok:false,errors:[{path:a,message:ce(t,"string")}]}:!o.has(t)&&!i?{ok:false,errors:[{path:a,message:ce(t,"enum")}]}:{ok:true,value:t})()}var u3=n(()=>{xe();fr();je();});var zy=n(()=>{u3();});function g3(p){let o=Sy(p);return {...o,...le(o)}}function Sy(p){return {parse:(o,r)=>yo(p).parse(o,r),json:(o,r)=>yo(p).json(o,r),getType:()=>yo(p).getType()}}function yo(p){let o=p;return o.__zurg_memoized==null&&(o.__zurg_memoized=p()),o.__zurg_memoized}var vy=n(()=>{Fe();});function Si(p){return Object.entries(p)}var Ty=n(()=>{});function vi(p,o){let r=new Set(o);return Object.entries(p).reduce((t,[i,a])=>(r.has(i)&&(t[i]=a),t),{})}var jy=n(()=>{});function Pr(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 Ti=n(()=>{});function ji(p){return Object.keys(p)}var Cy=n(()=>{});function f3(p,o){let r=[],t=[];for(let i of p)o(i)?r.push(i):t.push(i);return [r,t]}var h3=n(()=>{});function rr(p){return {withParsedProperties:o=>Ey(p,o)}}function Ey(p,o){let r={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(!Pr(t))return {ok:false,errors:[{path:(c=i==null?void 0:i.breadcrumbsPrefix)!=null?c:[],message:ce(t,"object")}]};let a=new Set(Object.keys(o)),s=vi(t,Object.keys(t).filter(l=>!a.has(l)));return p.json(s,i)},getType:()=>p.getType()};return {...r,...le(r),...rr(r)}}var y3=n(()=>{jy();je();Ti();Fe();});var Ci=n(()=>{y3();});function b3(p,o){return {rawKey:p,valueSchema:o,isProperty:true}}function Kr(p){return p.isProperty}var Iy=n(()=>{});function Dc(p){let o={_getRawProperties:()=>Object.entries(p).map(([r,t])=>Kr(t)?t.rawKey:r),_getParsedProperties:()=>ji(p),parse:(r,t)=>{let i={},a=[];for(let[s,c]of Si(p)){let l=Kr(c)?c.rawKey:s,m=Kr(c)?c.valueSchema:c,u={rawKey:l,parsedKey:s,valueSchema:m};i[l]=u,w3(m)&&a.push(l);}return R3({value:r,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:(r,t)=>{let i=[];for(let[a,s]of Si(p)){let c=Kr(s)?s.valueSchema:s;w3(c)&&i.push(a);}return R3({value:r,requiredKeys:i,getProperty:a=>{let s=p[a];if(s!=null)return Kr(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:()=>ae.OBJECT};return {...we(o),...le(o),...rr(o),...Rt(o)}}function R3({value:p,requiredKeys:o,getProperty:r,unrecognizedObjectKeys:t="fail",skipValidation:i=false,breadcrumbsPrefix:a=[]}){if(!Pr(p))return {ok:false,errors:[{path:a,message:ce(p,"object")}]};let s=new Set(o),c=[],l={};for(let[m,u]of Object.entries(p)){let d=r(m);if(d!=null){s.delete(m);let f=d.transform(u);f.ok?l[d.transformedKey]=f.value:(l[m]=u,c.push(...f.errors));}else switch(t){case "fail":c.push({path:[...a,m],message:`Unexpected key "${m}"`});break;case "strip":break;case "passthrough":l[m]=u;break}}return c.push(...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 Rt(p){return {extend:o=>{let r={_getParsedProperties:()=>[...p._getParsedProperties(),...o._getParsedProperties()],_getRawProperties:()=>[...p._getRawProperties(),...o._getRawProperties()],parse:(t,i)=>x3({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)=>x3({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:()=>ae.OBJECT};return {...r,...le(r),...rr(r),...Rt(r)}},passthrough:()=>{let o=new Set(p._getRawProperties()),r=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))r.has(l)||(c[l]=m);return {ok:true,value:{...c,...s.value}}},getType:()=>ae.OBJECT};return {...t,...le(t),...rr(t),...Rt(t)}}}}function x3({extensionKeys:p,value:o,transformBase:r,transformExtension:t,breadcrumbsPrefix:i=[]}){if(!Pr(o))return {ok:false,errors:[{path:i,message:ce(o,"object")}]};let a=new Set(p),[s,c]=f3(ji(o),u=>a.has(u)),l=r(vi(o,c)),m=t(vi(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 w3(p){return !rle(p)}function rle(p){switch(p.getType()){case ae.ANY:case ae.UNKNOWN:case ae.OPTIONAL:case ae.OPTIONAL_NULLABLE:return true;default:return false}}var Dy=n(()=>{xe();Ty();jy();je();Ti();Cy();gr();h3();Ci();Fe();Iy();});function _3(p){return Dc(p)}var k3=n(()=>{Dy();});var Uy=n(()=>{Dy();k3();Iy();});function A3(p){let o={...Sy(p),_getRawProperties:()=>yo(p)._getRawProperties(),_getParsedProperties:()=>yo(p)._getParsedProperties()};return {...o,...le(o),...rr(o),...Rt(o)}}var P3=n(()=>{Uy();Ci();Fe();vy();});var z3=n(()=>{vy();P3();});function Uc(p){let o={parse:(r,t)=>S3(r,(i,a)=>{var s;return p.parse(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),json:(r,t)=>S3(r,(i,a)=>{var s;return p.json(i,{...t,breadcrumbsPrefix:[...(s=t==null?void 0:t.breadcrumbsPrefix)!=null?s:[],`[${a}]`]})}),getType:()=>ae.LIST};return {...we(o),...le(o)}}function S3(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:ce(p,"list"),path:[]}]}}var v3=n(()=>{xe();je();gr();Fe();});var Ny=n(()=>{v3();});function T3(p){return _e(ae.BOOLEAN_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`${p.toString()}`)}]})()}var j3=n(()=>{xe();fr();je();});function C3(p){return _e(ae.STRING_LITERAL,(r,{breadcrumbsPrefix:t=[]}={})=>r===p?{ok:true,value:p}:{ok:false,errors:[{path:t,message:ce(r,`"${p}"`)}]})()}var E3=n(()=>{xe();fr();je();});var I3=n(()=>{j3();E3();});var D3,U3=n(()=>{xe();fr();D3=_e(ae.ANY,p=>({ok:true,value:p}));});var N3,F3=n(()=>{xe();fr();je();N3=_e(ae.BOOLEAN,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="boolean"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:ce(p,"boolean")}]});});var B3,M3=n(()=>{xe();fr();B3=_e(ae.NEVER,(p,{breadcrumbsPrefix:o=[]}={})=>({ok:false,errors:[{path:o,message:"Expected never"}]}));});var W3,V3=n(()=>{xe();fr();je();W3=_e(ae.NUMBER,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="number"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:ce(p,"number")}]});});var L3,G3=n(()=>{xe();fr();je();L3=_e(ae.STRING,(p,{breadcrumbsPrefix:o=[]}={})=>typeof p=="string"?{ok:true,value:p}:{ok:false,errors:[{path:o,message:ce(p,"string")}]});});var J3,H3=n(()=>{xe();fr();J3=_e(ae.UNKNOWN,p=>({ok:true,value:p}));});var K3=n(()=>{U3();F3();M3();V3();G3();H3();});function O3(p,o){let r={parse:(t,i)=>Q3({value:t,isKeyNumeric:p.getType()===ae.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)=>Q3({value:t,isKeyNumeric:p.getType()===ae.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:()=>ae.RECORD};return {...we(r),...le(r)}}function Q3({value:p,isKeyNumeric:o,transformKey:r,transformValue:t,breadcrumbsPrefix:i=[]}){return Pr(p)?Si(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=r(m),d=t(c,m);if(l.ok&&u.ok&&d.ok)return {ok:true,value:{...l.value,[u.value]:d.value}};let f=[];return l.ok||f.push(...l.errors),u.ok||f.push(...u.errors),d.ok||f.push(...d.errors),{ok:false,errors:f}},{ok:true,value:{}}):{ok:false,errors:[{path:i,message:ce(p,"object")}]}}var $3=n(()=>{xe();Ty();je();Ti();gr();Fe();});var Y3=n(()=>{$3();});function X3(p){let o=Uc(p),r={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:ce(t,"Set")}]}},getType:()=>ae.SET};return {...we(r),...le(r)}}var Z3=n(()=>{xe();je();gr();Ny();Fe();});var q3=n(()=>{Z3();});function r5(p){let o={parse:(r,t)=>e5((i,a)=>i.parse(r,a),p,t),json:(r,t)=>e5((i,a)=>i.json(r,a),p,t),getType:()=>ae.UNDISCRIMINATED_UNION};return {...we(o),...le(o)}}function e5(p,o,r){let t=[];for(let[i,a]of o.entries()){let s=p(a,{...r,skipValidation:false});if(s.ok)return s;for(let c of s.errors)t.push({path:c.path,message:`[Variant ${i}] ${c.message}`});}return {ok:false,errors:t}}var t5=n(()=>{xe();gr();Fe();});var o5=n(()=>{t5();});function i5(p,o){return {parsedDiscriminant:p,rawDiscriminant:o}}var a5=n(()=>{});function s5(p,o){let r=typeof p=="string"?p:p.rawDiscriminant,t=typeof p=="string"?p:p.parsedDiscriminant,i=Ic(ji(o)),a={parse:(s,c)=>n5({value:s,discriminant:r,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:[],r]})},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)=>n5({value:s,discriminant:t,transformedDiscriminant:r,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:()=>ae.UNION};return {...we(a),...le(a),...rr(a)}}function n5({value:p,discriminant:o,transformedDiscriminant:r,transformDiscriminantValue:t,getAdditionalPropertiesSchema:i,allowUnrecognizedUnionMembers:a=false,transformAdditionalProperties:s,breadcrumbsPrefix:c=[]}){if(!Pr(p))return {ok:false,errors:[{path:c,message:ce(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:{[r]:u.value,...m}}:{ok:false,errors:[{path:[...c,o],message:"Unexpected discriminant value"}]};let f=s(m,d);return f.ok?{ok:true,value:{[r]:l,...f.value}}:f}var p5=n(()=>{xe();je();Ti();Cy();gr();zy();Ci();Fe();});var c5=n(()=>{a5();p5();});var l5=n(()=>{c3();d3();zy();z3();Ny();I3();Uy();Ci();K3();Y3();Fe();q3();o5();c5();});var e={};L(e,{JsonError:()=>fo,ParseError:()=>ho,any:()=>D3,bigint:()=>s3,boolean:()=>N3,booleanLiteral:()=>T3,date:()=>l3,discriminant:()=>i5,enum_:()=>Ic,getObjectLikeUtils:()=>rr,getObjectUtils:()=>Rt,getSchemaUtils:()=>le,isProperty:()=>Kr,lazy:()=>g3,lazyObject:()=>A3,list:()=>Uc,never:()=>B3,number:()=>W3,object:()=>Dc,objectWithoutOptionalProperties:()=>_3,optional:()=>Ay,property:()=>b3,record:()=>O3,set:()=>X3,string:()=>L3,stringLiteral:()=>C3,transform:()=>Py,undiscriminatedUnion:()=>r5,union:()=>s5,unknown:()=>J3,withParsedProperties:()=>Ey});var m5=n(()=>{l5();});function d5(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 u5=n(()=>{});function f5(p,...o){if(!p)return "";if(o.length===0)return p;if(p.includes("://")){let r;try{r=new URL(p);}catch{return g5(p,...o)}let t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=y5(a);s&&(r.pathname=h5(r.pathname,s));}return i&&!r.pathname.endsWith("/")&&(r.pathname+="/"),r.toString()}return g5(p,...o)}function g5(p,...o){if(o.length===0)return p;let r=p,t=o[o.length-1],i=t==null?void 0:t.endsWith("/");for(let a of o){let s=y5(a);s&&(r=h5(r,s));}return i&&!r.endsWith("/")&&(r+="/"),r}function h5(p,o){return p.endsWith("/")?p+o:`${p}/${o}`}function y5(p){if(!p)return p;let o=0,r=p.length;return p.startsWith("/")&&(o=1),p.endsWith("/")&&(r=p.length-1),o===0&&r===p.length?p:p.slice(o,r)}var b5=n(()=>{});var _={};L(_,{encodePathParam:()=>d5,join:()=>f5,toQueryString:()=>yt});var R5=n(()=>{u5();b5();Ai();});var b=n(()=>{J9();by();o3();i3();Ry();m5();R5();});function B(p){let o=z({"X-Fern-Language":"JavaScript","X-Fern-Runtime":uo.type,"X-Fern-Runtime-Version":uo.version,"Comet-Workspace":p==null?void 0:p.workspaceName},p==null?void 0:p.headers);return {...p,logging:zi.createLogger(p==null?void 0:p.logging),headers:o}}var X=n(()=>{$();b();});var v,Y=n(()=>{v={Default:"http://localhost:5173/api"};});function j(p,o,r,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 Jr(`Timeout exceeded when calling ${r} ${t}.`);case "unknown":throw new k({message:p.errorMessage,rawResponse:o});default:throw new k({message:"Unknown error",rawResponse:o})}}var Z=n(()=>{G();});var Ei,x5=n(()=>{b();Ei=e.object({blueprintName:e.property("blueprint_name",e.string())});});var Fy,By=n(()=>{b();Fy=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),envName:e.property("env_name",e.string()),blueprintId:e.property("blueprint_id",e.string()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),endedAt:e.property("ended_at",e.date().optional())});});var Ii,w5=n(()=>{b();By();Ii=e.object({projectId:e.property("project_id",e.string()),envs:e.list(Fy)});});var Di,_5=n(()=>{b();Di=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),keys:e.list(e.string())});});var My=n(()=>{x5();w5();_5();});var k5=n(()=>{My();});var Nc={};L(Nc,{AgentConfigEnvSetByName:()=>Ei,AgentConfigEnvUpdate:()=>Ii,AgentConfigRemoveValues:()=>Di});var A5=n(()=>{k5();});var Fc,Wy=n(()=>{b();Fc=e.enum_(["open","resolved","closed"]);});var Ui,P5=n(()=>{b();Wy();Ui=e.object({projectId:e.property("project_id",e.string()),status:Fc,closeNote:e.property("close_note",e.string().optional())});});var W,se=n(()=>{b();W=e.record(e.string(),e.unknown());});var Vy,Ly=n(()=>{b();Vy=e.enum_(["critical","high","medium","low"]);});var Gy,Jy=n(()=>{b();se();Ly();Gy=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),tracesQuery:e.property("traces_query",e.string().optional()),severity:Vy,count:e.number(),totalCount:e.property("total_count",e.number()),usersImpacted:e.property("users_impacted",e.number()),totalUsers:e.property("total_users",e.number()),metadata:W.optional()});});var Ni,z5=n(()=>{b();Jy();Ni=e.object({projectId:e.property("project_id",e.string()),reportDay:e.property("report_day",e.string()),issues:e.list(Gy)});});var Hy=n(()=>{P5();z5();});var S5=n(()=>{Hy();});var Bc,v5=n(()=>{b();Bc=e.enum_(["critical","high","medium","low"]);});var Mc,T5=n(()=>{b();Mc=e.enum_(["open","resolved","closed"]);});var Ky=n(()=>{Wy();v5();T5();});var Wc={};L(Wc,{AgentInsightsIssueUpdate:()=>Ui,AgentInsightsIssueUpdateStatus:()=>Fc,AgentInsightsReport:()=>Ni,FindAgentInsightsIssuesRequestSeverity:()=>Bc,FindAgentInsightsIssuesRequestStatus:()=>Mc});var j5=n(()=>{S5();Ky();});var Fi,C5=n(()=>{b();Fi=e.object({enrolled:e.boolean(),projectIds:e.property("project_ids",e.list(e.string()))});});var Qy=n(()=>{C5();});var E5=n(()=>{Qy();});var Vc={};L(Vc,{Request:()=>Fi});var I5=n(()=>{E5();});var Bi,D5=n(()=>{b();Bi=e.object({guidance:e.string()});});var Lc,Oy=n(()=>{b();Lc=e.enum_(["enabled","disabled"]);});var Mi,U5=n(()=>{b();Oy();Mi=e.object({status:Lc});});var $y=n(()=>{D5();U5();});var N5=n(()=>{$y();});var Yy=n(()=>{Oy();});var Gc={};L(Gc,{AgentInsightsGuidanceUpdate:()=>Bi,AgentInsightsJobUpdate:()=>Mi,AgentInsightsJobUpdateStatus:()=>Lc});var F5=n(()=>{N5();Yy();});var Jc,B5=n(()=>{b();Jc=e.enum_(["general","slack","pagerduty"]);});var Xy=n(()=>{B5();});var Hc={};L(Hc,{GetWebhookExamplesRequestAlertType:()=>Jc});var M5=n(()=>{Xy();});var Zy,qy=n(()=>{b();Zy=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var eb,rb=n(()=>{b();eb=e.enum_([">","<","="]);});var tb,ob=n(()=>{b();rb();tb=e.object({scoreName:e.property("score_name",e.string()),operator:eb,value:e.number()});});var ib,ab=n(()=>{b();ob();ib=e.object({conditions:e.list(tb)});});var nb,sb=n(()=>{b();ab();nb=e.object({groups:e.list(ib)});});var pb,cb=n(()=>{b();sb();pb=e.object({enabled:e.boolean().optional(),conditions:nb.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var lb,mb=n(()=>{b();lb=e.enum_(["trace","thread"]);});var Wi,db=n(()=>{b();qy();cb();mb();Wi=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:lb,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:pb.optional(),annotatorView:e.property("annotator_view",Zy.optional())});});var Vi,W5=n(()=>{b();db();Vi=e.object({annotationQueues:e.property("annotation_queues",e.list(Wi))});});var Li,V5=n(()=>{b();Li=e.object({ids:e.list(e.string())});});var Gi,Kc=n(()=>{b();Gi=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var ub,gb=n(()=>{b();ub=e.enum_([">","<","="]);});var fb,hb=n(()=>{b();gb();fb=e.object({scoreName:e.property("score_name",e.string()),operator:ub,value:e.number()});});var yb,bb=n(()=>{b();hb();yb=e.object({conditions:e.list(fb)});});var Rb,xb=n(()=>{b();bb();Rb=e.object({groups:e.list(yb)});});var Ji,Qc=n(()=>{b();xb();Ji=e.object({enabled:e.boolean().optional(),conditions:Rb.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional()),clearMaxItemsInQueue:e.property("clear_max_items_in_queue",e.boolean().optional())});});var Hi,L5=n(()=>{b();Kc();Qc();Hi=e.object({name:e.string().optional(),description:e.string().optional(),instructions:e.string().optional(),commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Ji.optional(),annotatorView:e.property("annotator_view",Gi.optional())});});var wb=n(()=>{W5();V5();L5();});var G5=n(()=>{wb();});var Oc={};L(Oc,{AnnotationQueueBatchWrite:()=>Vi,AnnotationQueueItemIdsPublic:()=>Li,AnnotationQueueUpdate:()=>Hi});var J5=n(()=>{G5();});var _b,kb=n(()=>{b();_b=e.enum_(["ui","sdk","online_scoring"]);});var Ab,Pb=n(()=>{b();Ab=e.enum_(["passed","failed"]);});var zb,Sb=n(()=>{b();kb();Pb();zb=e.object({entityId:e.property("entity_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),status:Ab,reason:e.string().optional(),source:_b});});var $c,vb=n(()=>{b();$c=e.enum_(["TRACE","SPAN","THREAD"]);});var Ki,H5=n(()=>{b();Sb();vb();Ki=e.object({entityType:e.property("entity_type",$c),assertionResults:e.property("assertion_results",e.list(zb))});});var Tb=n(()=>{H5();});var K5=n(()=>{Tb();});var jb=n(()=>{vb();});var Yc={};L(Yc,{AssertionResultBatch:()=>Ki,AssertionResultBatchEntityType:()=>$c});var Q5=n(()=>{K5();jb();});var Xc,Cb=n(()=>{b();Xc=e.enum_(["trace","span"]);});var Qi,O5=n(()=>{b();Cb();Qi=e.object({fileName:e.property("file_name",e.string()),numOfFileParts:e.property("num_of_file_parts",e.number()),mimeType:e.property("mime_type",e.string().optional()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",Xc),entityId:e.property("entity_id",e.string()),path:e.string()});});var Eb=n(()=>{O5();});var Zc={};L(Zc,{Request:()=>tle});var tle,$5=n(()=>{b();tle=e.record(e.string(),e.unknown());});var Y5=n(()=>{Eb();$5();});var qc,X5=n(()=>{b();qc=e.enum_(["trace","span"]);});var el,Z5=n(()=>{b();el=e.enum_(["trace","span"]);});var rl,q5=n(()=>{b();rl=e.enum_(["trace","span"]);});var Ib=n(()=>{X5();Z5();Cb();q5();});var bo={};L(bo,{AttachmentListRequestEntityType:()=>qc,DownloadAttachmentRequestEntityType:()=>el,StartMultipartUploadRequest:()=>Qi,StartMultipartUploadRequestEntityType:()=>Xc,UploadAttachmentRequestEntityType:()=>rl,uploadAttachment:()=>Zc});var eX=n(()=>{Y5();Ib();});var Oi,tl=n(()=>{b();Oi=e.object({name:e.string().optional(),description:e.string().optional(),strict:e.boolean().optional(),parameters:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var zr,Ro=n(()=>{b();zr=e.object({name:e.string().optional(),arguments:e.string().optional()});});var $i,ol=n(()=>{b();se();$i=e.object({role:e.string(),content:W});});var Db,Ub=n(()=>{b();Db=e.object({mode:e.string().optional(),ttl:e.string().optional()});});var Nb,Fb=n(()=>{b();Nb=e.object({name:e.string().optional(),strict:e.boolean().optional(),schema:e.record(e.string(),e.record(e.string(),e.unknown())).optional()});});var Bb,Mb=n(()=>{b();Bb=e.enum_(["text","json_object","json_schema"]);});var Wb,Vb=n(()=>{b();Fb();Mb();Wb=e.object({type:Bb.optional(),jsonSchema:Nb.optional()});});var Lb,Gb=n(()=>{b();Lb=e.object({includeUsage:e.boolean().optional()});});var Jb,Hb=n(()=>{b();Jb=e.enum_(["function"]);});var Kb,Qb=n(()=>{b();tl();Hb();Kb=e.object({type:Jb.optional(),function:Oi.optional()});});var Yi,rX=n(()=>{b();tl();Ro();ol();Ub();Vb();Gb();Qb();Yi=e.object({model:e.string().optional(),messages:e.list($i).optional(),temperature:e.number().optional(),topP:e.number().optional(),n:e.number().optional(),stream:e.boolean().optional(),streamOptions:Lb.optional(),stop:e.list(e.string()).optional(),maxTokens:e.number().optional(),maxCompletionTokens:e.number().optional(),presencePenalty:e.number().optional(),frequencyPenalty:e.number().optional(),logitBias:e.record(e.string(),e.number()).optional(),user:e.string().optional(),responseFormat:Wb.optional(),seed:e.number().optional(),tools:e.list(Kb).optional(),toolChoice:e.record(e.string(),e.unknown()).optional(),parallelToolCalls:e.boolean().optional(),store:e.boolean().optional(),metadata:e.record(e.string(),e.string()).optional(),reasoningEffort:e.string().optional(),serviceTier:e.string().optional(),promptCacheKey:e.string().optional(),promptCacheOptions:Db.optional(),logprobs:e.boolean().optional(),topLogprobs:e.number().optional(),functions:e.list(Oi).optional(),functionCall:zr.optional()});});var Ob=n(()=>{rX();});var tX=n(()=>{Ob();});var il={};L(il,{ChatCompletionRequest:()=>Yi});var oX=n(()=>{tX();});var $b,Yb=n(()=>{b();$b=e.enum_(["llm_judge","code_metric"]);});var Sr,xo=n(()=>{b();Yb();se();Sr=e.object({name:e.string(),type:$b,config:W});});var tr,xt=n(()=>{b();tr=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var Xb,Zb=n(()=>{b();Xb=e.object({includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var Xi,iX=n(()=>{b();xo();xt();Zb();Xi=e.object({spanIds:e.property("span_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",Xb),evaluators:e.list(Sr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var qb,eR=n(()=>{b();qb=e.object({includeSpans:e.boolean().optional(),includeTags:e.boolean().optional(),includeFeedbackScores:e.boolean().optional(),includeComments:e.boolean().optional(),includeUsage:e.boolean().optional(),includeMetadata:e.boolean().optional()});});var Zi,aX=n(()=>{b();xo();xt();eR();Zi=e.object({traceIds:e.property("trace_ids",e.list(e.string())),enrichmentOptions:e.property("enrichment_options",qb),evaluators:e.list(Sr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),fieldMappings:e.property("field_mappings",e.record(e.string(),e.string()).optional())});});var qi,nX=n(()=>{b();qi=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var ea,sX=n(()=>{b();ea=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),projectName:e.property("project_name",e.string().optional()),datasetVersions:e.property("dataset_versions",e.list(e.string()).optional()),filters:e.string().optional(),limit:e.number().optional(),lastRetrievedExperimentId:e.property("last_retrieved_experiment_id",e.string().optional()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional()});});var ra,pX=n(()=>{b();ra=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var ta,cX=n(()=>{b();ta=e.object({datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional())});});var rR,tR=n(()=>{b();rR=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var oa,al=n(()=>{b();tR();oa=e.object({field:e.string().optional(),operator:rR.optional(),key:e.string().optional(),value:e.string().optional()});});var oR,iR=n(()=>{b();xo();xt();se();oR=e.object({input:e.string().optional(),expectedOutput:e.property("expected_output",e.string().optional()),metadata:W.optional(),data:W.optional(),description:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),evaluators:e.list(Sr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),clearExecutionPolicy:e.property("clear_execution_policy",e.boolean().optional())});});var ia,lX=n(()=>{b();al();iR();ia=e.object({ids:e.list(e.string()).optional(),filters:e.list(oa).optional(),datasetId:e.property("dataset_id",e.string().optional()),update:oR,mergeTags:e.property("merge_tags",e.boolean().optional())});});var aR,nR=n(()=>{b();aR=e.enum_(["manual","trace","span","sdk"]);});var sR,pR=n(()=>{b();sR=e.enum_(["llm_judge","code_metric"]);});var Ce,vr=n(()=>{b();Ce=e.record(e.string(),e.unknown());});var cR,lR=n(()=>{b();pR();vr();cR=e.object({name:e.string(),type:sR,config:Ce});});var mR,dR=n(()=>{b();mR=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var aa,uR=n(()=>{b();nR();lR();dR();se();aa=e.object({id:e.string().optional(),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:aR,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(cR).optional(),executionPolicy:e.property("execution_policy",mR.optional())});});var na,mX=n(()=>{b();uR();na=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(aa),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var sa,dX=n(()=>{b();sa=e.object({datasetName:e.property("dataset_name",e.string()),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),steamLimit:e.property("steam_limit",e.number().optional()),datasetVersion:e.property("dataset_version",e.string().optional()),projectName:e.property("project_name",e.string().optional()),filters:e.string().optional()});});var pa,uX=n(()=>{b();al();pa=e.object({itemIds:e.property("item_ids",e.list(e.string()).optional()),datasetId:e.property("dataset_id",e.string().optional()),filters:e.list(oa).optional(),batchGroupId:e.property("batch_group_id",e.string().optional())});});var nl,gR=n(()=>{b();nl=e.enum_(["private","public"]);});var ca,gX=n(()=>{b();gR();ca=e.object({name:e.string(),description:e.string().optional(),visibility:nl.optional(),tags:e.list(e.string()).optional()});});var la,fX=n(()=>{b();la=e.object({versionRef:e.property("version_ref",e.string())});});var ma,hX=n(()=>{b();ma=e.object({versionName:e.property("version_name",e.string())});});var da,yX=n(()=>{b();da=e.object({tag:e.string()});});var ua,bX=n(()=>{b();ua=e.object({changeDescription:e.property("change_description",e.string().optional()),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional())});});var sl,fR=n(()=>{b();sl=e.enum_(["dataset","evaluation_suite"]);});var pl,hR=n(()=>{b();pl=e.enum_(["private","public"]);});var ga,RX=n(()=>{b();fR();hR();ga=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:sl.optional(),visibility:pl.optional(),tags:e.list(e.string()).optional(),description:e.string().optional()});});var yR=n(()=>{iX();aX();nX();sX();pX();cX();lX();mX();dX();uX();gX();fX();hX();yX();bX();RX();});var bR,RR=n(()=>{b();bR=e.enum_(["PENDING","PROCESSING","COMPLETED","FAILED"]);});var wo,xR=n(()=>{b();RR();wo=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),datasetName:e.property("dataset_name",e.string().optional()),status:bR.optional(),filePath:e.property("file_path",e.string().optional()),errorMessage:e.property("error_message",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional()),viewedAt:e.property("viewed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var cl={};L(cl,{Response:()=>ole});var ole,xX=n(()=>{b();xR();ole=e.list(wo);});var wX=n(()=>{xX();yR();});var ll,_X=n(()=>{b();ll=e.enum_(["json","jsonl"]);});var wR=n(()=>{_X();gR();fR();hR();});var _o={};L(_o,{CreateDatasetItemsFromJsonRequestFormat:()=>ll,CreateDatasetItemsFromSpansRequest:()=>Xi,CreateDatasetItemsFromTracesRequest:()=>Zi,DatasetExpansionWrite:()=>qi,DatasetExperimentItemStreamRequest:()=>ea,DatasetIdentifier:()=>ra,DatasetIdentifierPublic:()=>ta,DatasetItemBatchUpdate:()=>ia,DatasetItemBatchWrite:()=>na,DatasetItemStreamRequest:()=>sa,DatasetItemsDelete:()=>pa,DatasetUpdate:()=>ca,DatasetUpdateVisibility:()=>nl,DatasetVersionRestorePublic:()=>la,DatasetVersionRetrieveRequestPublic:()=>ma,DatasetVersionTag:()=>da,DatasetVersionUpdatePublic:()=>ua,DatasetWrite:()=>ga,DatasetWriteType:()=>sl,DatasetWriteVisibility:()=>pl,getDatasetExportJobs:()=>cl});var kX=n(()=>{wX();wR();});var fa,AX=n(()=>{b();fa=e.object({name:e.string().optional(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var ha,PX=n(()=>{b();ha=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional()});});var _R=n(()=>{AX();PX();});var zX=n(()=>{_R();});var ml={};L(ml,{EnvironmentUpdate:()=>fa,EnvironmentWrite:()=>ha});var SX=n(()=>{zX();});var ya,dl=n(()=>{b();ya=e.object({name:e.string(),value:e.number()});});var kR,AR=n(()=>{b();kR=e.enum_(["running","completed","cancelled","failed"]);});var PR,zR=n(()=>{b();PR=e.enum_(["regular","trial","mini-batch","mutation"]);});var ba,SR=n(()=>{b();dl();AR();zR();se();ba=e.object({name:e.string().optional(),metadata:W.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),type:PR.optional(),status:kR.optional(),experimentScores:e.property("experiment_scores",e.list(ya).optional())});});var Ra,vX=n(()=>{b();SR();Ra=e.object({ids:e.list(e.string()),update:ba,mergeTags:e.property("merge_tags",e.boolean().optional())});});var Qr,xa=n(()=>{b();Qr=e.object({id:e.string(),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var vR,TR=n(()=>{b();se();ol();xa();vR=e.object({model:e.string(),messages:e.list($i),configs:e.record(e.string(),W).optional(),promptVersions:e.property("prompt_versions",e.list(Qr).optional()),experimentName:e.property("experiment_name",e.string().optional())});});var wa,TX=n(()=>{b();TR();xa();wa=e.object({datasetName:e.property("dataset_name",e.string()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),prompts:e.list(vR),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),datasetId:e.property("dataset_id",e.string()),versionHash:e.property("version_hash",e.string().optional()),promptVersions:e.property("prompt_versions",e.list(Qr).optional()),selectedRuleIds:e.property("selected_rule_ids",e.list(e.string()).optional()),filters:e.string().optional()});});var jR,CR=n(()=>{b();jR=e.enum_(["ui","sdk","online_scoring"]);});var ER,IR=n(()=>{b();ER=e.enum_(["ui","sdk","online_scoring"]);});var DR,UR=n(()=>{b();IR();DR=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:ER.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var NR,FR=n(()=>{b();CR();UR();NR=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:jR,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),DR).optional())});});var or,_a=n(()=>{b();or=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var ka,ul=n(()=>{b();ka=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var BR,MR=n(()=>{b();BR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var WR,VR=n(()=>{b();WR=e.enum_(["general","tool","llm","guardrail"]);});var LR,GR=n(()=>{b();ul();_a();MR();VR();LR=e.object({id:e.string().optional(),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:WR.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:or.optional(),output:or.optional(),metadata:or.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",ka.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:BR.optional(),environment:e.string().optional()});});var JR,HR=n(()=>{b();JR=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var KR,QR=n(()=>{b();ul();_a();HR();KR=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:or.optional(),output:or.optional(),metadata:or.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",ka.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:JR.optional(),environment:e.string().optional()});});var OR,$R=n(()=>{b();FR();_a();GR();QR();OR=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",or.optional()),trace:KR.optional(),spans:e.list(LR).optional(),feedbackScores:e.property("feedback_scores",e.list(NR).optional())});});var Aa,jX=n(()=>{b();$R();Aa=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(OR)});});var Pa,CX=n(()=>{b();Pa=e.object({experimentName:e.property("experiment_name",e.string()),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),projectName:e.property("project_name",e.string().optional())});});var YR,XR=n(()=>{b();YR=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var ye,wt=n(()=>{b();ye=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var ZR,qR=n(()=>{b();ZR=e.enum_(["passed","failed"]);});var ex,rx=n(()=>{b();ex=e.enum_(["default","hidden"]);});var tx,ox=n(()=>{b();tx=e.enum_(["ui","sdk","online_scoring"]);});var ix,ax=n(()=>{b();ix=e.enum_(["ui","sdk","online_scoring"]);});var nx,sx=n(()=>{b();ax();nx=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:ix.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var ve,_t=n(()=>{b();ox();sx();ve=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:tx,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),nx).optional())});});var me,Ze=n(()=>{b();me=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var za,gl=n(()=>{b();XR();wt();xt();qR();rx();_t();Ze();se();za=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),input:me.optional(),output:me.optional(),traceMetadata:e.property("trace_metadata",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ve).optional()),comments:e.list(ye).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",ex.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",tr.optional()),assertionResults:e.property("assertion_results",e.list(YR).optional()),status:ZR.optional(),datasetItemData:e.property("dataset_item_data",W.optional())});});var Sa,EX=n(()=>{b();gl();Sa=e.object({experimentItems:e.property("experiment_items",e.list(za))});});var va,IX=n(()=>{b();va=e.object({ids:e.list(e.string())});});var Ta,DX=n(()=>{b();Ta=e.object({name:e.string(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var px,cx=n(()=>{b();px=e.object({name:e.string(),value:e.number()});});var Qe,ko=n(()=>{b();Qe=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var fl,lx=n(()=>{b();fl=e.object({id:e.string()});});var hl,mx=n(()=>{b();hl=e.enum_(["dataset","evaluation_suite"]);});var yl,dx=n(()=>{b();yl=e.enum_(["running","completed","cancelled","failed"]);});var bl,ux=n(()=>{b();bl=e.enum_(["regular","trial","mini-batch","mutation"]);});var ja,UX=n(()=>{b();cx();ko();lx();mx();dx();ux();ja=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),type:bl.optional(),evaluationMethod:e.property("evaluation_method",hl.optional()),optimizationId:e.property("optimization_id",e.string().optional()),status:yl.optional(),experimentScores:e.property("experiment_scores",e.list(px).optional()),promptVersion:e.property("prompt_version",fl.optional()),promptVersions:e.property("prompt_versions",e.list(fl).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional())});});var Ca,NX=n(()=>{b();Ca=e.object({ids:e.list(e.string())});});var gx=n(()=>{vX();TX();jX();CX();EX();IX();DX();UX();NX();});var FX=n(()=>{gx();});var fx=n(()=>{mx();dx();ux();});var Rl={};L(Rl,{ExperimentBatchUpdate:()=>Ra,ExperimentExecutionRequest:()=>wa,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Aa,ExperimentItemStreamRequest:()=>Pa,ExperimentItemsBatch:()=>Sa,ExperimentItemsDelete:()=>va,ExperimentStreamRequestPublic:()=>Ta,ExperimentWrite:()=>ja,ExperimentWriteEvaluationMethod:()=>hl,ExperimentWriteStatus:()=>yl,ExperimentWriteType:()=>bl,IdsHolder:()=>Ca});var BX=n(()=>{FX();fx();});var xl,MX=n(()=>{b();xl=e.enum_(["numerical","categorical","boolean"]);});var hx=n(()=>{MX();});var wl={};L(wl,{FindFeedbackDefinitionsRequestType:()=>xl});var WX=n(()=>{hx();});var Ea,VX=n(()=>{b();Ea=e.object({description:e.string()});});var yx=n(()=>{VX();});var LX=n(()=>{yx();});var _l,GX=n(()=>{b();_l=e.enum_(["queued","running","completed","failed","cancelled"]);});var bx=n(()=>{GX();});var kl={};L(kl,{FindGuardrailModelsRequestLatestRunStatus:()=>_l,GuardrailModelUpdate:()=>Ea});var JX=n(()=>{LX();bx();});var Al,HX=n(()=>{b();Al=e.enum_(["on_request","global"]);});var Rx=n(()=>{HX();});var Pl={};L(Pl,{FindGuardrailPoliciesRequestExecutionScope:()=>Al});var KX=n(()=>{Rx();});var xx,wx=n(()=>{b();xx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var _x,kx=n(()=>{b();_x=e.enum_(["passed","failed"]);});var Ax,Px=n(()=>{b();wx();kx();se();Ax=e.object({entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:xx,result:_x,config:W,details:W});});var Ia,QX=n(()=>{b();Px();Ia=e.object({guardrails:e.list(Ax)});});var zx,Sx=n(()=>{b();zx=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var vx,Tx=n(()=>{b();se();Sx();vx=e.object({type:zx,config:W});});var Da,OX=n(()=>{b();Tx();Da=e.object({text:e.string(),validations:e.list(vx)});});var jx=n(()=>{QX();OX();});var $X=n(()=>{jx();});var zl={};L(zl,{GuardrailBatchWrite:()=>Ia,GuardrailsValidationRequest:()=>Da});var YX=n(()=>{$X();});var Sl={};L(Sl,{Response:()=>ile});var ile,XX=n(()=>{b();re();ile=e.record(e.string(),e.lazyObject(()=>Ua));});var vl={};L(vl,{Response:()=>ale});var ale,ZX=n(()=>{b();ale=e.string();});var qX=n(()=>{XX();ZX();});var kt={};L(kt,{getLlmModelProfiles:()=>Sl,getLlmModels:()=>vl});var e8=n(()=>{qX();});var Cx,Ex=n(()=>{b();Cx=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var Ix,Dx=n(()=>{b();Ix=e.enum_(["form","json","basic"]);});var At,Na=n(()=>{b();Ex();Dx();At=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",Ix.optional()),credentials:e.list(Cx).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var Fa,r8=n(()=>{b();Na();Fa=e.object({apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",At.optional())});});var Ux,Nx=n(()=>{b();Ux=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var Fx,Bx=n(()=>{b();Fx=e.enum_(["form","json","basic"]);});var Mx,Wx=n(()=>{b();Nx();Bx();Mx=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",Fx.optional()),credentials:e.list(Ux).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var Tl,Vx=n(()=>{b();Tl=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Ba,t8=n(()=>{b();Wx();Vx();Ba=e.object({provider:Tl,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",Mx.optional())});});var Ma,o8=n(()=>{b();Na();Ma=e.object({providerId:e.property("provider_id",e.string().optional()),authConfig:e.property("auth_config",At.optional())});});var Lx=n(()=>{r8();t8();o8();});var i8=n(()=>{Lx();});var Gx=n(()=>{Vx();});var jl={};L(jl,{ProviderApiKeyUpdate:()=>Fa,ProviderApiKeyWrite:()=>Ba,ProviderApiKeyWriteProvider:()=>Tl,ProviderAuthCheck:()=>Ma});var a8=n(()=>{i8();Gx();});var Wa,n8=n(()=>{b();Wa=e.object({clientName:e.property("client_name",e.string()),redirectUris:e.property("redirect_uris",e.list(e.string())),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional())});});var Va,s8=n(()=>{b();Va=e.object({clientId:e.property("client_id",e.string()),redirectUri:e.property("redirect_uri",e.string()),codeChallenge:e.property("code_challenge",e.string()),codeChallengeMethod:e.property("code_challenge_method",e.string()),resource:e.string(),state:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),csrf:e.string().optional()});});var La,p8=n(()=>{b();La=e.object({token:e.string().optional(),clientId:e.property("client_id",e.string().optional())});});var Ga,c8=n(()=>{b();Ga=e.object({grantType:e.property("grant_type",e.string().optional()),code:e.string().optional(),redirectUri:e.property("redirect_uri",e.string().optional()),clientId:e.property("client_id",e.string().optional()),codeVerifier:e.property("code_verifier",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional())});});var Jx=n(()=>{n8();s8();p8();c8();});var l8=n(()=>{Jx();});var Cl={};L(Cl,{ClientRegistrationRequest:()=>Wa,ConsentRequest:()=>Va,RevokeRequest:()=>La,TokenRequest:()=>Ga});var m8=n(()=>{l8();});var Hx,Kx=n(()=>{b();Hx=e.object({name:e.string(),size:e.number().optional(),digest:e.string().optional(),modifiedAt:e.property("modified_at",e.date().optional())});});var El={};L(El,{Response:()=>nle});var nle,d8=n(()=>{b();Kx();nle=e.list(Hx);});var u8=n(()=>{d8();});var Ao={};L(Ao,{listModels:()=>El});var g8=n(()=>{u8();});var Oe,Or=n(()=>{b();Oe=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Il,Qx=n(()=>{b();Il=e.enum_(["running","completed","cancelled","initialized","error"]);});var Ja,f8=n(()=>{b();Or();Ze();Qx();Ja=e.object({name:e.string().optional(),status:Il.optional(),errorInfo:e.property("error_info",Oe.optional()),metadata:me.optional()});});var Ox=n(()=>{f8();});var h8=n(()=>{Ox();});var $x=n(()=>{Qx();});var Dl={};L(Dl,{OptimizationUpdate:()=>Ja,OptimizationUpdateStatus:()=>Il});var y8=n(()=>{h8();$x();});var Ha,b8=n(()=>{b();Ha=e.object({runnerName:e.property("runner_name",e.string()),hmac:e.string()});});var Ul,Yx=n(()=>{b();Ul=e.enum_(["connect","endpoint"]);});var Ka,R8=n(()=>{b();Yx();Ka=e.object({projectId:e.property("project_id",e.string()),activationKey:e.property("activation_key",e.string()),ttlSeconds:e.property("ttl_seconds",e.number().optional()),type:Ul});});var Xx=n(()=>{b8();R8();});var x8=n(()=>{Xx();});var Zx=n(()=>{Yx();});var Nl={};L(Nl,{ActivateRequest:()=>Ha,CreateSessionRequest:()=>Ka,CreateSessionRequestType:()=>Ul});var w8=n(()=>{x8();Zx();});var Fl,qx=n(()=>{b();Fl=e.enum_(["traces","spans","threads"]);});var Qa,_8=n(()=>{b();qx();Qa=e.object({entityType:e.property("entity_type",Fl),filters:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional())});});var ew,rw=n(()=>{b();ew=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var tw,ow=n(()=>{b();rw();tw=e.object({field:ew.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var iw,aw=n(()=>{b();iw=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Tr,Po=n(()=>{b();aw();Tr=e.object({field:e.string().optional(),operator:iw.optional(),key:e.string().optional(),value:e.string().optional()});});var nw,sw=n(()=>{b();nw=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var jr,zo=n(()=>{b();sw();jr=e.object({field:e.string().optional(),operator:nw.optional(),key:e.string().optional(),value:e.string().optional()});});var pw,cw=n(()=>{b();pw=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Pt,Oa=n(()=>{b();cw();Pt=e.object({field:e.string().optional(),operator:pw.optional(),key:e.string().optional(),value:e.string().optional()});});var Bl,lw=n(()=>{b();Bl=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Ml,mw=n(()=>{b();Ml=e.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var $a,k8=n(()=>{b();ow();Po();zo();Oa();lw();mw();$a=e.object({metricType:e.property("metric_type",Ml.optional()),interval:Bl.optional(),intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional()),spanFilters:e.property("span_filters",e.list(Tr).optional()),traceFilters:e.property("trace_filters",e.list(jr).optional()),threadFilters:e.property("thread_filters",e.list(Pt).optional()),breakdown:tw.optional()});});var Ya,A8=n(()=>{b();Ya=e.object({name:e.string(),includeStats:e.boolean().optional()});});var Wl,dw=n(()=>{b();Wl=e.enum_(["private","public"]);});var Xa,P8=n(()=>{b();dw();Xa=e.object({name:e.string().optional(),description:e.string().optional(),visibility:Wl.optional()});});var Vl,uw=n(()=>{b();Vl=e.enum_(["private","public"]);});var Za,z8=n(()=>{b();uw();Za=e.object({name:e.string(),visibility:Vl.optional(),description:e.string().optional()});});var gw=n(()=>{_8();k8();A8();P8();z8();});var S8=n(()=>{gw();});var fw=n(()=>{qx();lw();mw();dw();uw();});var Ll={};L(Ll,{KpiCardRequest:()=>Qa,KpiCardRequestEntityType:()=>Fl,ProjectMetricRequestPublic:()=>$a,ProjectMetricRequestPublicInterval:()=>Bl,ProjectMetricRequestPublicMetricType:()=>Ml,ProjectRetrieveDetailed:()=>Ya,ProjectUpdate:()=>Xa,ProjectUpdateVisibility:()=>Wl,ProjectWrite:()=>Za,ProjectWriteVisibility:()=>Vl});var v8=n(()=>{S8();fw();});var hw,yw=n(()=>{b();hw=e.record(e.string(),e.unknown());});var bw,Rw=n(()=>{b();bw=e.enum_(["text","chat"]);});var xw,ww=n(()=>{b();xw=e.enum_(["mustache","jinja2","python"]);});var _w,kw=n(()=>{b();_w=e.enum_(["prompt_version","mask"]);});var Be,qa=n(()=>{b();yw();Rw();ww();kw();Be=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:hw.optional(),type:xw.optional(),versionType:e.property("version_type",_w.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",bw.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Gl,Aw=n(()=>{b();Gl=e.enum_(["text","chat"]);});var en,T8=n(()=>{b();qa();Aw();en=e.object({name:e.string(),version:Be,templateStructure:e.property("template_structure",Gl.optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var rn,j8=n(()=>{b();rn=e.object({name:e.string(),description:e.string().optional(),tags:e.list(e.string()).optional()});});var Pw,zw=n(()=>{b();Pw=e.object({tags:e.list(e.string()).optional()});});var tn,C8=n(()=>{b();zw();tn=e.object({ids:e.list(e.string()),update:Pw,mergeTags:e.property("merge_tags",e.boolean().optional())});});var on,E8=n(()=>{b();on=e.object({commits:e.list(e.string())});});var an,I8=n(()=>{b();an=e.object({environments:e.list(e.string())});});var nn,D8=n(()=>{b();nn=e.object({ids:e.list(e.string())});});var sn,U8=n(()=>{b();sn=e.object({name:e.string(),commit:e.string().optional(),environment:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),projectName:e.property("project_name",e.string().optional())});});var Jl,Sw=n(()=>{b();Jl=e.enum_(["text","chat"]);});var Hl,vw=n(()=>{b();Hl=e.enum_(["mustache","jinja2","python"]);});var pn,N8=n(()=>{b();vr();Sw();vw();pn=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:Ce.optional(),changeDescription:e.property("change_description",e.string().optional()),type:Hl.optional(),templateStructure:e.property("template_structure",Jl.optional()),tags:e.list(e.string()).optional()});});var Tw=n(()=>{T8();j8();C8();E8();I8();D8();U8();N8();});var So,Kl=n(()=>{b();So=e.object({promptVersionId:e.property("prompt_version_id",e.string().optional()),commit:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),promptName:e.property("prompt_name",e.string().optional())});});var Ql={};L(Ql,{Response:()=>sle});var sle,F8=n(()=>{b();Kl();sle=e.list(So);});var Ol={};L(Ol,{Response:()=>ple});var ple,B8=n(()=>{b();qa();ple=e.list(Be);});var M8=n(()=>{F8();Tw();B8();});var jw=n(()=>{Aw();Sw();vw();});var zt={};L(zt,{CreatePromptVersionDetail:()=>en,CreatePromptVersionDetailTemplateStructure:()=>Gl,PromptUpdatable:()=>rn,PromptVersionBatchUpdate:()=>tn,PromptVersionCommitsRequestPublic:()=>on,PromptVersionEnvironmentUpdate:()=>an,PromptVersionIdsRequestDetail:()=>nn,PromptVersionRetrieveDetail:()=>sn,PromptWrite:()=>pn,PromptWriteTemplateStructure:()=>Jl,PromptWriteType:()=>Hl,getPromptsByCommits:()=>Ql,retrievePromptVersionsByIds:()=>Ol});var W8=n(()=>{M8();jw();});var $l,V8=n(()=>{b();$l=e.enum_(["agent_insights"]);});var Cw=n(()=>{V8();});var Yl={};L(Yl,{FindReportFailuresRequestType:()=>$l});var L8=n(()=>{Cw();});var Xl,Ew=n(()=>{b();Xl=e.enum_(["pending","completed","failed"]);});var cn,G8=n(()=>{b();se();Ew();cn=e.object({content:e.string().optional(),status:Xl,sessionId:e.property("session_id",e.string().optional()),recommendedActions:e.property("recommended_actions",W.optional()),failureReason:e.property("failure_reason",e.string().optional())});});var Iw=n(()=>{G8();});var J8=n(()=>{Iw();});var Dw=n(()=>{Ew();});var Zl={};L(Zl,{ReportCompleteRequest:()=>cn,ReportCompleteRequestStatus:()=>Xl});var H8=n(()=>{J8();Dw();});var ql,Uw=n(()=>{b();ql=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var ln,K8=n(()=>{b();Uw();ln=e.object({projectId:e.property("project_id",e.string().optional()),organizationLevel:e.property("organization_level",e.boolean().optional()),retention:ql,applyToPast:e.property("apply_to_past",e.boolean().optional())});});var Nw=n(()=>{K8();});var Q8=n(()=>{Nw();});var Fw=n(()=>{Uw();});var em={};L(em,{RetentionRuleWrite:()=>ln,RetentionRuleWriteRetention:()=>ql});var O8=n(()=>{Q8();Fw();});var mn,$8=n(()=>{b();mn=e.object({maxCommands:e.property("max_commands",e.number().optional())});});var rm,Bw=n(()=>{b();rm=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var dn,Y8=n(()=>{b();se();Bw();dn=e.object({status:rm,result:W.optional(),error:W.optional(),durationMs:e.property("duration_ms",e.number().optional())});});var tm,Mw=n(()=>{b();tm=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var un,X8=n(()=>{b();se();Mw();un=e.object({type:tm,args:W,timeoutSeconds:e.property("timeout_seconds",e.number().optional())});});var gn,om=n(()=>{b();gn=e.object({datasetId:e.property("dataset_id",e.string().optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetItemVersionId:e.property("dataset_item_version_id",e.string().optional()),datasetItemId:e.property("dataset_item_id",e.string().optional())});});var fn,Z8=n(()=>{b();se();om();fn=e.object({agentName:e.property("agent_name",e.string()),inputs:W.optional(),projectId:e.property("project_id",e.string()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:gn.optional()});});var hn,q8=n(()=>{b();hn=e.object({capabilities:e.list(e.string()).optional()});});var im,Ww=n(()=>{b();im=e.enum_(["pending","running","completed","failed","cancelled"]);});var yn,eZ=n(()=>{b();se();Ww();yn=e.object({status:im,result:W.optional(),error:e.string().optional(),traceId:e.property("trace_id",e.string().optional())});});var Vw=n(()=>{$8();Y8();X8();Z8();q8();eZ();});var bn,am=n(()=>{b();bn=e.object({stream:e.string(),text:e.string()});});var nm={};L(nm,{Request:()=>cle});var cle,rZ=n(()=>{b();am();cle=e.list(bn);});var sm={};L(sm,{Response:()=>lle});var lle,tZ=n(()=>{b();am();lle=e.list(bn);});var Lw,Gw=n(()=>{b();Lw=e.enum_(["pending","running","completed","failed","cancelled"]);});var St,pm=n(()=>{b();se();om();Gw();St=e.object({id:e.string().optional(),runnerId:e.property("runner_id",e.string().optional()),agentName:e.property("agent_name",e.string().optional()),status:Lw.optional(),inputs:W.optional(),result:W.optional(),error:e.string().optional(),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),maskId:e.property("mask_id",e.string().optional()),promptMasks:e.property("prompt_masks",e.record(e.string(),e.string()).optional()),blueprintName:e.property("blueprint_name",e.string().optional()),metadata:gn.optional(),timeout:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),startedAt:e.property("started_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional())});});var cm={};L(cm,{Response:()=>mle});var mle,oZ=n(()=>{pm();mle=St.nullable();});var lm={};L(lm,{Request:()=>dle});var dle,iZ=n(()=>{b();dle=e.record(e.string(),e.unknown());});var mm={};L(mm,{Request:()=>ule});var ule,aZ=n(()=>{b();ule=e.record(e.string(),e.unknown());});var nZ=n(()=>{rZ();tZ();oZ();iZ();aZ();Vw();});var dm,sZ=n(()=>{b();dm=e.enum_(["pairing","connected","disconnected"]);});var Jw=n(()=>{Bw();Mw();sZ();Ww();});var hr={};L(hr,{BridgeCommandNextRequest:()=>mn,BridgeCommandResultRequest:()=>dn,BridgeCommandResultRequestStatus:()=>rm,BridgeCommandSubmitRequest:()=>un,BridgeCommandSubmitRequestType:()=>tm,CreateLocalRunnerJobRequest:()=>fn,ListRunnersRequestStatus:()=>dm,LocalRunnerHeartbeatRequest:()=>hn,LocalRunnerJobResultRequest:()=>yn,LocalRunnerJobResultRequestStatus:()=>im,appendJobLogs:()=>nm,getJobLogs:()=>sm,nextJob:()=>cm,patchChecklist:()=>lm,registerAgents:()=>mm});var pZ=n(()=>{nZ();Jw();});var Hw,Kw=n(()=>{b();Hw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Qw,Ow=n(()=>{b();Qw=e.enum_(["general","tool","llm","guardrail"]);});var Rn,$w=n(()=>{b();Or();Ze();Kw();Ow();Rn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:Qw.optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),usage:e.record(e.string(),e.number()).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),errorInfo:e.property("error_info",Oe.optional()),ttft:e.number().optional(),source:Hw.optional(),environment:e.string().optional()});});var xn,cZ=n(()=>{b();$w();xn=e.object({ids:e.list(e.string()),update:Rn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var vt,wn=n(()=>{b();vt=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var Yw,Xw=n(()=>{b();Yw=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Zw,qw=n(()=>{b();Zw=e.enum_(["general","tool","llm","guardrail"]);});var _n,e_=n(()=>{b();wn();ko();Xw();qw();_n=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:Zw.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",vt.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),ttft:e.number().optional(),source:Yw.optional(),environment:e.string().optional()});});var kn,lZ=n(()=>{b();e_();kn=e.object({spans:e.list(_n)});});var um,r_=n(()=>{b();um=e.enum_(["name","type","start_time","end_time","input","output","metadata","model","provider","tags","usage","error_info","created_at","created_by","last_updated_by","feedback_scores","comments","total_estimated_cost","total_estimated_cost_version","duration","ttft","source","environment"]);});var gm,t_=n(()=>{b();gm=e.enum_(["general","tool","llm","guardrail"]);});var An,mZ=n(()=>{b();Po();r_();t_();An=e.object({traceId:e.property("trace_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),type:gm.optional(),filters:e.list(Tr).optional(),limit:e.number().optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),truncate:e.boolean().optional(),exclude:e.list(um).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var o_=n(()=>{cZ();lZ();mZ();});var dZ=n(()=>{o_();});var fm,uZ=n(()=>{b();fm=e.enum_(["general","tool","llm","guardrail"]);});var hm,gZ=n(()=>{b();hm=e.enum_(["general","tool","llm","guardrail"]);});var ym,fZ=n(()=>{b();ym=e.enum_(["general","tool","llm","guardrail"]);});var i_=n(()=>{uZ();gZ();fZ();r_();t_();});var bm={};L(bm,{FindFeedbackScoreNames1RequestType:()=>fm,GetSpanStatsRequestType:()=>hm,GetSpansByProjectRequestType:()=>ym,SpanBatchUpdate:()=>xn,SpanBatchWrite:()=>kn,SpanSearchStreamRequestPublic:()=>An,SpanSearchStreamRequestPublicExcludeItem:()=>um,SpanSearchStreamRequestPublicType:()=>gm});var hZ=n(()=>{dZ();i_();});var Pn,yZ=n(()=>{b();Pn=e.object({query:e.string()});});var a_=n(()=>{yZ();});var bZ=n(()=>{a_();});var Rm={};L(Rm,{AnalyticsQueryRequest:()=>Pn});var RZ=n(()=>{bZ();});var zn,xZ=n(()=>{b();zn=e.object({workspaceIds:e.property("workspace_ids",e.list(e.string())),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),limit:e.number().optional()});});var n_=n(()=>{xZ();});var wZ=n(()=>{n_();});var xm={};L(xm,{UsageProjectsRequest:()=>zn});var _Z=n(()=>{wZ();});var Sn,kZ=n(()=>{b();Sn=e.object({ids:e.list(e.string()),projectId:e.property("project_id",e.string().optional())});});var vn,AZ=n(()=>{b();vn=e.object({projectName:e.property("project_name",e.string()),threadId:e.property("thread_id",e.string()),names:e.list(e.string()),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Tn,PZ=n(()=>{b();Tn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()))});});var s_,p_=n(()=>{b();s_=e.enum_(["ui","sdk","online_scoring"]);});var c_,l_=n(()=>{b();p_();c_=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:s_,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),threadId:e.property("thread_id",e.string())});});var jn,zZ=n(()=>{b();l_();jn=e.object({scores:e.list(c_)});});var m_,d_=n(()=>{b();m_=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var Cn,u_=n(()=>{b();Or();Ze();d_();Cn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional()),errorInfo:e.property("error_info",Oe.optional()),threadId:e.property("thread_id",e.string().optional()),ttft:e.number().optional(),source:m_.optional(),environment:e.string().optional()});});var En,SZ=n(()=>{b();u_();En=e.object({ids:e.list(e.string()),update:Cn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var g_,f_=n(()=>{b();g_=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var In,h_=n(()=>{b();wn();ko();f_();In=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:Qe.optional(),output:Qe.optional(),metadata:Qe.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",vt.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),source:g_.optional(),environment:e.string().optional()});});var Dn,vZ=n(()=>{b();h_();Dn=e.object({traces:e.list(In)});});var wm,y_=n(()=>{b();wm=e.enum_(["name","start_time","end_time","input","output","metadata","tags","error_info","usage","created_at","created_by","last_updated_by","feedback_scores","span_feedback_scores","comments","guardrails_validations","total_estimated_cost","span_count","llm_span_count","has_tool_spans","duration","ttft","thread_id","visibility_mode","providers","experiment","annotation_queues","source","environment"]);});var Un,TZ=n(()=>{b();zo();y_();Un=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(jr).optional(),lastRetrievedId:e.property("last_retrieved_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),exclude:e.list(wm).optional(),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var Nn,jZ=n(()=>{b();Nn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string().optional()),threadIds:e.property("thread_ids",e.list(e.string()).optional())});});var Fn,b_=n(()=>{b();Fn=e.object({tags:e.list(e.string()).optional(),tagsToAdd:e.property("tags_to_add",e.list(e.string()).optional()),tagsToRemove:e.property("tags_to_remove",e.list(e.string()).optional())});});var Bn,CZ=n(()=>{b();b_();Bn=e.object({ids:e.list(e.string()),update:Fn,mergeTags:e.property("merge_tags",e.boolean().optional())});});var R_,x_=n(()=>{b();R_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ir,Tt=n(()=>{b();x_();ir=e.object({field:e.string().optional(),operator:R_.optional(),key:e.string().optional(),value:e.string().optional()});});var Mn,EZ=n(()=>{b();Tt();Mn=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),filters:e.list(ir).optional(),lastRetrievedThreadModelId:e.property("last_retrieved_thread_model_id",e.string().optional()),limit:e.number().optional(),truncate:e.boolean().optional(),stripAttachments:e.property("strip_attachments",e.boolean().optional()),fromTime:e.property("from_time",e.date().optional()),toTime:e.property("to_time",e.date().optional())});});var w_=n(()=>{kZ();AZ();PZ();zZ();SZ();vZ();TZ();jZ();CZ();EZ();});var IZ=n(()=>{w_();});var __=n(()=>{y_();});var _m={};L(_m,{BatchDeleteByProject:()=>Sn,DeleteThreadFeedbackScores:()=>vn,DeleteTraceThreads:()=>Tn,FeedbackScoreBatchThread:()=>jn,TraceBatchUpdate:()=>En,TraceBatchWrite:()=>Dn,TraceSearchStreamRequestPublic:()=>Un,TraceSearchStreamRequestPublicExcludeItem:()=>wm,TraceThreadBatchIdentifier:()=>Nn,TraceThreadBatchUpdate:()=>Bn,TraceThreadSearchStreamRequest:()=>Mn});var DZ=n(()=>{IZ();__();});var k_,A_=n(()=>{b();k_=e.enum_(["query"]);});var jt,Wn=n(()=>{b();A_();jt=e.object({kind:k_,queryId:e.property("query_id",e.string()),columns:e.record(e.string(),e.string()).optional()});});var km,P_=n(()=>{b();km=e.enum_(["widget"]);});var Am,z_=n(()=>{b();Am=e.enum_(["user","ollie","agent"]);});var Pm,S_=n(()=>{b();Pm=e.enum_(["html"]);});var Vn,UZ=n(()=>{b();Wn();P_();z_();S_();Vn=e.object({area:km,name:e.string(),description:e.string().optional(),summary:e.string().optional(),author:Am.optional(),type:Pm,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),jt),html:e.string()});});var Ln,NZ=n(()=>{b();Ln=e.object({version:e.number()});});var Gn,FZ=n(()=>{b();Gn=e.object({name:e.string().optional(),description:e.string().optional()});});var zm,v_=n(()=>{b();zm=e.enum_(["user","ollie","agent"]);});var Sm,T_=n(()=>{b();Sm=e.enum_(["html"]);});var Jn,BZ=n(()=>{b();Wn();v_();T_();Jn=e.object({summary:e.string().optional(),author:zm.optional(),type:Sm,engineVersion:e.property("engine_version",e.number()),libraries:e.list(e.string()).optional(),inputs:e.record(e.string(),jt),html:e.string()});});var j_=n(()=>{UZ();NZ();FZ();BZ();});var MZ=n(()=>{j_();});var C_=n(()=>{P_();z_();S_();v_();T_();});var vm={};L(vm,{ViewCreate:()=>Vn,ViewCreateArea:()=>km,ViewCreateAuthor:()=>Am,ViewCreateType:()=>Pm,ViewCurrentVersion:()=>Ln,ViewUpdate:()=>Gn,ViewVersionCreate:()=>Jn,ViewVersionCreateAuthor:()=>zm,ViewVersionCreateType:()=>Sm});var WZ=n(()=>{MZ();C_();});var Hn,VZ=n(()=>{b();Hn=e.object({role:e.string().optional(),integrations:e.list(e.string()).optional(),email:e.string().optional(),joinBetaProgram:e.property("join_beta_program",e.boolean().optional())});});var E_=n(()=>{VZ();});var LZ=n(()=>{E_();});var Tm={};L(Tm,{WelcomeWizardSubmission:()=>Hn});var GZ=n(()=>{LZ();});var I_,D_=n(()=>{b();I_=e.enum_(["none","tags","metadata","name","error_info","error_type","model","provider","type","guardrail_name"]);});var U_,N_=n(()=>{b();D_();U_=e.object({field:I_.optional(),metadataKey:e.property("metadata_key",e.string().optional()),subMetric:e.property("sub_metric",e.string().optional())});});var F_,B_=n(()=>{b();F_=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ar,Ct=n(()=>{b();B_();ar=e.object({field:e.string().optional(),operator:F_.optional(),key:e.string().optional(),value:e.string().optional()});});var jm,M_=n(()=>{b();jm=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var Cm,W_=n(()=>{b();Cm=e.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var Kn,JZ=n(()=>{b();N_();Ct();M_();W_();Kn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),metricType:e.property("metric_type",Cm.optional()),interval:jm.optional(),breakdown:U_.optional(),filters:e.list(ar).optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date().optional()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var Qn,HZ=n(()=>{b();Qn=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional())});});var V_=n(()=>{JZ();HZ();});var KZ=n(()=>{V_();});var L_=n(()=>{M_();W_();});var Em={};L(Em,{WorkspaceSpanMetricRequest:()=>Kn,WorkspaceSpanMetricRequestInterval:()=>jm,WorkspaceSpanMetricRequestMetricType:()=>Cm,WorkspaceTokenUsageNamesRequest:()=>Qn});var QZ=n(()=>{KZ();L_();});var OZ=n(()=>{My();A5();Hy();j5();Ky();Qy();I5();$y();F5();Yy();M5();Xy();wb();J5();Tb();Q5();jb();Eb();eX();Ib();Ob();oX();yR();kX();wR();_R();SX();gx();BX();fx();WX();hx();yx();JX();bx();KX();Rx();jx();YX();e8();Lx();a8();Gx();Jx();m8();g8();Ox();y8();$x();Xx();w8();Zx();gw();v8();fw();Tw();W8();jw();L8();Cw();Iw();H8();Dw();Nw();O8();Fw();Vw();pZ();Jw();o_();hZ();i_();a_();RZ();n_();_Z();w_();DZ();__();j_();WZ();C_();E_();GZ();V_();QZ();L_();});var G_,J_=n(()=>{b();G_=e.enum_(["required","optional"]);});var H_,K_=n(()=>{b();J_();H_=e.object({name:e.string(),type:e.string(),presence:G_.optional()});});var Q_,O_=n(()=>{b();K_();Q_=e.object({name:e.string().optional(),description:e.string().optional(),language:e.string().optional(),executable:e.string().optional(),sourceFile:e.property("source_file",e.string().optional()),params:e.list(H_).optional(),timeout:e.number().optional()});});var $_,Y_=n(()=>{b();$_=e.enum_(["blueprint","mask"]);});var X_,Z_=n(()=>{b();X_=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var q_,ek=n(()=>{b();Z_();q_=e.object({key:e.string(),value:e.string().optional(),type:X_,description:e.string().optional()});});var rk,tk=n(()=>{b();Y_();ek();rk=e.object({id:e.string().optional(),name:e.string().optional(),type:$_,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(q_)});});var ok,ik=n(()=>{b();ok=e.enum_(["blueprint","mask"]);});var ak,nk=n(()=>{b();ak=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var sk,pk=n(()=>{b();nk();sk=e.object({key:e.string(),value:e.string().optional(),type:ak,description:e.string().optional()});});var Et,$Z=n(()=>{b();ik();pk();Et=e.object({id:e.string().optional(),name:e.string().optional(),type:ok,description:e.string().optional(),envs:e.list(e.string()).optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),values:e.list(sk)});});var ck,lk=n(()=>{b();ck=e.enum_(["blueprint","mask"]);});var mk,dk=n(()=>{b();mk=e.enum_(["string","integer","float","boolean","prompt","prompt_commit"]);});var uk,gk=n(()=>{b();dk();uk=e.object({key:e.string(),value:e.string().optional(),type:mk,description:e.string().optional()});});var fk,hk=n(()=>{b();lk();gk();fk=e.object({id:e.string().optional(),type:ck,description:e.string().optional(),values:e.list(uk)});});var Im,YZ=n(()=>{b();hk();Im=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),id:e.string().optional(),blueprint:fk});});var yk,bk=n(()=>{b();yk=e.enum_(["critical","high","medium","low"]);});var Rk,xk=n(()=>{b();Rk=e.enum_(["open","resolved","closed"]);});var wk,_k=n(()=>{b();bk();xk();wk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:Rk.optional(),severity:yk.optional(),tracesQuery:e.property("traces_query",e.string().optional()),totalOccurrences:e.property("total_occurrences",e.number().optional()),latestCount:e.property("latest_count",e.number().optional()),total:e.number().optional(),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),firstSeen:e.property("first_seen",e.string().optional()),lastSeen:e.property("last_seen",e.string().optional()),daysReported:e.property("days_reported",e.number().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var kk,Ak=n(()=>{b();se();kk=e.object({reportDay:e.property("report_day",e.string().optional()),count:e.number().optional(),totalCount:e.property("total_count",e.number().optional()),usersImpacted:e.property("users_impacted",e.number().optional()),totalUsers:e.property("total_users",e.number().optional()),metadata:W.optional()});});var Pk,XZ=n(()=>{b();_k();Pk=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(wk).optional()});});var zk,Sk=n(()=>{b();zk=e.enum_(["critical","high","medium","low"]);});var vk,Tk=n(()=>{b();vk=e.enum_(["open","resolved","closed"]);});var jk,ZZ=n(()=>{b();Ak();Sk();Tk();jk=e.object({id:e.string().optional(),name:e.string().optional(),description:e.string().optional(),cause:e.string().optional(),suggestedFix:e.property("suggested_fix",e.string().optional()),status:vk.optional(),severity:zk.optional(),tracesQuery:e.property("traces_query",e.string().optional()),closeNote:e.property("close_note",e.string().optional()),statusChangedBy:e.property("status_changed_by",e.string().optional()),statusChangedAt:e.property("status_changed_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),details:e.list(kk).optional()});});var Ck,Ek=n(()=>{b();Ck=e.enum_(["enabled","disabled"]);});var vo,qZ=n(()=>{b();Ek();vo=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:Ck.optional(),autoFirstRunEnrolled:e.property("auto_first_run_enrolled",e.boolean().optional()),autoFirstRunAt:e.property("auto_first_run_at",e.date().optional()),lastScanAt:e.property("last_scan_at",e.date().optional()),lastFailureReason:e.property("last_failure_reason",e.string().optional()),lastFailureDetail:e.property("last_failure_detail",e.string().optional()),lastFailedAt:e.property("last_failed_at",e.date().optional()),guidance:e.string().optional(),guidanceUpdatedBy:e.property("guidance_updated_by",e.string().optional()),guidanceUpdatedAt:e.property("guidance_updated_at",e.date().optional()),guidanceVersion:e.property("guidance_version",e.number().optional()),resultsGuidanceVersion:e.property("results_guidance_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Ee,$r=n(()=>{b();Ee=e.object({name:e.string(),value:e.number()});});var Cr,To=n(()=>{b();Cr=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var Ik,Dk=n(()=>{b();$r();To();Ik=e.object({experimentCount:e.property("experiment_count",e.number().optional()),traceCount:e.property("trace_count",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),duration:Cr.optional(),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),experimentScores:e.property("experiment_scores",e.list(Ee).optional()),passRateAvg:e.property("pass_rate_avg",e.number().optional()),passedCountSum:e.property("passed_count_sum",e.number().optional()),totalCountSum:e.property("total_count_sum",e.number().optional())});});var Uk,Nk=n(()=>{b();Uk=e.enum_(["general","slack","pagerduty"]);});var Fk,Bk=n(()=>{b();Fk=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Mk,Wk=n(()=>{b();Bk();Mk=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:Fk,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Vk,Lk=n(()=>{b();Vk=e.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var Gk,Jk=n(()=>{b();Wk();Lk();Gk=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",Vk),triggerConfigs:e.property("trigger_configs",e.list(Mk).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Hk,Kk=n(()=>{b();Hk=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var gle,e7=n(()=>{b();Nk();Jk();Kk();gle=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",Uk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:Hk,triggers:e.list(Gk).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var Qk,Ok=n(()=>{b();Qk=e.enum_(["general","slack","pagerduty"]);});var $k,Yk=n(()=>{b();$k=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var Xk,Zk=n(()=>{b();Yk();Xk=e.object({id:e.string().optional(),alertTriggerId:e.property("alert_trigger_id",e.string().optional()),type:$k,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var qk,eA=n(()=>{b();qk=e.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var rA,tA=n(()=>{b();Zk();eA();rA=e.object({id:e.string().optional(),alertId:e.property("alert_id",e.string().optional()),eventType:e.property("event_type",qk),triggerConfigs:e.property("trigger_configs",e.list(Xk).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var oA,iA=n(()=>{b();oA=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var On,aA=n(()=>{b();Ok();tA();iA();On=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",Qk.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:oA,triggers:e.list(rA).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),projectId:e.property("project_id",e.string().optional())});});var $n,r7=n(()=>{b();aA();$n=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(On).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var nA,sA=n(()=>{b();nA=e.enum_(["scope:project","threshold:feedback_score","threshold:cost","threshold:latency","threshold:errors","filter:guardrail_type"]);});var pA,cA=n(()=>{b();sA();pA=e.object({id:e.string().optional(),type:nA,configValue:e.property("config_value",e.record(e.string(),e.string()).optional()),groupIndex:e.property("group_index",e.number().optional())});});var lA,mA=n(()=>{b();lA=e.enum_(["trace:errors","trace:feedback_score","trace_thread:feedback_score","prompt:created","prompt:committed","trace:guardrails_triggered","prompt:deleted","experiment:finished","trace:cost","trace:latency"]);});var dA,uA=n(()=>{b();cA();mA();dA=e.object({id:e.string().optional(),eventType:e.property("event_type",lA),triggerConfigs:e.property("trigger_configs",e.list(pA).optional())});});var gA,fA=n(()=>{b();gA=e.enum_(["general","slack","pagerduty"]);});var hA,yA=n(()=>{b();hA=e.object({id:e.string().optional(),name:e.string().optional(),url:e.string(),secretToken:e.property("secret_token",e.string().optional()),headers:e.record(e.string(),e.string()).optional()});});var Yn,t7=n(()=>{b();uA();fA();yA();Yn=e.object({id:e.string().optional(),name:e.string().optional(),enabled:e.boolean().optional(),alertType:e.property("alert_type",gA.optional()),metadata:e.record(e.string(),e.string()).optional(),customFields:e.property("custom_fields",e.record(e.string(),e.string()).optional()),webhook:hA,triggers:e.list(dA).optional(),projectId:e.property("project_id",e.string().optional())});});var yr,o7=n(()=>{b();se();yr=e.object({results:e.list(W).optional()});});var bA,RA=n(()=>{b();bA=e.object({username:e.string().optional(),status:e.number().optional()});});var xA,wA=n(()=>{b();xA=e.enum_(["trace","thread"]);});var _A,kA=n(()=>{b();Kc();Qc();RA();wA();$r();_A=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:xA,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:Ji.optional(),annotatorView:e.property("annotator_view",Gi.optional()),reviewers:e.list(bA).optional(),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var AA,PA=n(()=>{b();AA=e.object({html:e.string().optional(),kitVersion:e.property("kit_version",e.number().optional()),summary:e.string().optional()});});var zA,SA=n(()=>{b();zA=e.enum_([">","<","="]);});var vA,TA=n(()=>{b();SA();vA=e.object({scoreName:e.property("score_name",e.string()),operator:zA,value:e.number()});});var jA,CA=n(()=>{b();TA();jA=e.object({conditions:e.list(vA)});});var EA,IA=n(()=>{b();CA();EA=e.object({groups:e.list(jA)});});var DA,UA=n(()=>{b();IA();DA=e.object({enabled:e.boolean().optional(),conditions:EA.optional(),maxItemsInQueue:e.property("max_items_in_queue",e.number().optional())});});var fle,i7=n(()=>{b();kA();fle=e.object({annotationQueues:e.property("annotation_queues",e.list(_A))});});var Dm,a7=n(()=>{b();Dm=e.object({ids:e.list(e.string())});});var NA,FA=n(()=>{b();NA=e.enum_(["manual","automated"]);});var BA,MA=n(()=>{b();FA();BA=e.object({id:e.string().optional(),source:NA.optional()});});var WA,n7=n(()=>{b();MA();WA=e.object({content:e.list(BA).optional()});});var VA,LA=n(()=>{b();VA=e.enum_(["trace","thread"]);});var GA,JA=n(()=>{b();GA=e.object({username:e.string().optional(),status:e.number().optional()});});var Yr,Xn=n(()=>{b();Yr=e.object({name:e.string(),value:e.number()});});var Zn,HA=n(()=>{b();PA();UA();LA();JA();Xn();Zn=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string().optional()),name:e.string(),description:e.string().optional(),instructions:e.string().optional(),scope:VA,commentsEnabled:e.property("comments_enabled",e.boolean().optional()),feedbackDefinitionNames:e.property("feedback_definition_names",e.list(e.string()).optional()),annotatorsPerItem:e.property("annotators_per_item",e.number().optional()),lockTimeoutSeconds:e.property("lock_timeout_seconds",e.number().optional()),automation:DA.optional(),annotatorView:e.property("annotator_view",AA.optional()),reviewers:e.list(GA).optional(),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),itemsCount:e.property("items_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var KA,s7=n(()=>{b();HA();KA=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Zn).optional(),sortableBy:e.list(e.string()).optional()});});var qn,Um=n(()=>{b();qn=e.object({id:e.string(),name:e.string()});});var QA,OA=n(()=>{b();QA=e.object({id:e.string(),name:e.string()});});var $A,YA=n(()=>{b();$A=e.object({value:e.string().optional(),passed:e.boolean().optional(),reason:e.string().optional()});});var XA,ZA=n(()=>{b();XA=e.object({name:e.string(),value:e.number()});});var qA,eP=n(()=>{b();qA=e.object({name:e.string(),value:e.number()});});var rP,tP=n(()=>{b();rP=e.enum_(["system","user","assistant","tool","function"]);});var oP,iP=n(()=>{b();oP=e.enum_(["function"]);});var es,Nm=n(()=>{b();Ro();iP();es=e.object({id:e.string().optional(),index:e.number().optional(),type:oP.optional(),function:zr.optional()});});var aP,nP=n(()=>{b();tP();Ro();Nm();aP=e.object({role:rP.optional(),content:e.string().optional(),reasoningContent:e.string().optional(),name:e.string().optional(),toolCalls:e.list(es).optional(),refusal:e.string().optional(),functionCall:zr.optional()});});var sP,pP=n(()=>{b();sP=e.object({link:e.string().optional(),fileName:e.property("file_name",e.string()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string())});});var cP,p7=n(()=>{b();pP();cP=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(sP).optional(),sortableBy:e.list(e.string()).optional()});});var lP,mP=n(()=>{b();lP=e.enum_(["running","failed"]);});var dP,uP=n(()=>{b();mP();dP=e.object({status:lP.optional()});});var gP,fP=n(()=>{b();gP=e.object({url:e.string()});});var hP,yP=n(()=>{b();hP=e.object({url:e.string()});});var bP,RP=n(()=>{b();bP=e.object({url:e.string()});});var xP,c7=n(()=>{b();xP=e.record(e.string(),e.unknown());});var wP,l7=n(()=>{b();wP=e.object({issuer:e.string().optional(),authorizationEndpoint:e.property("authorization_endpoint",e.string().optional()),tokenEndpoint:e.property("token_endpoint",e.string().optional()),revocationEndpoint:e.property("revocation_endpoint",e.string().optional()),registrationEndpoint:e.property("registration_endpoint",e.string().optional()),responseTypesSupported:e.property("response_types_supported",e.list(e.string()).optional()),grantTypesSupported:e.property("grant_types_supported",e.list(e.string()).optional()),codeChallengeMethodsSupported:e.property("code_challenge_methods_supported",e.list(e.string()).optional()),tokenEndpointAuthMethodsSupported:e.property("token_endpoint_auth_methods_supported",e.list(e.string()).optional())});});var _P,kP=n(()=>{b();_P=e.object({id:e.string().optional(),name:e.string().optional(),isDefault:e.property("is_default",e.boolean().optional())});});var AP,m7=n(()=>{b();kP();AP=e.object({clientName:e.property("client_name",e.string().optional()),clientLogoUri:e.property("client_logo_uri",e.string().optional()),workspaces:e.list(_P).optional(),csrfToken:e.property("csrf_token",e.string().optional())});});var PP,zP=n(()=>{b();PP=e.enum_(["evaluator","annotation_queue_router"]);});var SP,vP=n(()=>{b();SP=e.object({url:e.string(),detail:e.string().optional()});});var TP,jP=n(()=>{b();TP=e.object({url:e.string()});});var CP,EP=n(()=>{b();fP();vP();jP();CP=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",SP.optional()),videoUrl:e.property("video_url",TP.optional()),audioUrl:e.property("audio_url",gP.optional())});});var IP,DP=n(()=>{b();IP=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var It,rs=n(()=>{b();EP();DP();It=e.object({role:IP,content:e.string().optional(),contentArray:e.property("content_array",e.list(CP).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var UP,NP=n(()=>{b();UP=e.enum_(["decisions"]);});var Dt,ts=n(()=>{b();se();NP();Dt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",W.optional()),api:UP.optional()});});var FP,BP=n(()=>{b();FP=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Ut,os=n(()=>{b();BP();Ut=e.object({name:e.string(),type:FP,description:e.string()});});var is,Fm=n(()=>{b();rs();ts();os();is=e.object({model:Dt,messages:e.list(It),variables:e.record(e.string(),e.string()),schema:e.list(Ut),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var MP,WP=n(()=>{b();MP=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Er,jo=n(()=>{b();WP();Er=e.object({field:e.string().optional(),operator:MP.optional(),key:e.string().optional(),value:e.string().optional()});});var VP,LP=n(()=>{b();Fm();jo();VP=e.object({filters:e.list(Er).optional(),code:is.optional()});});var as,Bm=n(()=>{b();rs();ts();os();as=e.object({model:Dt,messages:e.list(It),variables:e.record(e.string(),e.string()),schema:e.list(Ut)});});var GP,JP=n(()=>{b();Ct();Bm();GP=e.object({filters:e.list(ar).optional(),code:as.optional()});});var ns,Mm=n(()=>{b();ns=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var HP,KP=n(()=>{b();Ct();Mm();HP=e.object({filters:e.list(ar).optional(),code:ns.optional()});});var ss,Wm=n(()=>{b();rs();ts();os();ss=e.object({model:Dt,messages:e.list(It),schema:e.list(Ut),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var QP,OP=n(()=>{b();Tt();Wm();QP=e.object({filters:e.list(ir).optional(),code:ss.optional()});});var ps,Vm=n(()=>{b();ps=e.object({metric:e.string()});});var $P,YP=n(()=>{b();Tt();Vm();$P=e.object({filters:e.list(ir).optional(),code:ps.optional()});});var XP,ZP=n(()=>{b();XP=e.enum_(["production","experiment","both"]);});var cs,Lm=n(()=>{b();cs=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var qP,ez=n(()=>{b();jo();Lm();qP=e.object({filters:e.list(Er).optional(),code:cs.optional()});});var rz,tz=n(()=>{b();rz=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var Co,hle,d7=n(()=>{b();zP();LP();JP();KP();OP();YP();ZP();ez();tz();Co=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(rz).optional(),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",XP.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:PP}),hle=e.union("type",{llm_as_judge:VP.extend(Co),user_defined_metric_python:qP.extend(Co),trace_thread_llm_as_judge:QP.extend(Co),trace_thread_user_defined_metric_python:$P.extend(Co),span_llm_as_judge:GP.extend(Co),span_user_defined_metric_python:HP.extend(Co)}).transform({transform:p=>p,untransform:p=>p});});var oz,iz=n(()=>{b();oz=e.object({url:e.string(),detail:e.string().optional()});});var az,nz=n(()=>{b();az=e.object({url:e.string()});});var sz,pz=n(()=>{b();yP();iz();nz();sz=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",oz.optional()),videoUrl:e.property("video_url",az.optional()),audioUrl:e.property("audio_url",hP.optional())});});var cz,lz=n(()=>{b();cz=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Nt,ls=n(()=>{b();pz();lz();Nt=e.object({role:cz,content:e.string().optional(),contentArray:e.property("content_array",e.list(sz).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var Pe,br=n(()=>{b();Pe=e.record(e.string(),e.unknown());});var mz,dz=n(()=>{b();mz=e.enum_(["decisions"]);});var Ft,ms=n(()=>{b();br();dz();Ft=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",Pe.optional()),api:mz.optional()});});var uz,gz=n(()=>{b();uz=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Bt,ds=n(()=>{b();gz();Bt=e.object({name:e.string(),type:uz,description:e.string()});});var fz,hz=n(()=>{b();ls();ms();ds();fz=e.object({model:Ft,messages:e.list(Nt),variables:e.record(e.string(),e.string()),schema:e.list(Bt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var us,Gm=n(()=>{b();hz();zo();us=e.object({filters:e.list(jr).optional(),code:fz.optional()});});var yz,bz=n(()=>{b();yz=e.object({url:e.string(),detail:e.string().optional()});});var Rz,xz=n(()=>{b();Rz=e.object({url:e.string()});});var wz,_z=n(()=>{b();RP();bz();xz();wz=e.object({type:e.string(),text:e.string().optional(),imageUrl:e.property("image_url",yz.optional()),videoUrl:e.property("video_url",Rz.optional()),audioUrl:e.property("audio_url",bP.optional())});});var kz,Az=n(()=>{b();kz=e.enum_(["SYSTEM","USER","AI","TOOL_EXECUTION_RESULT","CUSTOM"]);});var Mt,gs=n(()=>{b();_z();Az();Mt=e.object({role:kz,content:e.string().optional(),contentArray:e.property("content_array",e.list(wz).optional()),stringContent:e.property("string_content",e.boolean().optional()),structuredContent:e.property("structured_content",e.boolean().optional())});});var Pz,zz=n(()=>{b();Pz=e.enum_(["decisions"]);});var Wt,fs=n(()=>{b();vr();zz();Wt=e.object({name:e.string(),temperature:e.number().optional(),seed:e.number().optional(),customParameters:e.property("custom_parameters",Ce.optional()),api:Pz.optional()});});var Sz,vz=n(()=>{b();Sz=e.enum_(["BOOLEAN","INTEGER","DOUBLE"]);});var Vt,hs=n(()=>{b();vz();Vt=e.object({name:e.string(),type:Sz,description:e.string()});});var Tz,jz=n(()=>{b();gs();fs();hs();Tz=e.object({model:Wt,messages:e.list(Mt),variables:e.record(e.string(),e.string()),schema:e.list(Vt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var Cz,Ez=n(()=>{b();Cz=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var ys,Jm=n(()=>{b();Ez();ys=e.object({field:e.string().optional(),operator:Cz.optional(),key:e.string().optional(),value:e.string().optional()});});var Iz,Dz=n(()=>{b();jz();Jm();Iz=e.object({filters:e.list(ys).optional(),code:Tz.optional()});});var Uz,Nz=n(()=>{b();Uz=e.enum_(["evaluator","annotation_queue_router"]);});var Fz,Bz=n(()=>{b();Fz=e.enum_(["production","experiment","both"]);});var Mz,Wz=n(()=>{b();ls();ms();ds();Mz=e.object({model:Ft,messages:e.list(Nt),variables:e.record(e.string(),e.string()),schema:e.list(Bt)});});var bs,Hm=n(()=>{b();Po();Wz();bs=e.object({filters:e.list(Tr).optional(),code:Mz.optional()});});var Vz,Lz=n(()=>{b();Vz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var Rs,Km=n(()=>{b();Po();Lz();Rs=e.object({filters:e.list(Tr).optional(),code:Vz.optional()});});var Gz,Jz=n(()=>{b();ls();ms();ds();Gz=e.object({model:Ft,messages:e.list(Nt),schema:e.list(Bt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var xs,Qm=n(()=>{b();Oa();Jz();xs=e.object({filters:e.list(Pt).optional(),code:Gz.optional()});});var Hz,Kz=n(()=>{b();Hz=e.object({metric:e.string()});});var ws,Om=n(()=>{b();Oa();Kz();ws=e.object({filters:e.list(Pt).optional(),code:Hz.optional()});});var Qz,Oz=n(()=>{b();Qz=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var _s,$m=n(()=>{b();zo();Oz();_s=e.object({filters:e.list(jr).optional(),code:Qz.optional()});});var ks,Ym=n(()=>{b();ks=e.object({projectId:e.property("project_id",e.string()),projectName:e.property("project_name",e.string())});});var Eo,$z,Yz=n(()=>{b();Gm();Nz();Bz();Hm();Km();Qm();Om();$m();Ym();Eo=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ks).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",Fz.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:Uz}),$z=e.union("type",{llm_as_judge:us.extend(Eo),user_defined_metric_python:_s.extend(Eo),trace_thread_llm_as_judge:xs.extend(Eo),trace_thread_user_defined_metric_python:ws.extend(Eo),span_llm_as_judge:bs.extend(Eo),span_user_defined_metric_python:Rs.extend(Eo)}).transform({transform:p=>p,untransform:p=>p});});var Xz,u7=n(()=>{b();Yz();Xz=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list($z).optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Zz,qz=n(()=>{b();Zz=e.enum_(["evaluator","annotation_queue_router"]);});var eS,rS=n(()=>{b();eS=e.enum_(["production","experiment","both"]);});var Io,tS,g7=n(()=>{b();Gm();qz();rS();Hm();Km();Qm();Om();$m();Ym();Io=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projects:e.list(ks).optional(),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",eS.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),action:Zz}),tS=e.union("type",{llm_as_judge:us.extend(Io),user_defined_metric_python:_s.extend(Io),trace_thread_llm_as_judge:xs.extend(Io),trace_thread_user_defined_metric_python:ws.extend(Io),span_llm_as_judge:bs.extend(Io),span_user_defined_metric_python:Rs.extend(Io)}).transform({transform:p=>p,untransform:p=>p});});var oS,iS=n(()=>{b();oS=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var As,Xm=n(()=>{b();iS();As=e.object({field:e.string().optional(),operator:oS.optional(),key:e.string().optional(),value:e.string().optional()});});var aS,nS=n(()=>{b();gs();fs();hs();aS=e.object({model:Wt,messages:e.list(Mt),variables:e.record(e.string(),e.string()),schema:e.list(Vt)});});var sS,pS=n(()=>{b();Xm();nS();sS=e.object({filters:e.list(As).optional(),code:aS.optional()});});var cS,lS=n(()=>{b();cS=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var mS,dS=n(()=>{b();Xm();lS();mS=e.object({filters:e.list(As).optional(),code:cS.optional()});});var uS,gS=n(()=>{b();uS=e.enum_(["contains","not_contains","starts_with","ends_with","=","!=",">",">=","<","<=","is_empty","is_not_empty","in","not_in"]);});var Ps,Zm=n(()=>{b();gS();Ps=e.object({field:e.string().optional(),operator:uS.optional(),key:e.string().optional(),value:e.string().optional()});});var fS,hS=n(()=>{b();gs();fs();hs();fS=e.object({model:Wt,messages:e.list(Mt),schema:e.list(Vt),maxCostUsd:e.property("max_cost_usd",e.number().optional())});});var yS,bS=n(()=>{b();Zm();hS();yS=e.object({filters:e.list(Ps).optional(),code:fS.optional()});});var RS,xS=n(()=>{b();RS=e.object({metric:e.string()});});var wS,_S=n(()=>{b();Zm();xS();wS=e.object({filters:e.list(Ps).optional(),code:RS.optional()});});var kS,AS=n(()=>{b();kS=e.enum_(["evaluator","annotation_queue_router"]);});var PS,zS=n(()=>{b();Fm();jo();PS=e.object({filters:e.list(Er).optional(),code:is.optional()});});var SS,vS=n(()=>{b();Ct();Bm();SS=e.object({filters:e.list(ar).optional(),code:as.optional()});});var TS,jS=n(()=>{b();Ct();Mm();TS=e.object({filters:e.list(ar).optional(),code:ns.optional()});});var CS,ES=n(()=>{b();Tt();Wm();CS=e.object({filters:e.list(ir).optional(),code:ss.optional()});});var IS,DS=n(()=>{b();Tt();Vm();IS=e.object({filters:e.list(ir).optional(),code:ps.optional()});});var US,NS=n(()=>{b();US=e.enum_(["production","experiment","both"]);});var FS,BS=n(()=>{b();jo();Lm();FS=e.object({filters:e.list(Er).optional(),code:cs.optional()});});var Do,MS,f7=n(()=>{b();AS();zS();vS();jS();ES();DS();NS();BS();Do=e.object({name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",US.optional()),projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),action:kS}),MS=e.union("type",{llm_as_judge:PS.extend(Do),user_defined_metric_python:FS.extend(Do),trace_thread_llm_as_judge:CS.extend(Do),trace_thread_user_defined_metric_python:IS.extend(Do),span_llm_as_judge:SS.extend(Do),span_user_defined_metric_python:TS.extend(Do)}).transform({transform:p=>p,untransform:p=>p});});var WS,VS=n(()=>{b();WS=e.object({metric:e.string(),arguments:e.record(e.string(),e.string())});});var LS,GS=n(()=>{b();Jm();VS();LS=e.object({filters:e.list(ys).optional(),code:WS.optional()});});var JS,HS=n(()=>{b();JS=e.enum_(["evaluator","annotation_queue_router"]);});var KS,QS=n(()=>{b();KS=e.enum_(["production","experiment","both"]);});var Uo,OS,h7=n(()=>{b();Dz();pS();dS();bS();_S();GS();HS();QS();Uo=e.object({projectId:e.property("project_id",e.string().optional()),projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string(),samplingRate:e.property("sampling_rate",e.number().optional()),enabled:e.boolean().optional(),triggerScope:e.property("trigger_scope",KS.optional()),action:JS}),OS=e.union("type",{llm_as_judge:Iz.extend(Uo),user_defined_metric_python:LS.extend(Uo),trace_thread_llm_as_judge:yS.extend(Uo),trace_thread_user_defined_metric_python:wS.extend(Uo),span_llm_as_judge:sS.extend(Uo),span_user_defined_metric_python:mS.extend(Uo)}).transform({transform:p=>p,untransform:p=>p});});var $S,YS=n(()=>{b();$S=e.object({value:e.number().optional()});});var fe,y7=n(()=>{b();fe=e.object({ids:e.list(e.string())});});var XS,ZS=n(()=>{b();XS=e.object({workspaceId:e.property("workspace_id",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var No,b7=n(()=>{b();ZS();No=e.object({biInformation:e.property("bi_information",e.list(XS).optional())});});var qS,R7=n(()=>{b();tk();qS=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(rk).optional()});});var ev,rv=n(()=>{b();ev=e.object({trueLabel:e.string(),falseLabel:e.string()});});var tv,ov=n(()=>{b();rv();tv=e.object({details:ev.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var iv,av=n(()=>{b();iv=e.object({trueLabel:e.string(),falseLabel:e.string()});});var nv,sv=n(()=>{b();av();nv=e.object({details:iv.optional()});});var pv,cv=n(()=>{b();pv=e.object({trueLabel:e.string(),falseLabel:e.string()});});var zs,qm=n(()=>{b();cv();zs=e.object({details:pv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var lv,mv=n(()=>{b();lv=e.object({trueLabel:e.string(),falseLabel:e.string()});});var dv,uv=n(()=>{b();mv();dv=e.object({details:lv.optional()});});var gv,fv=n(()=>{b();gv=e.enum_(["pending","picked_up","completed","failed","timed_out"]);});var hv,yv=n(()=>{b();hv=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var bv,x7=n(()=>{b();fv();yv();se();bv=e.object({commandId:e.property("command_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional()),type:hv.optional(),status:gv.optional(),args:W.optional(),result:W.optional(),error:W.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional()),pickedUpAt:e.property("picked_up_at",e.date().optional()),completedAt:e.property("completed_at",e.date().optional()),durationMs:e.property("duration_ms",e.number().optional())});});var Rv,xv=n(()=>{b();Rv=e.enum_(["ReadFile","WriteFile","EditFile","ListFiles","SearchFiles","Exec"]);});var wv,_v=n(()=>{b();xv();se();wv=e.object({commandId:e.property("command_id",e.string().optional()),type:Rv.optional(),args:W.optional(),timeoutSeconds:e.property("timeout_seconds",e.number().optional()),submittedAt:e.property("submitted_at",e.date().optional())});});var kv,w7=n(()=>{b();_v();kv=e.object({commands:e.list(wv).optional()});});var Av,_7=n(()=>{b();Av=e.object({commandId:e.property("command_id",e.string().optional())});});var Pv,zv=n(()=>{b();Pv=e.object({categories:e.record(e.string(),e.number())});});var Sv,vv=n(()=>{b();zv();Sv=e.object({details:Pv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Tv,jv=n(()=>{b();Tv=e.object({categories:e.record(e.string(),e.number())});});var Cv,Ev=n(()=>{b();jv();Cv=e.object({details:Tv.optional()});});var Iv,Dv=n(()=>{b();Iv=e.object({categories:e.record(e.string(),e.number())});});var Ss,ed=n(()=>{b();Dv();Ss=e.object({details:Iv.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Uv,Nv=n(()=>{b();Uv=e.object({categories:e.record(e.string(),e.number())});});var Fv,Bv=n(()=>{b();Nv();Fv=e.object({details:Uv.optional()});});var Mv,Wv=n(()=>{b();Ro();Nm();Mv=e.object({role:e.string().optional(),content:e.string().optional(),reasoningContent:e.string().optional(),toolCalls:e.list(es).optional(),functionCall:zr.optional()});});var Vv,Lv=n(()=>{b();Vv=e.object({token:e.string().optional(),logprob:e.number().optional(),bytes:e.list(e.number()).optional()});});var Gv,Jv=n(()=>{b();Lv();Gv=e.object({content:e.list(Vv).optional()});});var Hv,Kv=n(()=>{b();nP();Wv();Jv();Hv=e.object({index:e.number().optional(),message:aP.optional(),delta:Mv.optional(),finishReason:e.string().optional(),logprobs:Gv.optional()});});var Qv,Ov=n(()=>{b();Qv=e.object({reasoningTokens:e.number().optional()});});var $v,Yv=n(()=>{b();$v=e.object({cachedTokens:e.number().optional(),cacheWriteTokens:e.number().optional()});});var Xv,Zv=n(()=>{b();Ov();Yv();Xv=e.object({totalTokens:e.number().optional(),promptTokens:e.number().optional(),promptTokensDetails:$v.optional(),completionTokens:e.number().optional(),completionTokensDetails:Qv.optional()});});var qv,k7=n(()=>{b();Kv();Zv();qv=e.object({id:e.string().optional(),created:e.number().optional(),model:e.string().optional(),choices:e.list(Hv).optional(),usage:Xv.optional(),systemFingerprint:e.string().optional(),serviceTier:e.string().optional()});});var eT,rT=n(()=>{b();eT=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var tT,oT=n(()=>{b();tT=e.enum_(["passed","failed"]);});var iT,aT=n(()=>{b();rT();oT();iT=e.object({name:eT.optional(),result:tT.optional()});});var nT,sT=n(()=>{b();nT=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var pT,cT=n(()=>{b();pT=e.enum_(["passed","failed"]);});var lT,mT=n(()=>{b();sT();cT();lT=e.object({name:nT.optional(),result:pT.optional()});});var dT,uT=n(()=>{b();dT=e.object({typeName:e.string().optional()});});var yle,A7=n(()=>{b();uT();yle=e.object({type:dT.optional(),closed:e.boolean().optional()});});var gT,fT=n(()=>{b();gT=e.object({typeName:e.string().optional()});});var ble,P7=n(()=>{b();fT();ble=e.object({type:gT.optional(),closed:e.boolean().optional()});});var hT,z7=n(()=>{b();hT=e.object({clientId:e.property("client_id",e.string().optional()),clientIdIssuedAt:e.property("client_id_issued_at",e.number().optional()),clientName:e.property("client_name",e.string().optional()),logoUri:e.property("logo_uri",e.string().optional()),softwareId:e.property("software_id",e.string().optional()),softwareVersion:e.property("software_version",e.string().optional()),clientUri:e.property("client_uri",e.string().optional()),redirectUris:e.property("redirect_uris",e.list(e.string()).optional()),tokenEndpointAuthMethod:e.property("token_endpoint_auth_method",e.string().optional()),grantTypes:e.property("grant_types",e.list(e.string()).optional()),responseTypes:e.property("response_types",e.list(e.string()).optional())});});var yT,bT=n(()=>{b();yT=e.enum_(["string","number","object","boolean","array","null"]);});var RT,xT=n(()=>{b();bT();RT=e.object({name:e.string().optional(),types:e.list(yT).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var wT,_T=n(()=>{b();wT=e.enum_(["string","number","object","boolean","array","null"]);});var kT,AT=n(()=>{b();_T();kT=e.object({name:e.string().optional(),types:e.list(wT).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var PT,zT=n(()=>{b();PT=e.enum_(["string","number","object","boolean","array","null"]);});var ST,vT=n(()=>{b();zT();ST=e.object({name:e.string().optional(),types:e.list(PT).optional(),filterFieldPrefix:e.property("filter_field_prefix",e.string().optional()),filterField:e.string().optional()});});var TT,jT=n(()=>{b();TT=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Lt,vs=n(()=>{b();Lt=e.object({id:e.string().optional(),text:e.string(),sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var CT,ET=n(()=>{b();CT=e.enum_(["trace","span"]);});var IT,DT=n(()=>{b();IT=e.object({eTag:e.property("e_tag",e.string()),partNumber:e.property("part_number",e.number())});});var rd,S7=n(()=>{b();ET();DT();rd=e.object({fileName:e.property("file_name",e.string()),projectName:e.property("project_name",e.string().optional()),entityType:e.property("entity_type",CT),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string().optional()),fileSize:e.property("file_size",e.number()),mimeType:e.property("mime_type",e.string().optional()),uploadId:e.property("upload_id",e.string()),uploadedFileParts:e.property("uploaded_file_parts",e.list(IT))});});var UT,v7=n(()=>{b();UT=e.object({redirectTo:e.property("redirect_to",e.string().optional())});});var NT,FT=n(()=>{b();NT=e.object({value:e.number().optional()});});var BT,T7=n(()=>{b();BT=e.object({sessionId:e.property("session_id",e.string().optional()),runnerId:e.property("runner_id",e.string().optional())});});var MT,WT=n(()=>{b();MT=e.object({key:e.string(),value:e.string().optional(),secret:e.boolean().optional()});});var VT,LT=n(()=>{b();VT=e.enum_(["workspace","insights"]);});var GT,JT=n(()=>{b();GT=e.enum_(["multi_project","experiments"]);});var nr,HT=n(()=>{b();LT();JT();br();nr=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),type:GT.optional(),scope:VT.optional(),description:e.string().optional(),config:Pe,createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var Gt,j7=n(()=>{b();HT();Gt=e.object({content:e.list(nr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var Ts,C7=n(()=>{b();Ts=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sql:e.string(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var KT,QT=n(()=>{b();KT=e.enum_(["multi_project","experiments"]);});var js,E7=n(()=>{b();QT();br();js=e.object({name:e.string().optional(),type:KT.optional(),description:e.string().optional(),config:Pe.optional()});});var Cs,I7=n(()=>{b();Cs=e.object({intervalStart:e.property("interval_start",e.date().optional()),intervalEnd:e.property("interval_end",e.date().optional())});});var OT,$T=n(()=>{b();OT=e.enum_(["multi_project","experiments"]);});var Es,D7=n(()=>{b();$T();vr();Es=e.object({projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string(),type:OT.optional(),description:e.string().optional(),config:Ce});});var Rle,U7=n(()=>{b();Rle=e.object({time:e.date(),value:e.number().optional()});});var YT,XT=n(()=>{b();YT=e.object({time:e.date(),value:e.number().optional()});});var ZT,qT=n(()=>{b();ZT=e.enum_(["unknown","processing","completed","failed"]);});var ej,rj=n(()=>{b();ej=e.enum_(["dataset","evaluation_suite"]);});var Is,td=n(()=>{b();Is=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var tj,oj=n(()=>{b();tj=e.enum_(["private","public"]);});var xle,N7=n(()=>{b();qT();rj();td();oj();xle=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),type:ej.optional(),visibility:tj.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:ZT.optional(),latestVersion:e.property("latest_version",Is.optional())});});var wle,F7=n(()=>{b();wle=e.object({model:e.string(),sampleCount:e.property("sample_count",e.number().optional()),preserveFields:e.property("preserve_fields",e.list(e.string()).optional()),variationInstructions:e.property("variation_instructions",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),maxCompletionTokens:e.property("max_completion_tokens",e.number().optional())});});var ij,aj=n(()=>{b();ij=e.enum_(["manual","trace","span","sdk"]);});var nj,sj=n(()=>{b();nj=e.enum_(["passed","failed"]);});var pj,cj=n(()=>{b();sj();pj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:nj.optional()});});var Ds,od=n(()=>{b();aj();xo();xt();gl();cj();se();Ds=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:ij,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Sr).optional(),executionPolicy:e.property("execution_policy",tr.optional()),experimentItems:e.property("experiment_items",e.list(za).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),pj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var lj,B7=n(()=>{b();od();lj=e.object({generatedSamples:e.property("generated_samples",e.list(Ds).optional()),model:e.string().optional(),totalGenerated:e.property("total_generated",e.number().optional()),generationTime:e.property("generation_time",e.date().optional())});});var _le,M7=n(()=>{b();od();_le=e.object({datasetName:e.property("dataset_name",e.string().optional()),datasetId:e.property("dataset_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),items:e.list(Ds),batchGroupId:e.property("batch_group_id",e.string().optional()),copyFromDatasetId:e.property("copy_from_dataset_id",e.string().optional()),copyFromVersionId:e.property("copy_from_version_id",e.string().optional())});});var mj,W7=n(()=>{b();mj=e.record(e.string(),e.unknown());});var dj,uj=n(()=>{b();dj=e.enum_(["manual","trace","span","sdk"]);});var gj,fj=n(()=>{b();gj=e.enum_(["llm_judge","code_metric"]);});var hj,yj=n(()=>{b();hj=e.record(e.string(),e.unknown());});var bj,Rj=n(()=>{b();fj();yj();bj=e.object({name:e.string(),type:gj,config:hj});});var Us,id=n(()=>{b();Us=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var xj,wj=n(()=>{b();xj=e.enum_(["passed","failed"]);});var _j,kj=n(()=>{b();_j=e.enum_(["default","hidden"]);});var Aj,Pj=n(()=>{b();Aj=e.enum_(["ui","sdk","online_scoring"]);});var zj,Sj=n(()=>{b();zj=e.enum_(["ui","sdk","online_scoring"]);});var vj,Tj=n(()=>{b();Sj();vj=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:zj.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var jj,Cj=n(()=>{b();Pj();Tj();jj=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:Aj,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),vj).optional())});});var Ns,Ej=n(()=>{b();Ns=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Ij,Dj=n(()=>{b();YA();jT();id();wj();kj();Cj();Ej();se();Ij=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),input:Ns.optional(),output:Ns.optional(),traceMetadata:e.property("trace_metadata",Ns.optional()),feedbackScores:e.property("feedback_scores",e.list(jj).optional()),comments:e.list(TT).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),duration:e.number().optional(),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",_j.optional()),description:e.string().optional(),executionPolicy:e.property("execution_policy",Us.optional()),assertionResults:e.property("assertion_results",e.list($A).optional()),status:xj.optional(),datasetItemData:e.property("dataset_item_data",W.optional())});});var Uj,Nj=n(()=>{b();Uj=e.enum_(["passed","failed"]);});var Fj,Bj=n(()=>{b();Nj();Fj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:Uj.optional()});});var Mj,Wj=n(()=>{b();uj();Rj();id();Dj();Bj();se();Mj=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:dj,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(bj).optional(),executionPolicy:e.property("execution_policy",Us.optional()),experimentItems:e.property("experiment_items",e.list(Ij).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),Fj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Vj,V7=n(()=>{b();AT();Wj();Vj=e.object({content:e.list(Mj).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(kT).optional(),sortableBy:e.list(e.string()).optional()});});var Lj,Gj=n(()=>{b();Lj=e.enum_(["manual","trace","span","sdk"]);});var Jj,Hj=n(()=>{b();Jj=e.enum_(["llm_judge","code_metric"]);});var Fs,ad=n(()=>{b();Hj();br();Fs=e.object({name:e.string(),type:Jj,config:Pe});});var Bs,nd=n(()=>{b();Bs=e.object({runsPerItem:e.property("runs_per_item",e.number().optional()),passThreshold:e.property("pass_threshold",e.number().optional())});});var Kj,Qj=n(()=>{b();Kj=e.enum_(["default","hidden"]);});var Ms,Oj=n(()=>{b();Qj();Ms=e.object({id:e.string().optional(),experimentId:e.property("experiment_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string()),traceId:e.property("trace_id",e.string()),projectId:e.property("project_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),traceVisibilityMode:e.property("trace_visibility_mode",Kj.optional())});});var $j,Yj=n(()=>{b();$j=e.enum_(["passed","failed"]);});var Xj,Zj=n(()=>{b();Yj();Xj=e.object({passedRuns:e.property("passed_runs",e.number().optional()),totalRuns:e.property("total_runs",e.number().optional()),status:$j.optional()});});var Ws,qj=n(()=>{b();Gj();ad();nd();Oj();Zj();se();Ws=e.object({id:e.string().optional(),datasetItemId:e.property("dataset_item_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),spanId:e.property("span_id",e.string().optional()),source:Lj,data:W,description:e.string().optional(),tags:e.list(e.string()).optional(),evaluators:e.list(Fs).optional(),executionPolicy:e.property("execution_policy",Bs.optional()),experimentItems:e.property("experiment_items",e.list(Ms).optional()),runSummariesByExperiment:e.property("run_summaries_by_experiment",e.record(e.string(),Xj).optional()),datasetId:e.property("dataset_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var eC,L7=n(()=>{b();vT();qj();eC=e.object({content:e.list(Ws).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),columns:e.list(ST).optional(),sortableBy:e.list(e.string()).optional()});});var rC,tC=n(()=>{b();rC=e.enum_(["unknown","processing","completed","failed"]);});var oC,iC=n(()=>{b();oC=e.enum_(["dataset","evaluation_suite"]);});var aC,nC=n(()=>{b();aC=e.enum_(["private","public"]);});var Vs,sd=n(()=>{b();Vs=e.object({id:e.string().optional(),versionHash:e.property("version_hash",e.string().optional()),versionName:e.property("version_name",e.string().optional()),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional()});});var Fo,sC=n(()=>{b();tC();iC();nC();sd();Fo=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),type:oC.optional(),visibility:aC.optional(),tags:e.list(e.string()).optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),experimentCount:e.property("experiment_count",e.number().optional()),datasetItemsCount:e.property("dataset_items_count",e.number().optional()),optimizationCount:e.property("optimization_count",e.number().optional()),mostRecentExperimentAt:e.property("most_recent_experiment_at",e.date().optional()),lastCreatedExperimentAt:e.property("last_created_experiment_at",e.date().optional()),mostRecentOptimizationAt:e.property("most_recent_optimization_at",e.date().optional()),lastCreatedOptimizationAt:e.property("last_created_optimization_at",e.date().optional()),status:rC.optional(),latestVersion:e.property("latest_version",Vs.optional())});});var Ls,G7=n(()=>{b();sC();Ls=e.object({content:e.list(Fo).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.list(e.string()).optional()});});var pC,cC=n(()=>{b();pC=e.object({itemsAdded:e.number().optional(),itemsModified:e.number().optional(),itemsDeleted:e.number().optional(),itemsUnchanged:e.number().optional()});});var lC,J7=n(()=>{b();cC();lC=e.object({fromVersion:e.property("from_version",e.string().optional()),toVersion:e.property("to_version",e.string().optional()),statistics:pC.optional()});});var Ir,mC=n(()=>{b();ad();nd();Ir=e.object({id:e.string().optional(),datasetId:e.property("dataset_id",e.string().optional()),versionHash:e.property("version_hash",e.string().optional()),tags:e.list(e.string()).optional(),isLatest:e.property("is_latest",e.boolean().optional()),versionName:e.property("version_name",e.string().optional()),itemsTotal:e.property("items_total",e.number().optional()),itemsAdded:e.property("items_added",e.number().optional()),itemsModified:e.property("items_modified",e.number().optional()),itemsDeleted:e.property("items_deleted",e.number().optional()),changeDescription:e.property("change_description",e.string().optional()),metadata:e.record(e.string(),e.string()).optional(),evaluators:e.list(Fs).optional(),executionPolicy:e.property("execution_policy",Bs.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var dC,H7=n(()=>{b();mC();dC=e.object({content:e.list(Ir).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var Gs,pd=n(()=>{b();Gs=e.object({day:e.string().optional(),count:e.number().optional()});});var uC,gC=n(()=>{b();uC=e.enum_(["trace","span"]);});var kle,K7=n(()=>{b();gC();kle=e.object({fileNames:e.property("file_names",e.list(e.string())),entityType:e.property("entity_type",uC),entityId:e.property("entity_id",e.string()),containerId:e.property("container_id",e.string())});});var Js,Q7=n(()=>{b();Js=e.object({name:e.string(),author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional())});});var Bo,O7=n(()=>{b();Bo=e.object({ids:e.list(e.string())});});var fC,hC=n(()=>{b();fC=e.object({accepted:e.boolean().optional(),levels:e.list(e.string()).optional(),default:e.string().optional()});});var Ale,$7=n(()=>{b();Ale=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var Hs,yC=n(()=>{b();Hs=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),color:e.string().optional(),position:e.number().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var bC,Y7=n(()=>{b();yC();bC=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Hs).optional(),sortableBy:e.list(e.string()).optional()});});var Ks,cd=n(()=>{b();Ks=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var RC,xC=n(()=>{b();RC=e.object({count:e.number().optional(),deviation:e.number().optional(),deviationPercentage:e.property("deviation_percentage",e.number().optional())});});var Jt,Qs=n(()=>{b();Jt=e.object({exceptionType:e.property("exception_type",e.string()),message:e.string().optional(),traceback:e.string()});});var wC,X7=n(()=>{b();wC=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var Ple,Z7=n(()=>{b();Ple=e.object({errors:e.list(e.string()).optional()});});var zle,q7=n(()=>{b();zle=e.object({errors:e.list(e.string()).optional()});});var Sle,eq=n(()=>{b();Sle=e.object({errors:e.list(e.string()).optional()});});var vle,rq=n(()=>{b();vle=e.object({code:e.number().optional(),message:e.string().optional(),details:e.string().optional()});});var Tle,tq=n(()=>{b();Tle=e.object({errors:e.list(e.string()).optional()});});var Os,oq=n(()=>{b();Os=e.object({exists:e.boolean().optional()});});var _C,kC=n(()=>{b();_C=e.enum_(["dataset","evaluation_suite"]);});var AC,PC=n(()=>{b();AC=e.enum_(["running","completed","cancelled","failed"]);});var zC,SC=n(()=>{b();zC=e.enum_(["regular","trial","mini-batch","mutation"]);});var jle,iq=n(()=>{b();ZA();wt();td();kC();dl();PC();SC();$r();Ze();To();xa();jle=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),type:zC.optional(),evaluationMethod:e.property("evaluation_method",_C.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),comments:e.list(ye).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Cr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:AC.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(ya).optional()),promptVersion:e.property("prompt_version",Qr.optional()),promptVersions:e.property("prompt_versions",e.list(Qr).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Is.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(XA).optional())});});var vC,TC=n(()=>{b();vC=e.object({experimentId:e.property("experiment_id",e.string().optional()),promptIndex:e.property("prompt_index",e.number().optional()),totalItems:e.property("total_items",e.number().optional())});});var jC,aq=n(()=>{b();TC();jC=e.object({experiments:e.list(vC).optional(),totalItems:e.property("total_items",e.number().optional())});});var CC,EC=n(()=>{b();Dk();CC=e.object({label:e.string().optional(),aggregations:Ik.optional()});});var IC,nq=n(()=>{b();EC();IC=e.object({content:e.record(e.string(),CC).optional()});});var DC,UC=n(()=>{b();DC=e.object({label:e.string().optional()});});var NC,FC=n(()=>{b();NC=e.object({groupSorting:e.property("group_sorting",e.list(e.string()).optional())});});var BC,MC=n(()=>{b();FC();BC=e.object({groupsDetails:e.property("groups_details",e.list(NC).optional())});});var WC,sq=n(()=>{b();UC();MC();WC=e.object({content:e.record(e.string(),DC).optional(),details:BC.optional()});});var VC,LC=n(()=>{b();VC=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var GC,JC=n(()=>{b();GC=e.enum_(["general","tool","llm","guardrail"]);});var $s,ld=n(()=>{b();wt();Or();_t();Ze();LC();JC();$s=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:GC.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Oe.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ve).optional()),comments:e.list(ye).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:VC.optional(),environment:e.string().optional()});});var HC,KC=n(()=>{b();HC=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var QC,OC=n(()=>{b();aT();QC=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(iT).optional()});});var $C,YC=n(()=>{b();$C=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var XC,ZC=n(()=>{b();XC=e.enum_(["default","hidden"]);});var Ys,md=n(()=>{b();Um();wt();Or();KC();_t();OC();Ze();YC();ZC();Ys=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:me.optional(),output:me.optional(),metadata:me.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Oe.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(ve).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(ve).optional()),comments:e.list(ye).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(QC).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",XC.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:HC.optional(),annotationQueues:e.property("annotation_queues",e.list(qn).optional()),source:$C.optional(),environment:e.string().optional()});});var qC,eE=n(()=>{b();_t();Ze();ld();md();qC=e.object({datasetItemId:e.property("dataset_item_id",e.string()),evaluateTaskResult:e.property("evaluate_task_result",me.optional()),trace:Ys.optional(),spans:e.list($s).optional(),feedbackScores:e.property("feedback_scores",e.list(ve).optional())});});var Cle,pq=n(()=>{b();eE();Cle=e.object({experimentName:e.property("experiment_name",e.string()),datasetName:e.property("dataset_name",e.string()),experimentId:e.property("experiment_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),items:e.list(qC)});});var rE,tE=n(()=>{b();rE=e.object({id:e.string(),name:e.string(),datasetId:e.property("dataset_id",e.string()),datasetItemId:e.property("dataset_item_id",e.string())});});var oE,iE=n(()=>{b();oE=e.enum_(["dataset","evaluation_suite"]);});var aE,nE=n(()=>{b();aE=e.enum_(["running","completed","cancelled","failed"]);});var sE,pE=n(()=>{b();sE=e.enum_(["regular","trial","mini-batch","mutation"]);});var cE,lE=n(()=>{b();cE=e.object({name:e.string(),value:e.number()});});var $e,Mo=n(()=>{b();$e=e.undiscriminatedUnion([e.record(e.string(),e.unknown()),e.list(e.record(e.string(),e.unknown())),e.string()]);});var Xs,dd=n(()=>{b();Xs=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var Zs,mE=n(()=>{b();eP();vs();sd();iE();nE();pE();lE();Xn();Mo();dd();Kl();Zs=e.object({id:e.string().optional(),datasetName:e.property("dataset_name",e.string().nullable()),datasetId:e.property("dataset_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),name:e.string().optional(),metadata:$e.optional(),tags:e.list(e.string()).optional(),type:sE.optional(),evaluationMethod:e.property("evaluation_method",oE.optional()),optimizationId:e.property("optimization_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),comments:e.list(Lt).optional(),traceCount:e.property("trace_count",e.number().optional()),datasetItemCount:e.property("dataset_item_count",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),duration:Xs.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostAvg:e.property("total_estimated_cost_avg",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),status:aE.optional(),finishedAt:e.property("finished_at",e.date().optional()),experimentScores:e.property("experiment_scores",e.list(cE).optional()),promptVersion:e.property("prompt_version",So.optional()),promptVersions:e.property("prompt_versions",e.list(So).optional()),datasetVersionId:e.property("dataset_version_id",e.string().optional()),datasetVersionSummary:e.property("dataset_version_summary",Vs.optional()),passRate:e.property("pass_rate",e.number().optional()),passedCount:e.property("passed_count",e.number().optional()),totalCount:e.property("total_count",e.number().optional()),assertionScores:e.property("assertion_scores",e.list(qA).optional())});});var qs,cq=n(()=>{b();mE();qs=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(Zs).optional(),sortableBy:e.list(e.string()).optional()});});var Ele,lq=n(()=>{se();Ele=W;});var dE,uE=n(()=>{b();dE=e.object({max:e.number(),min:e.number()});});var gE,fE=n(()=>{b();uE();gE=e.object({details:dE.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var hE,Ile,mq=n(()=>{b();ov();vv();fE();hE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),Ile=e.union("type",{numerical:gE.extend(hE),categorical:Sv.extend(hE),boolean:tv.extend(hE)}).transform({transform:p=>p,untransform:p=>p});});var yE,bE=n(()=>{b();yE=e.object({max:e.number(),min:e.number()});});var RE,xE=n(()=>{b();bE();RE=e.object({details:yE.optional()});});var wE,_E,dq=n(()=>{b();sv();Ev();xE();wE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),_E=e.union("type",{numerical:RE.extend(wE),categorical:Cv.extend(wE),boolean:nv.extend(wE)}).transform({transform:p=>p,untransform:p=>p});});var kE,AE=n(()=>{b();kE=e.object({max:e.number(),min:e.number()});});var ep,ud=n(()=>{b();AE();ep=e.object({details:kE.optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var PE,zE,SE=n(()=>{b();qm();ed();ud();PE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),zE=e.union("type",{numerical:ep.extend(PE),categorical:Ss.extend(PE),boolean:zs.extend(PE)}).transform({transform:p=>p,untransform:p=>p});});var vE,uq=n(()=>{b();SE();vE=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(zE).optional()});});var TE,jE,gq=n(()=>{b();qm();ed();ud();TE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),createdAt:e.date().optional(),createdBy:e.string().optional(),lastUpdatedAt:e.date().optional(),lastUpdatedBy:e.string().optional()}),jE=e.union("type",{numerical:ep.extend(TE),categorical:Ss.extend(TE),boolean:zs.extend(TE)}).transform({transform:p=>p,untransform:p=>p});});var CE,EE=n(()=>{b();CE=e.object({name:e.string(),value:e.number()});});var IE,DE=n(()=>{b();IE=e.enum_(["ui","sdk","online_scoring"]);});var UE,NE=n(()=>{b();DE();UE=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:IE,author:e.string().optional(),sourceQueueId:e.property("source_queue_id",e.string().optional()),id:e.string()});});var rp,fq=n(()=>{b();NE();rp=e.object({scores:e.list(UE)});});var FE,BE=n(()=>{b();FE=e.object({name:e.string().optional(),type:e.string().optional()});});var ME,hq=n(()=>{b();BE();ME=e.object({scores:e.list(FE).optional()});});var WE,VE=n(()=>{b();WE=e.object({name:e.string().optional(),type:e.string().optional()});});var Xr,yq=n(()=>{b();VE();Xr=e.object({scores:e.list(WE).optional()});});var LE,GE=n(()=>{b();LE=e.enum_(["ui","sdk","online_scoring"]);});var JE,HE=n(()=>{b();JE=e.enum_(["ui","sdk","online_scoring"]);});var KE,QE=n(()=>{b();HE();KE=e.object({value:e.number().optional(),reason:e.string().optional(),categoryName:e.property("category_name",e.string().optional()),source:JE.optional(),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),spanType:e.property("span_type",e.string().optional()),spanId:e.property("span_id",e.string().optional()),sourceQueueId:e.property("source_queue_id",e.string().optional()),author:e.string().optional()});});var Wo,gd=n(()=>{b();GE();QE();Wo=e.object({name:e.string(),categoryName:e.property("category_name",e.string().optional()),value:e.number(),reason:e.string().optional(),source:LE,sourceQueueId:e.property("source_queue_id",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),valueByAuthor:e.property("value_by_author",e.record(e.string(),KE).optional())});});var OE,$E=n(()=>{b();OE=e.object({max:e.number(),min:e.number()});});var YE,XE=n(()=>{b();$E();YE=e.object({details:OE.optional()});});var ZE,qE,bq=n(()=>{b();uv();Bv();XE();ZE=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional()}),qE=e.union("type",{numerical:YE.extend(ZE),categorical:Fv.extend(ZE),boolean:dv.extend(ZE)}).transform({transform:p=>p,untransform:p=>p});});var Vo,fd=n(()=>{b();Vo=e.object({accepted:e.boolean().optional()});});var eI,Rq=n(()=>{b();eI=e.object({reportId:e.string().optional()});});var rI,tI=n(()=>{b();rI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var oI,iI=n(()=>{b();oI=e.enum_(["passed","failed"]);});var aI,nI=n(()=>{b();tI();iI();se();aI=e.object({id:e.string().optional(),entityId:e.property("entity_id",e.string()),secondaryId:e.property("secondary_id",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:rI,result:oI,config:W,details:W});});var Dle,xq=n(()=>{b();nI();Dle=e.object({guardrails:e.list(aI)});});var sI,pI=n(()=>{b();sI=e.enum_(["queued","running","completed","failed","cancelled"]);});var Zr,hd=n(()=>{b();pI();Zr=e.object({id:e.string().optional(),modelId:e.property("model_id",e.string().optional()),status:sI.optional(),statusMessage:e.property("status_message",e.string().optional()),attempt:e.number().optional(),finishedAt:e.property("finished_at",e.date().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var tp,cI=n(()=>{b();hd();tp=e.object({id:e.string().optional(),name:e.string(),description:e.string(),servingRun:e.property("serving_run",Zr.optional()),latestRun:e.property("latest_run",Zr.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var lI,wq=n(()=>{b();cI();lI=e.object({content:e.list(tp).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var mI,dI=n(()=>{b();mI=e.enum_(["on_request","global"]);});var uI,gI=n(()=>{b();uI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var fI,hI=n(()=>{b();gI();se();fI=e.object({type:uI,config:W});});var Ule,_q=n(()=>{b();dI();hI();Ule=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",mI.optional()),rules:e.list(fI),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var yI,bI=n(()=>{b();yI=e.enum_(["on_request","global"]);});var RI,xI=n(()=>{b();RI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var wI,_I=n(()=>{b();xI();se();wI=e.object({type:RI,config:W});});var op,kI=n(()=>{b();bI();_I();op=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",yI.optional()),rules:e.list(wI),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var AI,kq=n(()=>{b();kI();AI=e.object({content:e.list(op).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),sortableBy:e.property("sortable_by",e.list(e.string()).optional())});});var PI,zI=n(()=>{b();PI=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var SI,vI=n(()=>{b();zI();se();SI=e.object({type:PI,config:W});});var TI,jI=n(()=>{b();TI=e.enum_(["on_request","global"]);});var yd,Aq=n(()=>{b();vI();jI();yd=e.object({id:e.string().optional(),name:e.string(),description:e.string().optional(),executionScope:e.property("execution_scope",TI.optional()),rules:e.list(SI)});});var CI,EI=n(()=>{b();mT();CI=e.object({spanId:e.property("span_id",e.string().optional()),checks:e.list(lT).optional()});});var II,DI=n(()=>{b();II=e.enum_(["TOPIC","PII","LLM_JUDGE","PROMPT_INJECTION","CUSTOM_CLASSIFIER"]);});var UI,NI=n(()=>{b();se();DI();UI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),type:II,validationConfig:e.property("validation_config",W),validationDetails:e.property("validation_details",W),error:e.string().optional()});});var FI,Pq=n(()=>{b();NI();FI=e.object({validationPassed:e.property("validation_passed",e.boolean().optional()),validations:e.list(UI)});});var BI,zq=n(()=>{b();hd();BI=e.object({content:e.list(Zr).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var MI,WI=n(()=>{b();MI=e.object({activeLocks:e.property("active_locks",e.number().optional()),lockedBy:e.property("locked_by",e.list(e.string()).optional())});});var VI,LI=n(()=>{b();VI=e.enum_(["count","errors","avg_duration","total_cost"]);});var GI,JI=n(()=>{b();LI();GI=e.object({type:VI.optional(),currentValue:e.property("current_value",e.number().optional()),previousValue:e.property("previous_value",e.number().optional())});});var HI,Sq=n(()=>{b();JI();HI=e.object({stats:e.list(GI).optional()});});var KI,QI=n(()=>{b();KI=e.enum_(["pairing","connected","disconnected"]);});var OI,$I=n(()=>{b();OI=e.enum_(["connect","endpoint"]);});var ip,YI=n(()=>{b();O_();se();QI();$I();ip=e.object({id:e.string().optional(),name:e.string().optional(),projectId:e.property("project_id",e.string().optional()),status:KI.optional(),connectedAt:e.property("connected_at",e.date().optional()),agents:e.list(Q_).optional(),capabilities:e.list(e.string()).optional(),checklist:W.optional(),type:OI.optional()});});var XI,vq=n(()=>{b();XI=e.object({cancelledJobIds:e.property("cancelled_job_ids",e.list(e.string()).optional())});});var ZI,Tq=n(()=>{b();pm();ZI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(St).optional()});});var qI,jq=n(()=>{b();YI();qI=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(ip).optional()});});var eD,Cq=n(()=>{b();eD=e.object({acquired:e.boolean().optional(),itemId:e.property("item_id",e.string().optional()),lockedBy:e.property("locked_by",e.string().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var rD,Eq=n(()=>{b();WI();rD=e.object({locks:e.record(e.string(),MI).optional()});});var tD,oD=n(()=>{b();tD=e.enum_(["INFO","WARN","ERROR","DEBUG","TRACE"]);});var iD,aD=n(()=>{b();oD();iD=e.object({timestamp:e.date().optional(),ruleId:e.property("rule_id",e.string().optional()),level:tD.optional(),message:e.string().optional(),markers:e.record(e.string(),e.string()).optional()});});var nD,Iq=n(()=>{b();aD();nD=e.object({content:e.list(iD).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var sD,pD=n(()=>{b();sD=e.enum_(["trace","thread","span"]);});var ap,Dq=n(()=>{b();pD();ap=e.object({projectId:e.property("project_id",e.string()),entityIds:e.property("entity_ids",e.list(e.string())),ruleIds:e.property("rule_ids",e.list(e.string())),entityType:e.property("entity_type",sD)});});var np,Uq=n(()=>{b();np=e.object({entitiesQueued:e.property("entities_queued",e.number().optional()),rulesApplied:e.property("rules_applied",e.number().optional())});});var qr,cD=n(()=>{b();qr=e.object({accepted:e.boolean().optional(),min:e.number().optional(),max:e.number().optional(),default:e.number().optional()});});var lD,mD=n(()=>{b();lD=e.enum_(["effortNoneOnly","refused"]);});var dD,uD=n(()=>{b();fd();mD();dD=e.object({chatCompletions:lD.optional(),forcedChoice:Vo.optional()});});var Ua,Nq=n(()=>{b();re();hC();fd();cD();uD();Ua=e.object({temperature:qr.optional(),topP:qr.optional(),topK:qr.optional(),frequencyPenalty:qr.optional(),presencePenalty:qr.optional(),maxOutputTokens:qr.optional(),stop:Vo.optional(),seed:Vo.optional(),effort:fC.optional(),tools:dD.optional(),samplingExclusive:e.boolean().optional(),thinksByDefault:e.boolean().optional(),onlyRoute:e.string().optional(),routes:e.record(e.string(),e.lazyObject(()=>Ua)).optional()});});var Nle,Fq=n(()=>{b();Nle=e.object({error:e.string().optional(),errorDescription:e.property("error_description",e.string().optional())});});var bd,Bq=n(()=>{b();bd=e.object({connected:e.boolean().optional(),version:e.string().optional(),errorMessage:e.property("error_message",e.string().optional())});});var Rd,Mq=n(()=>{b();Rd=e.object({baseUrl:e.property("base_url",e.string()),apiKey:e.property("api_key",e.string().optional())});});var gD,fD=n(()=>{b();gD=e.enum_(["pending","completed","failed"]);});var hD,yD=n(()=>{b();se();fD();hD=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),sessionId:e.property("session_id",e.string().optional()),content:e.string().optional(),recommendedActions:e.property("recommended_actions",W.optional()),status:gD.optional(),failureReason:e.property("failure_reason",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var bD,Wq=n(()=>{b();yD();bD=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(hD).optional()});});var RD,xD=n(()=>{b();RD=e.enum_(["running","completed","cancelled","initialized","error"]);});var wD,_D=n(()=>{b();se();wD=e.object({type:e.string(),parameters:W.optional()});});var kD,AD=n(()=>{b();_D();kD=e.object({metrics:e.list(wD)});});var PD,zD=n(()=>{b();se();PD=e.object({model:e.string(),parameters:W.optional()});});var SD,vD=n(()=>{b();se();SD=e.object({type:e.string(),parameters:W.optional()});});var TD,jD=n(()=>{b();TD=e.object({role:e.string(),content:e.string()});});var CD,ED=n(()=>{b();jD();CD=e.object({messages:e.list(TD)});});var ID,DD=n(()=>{b();AD();zD();vD();ED();ID=e.object({datasetName:e.property("dataset_name",e.string()),prompt:CD,llmModel:e.property("llm_model",PD),evaluation:kD,optimizer:SD});});var Fle,Vq=n(()=>{b();Or();$r();Ze();xD();DD();Fle=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:RD,metadata:me.optional(),studioConfig:e.property("studio_config",ID.optional()),errorInfo:e.property("error_info",Oe.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),experimentScores:e.property("experiment_scores",e.list(Ee).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var UD,ND=n(()=>{b();UD=e.enum_(["running","completed","cancelled","initialized","error"]);});var FD,BD=n(()=>{b();br();FD=e.object({type:e.string(),parameters:Pe.optional()});});var MD,WD=n(()=>{b();BD();MD=e.object({metrics:e.list(FD)});});var VD,LD=n(()=>{b();br();VD=e.object({model:e.string(),parameters:Pe.optional()});});var GD,JD=n(()=>{b();br();GD=e.object({type:e.string(),parameters:Pe.optional()});});var HD,KD=n(()=>{b();HD=e.object({role:e.string(),content:e.string()});});var QD,OD=n(()=>{b();KD();QD=e.object({messages:e.list(HD)});});var $D,YD=n(()=>{b();WD();LD();JD();OD();$D=e.object({datasetName:e.property("dataset_name",e.string()),prompt:QD,llmModel:e.property("llm_model",VD),evaluation:MD,optimizer:GD});});var sp,XD=n(()=>{b();Qs();Xn();Mo();ND();YD();sp=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:UD,metadata:$e.optional(),studioConfig:e.property("studio_config",$D.optional()),errorInfo:e.property("error_info",Jt.optional()),datasetId:e.property("dataset_id",e.string().optional()),numTrials:e.property("num_trials",e.number().optional()),feedbackScores:e.property("feedback_scores",e.list(Yr).optional()),experimentScores:e.property("experiment_scores",e.list(Yr).optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),baselineObjectiveScore:e.property("baseline_objective_score",e.number().optional()),bestObjectiveScore:e.property("best_objective_score",e.number().optional()),baselineDuration:e.property("baseline_duration",e.number().optional()),bestDuration:e.property("best_duration",e.number().optional()),baselineCost:e.property("baseline_cost",e.number().optional()),bestCost:e.property("best_cost",e.number().optional()),totalOptimizationCost:e.property("total_optimization_cost",e.number().optional())});});var pp,Lq=n(()=>{b();XD();pp=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(sp).optional(),sortableBy:e.list(e.string()).optional()});});var ZD,qD=n(()=>{b();vr();ZD=e.object({type:e.string(),parameters:Ce.optional()});});var eU,rU=n(()=>{b();qD();eU=e.object({metrics:e.list(ZD)});});var tU,oU=n(()=>{b();vr();tU=e.object({model:e.string(),parameters:Ce.optional()});});var iU,aU=n(()=>{b();vr();iU=e.object({type:e.string(),parameters:Ce.optional()});});var nU,sU=n(()=>{b();nU=e.object({role:e.string(),content:e.string()});});var pU,cU=n(()=>{b();sU();pU=e.object({messages:e.list(nU)});});var lU,mU=n(()=>{b();rU();oU();aU();cU();lU=e.object({datasetName:e.property("dataset_name",e.string()),prompt:pU,llmModel:e.property("llm_model",tU),evaluation:eU,optimizer:iU});});var dU,Gq=n(()=>{b();dU=e.object({url:e.string().optional(),lastModified:e.property("last_modified",e.date().optional()),expiresAt:e.property("expires_at",e.date().optional())});});var uU,gU=n(()=>{b();uU=e.enum_(["running","completed","cancelled","initialized","error"]);});var xd,Jq=n(()=>{b();wn();ko();mU();gU();xd=e.object({id:e.string().optional(),name:e.string().optional(),datasetName:e.property("dataset_name",e.string()),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),objectiveName:e.property("objective_name",e.string()),status:uU,metadata:Qe.optional(),studioConfig:e.property("studio_config",lU.optional()),errorInfo:e.property("error_info",vt.optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var fU,hU=n(()=>{b();pd();fU=e.object({series:e.list(Gs).optional()});});var yU,Hq=n(()=>{b();xT();yU=e.object({columns:e.list(RT).optional()});});var bU,RU=n(()=>{b();dd();bU=e.object({value:Xs.optional()});});var xU,wU=n(()=>{b();xU=e.object({p50:e.number().optional(),p90:e.number().optional(),p99:e.number().optional()});});var _U,kU=n(()=>{b();_U=e.object({permissionName:e.string().optional(),permissionValue:e.string().optional()});});var AU,PU=n(()=>{b();AU=e.enum_(["private","public"]);});var Ble,Kq=n(()=>{b();cd();$r();To();PU();Ble=e.object({id:e.string().optional(),name:e.string(),visibility:AU.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),duration:Cr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Ks.optional())});});var zU,SU=n(()=>{b();zU=e.enum_(["private","public"]);});var vU,Qq=n(()=>{b();xC();EE();wU();SU();vU=e.object({id:e.string().optional(),name:e.string(),visibility:zU.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional()),feedbackScores:e.property("feedback_scores",e.list(CE).optional()),duration:xU.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",RC.optional())});});var TU,jU=n(()=>{b();TU=e.enum_(["HOURLY","DAILY","WEEKLY","TOTAL"]);});var CU,EU=n(()=>{b();CU=e.enum_(["FEEDBACK_SCORES","TRACE_COUNT","TOKEN_USAGE","DURATION","COST","GUARDRAILS_FAILED_COUNT","THREAD_COUNT","THREAD_DURATION","THREAD_FEEDBACK_SCORES","SPAN_FEEDBACK_SCORES","SPAN_COUNT","SPAN_DURATION","SPAN_TOKEN_USAGE","TRACE_AVERAGE_DURATION","TRACE_ERROR_RATE","SPAN_AVERAGE_DURATION","SPAN_COST","SPAN_ERROR_RATE","THREAD_AVERAGE_DURATION","THREAD_COST"]);});var IU,DU=n(()=>{b();XT();IU=e.object({name:e.string().optional(),data:e.list(YT).optional()});});var UU,Oq=n(()=>{b();jU();EU();DU();UU=e.object({projectId:e.property("project_id",e.string().optional()),metricType:e.property("metric_type",CU.optional()),interval:TU.optional(),results:e.list(IU).optional()});});var NU,FU=n(()=>{b();NU=e.enum_(["private","public"]);});var cp,BU=n(()=>{b();FU();cp=e.object({id:e.string().optional(),name:e.string(),visibility:NU.optional(),description:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedTraceAt:e.property("last_updated_trace_at",e.date().optional())});});var MU,$q=n(()=>{b();BU();MU=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(cp).optional(),sortableBy:e.list(e.string()).optional()});});var WU,VU,LU=n(()=>{b();YS();FT();RU();WU=e.object({name:e.string().optional()}),VU=e.union("type",{PERCENTAGE:bU.extend(WU),COUNT:NT.extend(WU),AVG:$S.extend(WU)}).transform({transform:p=>p,untransform:p=>p});});var et,Yq=n(()=>{b();LU();et=e.object({stats:e.list(VU).optional()});});var GU,JU=n(()=>{b();cd();$r();To();GU=e.object({projectId:e.property("project_id",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Ee).optional()),duration:Cr.optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostSum:e.property("total_estimated_cost_sum",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),traceCount:e.property("trace_count",e.number().optional()),threadCount:e.property("thread_count",e.number().optional()),guardrailsFailedCount:e.property("guardrails_failed_count",e.number().optional()),errorCount:e.property("error_count",Ks.optional())});});var HU,Xq=n(()=>{b();JU();HU=e.object({content:e.list(GU).optional()});});var KU,QU=n(()=>{b();KU=e.enum_(["disabled","collecting","ready","too_large"]);});var OU,$U=n(()=>{b();pd();OU=e.object({id:e.string().optional(),name:e.string().optional(),definition:e.string().optional(),born:e.string().optional(),isNew:e.property("is_new",e.boolean().optional()),count:e.number().optional(),share:e.number().optional(),rank:e.number().optional(),series:e.list(Gs).optional()});});var YU,Zq=n(()=>{b();uP();hU();QU();$U();YU=e.object({status:KU.optional(),today:e.string().optional(),windowFrom:e.property("window_from",e.string().optional()),lastRunAt:e.property("last_run_at",e.date().optional()),attempt:dP.optional(),vectorsInWindow:e.property("vectors_in_window",e.number().optional()),minVectors:e.property("min_vectors",e.number().optional()),totalTraces:e.property("total_traces",e.number().optional()),labelledFrom:e.property("labelled_from",e.string().optional()),topics:e.list(OU).optional(),other:fU.optional()});});var XU,ZU=n(()=>{b();XU=e.enum_(["text","chat"]);});var qU,eN=n(()=>{b();qU=e.enum_(["mustache","jinja2","python"]);});var rN,tN=n(()=>{b();rN=e.enum_(["text","chat"]);});var oN,iN=n(()=>{b();oN=e.enum_(["mustache","jinja2","python"]);});var aN,nN=n(()=>{b();aN=e.enum_(["prompt_version","mask"]);});var wd,sN=n(()=>{b();se();tN();iN();nN();wd=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:W.optional(),type:oN.optional(),versionType:e.property("version_type",aN.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),variables:e.list(e.string()).optional(),templateStructure:e.property("template_structure",rN.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Mle,qq=n(()=>{b();se();ZU();eN();sN();Mle=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),description:e.string().optional(),template:e.string().optional(),metadata:W.optional(),changeDescription:e.property("change_description",e.string().optional()),type:qU.optional(),templateStructure:e.property("template_structure",XU.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",wd.optional()),requestedVersion:e.property("requested_version",wd.optional())});});var pN,cN=n(()=>{b();pN=e.enum_(["text","chat"]);});var _d,eee=n(()=>{b();cN();qa();_d=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",pN.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional()),latestVersion:e.property("latest_version",Be.optional()),requestedVersion:e.property("requested_version",Be.optional())});});var lN,mN=n(()=>{b();lN=e.enum_(["text","chat"]);});var dN,uN=n(()=>{b();mN();dN=e.object({id:e.string().optional(),name:e.string(),projectId:e.property("project_id",e.string().optional()),description:e.string().optional(),templateStructure:e.property("template_structure",lN.optional()),tags:e.list(e.string()).optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),versionCount:e.property("version_count",e.number().optional())});});var lp,ree=n(()=>{b();uN();lp=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(dN).optional(),sortableBy:e.list(e.string()).optional()});});var gN,fN=n(()=>{b();gN=e.enum_(["text","chat"]);});var hN,yN=n(()=>{b();hN=e.enum_(["mustache","jinja2","python"]);});var bN,RN=n(()=>{b();bN=e.enum_(["prompt_version","mask"]);});var xN,wN=n(()=>{b();br();fN();yN();RN();xN=e.object({id:e.string().optional(),promptId:e.property("prompt_id",e.string().optional()),commit:e.string().optional(),versionNumber:e.property("version_number",e.string().optional()),template:e.string(),metadata:Pe.optional(),type:hN.optional(),versionType:e.property("version_type",bN.optional()),environment:e.string().optional(),environments:e.list(e.string()).optional(),changeDescription:e.property("change_description",e.string().optional()),tags:e.list(e.string()).optional(),templateStructure:e.property("template_structure",gN.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var _N,tee=n(()=>{b();wN();_N=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(xN).optional(),sortableBy:e.list(e.string()).optional()});});var kN,AN=n(()=>{b();kN=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var Wle,oee=n(()=>{b();AN();Na();Wle=e.object({id:e.string().optional(),provider:kN,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",At.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var PN,zN=n(()=>{b();PN=e.enum_(["openai","anthropic","gemini","openrouter","vertex-ai","bedrock","ollama","custom-llm","opik-free"]);});var SN,vN=n(()=>{b();SN=e.enum_(["form","json","basic"]);});var TN,jN=n(()=>{b();WT();vN();TN=e.object({tokenUrl:e.property("token_url",e.string().optional()),sendAs:e.property("send_as",SN.optional()),credentials:e.list(MT).optional(),tokenField:e.property("token_field",e.string().optional()),expiresField:e.property("expires_field",e.string().optional()),fallbackTtlSeconds:e.property("fallback_ttl_seconds",e.number().optional())});});var mp,CN=n(()=>{b();zN();jN();mp=e.object({id:e.string().optional(),provider:PN,apiKey:e.property("api_key",e.string().optional()),name:e.string().optional(),providerName:e.property("provider_name",e.string().optional()),headers:e.record(e.string(),e.string()).optional(),configuration:e.record(e.string(),e.string()).optional(),baseUrl:e.property("base_url",e.string().optional()),authConfig:e.property("auth_config",TN.optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),readOnly:e.property("read_only",e.boolean().optional())});});var EN,iee=n(()=>{b();CN();EN=e.object({size:e.number().optional(),total:e.number().optional(),content:e.list(mp).optional(),sortableBy:e.list(e.string()).optional()});});var IN,DN=n(()=>{b();IN=e.enum_(["trace_daily","experiment","dataset_version","test_suite_version","alert_event","optimization","prompt_version"]);});var UN,NN=n(()=>{b();DN();UN=e.object({type:IN.optional(),id:e.string().optional(),name:e.string().optional(),resourceId:e.property("resource_id",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional())});});var FN,aee=n(()=>{b();NN();FN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(UN).optional()});});var BN,MN=n(()=>{b();BN=e.enum_(["agent_insights"]);});var dp,WN=n(()=>{b();MN();dp=e.object({id:e.string().optional(),type:BN,projectId:e.property("project_id",e.string()),reason:e.string(),detail:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional())});});var VN,nee=n(()=>{b();WN();VN=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(dp).optional()});});var up,see=n(()=>{b();up=e.object({projectId:e.property("project_id",e.string().optional()),enabled:e.boolean().optional(),scheduleTime:e.property("schedule_time",e.string().optional()),customPrompt:e.property("custom_prompt",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional())});});var LN,pee=n(()=>{b();LN=e.object({enrolled:e.number().optional(),cleared:e.number().optional(),unknownProjectIds:e.property("unknown_project_ids",e.list(e.string()).optional()),alreadyRunProjectIds:e.property("already_run_project_ids",e.list(e.string()).optional()),resetProjectIds:e.property("reset_project_ids",e.list(e.string()).optional())});});var Dr,kd=n(()=>{b();Dr=e.object({name:e.string().optional(),current:e.number().optional(),previous:e.number().optional()});});var GN,JN=n(()=>{b();GN=e.enum_(["organization","workspace","project"]);});var HN,KN=n(()=>{b();HN=e.enum_(["short_14d","base_60d","extended_400d","unlimited"]);});var Lo,QN=n(()=>{b();JN();KN();Lo=e.object({id:e.string().optional(),workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),level:GN.optional(),retention:HN,applyToPast:e.property("apply_to_past",e.boolean().optional()),enabled:e.boolean().optional(),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),catchUpCursor:e.property("catch_up_cursor",e.string().optional()),catchUpDone:e.property("catch_up_done",e.boolean().optional())});});var ON,cee=n(()=>{b();QN();ON=e.object({content:e.list(Lo).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var gp,lee=n(()=>{b();gp=e.object({query:e.string(),projectId:e.property("project_id",e.string().optional())});});var $N,mee=n(()=>{b();$N=e.object({pythonEvaluatorEnabled:e.boolean(),traceThreadPythonEvaluatorEnabled:e.boolean(),spanLlmAsJudgeEnabled:e.boolean(),spanUserDefinedMetricPythonEnabled:e.boolean(),guardrailsEnabled:e.boolean(),guardrailsValidationsEnabled:e.boolean(),guardrailsTrainingEnabled:e.boolean(),opikAiEnabled:e.property("opikAIEnabled",e.boolean()),alertsEnabled:e.boolean(),welcomeWizardEnabled:e.boolean(),exportEnabled:e.boolean(),costIntelligenceEnabled:e.boolean(),modelPricesEnabled:e.boolean(),datasetVersioningEnabled:e.boolean(),datasetExportEnabled:e.boolean(),demoDataEnabled:e.boolean(),openaiProviderEnabled:e.boolean(),anthropicProviderEnabled:e.boolean(),geminiProviderEnabled:e.boolean(),openrouterProviderEnabled:e.boolean(),vertexaiProviderEnabled:e.boolean(),bedrockProviderEnabled:e.boolean(),customllmProviderEnabled:e.boolean(),ollamaProviderEnabled:e.boolean(),ollieEnabled:e.boolean(),agentInsightsEnabled:e.boolean(),agentInsightsGuidanceEnabled:e.boolean(),projectHomepageEnabled:e.boolean(),annotationQueueAutomationEnabled:e.boolean(),eventBridgeAlertsEnabled:e.boolean(),defaultPageSize:e.number().optional(),customChartsEnabledForWorkspace:e.boolean().optional(),topicsEnabled:e.boolean().optional()});});var Vle,dee=n(()=>{b();ld();Vle=e.object({spans:e.list($s)});});var YN,XN=n(()=>{b();YN=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var ZN,qN=n(()=>{b();ZN=e.enum_(["general","tool","llm","guardrail"]);});var fp,eF=n(()=>{b();vs();Qs();gd();Mo();XN();qN();fp=e.object({id:e.string().optional(),projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),traceId:e.property("trace_id",e.string().optional()),parentSpanId:e.property("parent_span_id",e.string().optional()),name:e.string().optional(),type:ZN.optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),model:e.string().optional(),provider:e.string().optional(),tags:e.list(e.string()).optional(),usage:e.record(e.string(),e.number()).optional(),errorInfo:e.property("error_info",Jt.optional()),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Wo).optional()),comments:e.list(Lt).optional(),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),totalEstimatedCostVersion:e.property("total_estimated_cost_version",e.string().optional()),duration:e.number().optional(),ttft:e.number().optional(),source:YN.optional(),environment:e.string().optional()});});var rF,uee=n(()=>{b();eF();rF=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(fp).optional(),sortableBy:e.list(e.string()).optional()});});var tF,oF=n(()=>{b();tF=e.object({workspace:e.string().optional(),spanCount:e.property("span_count",e.number().optional())});});var iF,gee=n(()=>{b();oF();iF=e.object({workspacesSpansCount:e.property("workspaces_spans_count",e.list(tF).optional())});});var aF,fee=n(()=>{b();aF=e.object({uploadId:e.property("upload_id",e.string()),preSignUrls:e.property("pre_sign_urls",e.list(e.string()))});});var nF,hee=n(()=>{b();nF=e.object({accessToken:e.property("access_token",e.string().optional()),refreshToken:e.property("refresh_token",e.string().optional()),tokenType:e.property("token_type",e.string().optional()),expiresIn:e.property("expires_in",e.number().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional())});});var hp,yee=n(()=>{b();hp=e.object({names:e.list(e.string()).optional()});});var Lle,bee=n(()=>{b();md();Lle=e.object({traces:e.list(Ys)});});var sF,pF=n(()=>{b();sF=e.object({workspace:e.string().optional(),traceCount:e.property("trace_count",e.number().optional())});});var cF,Ree=n(()=>{b();pF();cF=e.object({workspacesTracesCount:e.property("workspaces_traces_count",e.list(sF).optional())});});var lF,mF=n(()=>{b();lF=e.enum_(["sdk","experiment","playground","optimization","evaluator"]);});var dF,uF=n(()=>{b();dF=e.enum_(["default","hidden"]);});var yp,gF=n(()=>{b();OA();vs();Qs();tE();gd();EI();Mo();mF();uF();yp=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),name:e.string().optional(),startTime:e.property("start_time",e.date()),endTime:e.property("end_time",e.date().optional()),input:$e.optional(),output:$e.optional(),metadata:$e.optional(),tags:e.list(e.string()).optional(),errorInfo:e.property("error_info",Jt.optional()),usage:e.record(e.string(),e.number()).optional(),createdAt:e.property("created_at",e.date().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),feedbackScores:e.property("feedback_scores",e.list(Wo).optional()),spanFeedbackScores:e.property("span_feedback_scores",e.list(Wo).optional()),comments:e.list(Lt).optional(),guardrailsValidations:e.property("guardrails_validations",e.list(CI).optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),spanCount:e.property("span_count",e.number().optional()),duration:e.number().optional(),ttft:e.number().optional(),threadId:e.property("thread_id",e.string().optional()),visibilityMode:e.property("visibility_mode",dF.optional()),llmSpanCount:e.property("llm_span_count",e.number().optional()),hasToolSpans:e.property("has_tool_spans",e.boolean().optional()),providers:e.list(e.string()).optional(),experiment:rE.optional(),annotationQueues:e.property("annotation_queues",e.list(QA).optional()),source:lF.optional(),environment:e.string().optional()});});var fF,xee=n(()=>{b();gF();fF=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(yp).optional(),sortableBy:e.list(e.string()).optional()});});var hF,yF=n(()=>{b();hF=e.enum_(["active","inactive"]);});var bp,bF=n(()=>{b();Um();wt();_t();Ze();yF();bp=e.object({id:e.string().optional(),projectId:e.property("project_id",e.string().optional()),threadModelId:e.property("thread_model_id",e.string().optional()),startTime:e.property("start_time",e.date().optional()),endTime:e.property("end_time",e.date().optional()),duration:e.number().optional(),firstMessage:e.property("first_message",me.optional()),lastMessage:e.property("last_message",me.optional()),feedbackScores:e.property("feedback_scores",e.list(ve).optional()),status:hF.optional(),numberOfMessages:e.property("number_of_messages",e.number().optional()),totalEstimatedCost:e.property("total_estimated_cost",e.number().optional()),usage:e.record(e.string(),e.number()).optional(),comments:e.list(ye).optional(),tags:e.list(e.string()).optional(),annotationQueues:e.property("annotation_queues",e.list(qn).optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),createdBy:e.property("created_by",e.string().optional()),createdAt:e.property("created_at",e.date().optional()),environment:e.string().optional()});});var Ad,wee=n(()=>{b();Ad=e.object({projectName:e.property("project_name",e.string().optional()),projectId:e.property("project_id",e.string().optional()),threadId:e.property("thread_id",e.string()),truncate:e.boolean().optional()});});var RF,_ee=n(()=>{b();bF();RF=e.object({page:e.number().optional(),size:e.number().optional(),total:e.number().optional(),content:e.list(bp).optional(),sortableBy:e.list(e.string()).optional()});});var xF,wF=n(()=>{b();xF=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),projectName:e.property("project_name",e.string().optional()),user:e.string().optional(),count:e.number().optional()});});var _F,kee=n(()=>{b();wF();_F=e.object({breakdown:e.list(xF).optional()});});var kF,AF=n(()=>{b();kF=e.object({workspaceId:e.property("workspace_id",e.string().optional()),projectId:e.property("project_id",e.string().optional()),name:e.string().optional()});});var PF,Aee=n(()=>{b();AF();PF=e.object({projects:e.list(kF).optional()});});var zF,Pee=n(()=>{b();zF=e.object({userName:e.property("user_name",e.string().optional()),workspaceId:e.property("workspace_id",e.string().optional()),workspaceName:e.property("workspace_name",e.string().optional()),resource:e.string().optional(),expiresAt:e.property("expires_at",e.date().optional())});});var SF,vF=n(()=>{b();SF=e.enum_(["widget"]);});var TF,jF=n(()=>{b();TF=e.enum_(["user","ollie","agent"]);});var CF,EF=n(()=>{b();CF=e.enum_(["html"]);});var Go,IF=n(()=>{b();Wn();jF();EF();Go=e.object({viewId:e.property("view_id",e.string().optional()),version:e.number().optional(),author:TF.optional(),summary:e.string().optional(),type:CF.optional(),engineVersion:e.property("engine_version",e.number().optional()),inputs:e.record(e.string(),jt).optional(),libraries:e.list(e.string()).optional(),html:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var Jo,zee=n(()=>{b();vF();IF();Jo=e.object({id:e.string().optional(),area:SF.optional(),name:e.string().optional(),description:e.string().optional(),currentVersion:e.property("current_version",e.number().optional()),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional()),lastUpdatedAt:e.property("last_updated_at",e.date().optional()),lastUpdatedBy:e.property("last_updated_by",e.string().optional()),version:Go.optional()});});var DF,UF=n(()=>{b();DF=e.enum_(["user","ollie","agent"]);});var NF,FF=n(()=>{b();UF();NF=e.object({version:e.number().optional(),author:DF.optional(),summary:e.string().optional(),createdAt:e.property("created_at",e.date().optional()),createdBy:e.property("created_by",e.string().optional())});});var BF,See=n(()=>{b();FF();BF=e.object({content:e.list(NF).optional(),page:e.number().optional(),size:e.number().optional(),total:e.number().optional()});});var MF,vee=n(()=>{b();MF=e.object({responseExamples:e.property("response_examples",e.record(e.string(),e.record(e.string(),e.unknown())).optional())});});var WF,VF=n(()=>{b();WF=e.enum_(["success","failure"]);});var LF,Tee=n(()=>{b();VF();LF=e.object({status:WF.optional(),statusCode:e.property("status_code",e.number().optional()),requestBody:e.property("request_body",e.string().optional()),errorMessage:e.property("error_message",e.string().optional())});});var GF,jee=n(()=>{b();GF=e.object({completed:e.boolean().optional()});});var Rp,Cee=n(()=>{b();Rp=e.object({timeoutToMarkThreadAsInactive:e.property("timeout_to_mark_thread_as_inactive",e.string().optional()),truncationOnTables:e.property("truncation_on_tables",e.boolean().optional()),colorMap:e.property("color_map",e.record(e.string(),e.string()).optional())});});var Gle,Eee=n(()=>{b();Gle=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),name:e.string().optional(),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var xp,Iee=n(()=>{b();kd();xp=e.object({results:e.list(Dr).optional()});});var Ho,Dee=n(()=>{b();Ho=e.object({projectIds:e.property("project_ids",e.list(e.string()).optional()),intervalStart:e.property("interval_start",e.date()),intervalEnd:e.property("interval_end",e.date()),startBeforeEnd:e.property("start_before_end",e.boolean().optional())});});var JF,Uee=n(()=>{b();kd();JF=e.object({results:e.list(Dr).optional()});});var HF,Nee=n(()=>{b();HF=e.object({workspaceName:e.property("workspace_name",e.string().optional())});});var KF,Fee=n(()=>{b();kU();KF=e.object({userName:e.string().optional(),workspaceName:e.string().optional(),permissions:e.list(_U).optional()});});var Bee=n(()=>{O_();tk();Y_();$Z();ik();hk();lk();YZ();By();ek();Z_();pk();nk();gk();dk();_k();Ak();XZ();bk();xk();ZZ();Sk();Tk();qZ();Ek();Dk();e7();Nk();r7();aA();Ok();Jk();Wk();Zk();Yk();Bk();cA();sA();Lk();tA();eA();uA();mA();t7();fA();o7();kA();Kc();PA();qy();Qc();UA();cb();i7();a7();MA();FA();n7();s7();HA();LA();Um();OA();RA();JA();wA();db();mb();XR();Sb();kb();Pb();YA();ZA();eP();nP();tP();pP();p7();uP();mP();fP();yP();RP();c7();l7();m7();d7();zP();LP();Gm();Dz();Yz();Nz();Bz();u7();g7();qz();rS();JP();Hm();pS();KP();Km();dS();OP();Qm();bS();YP();Om();_S();ZP();f7();AS();zS();vS();jS();ES();DS();NS();BS();ez();$m();GS();h7();HS();QS();YS();y7();ZS();b7();R7();ov();sv();qm();uv();rv();av();cv();mv();N_();D_();ow();rw();x7();w7();_v();xv();fv();_7();yv();vv();Ev();ed();Bv();zv();jv();Dv();Nv();Kv();k7();aT();rT();mT();sT();cT();oT();A7();P7();fT();uT();z7();xT();AT();_T();vT();zT();bT();wt();jT();vs();S7();ET();Ov();bb();CA();ab();xb();IA();sb();v7();FT();T7();Ex();WT();Nx();j7();HT();LT();JT();C7();E7();QT();I7();D7();$T();U7();XT();N7();F7();B7();xR();RR();od();M7();W7();Wj();uj();al();tR();V7();L7();qj();Gj();aj();iR();uR();nR();G7();sC();tC();iC();nC();qT();rj();J7();cC();H7();mC();td();sd();oj();pd();K7();gC();Q7();O7();Wv();hC();$7();Y7();yC();cd();xC();Or();ul();Qs();wn();X7();Z7();q7();eq();rq();tq();xo();Rj();fj();ad();Hj();Yb();lR();pR();xt();id();nd();dR();oq();iq();kC();aq();nq();sq();TC();gl();eE();$R();pq();Dj();wj();kj();Oj();Qj();KC();tE();qR();rx();cq();mE();iE();nE();pE();cj();Bj();Nj();Zj();Yj();sj();dl();lE();cx();PC();SC();SR();AR();zR();lq();mq();dq();uq();SE();gq();_t();$r();EE();Xn();fq();NE();DE();l_();p_();Cj();Pj();FR();CR();hq();yq();gd();GE();ox();bq();fd();tl();Ro();Rq();UC();EC();FC();MC();nI();xq();cI();wq();tI();_q();dI();kq();kI();bI();hI();_I();xI();gI();vI();zI();Aq();jI();iI();OC();EI();Pq();hd();zq();pI();Px();wx();kx();vP();iz();bz();WI();Ze();Ej();_a();Mo();ko();se();yj();yw();br();vr();Fb();Sq();JI();LI();Fm();hz();jz();rs();EP();pz();_z();ls();lz();DP();gs();Az();ts();NP();ms();dz();fs();zz();os();ds();gz();BP();hs();vz();YI();vq();pm();om();Tq();Gw();am();jq();QI();$I();Cq();Eq();aD();oD();Iq();Lv();Jv();Dq();pD();Uq();ol();Nq();DT();cD();fE();xE();ud();XE();uE();bE();AE();$E();Fq();Bq();Mq();Kx();yD();Wq();fD();Vq();Lq();XD();ND();xD();DD();YD();mU();Gq();Jq();gU();hU();Hq();K_();J_();RU();To();wU();dd();kU();Kq();Qq();SU();Oq();jU();EU();$q();BU();FU();tz();Ym();LU();Yq();Xq();JU();Zq();QU();PU();qq();Ub();eee();cN();ree();uN();mN();ZU();Yv();eN();TR();sN();qa();Rw();ww();kw();xa();Kl();lx();tee();wN();fN();yN();RN();tN();iN();zw();nN();oee();iee();AN();CN();zN();Na();jN();vN();Dx();Wx();Bx();NN();DN();aee();Jy();Ly();WN();nee();MN();see();pee();Vb();Mb();kd();DU();cee();QN();JN();KN();lee();hb();gb();TA();SA();ob();rb();BE();VE();mee();ld();dee();Zb();GR();MR();VR();Ct();B_();Po();aw();Xm();iS();Bm();Wz();nS();uee();eF();XN();qN();LC();gee();JC();$w();Kw();Ow();Mm();Lz();lS();e_();Xw();qw();fee();Gb();AD();WD();rU();zD();LD();oU();jD();KD();sU();_D();BD();qD();vD();JD();aU();ED();OD();cU();hee();yee();Qb();Nm();iP();uD();mD();Hb();$U();md();bee();Ree();eR();QR();HR();jo();WP();zo();sw();Jm();Ez();xee();gF();mF();uF();YC();bF();Tt();x_();Oa();cw();Zm();gS();wee();Wm();Jz();hS();_ee();yF();b_();Vm();Kz();xS();u_();d_();ZC();h_();f_();Zv();kee();Aee();Lm();Oz();VS();Pee();Tx();Sx();NI();DI();sx();Tj();Sj();UR();IR();QE();HE();ax();jP();nz();xz();zee();vF();Wn();A_();IF();jF();See();FF();UF();EF();Kk();vee();iA();Tee();VF();yA();jee();Cee();kP();Eee();Iee();Dee();Uee();Nee();AF();wF();oF();pF();Fee();});var J={};L(J,{ActivateRequest:()=>Ha,Agent:()=>Q_,AgentBlueprintHistory:()=>rk,AgentBlueprintHistoryType:()=>$_,AgentBlueprintPublic:()=>Et,AgentBlueprintPublicType:()=>ok,AgentBlueprintWrite:()=>fk,AgentBlueprintWriteType:()=>ck,AgentConfigCreateWrite:()=>Im,AgentConfigEnv:()=>Fy,AgentConfigEnvSetByName:()=>Ei,AgentConfigEnvUpdate:()=>Ii,AgentConfigRemoveValues:()=>Di,AgentConfigValueHistory:()=>q_,AgentConfigValueHistoryType:()=>X_,AgentConfigValuePublic:()=>sk,AgentConfigValuePublicType:()=>ak,AgentConfigValueWrite:()=>uk,AgentConfigValueWriteType:()=>mk,AgentInsightsGuidanceUpdate:()=>Bi,AgentInsightsIssue:()=>wk,AgentInsightsIssueDetail:()=>kk,AgentInsightsIssuePage:()=>Pk,AgentInsightsIssueSeverity:()=>yk,AgentInsightsIssueStatus:()=>Rk,AgentInsightsIssueUpdate:()=>Ui,AgentInsightsIssueUpdateStatus:()=>Fc,AgentInsightsIssueWithDetails:()=>jk,AgentInsightsIssueWithDetailsSeverity:()=>zk,AgentInsightsIssueWithDetailsStatus:()=>vk,AgentInsightsJob:()=>vo,AgentInsightsJobStatus:()=>Ck,AgentInsightsJobUpdate:()=>Mi,AgentInsightsJobUpdateStatus:()=>Lc,AgentInsightsReport:()=>Ni,AggregationData:()=>Ik,Alert:()=>gle,AlertAlertType:()=>Uk,AlertPagePublic:()=>$n,AlertPublic:()=>On,AlertPublicAlertType:()=>Qk,AlertTrigger:()=>Gk,AlertTriggerConfig:()=>Mk,AlertTriggerConfigPublic:()=>Xk,AlertTriggerConfigPublicType:()=>$k,AlertTriggerConfigType:()=>Fk,AlertTriggerConfigWrite:()=>pA,AlertTriggerConfigWriteType:()=>nA,AlertTriggerEventType:()=>Vk,AlertTriggerPublic:()=>rA,AlertTriggerPublicEventType:()=>qk,AlertTriggerWrite:()=>dA,AlertTriggerWriteEventType:()=>lA,AlertWrite:()=>Yn,AlertWriteAlertType:()=>gA,AnalyticsQueryRequest:()=>Pn,AnalyticsQueryResponse:()=>yr,AnnotationQueue:()=>_A,AnnotationQueueAnnotatorView:()=>Gi,AnnotationQueueAnnotatorViewPublic:()=>AA,AnnotationQueueAnnotatorViewWrite:()=>Zy,AnnotationQueueAutomation:()=>Ji,AnnotationQueueAutomationPublic:()=>DA,AnnotationQueueAutomationWrite:()=>pb,AnnotationQueueBatch:()=>fle,AnnotationQueueBatchWrite:()=>Vi,AnnotationQueueItemIds:()=>Dm,AnnotationQueueItemIdsPublic:()=>Li,AnnotationQueueItemPublic:()=>BA,AnnotationQueueItemPublicSource:()=>NA,AnnotationQueueItemsPublic:()=>WA,AnnotationQueuePagePublic:()=>KA,AnnotationQueuePublic:()=>Zn,AnnotationQueuePublicScope:()=>VA,AnnotationQueueReference:()=>qn,AnnotationQueueReferencePublic:()=>QA,AnnotationQueueReviewer:()=>bA,AnnotationQueueReviewerPublic:()=>GA,AnnotationQueueScope:()=>xA,AnnotationQueueUpdate:()=>Hi,AnnotationQueueWrite:()=>Wi,AnnotationQueueWriteScope:()=>lb,AssertionResult:()=>YR,AssertionResultBatch:()=>Ki,AssertionResultBatchEntityType:()=>$c,AssertionResultBatchItem:()=>zb,AssertionResultBatchItemSource:()=>_b,AssertionResultBatchItemStatus:()=>Ab,AssertionResultCompare:()=>$A,AssertionScoreAverage:()=>XA,AssertionScoreAveragePublic:()=>qA,AssistantMessage:()=>aP,AssistantMessageRole:()=>rP,Attachment:()=>sP,AttachmentListRequestEntityType:()=>qc,AttachmentPage:()=>cP,Attempt:()=>dP,AttemptStatus:()=>lP,AudioUrl:()=>gP,AudioUrlPublic:()=>hP,AudioUrlWrite:()=>bP,AuthDetailsHolder:()=>xP,AuthorizationServerMetadata:()=>wP,AuthorizeContext:()=>AP,AutomationRuleEvaluator:()=>hle,AutomationRuleEvaluatorAction:()=>PP,AutomationRuleEvaluatorLlmAsJudge:()=>VP,AutomationRuleEvaluatorLlmAsJudgePublic:()=>us,AutomationRuleEvaluatorLlmAsJudgeWrite:()=>Iz,AutomationRuleEvaluatorObjectObjectPublic:()=>$z,AutomationRuleEvaluatorObjectObjectPublicAction:()=>Uz,AutomationRuleEvaluatorObjectObjectPublicTriggerScope:()=>Fz,AutomationRuleEvaluatorPagePublic:()=>Xz,AutomationRuleEvaluatorPublic:()=>tS,AutomationRuleEvaluatorPublicAction:()=>Zz,AutomationRuleEvaluatorPublicTriggerScope:()=>eS,AutomationRuleEvaluatorSpanLlmAsJudge:()=>GP,AutomationRuleEvaluatorSpanLlmAsJudgePublic:()=>bs,AutomationRuleEvaluatorSpanLlmAsJudgeWrite:()=>sS,AutomationRuleEvaluatorSpanUserDefinedMetricPython:()=>HP,AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic:()=>Rs,AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite:()=>mS,AutomationRuleEvaluatorTraceThreadLlmAsJudge:()=>QP,AutomationRuleEvaluatorTraceThreadLlmAsJudgePublic:()=>xs,AutomationRuleEvaluatorTraceThreadLlmAsJudgeWrite:()=>yS,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPython:()=>$P,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonPublic:()=>ws,AutomationRuleEvaluatorTraceThreadUserDefinedMetricPythonWrite:()=>wS,AutomationRuleEvaluatorTriggerScope:()=>XP,AutomationRuleEvaluatorUpdate:()=>MS,AutomationRuleEvaluatorUpdateAction:()=>kS,AutomationRuleEvaluatorUpdateLlmAsJudge:()=>PS,AutomationRuleEvaluatorUpdateSpanLlmAsJudge:()=>SS,AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython:()=>TS,AutomationRuleEvaluatorUpdateTraceThreadLlmAsJudge:()=>CS,AutomationRuleEvaluatorUpdateTraceThreadUserDefinedMetricPython:()=>IS,AutomationRuleEvaluatorUpdateTriggerScope:()=>US,AutomationRuleEvaluatorUpdateUserDefinedMetricPython:()=>FS,AutomationRuleEvaluatorUserDefinedMetricPython:()=>qP,AutomationRuleEvaluatorUserDefinedMetricPythonPublic:()=>_s,AutomationRuleEvaluatorUserDefinedMetricPythonWrite:()=>LS,AutomationRuleEvaluatorWrite:()=>OS,AutomationRuleEvaluatorWriteAction:()=>JS,AutomationRuleEvaluatorWriteTriggerScope:()=>KS,AvgValueStatPublic:()=>$S,BatchDelete:()=>fe,BatchDeleteByProject:()=>Sn,BiInformation:()=>XS,BiInformationResponse:()=>No,BlueprintPageHistory:()=>qS,BooleanFeedbackDefinition:()=>tv,BooleanFeedbackDefinitionCreate:()=>nv,BooleanFeedbackDefinitionPublic:()=>zs,BooleanFeedbackDefinitionUpdate:()=>dv,BooleanFeedbackDetail:()=>ev,BooleanFeedbackDetailCreate:()=>iv,BooleanFeedbackDetailPublic:()=>pv,BooleanFeedbackDetailUpdate:()=>lv,BreakdownConfig:()=>U_,BreakdownConfigField:()=>I_,BreakdownConfigPublic:()=>tw,BreakdownConfigPublicField:()=>ew,BridgeCommand:()=>bv,BridgeCommandBatchResponse:()=>kv,BridgeCommandItem:()=>wv,BridgeCommandItemType:()=>Rv,BridgeCommandNextRequest:()=>mn,BridgeCommandResultRequest:()=>dn,BridgeCommandResultRequestStatus:()=>rm,BridgeCommandStatus:()=>gv,BridgeCommandSubmitRequest:()=>un,BridgeCommandSubmitRequestType:()=>tm,BridgeCommandSubmitResponse:()=>Av,BridgeCommandType:()=>hv,CategoricalFeedbackDefinition:()=>Sv,CategoricalFeedbackDefinitionCreate:()=>Cv,CategoricalFeedbackDefinitionPublic:()=>Ss,CategoricalFeedbackDefinitionUpdate:()=>Fv,CategoricalFeedbackDetail:()=>Pv,CategoricalFeedbackDetailCreate:()=>Tv,CategoricalFeedbackDetailPublic:()=>Iv,CategoricalFeedbackDetailUpdate:()=>Uv,ChatCompletionChoice:()=>Hv,ChatCompletionRequest:()=>Yi,ChatCompletionResponse:()=>qv,Check:()=>iT,CheckName:()=>eT,CheckPublic:()=>lT,CheckPublicName:()=>nT,CheckPublicResult:()=>pT,CheckResult:()=>tT,ChunkedOutputJsonNode:()=>yle,ChunkedOutputJsonNodePublic:()=>ble,ChunkedOutputJsonNodePublicType:()=>gT,ChunkedOutputJsonNodeType:()=>dT,ClientRegistrationRequest:()=>Wa,ClientRegistrationResponse:()=>hT,Column:()=>RT,ColumnCompare:()=>kT,ColumnCompareTypesItem:()=>wT,ColumnPublic:()=>ST,ColumnPublicTypesItem:()=>PT,ColumnTypesItem:()=>yT,Comment:()=>ye,CommentCompare:()=>TT,CommentPublic:()=>Lt,CompleteMultipartUploadRequest:()=>rd,CompleteMultipartUploadRequestEntityType:()=>CT,CompletionTokensDetails:()=>Qv,ConditionGroup:()=>yb,ConditionGroupPublic:()=>jA,ConditionGroupWrite:()=>ib,Conditions:()=>Rb,ConditionsPublic:()=>EA,ConditionsWrite:()=>nb,ConsentRequest:()=>Va,ConsentResponse:()=>UT,CountValueStatPublic:()=>NT,CreateDatasetItemsFromJsonRequestFormat:()=>ll,CreateDatasetItemsFromSpansRequest:()=>Xi,CreateDatasetItemsFromTracesRequest:()=>Zi,CreateLocalRunnerJobRequest:()=>fn,CreatePromptVersionDetail:()=>en,CreatePromptVersionDetailTemplateStructure:()=>Gl,CreateSessionRequest:()=>Ka,CreateSessionRequestType:()=>Ul,CreateSessionResponse:()=>BT,Credential:()=>Cx,CredentialPublic:()=>MT,CredentialWrite:()=>Ux,DashboardPagePublic:()=>Gt,DashboardPublic:()=>nr,DashboardPublicScope:()=>VT,DashboardPublicType:()=>GT,DashboardSavedQuery:()=>Ts,DashboardUpdatePublic:()=>js,DashboardUpdatePublicType:()=>KT,DashboardWidgetQueryRequest:()=>Cs,DashboardWrite:()=>Es,DashboardWriteType:()=>OT,DataPointDouble:()=>Rle,DataPointNumberPublic:()=>YT,Dataset:()=>xle,DatasetExpansion:()=>wle,DatasetExpansionResponse:()=>lj,DatasetExpansionWrite:()=>qi,DatasetExperimentItemStreamRequest:()=>ea,DatasetExportJobPublic:()=>wo,DatasetExportJobPublicStatus:()=>bR,DatasetIdentifier:()=>ra,DatasetIdentifierPublic:()=>ta,DatasetItem:()=>Ds,DatasetItemBatch:()=>_le,DatasetItemBatchUpdate:()=>ia,DatasetItemBatchWrite:()=>na,DatasetItemChangesPublic:()=>mj,DatasetItemCompare:()=>Mj,DatasetItemCompareSource:()=>dj,DatasetItemFilter:()=>oa,DatasetItemFilterOperator:()=>rR,DatasetItemPageCompare:()=>Vj,DatasetItemPagePublic:()=>eC,DatasetItemPublic:()=>Ws,DatasetItemPublicSource:()=>Lj,DatasetItemSource:()=>ij,DatasetItemStreamRequest:()=>sa,DatasetItemUpdate:()=>oR,DatasetItemWrite:()=>aa,DatasetItemWriteSource:()=>aR,DatasetItemsDelete:()=>pa,DatasetPagePublic:()=>Ls,DatasetPublic:()=>Fo,DatasetPublicStatus:()=>rC,DatasetPublicType:()=>oC,DatasetPublicVisibility:()=>aC,DatasetStatus:()=>ZT,DatasetType:()=>ej,DatasetUpdate:()=>ca,DatasetUpdateVisibility:()=>nl,DatasetVersionDiff:()=>lC,DatasetVersionDiffStats:()=>pC,DatasetVersionPagePublic:()=>dC,DatasetVersionPublic:()=>Ir,DatasetVersionRestorePublic:()=>la,DatasetVersionRetrieveRequestPublic:()=>ma,DatasetVersionSummary:()=>Is,DatasetVersionSummaryPublic:()=>Vs,DatasetVersionTag:()=>da,DatasetVersionUpdatePublic:()=>ua,DatasetVisibility:()=>tj,DatasetWrite:()=>ga,DatasetWriteType:()=>sl,DatasetWriteVisibility:()=>pl,DayCount:()=>Gs,DeleteAttachmentsRequest:()=>kle,DeleteAttachmentsRequestEntityType:()=>uC,DeleteFeedbackScore:()=>Js,DeleteIdsHolder:()=>Bo,DeleteThreadFeedbackScores:()=>vn,DeleteTraceThreads:()=>Tn,Delta:()=>Mv,DownloadAttachmentRequestEntityType:()=>el,EffortParam:()=>fC,Environment:()=>Ale,EnvironmentPagePublic:()=>bC,EnvironmentPublic:()=>Hs,EnvironmentUpdate:()=>fa,EnvironmentWrite:()=>ha,ErrorCountWithDeviation:()=>Ks,ErrorCountWithDeviationDetailed:()=>RC,ErrorInfo:()=>Oe,ErrorInfoExperimentItemBulkWriteView:()=>ka,ErrorInfoPublic:()=>Jt,ErrorInfoWrite:()=>vt,ErrorMessage:()=>wC,ErrorMessageDetail:()=>Ple,ErrorMessageDetailed:()=>zle,ErrorMessageHistory:()=>Sle,ErrorMessagePublic:()=>vle,ErrorMessageWrite:()=>Tle,EvaluatorItem:()=>Sr,EvaluatorItemCompare:()=>bj,EvaluatorItemCompareType:()=>gj,EvaluatorItemPublic:()=>Fs,EvaluatorItemPublicType:()=>Jj,EvaluatorItemType:()=>$b,EvaluatorItemWrite:()=>cR,EvaluatorItemWriteType:()=>sR,ExecutionPolicy:()=>tr,ExecutionPolicyCompare:()=>Us,ExecutionPolicyPublic:()=>Bs,ExecutionPolicyWrite:()=>mR,ExistenceResponse:()=>Os,Experiment:()=>jle,ExperimentBatchUpdate:()=>Ra,ExperimentEvaluationMethod:()=>_C,ExperimentExecutionRequest:()=>wa,ExperimentExecutionResponse:()=>jC,ExperimentGroupAggregationsResponse:()=>IC,ExperimentGroupResponse:()=>WC,ExperimentInfo:()=>vC,ExperimentItem:()=>za,ExperimentItemBulkRecord:()=>qC,ExperimentItemBulkRecordExperimentItemBulkWriteView:()=>OR,ExperimentItemBulkUpload:()=>Cle,ExperimentItemBulkUploadExperimentItemBulkWriteView:()=>Aa,ExperimentItemCompare:()=>Ij,ExperimentItemCompareStatus:()=>xj,ExperimentItemCompareTraceVisibilityMode:()=>_j,ExperimentItemPublic:()=>Ms,ExperimentItemPublicTraceVisibilityMode:()=>Kj,ExperimentItemReference:()=>HC,ExperimentItemReferencePublic:()=>rE,ExperimentItemStatus:()=>ZR,ExperimentItemStreamRequest:()=>Pa,ExperimentItemTraceVisibilityMode:()=>ex,ExperimentItemsBatch:()=>Sa,ExperimentItemsDelete:()=>va,ExperimentPagePublic:()=>qs,ExperimentPublic:()=>Zs,ExperimentPublicEvaluationMethod:()=>oE,ExperimentPublicStatus:()=>aE,ExperimentPublicType:()=>sE,ExperimentRunSummary:()=>pj,ExperimentRunSummaryCompare:()=>Fj,ExperimentRunSummaryCompareStatus:()=>Uj,ExperimentRunSummaryPublic:()=>Xj,ExperimentRunSummaryPublicStatus:()=>$j,ExperimentRunSummaryStatus:()=>nj,ExperimentScore:()=>ya,ExperimentScorePublic:()=>cE,ExperimentScoreWrite:()=>px,ExperimentStatus:()=>AC,ExperimentStreamRequestPublic:()=>Ta,ExperimentType:()=>zC,ExperimentUpdate:()=>ba,ExperimentUpdateStatus:()=>kR,ExperimentUpdateType:()=>PR,ExperimentWrite:()=>ja,ExperimentWriteEvaluationMethod:()=>hl,ExperimentWriteStatus:()=>yl,ExperimentWriteType:()=>bl,ExportTraceServiceRequest:()=>Ele,Feedback:()=>Ile,FeedbackCreate:()=>_E,FeedbackDefinitionPagePublic:()=>vE,FeedbackObjectPublic:()=>zE,FeedbackPublic:()=>jE,FeedbackScore:()=>ve,FeedbackScoreAverage:()=>Ee,FeedbackScoreAverageDetailed:()=>CE,FeedbackScoreAveragePublic:()=>Yr,FeedbackScoreBatch:()=>rp,FeedbackScoreBatchItem:()=>UE,FeedbackScoreBatchItemSource:()=>IE,FeedbackScoreBatchItemThread:()=>c_,FeedbackScoreBatchItemThreadSource:()=>s_,FeedbackScoreBatchThread:()=>jn,FeedbackScoreCompare:()=>jj,FeedbackScoreCompareSource:()=>Aj,FeedbackScoreExperimentItemBulkWriteView:()=>NR,FeedbackScoreExperimentItemBulkWriteViewSource:()=>jR,FeedbackScoreNames:()=>ME,FeedbackScoreNamesPublic:()=>Xr,FeedbackScorePublic:()=>Wo,FeedbackScorePublicSource:()=>LE,FeedbackScoreSource:()=>tx,FeedbackUpdate:()=>qE,FindAgentInsightsIssuesRequestSeverity:()=>Bc,FindAgentInsightsIssuesRequestStatus:()=>Mc,FindFeedbackDefinitionsRequestType:()=>xl,FindFeedbackScoreNames1RequestType:()=>fm,FindGuardrailModelsRequestLatestRunStatus:()=>_l,FindGuardrailPoliciesRequestExecutionScope:()=>Al,FindReportFailuresRequestType:()=>$l,FlagParam:()=>Vo,Function:()=>Oi,FunctionCall:()=>zr,GenerateReportResponse:()=>eI,GetSpanStatsRequestType:()=>hm,GetSpansByProjectRequestType:()=>ym,GetWebhookExamplesRequestAlertType:()=>Jc,GroupContent:()=>DC,GroupContentWithAggregations:()=>CC,GroupDetail:()=>NC,GroupDetails:()=>BC,Guardrail:()=>aI,GuardrailBatch:()=>Dle,GuardrailBatchWrite:()=>Ia,GuardrailModel:()=>tp,GuardrailModelPage:()=>lI,GuardrailModelUpdate:()=>Ea,GuardrailName:()=>rI,GuardrailPolicy:()=>Ule,GuardrailPolicyExecutionScope:()=>mI,GuardrailPolicyPagePublic:()=>AI,GuardrailPolicyPublic:()=>op,GuardrailPolicyPublicExecutionScope:()=>yI,GuardrailPolicyRule:()=>fI,GuardrailPolicyRulePublic:()=>wI,GuardrailPolicyRulePublicType:()=>RI,GuardrailPolicyRuleType:()=>uI,GuardrailPolicyRuleWrite:()=>SI,GuardrailPolicyRuleWriteType:()=>PI,GuardrailPolicyWrite:()=>yd,GuardrailPolicyWriteExecutionScope:()=>TI,GuardrailResult:()=>oI,GuardrailTrainingRun:()=>Zr,GuardrailTrainingRunPage:()=>BI,GuardrailTrainingRunStatus:()=>sI,GuardrailWrite:()=>Ax,GuardrailWriteName:()=>xx,GuardrailWriteResult:()=>_x,GuardrailsValidation:()=>QC,GuardrailsValidationPublic:()=>CI,GuardrailsValidationRequest:()=>Da,GuardrailsValidationResponse:()=>FI,IdsHolder:()=>Ca,ImageUrl:()=>SP,ImageUrlPublic:()=>oz,ImageUrlWrite:()=>yz,ItemLockInfo:()=>MI,JsonListString:()=>me,JsonListStringCompare:()=>Ns,JsonListStringExperimentItemBulkWriteView:()=>or,JsonListStringPublic:()=>$e,JsonListStringWrite:()=>Qe,JsonNode:()=>W,JsonNodeCompare:()=>hj,JsonNodeDetail:()=>hw,JsonNodePublic:()=>Pe,JsonNodeWrite:()=>Ce,JsonSchema:()=>Nb,KpiCardRequest:()=>Qa,KpiCardRequestEntityType:()=>Fl,KpiCardResponse:()=>HI,KpiMetric:()=>GI,KpiMetricType:()=>VI,ListRunnersRequestStatus:()=>dm,LlmAsJudgeCode:()=>is,LlmAsJudgeCodePublic:()=>fz,LlmAsJudgeCodeWrite:()=>Tz,LlmAsJudgeMessage:()=>It,LlmAsJudgeMessageContent:()=>CP,LlmAsJudgeMessageContentPublic:()=>sz,LlmAsJudgeMessageContentWrite:()=>wz,LlmAsJudgeMessagePublic:()=>Nt,LlmAsJudgeMessagePublicRole:()=>cz,LlmAsJudgeMessageRole:()=>IP,LlmAsJudgeMessageWrite:()=>Mt,LlmAsJudgeMessageWriteRole:()=>kz,LlmAsJudgeModelParameters:()=>Dt,LlmAsJudgeModelParametersApi:()=>UP,LlmAsJudgeModelParametersPublic:()=>Ft,LlmAsJudgeModelParametersPublicApi:()=>mz,LlmAsJudgeModelParametersWrite:()=>Wt,LlmAsJudgeModelParametersWriteApi:()=>Pz,LlmAsJudgeOutputSchema:()=>Ut,LlmAsJudgeOutputSchemaPublic:()=>Bt,LlmAsJudgeOutputSchemaPublicType:()=>uz,LlmAsJudgeOutputSchemaType:()=>FP,LlmAsJudgeOutputSchemaWrite:()=>Vt,LlmAsJudgeOutputSchemaWriteType:()=>Sz,LocalRunner:()=>ip,LocalRunnerHeartbeatRequest:()=>hn,LocalRunnerHeartbeatResponse:()=>XI,LocalRunnerJob:()=>St,LocalRunnerJobMetadata:()=>gn,LocalRunnerJobPage:()=>ZI,LocalRunnerJobResultRequest:()=>yn,LocalRunnerJobResultRequestStatus:()=>im,LocalRunnerJobStatus:()=>Lw,LocalRunnerLogEntry:()=>bn,LocalRunnerPage:()=>qI,LocalRunnerStatus:()=>KI,LocalRunnerType:()=>OI,LockResponse:()=>eD,LocksResponse:()=>rD,LogItem:()=>iD,LogItemLevel:()=>tD,LogPage:()=>nD,LogProb:()=>Vv,LogProbs:()=>Gv,ManualEvaluationRequest:()=>ap,ManualEvaluationRequestEntityType:()=>sD,ManualEvaluationResponse:()=>np,Message:()=>$i,ModelParams:()=>Ua,MultipartUploadPart:()=>IT,NumberParam:()=>qr,NumericalFeedbackDefinition:()=>gE,NumericalFeedbackDefinitionCreate:()=>RE,NumericalFeedbackDefinitionPublic:()=>ep,NumericalFeedbackDefinitionUpdate:()=>YE,NumericalFeedbackDetail:()=>dE,NumericalFeedbackDetailCreate:()=>yE,NumericalFeedbackDetailPublic:()=>kE,NumericalFeedbackDetailUpdate:()=>OE,OAuthError:()=>Nle,OllamaConnectionTestResponse:()=>bd,OllamaInstanceBaseUrlRequest:()=>Rd,OllamaModel:()=>Hx,OllieReport:()=>hD,OllieReportPage:()=>bD,OllieReportStatus:()=>gD,Optimization:()=>Fle,OptimizationPagePublic:()=>pp,OptimizationPublic:()=>sp,OptimizationPublicStatus:()=>UD,OptimizationStatus:()=>RD,OptimizationStudioConfig:()=>ID,OptimizationStudioConfigPublic:()=>$D,OptimizationStudioConfigWrite:()=>lU,OptimizationStudioLog:()=>dU,OptimizationUpdate:()=>Ja,OptimizationUpdateStatus:()=>Il,OptimizationWrite:()=>xd,OptimizationWriteStatus:()=>uU,OtherStats:()=>fU,PageColumns:()=>yU,Param:()=>H_,ParamPresence:()=>G_,PercentageValueStatPublic:()=>bU,PercentageValues:()=>Cr,PercentageValuesDetailed:()=>xU,PercentageValuesPublic:()=>Xs,Permission:()=>_U,Project:()=>Ble,ProjectDetailed:()=>vU,ProjectDetailedVisibility:()=>zU,ProjectMetricRequestPublic:()=>$a,ProjectMetricRequestPublicInterval:()=>Bl,ProjectMetricRequestPublicMetricType:()=>Ml,ProjectMetricResponsePublic:()=>UU,ProjectMetricResponsePublicInterval:()=>TU,ProjectMetricResponsePublicMetricType:()=>CU,ProjectPagePublic:()=>MU,ProjectPublic:()=>cp,ProjectPublicVisibility:()=>NU,ProjectReference:()=>rz,ProjectReferencePublic:()=>ks,ProjectRetrieveDetailed:()=>Ya,ProjectStatItemObjectPublic:()=>VU,ProjectStatsPublic:()=>et,ProjectStatsSummary:()=>HU,ProjectStatsSummaryItem:()=>GU,ProjectTopics:()=>YU,ProjectTopicsStatus:()=>KU,ProjectUpdate:()=>Xa,ProjectUpdateVisibility:()=>Wl,ProjectVisibility:()=>AU,ProjectWrite:()=>Za,ProjectWriteVisibility:()=>Vl,Prompt:()=>Mle,PromptCacheOptions:()=>Db,PromptDetail:()=>_d,PromptDetailTemplateStructure:()=>pN,PromptPagePublic:()=>lp,PromptPublic:()=>dN,PromptPublicTemplateStructure:()=>lN,PromptTemplateStructure:()=>XU,PromptTokensDetails:()=>$v,PromptType:()=>qU,PromptUpdatable:()=>rn,PromptVariant:()=>vR,PromptVersion:()=>wd,PromptVersionBatchUpdate:()=>tn,PromptVersionCommitsRequestPublic:()=>on,PromptVersionDetail:()=>Be,PromptVersionDetailTemplateStructure:()=>bw,PromptVersionDetailType:()=>xw,PromptVersionDetailVersionType:()=>_w,PromptVersionEnvironmentUpdate:()=>an,PromptVersionIdsRequestDetail:()=>nn,PromptVersionLink:()=>Qr,PromptVersionLinkPublic:()=>So,PromptVersionLinkWrite:()=>fl,PromptVersionPagePublic:()=>_N,PromptVersionPublic:()=>xN,PromptVersionPublicTemplateStructure:()=>gN,PromptVersionPublicType:()=>hN,PromptVersionPublicVersionType:()=>bN,PromptVersionRetrieveDetail:()=>sn,PromptVersionTemplateStructure:()=>rN,PromptVersionType:()=>oN,PromptVersionUpdate:()=>Pw,PromptVersionVersionType:()=>aN,PromptWrite:()=>pn,PromptWriteTemplateStructure:()=>Jl,PromptWriteType:()=>Hl,ProviderApiKey:()=>Wle,ProviderApiKeyPagePublic:()=>EN,ProviderApiKeyProvider:()=>kN,ProviderApiKeyPublic:()=>mp,ProviderApiKeyPublicProvider:()=>PN,ProviderApiKeyUpdate:()=>Fa,ProviderApiKeyWrite:()=>Ba,ProviderApiKeyWriteProvider:()=>Tl,ProviderAuthCheck:()=>Ma,ProviderAuthConfig:()=>At,ProviderAuthConfigPublic:()=>TN,ProviderAuthConfigPublicSendAs:()=>SN,ProviderAuthConfigSendAs:()=>Ix,ProviderAuthConfigWrite:()=>Mx,ProviderAuthConfigWriteSendAs:()=>Fx,RecentActivityItemPublic:()=>UN,RecentActivityItemPublicType:()=>IN,RecentActivityPagePublic:()=>FN,ReportCompleteRequest:()=>cn,ReportCompleteRequestStatus:()=>Xl,ReportFailure:()=>dp,ReportFailurePage:()=>VN,ReportFailureType:()=>BN,ReportPreference:()=>up,ReportedIssue:()=>Gy,ReportedIssueSeverity:()=>Vy,Request:()=>Fi,Response:()=>LN,ResponseFormat:()=>Wb,ResponseFormatType:()=>Bb,Result:()=>Dr,ResultsNumberPublic:()=>IU,RetentionRulePagePublic:()=>ON,RetentionRulePublic:()=>Lo,RetentionRulePublicLevel:()=>GN,RetentionRulePublicRetention:()=>HN,RetentionRuleWrite:()=>ln,RetentionRuleWriteRetention:()=>ql,RevokeRequest:()=>La,ScopedAnalyticsQueryRequest:()=>gp,ScoreCondition:()=>fb,ScoreConditionOperator:()=>ub,ScoreConditionPublic:()=>vA,ScoreConditionPublicOperator:()=>zA,ScoreConditionWrite:()=>tb,ScoreConditionWriteOperator:()=>eb,ScoreName:()=>FE,ScoreNamePublic:()=>WE,ServiceTogglesConfig:()=>$N,Span:()=>$s,SpanBatch:()=>Vle,SpanBatchUpdate:()=>xn,SpanBatchWrite:()=>kn,SpanEnrichmentOptions:()=>Xb,SpanExperimentItemBulkWriteView:()=>LR,SpanExperimentItemBulkWriteViewSource:()=>BR,SpanExperimentItemBulkWriteViewType:()=>WR,SpanFilter:()=>ar,SpanFilterOperator:()=>F_,SpanFilterPublic:()=>Tr,SpanFilterPublicOperator:()=>iw,SpanFilterWrite:()=>As,SpanFilterWriteOperator:()=>oS,SpanLlmAsJudgeCode:()=>as,SpanLlmAsJudgeCodePublic:()=>Mz,SpanLlmAsJudgeCodeWrite:()=>aS,SpanPagePublic:()=>rF,SpanPublic:()=>fp,SpanPublicSource:()=>YN,SpanPublicType:()=>ZN,SpanSearchStreamRequestPublic:()=>An,SpanSearchStreamRequestPublicExcludeItem:()=>um,SpanSearchStreamRequestPublicType:()=>gm,SpanSource:()=>VC,SpanType:()=>GC,SpanUpdate:()=>Rn,SpanUpdateSource:()=>Hw,SpanUpdateType:()=>Qw,SpanUserDefinedMetricPythonCode:()=>ns,SpanUserDefinedMetricPythonCodePublic:()=>Vz,SpanUserDefinedMetricPythonCodeWrite:()=>cS,SpanWrite:()=>_n,SpanWriteSource:()=>Yw,SpanWriteType:()=>Zw,SpansCountResponse:()=>iF,StartMultipartUploadRequest:()=>Qi,StartMultipartUploadRequestEntityType:()=>Xc,StartMultipartUploadResponse:()=>aF,StreamOptions:()=>Lb,StudioEvaluation:()=>kD,StudioEvaluationPublic:()=>MD,StudioEvaluationWrite:()=>eU,StudioLlmModel:()=>PD,StudioLlmModelPublic:()=>VD,StudioLlmModelWrite:()=>tU,StudioMessage:()=>TD,StudioMessagePublic:()=>HD,StudioMessageWrite:()=>nU,StudioMetric:()=>wD,StudioMetricPublic:()=>FD,StudioMetricWrite:()=>ZD,StudioOptimizer:()=>SD,StudioOptimizerPublic:()=>GD,StudioOptimizerWrite:()=>iU,StudioPrompt:()=>CD,StudioPromptPublic:()=>QD,StudioPromptWrite:()=>pU,TokenRequest:()=>Ga,TokenResponse:()=>nF,TokenUsageNames:()=>hp,Tool:()=>Kb,ToolCall:()=>es,ToolCallType:()=>oP,ToolType:()=>Jb,ToolsParam:()=>dD,ToolsParamChatCompletions:()=>lD,TopicStats:()=>OU,Trace:()=>Ys,TraceBatch:()=>Lle,TraceBatchUpdate:()=>En,TraceBatchWrite:()=>Dn,TraceCountResponse:()=>cF,TraceEnrichmentOptions:()=>qb,TraceExperimentItemBulkWriteView:()=>KR,TraceExperimentItemBulkWriteViewSource:()=>JR,TraceFilter:()=>Er,TraceFilterOperator:()=>MP,TraceFilterPublic:()=>jr,TraceFilterPublicOperator:()=>nw,TraceFilterWrite:()=>ys,TraceFilterWriteOperator:()=>Cz,TracePagePublic:()=>fF,TracePublic:()=>yp,TracePublicSource:()=>lF,TracePublicVisibilityMode:()=>dF,TraceSearchStreamRequestPublic:()=>Un,TraceSearchStreamRequestPublicExcludeItem:()=>wm,TraceSource:()=>$C,TraceThread:()=>bp,TraceThreadBatchIdentifier:()=>Nn,TraceThreadBatchUpdate:()=>Bn,TraceThreadFilter:()=>ir,TraceThreadFilterOperator:()=>R_,TraceThreadFilterPublic:()=>Pt,TraceThreadFilterPublicOperator:()=>pw,TraceThreadFilterWrite:()=>Ps,TraceThreadFilterWriteOperator:()=>uS,TraceThreadIdentifier:()=>Ad,TraceThreadLlmAsJudgeCode:()=>ss,TraceThreadLlmAsJudgeCodePublic:()=>Gz,TraceThreadLlmAsJudgeCodeWrite:()=>fS,TraceThreadPage:()=>RF,TraceThreadSearchStreamRequest:()=>Mn,TraceThreadStatus:()=>hF,TraceThreadUpdate:()=>Fn,TraceThreadUserDefinedMetricPythonCode:()=>ps,TraceThreadUserDefinedMetricPythonCodePublic:()=>Hz,TraceThreadUserDefinedMetricPythonCodeWrite:()=>RS,TraceUpdate:()=>Cn,TraceUpdateSource:()=>m_,TraceVisibilityMode:()=>XC,TraceWrite:()=>In,TraceWriteSource:()=>g_,UploadAttachmentRequestEntityType:()=>rl,Usage:()=>Xv,UsageByWorkspaceProjectUserResponse:()=>_F,UsageProjectsRequest:()=>zn,UsageProjectsResponse:()=>PF,UserDefinedMetricPythonCode:()=>cs,UserDefinedMetricPythonCodePublic:()=>Qz,UserDefinedMetricPythonCodeWrite:()=>WS,ValidatedToken:()=>zF,ValidationDescriptor:()=>vx,ValidationDescriptorType:()=>zx,ValidationResult:()=>UI,ValidationResultType:()=>II,ValueEntry:()=>nx,ValueEntryCompare:()=>vj,ValueEntryCompareSource:()=>zj,ValueEntryExperimentItemBulkWriteView:()=>DR,ValueEntryExperimentItemBulkWriteViewSource:()=>ER,ValueEntryPublic:()=>KE,ValueEntryPublicSource:()=>JE,ValueEntrySource:()=>ix,VideoUrl:()=>TP,VideoUrlPublic:()=>az,VideoUrlWrite:()=>Rz,View:()=>Jo,ViewArea:()=>SF,ViewCreate:()=>Vn,ViewCreateArea:()=>km,ViewCreateAuthor:()=>Am,ViewCreateType:()=>Pm,ViewCurrentVersion:()=>Ln,ViewInput:()=>jt,ViewInputKind:()=>k_,ViewUpdate:()=>Gn,ViewVersion:()=>Go,ViewVersionAuthor:()=>TF,ViewVersionCreate:()=>Jn,ViewVersionCreateAuthor:()=>zm,ViewVersionCreateType:()=>Sm,ViewVersionPage:()=>BF,ViewVersionSummary:()=>NF,ViewVersionSummaryAuthor:()=>DF,ViewVersionType:()=>CF,Webhook:()=>Hk,WebhookExamples:()=>MF,WebhookPublic:()=>oA,WebhookTestResult:()=>LF,WebhookTestResultStatus:()=>WF,WebhookWrite:()=>hA,WelcomeWizardSubmission:()=>Hn,WelcomeWizardTracking:()=>GF,WorkspaceConfiguration:()=>Rp,WorkspaceInfo:()=>_P,WorkspaceMetricRequest:()=>Gle,WorkspaceMetricResponse:()=>xp,WorkspaceMetricsSummaryRequest:()=>Ho,WorkspaceMetricsSummaryResponse:()=>JF,WorkspaceNameHolder:()=>HF,WorkspaceProjectName:()=>kF,WorkspaceProjectUserCount:()=>xF,WorkspaceSpanMetricRequest:()=>Kn,WorkspaceSpanMetricRequestInterval:()=>jm,WorkspaceSpanMetricRequestMetricType:()=>Cm,WorkspaceSpansCount:()=>tF,WorkspaceTokenUsageNamesRequest:()=>Qn,WorkspaceTraceCount:()=>sF,WorkspaceUserPermissions:()=>KF,agentConfigs:()=>Nc,agentInsights:()=>Wc,agentInsightsEnrollment:()=>Vc,agentInsightsJobs:()=>Gc,alerts:()=>Hc,annotationQueues:()=>Oc,assertionResults:()=>Yc,attachments:()=>bo,chatCompletions:()=>il,datasets:()=>_o,environments:()=>ml,experiments:()=>Rl,feedbackDefinitions:()=>wl,guardrailModels:()=>kl,guardrailPolicies:()=>Pl,guardrails:()=>zl,llmModels:()=>kt,llmProviderKey:()=>jl,mcpOAuth:()=>Cl,ollama:()=>Ao,optimizations:()=>Dl,pairing:()=>Nl,projects:()=>Ll,prompts:()=>zt,reportFailures:()=>Yl,reports:()=>Zl,retentionRules:()=>em,runners:()=>hr,spans:()=>bm,systemAnalyticsQueries:()=>Rm,systemUsage:()=>xm,traces:()=>_m,views:()=>vm,welcomeWizard:()=>Tm,workspaces:()=>Em});var re=n(()=>{OZ();Bee();});var Pd,Mee=n(()=>{X();$();b();Y();Z();G();re();q();Pd=class{constructor(o={}){this._options=B(o);}createAgentConfig(o,r){return P.fromPromise(this.__createAgentConfig(o,r))}async __createAgentConfig(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Im.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(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,r){return P.fromPromise(this.__updateAgentConfig(o,r))}async __updateAgentConfig(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Im.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r,t={},i){return P.fromPromise(this.__createBlueprintFromMask(o,r,t,i))}async __createBlueprintFromMask(o,r,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(r)}`),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,r){return P.fromPromise(this.__createOrUpdateEnvs(o,r))}async __createOrUpdateEnvs(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ii.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r,t={},i){return P.fromPromise(this.__getBlueprintByEnv(o,r,t,i))}async __getBlueprintByEnv(o,r,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(r)}`),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:Et.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,r,t,i){return P.fromPromise(this.__setEnvByBlueprintName(o,r,t,i))}async __setEnvByBlueprintName(o,r,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(r)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Ei.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,r,t={},i){return P.fromPromise(this.__deleteEnv(o,r,t,i))}async __deleteEnv(o,r,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(r)}`),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,r={},t){return P.fromPromise(this.__getBlueprintById(o,r,t))}async __getBlueprintById(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=r,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:Et.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,r,t={},i){return P.fromPromise(this.__getBlueprintByName(o,r,t,i))}async __getBlueprintByName(o,r,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(r)}`),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:Et.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,r={},t){return P.fromPromise(this.__getBlueprintHistory(o,r,t))}async __getBlueprintHistory(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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:qS.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,r={},t){return P.fromPromise(this.__getDeltaById(o,r,t))}async __getDeltaById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Et.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,r={},t){return P.fromPromise(this.__getLatestBlueprint(o,r,t))}async __getLatestBlueprint(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{maskId:i}=r,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:Et.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,r){return P.fromPromise(this.__removeConfigKeys(o,r))}async __removeConfigKeys(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-configs/blueprints/remove-keys"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Di.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 zd,Wee=n(()=>{X();$();b();Y();Z();G();re();q();zd=class{constructor(o={}){this._options=B(o);}findAgentInsightsIssues(o,r){return P.fromPromise(this.__findAgentInsightsIssues(o,r))}async __findAgentInsightsIssues(o,r){var h,y,w,A,C,I,D,F,M,oe,pe;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?Mc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,severity:c!=null?Bc.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l,page:m,size:u},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/agent-insights/issues"),method:"GET",headers:f,queryParameters:{...d,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(oe=r==null?void 0:r.maxRetries)!=null?oe:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:Pk.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,r){return P.fromPromise(this.__reportAgentInsightsIssues(o,r))}async __reportAgentInsightsIssues(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/agent-insights/issues"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ni.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r,t){return P.fromPromise(this.__getAgentInsightsIssueById(o,r,t))}async __getAgentInsightsIssueById(o,r,t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,fromDate:a,toDate:s}=r,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:jk.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,r,t){return P.fromPromise(this.__updateAgentInsightsIssue(o,r,t))}async __updateAgentInsightsIssue(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Ui.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/agent-insights/issues/{issue_id}")}};});var Sd,Vee=n(()=>{X();$();b();Y();Z();G();re();Sd=class{constructor(o={}){this._options=B(o);}enrolProjectsInAutoFirstRun(o,r){return P.fromPromise(this.__enrolProjectsInAutoFirstRun(o,r))}async __enrolProjectsInAutoFirstRun(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/agent-insights/enrollment"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Fi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LN.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 vd,Lee=n(()=>{X();$();b();Y();Z();G();re();q();vd=class{constructor(o={}){this._options=B(o);}getAgentInsightsJob(o,r={},t){return P.fromPromise(this.__getAgentInsightsJob(o,r,t))}async __getAgentInsightsJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:vo.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,r={},t){return P.fromPromise(this.__createAgentInsightsJob(o,r,t))}async __createAgentInsightsJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:vo.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 Q(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,r,t){return P.fromPromise(this.__updateAgentInsightsJob(o,r,t))}async __updateAgentInsightsJob(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Mi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vo.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,r={},t){return P.fromPromise(this.__triggerAgentInsightsJob(o,r,t))}async __triggerAgentInsightsJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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")}updateAgentInsightsGuidance(o,r,t){return P.fromPromise(this.__updateAgentInsightsGuidance(o,r,t))}async __updateAgentInsightsGuidance(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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)}/guidance`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Bi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:vo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/agent-insights/jobs/{projectId}/guidance")}};});var Td,Gee=n(()=>{X();$();b();Y();Z();G();re();q();Td=class{constructor(o={}){this._options=B(o);}findAlerts(o={},r){return P.fromPromise(this.__findAlerts(o,r))}async __findAlerts(o={},r){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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/alerts"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:$n.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,r){return P.fromPromise(this.__createAlert(o,r))}async __createAlert(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(i.error.body,i.rawResponse);case 422:throw new K(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,r){return P.fromPromise(this.__deleteAlertBatch(o,r))}async __deleteAlertBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getAlertById(o,r,t))}async __getAlertById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:On.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/alerts/{id}")}updateAlert(o,r,t){return P.fromPromise(this.__updateAlert(o,r,t))}async __updateAlert(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/alerts/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Yn.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 Q(s.error.body,s.rawResponse);case 422:throw new K(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/alerts/{id}")}getWebhookExamples(o={},r){return P.fromPromise(this.__getWebhookExamples(o,r))}async __getWebhookExamples(o={},r){var c,l,m,u,d,f,g,h,y,w,A;let{alertType:t}=o,i={alert_type:t!=null?Jc.jsonOrThrow(t,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/alerts/webhooks/examples"),method:"GET",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:MF.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,r){return P.fromPromise(this.__testWebhook(o,r))}async __testWebhook(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/alerts/webhooks/tests"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Yn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:LF.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 K(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 jd,Jee=n(()=>{X();$();b();Y();Z();G();re();q();jd=class{constructor(o={}){this._options=B(o);}runAnalyticsQuery(o,r){return P.fromPromise(this.__runAnalyticsQuery(o,r))}async __runAnalyticsQuery(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:gp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yr.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 K(i.error.body,i.rawResponse);case 429:throw new de(i.error.body,i.rawResponse);case 501:throw new Re(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/analytics-queries")}};});var Cd,Hee=n(()=>{X();$();b();Y();Z();G();re();q();Cd=class{constructor(o={}){this._options=B(o);}addItemsToAnnotationQueue(o,r,t){return P.fromPromise(this.__addItemsToAnnotationQueue(o,r,t))}async __addItemsToAnnotationQueue(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/add`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Dm.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={},r){return P.fromPromise(this.__findAnnotationQueues(o,r))}async __findAnnotationQueues(o={},r){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=r==null?void 0:r.workspaceName)!=null?g:(f=this._options)==null?void 0:f.workspaceName}),r==null?void 0:r.headers),u=await S({url:_.join((y=(h=await x.get(this._options.baseUrl))!=null?h:await x.get(this._options.environment))!=null?y:v.Default,"v1/private/annotation-queues"),method:"GET",headers:m,queryParameters:{...l,...r==null?void 0:r.queryParams},timeoutMs:((C=(A=r==null?void 0:r.timeoutInSeconds)!=null?A:(w=this._options)==null?void 0:w.timeoutInSeconds)!=null?C:60)*1e3,maxRetries:(D=r==null?void 0:r.maxRetries)!=null?D:(I=this._options)==null?void 0:I.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(F=this._options)==null?void 0:F.fetch,logging:this._options.logging});if(u.ok)return {data:KA.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,r){return P.fromPromise(this.__createAnnotationQueue(o,r))}async __createAnnotationQueue(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Wi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 K(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,r){return P.fromPromise(this.__createAnnotationQueueBatch(o,r))}async __createAnnotationQueueBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Vi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(i.error.body,i.rawResponse);case 422:throw new K(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,r){return P.fromPromise(this.__deleteAnnotationQueueBatch(o,r))}async __deleteAnnotationQueueBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/annotation-queues/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getAnnotationQueueById(o,r,t))}async __getAnnotationQueueById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Zn.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,r={},t){return P.fromPromise(this.__updateAnnotationQueue(o,r,t))}async __updateAnnotationQueue(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Hi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===400?new N(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/annotation-queues/{id}")}getAnnotationQueueLocks(o,r={},t){return P.fromPromise(this.__getAnnotationQueueLocks(o,r,t))}async __getAnnotationQueueLocks(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:rD.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,r,t={},i){return P.fromPromise(this.__lockAnnotationQueueItem(o,r,t,i))}async __lockAnnotationQueueItem(o,r,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(r)}/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:eD.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,r,t){return P.fromPromise(this.__removeItemsFromAnnotationQueue(o,r,t))}async __removeItemsFromAnnotationQueue(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/annotation-queues/${_.encodePathParam(o)}/items/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Dm.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,r,t){return P.fromPromise(this.__searchAnnotationQueueItems(o,r,t))}async __searchAnnotationQueueItems(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Li.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:WA.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/annotation-queues/{id}/items/search")}};});var Ed,Kee=n(()=>{X();$();b();Y();Z();G();re();Ed=class{constructor(o={}){this._options=B(o);}storeAssertionsBatch(o,r){return P.fromPromise(this.__storeAssertionsBatch(o,r))}async __storeAssertionsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/assertion-results"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ki.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Id,Qee=n(()=>{X();$();b();Y();Z();G();re();q();Id=class{constructor(o={}){this._options=B(o);}attachmentList(o,r){return P.fromPromise(this.__attachmentList(o,r))}async __attachmentList(o,r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:i,projectId:a,entityType:s,entityId:c,path:l}=o,m={page:t,size:i,project_id:a,entity_type:qc.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c,path:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/list"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:cP.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 te(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,r){return P.fromPromise(this.__completeMultiPartUpload(o,r))}async __completeMultiPartUpload(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-complete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:rd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 te(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,r){return P.fromPromise(this.__deleteAttachments(o,r))}async __deleteAttachments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:rd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 te(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,r){return P.fromPromise(this.__downloadAttachment(o,r))}async __downloadAttachment(o,r){var f,g,h,y,w,A,C,I,D,F,M;let{workspaceName:t,containerId:i,entityType:a,entityId:s,fileName:c,mimeType:l}=o,m={workspace_name:t,container_id:i,entity_type:el.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:s,file_name:c,mime_type:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/download"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},responseType:"streaming",timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:d.body,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new te(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,r){return P.fromPromise(this.__startMultiPartUpload(o,r))}async __startMultiPartUpload(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/attachment/upload-start"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Qi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:aF.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 te(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,r){return P.fromPromise(this.__uploadAttachment(o,r))}async __uploadAttachment(o,r){var f,g,h,y,w,A,C,I,D,F,M;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:rl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}),entity_id:c},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/attachment/upload"),method:"PUT",headers:u,contentType:"application/json",queryParameters:{...m,...r==null?void 0:r.queryParams},requestType:"json",body:bo.uploadAttachment.Request.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:void 0,rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 401:throw new O(d.error.body,d.rawResponse);case 403:throw new te(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 Dd,Oee=n(()=>{X();$();b();Y();Z();G();re();q();Dd=class{constructor(o={}){this._options=B(o);}findEvaluators(o={},r){return P.fromPromise(this.__findEvaluators(o,r))}async __findEvaluators(o={},r){var g,h,y,w,A,C,I,D,F,M,oe;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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/automations/evaluators"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(oe=this._options)==null?void 0:oe.fetch,logging:this._options.logging});if(f.ok)return {data:Xz.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,r){return P.fromPromise(this.__createAutomationRuleEvaluator(o,r))}async __createAutomationRuleEvaluator(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/automations/evaluators"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:OS.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteAutomationRuleEvaluatorBatch(o,r))}async __deleteAutomationRuleEvaluatorBatch(o,r){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=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/automations/evaluators/delete"),method:"POST",headers:s,contentType:"application/json",queryParameters:{...a,...r==null?void 0:r.queryParams},requestType:"json",body:fe.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/private/automations/evaluators/delete")}getEvaluatorById(o,r={},t){return P.fromPromise(this.__getEvaluatorById(o,r,t))}async __getEvaluatorById(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{projectId:i}=r,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:tS.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,r,t){return P.fromPromise(this.__updateAutomationRuleEvaluator(o,r,t))}async __updateAutomationRuleEvaluator(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/automations/evaluators/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:MS.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===409?new Q(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/automations/evaluators/{id}")}getEvaluatorLogsById(o,r={},t){return P.fromPromise(this.__getEvaluatorLogsById(o,r,t))}async __getEvaluatorLogsById(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{size:i}=r,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:nD.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 Ud,$ee=n(()=>{X();$();b();Y();Z();G();re();Ud=class{constructor(o={}){this._options=B(o);}createChatCompletions(o={},r){return P.fromPromise(this.__createChatCompletions(o,r))}async __createChatCompletions(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/chat/completions"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Yi.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:qv.parseOrThrow(i.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw new k({statusCode:i.error.statusCode,body:i.error.body,rawResponse:i.rawResponse});return j(i.error,i.rawResponse,"POST","/v1/private/chat/completions")}};});var Nd,Yee=n(()=>{X();$();b();Y();Z();G();re();q();Nd=class{constructor(o={}){this._options=B(o);}access(o,r){return P.fromPromise(this.__access(o,r))}async __access(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/auth"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:xP.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 te(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 r=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:r,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:HF.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 te(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 Fd,Xee=n(()=>{X();$();b();Y();Z();G();re();q();Fd=class{constructor(o={}){this._options=B(o);}createDashboardSavedQuery(o,r){return P.fromPromise(this.__createDashboardSavedQuery(o,r))}async __createDashboardSavedQuery(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/dashboard-saved-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ts.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")switch(i.error.statusCode){case 422:throw new K(i.error.body,i.rawResponse);case 501:throw new Re(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/dashboard-saved-queries")}getDashboardSavedQuery(o,r={},t){return P.fromPromise(this.__getDashboardSavedQuery(o,r,t))}async __getDashboardSavedQuery(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/internal/dashboard-saved-queries/${_.encodePathParam(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")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 501:throw new Re(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/internal/dashboard-saved-queries/{id}")}};});var Bd,Zee=n(()=>{X();$();b();Y();Z();G();re();q();Bd=class{constructor(o={}){this._options=B(o);}findDashboards(o={},r){return P.fromPromise(this.__findDashboards(o,r))}async __findDashboards(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/dashboards"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Gt.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,r){return P.fromPromise(this.__createDashboard(o,r))}async __createDashboard(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:nr.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,r={},t){return P.fromPromise(this.__getDashboardById(o,r,t))}async __getDashboardById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:nr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/dashboards/{dashboardId}")}deleteDashboard(o,r={},t){return P.fromPromise(this.__deleteDashboard(o,r,t))}async __deleteDashboard(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t){return P.fromPromise(this.__updateDashboard(o,r,t))}async __updateDashboard(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:js.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:nr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/dashboards/{dashboardId}")}deleteDashboardsBatch(o,r){return P.fromPromise(this.__deleteDashboardsBatch(o,r))}async __deleteDashboardsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/dashboards/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}runDashboardWidgetQuery(o,r,t,i){return P.fromPromise(this.__runDashboardWidgetQuery(o,r,t,i))}async __runDashboardWidgetQuery(o,r,t,i){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=i==null?void 0:i.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),i==null?void 0:i.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/dashboards/${_.encodePathParam(o)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Cs.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=i==null?void 0:i.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=i==null?void 0:i.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:yr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new K(c.error.body,c.rawResponse);case 429:throw new de(c.error.body,c.rawResponse);case 501:throw new Re(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"POST","/v1/private/dashboards/{dashboardId}/widgets/{widgetId}/query")}};});var Md,qee=n(()=>{X();$();b();kr();Y();Z();G();re();q();Md=class{constructor(o={}){this._options=B(o);}applyDatasetItemChanges(o,r,t){return P.fromPromise(this.__applyDatasetItemChanges(o,r,t))}async __applyDatasetItemChanges(o,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{override:i,body:a}=r,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:mj.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:Ir.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 Q(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,r){return P.fromPromise(this.__batchUpdateDatasetItems(o,r))}async __batchUpdateDatasetItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__findDatasets(o,r))}async __findDatasets(o={},r){var y,w,A,C,I,D,F,M,oe,pe,be;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=r==null?void 0:r.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),r==null?void 0:r.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,"v1/private/datasets"),method:"GET",headers:g,queryParameters:{...f,...r==null?void 0:r.queryParams},timeoutMs:((M=(F=r==null?void 0:r.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=r==null?void 0:r.maxRetries)!=null?pe:(oe=this._options)==null?void 0:oe.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(be=this._options)==null?void 0:be.fetch,logging:this._options.logging});if(h.ok)return {data:Ls.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,r){return P.fromPromise(this.__createDataset(o,r))}async __createDataset(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__createOrUpdateDatasetItems(o,r))}async __createOrUpdateDatasetItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:na.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__createDatasetItemsFromCsv(o,r))}async __createDatasetItemsFromCsv(o,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await go();t.append("file",Te(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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-csv"),method:"POST",headers:a,queryParameters:r==null?void 0:r.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-csv")}createDatasetItemsFromJson(o,r){return P.fromPromise(this.__createDatasetItemsFromJson(o,r))}async __createDatasetItemsFromJson(o,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await go();t.append("file",Te(o.file)),t.append("dataset_id",o.datasetId),t.append("format",ll.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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/datasets/items/from-json"),method:"POST",headers:a,queryParameters:r==null?void 0:r.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===400?new N(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"POST","/v1/private/datasets/items/from-json")}createDatasetItemsFromSpans(o,r,t){return P.fromPromise(this.__createDatasetItemsFromSpans(o,r,t))}async __createDatasetItemsFromSpans(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Xi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-spans")}createDatasetItemsFromTraces(o,r,t){return P.fromPromise(this.__createDatasetItemsFromTraces(o,r,t))}async __createDatasetItemsFromTraces(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Zi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{dataset_id}/items/from-traces")}getDatasetById(o,r={},t){return P.fromPromise(this.__getDatasetById(o,r,t))}async __getDatasetById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Fo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/datasets/{id}")}updateDataset(o,r,t){return P.fromPromise(this.__updateDataset(o,r,t))}async __updateDataset(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:ca.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data: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,r={},t){return P.fromPromise(this.__deleteDataset(o,r,t))}async __deleteDataset(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r){return P.fromPromise(this.__deleteDatasetByName(o,r))}async __deleteDatasetByName(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__deleteDatasetItems(o,r))}async __deleteDatasetItems(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:pa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteDatasetsBatch(o,r))}async __deleteDatasetsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__downloadDatasetExport(o,r,t))}async __downloadDatasetExport(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t){return P.fromPromise(this.__expandDataset(o,r,t))}async __expandDataset(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:qi.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:lj.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,r={},t){return P.fromPromise(this.__findDatasetItemsWithExperimentItems(o,r,t))}async __findDatasetItemsWithExperimentItems(o,r={},t){var y,w,A,C,I,D,F,M,oe,pe,be;let{page:i,size:a,experimentIds:s,datasetVersions:c,filters:l,sorting:m,search:u,truncate:d}=r,f={page:i,size:a,experiment_ids:s,dataset_versions:c,filters:l,sorting:m,search:u,truncate:d},g=z((y=this._options)==null?void 0:y.headers,T({"Comet-Workspace":(A=t==null?void 0:t.workspaceName)!=null?A:(w=this._options)==null?void 0:w.workspaceName}),t==null?void 0:t.headers),h=await S({url:_.join((I=(C=await x.get(this._options.baseUrl))!=null?C:await x.get(this._options.environment))!=null?I:v.Default,`v1/private/datasets/${_.encodePathParam(o)}/items/experiments/items`),method:"GET",headers:g,queryParameters:{...f,...t==null?void 0:t.queryParams},timeoutMs:((M=(F=t==null?void 0:t.timeoutInSeconds)!=null?F:(D=this._options)==null?void 0:D.timeoutInSeconds)!=null?M:60)*1e3,maxRetries:(pe=t==null?void 0:t.maxRetries)!=null?pe:(oe=this._options)==null?void 0:oe.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(be=this._options)==null?void 0:be.fetch,logging:this._options.logging});if(h.ok)return {data:Vj.parseOrThrow(h.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:h.rawResponse};if(h.error.reason==="status-code")throw new k({statusCode:h.error.statusCode,body:h.error.body,rawResponse:h.rawResponse});return j(h.error,h.rawResponse,"GET","/v1/private/datasets/{id}/items/experiments/items")}getDatasetByIdentifier(o,r){return P.fromPromise(this.__getDatasetByIdentifier(o,r))}async __getDatasetByIdentifier(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ta.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Fo.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,r,t){return P.fromPromise(this.__getDatasetExperimentItemsStats(o,r,t))}async __getDatasetExperimentItemsStats(o,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{experimentIds:i,filters:a}=r,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:et.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,r={},t){return P.fromPromise(this.__getDatasetExportJob(o,r,t))}async __getDatasetExportJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:wo.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 r=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:r,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:_o.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,r={},t){return P.fromPromise(this.__getDatasetItemById(o,r,t))}async __getDatasetItemById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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: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/datasets/items/{itemId}")}patchDatasetItem(o,r,t){return P.fromPromise(this.__patchDatasetItem(o,r,t))}async __patchDatasetItem(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/datasets/items/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:aa.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,r={},t){return P.fromPromise(this.__getDatasetItems(o,r,t))}async __getDatasetItems(o,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:i,size:a,version:s,filters:c,truncate:l}=r,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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:eC.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,r={},t){return P.fromPromise(this.__getDatasetItemsOutputColumns(o,r,t))}async __getDatasetItemsOutputColumns(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{experimentIds:i}=r,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:yU.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,r={},t){return P.fromPromise(this.__markDatasetExportJobViewed(o,r,t))}async __markDatasetExportJobViewed(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r={},t){return P.fromPromise(this.__startDatasetExport(o,r,t))}async __startDatasetExport(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:wo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/export")}streamDatasetExperimentItems(o={},r){return P.fromPromise(this.__streamDatasetExperimentItems(o,r))}async __streamDatasetExperimentItems(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ea.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:i.body,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/datasets/items/experiments/items/stream")}streamDatasetItems(o,r){return P.fromPromise(this.__streamDatasetItems(o,r))}async __streamDatasetItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/datasets/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__compareDatasetVersions(o,r,t))}async __compareDatasetVersions(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:lC.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,r,t,i){return P.fromPromise(this.__createVersionTag(o,r,t,i))}async __createVersionTag(o,r,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(r)}/tags`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:da.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 Q(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,r,t,i={},a){return P.fromPromise(this.__deleteVersionTag(o,r,t,i,a))}async __deleteVersionTag(o,r,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(r)}/tags/${_.encodePathParam(t)}`),method:"DELETE",headers:s,queryParameters:a==null?void 0:a.queryParams,timeoutMs:((y=(h=a==null?void 0:a.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=a==null?void 0:a.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:a==null?void 0:a.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"DELETE","/v1/private/datasets/{id}/versions/{versionHash}/tags/{tag}")}getDatasetVersionByHash(o,r,t={},i){return P.fromPromise(this.__getDatasetVersionByHash(o,r,t,i))}async __getDatasetVersionByHash(o,r,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(r)}`),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:Ir.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/datasets/{id}/versions/hash/{versionHash}")}updateDatasetVersion(o,r,t={},i){return P.fromPromise(this.__updateDatasetVersion(o,r,t,i))}async __updateDatasetVersion(o,r,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(r)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:ua.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:Ir.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 Q(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PATCH","/v1/private/datasets/{id}/versions/hash/{versionHash}")}listDatasetVersions(o,r={},t){return P.fromPromise(this.__listDatasetVersions(o,r,t))}async __listDatasetVersions(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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:dC.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,r,t){return P.fromPromise(this.__restoreDatasetVersion(o,r,t))}async __restoreDatasetVersion(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:la.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ir.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 Q(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,r,t){return P.fromPromise(this.__retrieveDatasetVersion(o,r,t))}async __retrieveDatasetVersion(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:ma.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Ir.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/datasets/{id}/versions/retrieve")}};});var Wd,ere=n(()=>{X();$();b();Y();Z();G();re();q();Wd=class{constructor(o={}){this._options=B(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 r=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:r,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:bC.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,r){return P.fromPromise(this.__createEnvironment(o,r))}async __createEnvironment(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ha.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new Q(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,r){return P.fromPromise(this.__deleteEnvironmentsBatch(o,r))}async __deleteEnvironmentsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/environments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getEnvironmentById(o,r,t))}async __getEnvironmentById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Hs.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/environments/{id}")}updateEnvironment(o,r={},t){return P.fromPromise(this.__updateEnvironment(o,r,t))}async __updateEnvironment(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:fa.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new Q(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 Vd,rre=n(()=>{X();$();b();Y();Z();G();re();q();Vd=class{constructor(o={}){this._options=B(o);}batchUpdateExperiments(o,r){return P.fromPromise(this.__batchUpdateExperiments(o,r))}async __batchUpdateExperiments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ra.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}cancelExperiments(o,r){return P.fromPromise(this.__cancelExperiments(o,r))}async __cancelExperiments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/cancel"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ca.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")switch(i.error.statusCode){case 403:throw new te(i.error.body,i.rawResponse);case 429:throw new de(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/cancel")}findExperiments(o={},r){return P.fromPromise(this.__findExperiments(o,r))}async __findExperiments(o={},r){var D,F,M,oe,pe,be,De,Ue,Ne,er,bi;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":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(oe=await x.get(this._options.baseUrl))!=null?oe:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/experiments"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ue=(De=r==null?void 0:r.timeoutInSeconds)!=null?De:(be=this._options)==null?void 0:be.timeoutInSeconds)!=null?Ue:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(Ne=this._options)==null?void 0:Ne.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(bi=this._options)==null?void 0:bi.fetch,logging:this._options.logging});if(I.ok)return {data:qs.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,r){return P.fromPromise(this.__createExperiment(o,r))}async __createExperiment(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ja.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__createExperimentItems(o,r))}async __createExperimentItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Sa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteExperimentItems(o,r))}async __deleteExperimentItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:va.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteExperimentsById(o,r))}async __deleteExperimentsById(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Bo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__executeExperiment(o,r))}async __executeExperiment(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/execute"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:jC.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 te(i.error.body,i.rawResponse);case 429:throw new de(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/experiments/execute")}experimentItemsBulk(o,r){return P.fromPromise(this.__experimentItemsBulk(o,r))}async __experimentItemsBulk(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/bulk"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Aa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(i.error.body,i.rawResponse);case 422:throw new K(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={},r){return P.fromPromise(this.__findFeedbackScoreNames(o,r))}async __findFeedbackScoreNames(o={},r){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=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/experiments/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/experiments/feedback-scores/names")}findExperimentGroups(o={},r){return P.fromPromise(this.__findExperimentGroups(o,r))}async __findExperimentGroups(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:WC.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={},r){return P.fromPromise(this.__findExperimentGroupsAggregations(o,r))}async __findExperimentGroupsAggregations(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/experiments/groups/aggregations"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:IC.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,r){return P.fromPromise(this.__finishExperiments(o,r))}async __finishExperiments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/finish"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Bo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getExperimentById(o,r,t))}async __getExperimentById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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: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===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,r,t){return P.fromPromise(this.__updateExperiment(o,r,t))}async __updateExperiment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/experiments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ba.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,r={},t){return P.fromPromise(this.__getExperimentItemById(o,r,t))}async __getExperimentItemById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Ms.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/experiments/items/{id}")}streamExperimentItems(o,r){return P.fromPromise(this.__streamExperimentItems(o,r))}async __streamExperimentItems(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/items/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Pa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__streamExperiments(o,r))}async __streamExperiments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/experiments/stream"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ta.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Ld,tre=n(()=>{X();$();b();Y();Z();G();re();q();Ld=class{constructor(o={}){this._options=B(o);}findFeedbackDefinitions(o={},r){return P.fromPromise(this.__findFeedbackDefinitions(o,r))}async __findFeedbackDefinitions(o={},r){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?xl.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},l=z((u=this._options)==null?void 0:u.headers,T({"Comet-Workspace":(f=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/feedback-definitions"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:vE.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,r){return P.fromPromise(this.__createFeedbackDefinition(o,r))}async __createFeedbackDefinition(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:_E.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getFeedbackDefinitionById(o,r,t))}async __getFeedbackDefinitionById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:jE.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,r,t){return P.fromPromise(this.__updateFeedbackDefinition(o,r,t))}async __updateFeedbackDefinition(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/feedback-definitions/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:qE.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,r={},t){return P.fromPromise(this.__deleteFeedbackDefinitionById(o,r,t))}async __deleteFeedbackDefinitionById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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 Q(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,r){return P.fromPromise(this.__deleteFeedbackDefinitionsBatch(o,r))}async __deleteFeedbackDefinitionsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/feedback-definitions/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new Q(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 Gd,ore=n(()=>{X();$();b();kr();Y();Z();G();re();q();Gd=class{constructor(o={}){this._options=B(o);}cancelGuardrailTrainingRun(o,r,t={},i){return P.fromPromise(this.__cancelGuardrailTrainingRun(o,r,t,i))}async __cancelGuardrailTrainingRun(o,r,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/guardrails/models/${_.encodePathParam(o)}/runs/${_.encodePathParam(r)}/cancel`),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 403:throw new te(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new Q(s.error.body,s.rawResponse);case 503:throw new ge(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/guardrails/models/{id}/runs/{runId}/cancel")}findGuardrailModels(o={},r){return P.fromPromise(this.__findGuardrailModels(o,r))}async __findGuardrailModels(o={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:i,name:a,usableOnly:s,latestRunStatus:c,sorting:l}=o,m={page:t,size:i,name:a,usable_only:s,latest_run_status:c!=null?_l.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/guardrails/models"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:lI.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 403:throw new te(d.error.body,d.rawResponse);case 503:throw new ge(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/guardrails/models")}createGuardrailModel(o,r){return P.fromPromise(this.__createGuardrailModel(o,r))}async __createGuardrailModel(o,r){var c,l,m,u,d,f,g,h,y,w,A;let t=await go();t.append("name",o.name),t.append("description",o.description),t.append("file",Te(o.file));let i=await t.getRequest(),a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName,...i.headers}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/guardrails/models"),method:"POST",headers:a,queryParameters:r==null?void 0:r.queryParams,requestType:"file",duplex:i.duplex,body:i.body,timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")switch(s.error.statusCode){case 400:throw new N(s.error.body,s.rawResponse);case 403:throw new te(s.error.body,s.rawResponse);case 409:throw new Q(s.error.body,s.rawResponse);case 429:throw new de(s.error.body,s.rawResponse);case 503:throw new ge(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/guardrails/models")}getGuardrailModelById(o,r={},t){return P.fromPromise(this.__getGuardrailModelById(o,r,t))}async __getGuardrailModelById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/guardrails/models/${_.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:tp.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 503:throw new ge(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/guardrails/models/{id}")}deleteGuardrailModel(o,r={},t){return P.fromPromise(this.__deleteGuardrailModel(o,r,t))}async __deleteGuardrailModel(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/guardrails/models/${_.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")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 409:throw new Q(a.error.body,a.rawResponse);case 503:throw new ge(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"DELETE","/v1/private/guardrails/models/{id}")}updateGuardrailModel(o,r,t){return P.fromPromise(this.__updateGuardrailModel(o,r,t))}async __updateGuardrailModel(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/guardrails/models/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ea.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);case 503:throw new ge(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/guardrails/models/{id}")}findGuardrailTrainingRuns(o,r={},t){return P.fromPromise(this.__findGuardrailTrainingRuns(o,r,t))}async __findGuardrailTrainingRuns(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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/guardrails/models/${_.encodePathParam(o)}/runs`),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:BI.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 403:throw new te(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);case 503:throw new ge(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/guardrails/models/{id}/runs")}retrainGuardrailModel(o,r,t){return P.fromPromise(this.__retrainGuardrailModel(o,r,t))}async __retrainGuardrailModel(o,r,t){var l,m,u,d,f,g,h,y,w,A,C;let i=await go();i.append("file",Te(r.file));let a=await i.getRequest(),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,...a.headers}),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/guardrails/models/${_.encodePathParam(o)}/runs`),method:"POST",headers:s,queryParameters:t==null?void 0:t.queryParams,requestType:"file",duplex:a.duplex,body:a.body,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:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 400:throw new N(c.error.body,c.rawResponse);case 403:throw new te(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 409:throw new Q(c.error.body,c.rawResponse);case 429:throw new de(c.error.body,c.rawResponse);case 503:throw new ge(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"POST","/v1/private/guardrails/models/{id}/runs")}getGuardrailTrainingRunById(o,r,t={},i){return P.fromPromise(this.__getGuardrailTrainingRunById(o,r,t,i))}async __getGuardrailTrainingRunById(o,r,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/guardrails/models/${_.encodePathParam(o)}/runs/${_.encodePathParam(r)}`),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:Zr.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 403:throw new te(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 503:throw new ge(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/guardrails/models/{id}/runs/{runId}")}};});var Jd,ire=n(()=>{X();$();b();Y();Z();G();re();q();Jd=class{constructor(o={}){this._options=B(o);}findGuardrailPolicies(o={},r){return P.fromPromise(this.__findGuardrailPolicies(o,r))}async __findGuardrailPolicies(o={},r){var f,g,h,y,w,A,C,I,D,F,M;let{page:t,size:i,name:a,names:s,executionScope:c,sorting:l}=o,m={page:t,size:i,name:a,names:s,execution_scope:c!=null?Al.jsonOrThrow(c,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,sorting:l},u=z((f=this._options)==null?void 0:f.headers,T({"Comet-Workspace":(h=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/guardrails/policies"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:AI.parseOrThrow(d.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:d.rawResponse};if(d.error.reason==="status-code")switch(d.error.statusCode){case 400:throw new N(d.error.body,d.rawResponse);case 403:throw new te(d.error.body,d.rawResponse);case 503:throw new ge(d.error.body,d.rawResponse);default:throw new k({statusCode:d.error.statusCode,body:d.error.body,rawResponse:d.rawResponse})}return j(d.error,d.rawResponse,"GET","/v1/private/guardrails/policies")}createGuardrailPolicy(o,r){return P.fromPromise(this.__createGuardrailPolicy(o,r))}async __createGuardrailPolicy(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails/policies"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:yd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 403:throw new te(i.error.body,i.rawResponse);case 409:throw new Q(i.error.body,i.rawResponse);case 422:throw new K(i.error.body,i.rawResponse);case 429:throw new de(i.error.body,i.rawResponse);case 503:throw new ge(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/guardrails/policies")}getGuardrailPolicyById(o,r={},t){return P.fromPromise(this.__getGuardrailPolicyById(o,r,t))}async __getGuardrailPolicyById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/guardrails/policies/${_.encodePathParam(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:op.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 503:throw new ge(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"GET","/v1/private/guardrails/policies/{id}")}updateGuardrailPolicy(o,r,t){return P.fromPromise(this.__updateGuardrailPolicy(o,r,t))}async __updateGuardrailPolicy(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/guardrails/policies/${_.encodePathParam(o)}`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:yd.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 403:throw new te(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new Q(s.error.body,s.rawResponse);case 422:throw new K(s.error.body,s.rawResponse);case 429:throw new de(s.error.body,s.rawResponse);case 503:throw new ge(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"PUT","/v1/private/guardrails/policies/{id}")}deleteGuardrailPolicy(o,r={},t){return P.fromPromise(this.__deleteGuardrailPolicy(o,r,t))}async __deleteGuardrailPolicy(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/guardrails/policies/${_.encodePathParam(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")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 503:throw new ge(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"DELETE","/v1/private/guardrails/policies/{id}")}};});var Hd,are=n(()=>{X();$();b();Y();Z();G();re();q();Hd=class{constructor(o={}){this._options=B(o);}createGuardrails(o,r){return P.fromPromise(this.__createGuardrails(o,r))}async __createGuardrails(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ia.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}validateGuardrails(o,r){return P.fromPromise(this.__validateGuardrails(o,r))}async __validateGuardrails(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/guardrails/validations"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Da.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:FI.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 401:throw new O(i.error.body,i.rawResponse);case 403:throw new te(i.error.body,i.rawResponse);case 422:throw new K(i.error.body,i.rawResponse);case 429:throw new de(i.error.body,i.rawResponse);case 503:throw new ge(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/guardrails/validations")}};});var Kd,nre=n(()=>{X();$();b();Y();Z();G();re();q();Kd=class{constructor(o={}){this._options=B(o);}findInsightsViews(o={},r){return P.fromPromise(this.__findInsightsViews(o,r))}async __findInsightsViews(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/insights-views"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Gt.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,r){return P.fromPromise(this.__createInsightsView(o,r))}async __createInsightsView(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Es.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:nr.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,r={},t){return P.fromPromise(this.__getInsightsViewById(o,r,t))}async __getInsightsViewById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:nr.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/insights-views/{insightsViewId}")}deleteInsightsView(o,r={},t){return P.fromPromise(this.__deleteInsightsView(o,r,t))}async __deleteInsightsView(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t){return P.fromPromise(this.__updateInsightsView(o,r,t))}async __updateInsightsView(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:js.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:nr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"PATCH","/v1/private/insights-views/{insightsViewId}")}deleteInsightsViewsBatch(o,r){return P.fromPromise(this.__deleteInsightsViewsBatch(o,r))}async __deleteInsightsViewsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/insights-views/delete-batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")}runInsightsViewWidgetQuery(o,r,t,i){return P.fromPromise(this.__runInsightsViewWidgetQuery(o,r,t,i))}async __runInsightsViewWidgetQuery(o,r,t,i){var l,m,u,d,f,g,h,y,w,A,C;let{body:a}=t,s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=i==null?void 0:i.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),i==null?void 0:i.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,`v1/private/insights-views/${_.encodePathParam(o)}/widgets/${_.encodePathParam(r)}/query`),method:"POST",headers:s,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:Cs.jsonOrThrow(a,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((y=(h=i==null?void 0:i.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=i==null?void 0:i.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:i==null?void 0:i.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:yr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")switch(c.error.statusCode){case 400:throw new N(c.error.body,c.rawResponse);case 404:throw new U(c.error.body,c.rawResponse);case 422:throw new K(c.error.body,c.rawResponse);case 429:throw new de(c.error.body,c.rawResponse);case 501:throw new Re(c.error.body,c.rawResponse);default:throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse})}return j(c.error,c.rawResponse,"POST","/v1/private/insights-views/{insightsViewId}/widgets/{widgetId}/query")}};});var Qd,sre=n(()=>{X();$();b();Y();Z();G();re();Qd=class{constructor(o={}){this._options=B(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 r=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:r,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:kt.getLlmModels.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models")}getLlmModelProfiles(o){return P.fromPromise(this.__getLlmModelProfiles(o))}async __getLlmModelProfiles(o){var i,a,s,c,l,m,u,d,f,g,h;let r=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/profiles"),method:"GET",headers:r,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:kt.getLlmModelProfiles.Response.parseOrThrow(t.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:t.rawResponse};if(t.error.reason==="status-code")throw new k({statusCode:t.error.statusCode,body:t.error.body,rawResponse:t.rawResponse});return j(t.error,t.rawResponse,"GET","/v1/private/llm/models/profiles")}};});var Od,pre=n(()=>{X();$();b();Y();Z();G();re();q();Od=class{constructor(o={}){this._options=B(o);}deleteLlmProviderApiKeysBatch(o,r){return P.fromPromise(this.__deleteLlmProviderApiKeysBatch(o,r))}async __deleteLlmProviderApiKeysBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 r=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:r,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:EN.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,r){return P.fromPromise(this.__storeLlmProviderApiKey(o,r))}async __storeLlmProviderApiKey(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ba.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 te(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,r={},t){return P.fromPromise(this.__getLlmProviderApiKeyById(o,r,t))}async __getLlmProviderApiKeyById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:mp.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,r={},t){return P.fromPromise(this.__updateLlmProviderApiKey(o,r,t))}async __updateLlmProviderApiKey(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Fa.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 401:throw new O(a.error.body,a.rawResponse);case 403:throw new te(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={},r){return P.fromPromise(this.__testLlmProviderAuthConfig(o,r))}async __testLlmProviderAuthConfig(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/llm-provider-key/auth-config/test"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ma.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Dr.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 te(i.error.body,i.rawResponse);case 404:throw new U(i.error.body,i.rawResponse);case 422:throw new K(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 $d,cre=n(()=>{X();$();b();Y();Z();G();re();q();$d=class{constructor(o={}){this._options=B(o);}evaluateSpans(o,r){return P.fromPromise(this.__evaluateSpans(o,r))}async __evaluateSpans(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ap.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:np.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,r){return P.fromPromise(this.__evaluateThreads(o,r))}async __evaluateThreads(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/threads"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ap.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:np.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,r){return P.fromPromise(this.__evaluateTraces(o,r))}async __evaluateTraces(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/manual-evaluation/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ap.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:np.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 Yd,lre=n(()=>{X();$();b();Y();Z();G();re();q();Yd=class{constructor(o={}){this._options=B(o);}authorize(o,r){return P.fromPromise(this.__authorize(o,r))}async __authorize(o,r){var g,h,y,w,A,C,I,D,F,M,oe;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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"oauth/authorize"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(oe=this._options)==null?void 0:oe.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,r){return P.fromPromise(this.__consent(o,r))}async __consent(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/authorize"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Va.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:UT.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,r){return P.fromPromise(this.__getAuthorizeContext(o,r))}async __getAuthorizeContext(o,r){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=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"oauth/authorize/context"),method:"GET",headers:s,queryParameters:{...a,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data: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","/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 r=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:r,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:wP.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,r){return P.fromPromise(this.__registerOAuthClient(o,r))}async __registerOAuthClient(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/register"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Wa.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:hT.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 de(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={},r){return P.fromPromise(this.__revoke(o,r))}async __revoke(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/revoke"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:r==null?void 0:r.queryParams,requestType:"form",body:La.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__token(o,r))}async __token(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"oauth/token"),method:"POST",headers:t,contentType:"application/x-www-form-urlencoded",queryParameters:r==null?void 0:r.queryParams,requestType:"form",body:Ga.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:nF.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 r=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:r,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:zF.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 Xd,mre=n(()=>{X();$();b();Y();Z();G();re();q();Xd=class{constructor(o={}){this._options=B(o);}listModels(o,r){return P.fromPromise(this.__listModels(o,r))}async __listModels(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/models"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Rd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Ao.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 K(i.error.body,i.rawResponse);case 500:throw new ft(i.error.body,i.rawResponse);case 503:throw new ge(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/ollama/models")}testConnection(o,r){return P.fromPromise(this.__testConnection(o,r))}async __testConnection(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/ollama/test-connection"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Rd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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")switch(i.error.statusCode){case 422:throw new K(i.error.body,i.rawResponse);case 502:throw new _i(bd.parseOrThrow(i.error.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),i.rawResponse);case 503:throw new ge(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/ollama/test-connection")}};});var Zd,dre=n(()=>{X();$();b();Y();Z();G();q();Zd=class{constructor(o={}){this._options=B(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 r=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:r,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,r){return P.fromPromise(this.__replaceOllieState(o,r))}async __replaceOllieState(o,r){var s,c,l,m,u,d,f,g,h,y,w;let t=await Pi.toBinaryUploadRequest(o),i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=r==null?void 0:r.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t.headers,r==null?void 0:r.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,"v1/private/ollie/state"),method:"PUT",headers:i,contentType:"application/gzip",queryParameters:r==null?void 0:r.queryParams,requestType:"bytes",duplex:"half",body:t.body,timeoutMs:((g=(f=r==null?void 0:r.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=r==null?void 0:r.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 401:throw new O(a.error.body,a.rawResponse);case 429:throw new de(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 r=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:r,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 qd,ure=n(()=>{X();$();b();Y();Z();G();qd=class{constructor(o={}){this._options=B(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 r=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:r,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 eu,gre=n(()=>{X();$();b();Y();Z();G();re();q();eu=class{constructor(o={}){this._options=B(o);}findOptimizations(o={},r){return P.fromPromise(this.__findOptimizations(o,r))}async __findOptimizations(o={},r){var h,y,w,A,C,I,D,F,M,oe,pe;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=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/optimizations"),method:"GET",headers:f,queryParameters:{...d,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(oe=r==null?void 0:r.maxRetries)!=null?oe:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:pp.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,r){return P.fromPromise(this.__createOptimization(o,r))}async __createOptimization(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:xd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__upsertOptimization(o,r))}async __upsertOptimization(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:xd.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteOptimizationsById(o,r))}async __deleteOptimizationsById(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/optimizations/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Bo.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getOptimizationById(o,r,t))}async __getOptimizationById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:sp.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/optimizations/{id}")}updateOptimizationsById(o,r={},t){return P.fromPromise(this.__updateOptimizationsById(o,r,t))}async __updateOptimizationsById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Ja.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/optimizations/{id}")}getStudioOptimizationLogs(o,r={},t){return P.fromPromise(this.__getStudioOptimizationLogs(o,r,t))}async __getStudioOptimizationLogs(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:dU.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 ru,fre=n(()=>{X();$();b();Y();Z();G();re();q();ru=class{constructor(o={}){this._options=B(o);}activatePairingSession(o,r,t){return P.fromPromise(this.__activatePairingSession(o,r,t))}async __activatePairingSession(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Ha.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 403:throw new te(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new Q(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);case 429:throw new de(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,r){return P.fromPromise(this.__createPairingSession(o,r))}async __createPairingSession(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/pairing/sessions"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ka.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:BT.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 K(i.error.body,i.rawResponse);case 429:throw new de(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 tu,hre=n(()=>{X();$();b();Y();Z();G();re();q();tu=class{constructor(o={}){this._options=B(o);}findAlertsByProject(o,r={},t){return P.fromPromise(this.__findAlertsByProject(o,r,t))}async __findAlertsByProject(o,r={},t){var d,f,g,h,y,w,A,C,I,D,F;let{page:i,size:a,sorting:s,filters:c}=r,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:$n.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,r={},t){return P.fromPromise(this.__findDashboardsByProject(o,r,t))}async __findDashboardsByProject(o,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:i,size:a,name:s,sorting:c,filters:l}=r,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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:Gt.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,r={},t){return P.fromPromise(this.__findDatasetsByProject(o,r,t))}async __findDatasetsByProject(o,r={},t){var h,y,w,A,C,I,D,F,M,oe,pe;let{page:i,size:a,withExperimentsOnly:s,withOptimizationsOnly:c,name:l,sorting:m,filters:u}=r,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:(oe=t==null?void 0:t.maxRetries)!=null?oe:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:Ls.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,r={},t){return P.fromPromise(this.__findExperimentsByProject(o,r,t))}async __findExperimentsByProject(o,r={},t){var C,I,D,F,M,oe,pe,be,De,Ue,Ne;let{page:i,size:a,datasetId:s,optimizationId:c,types:l,name:m,datasetDeleted:u,sorting:d,filters:f,experimentIds:g,forceSorting:h}=r,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((M=(F=await x.get(this._options.baseUrl))!=null?F:await x.get(this._options.environment))!=null?M:v.Default,`v1/private/projects/${_.encodePathParam(o)}/experiments`),method:"GET",headers:w,queryParameters:{...y,...t==null?void 0:t.queryParams},timeoutMs:((be=(pe=t==null?void 0:t.timeoutInSeconds)!=null?pe:(oe=this._options)==null?void 0:oe.timeoutInSeconds)!=null?be:60)*1e3,maxRetries:(Ue=t==null?void 0:t.maxRetries)!=null?Ue:(De=this._options)==null?void 0:De.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(Ne=this._options)==null?void 0:Ne.fetch,logging:this._options.logging});if(A.ok)return {data:qs.parseOrThrow(A.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:A.rawResponse};if(A.error.reason==="status-code")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,r={},t){return P.fromPromise(this.__findOptimizationsByProject(o,r,t))}async __findOptimizationsByProject(o,r={},t){var h,y,w,A,C,I,D,F,M,oe,pe;let{page:i,size:a,datasetId:s,datasetName:c,name:l,datasetDeleted:m,filters:u}=r,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:(oe=t==null?void 0:t.maxRetries)!=null?oe:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:pp.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,r={},t){return P.fromPromise(this.__getPromptsByProject(o,r,t))}async __getPromptsByProject(o,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:i,size:a,name:s,sorting:c,filters:l}=r,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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:lp.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={},r){return P.fromPromise(this.__findProjects(o,r))}async __findProjects(o={},r){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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/projects"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:MU.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,r){return P.fromPromise(this.__createProject(o,r))}async __createProject(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Za.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 K(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,r={},t){return P.fromPromise(this.__getProjectById(o,r,t))}async __getProjectById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:cp.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/projects/{id}")}deleteProjectById(o,r={},t){return P.fromPromise(this.__deleteProjectById(o,r,t))}async __deleteProjectById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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 Q(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,r={},t){return P.fromPromise(this.__updateProject(o,r,t))}async __updateProject(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Xa.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/projects/{id}")}deleteProjectsBatch(o,r){return P.fromPromise(this.__deleteProjectsBatch(o,r))}async __deleteProjectsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__findFeedbackScoreNamesByProjectIds(o,r))}async __findFeedbackScoreNamesByProjectIds(o={},r){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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/projects/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:ME.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,r={},t){return P.fromPromise(this.__findTokenUsageNames(o,r,t))}async __findTokenUsageNames(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:hp.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,r,t){return P.fromPromise(this.__getProjectKpiCards(o,r,t))}async __getProjectKpiCards(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Qa.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:HI.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,r={},t){return P.fromPromise(this.__getProjectMetrics(o,r,t))}async __getProjectMetrics(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:$a.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:UU.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={},r){return P.fromPromise(this.__getProjectStats(o,r))}async __getProjectStats(o={},r){var g,h,y,w,A,C,I,D,F,M,oe;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=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/projects/stats"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(oe=this._options)==null?void 0:oe.fetch,logging:this._options.logging});if(f.ok)return {data:HU.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,r){return P.fromPromise(this.__retrieveProject(o,r))}async __retrieveProject(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/projects/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ya.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:vU.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 K(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,r={},t){return P.fromPromise(this.__getRecentActivity(o,r,t))}async __getRecentActivity(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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:FN.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 ft(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 ou,yre=n(()=>{X();$();b();Y();Z();G();re();q();ou=class{constructor(o={}){this._options=B(o);}getPrompts(o={},r){return P.fromPromise(this.__getPrompts(o,r))}async __getPrompts(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/prompts"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:lp.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,r){return P.fromPromise(this.__createPrompt(o,r))}async __createPrompt(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:pn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(i.error.body,i.rawResponse);case 422:throw new K(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,r){return P.fromPromise(this.__createPromptVersion(o,r))}async __createPromptVersion(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:en.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Be.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 Q(i.error.body,i.rawResponse);case 422:throw new K(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,r){return P.fromPromise(this.__updatePromptVersions(o,r))}async __updatePromptVersions(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:tn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getPromptById(o,r,t))}async __getPromptById(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{maskId:i,environment:a}=r,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:_d.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,r,t){return P.fromPromise(this.__updatePrompt(o,r,t))}async __updatePrompt(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:rn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);case 409:throw new Q(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PUT","/v1/private/prompts/{id}")}deletePrompt(o,r={},t){return P.fromPromise(this.__deletePrompt(o,r,t))}async __deletePrompt(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r){return P.fromPromise(this.__deletePromptsBatch(o,r))}async __deletePromptsBatch(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getPromptByCommit(o,r,t))}async __getPromptByCommit(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:_d.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 Q(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,r={},t){return P.fromPromise(this.__getPromptVersionById(o,r,t))}async __getPromptVersionById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Be.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===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,r,t={},i){return P.fromPromise(this.__getPromptVersionByNumber(o,r,t,i))}async __getPromptVersionByNumber(o,r,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(r)}`),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:Be.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,r={},t){return P.fromPromise(this.__getPromptVersions(o,r,t))}async __getPromptVersions(o,r={},t){var f,g,h,y,w,A,C,I,D,F,M;let{page:i,size:a,search:s,sorting:c,filters:l}=r,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:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:_N.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,r){return P.fromPromise(this.__getPromptsByCommits(o,r))}async __getPromptsByCommits(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/retrieve-by-commits"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:on.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:zt.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,r,t={},i){return P.fromPromise(this.__restorePromptVersion(o,r,t,i))}async __restorePromptVersion(o,r,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(r)}/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:Be.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,r){return P.fromPromise(this.__retrievePromptVersion(o,r))}async __retrievePromptVersion(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Be.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 K(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,r){return P.fromPromise(this.__retrievePromptVersionsByIds(o,r))}async __retrievePromptVersionsByIds(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/prompts/versions/retrieve-by-ids"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:nn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:zt.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,r,t){return P.fromPromise(this.__setPromptVersionEnvironment(o,r,t))}async __setPromptVersionEnvironment(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:an.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"PATCH","/v1/private/prompts/versions/{versionId}/environments")}};});var iu,bre=n(()=>{X();$();b();Y();Z();G();q();iu=class{constructor(o={}){this._options=B(o);}datasetsRedirect(o,r){return P.fromPromise(this.__datasetsRedirect(o,r))}async __datasetsRedirect(o,r){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=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/datasets"),method:"GET",headers:c,queryParameters:{...s,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/datasets")}experimentsRedirect(o,r){return P.fromPromise(this.__experimentsRedirect(o,r))}async __experimentsRedirect(o,r){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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/experiments"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/experiments")}optimizationsRedirect(o,r){return P.fromPromise(this.__optimizationsRedirect(o,r))}async __optimizationsRedirect(o,r){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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/session/redirect/optimizations"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:void 0,rawResponse:m.rawResponse};if(m.error.reason==="status-code")switch(m.error.statusCode){case 400:throw new N(m.error.body,m.rawResponse);case 404:throw new U(m.error.body,m.rawResponse);default:throw new k({statusCode:m.error.statusCode,body:m.error.body,rawResponse:m.rawResponse})}return j(m.error,m.rawResponse,"GET","/v1/session/redirect/optimizations")}projectsRedirect(o,r){return P.fromPromise(this.__projectsRedirect(o,r))}async __projectsRedirect(o,r){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=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/session/redirect/projects"),method:"GET",headers:c,queryParameters:{...s,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:void 0,rawResponse:l.rawResponse};if(l.error.reason==="status-code")switch(l.error.statusCode){case 400:throw new N(l.error.body,l.rawResponse);case 404:throw new U(l.error.body,l.rawResponse);default:throw new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse})}return j(l.error,l.rawResponse,"GET","/v1/session/redirect/projects")}};});var au,Rre=n(()=>{X();$();b();Y();Z();G();re();q();au=class{constructor(o={}){this._options=B(o);}findReportFailures(o,r){return P.fromPromise(this.__findReportFailures(o,r))}async __findReportFailures(o,r){var u,d,f,g,h,y,w,A,C,I,D;let{type:t,projectId:i,page:a,size:s}=o,c={type:$l.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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/report-failures"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:VN.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,r){return P.fromPromise(this.__createReportFailure(o,r))}async __createReportFailure(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/report-failures"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:dp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 nu,xre=n(()=>{X();$();b();Y();Z();G();re();q();nu=class{constructor(o={}){this._options=B(o);}completeReport(o,r,t,i){return P.fromPromise(this.__completeReport(o,r,t,i))}async __completeReport(o,r,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(r)}/complete`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:cn.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,r={},t){return P.fromPromise(this.__generateReport(o,r,t))}async __generateReport(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:eI.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 te(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,r={},t){return P.fromPromise(this.__getReportPreference(o,r,t))}async __getReportPreference(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:up.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,r,t){return P.fromPromise(this.__updateReportPreference(o,r,t))}async __updateReportPreference(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/projects/${_.encodePathParam(o)}/reports/preferences`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:up.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:up.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,r={},t){return P.fromPromise(this.__getReports(o,r,t))}async __getReports(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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:bD.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 su,wre=n(()=>{X();$();b();Y();Z();G();re();q();su=class{constructor(o={}){this._options=B(o);}findRetentionRules(o={},r){return P.fromPromise(this.__findRetentionRules(o,r))}async __findRetentionRules(o={},r){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=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/retention/rules"),method:"GET",headers:c,queryParameters:{...s,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:ON.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,r){return P.fromPromise(this.__createRetentionRule(o,r))}async __createRetentionRule(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/retention/rules"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:ln.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Lo.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,r={},t){return P.fromPromise(this.__getRetentionRuleById(o,r,t))}async __getRetentionRuleById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:Lo.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,r={},t){return P.fromPromise(this.__deactivateRetentionRule(o,r,t))}async __deactivateRetentionRule(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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 pu,_re=n(()=>{X();$();b();Y();Z();G();re();q();pu=class{constructor(o={}){this._options=B(o);}getJobLogs(o,r={},t){return P.fromPromise(this.__getJobLogs(o,r,t))}async __getJobLogs(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{offset:i}=r,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:hr.getJobLogs.Response.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===404?new U(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/local-runners/jobs/{jobId}/logs")}appendJobLogs(o,r,t){return P.fromPromise(this.__appendJobLogs(o,r,t))}async __appendJobLogs(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/jobs/${_.encodePathParam(o)}/logs`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.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,r={},t){return P.fromPromise(this.__cancelJob(o,r,t))}async __cancelJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t){return P.fromPromise(this.__createBridgeCommand(o,r,t))}async __createBridgeCommand(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:un.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Av.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 Q(a.error.body,a.rawResponse);case 429:throw new de(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,r){return P.fromPromise(this.__createJob(o,r))}async __createJob(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/local-runners/jobs"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 Q(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,r={},t){return P.fromPromise(this.__getRunner(o,r,t))}async __getRunner(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:ip.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/local-runners/{runnerId}")}disconnectRunner(o,r={},t){return P.fromPromise(this.__disconnectRunner(o,r,t))}async __disconnectRunner(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t={},i){return P.fromPromise(this.__getBridgeCommand(o,r,t,i))}async __getBridgeCommand(o,r,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(r)}`),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:bv.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,r={},t){return P.fromPromise(this.__getJob(o,r,t))}async __getJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:St.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,r={},t){return P.fromPromise(this.__heartbeat(o,r,t))}async __heartbeat(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:hn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:XI.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 gt(wC.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,r={},t){return P.fromPromise(this.__listJobs(o,r,t))}async __listJobs(o,r={},t){var u,d,f,g,h,y,w,A,C,I,D;let{projectId:i,page:a,size:s}=r,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:ZI.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,r){return P.fromPromise(this.__listRunners(o,r))}async __listRunners(o,r){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?dm.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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/local-runners"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data: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===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,r={},t){return P.fromPromise(this.__nextBridgeCommands(o,r,t))}async __nextBridgeCommands(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:mn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:kv.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,r={},t){return P.fromPromise(this.__nextJob(o,r,t))}async __nextJob(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:hr.nextJob.Response.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/{runnerId}/jobs/next")}patchChecklist(o,r,t){return P.fromPromise(this.__patchChecklist(o,r,t))}async __patchChecklist(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/checklist`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.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,r,t){return P.fromPromise(this.__registerAgents(o,r,t))}async __registerAgents(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/local-runners/${_.encodePathParam(o)}/agents`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:hr.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,r,t,i){return P.fromPromise(this.__reportBridgeResult(o,r,t,i))}async __reportBridgeResult(o,r,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(r)}/results`),method:"POST",headers:a,contentType:"application/json",queryParameters:i==null?void 0:i.queryParams,requestType:"json",body:dn.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 Q(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,r,t){return P.fromPromise(this.__reportJobResult(o,r,t))}async __reportJobResult(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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:yn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:void 0,rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 400:throw new N(a.error.body,a.rawResponse);case 404:throw new U(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/local-runners/jobs/{jobId}/results")}};});var cu,kre=n(()=>{X();$();b();Y();Z();G();re();cu=class{constructor(o={}){this._options=B(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 r=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:r,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:$N.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 lu,Are=n(()=>{X();$();b();Y();Z();G();re();q();lu=class{constructor(o={}){this._options=B(o);}addSpanComment(o,r,t){return P.fromPromise(this.__addSpanComment(o,r,t))}async __addSpanComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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,r,t){return P.fromPromise(this.__addSpanFeedbackScore(o,r,t))}async __addSpanFeedbackScore(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ve.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,r){return P.fromPromise(this.__createSpans(o,r))}async __createSpans(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__batchUpdateSpans(o,r))}async __batchUpdateSpans(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:xn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__getSpansByProject(o,r))}async __getSpansByProject(o={},r){var D,F,M,oe,pe,be,De,Ue,Ne,er,bi;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?ym.jsonOrThrow(l,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:m,truncate:u,strip_attachments:d,sorting:f,exclude:g,search:h,from_time:y==null?void 0:y.toISOString(),to_time:w==null?void 0:w.toISOString()},C=z((D=this._options)==null?void 0:D.headers,T({"Comet-Workspace":(M=r==null?void 0:r.workspaceName)!=null?M:(F=this._options)==null?void 0:F.workspaceName}),r==null?void 0:r.headers),I=await S({url:_.join((pe=(oe=await x.get(this._options.baseUrl))!=null?oe:await x.get(this._options.environment))!=null?pe:v.Default,"v1/private/spans"),method:"GET",headers:C,queryParameters:{...A,...r==null?void 0:r.queryParams},timeoutMs:((Ue=(De=r==null?void 0:r.timeoutInSeconds)!=null?De:(be=this._options)==null?void 0:be.timeoutInSeconds)!=null?Ue:60)*1e3,maxRetries:(er=r==null?void 0:r.maxRetries)!=null?er:(Ne=this._options)==null?void 0:Ne.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(bi=this._options)==null?void 0:bi.fetch,logging:this._options.logging});if(I.ok)return {data:rF.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,r){return P.fromPromise(this.__createSpan(o,r))}async __createSpan(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:_n.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===409?new Q(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,r={},t){return P.fromPromise(this.__getSpanById(o,r,t))}async __getSpanById(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=r,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:fp.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,r={},t){return P.fromPromise(this.__deleteSpanById(o,r,t))}async __deleteSpanById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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 Re(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,r,t){return P.fromPromise(this.__updateSpan(o,r,t))}async __updateSpan(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Rn.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,r){return P.fromPromise(this.__deleteSpanComments(o,r))}async __deleteSpanComments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r,t){return P.fromPromise(this.__deleteSpanFeedbackScore(o,r,t))}async __deleteSpanFeedbackScore(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Js.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={},r){return P.fromPromise(this.__findFeedbackScoreNames1(o,r))}async __findFeedbackScoreNames1(o={},r){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?fm.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0},s=z((l=this._options)==null?void 0:l.headers,T({"Comet-Workspace":(u=r==null?void 0:r.workspaceName)!=null?u:(m=this._options)==null?void 0:m.workspaceName}),r==null?void 0:r.headers),c=await S({url:_.join((f=(d=await x.get(this._options.baseUrl))!=null?d:await x.get(this._options.environment))!=null?f:v.Default,"v1/private/spans/feedback-scores/names"),method:"GET",headers:s,queryParameters:{...a,...r==null?void 0:r.queryParams},timeoutMs:((y=(h=r==null?void 0:r.timeoutInSeconds)!=null?h:(g=this._options)==null?void 0:g.timeoutInSeconds)!=null?y:60)*1e3,maxRetries:(A=r==null?void 0:r.maxRetries)!=null?A:(w=this._options)==null?void 0:w.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(C=this._options)==null?void 0:C.fetch,logging:this._options.logging});if(c.ok)return {data:Xr.parseOrThrow(c.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"GET","/v1/private/spans/feedback-scores/names")}getSpanComment(o,r,t={},i){return P.fromPromise(this.__getSpanComment(o,r,t,i))}async __getSpanComment(o,r,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(r)}`),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:ye.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={},r){return P.fromPromise(this.__getSpanStats(o,r))}async __getSpanStats(o={},r){var h,y,w,A,C,I,D,F,M,oe,pe;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?hm.jsonOrThrow(s,{unrecognizedObjectKeys:"strip",omitUndefined:true}):void 0,filters:c,search:l,from_time:m==null?void 0:m.toISOString(),to_time:u==null?void 0:u.toISOString()},f=z((h=this._options)==null?void 0:h.headers,T({"Comet-Workspace":(w=r==null?void 0:r.workspaceName)!=null?w:(y=this._options)==null?void 0:y.workspaceName}),r==null?void 0:r.headers),g=await S({url:_.join((C=(A=await x.get(this._options.baseUrl))!=null?A:await x.get(this._options.environment))!=null?C:v.Default,"v1/private/spans/stats"),method:"GET",headers:f,queryParameters:{...d,...r==null?void 0:r.queryParams},timeoutMs:((F=(D=r==null?void 0:r.timeoutInSeconds)!=null?D:(I=this._options)==null?void 0:I.timeoutInSeconds)!=null?F:60)*1e3,maxRetries:(oe=r==null?void 0:r.maxRetries)!=null?oe:(M=this._options)==null?void 0:M.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(pe=this._options)==null?void 0:pe.fetch,logging:this._options.logging});if(g.ok)return {data:et.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,r){return P.fromPromise(this.__scoreBatchOfSpans(o,r))}async __scoreBatchOfSpans(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__searchSpans(o,r))}async __searchSpans(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/spans/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:An.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__exist(o,r))}async __exist(o={},r){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=r==null?void 0:r.workspaceName)!=null?d:(u=this._options)==null?void 0:u.workspaceName}),r==null?void 0:r.headers),l=await S({url:_.join((g=(f=await x.get(this._options.baseUrl))!=null?f:await x.get(this._options.environment))!=null?g:v.Default,"v1/private/spans/exists"),method:"GET",headers:c,queryParameters:{...s,...r==null?void 0:r.queryParams},timeoutMs:((w=(y=r==null?void 0:r.timeoutInSeconds)!=null?y:(h=this._options)==null?void 0:h.timeoutInSeconds)!=null?w:60)*1e3,maxRetries:(C=r==null?void 0:r.maxRetries)!=null?C:(A=this._options)==null?void 0:A.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(I=this._options)==null?void 0:I.fetch,logging:this._options.logging});if(l.ok)return {data:Os.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,r,t){return P.fromPromise(this.__updateSpanComment(o,r,t))}async __updateSpanComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/spans/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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 mu,Pre=n(()=>{X();$();b();Y();Z();G();re();q();mu=class{constructor(o={}){this._options=B(o);}executeAnalyticsQuery(o,r,t){return P.fromPromise(this.__executeAnalyticsQuery(o,r,t))}async __executeAnalyticsQuery(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await 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:Pn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:yr.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 K(a.error.body,a.rawResponse);case 501:throw new Re(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,r){return P.fromPromise(this.__executeScopedAnalyticsQuery(o,r))}async __executeScopedAnalyticsQuery(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/analytics-queries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:gp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:yr.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 K(i.error.body,i.rawResponse);case 501:throw new Re(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 du,zre=n(()=>{X();$();b();Y();Z();G();re();q();du=class{constructor(o={}){this._options=B(o);}findUsageProjects(o,r){return P.fromPromise(this.__findUsageProjects(o,r))}async __findUsageProjects(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/internal/usage/projects"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:zn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:PF.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 K(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/internal/usage/projects")}getDatasetBiInfo(o){return P.fromPromise(this.__getDatasetBiInfo(o))}async __getDatasetBiInfo(o){var i,a,s,c,l,m,u,d,f,g,h;let r=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:r,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:No.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 r=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:r,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:No.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 r=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:r,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:No.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 r=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:r,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:_F.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 r=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:r,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:iF.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 r=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:r,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:No.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 r=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:r,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:cF.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 uu,Sre=n(()=>{X();$();b();Y();Z();G();re();q();uu=class{constructor(o={}){this._options=B(o);}resetProjectTopics(o,r,t){return P.fromPromise(this.__resetProjectTopics(o,r,t))}async __resetProjectTopics(o,r,t){var l,m,u,d,f,g,h,y,w,A,C;let{workspaceId:i}=r,a={workspace_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/internal/topics/projects/${_.encodePathParam(o)}/reset`),method:"POST",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:void 0,rawResponse:c.rawResponse};if(c.error.reason==="status-code")throw c.error.statusCode===409?new Q(c.error.body,c.rawResponse):new k({statusCode:c.error.statusCode,body:c.error.body,rawResponse:c.rawResponse});return j(c.error,c.rawResponse,"POST","/v1/internal/topics/projects/{projectId}/reset")}resetWorkspaceTopics(o,r){return P.fromPromise(this.__resetWorkspaceTopics(o,r))}async __resetWorkspaceTopics(o,r){var c,l,m,u,d,f,g,h,y,w,A;let{workspaceId:t}=o,i={workspace_id:t},a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/internal/topics/reset"),method:"POST",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===409?new Q(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/internal/topics/reset")}runProjectTopics(o,r,t){return P.fromPromise(this.__runProjectTopics(o,r,t))}async __runProjectTopics(o,r,t){var u,d,f,g,h,y,w,A,C,I,D;let{workspaceId:i,night:a,ignoreBackfill:s}=r,c={workspace_id:i,night:a,ignore_backfill: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/internal/topics/projects/${_.encodePathParam(o)}/run`),method:"POST",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: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 409:throw new Q(m.error.body,m.rawResponse);case 503:throw new ge(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,"POST","/v1/internal/topics/projects/{projectId}/run")}runProjectTopicsNight(o,r,t){return P.fromPromise(this.__runProjectTopicsNight(o,r,t))}async __runProjectTopicsNight(o,r,t){var m,u,d,f,g,h,y,w,A,C,I;let{workspaceId:i,night:a}=r,s={workspace_id:i,night: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/internal/topics/projects/${_.encodePathParam(o)}/night`),method:"POST",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: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 409:throw new Q(l.error.body,l.rawResponse);case 503:throw new ge(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/internal/topics/projects/{projectId}/night")}getProjectTopics(o,r){return P.fromPromise(this.__getProjectTopics(o,r))}async __getProjectTopics(o,r){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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/topics"),method:"GET",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:YU.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 401:throw new O(s.error.body,s.rawResponse);case 403:throw new te(s.error.body,s.rawResponse);case 404:throw new U(s.error.body,s.rawResponse);case 429:throw new de(s.error.body,s.rawResponse);case 501:throw new Re(s.error.body,s.rawResponse);case 503:throw new ge(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/topics")}};});var gu,vre=n(()=>{X();$();b();Y();Z();G();re();q();gu=class{constructor(o={}){this._options=B(o);}addThreadComment(o,r,t){return P.fromPromise(this.__addThreadComment(o,r,t))}async __addThreadComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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,r,t){return P.fromPromise(this.__addTraceComment(o,r,t))}async __addTraceComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/comments`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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,r,t){return P.fromPromise(this.__addTraceFeedbackScore(o,r,t))}async __addTraceFeedbackScore(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores`),method:"PUT",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ve.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,r){return P.fromPromise(this.__createTraces(o,r))}async __createTraces(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Dn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__batchUpdateTraces(o,r))}async __batchUpdateTraces(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:En.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__batchUpdateThreads(o,r))}async __batchUpdateThreads(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/batch"),method:"PATCH",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Bn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__closeTraceThread(o,r))}async __closeTraceThread(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/close"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Nn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__getTracesByProject(o,r))}async __getTracesByProject(o={},r){var I,D,F,M,oe,pe,be,De,Ue,Ne,er;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=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((oe=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?oe:v.Default,"v1/private/traces"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((De=(be=r==null?void 0:r.timeoutInSeconds)!=null?be:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?De:60)*1e3,maxRetries:(Ne=r==null?void 0:r.maxRetries)!=null?Ne:(Ue=this._options)==null?void 0:Ue.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:fF.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,r){return P.fromPromise(this.__createTrace(o,r))}async __createTrace(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:In.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r={},t){return P.fromPromise(this.__getTraceById(o,r,t))}async __getTraceById(o,r={},t){var l,m,u,d,f,g,h,y,w,A,C;let{stripAttachments:i}=r,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:yp.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,r={},t){return P.fromPromise(this.__deleteTraceById(o,r,t))}async __deleteTraceById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({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,r,t){return P.fromPromise(this.__updateTrace(o,r,t))}async __updateTrace(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Cn.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,r){return P.fromPromise(this.__deleteThreadComments(o,r))}async __deleteThreadComments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteThreadFeedbackScores(o,r))}async __deleteThreadFeedbackScores(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:vn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteTraceComments(o,r))}async __deleteTraceComments(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/comments/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:fe.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r,t){return P.fromPromise(this.__deleteTraceFeedbackScore(o,r,t))}async __deleteTraceFeedbackScore(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/${_.encodePathParam(o)}/feedback-scores/delete`),method:"POST",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Js.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,r){return P.fromPromise(this.__deleteTraceThreads(o,r))}async __deleteTraceThreads(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Tn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__deleteTraces(o,r))}async __deleteTraces(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/delete"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Sn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:void 0,rawResponse:i.rawResponse};if(i.error.reason==="status-code")throw i.error.statusCode===422?new K(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={},r){return P.fromPromise(this.__findFeedbackScoreNames2(o,r))}async __findFeedbackScoreNames2(o={},r){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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/feedback-scores/names")}findTraceThreadsFeedbackScoreNames(o={},r){return P.fromPromise(this.__findTraceThreadsFeedbackScoreNames(o,r))}async __findTraceThreadsFeedbackScoreNames(o={},r){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=r==null?void 0:r.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),r==null?void 0:r.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,"v1/private/traces/threads/feedback-scores/names"),method:"GET",headers:a,queryParameters:{...i,...r==null?void 0:r.queryParams},timeoutMs:((h=(g=r==null?void 0:r.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=r==null?void 0:r.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:Xr.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/traces/threads/feedback-scores/names")}getTraceStats(o={},r){return P.fromPromise(this.__getTraceStats(o,r))}async __getTraceStats(o={},r){var g,h,y,w,A,C,I,D,F,M,oe;let{projectId:t,projectName:i,filters:a,search:s,fromTime:c,toTime:l,annotationQueueId:m}=o,u={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(),annotation_queue_id:m},d=z((g=this._options)==null?void 0:g.headers,T({"Comet-Workspace":(y=r==null?void 0:r.workspaceName)!=null?y:(h=this._options)==null?void 0:h.workspaceName}),r==null?void 0:r.headers),f=await S({url:_.join((A=(w=await x.get(this._options.baseUrl))!=null?w:await x.get(this._options.environment))!=null?A:v.Default,"v1/private/traces/stats"),method:"GET",headers:d,queryParameters:{...u,...r==null?void 0:r.queryParams},timeoutMs:((D=(I=r==null?void 0:r.timeoutInSeconds)!=null?I:(C=this._options)==null?void 0:C.timeoutInSeconds)!=null?D:60)*1e3,maxRetries:(M=r==null?void 0:r.maxRetries)!=null?M:(F=this._options)==null?void 0:F.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(oe=this._options)==null?void 0:oe.fetch,logging:this._options.logging});if(f.ok)return {data:et.parseOrThrow(f.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:f.rawResponse};if(f.error.reason==="status-code")throw new k({statusCode:f.error.statusCode,body:f.error.body,rawResponse:f.rawResponse});return j(f.error,f.rawResponse,"GET","/v1/private/traces/stats")}getThreadComment(o,r,t={},i){return P.fromPromise(this.__getThreadComment(o,r,t,i))}async __getThreadComment(o,r,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(r)}`),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:ye.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={},r){return P.fromPromise(this.__getTraceThreadStats(o,r))}async __getTraceThreadStats(o={},r){var f,g,h,y,w,A,C,I,D,F,M;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=r==null?void 0:r.workspaceName)!=null?h:(g=this._options)==null?void 0:g.workspaceName}),r==null?void 0:r.headers),d=await S({url:_.join((w=(y=await x.get(this._options.baseUrl))!=null?y:await x.get(this._options.environment))!=null?w:v.Default,"v1/private/traces/threads/stats"),method:"GET",headers:u,queryParameters:{...m,...r==null?void 0:r.queryParams},timeoutMs:((I=(C=r==null?void 0:r.timeoutInSeconds)!=null?C:(A=this._options)==null?void 0:A.timeoutInSeconds)!=null?I:60)*1e3,maxRetries:(F=r==null?void 0:r.maxRetries)!=null?F:(D=this._options)==null?void 0:D.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(M=this._options)==null?void 0:M.fetch,logging:this._options.logging});if(d.ok)return {data:et.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,r,t={},i){return P.fromPromise(this.__getTraceComment(o,r,t,i))}async __getTraceComment(o,r,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(r)}`),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:ye.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,r){return P.fromPromise(this.__getTraceThread(o,r))}async __getTraceThread(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/retrieve"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ad.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:bp.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={},r){return P.fromPromise(this.__getTraceThreads(o,r))}async __getTraceThreads(o={},r){var I,D,F,M,oe,pe,be,De,Ue,Ne,er;let{page:t,size:i,projectName:a,projectId:s,truncate:c,stripAttachments:l,filters: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,truncate:c,strip_attachments:l,filters:m,sorting:u,exclude:d,search:f,from_time:g==null?void 0:g.toISOString(),to_time:h==null?void 0:h.toISOString(),annotation_queue_id:y},A=z((I=this._options)==null?void 0:I.headers,T({"Comet-Workspace":(F=r==null?void 0:r.workspaceName)!=null?F:(D=this._options)==null?void 0:D.workspaceName}),r==null?void 0:r.headers),C=await S({url:_.join((oe=(M=await x.get(this._options.baseUrl))!=null?M:await x.get(this._options.environment))!=null?oe:v.Default,"v1/private/traces/threads"),method:"GET",headers:A,queryParameters:{...w,...r==null?void 0:r.queryParams},timeoutMs:((De=(be=r==null?void 0:r.timeoutInSeconds)!=null?be:(pe=this._options)==null?void 0:pe.timeoutInSeconds)!=null?De:60)*1e3,maxRetries:(Ne=r==null?void 0:r.maxRetries)!=null?Ne:(Ue=this._options)==null?void 0:Ue.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(er=this._options)==null?void 0:er.fetch,logging:this._options.logging});if(C.ok)return {data:RF.parseOrThrow(C.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:C.rawResponse};if(C.error.reason==="status-code")throw new k({statusCode:C.error.statusCode,body:C.error.body,rawResponse:C.rawResponse});return j(C.error,C.rawResponse,"GET","/v1/private/traces/threads")}openTraceThread(o,r){return P.fromPromise(this.__openTraceThread(o,r))}async __openTraceThread(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/open"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ad.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__scoreBatchOfThreads(o,r))}async __scoreBatchOfThreads(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:jn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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,r){return P.fromPromise(this.__scoreBatchOfTraces(o,r))}async __scoreBatchOfTraces(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/feedback-scores"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:rp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__searchTraceThreads(o,r))}async __searchTraceThreads(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/threads/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Mn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__searchTraces(o,r))}async __searchTraces(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/traces/search"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Un.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),responseType:"streaming",timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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={},r){return P.fromPromise(this.__exist(o,r))}async __exist(o={},r){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=r==null?void 0:r.workspaceName)!=null?f:(d=this._options)==null?void 0:d.workspaceName}),r==null?void 0:r.headers),m=await S({url:_.join((h=(g=await x.get(this._options.baseUrl))!=null?g:await x.get(this._options.environment))!=null?h:v.Default,"v1/private/traces/exists"),method:"GET",headers:l,queryParameters:{...c,...r==null?void 0:r.queryParams},timeoutMs:((A=(w=r==null?void 0:r.timeoutInSeconds)!=null?w:(y=this._options)==null?void 0:y.timeoutInSeconds)!=null?A:60)*1e3,maxRetries:(I=r==null?void 0:r.maxRetries)!=null?I:(C=this._options)==null?void 0:C.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(D=this._options)==null?void 0:D.fetch,logging:this._options.logging});if(m.ok)return {data:Os.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,r,t){return P.fromPromise(this.__updateThread(o,r,t))}async __updateThread(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Fn.jsonOrThrow(i,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((h=(g=t==null?void 0:t.timeoutInSeconds)!=null?g:(f=this._options)==null?void 0:f.timeoutInSeconds)!=null?h:60)*1e3,maxRetries:(w=t==null?void 0:t.maxRetries)!=null?w:(y=this._options)==null?void 0:y.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(A=this._options)==null?void 0:A.fetch,logging:this._options.logging});if(s.ok)return {data:void 0,rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw 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,r,t){return P.fromPromise(this.__updateThreadComment(o,r,t))}async __updateThreadComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/threads/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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,r,t){return P.fromPromise(this.__updateTraceComment(o,r,t))}async __updateTraceComment(o,r,t){var c,l,m,u,d,f,g,h,y,w,A;let{body:i}=r,a=z((c=this._options)==null?void 0:c.headers,T({"Comet-Workspace":(m=t==null?void 0:t.workspaceName)!=null?m:(l=this._options)==null?void 0:l.workspaceName}),t==null?void 0:t.headers),s=await S({url:_.join((d=(u=await x.get(this._options.baseUrl))!=null?u:await x.get(this._options.environment))!=null?d:v.Default,`v1/private/traces/comments/${_.encodePathParam(o)}`),method:"PATCH",headers:a,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:ye.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 fu,Tre=n(()=>{X();$();b();Y();Z();G();re();q();fu=class{constructor(o={}){this._options=B(o);}createView(o,r){return P.fromPromise(this.__createView(o,r))}async __createView(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/views"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Vn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Jo.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 K(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/views")}getViewVersions(o,r={},t){return P.fromPromise(this.__getViewVersions(o,r,t))}async __getViewVersions(o,r={},t){var m,u,d,f,g,h,y,w,A,C,I;let{page:i,size:a}=r,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/views/${_.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:BF.parseOrThrow(l.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:l.rawResponse};if(l.error.reason==="status-code")throw l.error.statusCode===404?new U(l.error.body,l.rawResponse):new k({statusCode:l.error.statusCode,body:l.error.body,rawResponse:l.rawResponse});return j(l.error,l.rawResponse,"GET","/v1/private/views/{id}/versions")}createViewVersion(o,r,t){return P.fromPromise(this.__createViewVersion(o,r,t))}async __createViewVersion(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/views/${_.encodePathParam(o)}/versions`),method:"POST",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Jn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Go.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")switch(a.error.statusCode){case 404:throw new U(a.error.body,a.rawResponse);case 422:throw new K(a.error.body,a.rawResponse);default:throw new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse})}return j(a.error,a.rawResponse,"POST","/v1/private/views/{id}/versions")}getViewById(o,r={},t){return P.fromPromise(this.__getViewById(o,r,t))}async __getViewById(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/views/${_.encodePathParam(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:Jo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"GET","/v1/private/views/{id}")}deleteView(o,r={},t){return P.fromPromise(this.__deleteView(o,r,t))}async __deleteView(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/views/${_.encodePathParam(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/views/{id}")}updateView(o,r={},t){return P.fromPromise(this.__updateView(o,r,t))}async __updateView(o,r={},t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/views/${_.encodePathParam(o)}`),method:"PATCH",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Gn.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Jo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PATCH","/v1/private/views/{id}")}getViewVersion(o,r,t={},i){return P.fromPromise(this.__getViewVersion(o,r,t,i))}async __getViewVersion(o,r,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/views/${_.encodePathParam(o)}/versions/${_.encodePathParam(r)}`),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:Go.parseOrThrow(s.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:s.rawResponse};if(s.error.reason==="status-code")throw s.error.statusCode===404?new U(s.error.body,s.rawResponse):new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse});return j(s.error,s.rawResponse,"GET","/v1/private/views/{id}/versions/{version}")}deleteViewVersion(o,r,t={},i){return P.fromPromise(this.__deleteViewVersion(o,r,t,i))}async __deleteViewVersion(o,r,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/views/${_.encodePathParam(o)}/versions/${_.encodePathParam(r)}`),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")switch(s.error.statusCode){case 404:throw new U(s.error.body,s.rawResponse);case 409:throw new Q(s.error.body,s.rawResponse);default:throw new k({statusCode:s.error.statusCode,body:s.error.body,rawResponse:s.rawResponse})}return j(s.error,s.rawResponse,"DELETE","/v1/private/views/{id}/versions/{version}")}setViewCurrentVersion(o,r,t){return P.fromPromise(this.__setViewCurrentVersion(o,r,t))}async __setViewCurrentVersion(o,r,t){var s,c,l,m,u,d,f,g,h,y,w;let i=z((s=this._options)==null?void 0:s.headers,T({"Comet-Workspace":(l=t==null?void 0:t.workspaceName)!=null?l:(c=this._options)==null?void 0:c.workspaceName}),t==null?void 0:t.headers),a=await S({url:_.join((u=(m=await x.get(this._options.baseUrl))!=null?m:await x.get(this._options.environment))!=null?u:v.Default,`v1/private/views/${_.encodePathParam(o)}/current`),method:"PUT",headers:i,contentType:"application/json",queryParameters:t==null?void 0:t.queryParams,requestType:"json",body:Ln.jsonOrThrow(r,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((g=(f=t==null?void 0:t.timeoutInSeconds)!=null?f:(d=this._options)==null?void 0:d.timeoutInSeconds)!=null?g:60)*1e3,maxRetries:(y=t==null?void 0:t.maxRetries)!=null?y:(h=this._options)==null?void 0:h.maxRetries,withCredentials:true,abortSignal:t==null?void 0:t.abortSignal,fetchFn:(w=this._options)==null?void 0:w.fetch,logging:this._options.logging});if(a.ok)return {data:Jo.parseOrThrow(a.body,{unrecognizedObjectKeys:"passthrough",allowUnrecognizedUnionMembers:true,allowUnrecognizedEnumValues:true,skipValidation:true,breadcrumbsPrefix:["response"]}),rawResponse:a.rawResponse};if(a.error.reason==="status-code")throw a.error.statusCode===404?new U(a.error.body,a.rawResponse):new k({statusCode:a.error.statusCode,body:a.error.body,rawResponse:a.rawResponse});return j(a.error,a.rawResponse,"PUT","/v1/private/views/{id}/current")}};});var hu,jre=n(()=>{X();$();b();Y();Z();G();re();hu=class{constructor(o={}){this._options=B(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 r=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:r,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:GF.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={},r){return P.fromPromise(this.__submitWelcomeWizard(o,r))}async __submitWelcomeWizard(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/welcome-wizard"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Hn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(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 yu,Cre=n(()=>{X();$();b();Y();Z();G();re();q();yu=class{constructor(o={}){this._options=B(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 r=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:r,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:KF.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 bu,Ere=n(()=>{X();$();b();Y();Z();G();re();q();bu=class{constructor(o={}){this._options=B(o);}costsSummary(o,r){return P.fromPromise(this.__costsSummary(o,r))}async __costsSummary(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Dr.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 r=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:r,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:Rp.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,r){return P.fromPromise(this.__upsertWorkspaceConfiguration(o,r))}async __upsertWorkspaceConfiguration(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/configurations"),method:"PUT",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Rp.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:Rp.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 K(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 r=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:r,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,r){return P.fromPromise(this.__getCost(o,r))}async __getCost(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/costs"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xp.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,r){return P.fromPromise(this.__getMetric(o,r))}async __getMetric(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xp.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,r){return P.fromPromise(this.__getWorkspaceSpanMetric(o,r))}async __getWorkspaceSpanMetric(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/spans"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Kn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:xp.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={},r){return P.fromPromise(this.__getWorkspaceTokenUsageNames(o,r))}async __getWorkspaceTokenUsageNames(o={},r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/token-usage/names"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Qn.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:hp.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,r){return P.fromPromise(this.__metricsSummary(o,r))}async __metricsSummary(o,r){var a,s,c,l,m,u,d,f,g,h,y;let t=z((a=this._options)==null?void 0:a.headers,T({"Comet-Workspace":(c=r==null?void 0:r.workspaceName)!=null?c:(s=this._options)==null?void 0:s.workspaceName}),r==null?void 0:r.headers),i=await S({url:_.join((m=(l=await x.get(this._options.baseUrl))!=null?l:await x.get(this._options.environment))!=null?m:v.Default,"v1/private/workspaces/metrics/summaries"),method:"POST",headers:t,contentType:"application/json",queryParameters:r==null?void 0:r.queryParams,requestType:"json",body:Ho.jsonOrThrow(o,{unrecognizedObjectKeys:"strip",omitUndefined:true}),timeoutMs:((f=(d=r==null?void 0:r.timeoutInSeconds)!=null?d:(u=this._options)==null?void 0:u.timeoutInSeconds)!=null?f:60)*1e3,maxRetries:(h=r==null?void 0:r.maxRetries)!=null?h:(g=this._options)==null?void 0:g.maxRetries,withCredentials:true,abortSignal:r==null?void 0:r.abortSignal,fetchFn:(y=this._options)==null?void 0:y.fetch,logging:this._options.logging});if(i.ok)return {data:JF.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 wp,Ire=n(()=>{Mee();Wee();Vee();Lee();Gee();Jee();Hee();Kee();Qee();Oee();$ee();Yee();Xee();Zee();qee();ere();rre();tre();ore();ire();are();nre();sre();pre();cre();lre();mre();dre();ure();gre();fre();hre();yre();bre();Rre();xre();wre();_re();kre();Are();Pre();zre();Sre();vre();Tre();jre();Cre();Ere();X();$();b();Y();Z();G();wp=class{constructor(o={}){this._options=B(o);}get mcpOAuth(){var o;return (o=this._mcpOAuth)!=null?o:this._mcpOAuth=new Yd(this._options)}get agentInsightsEnrollment(){var o;return (o=this._agentInsightsEnrollment)!=null?o:this._agentInsightsEnrollment=new Sd(this._options)}get systemAnalyticsQueries(){var o;return (o=this._systemAnalyticsQueries)!=null?o:this._systemAnalyticsQueries=new mu(this._options)}get dashboardSavedQueries(){var o;return (o=this._dashboardSavedQueries)!=null?o:this._dashboardSavedQueries=new Fd(this._options)}get topics(){var o;return (o=this._topics)!=null?o:this._topics=new uu(this._options)}get systemUsage(){var o;return (o=this._systemUsage)!=null?o:this._systemUsage=new du(this._options)}get agentConfigs(){var o;return (o=this._agentConfigs)!=null?o:this._agentConfigs=new Pd(this._options)}get agentInsightsJobs(){var o;return (o=this._agentInsightsJobs)!=null?o:this._agentInsightsJobs=new vd(this._options)}get agentInsights(){var o;return (o=this._agentInsights)!=null?o:this._agentInsights=new zd(this._options)}get alerts(){var o;return (o=this._alerts)!=null?o:this._alerts=new Td(this._options)}get analyticsQueries(){var o;return (o=this._analyticsQueries)!=null?o:this._analyticsQueries=new jd(this._options)}get annotationQueues(){var o;return (o=this._annotationQueues)!=null?o:this._annotationQueues=new Cd(this._options)}get assertionResults(){var o;return (o=this._assertionResults)!=null?o:this._assertionResults=new Ed(this._options)}get attachments(){var o;return (o=this._attachments)!=null?o:this._attachments=new Id(this._options)}get check(){var o;return (o=this._check)!=null?o:this._check=new Nd(this._options)}get automationRuleEvaluators(){var o;return (o=this._automationRuleEvaluators)!=null?o:this._automationRuleEvaluators=new Dd(this._options)}get chatCompletions(){var o;return (o=this._chatCompletions)!=null?o:this._chatCompletions=new Ud(this._options)}get dashboards(){var o;return (o=this._dashboards)!=null?o:this._dashboards=new Bd(this._options)}get datasets(){var o;return (o=this._datasets)!=null?o:this._datasets=new Md(this._options)}get environments(){var o;return (o=this._environments)!=null?o:this._environments=new Wd(this._options)}get experiments(){var o;return (o=this._experiments)!=null?o:this._experiments=new Vd(this._options)}get feedbackDefinitions(){var o;return (o=this._feedbackDefinitions)!=null?o:this._feedbackDefinitions=new Ld(this._options)}get guardrailModels(){var o;return (o=this._guardrailModels)!=null?o:this._guardrailModels=new Gd(this._options)}get guardrailPolicies(){var o;return (o=this._guardrailPolicies)!=null?o:this._guardrailPolicies=new Jd(this._options)}get guardrails(){var o;return (o=this._guardrails)!=null?o:this._guardrails=new Hd(this._options)}get insightsViews(){var o;return (o=this._insightsViews)!=null?o:this._insightsViews=new Kd(this._options)}get llmModels(){var o;return (o=this._llmModels)!=null?o:this._llmModels=new Qd(this._options)}get llmProviderKey(){var o;return (o=this._llmProviderKey)!=null?o:this._llmProviderKey=new Od(this._options)}get runners(){var o;return (o=this._runners)!=null?o:this._runners=new pu(this._options)}get manualEvaluation(){var o;return (o=this._manualEvaluation)!=null?o:this._manualEvaluation=new $d(this._options)}get ollama(){var o;return (o=this._ollama)!=null?o:this._ollama=new Xd(this._options)}get ollieState(){var o;return (o=this._ollieState)!=null?o:this._ollieState=new Zd(this._options)}get openTelemetryIngestion(){var o;return (o=this._openTelemetryIngestion)!=null?o:this._openTelemetryIngestion=new qd(this._options)}get optimizations(){var o;return (o=this._optimizations)!=null?o:this._optimizations=new eu(this._options)}get pairing(){var o;return (o=this._pairing)!=null?o:this._pairing=new ru(this._options)}get projects(){var o;return (o=this._projects)!=null?o:this._projects=new tu(this._options)}get prompts(){var o;return (o=this._prompts)!=null?o:this._prompts=new ou(this._options)}get reportFailures(){var o;return (o=this._reportFailures)!=null?o:this._reportFailures=new au(this._options)}get reports(){var o;return (o=this._reports)!=null?o:this._reports=new nu(this._options)}get retentionRules(){var o;return (o=this._retentionRules)!=null?o:this._retentionRules=new su(this._options)}get serviceToggles(){var o;return (o=this._serviceToggles)!=null?o:this._serviceToggles=new cu(this._options)}get spans(){var o;return (o=this._spans)!=null?o:this._spans=new lu(this._options)}get traces(){var o;return (o=this._traces)!=null?o:this._traces=new gu(this._options)}get views(){var o;return (o=this._views)!=null?o:this._views=new fu(this._options)}get welcomeWizard(){var o;return (o=this._welcomeWizard)!=null?o:this._welcomeWizard=new hu(this._options)}get workspacePermissions(){var o;return (o=this._workspacePermissions)!=null?o:this._workspacePermissions=new yu(this._options)}get workspaces(){var o;return (o=this._workspaces)!=null?o:this._workspaces=new bu(this._options)}get redirect(){var o;return (o=this._redirect)!=null?o:this._redirect=new iu(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 r=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:r,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 r=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:r,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 Dre=n(()=>{});var Ure,Nre=n(()=>{Sc();(r=>(r.LogLevel=Ke,r.ConsoleLogger=ht))(Ure||(Ure={}));});var Fre=n(()=>{Dre();Nre();});var Bre=n(()=>{Fre();});var Ur=n(()=>{q();Ire();Y();G();Bre();re();});exports.generateId=void 0;var sr=n(()=>{exports.generateId=()=>uuid.v7();});function Hle(p){return p.templateStructure==="text"}function Kle(p){return p.templateStructure==="chat"}var Nr,Ru=n(()=>{Nr=class{static serializePromptToInfoDict(o){let r;return Hle(o)?r=o.prompt:Kle(o)?r=o.messages:r="",{name:o.name,...o.id&&{id:o.id},template_structure:o.templateStructure,version:{...o.versionId&&{id:o.versionId},...o.commit&&{commit:o.commit},template:r}}}static normalizeMetadata(o){if(!o)return {};if(typeof o=="object"&&!Array.isArray(o))return o;if(typeof o=="string")try{let r=JSON.parse(o);if(typeof r=="object"&&r!==null&&!Array.isArray(r))return r}catch{}return null}static promptAlreadyInjected(o,r,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===r&&((c=s.version)==null?void 0:c.commit)===t})}static mergePromptsIntoMetadata(o,r,t,i){var m,u;let a=t.map(d=>this.serializePromptToInfoDict(d)),s=(m=this.normalizeMetadata(o))!=null?m:{},c=(u=this.normalizeMetadata(r))!=null?u:{},l=i&&Array.isArray(s.opik_prompts)?s.opik_prompts:[];return {...s,...c,opik_prompts:[...l,...a]}}static processUpdate(o,r){var s,c;let{prompts:t,appendPrompts:i,...a}=o;if(!t||t.length===0){if(a.metadata&&r){let l=(s=this.normalizeMetadata(r))!=null?s:{},m=(c=this.normalizeMetadata(a.metadata))!=null?c:{};return {...a,metadata:{...l,...m}}}return a}return {...a,metadata:this.mergePromptsIntoMetadata(r,a.metadata,t,i!=null?i:false)}}static processTraceUpdate(o,r){return this.processUpdate(o,r)}static processSpanUpdate(o,r){return this.processUpdate(o,r)}};});var xu,Mre=n(()=>{co();sr();ne();Ru();xu=class p{constructor(o,r){this.data=o;this.opik=r;this.childSpans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var r;He()&&this.opik.spanFeedbackScoresBatchQueue.create({...o,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.update=o=>{var i;let r=Nr.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,...r};return He()&&this.opik.spanBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};this.span=o=>{var c,l;let r=(c=this.data.projectName)!=null?c:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(l=this.data.environment)!=null?l:""}" from the parent span will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:r,traceId:this.data.traceId,parentSpanId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};He()&&this.opik.spanBatchQueue.create(a);let s=new p(a,this.opik);return this.childSpans.push(s),s};}};});var wu,Wre=n(()=>{co();sr();ne();Mre();Ru();wu=class{constructor(o,r){this.data=o;this.opik=r;this.spans=[];this.end=()=>this.update({endTime:new Date});this.score=o=>{var r;He()&&this.opik.traceFeedbackScoresBatchQueue.create({...o,projectName:(r=this.data.projectName)!=null?r:this.opik.config.projectName,id:this.data.id,source:"sdk"});};this.span=o=>{var c,l,m;let r=(l=(c=this.data.projectName)!=null?c:o.projectName)!=null?l:this.opik.config.projectName,{environment:t,...i}=o;t!==void 0&&t!==this.data.environment&&exports.logger.warn(`You are attempting to log data into a nested span under the environment "${t}". However, the environment "${(m=this.data.environment)!=null?m:""}" from the parent trace will be used instead.`);let a={id:exports.generateId(),startTime:new Date,source:this.data.source,...i,projectName:r,traceId:this.data.id,...this.data.environment!==void 0?{environment:this.data.environment}:{}};He()&&this.opik.spanBatchQueue.create(a);let s=new xu(a,this.opik);return this.spans.push(s),s};this.update=o=>{var i;let r=Nr.processTraceUpdate(o,this.data.metadata),t={projectName:(i=this.data.projectName)!=null?i:this.opik.config.projectName,...r};return He()&&this.opik.traceBatchQueue.update(this.data.id,t),this.data={...this.data,...t},this};}};});var Vre,_p,Qle,Ole,Lre,Gre,Jre,Hre,QF=n(()=>{Vre={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"},_p={EXPERIMENT_ID:"experiment_id",DATASET_ID:"dataset_id",TRACE_ID:"trace_id",PROJECT_NAME:"name",PATH:"path",WORKSPACE:"workspace"},Qle=p=>Object.entries(p).map(([o,r])=>`${o}=${encodeURIComponent(r)}`).join("&").replace(/%3A/g,":").replace(/%2F/g,"/").replace(/%26/g,"&").replace(/%3F/g,"?").replace(/%3D/g,"="),Ole=p=>p.replace(/\/api\/?$/,""),Lre=p=>Buffer.from(p).toString("base64"),Gre=(p,o,r)=>{let t=Qle(r),i=Ole(p),a=i.endsWith("/")?i:`${i}/`,s=o.startsWith("/")?o.slice(1):o;return `${a}${s}?${t}`},Jre=({datasetId:p,experimentId:o,baseUrl:r})=>Gre(r,Vre.EXPERIMENTS,{[_p.EXPERIMENT_ID]:o,[_p.DATASET_ID]:p,[_p.PATH]:Lre(r)}),Hre=(p,o)=>Gre(o,Vre.PROJECTS,{[_p.TRACE_ID]:p,[_p.PATH]:Lre(o)});});var $le,_u,kp,Me,Ht=n(()=>{ne();$le=300,_u=100,kp=class{constructor({action:o,batchSize:r=_u,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,r)=>{if(this.queue.set(o,r),!this.enableBatch){this.flush();return}if(this.queue.size>=this.batchSize){this.flush();return}this.debounceFlush();};this.update=(o,r)=>{let t=this.queue.get(o);t&&(this.queue.set(o,{...t,...r}),this.debounceFlush());};this.flush=async()=>{if(this.queue.size===0)return this.promise;let o=new Map(this.queue);this.queue.clear(),exports.logger.debug(`Adding ${o.size} items to ${this.name} promise:`,o),this.promise=this.promise.finally(()=>(exports.logger.debug(`Flushing ${this.name}:`,o),this.action(o))).catch(r=>{exports.logger.error(`Failed to flush ${this.name}:`,r,o);}),await this.promise;};this.action=o,this.batchSize=r,this.delay=t,this.enableBatch=i,this.name=a;}},Me=class{constructor({delay:o=$le,enableCreateBatch:r=true,enableUpdateBatch:t=false,enableDeleteBatch:i=true,createBatchSize:a=_u,updateBatchSize:s=_u,deleteBatchSize:c=_u,name:l="BatchQueue"}={}){this.create=o=>{let r=this.getId(o);this.createQueue.add(r,o);};this.get=async o=>{let r=this.createQueue.queue.get(o);return r||this.getEntity(o)};this.update=(o,r)=>{if(this.createQueue.queue.get(o)){this.createQueue.update(o,r);return}let i=this.updateQueue.queue.get(o);this.updateQueue.add(o,{...i,...r});};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 kp({action:async m=>{await this.createEntities(Array.from(m.values()));},delay:o,enableBatch:r,batchSize:a,name:`${l}:createQueue`}),this.updateQueue=new kp({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 kp({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 Yle,ku,Kre=n(()=>{rc();ne();Ht();Yle="suite_assertion",ku=class extends Me{constructor(r,t,i="TRACE"){super({delay:t,enableCreateBatch:true,enableUpdateBatch:false,enableDeleteBatch:false,name:`AssertionResultsBatchQueue:${i}`});this.api=r;this.entityType=i;this.useLegacyFallback=false;}getId(r){return {entityId:r.entityId,name:r.name}}async createEntities(r){if(this.useLegacyFallback){await this.writeViaLegacyFeedbackScores(r);return}try{await this.api.assertionResults.storeAssertionsBatch({entityType:this.entityType,assertionResults:r},this.api.requestOptions);}catch(t){if(t instanceof k&&t.statusCode===404&&this.entityType==="TRACE"){this.useLegacyFallback=true,exports.logger.warn('Opik backend does not support PUT /v1/private/assertion-results yet \u2014 falling back to the legacy feedback-scores path with categoryName="suite_assertion". Upgrade the Opik backend to a version that includes OPIK-6048 to enable native assertion-results ingestion.'),await this.writeViaLegacyFeedbackScores(r);return}throw t}}async writeViaLegacyFeedbackScores(r){let t=r.map(i=>({id:i.entityId,name:i.name,value:i.status==="passed"?1:0,categoryName:Yle,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 Au,Xle,Qre,Zle,qle,Ko,OF=n(()=>{ne();Au=["input","output"],Xle=1024*1024,Qre=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>"}),Zle=p=>{try{let o=JSON.stringify(p);return o?Buffer.byteLength(o,"utf8")/Xle:0}catch{return 1/0}},qle=(p,o)=>{let r={};for(let s of Au)p[s]!=null&&(r[s]=Zle(p[s]));if(Object.keys(r).length===0)return {result:p,truncated:[]};let t={};for(let s of Au)r[s]!==void 0&&r[s]>o&&(t[s]=Qre(r[s]));if(Au.reduce((s,c)=>{var l;return s+(t[c]?0:(l=r[c])!=null?l:0)},0)>o)for(let s of Au)r[s]!==void 0&&t[s]===void 0&&(t[s]=Qre(r[s]));let a=Object.keys(t);return a.length===0?{result:p,truncated:[]}:{result:{...p,...t},truncated:a}},Ko=(p,o,r="span",t)=>{if(!o||o<=0)return p;let{result:i,truncated:a}=qle(p,o);if(a.length>0){let s=r.charAt(0).toUpperCase()+r.slice(1);exports.logger.warn(`${s} '${t!=null?t:"unknown"}' exceeded the payload size limit of ${o} MB; truncated field(s): ${a.join(", ")}. Log large payloads as attachments to avoid truncation.`);}return i};});var rt,eme,rme,tme,ome,ime,ame,nme,sme,Ore,pme,$re,Yre=n(()=>{rt=(p,o,r=0)=>{if(p.length<r+o.length)return false;for(let t=0;t<o.length;t++)if(p[r+t]!==o[t])return false;return true},eme=[137,80,78,71,13,10,26,10],rme=[255,216,255],tme=[71,73,70,56,55,97],ome=[71,73,70,56,57,97],ime=[82,73,70,70],ame=[87,69,66,80],nme=[37,80,68,70],sme=[102,116,121,112],Ore=p=>{if(rt(p,eme))return "image/png";if(rt(p,rme)&&p.length>=2&&p[p.length-2]===255&&p[p.length-1]===217)return "image/jpeg";if(rt(p,tme)||rt(p,ome))return "image/gif";if(rt(p,ime)&&rt(p,ame,8))return "image/webp";if(rt(p,nme))return "application/pdf";if(rt(p,sme,4))return "video/mp4";if(p.subarray(0,1024).toString("utf8").toLowerCase().includes("<svg"))return "image/svg+xml";try{let r=new TextDecoder("utf-8",{fatal:!0}).decode(p.subarray(0,100)).trimStart();if(r.startsWith("{")||r.startsWith("["))return "application/json"}catch{}return null},pme={"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"},$re=p=>{var o;return (o=pme[p])!=null?o:"bin"};});var cme,lme,mme,Xre,dme,ume,gme,$F,Zre,qre=n(()=>{Yre();cme=["input","output","metadata"],lme=(p,o)=>{let r=Math.floor(Math.random()*99999999)+1,t=$re(o);return `${p}-attachment-${r}-${Date.now()}-sdk.${t}`},mme=p=>{let o=p.includes("-")||p.includes("_")?p.replace(/[-_]/g,t=>t==="-"?"+":"/"):p,r=Buffer.from(o,"base64");return r.length>0?r:null},Xre=p=>p>=65&&p<=90||p>=97&&p<=122||p>=48&&p<=57||p===43||p===47||p===45||p===95,dme=61,ume=/data:[^,]*;base64,$/,gme=(p,o,r,t)=>{if(p.length<t)return p;let i=[],a=0,s=false,c=p.length,l=0;for(;l<c;){if(!Xre(p.charCodeAt(l))){l++;continue}let m=l;for(;m<c&&Xre(p.charCodeAt(m));)m++;let u=0;for(;m<c&&p.charCodeAt(m)===dme&&u<2;)m++,u++;if(m-l>=t){let f=mme(p.slice(l,m)),g=f?Ore(f):null;if(f&&g){let h=l,y=p.lastIndexOf("data:",l);y>=0&&ume.test(p.slice(y,l))&&(h=y);let w=lme(o,g);i.push(p.slice(a,h)),i.push(`[${w}]`),a=m,r.push({data:f,fileName:w,mimeType:g}),s=true;}}l=m;}return s?(i.push(p.slice(a)),i.join("")):p},$F=(p,o,r,t,i)=>{if(typeof p=="string")return gme(p,o,r,t);if(Array.isArray(p)){if(i.has(p))return p;i.add(p);let a=false,s=p.map(c=>{let l=$F(c,o,r,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=$F(l,o,r,t,i);m!==l&&(a=true),s[c]=m;}return a?s:p}return p},Zre=(p,o)=>{let r=Math.max(4,Math.floor(o/4)*4),t=[],i={};for(let a of cme){let s=p[a];if(s==null)continue;let c=$F(s,a,t,r,new WeakSet);c!==s&&(i[a]=c);}return t.length===0?{result:p,attachments:[]}:{result:{...p,...i},attachments:t}};});var fme,ete,rte,tte=n(()=>{fme="BEMinIO",ete=async(p,o,r)=>{let t=await fetch(p,{method:"PUT",body:o,headers:r});if(!t.ok)throw new Error(`attachment PUT failed: ${t.status} ${t.statusText}`);return t.headers.get("etag")},rte=async(p,o,r,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:r.entityType,entityId:r.entityId,path:l,projectName:r.projectName},p.requestOptions);if(m.uploadId===fme){let d={"Content-Type":s,"Comet-Workspace":o.workspaceName,...o.extraHeaders};o.apiKey&&(d.authorization=o.apiKey),await ete(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 ete(m.preSignUrls[d],g);if(!h)throw new Error(`attachment upload part ${d+1} returned no ETag; cannot complete multipart upload`);u.push({eTag:h,partNumber:d+1});}await p.attachments.completeMultiPartUpload({fileName:a,entityType:r.entityType,entityId:r.entityId,fileSize:i.length,mimeType:s,uploadId:m.uploadId,uploadedFileParts:u,projectName:r.projectName},p.requestOptions);};});var Pu,YF=n(()=>{ne();qre();tte();Pu=async(p,o,r,t)=>{let i;try{i=Zre(t,o.minSizeBytes);}catch(a){return exports.logger.warn(`Attachment extraction skipped for ${r.entityType} '${r.entityId}': ${a instanceof Error?a.message:String(a)}`),t}return i.attachments.length===0?t:(await Promise.all(i.attachments.map(a=>rte(p,o,r,a).catch(s=>{exports.logger.warn(`Failed to upload extracted attachment '${a.fileName}' for ${r.entityType} '${r.entityId}': ${s instanceof Error?s.message:String(s)}`);}))),i.result)};});var zu,ote=n(()=>{Ht();OF();ut();YF();zu=class extends Me{constructor(r,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanBatchQueue"});this.api=r;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?Pu(this.api,this.attachmentUpload,{entityType:"span",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var i;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ko(s,(i=this.maxPayloadSizeMb)!=null?i:Xe.maxPayloadSizeMb,"span",a.id));}await this.api.spans.createSpans({spans:t},this.api.requestOptions);}async getEntity(r){return await this.api.spans.getSpanById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let i=await this.extractAttachments(t,r),a=Ko(i,(s=this.maxPayloadSizeMb)!=null?s:Xe.maxPayloadSizeMb,"span",r);await this.api.spans.updateSpan(r,{body:a},this.api.requestOptions);}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanById(t,this.api.requestOptions);}};});var Su,ite=n(()=>{Ht();Su=class extends Me{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"SpanFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.spans.scoreBatchOfSpans({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.spans.deleteSpanFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});var vu,ate=n(()=>{Ht();OF();ut();YF();vu=class extends Me{constructor(r,t,i,a){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceBatchQueue"});this.api=r;this.maxPayloadSizeMb=i;this.attachmentUpload=a;}getId(r){return r.id}async extractAttachments(r,t){return this.attachmentUpload?Pu(this.api,this.attachmentUpload,{entityType:"trace",entityId:t,projectName:r.projectName},r):r}async createEntities(r){var i;let t=[];for(let a of r){let s=await this.extractAttachments(a,a.id);t.push(Ko(s,(i=this.maxPayloadSizeMb)!=null?i:Xe.maxPayloadSizeMb,"trace",a.id));}await this.api.traces.createTraces({traces:t},this.api.requestOptions);}async getEntity(r){return await this.api.traces.getTraceById(r,{},this.api.requestOptions)}async updateEntity(r,t){var s;let i=await this.extractAttachments(t,r),a=Ko(i,(s=this.maxPayloadSizeMb)!=null?s:Xe.maxPayloadSizeMb,"trace",r);await this.api.traces.updateTrace(r,{body:a},this.api.requestOptions);}async deleteEntities(r){await this.api.traces.deleteTraces({ids:r},this.api.requestOptions);}};});var Tu,nte=n(()=>{Ht();Tu=class extends Me{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"TraceFeedbackScoresBatchQueue"});this.api=r;}getId(r){return {id:r.id,name:r.name}}async createEntities(r){await this.api.traces.scoreBatchOfTraces({scores:r},this.api.requestOptions);}async getEntity(){throw new Error("Not implemented")}async updateEntity(){throw new Error("Not implemented")}async deleteEntities(r){for(let t of r)await this.api.traces.deleteTraceFeedbackScore(t.id,{body:{name:t.name}},this.api.requestOptions);}};});function cte(){return crypto.createHash("sha256").update(_M__default.default.hostname()+yme()).digest("hex")}function yme(p=process.env){for(let o of ["LOGNAME","USER","LNAME","USERNAME"])if(p[o])return p[o];try{return _M__default.default.userInfo().username}catch{return "unknown"}}var pte,lte=n(()=>{pte="X-Opik-Client-Id";});var ju,mte=n(()=>{Ur();lte();ju=class extends wp{constructor(r){var i;let t={[pte]:cte(),...r==null?void 0:r.headers,...(i=r==null?void 0:r.requestOptions)==null?void 0:i.headers};(r==null?void 0:r.apiKey)!==void 0&&(t.authorization=r.apiKey);super({...r,headers:t});this.setHeaders=r=>{this.requestOptions.headers=r;};this.requestOptions=(r==null?void 0:r.requestOptions)||{};}};});var Cu,dte=n(()=>{Ht();Cu=class extends Me{constructor(r,t){super({delay:t,enableCreateBatch:true,enableUpdateBatch:true,enableDeleteBatch:true,name:"DatasetBatchQueue"});this.api=r;}getId(r){return r.id||""}async createEntities(r){for(let t of r)await this.api.datasets.createDataset(t,this.api.requestOptions);}async getEntity(r){try{return await this.api.datasets.getDatasetById(r,this.api.requestOptions)}catch{return}}async updateEntity(r,t){await this.api.datasets.updateDataset(r,{name:t.name||"",visibility:t.visibility,description:t.description},this.api.requestOptions);}async deleteEntities(r){await this.api.datasets.deleteDatasetsBatch({ids:r},this.api.requestOptions);}};});async function ute(){return XF||(XF=await bme__default.default()),XF}var XF,gte=n(()=>{XF=null;});var Qo,Eu=n(()=>{q();sr();gte();Qo=class p{constructor(o,r){let{id:t,traceId:i,spanId:a,source:s,description:c,evaluators:l,executionPolicy:m,...u}=o;this.id=t||exports.generateId(),this.traceId=i,this.spanId=a,this.source=s||Qh.Sdk,this.description=c!=null?c:r,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 r=Rme__default.default(o);return (await ute()).h32(r,43981).toString(16)}toApiModel(){return {id:this.id,traceId:this.traceId,spanId:this.spanId,source:this.source,data:this.getContent(),...this.description&&{description:this.description},...this.evaluators&&{evaluators:this.evaluators},...this.executionPolicy&&{executionPolicy:this.executionPolicy}}}static fromApiModel(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 wme(p,o,r,t){var l;if(r===0)return [];let i=new util.TextDecoder("utf-8"),a=[],s="",c=p.getReader();try{for(;;){let{done:m,value:u}=await c.read();if(m)break;let d=u;s+=i.decode(d,{stream:!0});let f=s.split(`
|
|
4
4
|
`);s=(l=f.pop())!=null?l:"";for(let g of f)if(!(!g.trim()||g==="{}"||g==="[]"||g==="null"))try{let h=JSON.parse(g);t==null||t(h);let y=o.parse(h,{unrecognizedObjectKeys:"strip"});if(y.ok){if(a.push(y.value),r!==void 0&&a.length>=r)return c.releaseLock(),a}else exports.logger.error("Error parsing experiment item:",y.errors);}catch(h){exports.logger.error("Error parsing JSON line:",h instanceof Error?h.message:String(h));}}if(s.trim()&&s!=="{}"&&s!=="[]"&&s!=="null")try{let m=JSON.parse(s);t==null||t(m);let u=o.parse(m,{unrecognizedObjectKeys:"strip"});u.ok?a.push(u.value):exports.logger.error("Error parsing experiment item:",u.errors);}catch(m){exports.logger.error("Error parsing remaining buffer:",m instanceof Error?m.message:String(m));}}catch(m){exports.logger.error("Error processing stream:",m instanceof Error?m.message:String(m));}finally{c.releaseLock();}return a}function pr(p,o){let r=[];for(let t=0;t<p.length;t+=o.maxBatchSize)r.push(p.slice(t,t+o.maxBatchSize));return r}async function kme(p,o,r,t){let i=0,a;return {items:await wme(p,o,t,c=>{i++;let l=c==null?void 0:c[r];typeof l=="string"&&(a=l);}),recordsRead:i,lastCursorRead:a}}async function We(p,o,r,{maxResults:t=Number.POSITIVE_INFINITY,startAfter:i}={}){let a=[],s=i;for(;a.length<t;){let c=Math.min(t-a.length,_me),l=await kme(await p(c,s),o,r,c);a.push(...l.items);let m=l.recordsRead<c,u=l.lastCursorRead!==void 0&&l.lastCursorRead!==s;if(m||!u)break;s=l.lastCursorRead;}return a}var _me,tt=n(()=>{ne();_me=2e3;});async function Oo(p,o){let{datasetName:r,projectName:t,datasetVersion:i,nbSamples:a,lastRetrievedId:s}=o;return (await We((l,m)=>p.api.datasets.streamDatasetItems({datasetName:r,projectName:t,lastRetrievedId:m,steamLimit:l,datasetVersion:i}),J.DatasetItemPublic,"id",{maxResults:a,startAfter:s})).map(l=>Qo.fromApiModel(l))}var ZF=n(()=>{Eu();tt();Ur();});exports.DatasetVersion=void 0;var Iu=n(()=>{ZF();exports.DatasetVersion=class{constructor(o,r,t,i){this.datasetName=o,this.datasetId=r,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,r){return (await Oo(this.opik,{datasetName:this.datasetName,datasetVersion:this.versionInfo.versionHash,nbSamples:o,lastRetrievedId:r})).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 Rme__default.default(t)}};});var ze,Kt=n(()=>{ne();ze=class extends Error{constructor(o){var r;super(o.message),this.name=this.constructor.name,this.code=o.code,this.statusCode=o.statusCode,this.details=o.details,this.originalError=o.originalError,exports.logger.error(this.message),(r=Error.captureStackTrace)==null||r.call(Error,this,this.constructor);}toJSON(){return {name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,details:this.details,originalError:this.originalError,stack:this.stack}}};});var fte=n(()=>{});var qF,eB=n(()=>{qF={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 hte,Du;exports.DatasetVersionNotFoundError=void 0;var rB=n(()=>{eB();Kt();hte={DATASET_ITEM_MISSING_ID:"DATASET_ITEM_MISSING_ID",DATASET_VERSION_NOT_FOUND:"DATASET_VERSION_NOT_FOUND"},Du=class extends ze{constructor(o){super({message:qF.DATASET_ITEM_MISSING_ID(o),code:hte.DATASET_ITEM_MISSING_ID});}},exports.DatasetVersionNotFoundError=class extends ze{constructor(o,r){super({message:qF.DATASET_VERSION_NOT_FOUND(o,r),code:hte.DATASET_VERSION_NOT_FOUND});}};});var yte=n(()=>{eB();rB();});var Pme,Uu,bte=n(()=>{Kt();Pme={SEARCH_TIMEOUT:"SEARCH_TIMEOUT"},Uu=class extends ze{constructor(o){super({message:o,code:Pme.SEARCH_TIMEOUT});}};});var Rte=n(()=>{});var xte=n(()=>{bte();Rte();});var Nu,Fu,$o,zp=n(()=>{Nu=class extends Error{constructor(o){super(o),this.name="AnnotationQueueError";}},Fu=class extends Nu{constructor(o){super(`Annotation queue with ID '${o}' not found`),this.name="AnnotationQueueNotFoundError";}},$o=class extends Nu{constructor(o,r){let t=r!==void 0?` at index ${r}`:"";super(`${o} object${t} has no ID`),this.name="AnnotationQueueItemMissingIdError";}};});exports.ConfigNotFoundError=void 0;exports.ConfigMismatchError=void 0;var Bu=n(()=>{Kt();exports.ConfigNotFoundError=class extends ze{constructor(o){super({message:o,code:"CONFIG_NOT_FOUND"}),this.name="ConfigNotFoundError";}},exports.ConfigMismatchError=class extends ze{constructor(o){super({message:o,code:"CONFIG_MISMATCH"}),this.name="ConfigMismatchError";}};});var Mu,Wu,Vu,tB=n(()=>{Mu=class extends Error{constructor(o){super(o),this.name="EnvironmentError";}},Wu=class extends Mu{constructor(o){super(`Environment '${o}' already exists in this workspace.`),this.name="EnvironmentAlreadyExistsError";}},Vu=class extends Mu{constructor(o){super(o),this.name="EnvironmentConfigurationError";}};});var oB=n(()=>{Kt();fte();yte();xte();zp();Bu();tB();});var Lu,wte=n(()=>{Lu={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 iB,Gu,Ju,Hu,_te=n(()=>{Kt();wte();iB={JSON_PARSE_ERROR:"JSON_PARSE_ERROR",JSON_NOT_ARRAY:"JSON_NOT_ARRAY",JSON_ITEM_NOT_OBJECT:"JSON_ITEM_NOT_OBJECT"},Gu=class extends ze{constructor(o){let r=o instanceof Error?o:new Error(String(o));super({message:Lu.JSON_PARSE_ERROR,code:iB.JSON_PARSE_ERROR,originalError:r});}},Ju=class extends ze{constructor(o){super({message:Lu.JSON_NOT_ARRAY(o),code:iB.JSON_NOT_ARRAY});}},Hu=class extends ze{constructor(o,r){super({message:Lu.JSON_ITEM_NOT_OBJECT(o,r),code:iB.JSON_ITEM_NOT_OBJECT});}};});exports.Dataset=void 0;var Ku=n(()=>{sr();Eu();Iu();ZF();tt();ne();oB();_te();G();exports.Dataset=class{constructor({name:o,description:r,id:t,projectName:i},a){this.opik=a;this.idToHash=new Map;this.hashes=new Set;this.id=t||exports.generateId(),this.name=o,this.description=r,this.projectName=i;}async insert(o){if(!o||o.length===0)return;await this.opik.datasetBatchQueue.flush(),await this.syncHashes();let r=await this.getDeduplicatedItems(o),t=pr(r,{maxBatchSize:1e3}),i=exports.generateId();try{let a=0;for(let s of t)await this.opik.api.datasets.createOrUpdateDatasetItems({datasetId:this.id,items:s,batchGroupId:i,projectName:this.projectName}),a+=s.length,exports.logger.info(`Inserted ${Math.min(a,r.length)} of ${r.length} items into dataset ${this.id}`);}catch(a){throw exports.logger.error(`Error inserting items into dataset: ${a instanceof Error?a.message:String(a)}`),a}this.cachedItemsCount=void 0;}async update(o){if(!(!o||o.length===0)){for(let r=0;r<o.length;r++)if(!o[r].id)throw new Du(r);await this.insert(o);}}async delete(o){if(!o||o.length===0){exports.logger.info("No item IDs provided for deletion");return}let r=pr(o,{maxBatchSize:100}),t=exports.generateId();for await(let i of r){exports.logger.debug("Deleting dataset items batch",{batchSize:i.length,datasetId:this.id}),await this.opik.api.datasets.deleteDatasetItems({itemIds:i,batchGroupId:t});for(let a of i)if(this.idToHash.has(a)){let s=this.idToHash.get(a);this.hashes.delete(s),this.idToHash.delete(a);}}this.cachedItemsCount=void 0;}async clear(){let r=(await this.getItems()).map(t=>t.id).filter(Boolean);r.length!==0&&await this.delete(r);}async getTags(){var r;return (r=(await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName})).tags)!=null?r:[]}async getItemsCount(){if(this.cachedItemsCount===void 0){let o=await this.opik.api.datasets.getDatasetByIdentifier({datasetName:this.name,projectName:this.projectName});this.cachedItemsCount=o.datasetItemsCount;}return this.cachedItemsCount}async getItems(o,r){return (await Oo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:r})).map(i=>i.getContent(true))}async getRawItems(o,r){return Oo(this.opik,{datasetName:this.name,projectName:this.projectName,nbSamples:o,lastRetrievedId:r})}async insertFromJson(o,r={},t=[]){let i;try{i=JSON.parse(o);}catch(s){throw new Gu(s)}if(!Array.isArray(i))throw new Ju(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 Hu(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=r[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 Rme__default.default(t)}async getDeduplicatedItems(o){let r=[];for(let t of o){let i=new Qo(t),a=await i.contentHash();if(this.hashes.has(a)){exports.logger.debug("Duplicate item found - skipping",{contentHash:a,datasetId:this.id});continue}r.push(i.toApiModel()),this.hashes.add(a),this.idToHash.set(i.id,a);}return r}clearHashState(){this.idToHash.clear(),this.hashes.clear();}async syncHashes(){exports.logger.debug("Syncing dataset hashes with backend",{datasetId:this.id});try{let o=await Oo(this.opik,{datasetName:this.name,projectName:this.projectName});this.clearHashState();for(let r of o){let t=await r.contentHash();this.idToHash.set(r.id,t),this.hashes.add(t);}exports.logger.debug("Dataset hash sync completed",{datasetId:this.id,itemCount:o.length});}catch(o){if(o instanceof k&&o.statusCode===404){exports.logger.debug("Dataset not found - starting with empty hash state",{datasetId:this.id}),this.clearHashState();return}throw o}}async getVersionView(o){let r=await this.findVersionByName(o);if(!r)throw new exports.DatasetVersionNotFoundError(o,this.name);return new exports.DatasetVersion(this.name,this.id,r,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(r){if(r instanceof k&&r.statusCode===404)return;throw r}}async findVersionByName(o){try{return await this.opik.api.datasets.retrieveDatasetVersion(this.id,{versionName:o})}catch(r){if(r instanceof k&&r.statusCode===404)return;throw r}}};});var aB,Qt,kte=n(()=>{aB=class extends Error{constructor(o){super(o),this.name="DatasetError";}},Qt=class extends aB{constructor(o){super(`Dataset with name '${o}' not found`),this.name="DatasetNotFoundError";}};});var nB=n(()=>{Ku();Eu();Iu();kte();});var Sp,Qu,sB=n(()=>{Sp=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;}},Qu=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 r=(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:r})}};});var Br,Ou=n(()=>{sr();sB();tt();ne();Ur();QF();ut();Br=class{constructor({id:o,name:r,datasetName:t,prompts:i,tags:a,projectName:s},c){this.opik=c;this.id=o||exports.generateId(),this._name=r,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 r=o.map(i=>({id:exports.generateId(),experimentId:this.id,datasetItemId:i.datasetItemId,traceId:i.traceId,projectName:i.projectName})),t=pr(r,{maxBatchSize:50});try{for(let i of t)await this.opik.api.experiments.createExperimentItems({experimentItems:i});exports.logger.debug(`Inserted ${o.length} items into experiment ${this.id}`);}catch(i){throw exports.logger.error(`Error inserting items into experiment: ${i instanceof Error?i.message:String(i)}`),i}}async getItems(o){let{maxResults:r,truncate:t=false}=o||{};try{let a=(await We((s,c)=>this.opik.api.experiments.streamExperimentItems({experimentName:this.name,limit:s,lastRetrievedId:c,truncate:t}),J.ExperimentItemCompare,"id",{maxResults:r})).map(s=>Qu.fromRestExperimentItemCompare(s));return exports.logger.info(`Retrieved ${a.length} items${r?` (limited by maxResults=${r})`:""}`),a}catch(i){throw exports.logger.error("Error retrieving experiment items: "+(i instanceof Error?i.message:String(i))),i}}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),r=this.opik.config.apiUrl||Xe.apiUrl;return Jre({datasetId:o.id,experimentId:this.id,baseUrl:r})}};});var $u,pB=n(()=>{Ou();$u=class extends Br{constructor(o,r){super(o,r),this.passRate=o.passRate,this.passedCount=o.passedCount,this.totalCount=o.totalCount,this.assertionScores=o.assertionScores;}};});var Yu,cB=n(()=>{Yu={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:
|
|
@@ -56,7 +56,7 @@ Each assertion below is an EVALUATION CRITERION to check against the agent's out
|
|
|
56
56
|
---END ASSERTIONS---`;});var aie;exports.ResponseSchema=void 0;var qB=n(()=>{aie=zod.z.object({score:zod.z.boolean(),reason:zod.z.string(),confidence:zod.z.number().min(0).max(1)}),exports.ResponseSchema=class{constructor(o){this.fieldMapping=new Map(o.map((t,i)=>[`assertion_${i+1}`,t]));let r={};for(let[t,i]of this.fieldMapping)r[t]=aie.describe(i);this.schema=zod.z.object(r);}get responseSchema(){return this.schema}formatAssertions(){return [...this.fieldMapping.entries()].map(([o,r])=>`- \`${o}\`: ${r}`).join(`
|
|
57
57
|
`)}parse(o){let r=[];for(let[t,i]of this.fieldMapping){let a=o[t];if(a==null){r.push({name:i,value:0,reason:`Assertion field missing from LLM response: "${t}"`,scoringFailed:true});continue}if(typeof a!="object"||Array.isArray(a)){r.push({name:i,value:0,reason:`Assertion field malformed in LLM response: "${t}"`,scoringFailed:true});continue}let s=aie.safeParse(a);if(!s.success){r.push({name:i,value:0,reason:`Assertion field malformed in LLM response: "${t}"`,scoringFailed:true});continue}r.push({name:i,value:s.data.score?1:0,reason:s.data.reason});}return r}};});function Kp(p){return typeof p=="object"&&p!==null?p:{}}var Wde;exports.LLMJudge=void 0;var Qp=n(()=>{vg();Eg();ZB();qB();ne();Wde="low";exports.LLMJudge=class p extends exports.BaseSuiteEvaluator{constructor(o){var r,t,i,a,s;if(super((r=o.name)!=null?r:"llm_judge",(t=o.track)!=null?t:true),o.assertions.length===0)throw new Error("LLMJudge requires at least one assertion");for(let c of o.assertions)if(typeof c!="string"||c.trim()==="")throw new Error(`LLMJudge assertions must be non-empty strings. Received: ${JSON.stringify(c)}`);this.assertions=o.assertions,this.modelName=(i=o.model)!=null?i:"gpt-5-nano",this.seed=o.seed,this.temperature=o.temperature,this.reasoningEffort=(a=o.reasoningEffort)!=null?a:Wde,this.projectName=o.projectName,this.model=io(this.modelName,{trackGenerations:(s=o.track)!=null?s:true}),this.responseSchema=new exports.ResponseSchema(this.assertions);}toConfig(){let o=exports.USER_PROMPT_TEMPLATE.replace("{assertions}",this.responseSchema.formatAssertions());return {version:"1.0.0",name:this.name,model:{name:this.modelName,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},customParameters:{reasoning_effort:this.reasoningEffort}},messages:[{role:"SYSTEM",content:exports.SYSTEM_PROMPT},{role:"USER",content:o}],variables:{input:"input",output:"output"},schema:this.assertions.map(r=>({name:r,type:"BOOLEAN",description:r}))}}hasSameSettings(o){return this.modelName===o.modelName&&this.temperature===o.temperature&&this.seed===o.seed&&this.reasoningEffort===o.reasoningEffort&&this.trackMetric===o.trackMetric}static merged(o){if(o.length<=1)return;let r=o[0];if(!o.every(a=>r.hasSameSettings(a)))return;let t=new Set,i=[];for(let a of o)for(let s of a.assertions)t.has(s)||(t.add(s),i.push(s));return new p({assertions:i,name:r.name,model:r.modelName,seed:r.seed,temperature:r.temperature,reasoningEffort:r.reasoningEffort,track:r.trackMetric})}static fromConfig(o,r){var l,m,u;let t=(l=o.schema)!=null?l:[],i=Kp(o.model),a=t.map(d=>{var f;return (f=d.description)!=null?f:d.name}),s=Kp(i.customParameters),c=typeof s.reasoning_effort=="string"?s.reasoning_effort:void 0;return new p({assertions:a,name:typeof o.name=="string"?o.name:"llm_judge",model:(m=r==null?void 0:r.model)!=null?m:typeof i.name=="string"?i.name:"gpt-5-nano",temperature:typeof i.temperature=="number"?i.temperature:void 0,seed:typeof i.seed=="number"?i.seed:void 0,reasoningEffort:c,track:(u=r==null?void 0:r.track)!=null?u:true})}async score(o){var s,c;let r=Kp(o),t=typeof r.input=="string"?r.input:JSON.stringify((s=r.input)!=null?s:""),i=typeof r.output=="string"?r.output:JSON.stringify((c=r.output)!=null?c:""),a=exports.USER_PROMPT_TEMPLATE.replace("{input}",t).replace("{output}",i).replace("{assertions}",this.responseSchema.formatAssertions());try{let l=await this.model.generateProviderResponse([{role:"system",content:exports.SYSTEM_PROMPT},{role:"user",content:a}],{...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},reasoning_effort:this.reasoningEffort,output:ai$1.Output.object({schema:this.responseSchema.responseSchema})}),m=Kp(Kp(l).output);return this.responseSchema.parse(m)}catch(l){return exports.logger.debug(`LLMJudge scoring failed: ${l instanceof Error?l.message:String(l)}`),this.assertions.map(m=>({name:m,value:0,reason:`LLM scoring failed: ${l instanceof Error?l.message:String(l)}`,scoringFailed:true}))}}};});function ao(p){return p.map(o=>({name:o.name,type:Xh.LlmJudge,config:o.toConfig()}))}function lt(p,o){let r=[];for(let t of p)t.type===$h.LlmJudge?r.push(exports.LLMJudge.fromConfig(t.config,o?{model:o}:void 0)):exports.logger.warn(`Unsupported evaluator type: ${t.type}. Skipping.`);return r}function Lr(p){var o,r;return {runsPerItem:(o=p==null?void 0:p.runsPerItem)!=null?o:exports.DEFAULT_EXECUTION_POLICY.runsPerItem,passThreshold:(r=p==null?void 0:p.passThreshold)!=null?r:exports.DEFAULT_EXECUTION_POLICY.passThreshold}}function nie(p,o){if(p.length!==o.length)return false;let r=a=>a.map(s=>JSON.stringify(s.toConfig())).sort(),t=r(p),i=r(o);return t.every((a,s)=>a===i[s])}function sie(p,o){return p.runsPerItem===o.runsPerItem&&p.passThreshold===o.passThreshold}function di(p,o){var r,t;return p?{runsPerItem:(r=p.runsPerItem)!=null?r:o.runsPerItem,passThreshold:(t=p.passThreshold)!=null?t:o.passThreshold}:o}function pie(p){if(typeof p!="object"||p===null)throw new TypeError(`The task function must return an object with 'input' and 'output' keys, but it returned ${typeof p}. Example: return { input: data, output: response }`);let o=p,r=[];if("input"in o||r.push("input"),"output"in o||r.push("output"),r.length>0)throw new Error(`The task function must return an object with 'input' and 'output' keys, but the returned object is missing: ${r.join(", ")}. Got keys: ${Object.keys(o).join(", ")}. Example: return { input: data, output: response }`);return o}var Op=n(()=>{Qp();Zh();Yh();Ag();ne();});async function Ug(p){var u;if(!p.dataset)throw new Error("Dataset is required for test suite");if(!p.task)throw new Error("Task function is required for test suite");let o=(u=p.client)!=null?u:li.getInstance(),r=await p.dataset.getVersionInfo(),t=r!=null&&r.evaluators?lt(r.evaluators,p.evaluatorModel):[],i=Lr(r==null?void 0:r.executionPolicy),a=await p.dataset.getRawItems(p.nbSamples),s=new Map,c=new Map;for(let d of a){let f=d.evaluators?lt(d.evaluators,p.evaluatorModel):[],g=[...t,...f],h=g.filter(C=>C instanceof exports.LLMJudge),y=exports.LLMJudge.merged(h),w=y?[y,...g.filter(C=>!(C instanceof exports.LLMJudge))]:g;s.set(d.id,w);let A=di(d.executionPolicy,i);c.set(d.id,A);}let l=a.map(d=>d.getContent(true)),m=await o.createExperiment({name:p.experimentName,datasetName:p.dataset.name,experimentConfig:p.experimentConfig,prompts:p.prompts,datasetVersionId:r==null?void 0:r.id,evaluationMethod:cc.EvaluationSuite,tags:p.tags,projectName:p.projectName});try{let d={suiteMode:!0,dataset:p.dataset,task:p.task,scoringMetrics:t,projectName:p.projectName,executionPolicy:i,prefetchedItems:l,itemMetricsMap:s,itemPolicyMap:c,taskThreads:p.taskThreads};return await new st(d,o,m).execute()}catch(d){throw exports.logger.error(`Error during test suite: ${d}`),d}}var eM=n(()=>{HB();QB();Qp();ne();Op();Jf();});async function cie(p){var u;let{testSuite:o,task:r,model:t,experimentTags:i,...a}=p,s=async d=>{let f=await r(d);return pie(f)},c=performance.now(),l=await Ug({dataset:o.dataset,task:s,client:o.client,evaluatorModel:t,tags:i,...a,projectName:(u=a.projectName)!=null?u:o.projectName}),m=(performance.now()-c)/1e3;return GB(l,{suiteName:o.name,totalTime:m})}var lie=n(()=>{eM();JB();Op();});async function mie(p){var a;if(!p.dataset)throw new Error("Dataset is required for evaluation");if(!p.task)throw new Error("Task function is required for evaluation");p.prompts&&await Promise.all(p.prompts.map(s=>s.ready()));let o=(a=p.client)!=null?a:li.getInstance(),r=p.experimentConfig;if(p.blueprintId){let s={_blueprint_id:p.blueprintId};try{let c=await o.api.agentConfigs.getBlueprintById(p.blueprintId);c.name&&(s.blueprint_version=c.name);}catch(c){exports.logger.debug(`Failed to fetch blueprint ${p.blueprintId}: ${c}`);}r={...r,agent_configuration:s};}let t=await p.dataset.getVersionInfo(),i=await o.createExperiment({name:p.experimentName,datasetName:p.dataset.name,experimentConfig:r,prompts:p.prompts,datasetVersionId:t==null?void 0:t.id,tags:p.tags,projectName:p.projectName});try{let s=new st(p,o,i);return exports.logger.info("Starting evaluation"),s.execute()}catch(s){throw exports.logger.error(`Error during evaluation: ${s}`),s}}var rM=n(()=>{ne();QB();HB();});var tM=n(()=>{Tg();Cg();Eg();jg();YB();});function die(p){return p.map(o=>{let r=Array.isArray(o.content)?Vde(o.content):o.content;return `${o.role}: ${r}`}).join(`
|
|
58
58
|
`)}function Vde(p){return p.map(o=>o.type==="text"?o.text:o.type==="file"?`[file: ${o.filename||"unknown"}]`:o.type==="tool-call"?`[tool-call: ${o.toolName}]`:o.type==="tool-result"?`[tool-result: ${o.toolName}]`:o.type==="reasoning"?`[reasoning: ${o.text}]`:o.type==="tool-approval-request"?"[tool-approval-request]":o.type==="tool-approval-response"?"[tool-approval-response]":"").filter(o=>o.length>0).join(`
|
|
59
|
-
`)}function Lde(p,o,r){return typeof p=="string"?Ie(p,o,r):Array.isArray(p)?p.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:Ie(i.text,o,r)}:i.type==="image"&&typeof i.image=="string"?{...i,image:Ie(i.image,o,r)}:i.type==="file"&&typeof i.data=="string"?{...i,data:Ie(i.data,o,r)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:Ie(i.text,o,r)}:i):p}function uie(p,o,r){let t=Lde(p.content,o,r);return {...p,content:t}}var gie=n(()=>{jp();});async function hVr(p){var i;if(!p.dataset)throw new Error("Dataset is required for prompt evaluation");if(!p.messages||p.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(p.experimentConfig!==void 0&&(typeof p.experimentConfig!="object"||p.experimentConfig===null||Array.isArray(p.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let o=io(p.model),r={...p.experimentConfig,prompt_template:p.messages,model:o.modelName,...p.temperature!==void 0&&{temperature:p.temperature},...p.seed!==void 0&&{seed:p.seed}},t=Gde(o,p.messages,(i=p.templateType)!=null?i:exports.PromptType.MUSTACHE,{temperature:p.temperature,seed:p.seed});return mie({dataset:p.dataset,task:t,scoringMetrics:p.scoringMetrics,experimentName:p.experimentName,projectName:p.projectName,experimentConfig:r,prompts:p.prompts,client:p.client,nbSamples:p.nbSamples,scoringKeyMapping:p.scoringKeyMapping})}function Gde(p,o,r,t){return async i=>{let a=o.map(m=>uie(m,i,r)),s=await p.generateProviderResponse(a,t),c=Jde(s);return {input:die(a),output:c}}}function Jde(p){return p&&typeof p=="object"?"text"in p&&typeof p.text=="string"?p.text:"content"in p&&typeof p.content=="string"?p.content:JSON.stringify(p):String(p)}var fie=n(()=>{tM();rM();Ot();gie();});function hie(p){if(p===null||typeof p!="object")return false;let o=Object.getPrototypeOf(p);return Array.isArray(p)||o===Object.prototype||o===null}function yie(p){return Reflect.ownKeys(p).filter(o=>Object.prototype.propertyIsEnumerable.call(p,o))}function Kde(p,o,r){let t=[{output:p,expected:o}],i=new WeakSet;for(let a=t.pop();a!==void 0;a=t.pop()){if("exit"in a){i.delete(a.exit);continue}let{output:s,expected:c}=a;if(s===c||!r&&typeof s=="string"&&typeof c=="string"&&s.toLowerCase()===c.toLowerCase())continue;if(!hie(s)||!hie(c)||Array.isArray(s)!==Array.isArray(c)||Array.isArray(s)&&s.length!==c.length||i.has(s))return false;let l=yie(s);if(l.length!==yie(c).length)return false;i.add(s),t.push({exit:s});for(let m of l){if(!Object.prototype.propertyIsEnumerable.call(c,m))return false;t.push({output:s[m],expected:c[m]});}}return true}var Hde;exports.ExactMatch=void 0;var Rie=n(()=>{nt();Hde=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()});exports.ExactMatch=class extends exports.BaseMetric{constructor(r="exact_match",t=true,i=true){super(r,t);this.caseSensitive=i;this.validationSchema=Hde;}async score(r){let{output:t,expected:i}=r,a=Kde(t,i,this.caseSensitive)?1:0;return {name:this.name,value:a,reason:`Exact match: ${a===1?"Match":"No match"}`}}};});var Qde,Ode;exports.Contains=void 0;var wie=n(()=>{nt();Qde="substring must be a non-empty string",Ode=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),exports.Contains=class extends exports.BaseMetric{constructor(r="contains",t=true,i=false){super(r,t);this.validationSchema=Ode;this.caseSensitive=i;}async score(r){let{output:t,substring:i}=r;if(typeof i!="string"||i.length===0)throw new TypeError(Qde);let a=this.caseSensitive?t:t.toLowerCase(),s=this.caseSensitive?i:i.toLowerCase();return a.includes(s)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};});var $de;exports.RegexMatch=void 0;var kie=n(()=>{nt();$de=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),exports.RegexMatch=class extends exports.BaseMetric{constructor(r="regex_match",t=true){super(r,t);this.validationSchema=$de;}async score(r){let{output:t,pattern:i,flags:a}=r,s;typeof i=="string"&&a?s=new RegExp(i,a):s=new RegExp(i);let c=s.test(t);return {name:this.name,value:c?1:0,reason:c?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};});var Yde;exports.IsJson=void 0;var zie=n(()=>{nt();Yde=zod.z.object({output:zod.z.unknown()}),exports.IsJson=class extends exports.BaseMetric{constructor(r="is_json_metric",t=true){super(r,t);this.validationSchema=Yde;}async score(r){let{output:t}=r;try{return JSON.parse(t),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}}
|
|
59
|
+
`)}function Lde(p,o,r){return typeof p=="string"?Ie(p,o,r):Array.isArray(p)?p.map(i=>i.type==="text"&&typeof i.text=="string"?{...i,text:Ie(i.text,o,r)}:i.type==="image"&&typeof i.image=="string"?{...i,image:Ie(i.image,o,r)}:i.type==="file"&&typeof i.data=="string"?{...i,data:Ie(i.data,o,r)}:i.type==="reasoning"&&typeof i.text=="string"?{...i,text:Ie(i.text,o,r)}:i):p}function uie(p,o,r){let t=Lde(p.content,o,r);return {...p,content:t}}var gie=n(()=>{jp();});async function hVr(p){var i;if(!p.dataset)throw new Error("Dataset is required for prompt evaluation");if(!p.messages||p.messages.length===0)throw new Error("Messages array is required and cannot be empty");if(p.experimentConfig!==void 0&&(typeof p.experimentConfig!="object"||p.experimentConfig===null||Array.isArray(p.experimentConfig)))throw new Error("experimentConfig must be a plain object, not an array or primitive value");let o=io(p.model),r={...p.experimentConfig,prompt_template:p.messages,model:o.modelName,...p.temperature!==void 0&&{temperature:p.temperature},...p.seed!==void 0&&{seed:p.seed}},t=Gde(o,p.messages,(i=p.templateType)!=null?i:exports.PromptType.MUSTACHE,{temperature:p.temperature,seed:p.seed});return mie({dataset:p.dataset,task:t,scoringMetrics:p.scoringMetrics,experimentName:p.experimentName,projectName:p.projectName,experimentConfig:r,prompts:p.prompts,client:p.client,nbSamples:p.nbSamples,scoringKeyMapping:p.scoringKeyMapping})}function Gde(p,o,r,t){return async i=>{let a=o.map(m=>uie(m,i,r)),s=await p.generateProviderResponse(a,t),c=Jde(s);return {input:die(a),output:c}}}function Jde(p){return p&&typeof p=="object"?"text"in p&&typeof p.text=="string"?p.text:"content"in p&&typeof p.content=="string"?p.content:JSON.stringify(p):String(p)}var fie=n(()=>{tM();rM();Ot();gie();});function hie(p){if(p===null||typeof p!="object")return false;let o=Object.getPrototypeOf(p);return Array.isArray(p)||o===Object.prototype||o===null}function yie(p){return Reflect.ownKeys(p).filter(o=>Object.prototype.propertyIsEnumerable.call(p,o))}function Kde(p,o,r){let t=[{output:p,expected:o}],i=new WeakSet;for(let a=t.pop();a!==void 0;a=t.pop()){if("exit"in a){i.delete(a.exit);continue}let{output:s,expected:c}=a;if(s===c||!r&&typeof s=="string"&&typeof c=="string"&&s.toLowerCase()===c.toLowerCase())continue;if(!hie(s)||!hie(c)||Array.isArray(s)!==Array.isArray(c)||Array.isArray(s)&&s.length!==c.length||i.has(s))return false;let l=yie(s);if(l.length!==yie(c).length)return false;i.add(s),t.push({exit:s});for(let m of l){if(!Object.prototype.propertyIsEnumerable.call(c,m))return false;t.push({output:s[m],expected:c[m]});}}return true}var Hde;exports.ExactMatch=void 0;var Rie=n(()=>{nt();Hde=zod.z.object({output:zod.z.unknown(),expected:zod.z.unknown()});exports.ExactMatch=class extends exports.BaseMetric{constructor(r="exact_match",t=true,i=true){super(r,t);this.caseSensitive=i;this.validationSchema=Hde;}async score(r){let{output:t,expected:i}=r,a=Kde(t,i,this.caseSensitive)?1:0;return {name:this.name,value:a,reason:`Exact match: ${a===1?"Match":"No match"}`}}};});var Qde,Ode;exports.Contains=void 0;var wie=n(()=>{nt();Qde="substring must be a non-empty string",Ode=zod.z.object({output:zod.z.string(),substring:zod.z.string()}),exports.Contains=class extends exports.BaseMetric{constructor(r="contains",t=true,i=false){super(r,t);this.validationSchema=Ode;this.caseSensitive=i;}async score(r){let{output:t,substring:i}=r;if(typeof i!="string"||i.length===0)throw new TypeError(Qde);let a=this.caseSensitive?t:t.toLowerCase(),s=this.caseSensitive?i:i.toLowerCase();return a.includes(s)?{name:this.name,value:1,reason:`Contains: "${i}" found in output.`}:{name:this.name,value:0,reason:`Contains: "${i}" not found in output.`}}};});var $de;exports.RegexMatch=void 0;var kie=n(()=>{nt();$de=zod.z.object({output:zod.z.string(),pattern:zod.z.string(),flags:zod.z.string().optional()}),exports.RegexMatch=class extends exports.BaseMetric{constructor(r="regex_match",t=true){super(r,t);this.validationSchema=$de;}async score(r){let{output:t,pattern:i,flags:a}=r,s;typeof i=="string"&&a?s=new RegExp(i,a):s=new RegExp(i);let c=s.test(t);return {name:this.name,value:c?1:0,reason:c?`Regex: Output matches the regex pattern: ${i}`:`Regex: Output does not match the regex pattern: ${i}`}}};});var Yde;exports.IsJson=void 0;var zie=n(()=>{nt();Yde=zod.z.object({output:zod.z.unknown()}),exports.IsJson=class extends exports.BaseMetric{constructor(r="is_json_metric",t=true){super(r,t);this.validationSchema=Yde;}async score(r){let{output:t}=r;if(typeof t=="string")try{return JSON.parse(t),{name:this.name,value:1,reason:"IsJson: Output is valid JSON."}}catch{}return {name:this.name,value:0,reason:"IsJson: Output is not valid JSON"}}};});var Sie=n(()=>{Rie();wie();kie();zie();});exports.BaseLLMJudgeMetric=void 0;var no=n(()=>{nt();Eg();exports.BaseLLMJudgeMetric=class extends exports.BaseMetric{constructor(o,r){var i;let t=(i=r==null?void 0:r.trackMetric)!=null?i:true;super(o,t),this.temperature=r==null?void 0:r.temperature,this.seed=r==null?void 0:r.seed,this.maxTokens=r==null?void 0:r.maxTokens,this.modelSettings=r==null?void 0:r.modelSettings,this.model=this.initModel(r==null?void 0:r.model,{trackGenerations:t});}initModel(o,r){return io(o,r)}buildModelOptions(){return {...this.modelSettings,...this.temperature!==void 0&&{temperature:this.temperature},...this.seed!==void 0&&{seed:this.seed},...this.maxTokens!==void 0&&{maxTokens:this.maxTokens}}}};});function vie(p,o=[]){let r="";return o.length>0&&(r=`
|
|
60
60
|
|
|
61
61
|
###EXAMPLES###
|
|
62
62
|
|