@whoz-oss/coday-client 0.199.0 → 0.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/browser/{chunk-P2XSTJQN.js → chunk-26ZOGUSU.js} +1 -1
  2. package/browser/chunk-3BV5H657.js +1 -0
  3. package/browser/chunk-3X444PL3.js +1 -0
  4. package/browser/{chunk-CL3ICOAL.js → chunk-4DI7XR3B.js} +1 -1
  5. package/browser/chunk-4JKXTQI2.js +1 -0
  6. package/browser/{chunk-UNM7FXGM.js → chunk-4KRYEFIY.js} +1 -1
  7. package/browser/chunk-4LFZCFTE.js +1 -0
  8. package/browser/{chunk-H5QMVJMP.js → chunk-52BSDRXI.js} +1 -1
  9. package/browser/{chunk-I4DIX2BH.js → chunk-5ODLPORR.js} +1 -1
  10. package/browser/chunk-6K5PHSHH.js +1 -0
  11. package/browser/{chunk-UXIUSXZT.js → chunk-6V7FXGUT.js} +1 -1
  12. package/browser/{chunk-ESOYLXDB.js → chunk-725OMYIO.js} +1 -1
  13. package/browser/chunk-CUZOUQER.js +1 -0
  14. package/browser/{chunk-72EDCCJQ.js → chunk-CWCTGW6W.js} +1 -1
  15. package/browser/{chunk-LGN67WP4.js → chunk-EOESCA2A.js} +1 -1
  16. package/browser/{chunk-J6KORXMO.js → chunk-EQ7GIQF4.js} +1 -1
  17. package/browser/{chunk-JL4IPJT5.js → chunk-EUWPAKBU.js} +1 -1
  18. package/browser/{chunk-NKNHWFYH.js → chunk-FBLKA2VP.js} +1 -1
  19. package/browser/chunk-G7O6FLX7.js +1 -0
  20. package/browser/chunk-GOLW67OY.js +1 -0
  21. package/browser/{chunk-KFTYMWZ4.js → chunk-IDIRSZFJ.js} +1 -1
  22. package/browser/chunk-INPPLYFX.js +1 -0
  23. package/browser/{chunk-DGE527NX.js → chunk-J753QAJ3.js} +1 -1
  24. package/browser/{chunk-OPMZ42FI.js → chunk-JQ4DU7CQ.js} +1 -1
  25. package/browser/{chunk-IMS2BEZA.js → chunk-KA57GNQ7.js} +1 -1
  26. package/browser/chunk-KFCY5AJ4.js +1 -0
  27. package/browser/{chunk-GS2XHWWW.js → chunk-L5PM6DDF.js} +1 -1
  28. package/browser/{chunk-ASYQJGDW.js → chunk-LPFJ4NAI.js} +1 -1
  29. package/browser/chunk-LUVHW52I.js +1 -0
  30. package/browser/chunk-NHDDTEX3.js +1 -0
  31. package/browser/chunk-OUCV2HPU.js +1 -0
  32. package/browser/{chunk-HMYJY2DG.js → chunk-OW2INFPT.js} +1 -1
  33. package/browser/{chunk-V43NZ7XP.js → chunk-PY5KASLV.js} +1 -1
  34. package/browser/{chunk-TFL7UOY7.js → chunk-QHGOKKRO.js} +1 -1
  35. package/browser/chunk-R7FQRQET.js +1 -0
  36. package/browser/chunk-RBXIFLSY.js +1 -0
  37. package/browser/{chunk-GJ6TA25Y.js → chunk-TXJ6RSOC.js} +1 -1
  38. package/browser/{chunk-K6BO32I7.js → chunk-V3T467QC.js} +1 -1
  39. package/browser/{chunk-XAAHUCLS.js → chunk-XCZAPW4H.js} +1 -1
  40. package/browser/{chunk-XZRCNGKM.js → chunk-XGB2S4QN.js} +1 -1
  41. package/browser/{chunk-IVKX5B6K.js → chunk-YH6R5XGB.js} +1 -1
  42. package/browser/{chunk-5AH4NMNL.js → chunk-YYNEOWKU.js} +1 -1
  43. package/browser/{chunk-JYA4K7VB.js → chunk-ZU46ZDGP.js} +1 -1
  44. package/browser/chunk-ZYBOOLP5.js +1 -0
  45. package/browser/index.html +1 -1
  46. package/browser/{main-5JK54GWM.js → main-GN7LMJM7.js} +1 -1
  47. package/package.json +1 -1
  48. package/browser/chunk-BUWF3ZQM.js +0 -1
  49. package/browser/chunk-IEIHNRZE.js +0 -1
  50. package/browser/chunk-J7ULM2BG.js +0 -1
  51. package/browser/chunk-JMHTBAFK.js +0 -1
  52. package/browser/chunk-MNRESS2L.js +0 -1
  53. package/browser/chunk-MVZDT2QU.js +0 -1
  54. package/browser/chunk-VGTKUVKV.js +0 -1
  55. package/browser/chunk-VOZI5GZY.js +0 -1
  56. package/browser/chunk-XLXMYPNG.js +0 -1
  57. package/browser/chunk-Y5A4URQQ.js +0 -1
