@whoz-oss/coday-client 0.189.1 → 0.190.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/browser/{chunk-5762NHNY.js → chunk-26U7XARR.js} +1 -1
  2. package/browser/{chunk-UDWQTER7.js → chunk-37Z4RQMS.js} +1 -1
  3. package/browser/{chunk-J2QDMBPK.js → chunk-3IVR2HN6.js} +1 -1
  4. package/browser/{chunk-I2YRBSYX.js → chunk-3USYL5BG.js} +1 -1
  5. package/browser/chunk-5BDX24G5.js +1 -0
  6. package/browser/{chunk-666G3QUH.js → chunk-5DONQZON.js} +1 -1
  7. package/browser/{chunk-ZJZ2NPOZ.js → chunk-6ID3TABK.js} +1 -1
  8. package/browser/{chunk-LP4VWELB.js → chunk-7XZSS2EV.js} +1 -1
  9. package/browser/{chunk-D7BI5FXC.js → chunk-ADN4NBOA.js} +1 -1
  10. package/browser/{chunk-IMIVNR6U.js → chunk-B3LI4JXF.js} +1 -1
  11. package/browser/{chunk-UCMTVNTI.js → chunk-BKNW4IOO.js} +1 -1
  12. package/browser/{chunk-FVO7BWK6.js → chunk-BQMLTABP.js} +1 -1
  13. package/browser/chunk-EBPDINXG.js +1 -0
  14. package/browser/{chunk-FSEMXH4A.js → chunk-ECF4ASWE.js} +1 -1
  15. package/browser/{chunk-IS22BRTO.js → chunk-HIA7DOSV.js} +1 -1
  16. package/browser/{chunk-OP4PV2GE.js → chunk-IYL3P5IQ.js} +1 -1
  17. package/browser/{chunk-5ZEFYAQB.js → chunk-KOR36WEI.js} +1 -1
  18. package/browser/{chunk-HZTY4S7H.js → chunk-NR35GT4F.js} +1 -1
  19. package/browser/{chunk-Y7SWNFO3.js → chunk-OGI7MX2M.js} +1 -1
  20. package/browser/{chunk-6YSIHQTV.js → chunk-OSUSTGJD.js} +1 -1
  21. package/browser/{chunk-NYGA2DDC.js → chunk-OTANLRGJ.js} +1 -1
  22. package/browser/chunk-QTE5GMOI.js +1 -0
  23. package/browser/{chunk-LCVFELLT.js → chunk-R3V2KTBP.js} +1 -1
  24. package/browser/{chunk-4JP5RJ6I.js → chunk-SEVRZF2U.js} +1 -1
  25. package/browser/{chunk-7YX5U6SF.js → chunk-SFLR6TA7.js} +1 -1
  26. package/browser/{chunk-EEPCPEUC.js → chunk-SVB2BKSE.js} +1 -1
  27. package/browser/{chunk-22FO2RIC.js → chunk-TDB2ASJ5.js} +1 -1
  28. package/browser/chunk-TVJBPYTY.js +1 -0
  29. package/browser/{chunk-NWUWRXRV.js → chunk-UF5SWABD.js} +1 -1
  30. package/browser/{chunk-AEZXBHJT.js → chunk-UVOW2VIJ.js} +1 -1
  31. package/browser/chunk-UXMMRPAW.js +1 -0
  32. package/browser/chunk-V7RYUISE.js +1 -0
  33. package/browser/{chunk-6OLP2ALR.js → chunk-YHAKQS2P.js} +1 -1
  34. package/browser/index.html +1 -1
  35. package/browser/{main-JAM7ETZT.js → main-IFKRYXRT.js} +1 -1
  36. package/package.json +1 -1
  37. package/browser/chunk-5A2232QK.js +0 -1
  38. package/browser/chunk-6NNLFKXF.js +0 -1
  39. package/browser/chunk-LWT4QT5S.js +0 -1
  40. package/browser/chunk-QH5HGKT5.js +0 -1
  41. package/browser/chunk-VJVLGQZD.js +0 -1
  42. package/browser/chunk-ZHIEAQUL.js +0 -1
