@whoz-oss/coday-client 0.192.0 → 0.194.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/browser/chunk-365PC3K4.js +1 -0
- package/browser/chunk-3W6IABF7.js +1 -0
- package/browser/chunk-4H3JC44E.js +1 -0
- package/browser/{chunk-GRJZARL3.js → chunk-5KQRRBRM.js} +1 -1
- package/browser/{chunk-BHZ7DCUX.js → chunk-673LAQ67.js} +1 -1
- package/browser/chunk-6DJI2ISP.js +1 -0
- package/browser/{chunk-PIZZDP7D.js → chunk-6LKSZT23.js} +1 -1
- package/browser/chunk-BD2JL3TM.js +1 -0
- package/browser/chunk-EVGEVSVW.js +1 -0
- package/browser/{chunk-UF5SWABD.js → chunk-EYVMSUTE.js} +1 -1
- package/browser/{chunk-EYS2HGZ4.js → chunk-FFVZGJTH.js} +1 -1
- package/browser/{chunk-OZXXB3UF.js → chunk-FHXSOZNH.js} +1 -1
- package/browser/{chunk-B3LI4JXF.js → chunk-FOKX6I2Z.js} +1 -1
- package/browser/chunk-FYV2X4OT.js +1 -0
- package/browser/chunk-GNOWUH32.js +1 -0
- package/browser/{chunk-E7DFLZK7.js → chunk-HYLANQ7S.js} +1 -1
- package/browser/chunk-K6LN2G4S.js +1 -0
- package/browser/{chunk-SVB2BKSE.js → chunk-MSZ6ZUVB.js} +1 -1
- package/browser/{chunk-M4B5E7RD.js → chunk-NCAQB4YV.js} +1 -1
- package/browser/chunk-NNX3PDIS.js +1 -0
- package/browser/{chunk-TVJBPYTY.js → chunk-NQFFZYA5.js} +1 -1
- package/browser/chunk-O6C6CMJB.js +1 -0
- package/browser/chunk-OBJWOIYT.js +1 -0
- package/browser/{chunk-PMFBZ6OG.js → chunk-OUX4W4H3.js} +1 -1
- package/browser/chunk-PGVRQZPL.js +1 -0
- package/browser/{chunk-XBVYORVG.js → chunk-Q2OIC5K4.js} +1 -1
- package/browser/{chunk-OULUES5R.js → chunk-QK5VCYWD.js} +1 -1
- package/browser/{chunk-WEEYHBKK.js → chunk-RGTFHBKY.js} +1 -1
- package/browser/chunk-RXFB3YPJ.js +1 -0
- package/browser/{chunk-AJAMHOBU.js → chunk-SAZYNLEH.js} +1 -1
- package/browser/chunk-SMT5YVCA.js +1 -0
- package/browser/{chunk-3IVR2HN6.js → chunk-TB64Y6NI.js} +1 -1
- package/browser/{chunk-R3V2KTBP.js → chunk-TGB7TH4A.js} +1 -1
- package/browser/chunk-TI3SOE5U.js +1 -0
- package/browser/{chunk-26U7XARR.js → chunk-VO2S7HEJ.js} +1 -1
- package/browser/{chunk-NR35GT4F.js → chunk-VXYHLVHD.js} +1 -1
- package/browser/chunk-YL4UR34K.js +1 -0
- package/browser/chunk-YUBIVG2D.js +1 -0
- package/browser/chunk-ZMRRZN4Q.js +1 -0
- package/browser/index.html +1 -1
- package/browser/{main-GZS32O2T.js → main-7S5SBCQK.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-BKNW4IOO.js +0 -1
- package/browser/chunk-BQMLTABP.js +0 -1
- package/browser/chunk-E3YDDL7X.js +0 -1
- package/browser/chunk-EBPDINXG.js +0 -1
- package/browser/chunk-ECEWYTGM.js +0 -1
- package/browser/chunk-HEBIR2K3.js +0 -1
- package/browser/chunk-KTG6TT73.js +0 -1
- package/browser/chunk-KW4N7QC3.js +0 -1
- package/browser/chunk-LJN5BVCL.js +0 -1
- package/browser/chunk-PW6HGLWK.js +0 -1
- package/browser/chunk-QTE5GMOI.js +0 -1
- package/browser/chunk-UXMMRPAW.js +0 -1
- package/browser/chunk-YNF2EAXK.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Qc as Y,Rc as h,Sc as V,Tc as j,Z as A,a as b,aa as K,b as u,ba as x,ca as O,da as Q,g as L,pa as z}from"./chunk-B4RKRLIY.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:r,credentials:p,encodeParam:o,encoder:t,password:e,username:i,withCredentials:l}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),C!==void 0&&(this.accessToken=C),r!==void 0&&(this.basePath=r),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=o??(a=>this.defaultEncodeParam(a)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}isJsonMime(C){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return C!==null&&(n.test(C)||C.toLowerCase()==="application/json-patch+json")}lookupCredential(C){let n=this.credentials[C];return typeof n=="function"?n():n}addCredentialToHeaders(C,n,r,p){let o=this.lookupCredential(C);return o?r.set(n,(p??"")+o):r}addCredentialToQuery(C,n,r){let p=this.lookupCredential(C);return p?r.set(n,p):r}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var v=new K("basePath");var R=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Y;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let r=Array.isArray(C)?C[0]:void 0;r!=null&&(C=r),typeof C!="string"&&(C=this.basePath),this.configuration.basePath=C}this.encoder=this.configuration.encoder||new R}canConsumeForm(C){return C.indexOf("multipart/form-data")!==-1}addToHttpParams(C,n,r,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?r:void 0,p):this.addToHttpParamsRecursive(C,n,r)}addToHttpParamsRecursive(C,n,r,p=!1){if(n==null)return C;if(typeof n=="object"){if(r!=null)return p?Object.keys(n).reduce((o,t)=>o.append(`${r}[${t}]`,n[t]),C):C.append(r,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>C=this.addToHttpParamsRecursive(C,o,r));else if(n instanceof Date)if(r!=null)C=C.append(r,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(o=>{let t=r?`${r}.${o}`:o;C=this.addToHttpParamsRecursive(C,n[o],t)});return C}else if(r!=null)return C.append(r,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}disableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/disable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}enableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/enable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"withUserOverlay");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/definition`,{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}listByNamespaceAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByNamespaceAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"withDisabled");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}searchAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/search",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(r==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateAiModel(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(r==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAiProvider(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateAiProvider(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(r==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}addMessageCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(r==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}createCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}interruptCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}killCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/external/${this.configuration.encodeParam({name:"externalId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(r==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getTypeIntegrationType(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling deployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/deploy-agents`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}getByIdNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling undeployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/undeploy-agents`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(r==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var Z=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(Z||{});var M=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getByIdCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/case-events/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var N=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter feedbackInput was null or undefined when calling createFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/feedbacks",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseEventFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseEventId was null or undefined when calling listByCaseEventFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-case-event/${this.configuration.encodeParam({name:"caseEventId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(r==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}grantAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}grantMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}listNamespaceUsers(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/users`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}revokeAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}revokeMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,u(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateRolesByExternalId(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}debugAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}debugPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}getPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}reloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}startPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}stopPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}unloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}streamEventsCaseEventSse(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"includePreviousEvents");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new h,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("get",`${g}${c}`,u(b({context:a,params:e,responseType:s},f?{withCredentials:f}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter groupsByExternalIdsRequest was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/groups-by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getMeUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listAllUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new h,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,u(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-external-ids",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateUser(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(r==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var k=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/user-groups",{basePath:g,withCredentials:f}=this.configuration;return this.httpClient.request("post",`${g}${c}`,u(b({context:i,body:n,responseType:s},f?{withCredentials:f}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,u(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling searchByNamespaceIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceId");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new h,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,u(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}updateUserGroup(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(r==null)throw new Error("Required parameter userGroupUpdateRequest was null or undefined when calling updateUserGroup.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:f,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${f}${g}`,u(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};function sr(H){return Q([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var D=class H{config=O(y);zone=O(z);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new L(r=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=o=>{try{let t=JSON.parse(o.data);this.zone.run(()=>r.next(t))}catch(t){this.zone.run(()=>r.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=o=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>r.complete()):this.zone.run(()=>r.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,B as d,$ as e,G as f,U as g,S as h,F as i,J as j,_ as k,Z as l,sr as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as X}from"./chunk-TVJBPYTY.js";import{a as Y}from"./chunk-26U7XARR.js";import"./chunk-T3IUNA6F.js";import"./chunk-UF5SWABD.js";import{g as L}from"./chunk-EBPDINXG.js";import{b as D,d as R}from"./chunk-4GVABYH4.js";import{q as W}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as v,c as y}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import{F as Q,c as B,e as x,g as z,h as A,i as G,l as u,n as q,p as j,s as $,w as J,x as U,y as H,z as K}from"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as T,Db as g,Fb as p,Ka as a,Tb as l,Ub as h,Vb as N,Wa as w,ca as m,ga as _,ha as C,kb as I,kc as V,lb as M,ma as E,mb as O,pb as P,qb as k,rb as s,sb as r,ta as d,tb as o,ua as F,ub as b}from"./chunk-B4RKRLIY.js";function ee(i,e){i&1&&(r(0,"p",5),l(1,"Loading\u2026"),o())}function te(i,e){if(i&1&&(r(0,"label",10),b(1,"input",25),r(2,"span"),l(3),o()()),i&2){let t=e.$implicit,n=p(2);a(),s("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),a(2),h(t.label)}}function ne(i,e){if(i&1&&(r(0,"option",16),l(1),o()),i&2){let t=e.$implicit;s("value",t.type),a(),h(t.displayName)}}function oe(i,e){if(i&1){let t=T();r(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return C(f.onParamsChange(c))}),o()()}if(i&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function re(i,e){if(i&1){let t=T();r(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return C(c.submit())}),r(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),P(4,te,4,4,"label",10,I().trackByScope,!0),o(),r(6,"div",11)(7,"label",12),l(8,"Type "),r(9,"span",13),l(10,"*"),o()(),r(11,"select",14)(12,"option",15),l(13,"Select type"),o(),P(14,ne,2,2,"option",16,I().trackByType,!0),o()(),r(16,"div",11)(17,"label",17),l(18,"Name "),r(19,"span",13),l(20,"*"),o()(),b(21,"input",18),o(),r(22,"div",11)(23,"label",19),l(24,"Description"),o(),b(25,"textarea",20),o(),M(26,oe,2,2,"div",21),r(27,"div",22)(28,"button",23),l(29),o(),r(30,"button",24),g("click",function(){_(t);let c=p();return C(c.cancel())}),l(31,"Cancel"),o()()()}if(i&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),k(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),k(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),O((t=n.schema())?26:-1,t),a(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),a(),N(" ",n.isEditMode()?"Save changes":"Create"," ")}}var ie=new Set(["platform","namespace","userOnNs","userGlobal"]),S=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),Z=class i{route=m(D);router=m(R);destroyRef=m(E);state=m(X);integrationTypeController=m(L);namespaceRole=m(Y);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=y(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:!1});form=new G({name:new u("",{nonNullable:!0,validators:[x.required,x.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[x.required]}),scope:new u("namespace",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);scopeOptions=[{value:"platform",label:S.platform},{value:"namespace",label:S.namespace},{value:"userOnNs",label:S.userOnNs},{value:"userGlobal",label:S.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=y(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=y(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=V(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){F(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId"),c=this.parseScope(t.get("scope"));if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&ie.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t,this.scopeControl.setValue(this.deriveScopeFromConfig(t)),this.applyConfigToForm(t),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters)}onParamsChange(e){this.paramsValue.set(e)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue()},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=w({type:i,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),g("click",function(){return n.cancel()}),r(3,"span",3),l(4,"\u2190"),o(),l(5," Integrations "),o(),r(6,"h1",4),l(7),o()(),M(8,ee,2,0,"p",5)(9,re,32,8,"form",6),o()),t&2&&(a(7),h(n.isEditMode()?"Edit integration":"New integration"),a(),O(n.isLoading()?8:9))},dependencies:[Q,q,H,K,B,U,j,z,A,$,J,W],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));border-radius:10px;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text, #1d1d1f);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{Z as IntegrationFormComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-KTG6TT73.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseHomeComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as E}from"./chunk-EBPDINXG.js";import{b as w,d as M}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-WV7ML4CJ.js";import{a as I}from"./chunk-V363EHJE.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,S as f,Tb as l,Tc as x,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-B4RKRLIY.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H}from"./chunk-TVJBPYTY.js";import{a as q}from"./chunk-3IVR2HN6.js";import"./chunk-T3IUNA6F.js";import{c as j}from"./chunk-QPBFAKWK.js";import{a as Y}from"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import{d as F}from"./chunk-4GVABYH4.js";import{a as E,c as G}from"./chunk-V363EHJE.js";import{F as B,c as z,g as N,h as $,i as L,l as S,n as R,v as K,w as A}from"./chunk-HZF57OLY.js";import{Bb as x,Db as c,Dc as I,Fb as s,Ka as d,Rb as O,Tb as n,Ub as u,Vb as P,Wa as V,ca as C,ga as p,ha as m,jb as k,kb as w,lb as f,ma as D,mb as g,pb as b,qb as y,rb as M,sb as i,t as U,ta as v,tb as t,u as T,ub as h}from"./chunk-B4RKRLIY.js";var Q=(o,r)=>r.value;function W(o,r){o&1&&(i(0,"p",5),n(1,"Loading\u2026"),t())}function X(o,r){if(o&1){let e=x();i(0,"button",14),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setTheme(a.value))}),n(1),t()}if(o&2){let e=r.$implicit,l=s(2);O("user-profile__theme-option--active",l.theme()===e.value),k("aria-pressed",l.theme()===e.value),d(),P(" ",e.label," ")}}function Z(o,r){if(o&1){let e=x();i(0,"form",15),c("ngSubmit",function(){p(e);let a=s(2);return m(a.save())}),i(1,"div",6)(2,"h2",7),n(3,"Identity"),t(),i(4,"div",8)(5,"span",9),n(6,"Email"),t(),i(7,"span",16),n(8),t()(),i(9,"div",8)(10,"span",9),n(11,"External ID"),t(),i(12,"span",16),n(13),t()()(),i(14,"div",6)(15,"h2",7),n(16,"Profile"),t(),i(17,"div",8)(18,"label",17),n(19,"First name"),t(),h(20,"input",18),t(),i(21,"div",8)(22,"label",19),n(23,"Last name"),t(),h(24,"input",20),t(),i(25,"div",8)(26,"label",21),n(27,"Bio"),t(),h(28,"textarea",22),t()(),i(29,"div",23)(30,"button",24),n(31),t(),i(32,"button",25),c("click",function(){p(e);let a=s(2);return m(a.cancelEditing())}),n(33,"Cancel"),t()()()}if(o&2){let e=s(),l=s();M("formGroup",l.form),d(8),u(e.email),d(5),u(e.externalId),d(17),M("disabled",l.isSaving()),d(),P(" ",l.isSaving()?"Saving\u2026":"Save changes"," ")}}function ee(o,r){o&1&&(i(0,"p",33),n(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function te(o,r){if(o&1){let e=x();i(0,"span",40),n(1,"Delete?"),t(),i(2,"button",41),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),n(3," Confirm "),t(),i(4,"button",42),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),n(5," Cancel "),t()}}function ie(o,r){if(o&1){let e=x();i(0,"button",42),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),n(1," Delete "),t()}}function ne(o,r){if(o&1&&(i(0,"li",36)(1,"span",37),n(2),t(),i(3,"span",38),n(4),t(),f(5,te,6,0)(6,ie,2,0,"button",39),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),g(l.isPendingDelete(e)?5:6)}}function re(o,r){if(o&1&&(i(0,"h3",34),n(1,"Integrations"),t(),i(2,"ul",35),b(3,ne,7,3,"li",36,w().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().integrations)}}function oe(o,r){if(o&1){let e=x();i(0,"span",40),n(1,"Delete?"),t(),i(2,"button",41),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),n(3," Confirm "),t(),i(4,"button",42),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),n(5," Cancel "),t()}}function le(o,r){if(o&1){let e=x();i(0,"button",42),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),n(1," Delete "),t()}}function ae(o,r){if(o&1&&(i(0,"li",36)(1,"span",37),n(2),t(),i(3,"span",38),n(4),t(),f(5,oe,6,0)(6,le,2,0,"button",39),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),g(l.isPendingDelete(e)?5:6)}}function se(o,r){if(o&1&&(i(0,"h3",34),n(1,"AI Providers"),t(),i(2,"ul",35),b(3,ae,7,3,"li",36,w().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().aiProviders)}}function de(o,r){if(o&1&&(f(0,re,5,0),f(1,se,5,0)),o&2){let e=s(4);g(e.recap().integrations.length>0?0:-1),d(),g(e.recap().aiProviders.length>0?1:-1)}}function _e(o,r){if(o&1&&f(0,ee,2,0,"p",33)(1,de,2,2),o&2){let e=s(3);g(e.recap().total===0?0:1)}}function ce(o,r){if(o&1){let e=x();i(0,"div",13)(1,"div",6)(2,"h2",7),n(3,"Identity"),t(),i(4,"div",8)(5,"span",9),n(6,"Email"),t(),i(7,"span",26),n(8),t()(),i(9,"div",8)(10,"span",9),n(11,"External ID"),t(),i(12,"span",26),n(13),t()()(),i(14,"div",6)(15,"h2",7),n(16,"Profile"),t(),i(17,"div",8)(18,"span",9),n(19,"First name"),t(),i(20,"span",26),n(21),t()(),i(22,"div",8)(23,"span",9),n(24,"Last name"),t(),i(25,"span",26),n(26),t()(),i(27,"div",27)(28,"span",9),n(29,"Bio"),t(),i(30,"span",26),n(31),t()()(),i(32,"div",23)(33,"button",28),c("click",function(){p(e);let a=s(2);return m(a.startEditing())}),n(34," Edit profile "),t()(),i(35,"div",29)(36,"button",30),c("click",function(){p(e);let a=s(2);return m(a.toggleOverrides())}),i(37,"span",31),n(38,"\u25B6"),t(),n(39," My global user configurations "),i(40,"span",32),n(41),t()(),f(42,_e,2,1),t()()}if(o&2){let e=s(),l=s();d(8),u(e.email),d(5),u(e.externalId),d(8),u(e.firstname||"\u2014"),d(5),u(e.lastname||"\u2014"),d(5),u(e.bio||"\u2014"),d(5),k("aria-expanded",l.isOverridesExpanded()),d(),O("user-profile__overrides-arrow--open",l.isOverridesExpanded()),d(4),P("(",l.recap().total,")"),d(),g(l.isOverridesExpanded()?42:-1)}}function pe(o,r){if(o&1&&(i(0,"div",6)(1,"h2",7),n(2,"Appearance"),t(),i(3,"div",8)(4,"span",9),n(5,"Theme"),t(),i(6,"div",10),b(7,X,2,4,"button",11,Q),t()()(),f(9,Z,34,5,"form",12)(10,ce,43,10,"div",13)),o&2){let e=s();d(7),y(e.themeOptions),d(2),g(e.isEditing()?9:10)}}function me(o,r){o&1&&(i(0,"p",5),n(1,"Unable to load profile."),t())}var J=class o{userState=C(Y);router=C(F);location=C(I);destroyRef=C(D);integrationState=C(H);providerState=C(q);themePort=C(j);isEditing=v(!1);isLoading=v(!1);isSaving=v(!1);isOverridesExpanded=v(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];form=new L({firstname:new S("",{nonNullable:!0}),lastname:new S("",{nonNullable:!0}),bio:new S("",{nonNullable:!0})});recap=G(T([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(U(([r,e])=>{let l=r.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),a=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:l,aiProviders:a,total:l.length+a.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(E(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(r){this.themePort.setTheme(r)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(E(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(r=>!r),this.pendingDeleteKey.set(null)}pendingDeleteKey=v(null);isPendingDelete(r){return this.pendingDeleteKey()===this.entryKey(r)}armDelete(r){r.id&&this.pendingDeleteKey.set(this.entryKey(r))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(r){if(!r.id)return;this.pendingDeleteKey.set(null),(r.category==="integration"?this.integrationState.delete(r.id,"userGlobal"):this.providerState.delete(r.id,"userGlobal")).pipe(E(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${r.category}:${r.id}:`,l)}})}entryKey(r){return`${r.category}:${r.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(r,e){return this.entryKey(e)}syncFormFromState(){let r=this.currentUser();r&&this.form.setValue({firstname:r.firstname??"",lastname:r.lastname??"",bio:r.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["agentos-user-profile"]],decls:11,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["type","button","title","Go back",1,"user-profile__back",3,"click"],[1,"user-profile__back-icon"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],["role","group","aria-label","Theme",1,"user-profile__theme"],["type","button",1,"user-profile__theme-option",3,"user-profile__theme-option--active"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,l){if(e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),c("click",function(){return l.goBack()}),i(3,"span",3),n(4,"\u2190"),t(),n(5," Back "),t(),i(6,"h1",4),n(7,"My profile"),t()(),f(8,W,2,0,"p",5)(9,pe,11,1)(10,me,2,0,"p",5),t()),e&2){let a;d(8),g(l.isLoading()?8:(a=l.currentUser())?9:10,a)}},dependencies:[B,R,z,N,$,A,K],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--color-border)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-tertiary);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:6px}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:none;font-size:.75rem;color:var(--color-error);cursor:pointer;padding:.2rem .4rem;border-radius:4px}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-profile__theme[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}.user-profile__theme-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-border, rgba(0, 0, 0, .1));color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__theme-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__theme-option[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__theme-option--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:#fff}.user-profile__theme-option--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{J as UserProfileComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as B}from"./chunk-EBPDINXG.js";import{b as q,d as v}from"./chunk-4GVABYH4.js";import{p as $,u as z,v as F}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as I}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as u,Db as c,Fb as s,Hc as V,Ka as m,Pb as R,S as k,Tb as l,Ub as y,Wa as b,ab as N,ac as S,ca as g,dc as T,ec as P,ga as p,ha as d,hc as O,i as w,lb as f,ma as M,mb as _,oa as D,rb as C,sb as a,t as A,ta as E,tb as r}from"./chunk-B4RKRLIY.js";function U(t,n){if(t&1&&(a(0,"span",3),l(1),r()),t&2){let e=s();m(),y(e.config.modelName)}}function W(t,n){if(t&1&&(a(0,"span",4),l(1),r()),t&2){let e=s();m(),y(e.config.description)}}function G(t,n){if(t&1){let e=u();a(0,"span",7),l(1,"Delete?"),r(),a(2,"ds-icon-button",8),c("action",function(){p(e);let o=s();return d(o.onDeleteConfirmed())}),r(),a(3,"ds-icon-button",9),c("action",function(){p(e);let o=s();return d(o.onDeleteCancelled())}),r()}}function H(t,n){if(t&1){let e=u();a(0,"ds-kebab-menu",10),c("itemSelected",function(o){p(e);let x=s();return d(x.onMenuAction(o))}),r()}if(t&2){let e=s();C("items",e.menuItems)}}var h=class t{router=g(v);config;namespaceId;deleteRequested=new D;pendingDelete=E(!1);menuItems=[{key:"edit",label:"Edit agent config",icon:"edit"},{key:"inspect",label:"Inspect definition",icon:"search"},{key:"delete",label:"Delete agent config",icon:"delete",variant:"danger"}];onMenuAction(n){switch(n){case"edit":this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.config.id,"edit"]);break;case"inspect":this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.config.id,"inspect"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["agentos-agent-config-item"]],inputs:{config:"config",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:9,vars:4,consts:[["role","listitem",1,"agent-config-item"],[1,"agent-config-item__body"],[1,"agent-config-item__name"],[1,"agent-config-item__model"],[1,"agent-config-item__description"],[1,"agent-config-item__actions"],[3,"items"],[1,"agent-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),l(3),r(),f(4,U,2,1,"span",3),f(5,W,2,1,"span",4),r(),a(6,"div",5),f(7,G,4,0)(8,H,1,1,"ds-kebab-menu",6),r()()),e&2&&(m(3),y(i.config.name),m(),_(i.config.modelName?4:-1),m(),_(i.config.description?5:-1),m(2),_(i.pendingDelete()?7:8))},dependencies:[F,$],styles:[".agent-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.agent-config-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.agent-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.agent-config-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__model[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.agent-config-item[_ngcontent-%COMP%]:hover .agent-config-item__actions[_ngcontent-%COMP%], .agent-config-item[_ngcontent-%COMP%]:focus-within .agent-config-item__actions[_ngcontent-%COMP%]{opacity:1}.agent-config-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var J=()=>[];function Q(t,n){if(t&1){let e=u();a(0,"agentos-agent-config-item",4),c("deleteRequested",function(o){p(e);let x=s(2);return d(x.deleteConfig(o))}),r()}if(t&2){let e=s(2);C("config",n)("namespaceId",e.namespaceId)}}function X(t,n){if(t&1&&f(0,Q,1,2,"agentos-agent-config-item",3),t&2){let e,i=n.$implicit,o=s();_((e=o.resolveConfig(i.id))?0:-1,e)}}var j=class t{route=g(q);router=g(v);destroyRef=g(M);agentConfigController=g(B);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new w(void 0);configs$=this.refresh$.pipe(k(()=>this.agentConfigController.listByNamespaceAgentConfig(this.namespaceId)));configItems$=this.configs$.pipe(A(n=>n.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(I(this.destroyRef)).subscribe(n=>{this.configsById=new Map(n.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(n){this.agentConfigController.deleteAgentConfig(n.id??"").pipe(I(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(n){return this.configsById.get(n)??null}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=b({type:t,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId"],[3,"deleteRequested","config","namespaceId"]],template:function(e,i){if(e&1&&(a(0,"ds-entity-list",1),T(1,"async"),c("createRequested",function(){return i.openCreateForm()}),a(2,"button",2),c("click",function(){return i.goBack()}),l(3," \u2190 Namespaces "),r()(),N(4,X,1,1,"ng-template",null,0,O)),e&2){let o=R(5);C("items",P(1,3,i.configItems$)??S(5,J))("showCreate",!0)("itemTemplate",o)}},dependencies:[z,h,V],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{j as NamespaceAgentConfigsComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as J}from"./chunk-EBPDINXG.js";import{a as Z,b as ee,c as te}from"./chunk-FPNEFWYN.js";import{b as U}from"./chunk-4GVABYH4.js";import{p as ne}from"./chunk-WV7ML4CJ.js";import{a as X}from"./chunk-V363EHJE.js";import{Bb as S,Db as f,Fb as l,Ga as $,Jb as B,Jc as Y,Ka as s,Kb as N,Lb as F,Ma as H,Rb as M,Tb as c,Tc as j,Ub as p,Vb as W,Wa as V,Wc as Q,ca as y,dc as G,ec as K,ga as E,ha as T,jb as P,kb as q,kc as k,lb as h,ma as D,mb as g,pa as L,pb as I,qb as R,rb as w,sb as r,ta as v,tb as i,ua as O,ub as A}from"./chunk-B4RKRLIY.js";var ie=["composerInput"],re=["messagesContainer"],se=(a,t)=>t.phaseIndex;function ce(a,t){a&1&&(r(0,"div",4)(1,"p"),c(2,"No messages yet."),i()())}function le(a,t){if(a&1&&(r(0,"div",19)(1,"span",22),c(2,"session context"),i(),r(3,"pre",23),c(4),G(5,"json"),i()()),a&2){let e=l(2).$implicit;s(4),p(K(5,1,e.event.sessionContext))}}function de(a,t){if(a&1&&(r(0,"div",18),h(1,le,6,3,"div",19),r(2,"span",20),c(3),i(),A(4,"div",21),i()),a&2){let e=l().$implicit,n=l(2);M("case-chat__message--user",e.event.actor.role==="USER")("case-chat__message--agent",e.event.actor.role==="AGENT"),s(),g(n.showTechnical()&&e.event.sessionContext?1:-1),s(2),p(e.event.actor.displayName),s(),w("innerHTML",e.html,$)}}function me(a,t){if(a&1&&(r(0,"div",15)(1,"span",20),c(2),i(),r(3,"p",24),c(4),i()()),a&2){let e=l().$implicit,n=l(2);s(2),p(n.agentDisplayName()),s(2),p(e.text)}}function _e(a,t){if(a&1&&(r(0,"div",29),c(1),i()),a&2){let e=l(3).$implicit;s(),p(e.item.detail)}}function pe(a,t){if(a&1){let e=S();r(0,"button",27),f("click",function(){E(e);let o=l(2).$implicit,u=l(2);return T(u.toggleTechnical(o.eventId))}),r(1,"span",26),c(2),i(),r(3,"span",28),c(4),i()(),h(5,_e,2,1,"div",29)}if(a&2){let e=l(2).$implicit,n=l(2);P("aria-expanded",n.isTechnicalExpanded(e.eventId)),s(2),p(e.item.label),s(2),p(n.isTechnicalExpanded(e.eventId)?"\u25BC":"\u25B6"),s(),g(n.isTechnicalExpanded(e.eventId)?5:-1)}}function he(a,t){if(a&1&&(r(0,"span",26),c(1),i()),a&2){let e=l(2).$implicit;s(),p(e.item.label)}}function ge(a,t){if(a&1&&(r(0,"div",25),h(1,pe,6,4)(2,he,2,1,"span",26),i()),a&2){let e=l().$implicit;M("case-chat__technical--warn",e.item.type==="WarnEvent")("case-chat__technical--error",e.item.type==="ErrorEvent"),s(),g(e.item.detail?1:2)}}function ue(a,t){a&1&&c(0," \u23F3 ")}function Ce(a,t){a&1&&c(0," \u2705 ")}function ve(a,t){a&1&&c(0," \u274C ")}function fe(a,t){if(a&1&&(r(0,"div",46)(1,"span",47),c(2,"Enrichment content"),i(),r(3,"pre"),c(4),i()()),a&2){let e=l().$implicit;s(4),p(e.enrichmentContent)}}function xe(a,t){if(a&1&&(r(0,"div",42)(1,"div",43)(2,"span",44),c(3),i(),r(4,"span",45),c(5),i()(),r(6,"div",46)(7,"span",47),c(8,"Prompt"),i(),r(9,"pre"),c(10),i()(),r(11,"div",46)(12,"span",47),c(13,"LLM output"),i(),r(14,"pre"),c(15),i()(),h(16,fe,5,1,"div",46),i()),a&2){let e=t.$implicit;M("case-chat__enrichment-phase--failed",!e.success),s(3),W("Phase ",e.phaseIndex),s(2),p(e.success?"\u2705":"\u274C"),s(5),p(e.prompt),s(5),p(e.llmOutput),s(),g(e.enrichmentContent?16:-1)}}function be(a,t){if(a&1&&(r(0,"div",36)(1,"span",38),c(2,"Enrichment phases"),i(),I(3,xe,17,7,"div",41,se),i()),a&2){let e=l(3).$implicit;s(3),R(e.call.enrichmentPhases)}}function ye(a,t){if(a&1&&(r(0,"div",37)(1,"span",38),c(2,"Payload"),i(),r(3,"pre"),c(4),i()()),a&2){let e=l(3).$implicit;s(4),p(e.call.args)}}function Ee(a,t){a&1&&(r(0,"pre"),c(1),i()),a&2&&(s(),p(t))}function Te(a,t){a&1&&(r(0,"span",39),c(1,"Running\u2026"),i())}function we(a,t){a&1&&(r(0,"span",40),c(1,"No output"),i())}function Se(a,t){if(a&1&&(r(0,"div",35),h(1,be,5,0,"div",36),h(2,ye,5,1,"div",37),r(3,"div",37)(4,"span",38),c(5,"Output"),i(),h(6,Ee,2,1,"pre")(7,Te,2,0,"span",39)(8,we,2,0,"span",40),i()()),a&2){let e,n=l(2).$implicit,o=l(2);s(),g(o.showTechnical()&&(n.call.enrichmentPhases!=null&&n.call.enrichmentPhases.length)?1:-1),s(),g(n.call.args?2:-1),s(4),g((e=o.extractToolOutput(n.call))?6:n.call.response?8:7,e)}}function Me(a,t){if(a&1){let e=S();r(0,"div",30)(1,"button",31),f("click",function(){E(e);let o=l().$implicit,u=l(2);return T(u.toggleToolCall(o.call.requestId))}),r(2,"span",32),h(3,ue,1,0)(4,Ce,1,0)(5,ve,1,0),i(),r(6,"span",33),c(7),i(),r(8,"span",34),c(9),i()(),h(10,Se,9,3,"div",35),i()}if(a&2){let e=l().$implicit,n=l(2);M("case-chat__tool-call--pending",!e.call.response)("case-chat__tool-call--success",(e.call.response==null?null:e.call.response.success)===!0)("case-chat__tool-call--error",(e.call.response==null?null:e.call.response.success)===!1),s(),P("aria-expanded",n.isToolCallExpanded(e.call.requestId)),s(2),g(e.call.response?e.call.response.success?4:5:3),s(4),p(e.call.toolName),s(2),p(n.isToolCallExpanded(e.call.requestId)?"\u25BC":"\u25B6"),s(),g(n.isToolCallExpanded(e.call.requestId)?10:-1)}}function ke(a,t){if(a&1&&h(0,de,5,7,"div",14)(1,me,5,2,"div",15)(2,ge,3,5,"div",16)(3,Me,11,11,"div",17),a&2){let e=t.$implicit;g(e.kind==="message"?0:e.kind==="streaming"?1:e.kind==="technical"?2:3)}}function Oe(a,t){if(a&1&&I(0,ke,4,1,null,null,q().trackTimelineItem,!0),a&2){let e=l();R(e.timeline())}}function Pe(a,t){a&1&&(r(0,"div",5),A(1,"span",48)(2,"span",48)(3,"span",48),i())}function Ie(a,t){if(a&1){let e=S();r(0,"div",6)(1,"ds-icon-button",49),f("action",function(){E(e);let o=l();return T(o.onScrollToBottomClick())}),i()()}}function Re(a,t){if(a&1){let e=S();r(0,"ds-icon-button",50),f("action",function(){E(e);let o=l();return T(o.interrupt())}),i()}}function Ae(a,t){if(a&1){let e=S();r(0,"ds-icon-button",51),f("action",function(){E(e);let o=l();return T(o.submit())}),i()}if(a&2){let e=l();w("disabled",!e.canSend)}}var Ne=64,ae=class a{route=y(U);http=y(j);zone=y(L);destroyRef=y(D);domSanitizer=y(Q);config=y(J);caseId=this.route.snapshot.params.caseId;namespaceId=this.route.snapshot.params.namespaceId;markdownRenderer=this.buildMarkdownRenderer();agentDisplayName=k(()=>{let t=this.events();for(let e=t.length-1;e>=0;e--){let n=t[e];if(n){if(n.type==="AgentRunningEvent"||n.type==="AgentSelectedEvent"||n.type==="AgentFinishedEvent"){let o=n.agentName;if(o&&o.trim().length>0)return o}if(n.type==="MessageEvent"&&n.actor.role==="AGENT"&&n.actor.displayName)return n.actor.displayName}}return"Assistant"});eventSource=null;composerInput;messagesContainer;events=v([]);messageHtmlCache=new Map;inputValue=v("");isRunning=v(!1);isTerminal=v(!1);static SHOW_TECHNICAL_KEY="agentos.case-chat.showTechnical";showTechnical=v(localStorage.getItem(a.SHOW_TECHNICAL_KEY)==="true");streamingText=v("");collapsedTools=v(new Set);expandedTechnicals=v(new Set);isAtBottom=v(!0);scrollListenerCleanup=null;constructor(){O(()=>{this.isRunning()||this.isTerminal()||queueMicrotask(()=>this.composerInput?.nativeElement.focus())}),O(()=>{this.timeline(),this.streamingText(),this.isAtBottom()&&queueMicrotask(()=>this.scrollToBottom())}),H(()=>{this.attachScrollListener()})}baseTimeline=k(()=>{let t=this.events(),e=this.showTechnical(),n=new Map;for(let _ of t)if(_.type==="ToolRequestEvent"){let m=_,d=m.toolRequestId??_.id,b=n.get(d);n.set(d,{requestId:d,toolName:m.toolName??"unknown",args:m.args??null,response:b?.response,enrichmentPhases:m.enrichmentPhases??null})}else if(_.type==="ToolResponseEvent"){let m=_,d=m.toolRequestId??_.id,b=n.get(d);n.set(d,{requestId:d,toolName:b?.toolName??m.toolName??"unknown",args:b?.args??null,response:m,enrichmentPhases:b?.enrichmentPhases??null})}let o=[],u=new Set;for(let _ of t)if(_.type==="MessageEvent"){let m=_;o.push({kind:"message",event:m,html:this.messageHtmlCache.get(_.id)??""})}else if(_.type==="ToolRequestEvent"||_.type==="ToolResponseEvent"){let m=_.toolRequestId??_.id;u.has(m)||(u.add(m),o.push({kind:"tool",call:n.get(m)}))}else if(e){let m=this.toTechnicalItem(_);m&&o.push({kind:"technical",item:m,eventId:_.id})}return o});timeline=k(()=>{let t=this.baseTimeline(),e=this.streamingText();return e.trim().length===0?t:[...t,{kind:"streaming",text:e}]});trackTimelineItem(t,e){switch(e.kind){case"message":return e.event.id;case"tool":return e.call.requestId;case"technical":return e.eventId;case"streaming":return"streaming"}}get canSend(){return!!this.inputValue().trim()&&!this.isRunning()&&!this.isTerminal()}ngOnInit(){this.connectSse(),this.route.params.pipe(X(this.destroyRef)).subscribe(t=>{let e=t.caseId;e&&e!==this.caseId&&(this.caseId=e,this.reinitialise())})}ngOnDestroy(){this.eventSource?.close(),this.scrollListenerCleanup?.()}attachScrollListener(){let t=this.messagesContainer?.nativeElement;if(!t)return;let e=()=>{let n=t.scrollHeight-t.scrollTop-t.clientHeight;this.isAtBottom.set(n<=Ne)};t.addEventListener("scroll",e,{passive:!0}),this.scrollListenerCleanup=()=>t.removeEventListener("scroll",e)}scrollToBottom(){let t=this.messagesContainer?.nativeElement;t&&(t.scrollTop=t.scrollHeight)}onScrollToBottomClick(){this.isAtBottom.set(!0),this.scrollToBottom()}connectSse(){let t=`${this.config.basePath}/api/cases/${this.caseId}/events`;console.log("[AgentOS SSE] connecting",{url:t,basePath:this.config.basePath,caseId:this.caseId,namespaceId:this.namespaceId,now:new Date().toISOString()}),this.eventSource=this.zone.runOutsideAngular(()=>new EventSource(t));let e=o=>{let u=performance.now(),_=o.type,m=o.data;console.log("[AgentOS SSE] frame received",{sseEventName:_,dataLength:m?.length??0,dataPreview:m?.slice(0,120),receivedAtMs:u});try{let d=JSON.parse(m);this.zone.run(()=>{let b=this.events().length;if(d.type==="MessageEvent"){let C=d,x=this.extractText(C);this.messageHtmlCache.has(d.id)||this.messageHtmlCache.set(d.id,this.renderMarkdown(x))}this.events.update(C=>C.some(x=>x.id===d.id)?C:[...C,d]);let oe=this.events().length;if(console.log("[AgentOS SSE] event processed",{sseEventName:_,eventType:d.type,eventId:d.id,beforeLen:b,afterLen:oe,running:this.isRunning(),terminal:this.isTerminal()}),d.type==="TextChunkEvent"){let C=d.chunk;C&&this.streamingText.update(x=>x+C);return}if(d.type==="CaseStatusEvent"){let C=d.status,x=C==="KILLED"||C==="ERROR";if(this.isTerminal.set(x),x)this.isRunning.set(!1),this.eventSource?.close(),this.eventSource=null;else{let z=C==="RUNNING";this.isRunning.set(z),z||this.streamingText.set("")}return}if(d.type==="AgentFinishedEvent"){this.isRunning.set(!1),this.streamingText.set("");return}})}catch(d){console.warn("[AgentOS SSE] failed to parse event data",{sseEventName:_,error:d,dataPreview:m?.slice(0,500)})}},n=["MessageEvent","CaseStatusEvent","AgentSelectedEvent","AgentRunningEvent","AgentFinishedEvent","ThinkingEvent","TextChunkEvent","ToolRequestEvent","ToolResponseEvent","PendingConfirmationEvent","ConfirmationResolvedEvent","ErrorEvent","WarnEvent","IntentionGeneratedEvent"];for(let o of n)console.log("[AgentOS SSE] addEventListener",o),this.eventSource.addEventListener(o,e);this.eventSource.onopen=()=>{console.log("[AgentOS SSE] connection open",{readyState:this.eventSource?.readyState,at:new Date().toISOString()})},this.eventSource.onmessage=o=>{console.log("[AgentOS SSE] onmessage (unnamed event) received",{dataLength:o.data?.length??0,dataPreview:o.data?.slice(0,120)})},this.eventSource.onerror=o=>{console.warn("[AgentOS SSE] connection error",{err:o,readyState:this.eventSource?.readyState,at:new Date().toISOString()}),this.zone.run(()=>{this.isRunning.set(!1)})}}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}reinitialise(){this.eventSource?.close(),this.eventSource=null,this.events.set([]),this.messageHtmlCache.clear(),this.inputValue.set(""),this.isRunning.set(!1),this.isTerminal.set(!1),this.streamingText.set(""),this.collapsedTools.set(new Set),this.isAtBottom.set(!0),this.connectSse()}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.sendMessage(t)}sendMessage(t){this.isRunning.set(!0),this.streamingText.set(""),this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/messages`,{content:t,userId:"default-user"}).subscribe({error:e=>{console.error("[CaseChat] Failed to send message",e),this.isRunning.set(!1)}})}interrupt(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/interrupt`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to interrupt case",t)})}kill(){this.http.post(`${this.config.basePath}/api/cases/${this.caseId}/kill`,{}).subscribe({error:t=>console.error("[CaseChat] Failed to kill case",t)})}extractText(t){return t.content?.filter(e=>"content"in e).map(e=>e.content).join("")??""}extractToolOutput(t){if(!t.response)return null;let e=t.response.output;return e?e.content??null:null}toggleToolCall(t){this.collapsedTools.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isToolCallExpanded(t){return this.collapsedTools().has(t)}toggleShowTechnical(){this.showTechnical.update(t=>{let e=!t;return localStorage.setItem(a.SHOW_TECHNICAL_KEY,String(e)),e})}toggleTechnical(t){this.expandedTechnicals.update(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})}isTechnicalExpanded(t){return this.expandedTechnicals().has(t)}renderMarkdown(t){if(!t)return"";let e=ee.parse(t,{renderer:this.markdownRenderer,breaks:!0,gfm:!0,async:!1}),n=te.sanitize(e,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.domSanitizer.bypassSecurityTrustHtml(n)}buildMarkdownRenderer(){let t=new Z,e=t.link.bind(t);return t.link=n=>{let o=e(n);return this.isExternalLink(n.href)&&(o=o.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),o},t}isExternalLink(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(e){return!1}}toTechnicalItem(t){switch(t.type){case"WarnEvent":return{type:"WarnEvent",label:"\u26A0\uFE0F Warn",detail:t.message};case"ErrorEvent":return{type:"ErrorEvent",label:"\u274C Error",detail:t.message};case"CaseStatusEvent":return{type:"CaseStatusEvent",label:`\u{1F7E1} Status: ${t.status}`};case"AgentRunningEvent":return{type:"AgentRunningEvent",label:`\u25B6\uFE0F Agent running: ${t.agentName}`};case"AgentFinishedEvent":return{type:"AgentFinishedEvent",label:`\u2705 Agent finished: ${t.agentName}`};case"AgentSelectedEvent":return{type:"AgentSelectedEvent",label:`\u{1F3AF} Agent selected: ${t.agentName}`};case"IntentionGeneratedEvent":{let e=t;return{type:"IntentionGeneratedEvent",label:`\u{1F9E0} Intention \u2192 ${e.toolName}`,detail:e.intention}}default:return null}}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=V({type:a,selectors:[["agentos-case-chat"]],viewQuery:function(e,n){if(e&1&&B(ie,5)(re,5),e&2){let o;N(o=F())&&(n.composerInput=o.first),N(o=F())&&(n.messagesContainer=o.first)}},decls:15,vars:9,consts:[["messagesContainer",""],["composerInput",""],[1,"case-chat"],[1,"case-chat__messages"],[1,"case-chat__empty"],[1,"case-chat__thinking"],[1,"case-chat__scroll-anchor"],[1,"case-chat__composer"],["placeholder","Reply\u2026","rows","3",1,"case-chat__input",3,"input","keydown","value","disabled"],[1,"case-chat__actions"],["variant","default",3,"action","icon","title"],["icon","stop","variant","danger","title","Interrupt"],["icon","send","variant","primary","title","Send (Enter)",3,"disabled"],["icon","cancel","variant","danger","title","Kill",3,"action","disabled"],[1,"case-chat__message",3,"case-chat__message--user","case-chat__message--agent"],[1,"case-chat__message","case-chat__message--agent","case-chat__message--streaming"],[1,"case-chat__technical",3,"case-chat__technical--warn","case-chat__technical--error"],[1,"case-chat__tool-call",3,"case-chat__tool-call--pending","case-chat__tool-call--success","case-chat__tool-call--error"],[1,"case-chat__message"],[1,"case-chat__session-context"],[1,"case-chat__message-author"],[1,"case-chat__message-text","case-chat__message-text--markdown",3,"innerHTML"],[1,"case-chat__session-context-label"],[1,"case-chat__session-context-body"],[1,"case-chat__message-text"],[1,"case-chat__technical"],[1,"case-chat__technical-label"],["type","button",1,"case-chat__technical-header",3,"click"],[1,"case-chat__technical-chevron"],[1,"case-chat__technical-body"],[1,"case-chat__tool-call"],["type","button",1,"case-chat__tool-call-header",3,"click"],[1,"case-chat__tool-call-icon"],[1,"case-chat__tool-call-name"],[1,"case-chat__tool-call-chevron"],[1,"case-chat__tool-call-output"],[1,"case-chat__tool-call-section","case-chat__enrichment-section"],[1,"case-chat__tool-call-section"],[1,"case-chat__tool-call-label"],[1,"case-chat__tool-call-pending"],[1,"case-chat__tool-call-empty"],[1,"case-chat__enrichment-phase",3,"case-chat__enrichment-phase--failed"],[1,"case-chat__enrichment-phase"],[1,"case-chat__enrichment-phase-header"],[1,"case-chat__enrichment-phase-index"],[1,"case-chat__enrichment-phase-status"],[1,"case-chat__enrichment-phase-row"],[1,"case-chat__enrichment-phase-label"],[1,"thinking-dot"],["icon","keyboard_arrow_down","variant","default","title","Scroll to bottom",3,"action"],["icon","stop","variant","danger","title","Interrupt",3,"action"],["icon","send","variant","primary","title","Send (Enter)",3,"action","disabled"]],template:function(e,n){e&1&&(r(0,"div",2)(1,"div",3,0),h(3,ce,3,0,"div",4)(4,Oe,2,0),h(5,Pe,4,0,"div",5),i(),h(6,Ie,2,0,"div",6),r(7,"div",7)(8,"textarea",8,1),f("input",function(u){return n.onInput(u)})("keydown",function(u){return n.onKeydown(u)}),i(),r(10,"div",9)(11,"ds-icon-button",10),f("action",function(){return n.toggleShowTechnical()}),i(),h(12,Re,1,0,"ds-icon-button",11)(13,Ae,1,1,"ds-icon-button",12),r(14,"ds-icon-button",13),f("action",function(){return n.kill()}),i()()()()),e&2&&(s(3),g(n.timeline().length===0?3:4),s(2),g(n.isRunning()?5:-1),s(),g(n.isAtBottom()?-1:6),s(2),w("value",n.inputValue())("disabled",n.isRunning()||n.isTerminal()),s(3),w("icon",n.showTechnical()?"visibility_off":"bug_report")("title",n.showTechnical()?"Hide technical events":"Show technical events"),s(),g(n.isRunning()?12:13),s(2),w("disabled",n.isTerminal()))},dependencies:[ne,Y],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.case-chat[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;max-width:800px;width:100%;margin:0 auto;padding:1.5rem;gap:1rem;position:relative}.case-chat__messages[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:.75rem;padding-bottom:.5rem;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--color-border, rgba(0, 0, 0, .15)) transparent}.case-chat__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex:1}.case-chat__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-chat__tool-calls[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;margin-top:.25rem}.case-chat__tool-call[_ngcontent-%COMP%]{flex-shrink:0;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));font-size:.8rem;overflow:hidden;transition:border-color .2s ease}.case-chat__tool-call--pending[_ngcontent-%COMP%]{border-color:var(--color-warning, #f5a623);opacity:.8}.case-chat__tool-call--success[_ngcontent-%COMP%]{border-color:var(--color-success, #34c759)}.case-chat__tool-call--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.case-chat__tool-call-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.4rem;width:100%;padding:.4rem .6rem;background:transparent;border:none;cursor:pointer;text-align:left;color:var(--color-text, #1d1d1f);font-family:inherit;font-size:.8rem}.case-chat__tool-call-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__tool-call-icon[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem}.case-chat__tool-call-name[_ngcontent-%COMP%]{font-weight:600;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);color:var(--color-primary, #0071e3);flex-shrink:0}.case-chat__tool-call-args[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.case-chat__tool-call-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__tool-call-output[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));display:flex;flex-direction:column}.case-chat__tool-call-section[_ngcontent-%COMP%]{padding:.4rem .6rem .5rem}.case-chat__tool-call-section[_ngcontent-%COMP%] + .case-chat__tool-call-section[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__tool-call-section[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.25rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:200px;overflow-y:auto}.case-chat__tool-call-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-section[_ngcontent-%COMP%]{background:var(--color-surface-secondary, rgba(0, 0, 0, .02))}.case-chat__enrichment-phase[_ngcontent-%COMP%]{margin-top:.35rem;border-radius:4px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .6));overflow:hidden}.case-chat__enrichment-phase--failed[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:#ff3b300a}.case-chat__enrichment-phase-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.2rem .5rem;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-bottom:1px solid var(--color-border, rgba(0, 0, 0, .06))}.case-chat__enrichment-phase-index[_ngcontent-%COMP%]{font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__enrichment-phase-status[_ngcontent-%COMP%]{font-size:.7rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%]{padding:.25rem .5rem}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] + .case-chat__enrichment-phase-row[_ngcontent-%COMP%]{border-top:1px solid var(--color-border, rgba(0, 0, 0, .04))}.case-chat__enrichment-phase-row[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:.15rem 0 0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.7rem;color:var(--color-text, #1d1d1f);max-height:150px;overflow-y:auto}.case-chat__enrichment-phase-label[_ngcontent-%COMP%]{display:block;font-size:.6rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73)}.case-chat__tool-call-pending[_ngcontent-%COMP%], .case-chat__tool-call-empty[_ngcontent-%COMP%]{display:block;margin-top:.25rem;color:var(--color-text-secondary, #6e6e73);font-style:italic;font-size:.75rem}.case-chat__technical[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-border, rgba(0, 0, 0, .12));font-size:.78rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__technical--warn[_ngcontent-%COMP%]{border-left-color:var(--color-warning, #f5a623);background:#f5a6230f;color:var(--color-text, #1d1d1f)}.case-chat__technical--error[_ngcontent-%COMP%]{border-left-color:var(--color-error, #ff3b30);background:#ff3b300f;color:var(--color-text, #1d1d1f)}.case-chat__technical-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:.2rem .75rem;background:transparent;border:none;cursor:pointer;text-align:left;color:inherit;font-family:inherit;font-size:inherit}.case-chat__technical-header[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04))}.case-chat__technical-label[_ngcontent-%COMP%]{font-weight:500;white-space:nowrap}.case-chat__technical-label[_ngcontent-%COMP%]:only-child{display:block;padding:.2rem .75rem}.case-chat__technical-chevron[_ngcontent-%COMP%]{flex-shrink:0;font-size:.6rem;color:var(--color-text-secondary, #6e6e73);margin-left:auto}.case-chat__technical-body[_ngcontent-%COMP%]{padding:.3rem .75rem .5rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08));white-space:pre-wrap;word-break:break-word;font-size:.75rem;line-height:1.5;color:var(--color-text, #1d1d1f)}.case-chat__session-context[_ngcontent-%COMP%]{flex-shrink:0;border-radius:6px;background:var(--color-surface-secondary, rgba(0, 0, 0, .03));border-left:3px solid var(--color-primary, #0071e3);padding:.25rem .75rem .4rem;margin-bottom:.25rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);overflow:hidden}.case-chat__session-context-label[_ngcontent-%COMP%]{display:block;font-size:.65rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-primary, #0071e3);margin-bottom:.2rem}.case-chat__session-context-body[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-all;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;color:var(--color-text, #1d1d1f);max-height:160px;overflow-y:auto}.case-chat__message[_ngcontent-%COMP%]{flex-shrink:0}.case-chat__thinking[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:.3rem;padding:.75rem 1rem;align-self:flex-start}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .5em}.case-chat__message-text--markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.case-chat__message-text--markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:.25em 0 .5em;padding-left:1.4em}.case-chat__message-text--markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:.2em}.case-chat__message-text--markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.85em;background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:3px;padding:.1em .35em}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(0, 0, 0, .06));border-radius:6px;padding:.6em .8em;overflow-x:auto;margin:.4em 0}.case-chat__message-text--markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;padding:0;font-size:.8rem}.case-chat__message-text--markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{margin:.4em 0;padding-left:.8em;border-left:3px solid var(--color-border, rgba(0, 0, 0, .15));color:var(--color-text-secondary, #6e6e73)}.case-chat__message-text--markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #0071e3);text-decoration:underline}.case-chat__message-text--markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .case-chat__message-text--markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:.5em 0 .25em;font-size:1em;font-weight:600}.case-chat__message-text--markdown[_ngcontent-%COMP%] .external-link-icon[_ngcontent-%COMP%]{font-size:.75em;margin-left:.15em;vertical-align:super}.case-chat__message--streaming[_ngcontent-%COMP%]{opacity:.95}.case-chat__scroll-anchor[_ngcontent-%COMP%]{position:absolute;bottom:calc(2rem + 80px);left:50%;transform:translate(-50%);z-index:10;background:var(--glass-bg, rgba(255, 255, 255, .88));border:1px solid var(--glass-border, rgba(255, 255, 255, .3));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-radius:50%;box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .12));animation:_ngcontent-%COMP%_scroll-anchor-in .15s ease}.case-chat__composer[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:flex-end;gap:.5rem;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;padding:.5rem .5rem .5rem 1rem}.case-chat__input[_ngcontent-%COMP%]{flex:1;resize:none;padding:.5rem 0;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;min-height:40px}.case-chat__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-chat__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-chat__actions[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.thinking-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;background:var(--color-text-secondary, #6e6e73);animation:_ngcontent-%COMP%_thinking-bounce 1.2s ease-in-out infinite}.thinking-dot[_ngcontent-%COMP%]:nth-child(2){animation-delay:.2s}.thinking-dot[_ngcontent-%COMP%]:nth-child(3){animation-delay:.4s}@keyframes _ngcontent-%COMP%_thinking-bounce{0%,80%,to{transform:translateY(0);opacity:.4}40%{transform:translateY(-6px);opacity:1}}@keyframes _ngcontent-%COMP%_scroll-anchor-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}']})};export{ae as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-NR35GT4F.js";import"./chunk-BKNW4IOO.js";import"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-B4RKRLIY.js";export{a as LayoutComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as H}from"./chunk-TVJBPYTY.js";import"./chunk-T3IUNA6F.js";import"./chunk-UF5SWABD.js";import{b as D}from"./chunk-EBPDINXG.js";import{b as V,d as T,e as z}from"./chunk-4GVABYH4.js";import{a as M}from"./chunk-V363EHJE.js";import{F as U,b as L,c as $,e as I,g as B,h as G,i as W,l as d,n as j,s as q,w as J}from"./chunk-HZF57OLY.js";import{Bb as k,Db as b,Fb as m,Ka as g,Tb as r,Ub as w,Vb as N,Wa as A,a as S,b as E,ca as p,ga as v,ha as y,lb as u,ma as P,mb as C,pb as R,qb as F,rb as c,sb as i,ta as _,tb as t,ub as f,z as O}from"./chunk-B4RKRLIY.js";var Q=(o,n)=>n.config.id;function X(o,n){if(o&1&&(i(0,"a",5),r(1,"View resolved definition \u2192"),t()),o&2){let e=m();c("routerLink",e.inspectRoute())}}function Y(o,n){o&1&&(i(0,"p",6),r(1,"Loading\u2026"),t())}function Z(o,n){if(o&1&&(i(0,"span",33),r(1),t()),o&2){let e=m().$implicit;g(),w(e.config.integrationType)}}function ee(o,n){if(o&1&&f(0,"input",34),o&2){let e=m().$implicit;c("formControl",e.toolsControl)}}function ne(o,n){if(o&1){let e=k();i(0,"div",29)(1,"label",30)(2,"input",31),b("change",function(){let l=v(e).$implicit,s=m(3);return y(s.toggleIntegration(l))}),t(),i(3,"span",32),r(4),t(),u(5,Z,2,1,"span",33),t(),u(6,ee,1,1,"input",34),t()}if(o&2){let e=n.$implicit;g(2),c("checked",e.enabled()),g(2),w(e.config.name),g(),C(e.config.integrationType?5:-1),g(),C(e.enabled()?6:-1)}}function te(o,n){if(o&1&&(i(0,"fieldset",19)(1,"legend",27),r(2,"Integrations"),t(),i(3,"p",28),r(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),t(),R(5,ne,7,4,"div",29,Q),t()),o&2){let e=m(2);g(5),F(e.integrationRows())}}function oe(o,n){if(o&1){let e=k();i(0,"form",8),b("ngSubmit",function(){v(e);let l=m();return y(l.submit())}),i(1,"div",9)(2,"label",10),r(3,"Name "),i(4,"span",11),r(5,"*"),t()(),f(6,"input",12),t(),i(7,"div",9)(8,"label",13),r(9,"Description"),t(),f(10,"input",14),t(),i(11,"div",9)(12,"label",15),r(13,"Model name"),t(),f(14,"input",16),t(),i(15,"div",9)(16,"label",17),r(17,"Instructions"),t(),f(18,"textarea",18),t(),u(19,te,7,0,"fieldset",19),i(20,"div",9)(21,"label",20),f(22,"input",21),i(23,"span",22),r(24,"Advanced mode"),t()(),i(25,"p",23),r(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),t()(),i(27,"div",24)(28,"button",25),r(29),t(),i(30,"button",26),b("click",function(){v(e);let l=m();return y(l.cancel())}),r(31,"Cancel"),t()()()}if(o&2){let e=m();c("formGroup",e.form),g(6),c("formControl",e.nameControl),g(4),c("formControl",e.descriptionControl),g(4),c("formControl",e.modelNameControl),g(4),c("formControl",e.instructionsControl),g(),C(e.integrationRows().length>0?19:-1),g(3),c("formControl",e.advancedExecutionControl),g(6),c("disabled",e.form.invalid||e.isSubmitting()),g(),N(" ",e.isEditMode()?"Save changes":"Create"," ")}}var K=class o{route=p(V);router=p(T);destroyRef=p(P);agentConfigController=p(D);integrationConfigState=p(H);namespaceId=this.route.snapshot.params.namespaceId;form=new W({name:new d("",{nonNullable:!0,validators:[I.required,I.minLength(1)]}),description:new d(null),modelName:new d(null),instructions:new d(null),advancedExecution:new d(!1,{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}isEditMode=_(!1);isSubmitting=_(!1);isLoading=_(!1);inspectRoute(){let n=this.route.snapshot.paramMap.get("agentConfigId")??"";return["/agentos",this.namespaceId,"agent-configs",n,"inspect"]}integrationRows=_([]);existingConfig=null;ngOnInit(){let n=this.route.snapshot.paramMap.get("agentConfigId");n?(this.isEditMode.set(!0),this.loadConfigAndIntegrations(n)):this.loadIntegrations(void 0)}loadConfigAndIntegrations(n){this.isLoading.set(!0),O({config:this.agentConfigController.getByIdAgentConfig(n),namespaceIntegrations:this.integrationConfigState.loadNamespaceConfigs(this.namespaceId),platformIntegrations:this.integrationConfigState.loadPlatformConfigs()}).pipe(M(this.destroyRef)).subscribe({next:({config:e,namespaceIntegrations:a,platformIntegrations:l})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??!1);let s=[...l,...a];this.integrationRows.set(this.buildIntegrationRows(s,e.integrations??void 0)),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}loadIntegrations(n){O({namespaceIntegrations:this.integrationConfigState.loadNamespaceConfigs(this.namespaceId),platformIntegrations:this.integrationConfigState.loadPlatformConfigs()}).pipe(M(this.destroyRef)).subscribe({next:({namespaceIntegrations:e,platformIntegrations:a})=>{let l=[...a,...e];this.integrationRows.set(this.buildIntegrationRows(l,n??void 0))}})}buildIntegrationRows(n,e){return n.map(a=>{let l=a.name??"",s=e?.[l],x=e!=null&&l in e,h=Array.isArray(s)?s.join(", "):"";return{config:a,enabled:_(x),toolsControl:new d(h,{nonNullable:!0})}})}toggleIntegration(n){n.enabled.update(e=>!e)}buildIntegrationsPayload(){let e=this.integrationRows().filter(l=>l.enabled());if(e.length===0)return;let a={};for(let l of e){let s=l.config.name??"",x=l.toolsControl.value.trim();x===""?a[s]=null:a[s]=x.split(",").map(h=>h.trim()).filter(h=>h.length>0)}return a}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let n=E(S({},this.existingConfig??{}),{createdOn:this.existingConfig?.createdOn,updatedOn:this.existingConfig?.updatedOn,namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",n):this.agentConfigController.createAgentConfig(n)).pipe(M(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=A({type:o,selectors:[["agentos-agent-config-form"]],decls:11,vars:3,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__sibling-link",3,"routerLink"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__label"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),b("click",function(){return a.cancel()}),i(3,"span",3),r(4,"\u2190"),t(),r(5," Agent Configs "),t(),i(6,"h1",4),r(7),t(),u(8,X,2,1,"a",5),t(),u(9,Y,2,0,"p",6)(10,oe,32,9,"form",7),t()),e&2&&(g(7),w(a.isEditMode()?"Edit agent config":"New agent config"),g(),C(a.isEditMode()?8:-1),g(),C(a.isLoading()?9:10))},dependencies:[U,j,$,L,B,G,q,J,z],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.agent-config-form__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-primary, #007aff);text-decoration:none}.agent-config-form__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{K as AgentConfigFormComponent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as F}from"./chunk-TVJBPYTY.js";import{a as U}from"./chunk-AIC4U2MU.js";import{a as j}from"./chunk-26U7XARR.js";import"./chunk-T3IUNA6F.js";import"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import{b as G,d as K}from"./chunk-4GVABYH4.js";import{p as w,u as z}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as y}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as f,Db as d,Fb as s,Hc as B,Ka as p,Pb as q,S as M,Tb as g,Ub as b,Vb as T,Wa as I,ab as A,ac as N,ca as m,dc as V,ec as L,ga as c,ha as l,hc as k,jb as P,kc as $,lb as u,m as D,ma as E,mb as C,nc as h,oc as x,rb as O,sb as r,t as R,ta as v,tb as a}from"./chunk-B4RKRLIY.js";function Q(o,t){if(o&1){let e=f();r(0,"span",7),g(1,"Delete?"),a(),r(2,"ds-icon-button",8),d("action",function(){c(e);let i=s();return l(i.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",9),d("action",function(){c(e);let i=s();return l(i.onDeleteCancelled())}),a()}}function Z(o,t){if(o&1){let e=f();r(0,"ds-icon-button",11),d("action",function(){c(e);let i=s(2);return l(i.onEdit())}),a(),r(1,"ds-icon-button",12),d("action",function(){c(e);let i=s(2);return l(i.onDeleteArmed())}),a()}}function ee(o,t){if(o&1){let e=f();r(0,"ds-icon-button",10),d("action",function(){c(e);let i=s();return l(i.onDuplicate())}),a(),u(1,Z,2,0)}if(o&2){let e=s();p(),C(e.readOnly()?-1:1)}}var te=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration partag\xE9e plateforme",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),S=class o{config=x.required();scope=x.required();readOnly=x(!1);editRequested=h();deleteRequested=h();duplicateRequested=h();pendingDelete=v(!1);badge=$(()=>te[this.scope()]);onEdit(){this.editRequested.emit(this.config())}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteArmed(){this.pendingDelete.set(!0)}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),g(4),a(),r(5,"span",4),g(6),a()(),r(7,"span",5),g(8),a()(),r(9,"div",6),u(10,Q,4,0)(11,ee,2,1),a()()),e&2&&(p(4),b(n.config().name),p(),P("data-variant",n.badge().variant)("aria-label",n.badge().ariaLabel),p(),T(" ",n.badge().label," "),p(2),b(n.config().integrationType),p(2),C(n.pendingDelete()?10:11))},dependencies:[w],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;padding:.15rem .5rem;border-radius:999px;border:1px solid transparent;text-transform:uppercase;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary);border-color:var(--color-border)}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 12%,transparent);color:var(--color-info);border-color:color-mix(in srgb,var(--color-info) 30%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 12%,transparent);color:var(--color-warning);border-color:color-mix(in srgb,var(--color-warning) 30%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var ne=()=>[];function ie(o,t){if(o&1&&(r(0,"p",3),g(1),a()),o&2){let e=s().$implicit;p(),b(e.name)}}function oe(o,t){if(o&1){let e=f();r(0,"agentos-integration-config-item",5),d("editRequested",function(){let i=c(e),_=s(2);return l(_.onEdit(i))})("deleteRequested",function(){let i=c(e),_=s(2);return l(_.onDelete(i))})("duplicateRequested",function(){let i=c(e),_=s(2);return l(_.onDuplicate(i))}),a()}if(o&2){let e=t,n=s(2);O("config",e.config)("scope",e.scope)("readOnly",(e.scope==="namespace"||e.scope==="platform")&&!n.isAdmin())}}function re(o,t){if(o&1&&u(0,ie,2,1,"p",3)(1,oe,1,3,"agentos-integration-config-item",4),o&2){let e,n=t.$implicit,i=s();C(i.isEmptyPlaceholder(n.id)?0:(e=i.resolve(n.id))?1:-1,e)}}var W=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),X="__empty__",Y=class o{route=m(G);router=m(K);destroyRef=m(E);state=m(F);namespaceRole=m(j);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=v(!1);listItems$=this.state.vm$.pipe(R(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(y(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(R(t=>t.get("namespaceId")??""),M(t=>t?this.namespaceRole.isAdminOfNamespace$(t):D(!1)),y(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(y(this.destroyRef)).subscribe(t=>{let e=new Map;t.platform.forEach(n=>{n.id&&e.set(this.itemKey("platform",n.id),{config:n,scope:"platform"})}),t.namespace.forEach(n=>{n.id&&e.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),t.userOnNs.forEach(n=>{n.id&&e.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),t.userGlobal.forEach(n=>{n.id&&e.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(X)}resolve(t){return this.resolved.get(t)??null}itemKey(t,e){return`${t}:${e}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:U(this.isAdmin())}})}onEdit(t){let e=t.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(y(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${t.scope}:${e}:`,n)}})}onDuplicate(t){if(!t.config.id)return;let n=(t.scope==="namespace"||t.scope==="platform")&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,template:t.config.id,templateScope:t.scope}})}toListItems(t){let e=[];return e.push(...this.sectionItems("platform",t.platform)),e.push(...this.sectionItems("namespace",t.namespace)),e.push(...this.sectionItems("userOnNs",t.userOnNs)),e.push(...this.sectionItems("userGlobal",t.userGlobal)),e}sectionItems(t,e){return e.length===0?[{id:`${X}${t}`,name:"Aucune configuration",groupKey:t,groupLabel:W[t]}]:e.filter(n=>!!n.id).map(n=>({id:this.itemKey(t,n.id),name:n.name,description:n.integrationType,groupKey:t,groupLabel:W[t]}))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,n){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),d("createRequested",function(){return n.openCreateForm()}),r(2,"ds-icon-button",2),d("action",function(){return n.goBack()}),a()(),A(3,re,2,1,"ng-template",null,0,k)),e&2){let i=q(4);O("items",L(1,3,n.listItems$)??N(5,ne))("showCreate",!0)("itemTemplate",i)}},dependencies:[z,S,w,B],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{Y as IntegrationsAllScopesComponent};
|