@@ -0,0 +1 @@
1
+ import{Qc as Z,Rc as u,Sc as V,Tc as j,Z as A,a as b,aa as Q,b as f,ba as x,ca as O,da as z,g as K,pa as Y}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 Q("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 Z;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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,r,p,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new V({encoder:this.encoder});i=this.addToHttpParams(i,r,"withUserOverlay"),i=this.addToHttpParams(i,p,"namespaceId");let l=this.defaultHeaders,a=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);a!==void 0&&(l=l.set("Accept",a));let d=e?.context??new u,s=e?.transferCache??!0,c="json";a&&(a.startsWith("text")?c="text":this.configuration.isJsonMime(a)?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"})}/definition`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("get",`${h}${g}`,f(b({context:d,params:i,responseType:c},m?{withCredentials:m}:{}),{headers:l,observe:o,transferCache:s,reportProgress:t}))}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 u,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:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,r="body",p=!1,o){let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"withDisabled");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 u,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/agent-configs/platform",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listPlatformLevelAiModel(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 u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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}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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 M=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 u,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}`,f(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 u,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}`,f(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 U=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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 X=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(X||{});var S=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}listPlatformPrompt(){let{basePath:n,withCredentials:r}=this.configuration;return this.httpClient.get(`${n}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"PLATFORM"}},r?{withCredentials:r}:{}),{context:new u}))}listByNamespacePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"NAMESPACE",namespaceId:n}},p?{withCredentials:p}:{}),{context:new u}))}getByIdPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}createPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.post(`${r}/api/prompts`,n,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},p?{withCredentials:p}:{}),{context:new u}))}updatePrompt(n,r){let{basePath:p,withCredentials:o}=this.configuration;return this.httpClient.put(`${p}/api/prompts/${encodeURIComponent(n)}`,r,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},o?{withCredentials:o}:{}),{context:new u}))}deletePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.delete(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}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}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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 G=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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 F=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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 J=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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 W=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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 _=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 u,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:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{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 k=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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(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 D=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 u,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:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{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 u,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}`,f(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 u,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}`,f(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 u,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}`,f(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 u,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:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(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 ur(H){return z([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var L=class H{config=O(y);zone=O(Y);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new K(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,N as e,$ as f,M as g,U as h,J as i,W as j,k,X as l,ur as m,S as n};
@@ -1 +1 @@
1
- import{k as p}from"./chunk-BUWF3ZQM.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{k as p}from"./chunk-OUCV2HPU.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{h as I}from"./chunk-BUWF3ZQM.js";import{b as k,d as w}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as z,s as L,w as R}from"./chunk-HZF57OLY.js";import{Bb as O,Db as u,Fb as g,Ka as r,Tb as o,Ub as S,Vb as E,Wa as N,a as x,b as v,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=O();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"textarea",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),E(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(w);namespaceController=p(I);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=v(x({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),S(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,z,D,F,V,L,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
1
+ import{h as I}from"./chunk-OUCV2HPU.js";import{b as k,d as w}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as z,s as L,w as R}from"./chunk-HZF57OLY.js";import{Bb as O,Db as u,Fb as g,Ka as r,Tb as o,Ub as S,Vb as E,Wa as N,a as x,b as v,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=O();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"textarea",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),E(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(w);namespaceController=p(I);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=v(x({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),S(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,z,D,F,V,L,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-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}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-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}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
@@ -1 +1 @@
1
- import{a}from"./chunk-MNRESS2L.js";import"./chunk-SMT5YVCA.js";import"./chunk-BUWF3ZQM.js";import"./chunk-FPNEFWYN.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseChatComponent};
1
+ import{a}from"./chunk-GOLW67OY.js";import"./chunk-SMT5YVCA.js";import"./chunk-3BV5H657.js";import"./chunk-OUCV2HPU.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseHomeComponent};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-INPPLYFX.js";import{a as B}from"./chunk-ZYBOOLP5.js";import"./chunk-OUCV2HPU.js";import{b as T,d as M}from"./chunk-4GVABYH4.js";import{u as $}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as d}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as b,Db as a,Fb as m,Hc as S,Pb as I,S as _,Tb as x,Wa as h,ab as C,ac as N,ca as p,dc as R,ec as w,ga as f,ha as y,hc as k,i as l,lb as P,ma as g,mb as v,rb as s,sb as i,t as u,tb as c}from"./chunk-B4RKRLIY.js";var F=()=>[];function A(o,t){if(o&1){let e=b();i(0,"agentos-prompt-item",4),a("deleteRequested",function(n){f(e);let E=m(2);return y(E.deletePrompt(n))}),c()}if(o&2){let e=m(2);s("prompt",t)("namespaceId",e.namespaceId)}}function L(o,t){if(o&1&&P(0,A,1,2,"agentos-prompt-item",3),o&2){let e,r=t.$implicit,n=m();v((e=n.resolvePrompt(r.id))?0:-1,e)}}var q=class o{route=p(T);router=p(M);destroyRef=p(g);promptState=p(B);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new l(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptState.listByNamespace(this.namespaceId)));promptItems$=this.prompts$.pipe(u(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(t=>{this.promptsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"prompts","new"])}deletePrompt(t){this.promptState.delete(t.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(t){return this.promptsById.get(t)??null}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=h({type:o,selectors:[["agentos-namespace-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Prompts","emptyMessage","No prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-prompts__back",3,"click"],[3,"prompt","namespaceId"],[3,"deleteRequested","prompt","namespaceId"]],template:function(e,r){if(e&1&&(i(0,"ds-entity-list",1),R(1,"async"),a("createRequested",function(){return r.openCreateForm()}),i(2,"button",2),a("click",function(){return r.goBack()}),x(3,"\u2190 Namespaces"),c()(),C(4,L,1,1,"ng-template",null,0,k)),e&2){let n=I(5);s("items",w(1,3,r.promptItems$)??N(5,F))("showCreate",!0)("itemTemplate",n)}},dependencies:[$,D,S],styles:[".namespace-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as NamespacePromptsComponent};
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-4LFZCFTE.js";import"./chunk-3BV5H657.js";import"./chunk-4KRYEFIY.js";import"./chunk-FBLKA2VP.js";import"./chunk-OUCV2HPU.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseShellComponent};
@@ -1 +1 @@
1
- import{b as m}from"./chunk-UNM7FXGM.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-4KRYEFIY.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{c as z,d as B}from"./chunk-BUWF3ZQM.js";import{b as D,d as L}from"./chunk-4GVABYH4.js";import{a as y,c as R}from"./chunk-V363EHJE.js";import{A as Y,B as Z,F as ee,c as G,e as g,g as $,h as q,i as j,l as s,n as U,o as H,s as J,w as K,x as Q,y as W,z as X}from"./chunk-HZF57OLY.js";import{Bb as w,D as k,Db as _,Fb as p,Ka as a,Tb as r,Ub as N,Vb as V,Wa as A,Wb as T,a as x,b as M,ca as c,ga as v,ha as b,kb as I,kc as F,lb as C,m as P,ma as S,mb as h,pb as E,qb as O,rb as l,sb as i,ta as u,tb as o,ub as m}from"./chunk-B4RKRLIY.js";function te(n,t){n&1&&(i(0,"p",5),r(1,"Loading\u2026"),o())}function ie(n,t){if(n&1&&m(0,"input",11),n&2){let e=p(2);l("value",e.selectedProviderLabel())}}function re(n,t){if(n&1&&(i(0,"option",30),r(1),o()),n&2){let e=t.$implicit;l("value",e.id),a(),T("",e.name," (",e.apiType,")")}}function ne(n,t){if(n&1&&(i(0,"select",12)(1,"option",29),r(2,"Select provider"),o(),E(3,re,2,3,"option",30,I().trackByProvider,!0),o()),n&2){let e=p(2);l("formControl",e.aiProviderIdControl),a(3),O(e.providers())}}function ae(n,t){if(n&1){let e=w();i(0,"form",7),_("ngSubmit",function(){v(e);let f=p();return b(f.submit())}),i(1,"div",8)(2,"label",9),r(3," Provider "),i(4,"span",10),r(5,"*"),o()(),C(6,ie,1,1,"input",11)(7,ne,5,1,"select",12),o(),i(8,"div",8)(9,"label",13),r(10," API name "),i(11,"span",10),r(12,"*"),o()(),m(13,"input",14),o(),i(14,"div",8)(15,"label",15),r(16,"Description"),o(),m(17,"input",16),o(),i(18,"div",8)(19,"label",17),r(20,"Alias"),o(),m(21,"input",18),o(),i(22,"div",8)(23,"label",19),r(24,"Priority"),o(),m(25,"input",20),o(),i(26,"div",21)(27,"div",8)(28,"label",22),r(29,"Temperature"),o(),m(30,"input",23),o(),i(31,"div",8)(32,"label",24),r(33,"Max tokens"),o(),m(34,"input",25),o()(),i(35,"div",26)(36,"button",27),r(37),o(),i(38,"button",28),_("click",function(){v(e);let f=p();return b(f.cancel())}),r(39,"Cancel"),o()()()}if(n&2){let e=p();l("formGroup",e.form),a(6),h(e.isEditMode()?6:7),a(7),l("formControl",e.apiModelNameControl),a(4),l("formControl",e.descriptionControl),a(4),l("formControl",e.aliasControl),a(4),l("formControl",e.priorityControl),a(5),l("formControl",e.temperatureControl),a(4),l("formControl",e.maxTokensControl),a(2),l("disabled",e.form.invalid||e.isSubmitting()),a(),V(" ",e.isEditMode()?"Save changes":"Create"," ")}}var oe=class n{route=c(D);router=c(L);destroyRef=c(S);aiModelController=c(z);aiProviderController=c(B);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=R(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(k(()=>P([]))),{initialValue:[]});form=new j({aiProviderId:new s("",{nonNullable:!0,validators:[g.required]}),apiModelName:new s("",{nonNullable:!0,validators:[g.required,g.minLength(1)]}),description:new s(null),alias:new s("",{nonNullable:!0}),priority:new s(0,{nonNullable:!0}),temperature:new s(null),maxTokens:new s(null)});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get maxTokensControl(){return this.form.controls.maxTokens}isEditMode=u(!1);isSubmitting=u(!1);isLoading=u(!1);selectedProviderLabel=F(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(d=>d.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(!0),this.loadModel(t))}loadModel(t){this.isLoading.set(!0),this.aiModelController.getByIdAiModel(t).pipe(y(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.maxTokensControl.setValue(e.maxTokens??null),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=this.form.getRawValue(),e=M(x({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,maxTokens:t.maxTokens??void 0});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",e):this.aiModelController.createAiModel(e)).pipe(y(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"])}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-max-tokens",1,"ai-model-form__label"],["id","model-max-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,d){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),_("click",function(){return d.cancel()}),i(3,"span",3),r(4,"\u2190"),o(),r(5," AI models "),o(),i(6,"h1",4),r(7),o()(),C(8,te,2,0,"p",5)(9,ae,40,10,"form",6),o()),e&2&&(a(7),N(d.isEditMode()?"Edit AI model":"New AI model"),a(),h(d.isLoading()?8:9))},dependencies:[ee,U,W,X,G,H,Q,$,q,Z,Y,J,K],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-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}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-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}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{oe as AiModelFormComponent};
1
+ import{c as z,d as B}from"./chunk-OUCV2HPU.js";import{b as D,d as L}from"./chunk-4GVABYH4.js";import{a as y,c as R}from"./chunk-V363EHJE.js";import{A as Y,B as Z,F as ee,c as G,e as g,g as $,h as q,i as j,l as s,n as U,o as H,s as J,w as K,x as Q,y as W,z as X}from"./chunk-HZF57OLY.js";import{Bb as w,D as k,Db as _,Fb as p,Ka as a,Tb as r,Ub as N,Vb as V,Wa as A,Wb as T,a as x,b as M,ca as c,ga as v,ha as b,kb as I,kc as F,lb as C,m as P,ma as S,mb as h,pb as E,qb as O,rb as l,sb as i,ta as u,tb as o,ub as m}from"./chunk-B4RKRLIY.js";function te(n,t){n&1&&(i(0,"p",5),r(1,"Loading\u2026"),o())}function ie(n,t){if(n&1&&m(0,"input",11),n&2){let e=p(2);l("value",e.selectedProviderLabel())}}function re(n,t){if(n&1&&(i(0,"option",30),r(1),o()),n&2){let e=t.$implicit;l("value",e.id),a(),T("",e.name," (",e.apiType,")")}}function ne(n,t){if(n&1&&(i(0,"select",12)(1,"option",29),r(2,"Select provider"),o(),E(3,re,2,3,"option",30,I().trackByProvider,!0),o()),n&2){let e=p(2);l("formControl",e.aiProviderIdControl),a(3),O(e.providers())}}function ae(n,t){if(n&1){let e=w();i(0,"form",7),_("ngSubmit",function(){v(e);let f=p();return b(f.submit())}),i(1,"div",8)(2,"label",9),r(3," Provider "),i(4,"span",10),r(5,"*"),o()(),C(6,ie,1,1,"input",11)(7,ne,5,1,"select",12),o(),i(8,"div",8)(9,"label",13),r(10," API name "),i(11,"span",10),r(12,"*"),o()(),m(13,"input",14),o(),i(14,"div",8)(15,"label",15),r(16,"Description"),o(),m(17,"input",16),o(),i(18,"div",8)(19,"label",17),r(20,"Alias"),o(),m(21,"input",18),o(),i(22,"div",8)(23,"label",19),r(24,"Priority"),o(),m(25,"input",20),o(),i(26,"div",21)(27,"div",8)(28,"label",22),r(29,"Temperature"),o(),m(30,"input",23),o(),i(31,"div",8)(32,"label",24),r(33,"Max tokens"),o(),m(34,"input",25),o()(),i(35,"div",26)(36,"button",27),r(37),o(),i(38,"button",28),_("click",function(){v(e);let f=p();return b(f.cancel())}),r(39,"Cancel"),o()()()}if(n&2){let e=p();l("formGroup",e.form),a(6),h(e.isEditMode()?6:7),a(7),l("formControl",e.apiModelNameControl),a(4),l("formControl",e.descriptionControl),a(4),l("formControl",e.aliasControl),a(4),l("formControl",e.priorityControl),a(5),l("formControl",e.temperatureControl),a(4),l("formControl",e.maxTokensControl),a(2),l("disabled",e.form.invalid||e.isSubmitting()),a(),V(" ",e.isEditMode()?"Save changes":"Create"," ")}}var oe=class n{route=c(D);router=c(L);destroyRef=c(S);aiModelController=c(z);aiProviderController=c(B);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=R(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(k(()=>P([]))),{initialValue:[]});form=new j({aiProviderId:new s("",{nonNullable:!0,validators:[g.required]}),apiModelName:new s("",{nonNullable:!0,validators:[g.required,g.minLength(1)]}),description:new s(null),alias:new s("",{nonNullable:!0}),priority:new s(0,{nonNullable:!0}),temperature:new s(null),maxTokens:new s(null)});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get maxTokensControl(){return this.form.controls.maxTokens}isEditMode=u(!1);isSubmitting=u(!1);isLoading=u(!1);selectedProviderLabel=F(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(d=>d.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(!0),this.loadModel(t))}loadModel(t){this.isLoading.set(!0),this.aiModelController.getByIdAiModel(t).pipe(y(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.maxTokensControl.setValue(e.maxTokens??null),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=this.form.getRawValue(),e=M(x({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,maxTokens:t.maxTokens??void 0});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",e):this.aiModelController.createAiModel(e)).pipe(y(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"])}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=A({type:n,selectors:[["agentos-ai-model-form"]],decls:10,vars:2,consts:[[1,"ai-model-form"],[1,"ai-model-form__header"],["type","button","title","Back to AI models",1,"ai-model-form__back",3,"click"],[1,"ai-model-form__back-icon"],[1,"ai-model-form__title"],[1,"ai-model-form__loading"],[1,"ai-model-form__form",3,"formGroup"],[1,"ai-model-form__form",3,"ngSubmit","formGroup"],[1,"ai-model-form__field"],["for","model-provider",1,"ai-model-form__label"],["aria-hidden","true"],["id","model-provider","type","text","readonly","","tabindex","-1",1,"ai-model-form__input","ai-model-form__input--readonly",3,"value"],["id","model-provider",1,"ai-model-form__select",3,"formControl"],["for","model-api-name",1,"ai-model-form__label"],["id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",1,"ai-model-form__input","ai-model-form__input--mono",3,"formControl"],["for","model-description",1,"ai-model-form__label"],["id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-alias",1,"ai-model-form__label"],["id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",1,"ai-model-form__input",3,"formControl"],["for","model-priority",1,"ai-model-form__label"],["id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__row"],["for","model-temperature",1,"ai-model-form__label"],["id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",1,"ai-model-form__input",3,"formControl"],["for","model-max-tokens",1,"ai-model-form__label"],["id","model-max-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",1,"ai-model-form__input",3,"formControl"],[1,"ai-model-form__actions"],["type","submit",1,"ai-model-form__btn","ai-model-form__btn--primary",3,"disabled"],["type","button",1,"ai-model-form__btn",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,d){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),_("click",function(){return d.cancel()}),i(3,"span",3),r(4,"\u2190"),o(),r(5," AI models "),o(),i(6,"h1",4),r(7),o()(),C(8,te,2,0,"p",5)(9,ae,40,10,"form",6),o()),e&2&&(a(7),N(d.isEditMode()?"Edit AI model":"New AI model"),a(),h(d.isLoading()?8:9))},dependencies:[ee,U,W,X,G,H,Q,$,q,Z,Y,J,K],styles:[".ai-model-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-model-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-model-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}.ai-model-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-model-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-model-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.ai-model-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.ai-model-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-model-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ai-model-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-model-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.ai-model-form__input[_ngcontent-%COMP%], .ai-model-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-model-form__input[_ngcontent-%COMP%]:focus, .ai-model-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.ai-model-form__input[_ngcontent-%COMP%]::placeholder, .ai-model-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.ai-model-form__input--mono[_ngcontent-%COMP%]{font-family:monospace}.ai-model-form__input--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);cursor:default;background:var(--color-surface-muted, rgba(0, 0, 0, .03))}.ai-model-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-model-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}.ai-model-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-model-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-model-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.ai-model-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{oe as AiModelFormComponent};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-UXIUSXZT.js";import{a as J}from"./chunk-CL3ICOAL.js";import"./chunk-T3IUNA6F.js";import{c as j}from"./chunk-QPBFAKWK.js";import{c as H}from"./chunk-SMT5YVCA.js";import{a as Y}from"./chunk-NKNHWFYH.js";import"./chunk-BUWF3ZQM.js";import{d as F}from"./chunk-4GVABYH4.js";import{a as w,c as G}from"./chunk-V363EHJE.js";import{F as A,c as K,g as z,h as N,i as $,l as k,n as R,v as B,w as L}from"./chunk-HZF57OLY.js";import{Bb as v,Db as c,Dc as I,Fb as s,Ka as d,Rb as S,Tb as i,Ub as u,Vb as h,Wa as V,ca as f,ga as p,ha as m,jb as E,kb as M,lb as g,ma as D,mb as C,pb as b,qb as y,rb as O,sb as n,t as U,ta as x,tb as t,u as T,ub as P}from"./chunk-B4RKRLIY.js";var Q=(o,r)=>r.value;function X(o,r){o&1&&(n(0,"p",5),i(1,"Loading\u2026"),t())}function Z(o,r){if(o&1){let e=v();n(0,"button",17),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setTheme(a.value))}),i(1),t()}if(o&2){let e=r.$implicit,l=s(2);S("user-profile__segmented-option--active",l.theme()===e.value),E("aria-pressed",l.theme()===e.value),d(),h(" ",e.label," ")}}function ee(o,r){if(o&1){let e=v();n(0,"button",17),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setEnterKeyBehavior(a.value))}),i(1),t()}if(o&2){let e=r.$implicit,l=s(2);S("user-profile__segmented-option--active",l.enterKeyBehavior()===e.value),E("aria-pressed",l.enterKeyBehavior()===e.value),d(),h(" ",e.label," ")}}function te(o,r){if(o&1){let e=v();n(0,"form",18),c("ngSubmit",function(){p(e);let a=s(2);return m(a.save())}),n(1,"div",6)(2,"h2",7),i(3,"Identity"),t(),n(4,"div",8)(5,"span",9),i(6,"Email"),t(),n(7,"span",19),i(8),t()(),n(9,"div",8)(10,"span",9),i(11,"External ID"),t(),n(12,"span",19),i(13),t()()(),n(14,"div",6)(15,"h2",7),i(16,"Profile"),t(),n(17,"div",8)(18,"label",20),i(19,"First name"),t(),P(20,"input",21),t(),n(21,"div",8)(22,"label",22),i(23,"Last name"),t(),P(24,"input",23),t(),n(25,"div",8)(26,"label",24),i(27,"Bio"),t(),P(28,"textarea",25),t()(),n(29,"div",26)(30,"button",27),i(31),t(),n(32,"button",28),c("click",function(){p(e);let a=s(2);return m(a.cancelEditing())}),i(33,"Cancel"),t()()()}if(o&2){let e=s(),l=s();O("formGroup",l.form),d(8),u(e.email),d(5),u(e.externalId),d(17),O("disabled",l.isSaving()),d(),h(" ",l.isSaving()?"Saving\u2026":"Save changes"," ")}}function ne(o,r){o&1&&(n(0,"p",36),i(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function ie(o,r){if(o&1){let e=v();n(0,"span",43),i(1,"Delete?"),t(),n(2,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),i(3," Confirm "),t(),n(4,"button",45),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),i(5," Cancel "),t()}}function re(o,r){if(o&1){let e=v();n(0,"button",45),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),i(1," Delete "),t()}}function oe(o,r){if(o&1&&(n(0,"li",39)(1,"span",40),i(2),t(),n(3,"span",41),i(4),t(),g(5,ie,6,0)(6,re,2,0,"button",42),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function le(o,r){if(o&1&&(n(0,"h3",37),i(1,"Integrations"),t(),n(2,"ul",38),b(3,oe,7,3,"li",39,M().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().integrations)}}function ae(o,r){if(o&1){let e=v();n(0,"span",43),i(1,"Delete?"),t(),n(2,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),i(3," Confirm "),t(),n(4,"button",45),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),i(5," Cancel "),t()}}function se(o,r){if(o&1){let e=v();n(0,"button",45),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),i(1," Delete "),t()}}function de(o,r){if(o&1&&(n(0,"li",39)(1,"span",40),i(2),t(),n(3,"span",41),i(4),t(),g(5,ae,6,0)(6,se,2,0,"button",42),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function _e(o,r){if(o&1&&(n(0,"h3",37),i(1,"AI Providers"),t(),n(2,"ul",38),b(3,de,7,3,"li",39,M().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().aiProviders)}}function ce(o,r){if(o&1&&(g(0,le,5,0),g(1,_e,5,0)),o&2){let e=s(4);C(e.recap().integrations.length>0?0:-1),d(),C(e.recap().aiProviders.length>0?1:-1)}}function pe(o,r){if(o&1&&g(0,ne,2,0,"p",36)(1,ce,2,2),o&2){let e=s(3);C(e.recap().total===0?0:1)}}function me(o,r){if(o&1){let e=v();n(0,"div",16)(1,"div",6)(2,"h2",7),i(3,"Identity"),t(),n(4,"div",8)(5,"span",9),i(6,"Email"),t(),n(7,"span",29),i(8),t()(),n(9,"div",8)(10,"span",9),i(11,"External ID"),t(),n(12,"span",29),i(13),t()()(),n(14,"div",6)(15,"h2",7),i(16,"Profile"),t(),n(17,"div",8)(18,"span",9),i(19,"First name"),t(),n(20,"span",29),i(21),t()(),n(22,"div",8)(23,"span",9),i(24,"Last name"),t(),n(25,"span",29),i(26),t()(),n(27,"div",30)(28,"span",9),i(29,"Bio"),t(),n(30,"span",29),i(31),t()()(),n(32,"div",26)(33,"button",31),c("click",function(){p(e);let a=s(2);return m(a.startEditing())}),i(34," Edit profile "),t()(),n(35,"div",32)(36,"button",33),c("click",function(){p(e);let a=s(2);return m(a.toggleOverrides())}),n(37,"span",34),i(38,"\u25B6"),t(),i(39," My global user configurations "),n(40,"span",35),i(41),t()(),g(42,pe,2,1),t()()}if(o&2){let e=s(),l=s();d(8),u(e.email),d(5),u(e.externalId),d(8),u(e.firstname||"\u2014"),d(5),u(e.lastname||"\u2014"),d(5),u(e.bio||"\u2014"),d(5),E("aria-expanded",l.isOverridesExpanded()),d(),S("user-profile__overrides-arrow--open",l.isOverridesExpanded()),d(4),h("(",l.recap().total,")"),d(),C(l.isOverridesExpanded()?42:-1)}}function ue(o,r){if(o&1&&(n(0,"div",6)(1,"h2",7),i(2,"Appearance"),t(),n(3,"div",8)(4,"span",9),i(5,"Theme"),t(),n(6,"div",10),b(7,Z,2,4,"button",11,Q),t()()(),n(9,"div",6)(10,"h2",7),i(11,"Composer"),t(),n(12,"div",8)(13,"span",9),i(14,"Enter key"),t(),n(15,"div",12)(16,"div",13),b(17,ee,2,4,"button",11,Q),t(),n(19,"p",14),i(20,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(21,te,34,5,"form",15)(22,me,43,10,"div",16)),o&2){let e=s();d(7),y(e.themeOptions),d(10),y(e.enterKeyOptions),d(4),C(e.isEditing()?21:22)}}function fe(o,r){o&1&&(n(0,"p",5),i(1,"Unable to load profile."),t())}var W=class o{userState=f(Y);router=f(F);location=f(I);destroyRef=f(D);integrationState=f(q);providerState=f(J);themePort=f(j);preferencesPort=f(H);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new $({firstname:new k("",{nonNullable:!0}),lastname:new k("",{nonNullable:!0}),bio:new k("",{nonNullable:!0})});recap=G(T([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(U(([r,e])=>{let l=r.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),a=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:l,aiProviders:a,total:l.length+a.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(r){this.themePort.setTheme(r)}setEnterKeyBehavior(r){this.preferencesPort.setEnterKeyBehavior(r)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(r=>!r),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(r){return this.pendingDeleteKey()===this.entryKey(r)}armDelete(r){r.id&&this.pendingDeleteKey.set(this.entryKey(r))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(r){if(!r.id)return;this.pendingDeleteKey.set(null),(r.category==="integration"?this.integrationState.delete(r.id,"userGlobal"):this.providerState.delete(r.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${r.category}:${r.id}:`,l)}})}entryKey(r){return`${r.category}:${r.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(r,e){return this.entryKey(e)}syncFormFromState(){let r=this.currentUser();r&&this.form.setValue({firstname:r.firstname??"",lastname:r.lastname??"",bio:r.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["agentos-user-profile"]],decls:11,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["type","button","title","Go back",1,"user-profile__back",3,"click"],[1,"user-profile__back-icon"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],["role","group","aria-label","Theme",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,l){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),c("click",function(){return l.goBack()}),n(3,"span",3),i(4,"\u2190"),t(),i(5," Back "),t(),n(6,"h1",4),i(7,"My profile"),t()(),g(8,X,2,0,"p",5)(9,ue,23,1)(10,fe,2,0,"p",5),t()),e&2){let a;d(8),C(l.isLoading()?8:(a=l.currentUser())?9:10,a)}},dependencies:[A,R,K,z,N,L,B],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--color-border)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-tertiary);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:6px}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:none;font-size:.75rem;color:var(--color-error);cursor:pointer;padding:.2rem .4rem;border-radius:4px}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-border, rgba(0, 0, 0, .1));color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{W as UserProfileComponent};
1
+ import{a as J}from"./chunk-4DI7XR3B.js";import{a as q}from"./chunk-6V7FXGUT.js";import"./chunk-T3IUNA6F.js";import{c as j}from"./chunk-QPBFAKWK.js";import{c as H}from"./chunk-SMT5YVCA.js";import{a as Y}from"./chunk-FBLKA2VP.js";import"./chunk-OUCV2HPU.js";import{d as F}from"./chunk-4GVABYH4.js";import{a as w,c as G}from"./chunk-V363EHJE.js";import{F as A,c as K,g as z,h as N,i as $,l as k,n as R,v as B,w as L}from"./chunk-HZF57OLY.js";import{Bb as v,Db as c,Dc as I,Fb as s,Ka as d,Rb as S,Tb as i,Ub as u,Vb as h,Wa as V,ca as f,ga as p,ha as m,jb as E,kb as M,lb as g,ma as D,mb as C,pb as b,qb as y,rb as O,sb as n,t as U,ta as x,tb as t,u as T,ub as P}from"./chunk-B4RKRLIY.js";var Q=(o,r)=>r.value;function X(o,r){o&1&&(n(0,"p",5),i(1,"Loading\u2026"),t())}function Z(o,r){if(o&1){let e=v();n(0,"button",17),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setTheme(a.value))}),i(1),t()}if(o&2){let e=r.$implicit,l=s(2);S("user-profile__segmented-option--active",l.theme()===e.value),E("aria-pressed",l.theme()===e.value),d(),h(" ",e.label," ")}}function ee(o,r){if(o&1){let e=v();n(0,"button",17),c("click",function(){let a=p(e).$implicit,_=s(2);return m(_.setEnterKeyBehavior(a.value))}),i(1),t()}if(o&2){let e=r.$implicit,l=s(2);S("user-profile__segmented-option--active",l.enterKeyBehavior()===e.value),E("aria-pressed",l.enterKeyBehavior()===e.value),d(),h(" ",e.label," ")}}function te(o,r){if(o&1){let e=v();n(0,"form",18),c("ngSubmit",function(){p(e);let a=s(2);return m(a.save())}),n(1,"div",6)(2,"h2",7),i(3,"Identity"),t(),n(4,"div",8)(5,"span",9),i(6,"Email"),t(),n(7,"span",19),i(8),t()(),n(9,"div",8)(10,"span",9),i(11,"External ID"),t(),n(12,"span",19),i(13),t()()(),n(14,"div",6)(15,"h2",7),i(16,"Profile"),t(),n(17,"div",8)(18,"label",20),i(19,"First name"),t(),P(20,"input",21),t(),n(21,"div",8)(22,"label",22),i(23,"Last name"),t(),P(24,"input",23),t(),n(25,"div",8)(26,"label",24),i(27,"Bio"),t(),P(28,"textarea",25),t()(),n(29,"div",26)(30,"button",27),i(31),t(),n(32,"button",28),c("click",function(){p(e);let a=s(2);return m(a.cancelEditing())}),i(33,"Cancel"),t()()()}if(o&2){let e=s(),l=s();O("formGroup",l.form),d(8),u(e.email),d(5),u(e.externalId),d(17),O("disabled",l.isSaving()),d(),h(" ",l.isSaving()?"Saving\u2026":"Save changes"," ")}}function ne(o,r){o&1&&(n(0,"p",36),i(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function ie(o,r){if(o&1){let e=v();n(0,"span",43),i(1,"Delete?"),t(),n(2,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),i(3," Confirm "),t(),n(4,"button",45),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),i(5," Cancel "),t()}}function re(o,r){if(o&1){let e=v();n(0,"button",45),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),i(1," Delete "),t()}}function oe(o,r){if(o&1&&(n(0,"li",39)(1,"span",40),i(2),t(),n(3,"span",41),i(4),t(),g(5,ie,6,0)(6,re,2,0,"button",42),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function le(o,r){if(o&1&&(n(0,"h3",37),i(1,"Integrations"),t(),n(2,"ul",38),b(3,oe,7,3,"li",39,M().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().integrations)}}function ae(o,r){if(o&1){let e=v();n(0,"span",43),i(1,"Delete?"),t(),n(2,"button",44),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.confirmDelete(a))}),i(3," Confirm "),t(),n(4,"button",45),c("click",function(){p(e);let a=s(7);return m(a.cancelDelete())}),i(5," Cancel "),t()}}function se(o,r){if(o&1){let e=v();n(0,"button",45),c("click",function(){p(e);let a=s().$implicit,_=s(6);return m(_.armDelete(a))}),i(1," Delete "),t()}}function de(o,r){if(o&1&&(n(0,"li",39)(1,"span",40),i(2),t(),n(3,"span",41),i(4),t(),g(5,ae,6,0)(6,se,2,0,"button",42),t()),o&2){let e=r.$implicit,l=s(6);d(2),u(e.name),d(2),u(e.subtitle),d(),C(l.isPendingDelete(e)?5:6)}}function _e(o,r){if(o&1&&(n(0,"h3",37),i(1,"AI Providers"),t(),n(2,"ul",38),b(3,de,7,3,"li",39,M().trackEntry,!0),t()),o&2){let e=s(5);d(3),y(e.recap().aiProviders)}}function ce(o,r){if(o&1&&(g(0,le,5,0),g(1,_e,5,0)),o&2){let e=s(4);C(e.recap().integrations.length>0?0:-1),d(),C(e.recap().aiProviders.length>0?1:-1)}}function pe(o,r){if(o&1&&g(0,ne,2,0,"p",36)(1,ce,2,2),o&2){let e=s(3);C(e.recap().total===0?0:1)}}function me(o,r){if(o&1){let e=v();n(0,"div",16)(1,"div",6)(2,"h2",7),i(3,"Identity"),t(),n(4,"div",8)(5,"span",9),i(6,"Email"),t(),n(7,"span",29),i(8),t()(),n(9,"div",8)(10,"span",9),i(11,"External ID"),t(),n(12,"span",29),i(13),t()()(),n(14,"div",6)(15,"h2",7),i(16,"Profile"),t(),n(17,"div",8)(18,"span",9),i(19,"First name"),t(),n(20,"span",29),i(21),t()(),n(22,"div",8)(23,"span",9),i(24,"Last name"),t(),n(25,"span",29),i(26),t()(),n(27,"div",30)(28,"span",9),i(29,"Bio"),t(),n(30,"span",29),i(31),t()()(),n(32,"div",26)(33,"button",31),c("click",function(){p(e);let a=s(2);return m(a.startEditing())}),i(34," Edit profile "),t()(),n(35,"div",32)(36,"button",33),c("click",function(){p(e);let a=s(2);return m(a.toggleOverrides())}),n(37,"span",34),i(38,"\u25B6"),t(),i(39," My global user configurations "),n(40,"span",35),i(41),t()(),g(42,pe,2,1),t()()}if(o&2){let e=s(),l=s();d(8),u(e.email),d(5),u(e.externalId),d(8),u(e.firstname||"\u2014"),d(5),u(e.lastname||"\u2014"),d(5),u(e.bio||"\u2014"),d(5),E("aria-expanded",l.isOverridesExpanded()),d(),S("user-profile__overrides-arrow--open",l.isOverridesExpanded()),d(4),h("(",l.recap().total,")"),d(),C(l.isOverridesExpanded()?42:-1)}}function ue(o,r){if(o&1&&(n(0,"div",6)(1,"h2",7),i(2,"Appearance"),t(),n(3,"div",8)(4,"span",9),i(5,"Theme"),t(),n(6,"div",10),b(7,Z,2,4,"button",11,Q),t()()(),n(9,"div",6)(10,"h2",7),i(11,"Composer"),t(),n(12,"div",8)(13,"span",9),i(14,"Enter key"),t(),n(15,"div",12)(16,"div",13),b(17,ee,2,4,"button",11,Q),t(),n(19,"p",14),i(20,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(21,te,34,5,"form",15)(22,me,43,10,"div",16)),o&2){let e=s();d(7),y(e.themeOptions),d(10),y(e.enterKeyOptions),d(4),C(e.isEditing()?21:22)}}function fe(o,r){o&1&&(n(0,"p",5),i(1,"Unable to load profile."),t())}var W=class o{userState=f(Y);router=f(F);location=f(I);destroyRef=f(D);integrationState=f(q);providerState=f(J);themePort=f(j);preferencesPort=f(H);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new $({firstname:new k("",{nonNullable:!0}),lastname:new k("",{nonNullable:!0}),bio:new k("",{nonNullable:!0})});recap=G(T([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(U(([r,e])=>{let l=r.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),a=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:l,aiProviders:a,total:l.length+a.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(r){this.themePort.setTheme(r)}setEnterKeyBehavior(r){this.preferencesPort.setEnterKeyBehavior(r)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(r=>!r),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(r){return this.pendingDeleteKey()===this.entryKey(r)}armDelete(r){r.id&&this.pendingDeleteKey.set(this.entryKey(r))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(r){if(!r.id)return;this.pendingDeleteKey.set(null),(r.category==="integration"?this.integrationState.delete(r.id,"userGlobal"):this.providerState.delete(r.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:l=>{console.error(`[UserProfile] Delete failed for ${r.category}:${r.id}:`,l)}})}entryKey(r){return`${r.category}:${r.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(r,e){return this.entryKey(e)}syncFormFromState(){let r=this.currentUser();r&&this.form.setValue({firstname:r.firstname??"",lastname:r.lastname??"",bio:r.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=V({type:o,selectors:[["agentos-user-profile"]],decls:11,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["type","button","title","Go back",1,"user-profile__back",3,"click"],[1,"user-profile__back-icon"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],["role","group","aria-label","Theme",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,l){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),c("click",function(){return l.goBack()}),n(3,"span",3),i(4,"\u2190"),t(),i(5," Back "),t(),n(6,"h1",4),i(7,"My profile"),t()(),g(8,X,2,0,"p",5)(9,ue,23,1)(10,fe,2,0,"p",5),t()),e&2){let a;d(8),C(l.isLoading()?8:(a=l.currentUser())?9:10,a)}},dependencies:[A,R,K,z,N,L,B],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--color-border)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-tertiary);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:6px}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:monospace}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:none;font-size:.75rem;color:var(--color-error);cursor:pointer;padding:.2rem .4rem;border-radius:4px}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,var(--color-error) 12%,transparent)}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-border, rgba(0, 0, 0, .1));color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{W as UserProfileComponent};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-OBJWOIYT.js";import{b as $}from"./chunk-BUWF3ZQM.js";import{d as T}from"./chunk-4GVABYH4.js";import{u as B}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as l}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as v,Db as s,Fb as m,Hc as x,Pb as P,S as d,Tb as M,Wa as y,ab as h,ac as R,ca as r,dc as w,ec as I,ga as C,ha as _,hc as k,i as p,lb as A,ma as u,mb as b,rb as g,sb as a,t as c,tb as f}from"./chunk-B4RKRLIY.js";var S=()=>[];function F(n,t){if(n&1){let e=v();a(0,"agentos-agent-config-item",4),s("deleteRequested",function(o){C(e);let E=m(2);return _(E.deleteConfig(o))}),f()}n&2&&g("config",t)("platformMode",!0)}function L(n,t){if(n&1&&A(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,i=t.$implicit,o=m();b((e=o.resolveConfig(i.id))?0:-1,e)}}var q=class n{router=r(T);destroyRef=r(u);agentConfigController=r($);refresh$=new p(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listPlatformAgentsAgentConfig(!0)));configItems$=this.configs$.pipe(c(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(l(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-platform-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-agent-configs__back",3,"click"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,i){if(e&1&&(a(0,"ds-entity-list",1),w(1,"async"),s("createRequested",function(){return i.openCreateForm()}),a(2,"button",2),s("click",function(){return i.goBack()}),M(3,"\u2190 Admin"),f()(),h(4,L,1,1,"ng-template",null,0,k)),e&2){let o=P(5);g("items",I(1,3,i.configItems$)??R(5,S))("showCreate",!0)("itemTemplate",o)}},dependencies:[B,D,x],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformAgentConfigsComponent};
1
+ import{a as D}from"./chunk-OBJWOIYT.js";import{b as $}from"./chunk-OUCV2HPU.js";import{d as T}from"./chunk-4GVABYH4.js";import{u as B}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as l}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as v,Db as s,Fb as m,Hc as x,Pb as P,S as d,Tb as M,Wa as y,ab as h,ac as R,ca as r,dc as w,ec as I,ga as C,ha as _,hc as k,i as p,lb as A,ma as u,mb as b,rb as g,sb as a,t as c,tb as f}from"./chunk-B4RKRLIY.js";var S=()=>[];function F(n,t){if(n&1){let e=v();a(0,"agentos-agent-config-item",4),s("deleteRequested",function(o){C(e);let E=m(2);return _(E.deleteConfig(o))}),f()}n&2&&g("config",t)("platformMode",!0)}function L(n,t){if(n&1&&A(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,i=t.$implicit,o=m();b((e=o.resolveConfig(i.id))?0:-1,e)}}var q=class n{router=r(T);destroyRef=r(u);agentConfigController=r($);refresh$=new p(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listPlatformAgentsAgentConfig(!0)));configItems$=this.configs$.pipe(c(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(l(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-platform-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-agent-configs__back",3,"click"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,i){if(e&1&&(a(0,"ds-entity-list",1),w(1,"async"),s("createRequested",function(){return i.openCreateForm()}),a(2,"button",2),s("click",function(){return i.goBack()}),M(3,"\u2190 Admin"),f()(),h(4,L,1,1,"ng-template",null,0,k)),e&2){let o=P(5);g("items",I(1,3,i.configItems$)??R(5,S))("showCreate",!0)("itemTemplate",o)}},dependencies:[B,D,x],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformAgentConfigsComponent};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-64JAXTG4.js";import{c as $,d as D}from"./chunk-BUWF3ZQM.js";import{b as B,d as T}from"./chunk-4GVABYH4.js";import{p as S,u as q}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as p}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as I,Db as s,Fb as d,Hc as x,Pb as b,S as y,Wa as C,ab as g,ac as N,ca as a,dc as w,ec as R,ga as M,ha as v,hc as P,i as c,lb as h,ma as f,mb as A,rb as l,sb as r,t as u,tb as m,u as _}from"./chunk-B4RKRLIY.js";var F=()=>[];function V(i,o){if(i&1){let t=I();r(0,"agentos-ai-model-item",4),s("deleteRequested",function(e){M(t);let L=d(2);return v(L.deleteModel(e))}),m()}if(i&2){let t=d(2);l("model",o)("namespaceId",t.namespaceId)}}function j(i,o){if(i&1&&h(0,V,1,2,"agentos-ai-model-item",3),i&2){let t,n=o.$implicit,e=d();A((t=e.resolveModel(n.id))?0:-1,t)}}var k=class i{route=a(B);router=a(T);destroyRef=a(f);aiModelController=a($);aiProviderController=a(D);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new c(void 0);data$=this.refresh$.pipe(y(()=>_([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(u(([o,t])=>{let n=new Map(t.map(e=>[e.id??"",e.name]));return o.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:n.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(p(this.destroyRef)).subscribe(([o])=>{this.modelsById=new Map(o.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(o){this.aiModelController.deleteAiModel(o.id??"").pipe(p(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(o){return this.modelsById.get(o)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=C({type:i,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(t,n){if(t&1&&(r(0,"ds-entity-list",1),w(1,"async"),s("createRequested",function(){return n.openCreateForm()}),r(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),m()(),g(3,j,1,1,"ng-template",null,0,P)),t&2){let e=b(4);l("items",R(1,3,n.modelItems$)??N(5,F))("showCreate",!0)("itemTemplate",e)}},dependencies:[q,E,S,x],encapsulation:2,changeDetection:0})};export{k as NamespaceAiModelsComponent};
1
+ import{a as E}from"./chunk-64JAXTG4.js";import{c as $,d as D}from"./chunk-OUCV2HPU.js";import{b as B,d as T}from"./chunk-4GVABYH4.js";import{p as S,u as q}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as p}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as I,Db as s,Fb as d,Hc as x,Pb as b,S as y,Wa as C,ab as g,ac as N,ca as a,dc as w,ec as R,ga as M,ha as v,hc as P,i as c,lb as h,ma as f,mb as A,rb as l,sb as r,t as u,tb as m,u as _}from"./chunk-B4RKRLIY.js";var F=()=>[];function V(i,o){if(i&1){let t=I();r(0,"agentos-ai-model-item",4),s("deleteRequested",function(e){M(t);let L=d(2);return v(L.deleteModel(e))}),m()}if(i&2){let t=d(2);l("model",o)("namespaceId",t.namespaceId)}}function j(i,o){if(i&1&&h(0,V,1,2,"agentos-ai-model-item",3),i&2){let t,n=o.$implicit,e=d();A((t=e.resolveModel(n.id))?0:-1,t)}}var k=class i{route=a(B);router=a(T);destroyRef=a(f);aiModelController=a($);aiProviderController=a(D);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new c(void 0);data$=this.refresh$.pipe(y(()=>_([this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),this.aiProviderController.listAiProvider(this.namespaceId)])));modelItems$=this.data$.pipe(u(([o,t])=>{let n=new Map(t.map(e=>[e.id??"",e.name]));return o.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:n.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(p(this.destroyRef)).subscribe(([o])=>{this.modelsById=new Map(o.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"])}deleteModel(o){this.aiModelController.deleteAiModel(o.id??"").pipe(p(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveModel(o){return this.modelsById.get(o)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=C({type:i,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(t,n){if(t&1&&(r(0,"ds-entity-list",1),w(1,"async"),s("createRequested",function(){return n.openCreateForm()}),r(2,"ds-icon-button",2),s("action",function(){return n.goBack()}),m()(),g(3,j,1,1,"ng-template",null,0,P)),t&2){let e=b(4);l("items",R(1,3,n.modelItems$)??N(5,F))("showCreate",!0)("itemTemplate",e)}},dependencies:[q,E,S,x],encapsulation:2,changeDetection:0})};export{k as NamespaceAiModelsComponent};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-VOZI5GZY.js";import"./chunk-BUWF3ZQM.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
1
+ import{b as a}from"./chunk-NHDDTEX3.js";import"./chunk-OUCV2HPU.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-HMYJY2DG.js";import{d as T}from"./chunk-4GVABYH4.js";import{p as q,u as E,v as D}from"./chunk-WV7ML4CJ.js";import{a as U}from"./chunk-V363EHJE.js";import{Bb as w,Db as a,Fb as m,Ka as d,Pb as R,Tb as C,Ub as h,Wa as c,ab as I,ca as p,ga as y,ha as b,hc as M,kc as S,lb as _,ma as x,mb as f,oa as v,rb as u,sb as r,tb as o}from"./chunk-B4RKRLIY.js";function O(i,e){if(i&1&&(r(0,"span",3),C(1),o()),i&2){let t=m();d(),h(t.subtitle)}}var g=class i{user;editRequested=new v;deleteRequested=new v;menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user;return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user.email??this.user.externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user);break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user);break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:"user"},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),o(),_(4,O,2,1,"span",3),o(),r(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(l){return n.onMenuAction(l)}),o()()()),t&2&&(d(3),h(n.displayName),d(),f(n.subtitle?4:-1),d(2),u("items",n.menuItems))},dependencies:[D],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function B(i,e){if(i&1){let t=w();r(0,"agentos-user-item",4),a("editRequested",function(s){y(t);let l=m(2);return b(l.navigateToEdit(s))})("deleteRequested",function(s){y(t);let l=m(2);return b(l.deleteUser(s))}),o()}i&2&&u("user",e)}function P(i,e){if(i&1&&_(0,B,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,s=m();f((t=s.resolveUser(n.id))?0:-1,t)}}var k=class i{router=p(T);destroyRef=p(x);userAdminState=p(L);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(r(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),r(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,P,1,1,"ng-template",null,0,M)),t&2){let s=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",s)}},dependencies:[E,g,q],encapsulation:2,changeDetection:0})};export{g as a,k as b};
1
+ import{a as L}from"./chunk-OW2INFPT.js";import{d as T}from"./chunk-4GVABYH4.js";import{p as q,u as E,v as D}from"./chunk-WV7ML4CJ.js";import{a as U}from"./chunk-V363EHJE.js";import{Bb as w,Db as a,Fb as m,Ka as d,Pb as R,Tb as C,Ub as h,Wa as c,ab as I,ca as p,ga as y,ha as b,hc as M,kc as S,lb as _,ma as x,mb as f,oa as v,rb as u,sb as r,tb as o}from"./chunk-B4RKRLIY.js";function O(i,e){if(i&1&&(r(0,"span",3),C(1),o()),i&2){let t=m();d(),h(t.subtitle)}}var g=class i{user;editRequested=new v;deleteRequested=new v;menuItems=[{key:"edit",label:"Edit user",icon:"edit"},{key:"delete",label:"Delete user",icon:"delete",variant:"danger"}];get displayName(){let{firstname:e,lastname:t,email:n}=this.user;return[e,t].filter(Boolean).join(" ")||n||"\u2014"}get subtitle(){return this.user.email??this.user.externalId??""}onMenuAction(e){switch(e){case"edit":this.editRequested.emit(this.user);break;case"delete":confirm(`Delete user "${this.displayName}"?`)&&this.deleteRequested.emit(this.user);break}}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-item"]],inputs:{user:"user"},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested"},decls:7,vars:3,consts:[["role","listitem",1,"user-item"],[1,"user-item__body"],[1,"user-item__name"],[1,"user-item__subtitle"],[1,"user-item__actions"],[3,"itemSelected","items"]],template:function(t,n){t&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),C(3),o(),_(4,O,2,1,"span",3),o(),r(5,"div",4)(6,"ds-kebab-menu",5),a("itemSelected",function(l){return n.onMenuAction(l)}),o()()()),t&2&&(d(3),h(n.displayName),d(),f(n.subtitle?4:-1),d(2),u("items",n.menuItems))},dependencies:[D],styles:[".user-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-sizing:border-box;overflow:hidden;position:relative}.user-item__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.25rem}.user-item__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__subtitle[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-item__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};function B(i,e){if(i&1){let t=w();r(0,"agentos-user-item",4),a("editRequested",function(s){y(t);let l=m(2);return b(l.navigateToEdit(s))})("deleteRequested",function(s){y(t);let l=m(2);return b(l.deleteUser(s))}),o()}i&2&&u("user",e)}function P(i,e){if(i&1&&_(0,B,1,1,"agentos-user-item",3),i&2){let t,n=e.$implicit,s=m();f((t=s.resolveUser(n.id))?0:-1,t)}}var k=class i{router=p(T);destroyRef=p(x);userAdminState=p(L);isLoading=this.userAdminState.isLoading;userItems=S(()=>this.userAdminState.users().map(e=>({id:e.id??"",name:[e.firstname,e.lastname].filter(Boolean).join(" ")||e.email||"\u2014",description:e.email})));get usersById(){return new Map(this.userAdminState.users().map(e=>[e.id??"",e]))}ngOnInit(){this.userAdminState.loadAll().pipe(U(this.destroyRef)).subscribe()}goBack(){this.router.navigate(["/agentos"])}navigateToCreate(){this.router.navigate(["/agentos/admin/users/new"])}navigateToEdit(e){this.router.navigate(["/agentos/admin/users",e.id??"","edit"])}deleteUser(e){this.userAdminState.deleteUser(e.id??"").pipe(U(this.destroyRef)).subscribe()}resolveUser(e){return this.usersById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=c({type:i,selectors:[["agentos-user-list"]],decls:4,vars:3,consts:[["userItemTpl",""],["title","Users","emptyMessage","No users found.","cardMinWidth","320px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"user"],[3,"editRequested","deleteRequested","user"]],template:function(t,n){if(t&1&&(r(0,"ds-entity-list",1),a("createRequested",function(){return n.navigateToCreate()}),r(1,"ds-icon-button",2),a("action",function(){return n.goBack()}),o()(),I(2,P,1,1,"ng-template",null,0,M)),t&2){let s=R(3);u("items",n.userItems())("showCreate",!0)("itemTemplate",s)}},dependencies:[E,g,q],encapsulation:2,changeDetection:0})};export{g as a,k as b};
@@ -0,0 +1 @@
1
+ import{n}from"./chunk-OUCV2HPU.js";import{Z as o,ca as p}from"./chunk-B4RKRLIY.js";var m=class t{promptController=p(n);getById(r){return this.promptController.getByIdPrompt(r)}listByNamespace(r){return this.promptController.listByNamespacePrompt(r)}create(r){return this.promptController.createPrompt(r)}update(r,e){return this.promptController.updatePrompt(r,e)}delete(r){return this.promptController.deletePrompt(r)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};export{m as a};