@@ -0,0 +1 @@
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 +1 @@
1
- import{c as L,d as z}from"./chunk-LWT4QT5S.js";import{b as F,d as v}from"./chunk-4GVABYH4.js";import{p as y,u as K,v as j}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as u,Db as s,Fb as l,Hc as $,Ka as p,Pb as T,S as P,Tb as f,Ub as I,Vb as E,Wa as g,ab as R,ac as O,ca as d,dc as B,ec as V,ga as m,ha as c,hc as q,i as A,lb as b,ma as k,mb as C,oa as N,rb as _,sb as a,t as w,ta as S,tb as r,u as D}from"./chunk-B4RKRLIY.js";function H(o,i){if(o&1){let e=u();a(0,"span",7),f(1,"Delete?"),r(),a(2,"ds-icon-button",8),s("action",function(){m(e);let t=l();return c(t.onDeleteConfirmed())}),r(),a(3,"ds-icon-button",9),s("action",function(){m(e);let t=l();return c(t.onDeleteCancelled())}),r()}}function J(o,i){if(o&1){let e=u();a(0,"ds-kebab-menu",10),s("itemSelected",function(t){m(e);let h=l();return c(h.onMenuAction(t))}),r()}if(o&2){let e=l();_("items",e.menuItems)}}var M=class o{router=d(v);model;namespaceId;deleteRequested=new N;pendingDelete=S(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model.alias??this.model.apiModelName}onMenuAction(i){switch(i){case"edit":this.router.navigate(["/agentos",this.namespaceId,"ai-models",this.model.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:"model",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-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,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),f(3),r(),a(4,"span",3),f(5),r(),a(6,"span",4)(7,"span"),f(8),r()()(),a(9,"div",5),b(10,H,4,0)(11,J,1,1,"ds-kebab-menu",6),r()()),e&2&&(p(3),I(n.displayTitle),p(2),I(n.model.apiModelName),p(3),E("priority: ",n.model.priority),p(2),C(n.pendingDelete()?10:11))},dependencies:[j,y],styles:[".ai-model-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}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-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 Q=()=>[];function X(o,i){if(o&1){let e=u();a(0,"agentos-ai-model-item",4),s("deleteRequested",function(t){m(e);let h=l(2);return c(h.deleteModel(t))}),r()}if(o&2){let e=l(2);_("model",i)("namespaceId",e.namespaceId)}}function Y(o,i){if(o&1&&b(0,X,1,2,"agentos-ai-model-item",3),o&2){let e,n=i.$implicit,t=l();C((e=t.resolveModel(n.id))?0:-1,e)}}var U=class o{route=d(F);router=d(v);destroyRef=d(k);aiModelController=d(L);aiProviderController=d(z);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new A(void 0);data$=this.refresh$.pipe(P(()=>D([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(w(([i,e])=>{let n=new Map(e.map(t=>[t.id??"",t.name]));return i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:n.get(t.aiProviderId)??t.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(x(this.destroyRef)).subscribe(([i])=>{this.modelsById=new Map(i.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(i){this.aiModelController.deleteAiModel(i.id??"").pipe(x(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(i){return this.modelsById.get(i)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId"],[3,"deleteRequested","model","namespaceId"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",1),B(1,"async"),s("createRequested",function(){return n.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),r()(),R(3,Y,1,1,"ng-template",null,0,q)),e&2){let t=T(4);_("items",V(1,3,n.modelItems$)??O(5,Q))("showCreate",!0)("itemTemplate",t)}},dependencies:[K,M,y,$],encapsulation:2,changeDetection:0})};export{U as NamespaceAiModelsComponent};
1
+ import{c as L,d as z}from"./chunk-EBPDINXG.js";import{b as F,d as v}from"./chunk-4GVABYH4.js";import{p as y,u as K,v as j}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as u,Db as s,Fb as l,Hc as $,Ka as p,Pb as T,S as P,Tb as f,Ub as I,Vb as E,Wa as g,ab as R,ac as O,ca as d,dc as B,ec as V,ga as m,ha as c,hc as q,i as A,lb as b,ma as k,mb as C,oa as N,rb as _,sb as a,t as w,ta as S,tb as r,u as D}from"./chunk-B4RKRLIY.js";function H(o,i){if(o&1){let e=u();a(0,"span",7),f(1,"Delete?"),r(),a(2,"ds-icon-button",8),s("action",function(){m(e);let t=l();return c(t.onDeleteConfirmed())}),r(),a(3,"ds-icon-button",9),s("action",function(){m(e);let t=l();return c(t.onDeleteCancelled())}),r()}}function J(o,i){if(o&1){let e=u();a(0,"ds-kebab-menu",10),s("itemSelected",function(t){m(e);let h=l();return c(h.onMenuAction(t))}),r()}if(o&2){let e=l();_("items",e.menuItems)}}var M=class o{router=d(v);model;namespaceId;deleteRequested=new N;pendingDelete=S(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model.alias??this.model.apiModelName}onMenuAction(i){switch(i){case"edit":this.router.navigate(["/agentos",this.namespaceId,"ai-models",this.model.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:"model",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-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,n){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),f(3),r(),a(4,"span",3),f(5),r(),a(6,"span",4)(7,"span"),f(8),r()()(),a(9,"div",5),b(10,H,4,0)(11,J,1,1,"ds-kebab-menu",6),r()()),e&2&&(p(3),I(n.displayTitle),p(2),I(n.model.apiModelName),p(3),E("priority: ",n.model.priority),p(2),C(n.pendingDelete()?10:11))},dependencies:[j,y],styles:[".ai-model-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}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-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 Q=()=>[];function X(o,i){if(o&1){let e=u();a(0,"agentos-ai-model-item",4),s("deleteRequested",function(t){m(e);let h=l(2);return c(h.deleteModel(t))}),r()}if(o&2){let e=l(2);_("model",i)("namespaceId",e.namespaceId)}}function Y(o,i){if(o&1&&b(0,X,1,2,"agentos-ai-model-item",3),o&2){let e,n=i.$implicit,t=l();C((e=t.resolveModel(n.id))?0:-1,e)}}var U=class o{route=d(F);router=d(v);destroyRef=d(k);aiModelController=d(L);aiProviderController=d(z);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new A(void 0);data$=this.refresh$.pipe(P(()=>D([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(w(([i,e])=>{let n=new Map(e.map(t=>[t.id??"",t.name]));return i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:n.get(t.aiProviderId)??t.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(x(this.destroyRef)).subscribe(([i])=>{this.modelsById=new Map(i.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(i){this.aiModelController.deleteAiModel(i.id??"").pipe(x(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(i){return this.modelsById.get(i)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=g({type:o,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:6,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId"],[3,"deleteRequested","model","namespaceId"]],template:function(e,n){if(e&1&&(a(0,"ds-entity-list",1),B(1,"async"),s("createRequested",function(){return n.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),r()(),R(3,Y,1,1,"ng-template",null,0,q)),e&2){let t=T(4);_("items",V(1,3,n.modelItems$)??O(5,Q))("showCreate",!0)("itemTemplate",t)}},dependencies:[K,M,y,$],encapsulation:2,changeDetection:0})};export{U as NamespaceAiModelsComponent};
@@ -1 +1 @@
1
- import{h as V}from"./chunk-LWT4QT5S.js";import{d as E}from"./chunk-4GVABYH4.js";import{u as D,v as O}from"./chunk-VDRETD5H.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as I,Db as l,Fb as o,Hc as A,Ka as _,Pb as k,S as w,Tb as y,Ub as h,Wa as f,ab as M,ac as T,ca as g,dc as P,ec as L,ga as r,ha as m,hc as S,i as R,lb as C,ma as q,mb as v,oa as c,rb as u,sb as p,t as x,tb as d}from"./chunk-B4RKRLIY.js";function K(s,t){if(s&1&&(p(0,"span",3),y(1),d()),s&2){let e=o();_(),h(e.namespace.description)}}var b=class s{namespace;selected=new c;editRequested=new c;integrationsRequested=new c;aiProvidersRequested=new c;aiModelsRequested=new c;agentConfigsRequested=new c;deleteRequested=new c;menuItems=[{key:"edit",label:"Edit namespace",icon:"edit"},{key:"integrations",label:"Manage integrations",icon:"settings"},{key:"ai-providers",label:"AI Providers",icon:"smart_toy"},{key:"ai-models",label:"AI models",icon:"model_training"},{key:"agent-configs",label:"Agent Configs",icon:"support_agent"},{key:"delete",label:"Delete namespace",icon:"delete",variant:"danger"}];onSelect(){this.selected.emit(this.namespace)}onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.namespace);break;case"integrations":this.integrationsRequested.emit(this.namespace);break;case"ai-providers":this.aiProvidersRequested.emit(this.namespace);break;case"ai-models":this.aiModelsRequested.emit(this.namespace);break;case"agent-configs":this.agentConfigsRequested.emit(this.namespace);break;case"delete":confirm(`Delete namespace "${this.namespace.name}"?`)&&this.deleteRequested.emit(this.namespace);break}}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-item"]],inputs:{namespace:"namespace"},outputs:{selected:"selected",editRequested:"editRequested",integrationsRequested:"integrationsRequested",aiProvidersRequested:"aiProvidersRequested",aiModelsRequested:"aiModelsRequested",agentConfigsRequested:"agentConfigsRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"namespace-item"],["type","button",1,"namespace-item__body",3,"click"],[1,"namespace-item__name"],[1,"namespace-item__desc"],[1,"namespace-item__actions"],[3,"itemSelected","items"]],template:function(e,a){e&1&&(p(0,"div",0)(1,"button",1),l("click",function(){return a.onSelect()}),p(2,"span",2),y(3),d(),C(4,K,2,1,"span",3),d(),p(5,"div",4)(6,"ds-kebab-menu",5),l("itemSelected",function(i){return a.onMenuAction(i)}),d()()()),e&2&&(_(3),h(a.namespace.name),_(),v(a.namespace.description?4:-1),_(2),u("items",a.menuItems))},dependencies:[O],styles:[".namespace-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1.25rem;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}.namespace-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.namespace-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;background:none;border:none;padding:0;cursor:pointer;text-align:left;min-width:0}.namespace-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__desc[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.namespace-item[_ngcontent-%COMP%]:hover .namespace-item__actions[_ngcontent-%COMP%], .namespace-item[_ngcontent-%COMP%]:focus-within .namespace-item__actions[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})};var j=()=>[];function z(s,t){if(s&1){let e=I();p(0,"agentos-namespace-item",3),l("selected",function(n){r(e);let i=o(2);return m(i.navigateToCases(n.id??""))})("editRequested",function(n){r(e);let i=o(2);return m(i.navigateToEdit(n))})("deleteRequested",function(n){r(e);let i=o(2);return m(i.deleteNamespace(n))})("integrationsRequested",function(n){r(e);let i=o(2);return m(i.openIntegrations(n))})("aiProvidersRequested",function(n){r(e);let i=o(2);return m(i.openAiProviders(n))})("aiModelsRequested",function(n){r(e);let i=o(2);return m(i.openAiModels(n))})("agentConfigsRequested",function(n){r(e);let i=o(2);return m(i.openAgentConfigs(n))}),d()}s&2&&u("namespace",t)}function U(s,t){if(s&1&&C(0,z,1,1,"agentos-namespace-item",2),s&2){let e,a=t.$implicit,n=o();v((e=n.resolveNamespace(a.id))?0:-1,e)}}var $=class s{router=g(E);namespaceController=g(V);destroyRef=g(q);refresh$=new R(void 0);namespaces$=this.refresh$.pipe(w(()=>this.namespaceController.listAllNamespace()));namespaceItems$=this.namespaces$.pipe(x(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description,badges:e.defaultAgentName?[{label:e.defaultAgentName,variant:"info"}]:void 0}))));namespacesById=new Map;constructor(){this.namespaces$.pipe(N(this.destroyRef)).subscribe(t=>{this.namespacesById=new Map(t.map(e=>[e.id??"",e]))})}navigateToCases(t){this.router.navigate(["/agentos",t,"cases"])}navigateToCreate(){this.router.navigate(["/agentos/namespaces/new"])}navigateToEdit(t){this.router.navigate(["/agentos/namespaces",t.id??"","edit"])}openIntegrations(t){this.router.navigate(["/agentos",t.id,"integrations"])}openAiProviders(t){this.router.navigate(["/agentos",t.id,"ai-providers"])}openAiModels(t){this.router.navigate(["/agentos",t.id,"ai-models"])}openAgentConfigs(t){this.router.navigate(["/agentos",t.id,"agent-configs"])}deleteNamespace(t){this.namespaceController.deleteNamespace(t.id??"").pipe(N(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveNamespace(t){return this.namespacesById.get(t)??null}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-list"]],decls:4,vars:6,consts:[["namespaceItemTpl",""],["title","Namespaces","emptyMessage","No namespaces yet. Create one to get started.","cardMinWidth","400px",3,"itemSelected","createRequested","items","showCreate","itemTemplate"],[3,"namespace"],[3,"selected","editRequested","deleteRequested","integrationsRequested","aiProvidersRequested","aiModelsRequested","agentConfigsRequested","namespace"]],template:function(e,a){if(e&1&&(p(0,"ds-entity-list",1),P(1,"async"),l("itemSelected",function(i){return a.navigateToCases(i)})("createRequested",function(){return a.navigateToCreate()}),d(),M(2,U,1,1,"ng-template",null,0,S)),e&2){let n=k(3);u("items",L(1,3,a.namespaceItems$)??T(5,j))("showCreate",!0)("itemTemplate",n)}},dependencies:[b,D,A],encapsulation:2})};export{b as a,$ as b};
1
+ import{h as V}from"./chunk-EBPDINXG.js";import{d as E}from"./chunk-4GVABYH4.js";import{u as D,v as O}from"./chunk-VDRETD5H.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as I,Db as l,Fb as o,Hc as A,Ka as _,Pb as k,S as w,Tb as y,Ub as h,Wa as f,ab as M,ac as T,ca as g,dc as P,ec as L,ga as r,ha as m,hc as S,i as R,lb as C,ma as q,mb as v,oa as c,rb as u,sb as p,t as x,tb as d}from"./chunk-B4RKRLIY.js";function K(s,t){if(s&1&&(p(0,"span",3),y(1),d()),s&2){let e=o();_(),h(e.namespace.description)}}var b=class s{namespace;selected=new c;editRequested=new c;integrationsRequested=new c;aiProvidersRequested=new c;aiModelsRequested=new c;agentConfigsRequested=new c;deleteRequested=new c;menuItems=[{key:"edit",label:"Edit namespace",icon:"edit"},{key:"integrations",label:"Manage integrations",icon:"settings"},{key:"ai-providers",label:"AI Providers",icon:"smart_toy"},{key:"ai-models",label:"AI models",icon:"model_training"},{key:"agent-configs",label:"Agent Configs",icon:"support_agent"},{key:"delete",label:"Delete namespace",icon:"delete",variant:"danger"}];onSelect(){this.selected.emit(this.namespace)}onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.namespace);break;case"integrations":this.integrationsRequested.emit(this.namespace);break;case"ai-providers":this.aiProvidersRequested.emit(this.namespace);break;case"ai-models":this.aiModelsRequested.emit(this.namespace);break;case"agent-configs":this.agentConfigsRequested.emit(this.namespace);break;case"delete":confirm(`Delete namespace "${this.namespace.name}"?`)&&this.deleteRequested.emit(this.namespace);break}}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-item"]],inputs:{namespace:"namespace"},outputs:{selected:"selected",editRequested:"editRequested",integrationsRequested:"integrationsRequested",aiProvidersRequested:"aiProvidersRequested",aiModelsRequested:"aiModelsRequested",agentConfigsRequested:"agentConfigsRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"namespace-item"],["type","button",1,"namespace-item__body",3,"click"],[1,"namespace-item__name"],[1,"namespace-item__desc"],[1,"namespace-item__actions"],[3,"itemSelected","items"]],template:function(e,a){e&1&&(p(0,"div",0)(1,"button",1),l("click",function(){return a.onSelect()}),p(2,"span",2),y(3),d(),C(4,K,2,1,"span",3),d(),p(5,"div",4)(6,"ds-kebab-menu",5),l("itemSelected",function(i){return a.onMenuAction(i)}),d()()()),e&2&&(_(3),h(a.namespace.name),_(),v(a.namespace.description?4:-1),_(2),u("items",a.menuItems))},dependencies:[O],styles:[".namespace-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1.25rem;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}.namespace-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.namespace-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;background:none;border:none;padding:0;cursor:pointer;text-align:left;min-width:0}.namespace-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__desc[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.namespace-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.namespace-item[_ngcontent-%COMP%]:hover .namespace-item__actions[_ngcontent-%COMP%], .namespace-item[_ngcontent-%COMP%]:focus-within .namespace-item__actions[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})};var j=()=>[];function z(s,t){if(s&1){let e=I();p(0,"agentos-namespace-item",3),l("selected",function(n){r(e);let i=o(2);return m(i.navigateToCases(n.id??""))})("editRequested",function(n){r(e);let i=o(2);return m(i.navigateToEdit(n))})("deleteRequested",function(n){r(e);let i=o(2);return m(i.deleteNamespace(n))})("integrationsRequested",function(n){r(e);let i=o(2);return m(i.openIntegrations(n))})("aiProvidersRequested",function(n){r(e);let i=o(2);return m(i.openAiProviders(n))})("aiModelsRequested",function(n){r(e);let i=o(2);return m(i.openAiModels(n))})("agentConfigsRequested",function(n){r(e);let i=o(2);return m(i.openAgentConfigs(n))}),d()}s&2&&u("namespace",t)}function U(s,t){if(s&1&&C(0,z,1,1,"agentos-namespace-item",2),s&2){let e,a=t.$implicit,n=o();v((e=n.resolveNamespace(a.id))?0:-1,e)}}var $=class s{router=g(E);namespaceController=g(V);destroyRef=g(q);refresh$=new R(void 0);namespaces$=this.refresh$.pipe(w(()=>this.namespaceController.listAllNamespace()));namespaceItems$=this.namespaces$.pipe(x(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description,badges:e.defaultAgentName?[{label:e.defaultAgentName,variant:"info"}]:void 0}))));namespacesById=new Map;constructor(){this.namespaces$.pipe(N(this.destroyRef)).subscribe(t=>{this.namespacesById=new Map(t.map(e=>[e.id??"",e]))})}navigateToCases(t){this.router.navigate(["/agentos",t,"cases"])}navigateToCreate(){this.router.navigate(["/agentos/namespaces/new"])}navigateToEdit(t){this.router.navigate(["/agentos/namespaces",t.id??"","edit"])}openIntegrations(t){this.router.navigate(["/agentos",t.id,"integrations"])}openAiProviders(t){this.router.navigate(["/agentos",t.id,"ai-providers"])}openAiModels(t){this.router.navigate(["/agentos",t.id,"ai-models"])}openAgentConfigs(t){this.router.navigate(["/agentos",t.id,"agent-configs"])}deleteNamespace(t){this.namespaceController.deleteNamespace(t.id??"").pipe(N(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveNamespace(t){return this.namespacesById.get(t)??null}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=f({type:s,selectors:[["agentos-namespace-list"]],decls:4,vars:6,consts:[["namespaceItemTpl",""],["title","Namespaces","emptyMessage","No namespaces yet. Create one to get started.","cardMinWidth","400px",3,"itemSelected","createRequested","items","showCreate","itemTemplate"],[3,"namespace"],[3,"selected","editRequested","deleteRequested","integrationsRequested","aiProvidersRequested","aiModelsRequested","agentConfigsRequested","namespace"]],template:function(e,a){if(e&1&&(p(0,"ds-entity-list",1),P(1,"async"),l("itemSelected",function(i){return a.navigateToCases(i)})("createRequested",function(){return a.navigateToCreate()}),d(),M(2,U,1,1,"ng-template",null,0,S)),e&2){let n=k(3);u("items",L(1,3,a.namespaceItems$)??T(5,j))("showCreate",!0)("itemTemplate",n)}},dependencies:[b,D,A],encapsulation:2})};export{b as a,$ as b};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-IS22BRTO.js";import"./chunk-LWT4QT5S.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
1
+ import{b as a}from"./chunk-HIA7DOSV.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
@@ -1 +1 @@
1
- import{b as Y}from"./chunk-UCMTVNTI.js";import{e as K}from"./chunk-LWT4QT5S.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-VDRETD5H.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
1
+ import{b as Y}from"./chunk-BKNW4IOO.js";import{e as K}from"./chunk-EBPDINXG.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-VDRETD5H.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as f,rb as _,sb as o,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class i{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(i,e){if(i&1){let t=h();o(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),o(1,"span",4),W(2),s()()}if(i&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class i{cases=[];activeCaseId=null;caseSelected=new f;createRequested=new f;closeRequested=new f;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(o(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),o(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);_("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:#ffffffb3}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function ie(i,e){if(i&1){let t=h();o(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class i{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=d({type:i,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(o(0,"div",0),S(1,"agentos-header",1),o(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),o(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),o(6,"div",6),P(7,ie,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),_("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
@@ -1 +1 @@
1
- import{b as m}from"./chunk-UCMTVNTI.js";import{c as l}from"./chunk-4GVABYH4.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-B4RKRLIY.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
1
+ import{b as m}from"./chunk-BKNW4IOO.js";import{c as l}from"./chunk-4GVABYH4.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-B4RKRLIY.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
@@ -1 +1 @@
1
- import{a as j}from"./chunk-AIC4U2MU.js";import{a as W}from"./chunk-J2QDMBPK.js";import{a as U}from"./chunk-5762NHNY.js";import"./chunk-T3IUNA6F.js";import"./chunk-NWUWRXRV.js";import"./chunk-LWT4QT5S.js";import{b as K,d as G}from"./chunk-4GVABYH4.js";import{p as I,u as z,v as F}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as C}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as f,Db as p,Fb as s,Hc as B,Ka as d,Pb as k,S as O,Tb as m,Ub as b,Vb as N,Wa as P,ab as E,ac as T,ca as u,dc as V,ec as L,ga as l,ha as c,hc as $,jb as q,kc as R,lb as v,m as M,ma as D,mb as g,nc as A,oc as x,rb as y,sb as r,t as S,ta as h,tb as a}from"./chunk-B4RKRLIY.js";function Z(n,t){if(n&1&&(r(0,"span",6),m(1),a()),n&2){let e=s();d(),b(e.config().baseUrl)}}function ee(n,t){if(n&1){let e=f();r(0,"span",8),m(1,"Delete?"),a(),r(2,"ds-icon-button",9),p("action",function(){l(e);let o=s();return c(o.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",10),p("action",function(){l(e);let o=s();return c(o.onDeleteCancelled())}),a()}}function te(n,t){if(n&1){let e=f();r(0,"ds-kebab-menu",13),p("itemSelected",function(o){l(e);let _=s(2);return c(_.onMenuAction(o))}),a()}if(n&2){let e=s(2);y("items",e.menuItems())}}function ie(n,t){if(n&1){let e=f();r(0,"ds-icon-button",11),p("action",function(){l(e);let o=s();return c(o.onDuplicate())}),a(),v(1,te,1,1,"ds-kebab-menu",12)}if(n&2){let e=s();d(),g(e.readOnly()?-1:1)}}var ne=Object.freeze({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"}}),w=class n{config=x.required();scope=x.required();readOnly=x(!1);editRequested=A();deleteRequested=A();duplicateRequested=A();pendingDelete=h(!1);badge=R(()=>ne[this.scope()]);menuItems=R(()=>[{key:"edit",label:"Edit provider",icon:"edit"},{key:"delete",label:"Delete provider",icon:"delete",variant:"danger"}]);onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.config());break;case"delete":this.pendingDelete.set(!0);break}}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-provider-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:13,vars:7,consts:[["role","listitem",1,"ai-provider-item"],[1,"ai-provider-item__body"],[1,"ai-provider-item__heading"],[1,"ai-provider-item__name"],[1,"ai-provider-item__badge"],[1,"ai-provider-item__type"],[1,"ai-provider-item__url"],[1,"ai-provider-item__actions"],[1,"ai-provider-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 provider",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),m(4),a(),r(5,"span",4),m(6),a()(),r(7,"span",5),m(8),a(),v(9,Z,2,1,"span",6),a(),r(10,"div",7),v(11,ee,4,0)(12,ie,2,1),a()()),e&2&&(d(4),b(i.config().name),d(),q("data-variant",i.badge().variant)("aria-label",i.badge().ariaLabel),d(),N(" ",i.badge().label," "),d(2),b(i.config().apiType),d(),g(i.config().baseUrl?9:-1),d(2),g(i.pendingDelete()?11:12))},dependencies:[F,I],styles:[".ai-provider-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}.ai-provider-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.ai-provider-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-provider-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.ai-provider-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ai-provider-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.ai-provider-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.ai-provider-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.ai-provider-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.ai-provider-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__url[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover .ai-provider-item__actions[_ngcontent-%COMP%], .ai-provider-item[_ngcontent-%COMP%]:focus-within .ai-provider-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-provider-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var oe=()=>[];function re(n,t){if(n&1&&(r(0,"p",3),m(1),a()),n&2){let e=s().$implicit;d(),b(e.name)}}function ae(n,t){if(n&1){let e=f();r(0,"agentos-ai-provider-item",5),p("editRequested",function(){let o=l(e),_=s(2);return c(_.onEdit(o))})("deleteRequested",function(){let o=l(e),_=s(2);return c(_.onDelete(o))})("duplicateRequested",function(){let o=l(e),_=s(2);return c(_.onDuplicate(o))}),a()}if(n&2){let e=t,i=s(2);y("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!i.isAdmin())}}function se(n,t){if(n&1&&v(0,re,2,1,"p",3)(1,ae,1,3,"agentos-ai-provider-item",4),n&2){let e,i=t.$implicit,o=s();g(o.isEmptyPlaceholder(i.id)?0:(e=o.resolve(i.id))?1:-1,e)}}var X=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),Y="__empty__",H=class n{route=u(K);router=u(G);destroyRef=u(D);state=u(W);namespaceRole=u(U);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(S(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(C(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(S(t=>t.get("namespaceId")??""),O(t=>t?this.namespaceRole.isAdminOfNamespace$(t):M(!1)),C(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(C(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(i=>{i.id&&e.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),t.userOnNs.forEach(i=>{i.id&&e.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),t.userGlobal.forEach(i=>{i.id&&e.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(Y)}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,"ai-providers","new"],{queryParams:{scope:j(this.isAdmin())}})}onEdit(t){let e=t.config.id;e&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(C(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${t.scope}:${e}:`,i)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:e,template:t.config.id,templateScope:t.scope}})}toListItems(t){let e=[];return 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:`${Y}${t}`,name:"Aucun AI Provider",groupKey:t,groupLabel:X[t]}]:e.filter(i=>!!i.id).map(i=>({id:this.itemKey(t,i.id),name:i.name,description:i.apiType,groupKey:t,groupLabel:X[t]}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,i){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),p("createRequested",function(){return i.openCreateForm()}),r(2,"ds-icon-button",2),p("action",function(){return i.goBack()}),a()(),E(3,se,2,1,"ng-template",null,0,$)),e&2){let o=k(4);y("items",L(1,3,i.listItems$)??T(5,oe))("showCreate",!0)("itemTemplate",o)}},dependencies:[z,w,I,B],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{H as AiProvidersAllScopesComponent};
1
+ import{a as j}from"./chunk-AIC4U2MU.js";import{a as W}from"./chunk-3IVR2HN6.js";import{a as U}from"./chunk-26U7XARR.js";import"./chunk-T3IUNA6F.js";import"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import{b as K,d as G}from"./chunk-4GVABYH4.js";import{p as I,u as z,v as F}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as C}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as f,Db as p,Fb as s,Hc as B,Ka as d,Pb as k,S as O,Tb as m,Ub as b,Vb as N,Wa as P,ab as E,ac as T,ca as u,dc as V,ec as L,ga as l,ha as c,hc as $,jb as q,kc as R,lb as v,m as M,ma as D,mb as g,nc as A,oc as x,rb as y,sb as r,t as S,ta as h,tb as a}from"./chunk-B4RKRLIY.js";function Z(n,t){if(n&1&&(r(0,"span",6),m(1),a()),n&2){let e=s();d(),b(e.config().baseUrl)}}function ee(n,t){if(n&1){let e=f();r(0,"span",8),m(1,"Delete?"),a(),r(2,"ds-icon-button",9),p("action",function(){l(e);let o=s();return c(o.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",10),p("action",function(){l(e);let o=s();return c(o.onDeleteCancelled())}),a()}}function te(n,t){if(n&1){let e=f();r(0,"ds-kebab-menu",13),p("itemSelected",function(o){l(e);let _=s(2);return c(_.onMenuAction(o))}),a()}if(n&2){let e=s(2);y("items",e.menuItems())}}function ie(n,t){if(n&1){let e=f();r(0,"ds-icon-button",11),p("action",function(){l(e);let o=s();return c(o.onDuplicate())}),a(),v(1,te,1,1,"ds-kebab-menu",12)}if(n&2){let e=s();d(),g(e.readOnly()?-1:1)}}var ne=Object.freeze({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"}}),w=class n{config=x.required();scope=x.required();readOnly=x(!1);editRequested=A();deleteRequested=A();duplicateRequested=A();pendingDelete=h(!1);badge=R(()=>ne[this.scope()]);menuItems=R(()=>[{key:"edit",label:"Edit provider",icon:"edit"},{key:"delete",label:"Delete provider",icon:"delete",variant:"danger"}]);onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.config());break;case"delete":this.pendingDelete.set(!0);break}}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-provider-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:13,vars:7,consts:[["role","listitem",1,"ai-provider-item"],[1,"ai-provider-item__body"],[1,"ai-provider-item__heading"],[1,"ai-provider-item__name"],[1,"ai-provider-item__badge"],[1,"ai-provider-item__type"],[1,"ai-provider-item__url"],[1,"ai-provider-item__actions"],[1,"ai-provider-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 provider",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),m(4),a(),r(5,"span",4),m(6),a()(),r(7,"span",5),m(8),a(),v(9,Z,2,1,"span",6),a(),r(10,"div",7),v(11,ee,4,0)(12,ie,2,1),a()()),e&2&&(d(4),b(i.config().name),d(),q("data-variant",i.badge().variant)("aria-label",i.badge().ariaLabel),d(),N(" ",i.badge().label," "),d(2),b(i.config().apiType),d(),g(i.config().baseUrl?9:-1),d(2),g(i.pendingDelete()?11:12))},dependencies:[F,I],styles:[".ai-provider-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}.ai-provider-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.ai-provider-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-provider-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.ai-provider-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ai-provider-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.ai-provider-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.ai-provider-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.ai-provider-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.ai-provider-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__url[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover .ai-provider-item__actions[_ngcontent-%COMP%], .ai-provider-item[_ngcontent-%COMP%]:focus-within .ai-provider-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-provider-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var oe=()=>[];function re(n,t){if(n&1&&(r(0,"p",3),m(1),a()),n&2){let e=s().$implicit;d(),b(e.name)}}function ae(n,t){if(n&1){let e=f();r(0,"agentos-ai-provider-item",5),p("editRequested",function(){let o=l(e),_=s(2);return c(_.onEdit(o))})("deleteRequested",function(){let o=l(e),_=s(2);return c(_.onDelete(o))})("duplicateRequested",function(){let o=l(e),_=s(2);return c(_.onDuplicate(o))}),a()}if(n&2){let e=t,i=s(2);y("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!i.isAdmin())}}function se(n,t){if(n&1&&v(0,re,2,1,"p",3)(1,ae,1,3,"agentos-ai-provider-item",4),n&2){let e,i=t.$implicit,o=s();g(o.isEmptyPlaceholder(i.id)?0:(e=o.resolve(i.id))?1:-1,e)}}var X=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),Y="__empty__",H=class n{route=u(K);router=u(G);destroyRef=u(D);state=u(W);namespaceRole=u(U);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(S(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(C(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(S(t=>t.get("namespaceId")??""),O(t=>t?this.namespaceRole.isAdminOfNamespace$(t):M(!1)),C(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(C(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(i=>{i.id&&e.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),t.userOnNs.forEach(i=>{i.id&&e.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),t.userGlobal.forEach(i=>{i.id&&e.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(Y)}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,"ai-providers","new"],{queryParams:{scope:j(this.isAdmin())}})}onEdit(t){let e=t.config.id;e&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(C(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${t.scope}:${e}:`,i)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:e,template:t.config.id,templateScope:t.scope}})}toListItems(t){let e=[];return 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:`${Y}${t}`,name:"Aucun AI Provider",groupKey:t,groupLabel:X[t]}]:e.filter(i=>!!i.id).map(i=>({id:this.itemKey(t,i.id),name:i.name,description:i.apiType,groupKey:t,groupLabel:X[t]}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,i){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),p("createRequested",function(){return i.openCreateForm()}),r(2,"ds-icon-button",2),p("action",function(){return i.goBack()}),a()(),E(3,se,2,1,"ng-template",null,0,$)),e&2){let o=k(4);y("items",L(1,3,i.listItems$)??T(5,oe))("showCreate",!0)("itemTemplate",o)}},dependencies:[z,w,I,B],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{H as AiProvidersAllScopesComponent};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-LWT4QT5S.js";import{b as w,d as M}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-VDRETD5H.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 #00000012;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
+ 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-VDRETD5H.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 #00000012;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 +1 @@
1
- import{a}from"./chunk-6YSIHQTV.js";import"./chunk-LWT4QT5S.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseHomeComponent};
1
+ import{a}from"./chunk-OSUSTGJD.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseHomeComponent};
@@ -0,0 +1 @@
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 +1 @@
1
- import{a}from"./chunk-EEPCPEUC.js";import"./chunk-IMIVNR6U.js";import"./chunk-NWUWRXRV.js";import"./chunk-LWT4QT5S.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-HZF57OLY.js";import"./chunk-B4RKRLIY.js";export{a as UserFormComponent};
1
+ import{a}from"./chunk-SVB2BKSE.js";import"./chunk-B3LI4JXF.js";import"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-V363EHJE.js";import"./chunk-HZF57OLY.js";import"./chunk-B4RKRLIY.js";export{a as UserFormComponent};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-AEZXBHJT.js";import"./chunk-IMIVNR6U.js";import"./chunk-LWT4QT5S.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as UserListComponent};
1
+ import{b as a}from"./chunk-UVOW2VIJ.js";import"./chunk-B3LI4JXF.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as UserListComponent};
@@ -1 +1 @@
1
- import{c as a}from"./chunk-5ZEFYAQB.js";import"./chunk-UCMTVNTI.js";import"./chunk-NWUWRXRV.js";import"./chunk-LWT4QT5S.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseShellComponent};
1
+ import{c as a}from"./chunk-KOR36WEI.js";import"./chunk-BKNW4IOO.js";import"./chunk-UF5SWABD.js";import"./chunk-EBPDINXG.js";import"./chunk-4GVABYH4.js";import"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseShellComponent};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-IMIVNR6U.js";import{a as T}from"./chunk-NWUWRXRV.js";import{b as I,d as w}from"./chunk-4GVABYH4.js";import{a as _}from"./chunk-V363EHJE.js";import{F as R,b as A,c as N,e as C,g as F,h as U,i as z,l as d,n as D,v as V,w as L}from"./chunk-HZF57OLY.js";import{Bb as P,Db as f,Fb as c,Ka as l,Tb as n,Ub as y,Vb as k,Wa as O,ca as u,ga as p,ha as g,lb as x,ma as E,mb as v,rb as h,sb as r,ta as b,tb as e,ub as m}from"./chunk-B4RKRLIY.js";function q(a,i){a&1&&(r(0,"p",5),n(1,"Loading\u2026"),e())}function $(a,i){if(a&1&&(r(0,"span",13),n(1),e()),a&2){let t=c(2);l(),y(t.form.controls.email.value)}}function j(a,i){a&1&&m(0,"input",14)}function H(a,i){if(a&1){let t=P();r(0,"form",7),f("ngSubmit",function(){p(t);let s=c();return g(s.save())}),r(1,"div",8)(2,"h2",9),n(3,"Identity"),e(),r(4,"div",10)(5,"label",11),n(6,"Email "),r(7,"span",12),n(8,"*"),e()(),x(9,$,2,1,"span",13)(10,j,1,0,"input",14),e(),r(11,"div",10)(12,"label",15),n(13,"External ID"),e(),m(14,"input",16),e()(),r(15,"div",8)(16,"h2",9),n(17,"Profile"),e(),r(18,"div",10)(19,"label",17),n(20,"First name"),e(),m(21,"input",18),e(),r(22,"div",10)(23,"label",19),n(24,"Last name"),e(),m(25,"input",20),e(),r(26,"div",21)(27,"label",22),n(28,"Bio"),e(),m(29,"textarea",23),e()(),r(30,"div",8)(31,"h2",9),n(32,"Permissions"),e(),r(33,"div",24),m(34,"input",25),r(35,"label",26),n(36," Super admin (full access to AgentOS) "),e()()(),r(37,"div",27)(38,"button",28),n(39),e(),r(40,"button",29),f("click",function(){p(t);let s=c();return g(s.cancel())}),n(41,"Cancel"),e()()()}if(a&2){let t=c();h("formGroup",t.form),l(9),v(t.isEditMode?9:10),l(29),h("disabled",t.form.invalid||t.isSaving()),l(),k(" ",t.isSaving()?"Saving\u2026":t.isEditMode?"Save changes":"Create user"," ")}}var B=class a{route=u(I);router=u(w);destroyRef=u(E);userAdminState=u(G);userState=u(T);userId=this.route.snapshot.params.userId;isEditMode=!!this.userId;isSaving=b(!1);isLoading=b(!1);form=new z({email:new d("",{nonNullable:!0,validators:[C.required,C.email]}),externalId:new d("",{nonNullable:!0}),firstname:new d("",{nonNullable:!0}),lastname:new d("",{nonNullable:!0}),bio:new d("",{nonNullable:!0}),isAdmin:new d(!1,{nonNullable:!0})});ngOnInit(){if(!this.isEditMode)return;let i=()=>{this.userState.currentUser()?.id===this.userId&&this.form.controls.isAdmin.disable()};this.userState.currentUser()?i():this.userState.loadMe().pipe(_(this.destroyRef)).subscribe({next:()=>i(),error:()=>this.form.controls.isAdmin.disable()});let t=this.userAdminState.users().find(o=>o.id===this.userId);if(t){this.syncForm(t),this.form.controls.email.disable();return}this.isLoading.set(!0),this.userAdminState.loadAll().pipe(_(this.destroyRef)).subscribe({next:()=>{let o=this.userAdminState.users().find(s=>s.id===this.userId);o&&(this.syncForm(o),this.form.controls.email.disable()),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}get title(){return this.isEditMode?"Edit user":"New user"}save(){if(this.form.invalid||this.isSaving())return;this.isSaving.set(!0);let{email:i,externalId:t,firstname:o,lastname:s,bio:S,isAdmin:M}=this.form.getRawValue();(this.isEditMode?this.userAdminState.updateUser(this.userId,{externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M}):this.userAdminState.createUser({email:i||void 0,externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M})).pipe(_(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSaving.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/admin/users"])}syncForm(i){this.form.setValue({email:i.email??"",externalId:i.externalId??"",firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",isAdmin:i.isAdmin??!1})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=O({type:a,selectors:[["agentos-user-form"]],decls:10,vars:2,consts:[[1,"user-form"],[1,"user-form__header"],["type","button","title","Back to users",1,"user-form__back",3,"click"],[1,"user-form__back-icon"],[1,"user-form__title"],[1,"user-form__loading"],[1,"user-form__body",3,"formGroup"],[1,"user-form__body",3,"ngSubmit","formGroup"],[1,"user-form__section"],[1,"user-form__section-title"],[1,"user-form__field"],["for","uf-email",1,"user-form__label"],[1,"user-form__required"],[1,"user-form__value","user-form__value--readonly"],["id","uf-email","type","email","placeholder","user@example.com","formControlName","email","autocomplete","email",1,"user-form__input"],["for","uf-externalId",1,"user-form__label"],["id","uf-externalId","type","text","placeholder","External identifier","formControlName","externalId",1,"user-form__input"],["for","uf-firstname",1,"user-form__label"],["id","uf-firstname","type","text","placeholder","First name","formControlName","firstname","autocomplete","given-name",1,"user-form__input"],["for","uf-lastname",1,"user-form__label"],["id","uf-lastname","type","text","placeholder","Last name","formControlName","lastname","autocomplete","family-name",1,"user-form__input"],[1,"user-form__field","user-form__field--bio"],["for","uf-bio",1,"user-form__label"],["id","uf-bio","placeholder","A short description","formControlName","bio","rows","4",1,"user-form__input","user-form__input--textarea"],[1,"user-form__field","user-form__field--checkbox"],["id","uf-isAdmin","type","checkbox","formControlName","isAdmin",1,"user-form__checkbox"],["for","uf-isAdmin",1,"user-form__label","user-form__label--checkbox"],[1,"user-form__actions"],["type","submit",1,"user-form__btn","user-form__btn--primary",3,"disabled"],["type","button",1,"user-form__btn",3,"click"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return o.cancel()}),r(3,"span",3),n(4,"\u2190"),e(),n(5," Users "),e(),r(6,"h1",4),n(7),e()(),x(8,q,2,0,"p",5)(9,H,42,4,"form",6),e()),t&2&&(l(7),y(o.title),l(),v(o.isLoading()?8:9))},dependencies:[R,D,N,A,F,U,L,V],styles:[".user-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-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}.user-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-form__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-form__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-form__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-form__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-form__field--bio[_ngcontent-%COMP%]{align-items:start}.user-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-form__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.user-form__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f)}.user-form__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-form__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-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-form__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-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}.user-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{B as a};
1
+ import{a as G}from"./chunk-B3LI4JXF.js";import{a as T}from"./chunk-UF5SWABD.js";import{b as I,d as w}from"./chunk-4GVABYH4.js";import{a as _}from"./chunk-V363EHJE.js";import{F as R,b as A,c as N,e as C,g as F,h as U,i as z,l as d,n as D,v as V,w as L}from"./chunk-HZF57OLY.js";import{Bb as P,Db as f,Fb as c,Ka as l,Tb as n,Ub as y,Vb as k,Wa as O,ca as u,ga as p,ha as g,lb as x,ma as E,mb as v,rb as h,sb as r,ta as b,tb as e,ub as m}from"./chunk-B4RKRLIY.js";function q(a,i){a&1&&(r(0,"p",5),n(1,"Loading\u2026"),e())}function $(a,i){if(a&1&&(r(0,"span",13),n(1),e()),a&2){let t=c(2);l(),y(t.form.controls.email.value)}}function j(a,i){a&1&&m(0,"input",14)}function H(a,i){if(a&1){let t=P();r(0,"form",7),f("ngSubmit",function(){p(t);let s=c();return g(s.save())}),r(1,"div",8)(2,"h2",9),n(3,"Identity"),e(),r(4,"div",10)(5,"label",11),n(6,"Email "),r(7,"span",12),n(8,"*"),e()(),x(9,$,2,1,"span",13)(10,j,1,0,"input",14),e(),r(11,"div",10)(12,"label",15),n(13,"External ID"),e(),m(14,"input",16),e()(),r(15,"div",8)(16,"h2",9),n(17,"Profile"),e(),r(18,"div",10)(19,"label",17),n(20,"First name"),e(),m(21,"input",18),e(),r(22,"div",10)(23,"label",19),n(24,"Last name"),e(),m(25,"input",20),e(),r(26,"div",21)(27,"label",22),n(28,"Bio"),e(),m(29,"textarea",23),e()(),r(30,"div",8)(31,"h2",9),n(32,"Permissions"),e(),r(33,"div",24),m(34,"input",25),r(35,"label",26),n(36," Super admin (full access to AgentOS) "),e()()(),r(37,"div",27)(38,"button",28),n(39),e(),r(40,"button",29),f("click",function(){p(t);let s=c();return g(s.cancel())}),n(41,"Cancel"),e()()()}if(a&2){let t=c();h("formGroup",t.form),l(9),v(t.isEditMode?9:10),l(29),h("disabled",t.form.invalid||t.isSaving()),l(),k(" ",t.isSaving()?"Saving\u2026":t.isEditMode?"Save changes":"Create user"," ")}}var B=class a{route=u(I);router=u(w);destroyRef=u(E);userAdminState=u(G);userState=u(T);userId=this.route.snapshot.params.userId;isEditMode=!!this.userId;isSaving=b(!1);isLoading=b(!1);form=new z({email:new d("",{nonNullable:!0,validators:[C.required,C.email]}),externalId:new d("",{nonNullable:!0}),firstname:new d("",{nonNullable:!0}),lastname:new d("",{nonNullable:!0}),bio:new d("",{nonNullable:!0}),isAdmin:new d(!1,{nonNullable:!0})});ngOnInit(){if(!this.isEditMode)return;let i=()=>{this.userState.currentUser()?.id===this.userId&&this.form.controls.isAdmin.disable()};this.userState.currentUser()?i():this.userState.loadMe().pipe(_(this.destroyRef)).subscribe({next:()=>i(),error:()=>this.form.controls.isAdmin.disable()});let t=this.userAdminState.users().find(o=>o.id===this.userId);if(t){this.syncForm(t),this.form.controls.email.disable();return}this.isLoading.set(!0),this.userAdminState.loadAll().pipe(_(this.destroyRef)).subscribe({next:()=>{let o=this.userAdminState.users().find(s=>s.id===this.userId);o&&(this.syncForm(o),this.form.controls.email.disable()),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}get title(){return this.isEditMode?"Edit user":"New user"}save(){if(this.form.invalid||this.isSaving())return;this.isSaving.set(!0);let{email:i,externalId:t,firstname:o,lastname:s,bio:S,isAdmin:M}=this.form.getRawValue();(this.isEditMode?this.userAdminState.updateUser(this.userId,{externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M}):this.userAdminState.createUser({email:i||void 0,externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M})).pipe(_(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSaving.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/admin/users"])}syncForm(i){this.form.setValue({email:i.email??"",externalId:i.externalId??"",firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",isAdmin:i.isAdmin??!1})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=O({type:a,selectors:[["agentos-user-form"]],decls:10,vars:2,consts:[[1,"user-form"],[1,"user-form__header"],["type","button","title","Back to users",1,"user-form__back",3,"click"],[1,"user-form__back-icon"],[1,"user-form__title"],[1,"user-form__loading"],[1,"user-form__body",3,"formGroup"],[1,"user-form__body",3,"ngSubmit","formGroup"],[1,"user-form__section"],[1,"user-form__section-title"],[1,"user-form__field"],["for","uf-email",1,"user-form__label"],[1,"user-form__required"],[1,"user-form__value","user-form__value--readonly"],["id","uf-email","type","email","placeholder","user@example.com","formControlName","email","autocomplete","email",1,"user-form__input"],["for","uf-externalId",1,"user-form__label"],["id","uf-externalId","type","text","placeholder","External identifier","formControlName","externalId",1,"user-form__input"],["for","uf-firstname",1,"user-form__label"],["id","uf-firstname","type","text","placeholder","First name","formControlName","firstname","autocomplete","given-name",1,"user-form__input"],["for","uf-lastname",1,"user-form__label"],["id","uf-lastname","type","text","placeholder","Last name","formControlName","lastname","autocomplete","family-name",1,"user-form__input"],[1,"user-form__field","user-form__field--bio"],["for","uf-bio",1,"user-form__label"],["id","uf-bio","placeholder","A short description","formControlName","bio","rows","4",1,"user-form__input","user-form__input--textarea"],[1,"user-form__field","user-form__field--checkbox"],["id","uf-isAdmin","type","checkbox","formControlName","isAdmin",1,"user-form__checkbox"],["for","uf-isAdmin",1,"user-form__label","user-form__label--checkbox"],[1,"user-form__actions"],["type","submit",1,"user-form__btn","user-form__btn--primary",3,"disabled"],["type","button",1,"user-form__btn",3,"click"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return o.cancel()}),r(3,"span",3),n(4,"\u2190"),e(),n(5," Users "),e(),r(6,"h1",4),n(7),e()(),x(8,q,2,0,"p",5)(9,H,42,4,"form",6),e()),t&2&&(l(7),y(o.title),l(),v(o.isLoading()?8:9))},dependencies:[R,D,N,A,F,U,L,V],styles:[".user-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-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}.user-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-form__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-form__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-form__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-form__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-form__field--bio[_ngcontent-%COMP%]{align-items:start}.user-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-form__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.user-form__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f)}.user-form__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-form__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-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-form__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-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}.user-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{B as a};