@whoz-oss/coday-client 0.233.1 → 0.235.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 (67) hide show
  1. package/browser/{chunk-2OX7XSO7.js → chunk-3L5HH2LW.js} +1 -1
  2. package/browser/chunk-3SWGL6G7.js +1 -0
  3. package/browser/{chunk-GULJQNKJ.js → chunk-3WHV3A3F.js} +1 -1
  4. package/browser/{chunk-ZJ5WTNW7.js → chunk-3XEA5TTG.js} +1 -1
  5. package/browser/{chunk-NAJJT42Y.js → chunk-4QUKFJVG.js} +1 -1
  6. package/browser/{chunk-XZAGZJYJ.js → chunk-5F4OBAQR.js} +1 -1
  7. package/browser/{chunk-LVLF3D4X.js → chunk-5P3YDX4D.js} +1 -1
  8. package/browser/{chunk-V4WIZDIH.js → chunk-62SCRDTI.js} +1 -1
  9. package/browser/{chunk-5EIDKSSY.js → chunk-6OUF4MB3.js} +1 -1
  10. package/browser/{chunk-OFLO4C7X.js → chunk-6V5ZHXTF.js} +1 -1
  11. package/browser/chunk-7PHHASXE.js +1 -0
  12. package/browser/{chunk-2RRKNP4O.js → chunk-7WNGYNNF.js} +1 -1
  13. package/browser/chunk-A2IQII4O.js +1 -0
  14. package/browser/{chunk-63DV6LLE.js → chunk-AK3ITDZL.js} +1 -1
  15. package/browser/{chunk-UCATWB2P.js → chunk-B235KWLK.js} +1 -1
  16. package/browser/{chunk-OFPREK4V.js → chunk-B4YVERDA.js} +1 -1
  17. package/browser/{chunk-VZVJKZA2.js → chunk-BJ6IXKIG.js} +1 -1
  18. package/browser/{chunk-BYGLGHPS.js → chunk-BSULGZWF.js} +1 -1
  19. package/browser/{chunk-FS4CUJQH.js → chunk-C7HN2AHW.js} +1 -1
  20. package/browser/{chunk-4KS5XFO4.js → chunk-CMDN4G5T.js} +1 -1
  21. package/browser/{chunk-ALD52Y36.js → chunk-D4DYD37W.js} +1 -1
  22. package/browser/chunk-DDBWRK3B.js +1 -0
  23. package/browser/{chunk-XKAY4JO3.js → chunk-DYASMOHQ.js} +1 -1
  24. package/browser/{chunk-56F7GUQR.js → chunk-EPOMVQLK.js} +1 -1
  25. package/browser/{chunk-NQVAKMAF.js → chunk-FIDJLAO5.js} +1 -1
  26. package/browser/{chunk-55CCIZ6Y.js → chunk-FKSUXVTW.js} +1 -1
  27. package/browser/{chunk-KY2WN2WL.js → chunk-GGJJHI5J.js} +1 -1
  28. package/browser/{chunk-ZGOOG7E4.js → chunk-GVUZDCHM.js} +1 -1
  29. package/browser/{chunk-OMBUBJIY.js → chunk-HGDDIJKH.js} +1 -1
  30. package/browser/chunk-HQF5YXBC.js +1 -0
  31. package/browser/chunk-HW7FY6FY.js +1 -0
  32. package/browser/{chunk-4MIM6YHV.js → chunk-IGXPPLQW.js} +1 -1
  33. package/browser/{chunk-SBHTD5EV.js → chunk-IUKPWUMW.js} +1 -1
  34. package/browser/chunk-J3QUVW75.js +1 -0
  35. package/browser/chunk-JD6LMKJY.js +1 -0
  36. package/browser/{chunk-QAGM2FI6.js → chunk-JWECOKZF.js} +1 -1
  37. package/browser/chunk-M4ES4I34.js +1 -0
  38. package/browser/{chunk-TT5QO735.js → chunk-MGHX6XY3.js} +1 -1
  39. package/browser/{chunk-OUCM7C5E.js → chunk-OESN2OVC.js} +1 -1
  40. package/browser/chunk-OJPNIW6G.js +1 -0
  41. package/browser/chunk-OLEK57CJ.js +1 -0
  42. package/browser/{chunk-HV4YVRZD.js → chunk-PBZL7DN5.js} +1 -1
  43. package/browser/chunk-PL3BJFLT.js +1 -0
  44. package/browser/{chunk-U6DZITWN.js → chunk-QNOZT6US.js} +1 -1
  45. package/browser/{chunk-EUKRA2OA.js → chunk-QO3SLUF6.js} +1 -1
  46. package/browser/chunk-RDEFHYHJ.js +1 -0
  47. package/browser/{chunk-MHB6HAME.js → chunk-SLVL4O7X.js} +1 -1
  48. package/browser/{chunk-OJAJVOW4.js → chunk-T5DS7HZO.js} +1 -1
  49. package/browser/chunk-U26U4YUX.js +1 -0
  50. package/browser/chunk-UWESGTIU.js +1 -0
  51. package/browser/{chunk-SG2Y5LGP.js → chunk-VDPBH6I4.js} +1 -1
  52. package/browser/{chunk-MKGPVNPI.js → chunk-XZDUSWYE.js} +1 -1
  53. package/browser/{chunk-3DCEAZDI.js → chunk-YONCBD5A.js} +1 -1
  54. package/browser/{chunk-TOQLOSTJ.js → chunk-ZO272F3U.js} +1 -1
  55. package/browser/index.html +1 -1
  56. package/browser/{main-SDUET5IO.js → main-6K2RB63O.js} +1 -1
  57. package/package.json +1 -1
  58. package/browser/chunk-3PL5XB7S.js +0 -1
  59. package/browser/chunk-4WS3QONK.js +0 -1
  60. package/browser/chunk-5SWFEZKV.js +0 -1
  61. package/browser/chunk-7ZDYCVKF.js +0 -1
  62. package/browser/chunk-E5K3YORT.js +0 -1
  63. package/browser/chunk-EJX3SCU5.js +0 -1
  64. package/browser/chunk-LPBSLDC7.js +0 -1
  65. package/browser/chunk-MDHGCSE2.js +0 -1
  66. package/browser/chunk-MFNQXB7D.js +0 -1
  67. package/browser/chunk-VH7ZEMCE.js +0 -1
@@ -0,0 +1 @@
1
+ import{Uc as pe,Vc as h,Wc as w,Xc as v,Z as A,a as u,aa as ae,b as f,ba as x,ca as V,da as se,g as re,pa as ie}from"./chunk-3DOXTB6J.js";var P=new ae("basePath");var E=class{encodeKey(H){return encodeURIComponent(H)}encodeValue(H){return encodeURIComponent(H)}decodeKey(H){return decodeURIComponent(H)}decodeValue(H){return decodeURIComponent(H)}};var m=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:H,apiKeys:n,basePath:r,credentials:l,encodeParam:o,encoder:t,password:e,username:i,withCredentials:c}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),H!==void 0&&(this.accessToken=H),r!==void 0&&(this.basePath=r),c!==void 0&&(this.withCredentials=c),t&&(this.encoder=t),this.encodeParam=o??(a=>this.defaultEncodeParam(a)),this.credentials=l??{}}selectHeaderContentType(H){if(H.length===0)return;let n=H.find(r=>this.isJsonMime(r));return n===void 0?H[0]:n}selectHeaderAccept(H){if(H.length===0)return;let n=H.find(r=>this.isJsonMime(r));return n===void 0?H[0]:n}isJsonMime(H){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return H!==null&&(n.test(H)||H.toLowerCase()==="application/json-patch+json")}lookupCredential(H){let n=this.credentials[H];return typeof n=="function"?n():n}addCredentialToHeaders(H,n,r,l){let o=this.lookupCredential(H);return o?r.set(n,(l??"")+o):r}addCredentialToQuery(H,n,r){let l=this.lookupCredential(H);return l?r.set(n,l):r}defaultEncodeParam(H){let n=H.dataFormat==="date-time"&&H.value instanceof Date?H.value.toISOString():H.value;return encodeURIComponent(String(n))}};var j=class{basePath="http://localhost:8124";defaultHeaders=new pe;configuration;encoder;constructor(H,n){if(this.configuration=n||new m,typeof this.configuration.basePath!="string"){let r=Array.isArray(H)?H[0]:void 0;r!=null&&(H=r),typeof H!="string"&&(H=this.basePath),this.configuration.basePath=H}this.encoder=this.configuration.encoder||new E}canConsumeForm(H){return H.indexOf("multipart/form-data")!==-1}addToHttpParams(H,n,r,l=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(H,n,l?r:void 0,l):this.addToHttpParamsRecursive(H,n,r)}addToHttpParamsRecursive(H,n,r,l=!1){if(n==null)return H;if(typeof n=="object"){if(r!=null)return l?Object.keys(n).reduce((o,t)=>o.append(`${r}[${t}]`,n[t]),H):H.append(r,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>H=this.addToHttpParamsRecursive(H,o,r));else if(n instanceof Date)if(r!=null)H=H.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;H=this.addToHttpParamsRecursive(H,n[o],t)});return H}else if(r!=null)return H.append(r,n);throw Error("key may not be null if value is not object or array")}};var B=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/agent-configs",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}disableAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}enableAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}exportAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling exportAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json","application/yaml"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/export`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/agent-configs/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getDefinitionAgentConfig(n,r,l,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new w({encoder:this.encoder});i=this.addToHttpParams(i,r,"withUserOverlay"),i=this.addToHttpParams(i,l,"namespaceId");let c=this.defaultHeaders,a=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);a!==void 0&&(c=c.set("Accept",a));let d=e?.context??new h,s=e?.transferCache??!0,p="json";a&&(a.startsWith("text")?p="text":this.configuration.isJsonMime(a)?p="json":p="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:b,withCredentials:y}=this.configuration;return this.httpClient.request("get",`${b}${g}`,f(u({context:d,params:i,responseType:p},y?{withCredentials:y}:{}),{headers:c,observe:o,transferCache:s,reportProgress:t}))}listByParentAgentConfig(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAgentConfig.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"withDisabled");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/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:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,r="body",l=!1,o){let t=new w({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 c=o?.context??new h,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/agent-configs/platform",{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${p}${s}`,f(u({context:c,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:l}))}searchAgentConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/agent-configs/search",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updateAgentConfig(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var $=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/ai-models",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/ai-models/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByNamespaceIdAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByParentAiModel(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listPlatformLevelAiModel(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}updateAiModel(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var M=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createAiProvider(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/ai-providers",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteAiProvider(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdAiProvider(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsAiProvider(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/ai-providers/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listAiProvider(n,r,l="body",o=!1,t){let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p="/api/ai-providers",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updateAiProvider(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var U=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createAuthSetting(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter apiKeyAuthSettingBasicAuthAuthSettingBearerTokenAuthSettingOAuthCustomAuthSettingOAuthDiscoverableAuthSettingOAuthMcpDiscoverableAuthSettingOAuthRegisteredAuthSetting was null or undefined when calling createAuthSetting.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/auth-settings",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteAuthSetting(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAuthSetting.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/auth-settings/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdAuthSetting(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAuthSetting.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/auth-settings/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsAuthSetting(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAuthSetting.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/auth-settings/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listAuthSetting(n,r,l="body",o=!1,t){let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p="/api/auth-settings",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updateAuthSetting(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAuthSetting.");if(r==null)throw new Error("Required parameter apiKeyAuthSettingBasicAuthAuthSettingBearerTokenAuthSettingOAuthCustomAuthSettingOAuthDiscoverableAuthSettingOAuthMcpDiscoverableAuthSettingOAuthRegisteredAuthSetting was null or undefined when calling updateAuthSetting.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/auth-settings/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var F=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createIntegrationConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/integration-configs",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteIntegrationConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}exportIntegrationConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling exportIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json","application/yaml"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/export`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdIntegrationConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsIntegrationConfig(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/integration-configs/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listIntegrationConfig(n,r,l="body",o=!1,t){let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p="/api/integration-configs",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var N=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}getTypeIntegrationType(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listTypesIntegrationType(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var G=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createNamespace(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/namespaces",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteNamespace(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deployAgentsNamespace(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}getByIdNamespace(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsNamespace(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/namespaces/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listAllNamespace(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsNamespace(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/namespaces/by-external-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}undeployAgentsNamespace(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="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:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}updateNamespace(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var ce=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(ce||{});var D=class C{http=V(v);config=V(m);exportAsYaml(H){let n=`${this.config.basePath}/api/agent-configs/${encodeURIComponent(H)}/export`;return this.http.get(n,{headers:{Accept:"application/yaml"},responseType:"text"})}static \u0275fac=function(n){return new(n||C)};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var W=(n=>(n.WEEK="WEEK",n.MONTH="MONTH",n))(W||{});var _=(r=>(r.NEVER="NEVER",r.ON_DATE="ON_DATE",r.OCCURRENCES="OCCURRENCES",r))(_||{});var le=W,de=_;var be={MONDAY:"Mon",TUESDAY:"Tue",WEDNESDAY:"Wed",THURSDAY:"Thu",FRIDAY:"Fri",SATURDAY:"Sat",SUNDAY:"Sun"},ue={MONDAY:"Monday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday",THURSDAY:"Thursday",FRIDAY:"Friday",SATURDAY:"Saturday",SUNDAY:"Sunday"};var J=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}addMessageCase(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}createCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/cases",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/cases/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}interruptCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}killCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByParentCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByUserCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByUserExternalIdCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByUserInNamespaceCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listMineByParentCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listMineByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/mine`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}starCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling starCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/star`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("put",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}unstarCase(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling unstarCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/star`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updateCase(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var k=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}getByIdCaseEventRest(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsCaseEventRest(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/case-events/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByCaseCaseEventRest(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var L=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}deleteCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling deleteCaseFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling deleteCaseFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("delete",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}deleteNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deleteNamespaceFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling deleteNamespaceFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("delete",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}downloadCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling downloadCaseFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling downloadCaseFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/octet-stream"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/download`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}downloadNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling downloadNamespaceFileExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling downloadNamespaceFileExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/octet-stream"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/download`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getCaseFileContentExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling getCaseFileContentExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling getCaseFileContentExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/content`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getCaseFilesManifestExchange(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling getCaseFilesManifestExchange.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/files/manifest`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getNamespaceFileContentExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling getNamespaceFileContentExchange.");if(r==null)throw new Error("Required parameter path was null or undefined when calling getNamespaceFileContentExchange.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"path");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files/content`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}getNamespaceFilesManifestExchange(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling getNamespaceFilesManifestExchange.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/files/manifest`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}uploadCaseFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling uploadCaseFileExchange.");if(r==null)throw new Error("Required parameter file was null or undefined when calling uploadCaseFileExchange.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let c=t?.context??new h,a=t?.transferCache??!0,d=["multipart/form-data"],s=this.canConsumeForm(d),p,g=!1,b=!1;g=s,g?p=new FormData:p=new w({encoder:this.encoder}),r!==void 0&&(p=p.append("file",r)||p);let y="json";i&&(i.startsWith("text")?y="text":this.configuration.isJsonMime(i)?y="json":y="blob");let S=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:q,withCredentials:O}=this.configuration;return this.httpClient.request("post",`${q}${S}`,f(u({context:c,body:b?p.toString():p,responseType:y},O?{withCredentials:O}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}uploadNamespaceFileExchange(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling uploadNamespaceFileExchange.");if(r==null)throw new Error("Required parameter file was null or undefined when calling uploadNamespaceFileExchange.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let c=t?.context??new h,a=t?.transferCache??!0,d=["multipart/form-data"],s=this.canConsumeForm(d),p,g=!1,b=!1;g=s,g?p=new FormData:p=new w({encoder:this.encoder}),r!==void 0&&(p=p.append("file",r)||p);let y="json";i&&(i.startsWith("text")?y="text":this.configuration.isJsonMime(i)?y="json":y="blob");let S=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/files`,{basePath:q,withCredentials:O}=this.configuration;return this.httpClient.request("post",`${q}${S}`,f(u({context:c,body:b?p.toString():p,responseType:y},O?{withCredentials:O}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var Y=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createFeedback(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter feedbackInput was null or undefined when calling createFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/feedbacks",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByCaseEventFeedback(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseEventId was null or undefined when calling listByCaseEventFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}listByCaseFeedback(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var K=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}grantAdmin(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${p}${s}`,f(u({context:c,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}grantMember(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${p}${s}`,f(u({context:c,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}listNamespaceUsers(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}revokeAdmin(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${p}${s}`,f(u({context:c,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}revokeMember(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${p}${s}`,f(u({context:c,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}updateRolesByExternalId(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var Q=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}debugAllPlugins(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}debugPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getAllPlugins(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}getPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}reloadAllAgentsPlugin(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}reloadPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}startPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}stopPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}unloadPlugin(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}uploadPlugin(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var z=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter prompt was null or undefined when calling createPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/prompts",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deletePrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deletePrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/prompts/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}resolveEffectivePrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter promptEffectiveRequest was null or undefined when calling resolveEffectivePrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/prompts/effective",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}searchPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter promptSearchRequest was null or undefined when calling searchPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/prompts/search",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updatePrompt(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updatePrompt.");if(r==null)throw new Error("Required parameter prompt was null or undefined when calling updatePrompt.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var Z=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter scheduledPrompt was null or undefined when calling createScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/scheduled-prompts",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/scheduled-prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}disableScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/scheduled-prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/disable`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("patch",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}enableScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/scheduled-prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/enable`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("patch",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/scheduled-prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/scheduled-prompts/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}resolveEffectiveScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter scheduledPromptEffectiveRequest was null or undefined when calling resolveEffectiveScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/scheduled-prompts/effective",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}searchScheduledPrompt(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter scheduledPromptSearchRequest was null or undefined when calling searchScheduledPrompt.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/scheduled-prompts/search",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updateScheduledPrompt(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateScheduledPrompt.");if(r==null)throw new Error("Required parameter scheduledPrompt was null or undefined when calling updateScheduledPrompt.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/scheduled-prompts/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var X=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}streamEventsCaseEventSse(n,r,l="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new w({encoder:this.encoder});e=this.addToHttpParams(e,r,"includePreviousEvents");let i=this.defaultHeaders,c=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);c!==void 0&&(i=i.set("Accept",c));let a=t?.context??new h,d=t?.transferCache??!0,s="json";c&&(c.startsWith("text")?s="text":this.configuration.isJsonMime(c)?s="json":s="blob");let p=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("get",`${g}${p}`,f(u({context:a,params:e,responseType:s},b?{withCredentials:b}:{}),{headers:i,observe:l,transferCache:d,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var ee=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/users",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getByIdsUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/users/by-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getGroupsByExternalIdsUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter groupsByExternalIdsRequest was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/users/groups-by-external-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getMeUser(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listAllUser(n="body",r=!1,l){let o=this.defaultHeaders,t=l?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=l?.context??new h,i=l?.transferCache??!0,c="json";t&&(t.startsWith("text")?c="text":this.configuration.isJsonMime(t)?c="json":c="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(u({context:e,responseType:c},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsUser(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/users/by-external-ids",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updateUser(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("put",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var te=class C extends j{constructor(n,r,l){super(r,l);this.httpClient=n}createUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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 p="/api/user-groups",{basePath:g,withCredentials:b}=this.configuration;return this.httpClient.request("post",`${g}${p}`,f(u({context:i,body:n,responseType:s},b?{withCredentials:b}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}deleteUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}findByNamespaceIdUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling findByNamespaceIdUserGroup.");let t=new w({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 c=o?.context??new h,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:p,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${p}${s}`,f(u({context:c,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:l}))}getByIdUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}getMembersUserGroup(n,r="body",l=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getMembersUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new h,c=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"})}/members`,{basePath:s,withCredentials:p}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(u({context:i,responseType:a},p?{withCredentials:p}:{}),{headers:t,observe:r,transferCache:c,reportProgress:l}))}updateUserGroup(n,r,l="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 c=t?.context??new h,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let p="json";i&&(i.startsWith("text")?p="text":this.configuration.isJsonMime(i)?p="json":p="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:b,withCredentials:y}=this.configuration;return this.httpClient.request("post",`${b}${g}`,f(u({context:c,body:r,responseType:p},y?{withCredentials:y}:{}),{headers:e,observe:l,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||C)(x(v),x(P,8),x(m,8))};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var fe=(o=>(o.PENDING="PENDING",o.RUNNING="RUNNING",o.IDLE="IDLE",o.KILLED="KILLED",o.ERROR="ERROR",o))(fe||{});var he=(o=>(o.PENDING="PENDING",o.RUNNING="RUNNING",o.IDLE="IDLE",o.KILLED="KILLED",o.ERROR="ERROR",o))(he||{});function Ya(C){return se([typeof C=="string"?{provide:P,useValue:C}:{provide:m,useValue:new m(u({},C))}])}var ne=class C{config=V(m);zone=V(ie);connect(H){let n=`${this.config.basePath}/api/cases/${H}/events`;return new re(r=>{let l=this.zone.runOutsideAngular(()=>new EventSource(n));return l.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}`)))}},l.onerror=o=>{l.readyState===EventSource.CLOSED?this.zone.run(()=>r.complete()):this.zone.run(()=>r.error(new Error(`SSE connection error for case ${H}`))),l.close()},()=>l.close()})}static \u0275fac=function(n){return new(n||C)};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};var oe=class C{http=V(v);config=V(m);exportAsYaml(H){let n=`${this.config.basePath}/api/integration-configs/${encodeURIComponent(H)}/export`;return this.http.get(n,{headers:{Accept:"application/yaml"},responseType:"text"})}static \u0275fac=function(n){return new(n||C)};static \u0275prov=A({token:C,factory:C.\u0275fac,providedIn:"root"})};export{m as a,B as b,$ as c,M as d,U as e,J as f,L as g,F as h,N as i,G as j,K as k,Q as l,z as m,Z as n,ee as o,te as p,ce as q,fe as r,he as s,Ya as t,oe as u,D as v,le as w,de as x,be as y,ue as z};
@@ -1 +1 @@
1
- import{a as N}from"./chunk-7ZDYCVKF.js";import{a as D}from"./chunk-55CCIZ6Y.js";import"./chunk-VH7ZEMCE.js";import{a as w,c as E}from"./chunk-COLWSJEP.js";import{s as T,z as q}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as p}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as R,D as b,Db as c,Fb as r,Pb as I,Wa as y,ab as C,ca as a,ga as m,ha as d,jc as x,lb as S,m as P,ma as g,mb as v,mc as L,rb as _,sb as l,ta as u,tb as h,z as f}from"./chunk-3DOXTB6J.js";function V(i,e){if(i&1){let t=R();l(0,"agentos-scheduled-prompt-item",4),c("enableRequested",function(n){m(t);let s=r(2);return d(s.enablePrompt(n))})("disableRequested",function(n){m(t);let s=r(2);return d(s.disablePrompt(n))})("deleteRequested",function(n){m(t);let s=r(2);return d(s.deletePrompt(n))}),h()}if(i&2){let t=r().$implicit,o=r();_("definition",e)("namespaceId",o.namespaceId)("readOnly",o.isPlatformPrompt(t.id))}}function k(i,e){if(i&1&&S(0,V,1,3,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=r();v((t=n.resolvePrompt(o.id))?0:-1,t)}}var O="platform",B="namespace",M=class i{route=a(w);router=a(E);destroyRef=a(g);state=a(D);namespaceId=this.route.snapshot.params.namespaceId;platformPrompts=u([]);namespacePrompts=u([]);promptItems=L(()=>[...this.platformPrompts().map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:O,groupLabel:"Platform (read-only)",badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]})),...this.namespacePrompts().map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:B,groupLabel:"Namespace",badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]}))]);constructor(){f({platform:this.state.listPlatform().pipe(b(()=>P([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(p(this.destroyRef)).subscribe(({platform:e,namespace:t})=>{this.platformPrompts.set(e),this.namespacePrompts.set(t)})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"])}enablePrompt(e){this.state.enable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchNamespacePrompt(t))}disablePrompt(e){this.state.disable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchNamespacePrompt(t))}deletePrompt(e){let t=e.id??"";this.state.delete(t).pipe(p(this.destroyRef)).subscribe(()=>this.namespacePrompts.update(o=>o.filter(n=>n.id!==t)))}resolvePrompt(e){return this.platformPrompts().find(t=>t.id===e)??this.namespacePrompts().find(t=>t.id===e)??null}isPlatformPrompt(e){return this.platformPrompts().some(t=>t.id===e)}patchNamespacePrompt(e){this.namespacePrompts.update(t=>t.map(o=>o.id===e.id?e:o))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=y({type:i,selectors:[["agentos-scheduled-prompt-list"]],decls:4,vars:3,consts:[["scheduledPromptItemTpl",""],["title","Scheduled Prompts","emptyMessage","No scheduled prompts yet. Create one to get started.","cardMinWidth","420px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"definition","namespaceId","readOnly"],[3,"enableRequested","disableRequested","deleteRequested","definition","namespaceId","readOnly"]],template:function(t,o){if(t&1&&(l(0,"ds-entity-list",1),c("createRequested",function(){return o.openCreateForm()}),l(1,"ds-icon-button",2),c("action",function(){return o.goBack()}),h()(),C(2,k,1,1,"ng-template",null,0,x)),t&2){let n=I(3);_("items",o.promptItems())("showCreate",!0)("itemTemplate",n)}},dependencies:[q,N,T],encapsulation:2,changeDetection:0})};export{M as ScheduledPromptListComponent};
1
+ import{a as N}from"./chunk-J3QUVW75.js";import{a as D}from"./chunk-FKSUXVTW.js";import"./chunk-DDBWRK3B.js";import{a as w,c as E}from"./chunk-COLWSJEP.js";import{s as T,z as q}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as p}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as R,D as b,Db as c,Fb as r,Pb as I,Wa as y,ab as C,ca as a,ga as m,ha as d,jc as x,lb as S,m as P,ma as g,mb as v,mc as L,rb as _,sb as l,ta as u,tb as h,z as f}from"./chunk-3DOXTB6J.js";function V(i,e){if(i&1){let t=R();l(0,"agentos-scheduled-prompt-item",4),c("enableRequested",function(n){m(t);let s=r(2);return d(s.enablePrompt(n))})("disableRequested",function(n){m(t);let s=r(2);return d(s.disablePrompt(n))})("deleteRequested",function(n){m(t);let s=r(2);return d(s.deletePrompt(n))}),h()}if(i&2){let t=r().$implicit,o=r();_("definition",e)("namespaceId",o.namespaceId)("readOnly",o.isPlatformPrompt(t.id))}}function k(i,e){if(i&1&&S(0,V,1,3,"agentos-scheduled-prompt-item",3),i&2){let t,o=e.$implicit,n=r();v((t=n.resolvePrompt(o.id))?0:-1,t)}}var O="platform",B="namespace",M=class i{route=a(w);router=a(E);destroyRef=a(g);state=a(D);namespaceId=this.route.snapshot.params.namespaceId;platformPrompts=u([]);namespacePrompts=u([]);promptItems=L(()=>[...this.platformPrompts().map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:O,groupLabel:"Platform (read-only)",badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]})),...this.namespacePrompts().map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:B,groupLabel:"Namespace",badges:[{label:e.enabled?"Enabled":"Disabled",variant:e.enabled?"success":"warning"}]}))]);constructor(){f({platform:this.state.listPlatform().pipe(b(()=>P([]))),namespace:this.state.listByNamespace(this.namespaceId)}).pipe(p(this.destroyRef)).subscribe(({platform:e,namespace:t})=>{this.platformPrompts.set(e),this.namespacePrompts.set(t)})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts","new"])}enablePrompt(e){this.state.enable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchNamespacePrompt(t))}disablePrompt(e){this.state.disable(e.id??"").pipe(p(this.destroyRef)).subscribe(t=>this.patchNamespacePrompt(t))}deletePrompt(e){let t=e.id??"";this.state.delete(t).pipe(p(this.destroyRef)).subscribe(()=>this.namespacePrompts.update(o=>o.filter(n=>n.id!==t)))}resolvePrompt(e){return this.platformPrompts().find(t=>t.id===e)??this.namespacePrompts().find(t=>t.id===e)??null}isPlatformPrompt(e){return this.platformPrompts().some(t=>t.id===e)}patchNamespacePrompt(e){this.namespacePrompts.update(t=>t.map(o=>o.id===e.id?e:o))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=y({type:i,selectors:[["agentos-scheduled-prompt-list"]],decls:4,vars:3,consts:[["scheduledPromptItemTpl",""],["title","Scheduled Prompts","emptyMessage","No scheduled prompts yet. Create one to get started.","cardMinWidth","420px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"definition","namespaceId","readOnly"],[3,"enableRequested","disableRequested","deleteRequested","definition","namespaceId","readOnly"]],template:function(t,o){if(t&1&&(l(0,"ds-entity-list",1),c("createRequested",function(){return o.openCreateForm()}),l(1,"ds-icon-button",2),c("action",function(){return o.goBack()}),h()(),C(2,k,1,1,"ng-template",null,0,x)),t&2){let n=I(3);_("items",o.promptItems())("showCreate",!0)("itemTemplate",n)}},dependencies:[q,N,T],encapsulation:2,changeDetection:0})};export{M as ScheduledPromptListComponent};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-EUKRA2OA.js";import{a as V}from"./chunk-MFNQXB7D.js";import"./chunk-JIYGZGAO.js";import{a as B}from"./chunk-P7QBEYDF.js";import"./chunk-NQVAKMAF.js";import"./chunk-VH7ZEMCE.js";import{a as D,c as $}from"./chunk-COLWSJEP.js";import{s as P,z as L}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as c}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as A,Db as g,Fb as s,Ka as C,Lc as N,Pb as x,S as y,Tb as E,Ub as w,Wa as v,ab as R,ca as r,cc as O,fc as M,ga as l,gc as T,ha as m,jc as q,lb as b,m as _,ma as I,mb as S,rb as f,sb as p,t as u,ta as h,tb as d}from"./chunk-3DOXTB6J.js";var z=()=>[];function W(o,e){if(o&1&&(p(0,"p",3),E(1),d()),o&2){let t=s().$implicit;C(),w(t.name)}}function U(o,e){if(o&1){let t=A();p(0,"agentos-integration-config-item",5),g("editRequested",function(){let i=l(t),a=s(2);return m(a.onEdit(i))})("deleteRequested",function(){let i=l(t),a=s(2);return m(a.onDelete(i))})("duplicateRequested",function(){let i=l(t),a=s(2);return m(a.onDuplicate(i))}),d()}if(o&2){let t=e,n=s(2);f("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin())}}function X(o,e){if(o&1&&b(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=s();S(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t)}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=r(D);router=r($);destroyRef=r(I);state=r(V);namespaceRole=r(K);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(u(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(c(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(u(e=>e.get("namespaceId")??""),y(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(!1)),c(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(c(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"})}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(c(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n)}})}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),g("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),g("action",function(){return n.goBack()}),d()(),R(3,X,2,1,"ng-template",null,0,q)),t&2){let i=x(4);f("items",T(1,3,n.listItems$)??O(5,z))("showCreate",!0)("itemTemplate",i)}},dependencies:[L,B,P,N],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{j as IntegrationsAllScopesComponent};
1
+ import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-QO3SLUF6.js";import{a as V}from"./chunk-7PHHASXE.js";import"./chunk-JIYGZGAO.js";import{a as B}from"./chunk-P7QBEYDF.js";import"./chunk-FIDJLAO5.js";import"./chunk-DDBWRK3B.js";import{a as D,c as $}from"./chunk-COLWSJEP.js";import{s as P,z as L}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as c}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as A,Db as g,Fb as s,Ka as C,Lc as N,Pb as x,S as y,Tb as E,Ub as w,Wa as v,ab as R,ca as r,cc as O,fc as M,ga as l,gc as T,ha as m,jc as q,lb as b,m as _,ma as I,mb as S,rb as f,sb as p,t as u,ta as h,tb as d}from"./chunk-3DOXTB6J.js";var z=()=>[];function W(o,e){if(o&1&&(p(0,"p",3),E(1),d()),o&2){let t=s().$implicit;C(),w(t.name)}}function U(o,e){if(o&1){let t=A();p(0,"agentos-integration-config-item",5),g("editRequested",function(){let i=l(t),a=s(2);return m(a.onEdit(i))})("deleteRequested",function(){let i=l(t),a=s(2);return m(a.onDelete(i))})("duplicateRequested",function(){let i=l(t),a=s(2);return m(a.onDuplicate(i))}),d()}if(o&2){let t=e,n=s(2);f("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!n.isAdmin())}}function X(o,e){if(o&1&&b(0,W,2,1,"p",3)(1,U,1,3,"agentos-integration-config-item",4),o&2){let t,n=e.$implicit,i=s();S(i.isEmptyPlaceholder(n.id)?0:(t=i.resolve(n.id))?1:-1,t)}}var k=Object.freeze({platform:"Configurations plateforme",namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class o{route=r(D);router=r($);destroyRef=r(I);state=r(V);namespaceRole=r(K);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(u(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(c(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(u(e=>e.get("namespaceId")??""),y(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(!1)),c(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(c(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(n=>{n.id&&t.set(this.itemKey("platform",n.id),{config:n,scope:"platform"})}),e.namespace.forEach(n=>{n.id&&t.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),e.userOnNs.forEach(n=>{n.id&&t.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),e.userGlobal.forEach(n=>{n.id&&t.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(c(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${e.scope}:${t}:`,n)}})}onDuplicate(e){if(!e.config.id)return;let n=(e.scope==="namespace"||e.scope==="platform")&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:n,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucune configuration",groupKey:e,groupLabel:k[e]}]:t.filter(n=>!!n.id).map(n=>({id:this.itemKey(e,n.id),name:n.name,description:n.integrationType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=v({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),g("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),g("action",function(){return n.goBack()}),d()(),R(3,X,2,1,"ng-template",null,0,q)),t&2){let i=x(4);f("items",T(1,3,n.listItems$)??O(5,z))("showCreate",!0)("itemTemplate",i)}},dependencies:[L,B,P,N],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{j as IntegrationsAllScopesComponent};
@@ -1 +1 @@
1
- import{n as l}from"./chunk-VH7ZEMCE.js";import{V as o,Z as s,a as n,ca as a,ta as i}from"./chunk-3DOXTB6J.js";var u=class t{userController=a(l);currentUser=i(null);loadMe(){return this.userController.getMeUser().pipe(o(r=>this.currentUser.set(r)))}updateMe(r){let e=this.currentUser();if(!e)throw new Error("Cannot update: current user not loaded");if(!e.id)throw new Error("Cannot update: current user has no id");let c=n(n({},e),r);return this.userController.updateUser(e.id,c).pipe(o(d=>this.currentUser.set(d)))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{u as a};
1
+ import{o as l}from"./chunk-DDBWRK3B.js";import{V as o,Z as s,a as n,ca as a,ta as i}from"./chunk-3DOXTB6J.js";var u=class t{userController=a(l);currentUser=i(null);loadMe(){return this.userController.getMeUser().pipe(o(r=>this.currentUser.set(r)))}updateMe(r){let e=this.currentUser();if(!e)throw new Error("Cannot update: current user not loaded");if(!e.id)throw new Error("Cannot update: current user has no id");let c=n(n({},e),r);return this.userController.updateUser(e.id,c).pipe(o(d=>this.currentUser.set(d)))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{u as a};
@@ -1 +1 @@
1
- import{m as a}from"./chunk-VH7ZEMCE.js";import{Z as d,ca as l}from"./chunk-3DOXTB6J.js";var c=class r{api=l(a);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{n as a}from"./chunk-DDBWRK3B.js";import{Z as d,ca as l}from"./chunk-3DOXTB6J.js";var c=class r{api=l(a);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=d({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{c as u}from"./chunk-UCATWB2P.js";import{a as i,c as m}from"./chunk-COLWSJEP.js";import{Db as c,Wa as n,ca as t,rb as o,sb as r,tb as p}from"./chunk-3DOXTB6J.js";var d=class s{route=t(i);router=t(m);namespaceId=this.route.snapshot.params.namespaceId;goBack(){this.router.navigate(["/agentos","namespaces"])}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=n({type:s,selectors:[["agentos-namespace-user-groups"]],decls:1,vars:1,consts:[["backLabel","Namespaces",3,"backRequested","namespaceId"]],template:function(e,a){e&1&&(r(0,"agentos-user-group-list",0),c("backRequested",function(){return a.goBack()}),p()),e&2&&o("namespaceId",a.namespaceId)},dependencies:[u],encapsulation:2,changeDetection:0})};export{d as a};
1
+ import{c as u}from"./chunk-B235KWLK.js";import{a as i,c as m}from"./chunk-COLWSJEP.js";import{Db as c,Wa as n,ca as t,rb as o,sb as r,tb as p}from"./chunk-3DOXTB6J.js";var d=class s{route=t(i);router=t(m);namespaceId=this.route.snapshot.params.namespaceId;goBack(){this.router.navigate(["/agentos","namespaces"])}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=n({type:s,selectors:[["agentos-namespace-user-groups"]],decls:1,vars:1,consts:[["backLabel","Namespaces",3,"backRequested","namespaceId"]],template:function(e,a){e&1&&(r(0,"agentos-user-group-list",0),c("backRequested",function(){return a.goBack()}),p()),e&2&&o("namespaceId",a.namespaceId)},dependencies:[u],encapsulation:2,changeDetection:0})};export{d as a};
@@ -1 +1 @@
1
- import{a as oe}from"./chunk-FS4CUJQH.js";import{a as B,c as j}from"./chunk-COLWSJEP.js";import{w as re}from"./chunk-2X6HKQMK.js";import{a as E}from"./chunk-PUWEEZSA.js";import{F as te,c as q,e as F,g as H,h as X,i as J,l as K,n as W,v as Y,w as Z,y as Q,z as ee}from"./chunk-ZJV25K6M.js";import{Ab as O,Bb as I,Db as f,Fb as d,Ka as l,Kc as $,Pb as A,Rb as w,Tb as s,Ub as h,Vb as k,Wa as R,a as U,ab as M,b as T,ca as C,dc as P,ga as b,ha as x,jb as L,jc as z,lb as u,m as N,ma as D,mb as g,pb as y,qb as S,rb as _,sb as a,ta as p,tb as i,ub as V}from"./chunk-3DOXTB6J.js";function ne(r,t){let e=new Map;for(let o of r)if(o.userGroupId!==t)for(let n of o.agentIds)e.has(n)||e.set(n,o.name);return e}function ie(r,t){let e=new Set(r),o=new Set(t);return{toAdd:t.filter(n=>!e.has(n)),toRemove:r.filter(n=>!o.has(n))}}function v(r){return[r.firstname,r.lastname].filter(Boolean).join(" ").trim()||r.externalId}var de=20,G=class{constructor(t,e){this.candidates=t;this.excludedExternalIds=e}search(t){let e=t.toLowerCase(),o=this.excludedExternalIds(),n=this.candidates().filter(m=>!o.has(m.externalId)).filter(m=>this.matches(m,e)).slice(0,de).map(m=>({id:m.externalId,name:v(m),description:m.email}));return N(n)}matches(t,e){return t.externalId.toLowerCase().includes(e)||t.email.toLowerCase().includes(e)||v(t).toLowerCase().includes(e)}};var se=r=>({$implicit:r}),le=(r,t)=>t.id,ce=(r,t)=>t.externalId;function pe(r,t){r&1&&(a(0,"p",6),s(1,"Loading\u2026"),i())}function ue(r,t){r&1&&(a(0,"span",13),s(1,"Name is required."),i())}function ge(r,t){r&1&&(a(0,"p",18),s(1,"No agent configs available in this namespace."),i())}function _e(r,t){r&1&&O(0)}function fe(r,t){if(r&1&&M(0,_e,1,0,"ng-container",27),r&2){let e=t.$implicit;d(3);let o=A(11);_("ngTemplateOutlet",o)("ngTemplateOutletContext",P(2,se,e))}}function be(r,t){if(r&1&&(a(0,"div",19)(1,"span",26),s(2,"Platform"),i(),y(3,fe,1,4,"ng-container",null,le),i()),r&2){let e=d(2);l(3),S(e.platformAgents())}}function xe(r,t){r&1&&O(0)}function he(r,t){if(r&1&&M(0,xe,1,0,"ng-container",27),r&2){let e=t.$implicit;d(3);let o=A(11);_("ngTemplateOutlet",o)("ngTemplateOutletContext",P(2,se,e))}}function Ce(r,t){if(r&1&&(a(0,"div",19)(1,"span",26),s(2,"Namespace"),i(),y(3,he,1,4,"ng-container",null,le),i()),r&2){let e=d(2);l(3),S(e.namespaceAgents())}}function ve(r,t){r&1&&(a(0,"p",18),s(1,"No members yet."),i())}function Me(r,t){if(r&1&&(a(0,"span",31),s(1),i()),r&2){let e=d().$implicit;l(),h(e.email)}}function ye(r,t){if(r&1){let e=I();a(0,"li",28)(1,"div",29)(2,"span",30),s(3),i(),u(4,Me,2,1,"span",31),i(),a(5,"select",32),f("change",function(n){let m=b(e).$implicit,c=d(3);return x(c.setMemberRole(m.externalId,n.target.value))}),a(6,"option",33),s(7,"Member"),i(),a(8,"option",34),s(9,"Admin"),i()(),a(10,"button",35),f("click",function(){let n=b(e).$implicit,m=d(3);return x(m.removeMember(n.externalId))}),s(11," \xD7 "),i()()}if(r&2){let e=t.$implicit;l(3),h(e.label),l(),g(e.email&&e.email!==e.label?4:-1),l(),_("value",e.role),L("aria-label","Role of "+e.label),l(5),_("title","Remove "+e.label)}}function Se(r,t){if(r&1&&(a(0,"ul",20),y(1,ye,12,5,"li",28,ce),i()),r&2){let e=d(2);l(),S(e.selectedMembers())}}function Ie(r,t){if(r&1&&(a(0,"p",22),s(1),i()),r&2){let e=d(2);l(),h(e.errorMessage())}}function Ee(r,t){if(r&1){let e=I();a(0,"form",8),f("ngSubmit",function(){b(e);let n=d();return x(n.submit())}),a(1,"div",9)(2,"label",10),s(3,"Name "),a(4,"span",11),s(5,"*"),i()(),V(6,"input",12),u(7,ue,2,0,"span",13),i(),a(8,"fieldset",14)(9,"legend",15),s(10," Deployed agents "),a(11,"span",16),s(12,"Agents this group can use"),i()(),a(13,"p",17),s(14," Pick from platform agents and this namespace's agents. An agent already deployed to another group in this namespace is unavailable here. "),i(),u(15,ge,2,0,"p",18),u(16,be,5,0,"div",19),u(17,Ce,5,0,"div",19),i(),a(18,"fieldset",14)(19,"legend",15),s(20," Members "),a(21,"span",16),s(22,"Users in this group"),i()(),a(23,"p",17),s(24,"ADMIN members can manage this group; MEMBER is read-only."),i(),u(25,ve,2,0,"p",18)(26,Se,3,0,"ul",20),a(27,"ds-autocomplete-input",21),f("itemSelected",function(n){b(e);let m=d();return x(m.onMemberSelected(n))}),i()(),u(28,Ie,2,1,"p",22),a(29,"div",23)(30,"button",24),s(31),i(),a(32,"button",25),f("click",function(){b(e);let n=d();return x(n.cancel())}),s(33,"Cancel"),i()()()}if(r&2){let e=d();_("formGroup",e.form),l(6),w("user-group-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),l(),g(e.nameControl.invalid&&e.nameControl.touched?7:-1),l(8),g(e.platformAgents().length===0&&e.namespaceAgents().length===0?15:-1),l(),g(e.platformAgents().length>0?16:-1),l(),g(e.namespaceAgents().length>0?17:-1),l(8),g(e.selectedMembers().length===0?25:26),l(2),_("dataSource",e.memberDataSource),l(),g(e.errorMessage()?28:-1),l(2),_("disabled",e.nameControl.invalid||e.isSubmitting()),l(),k(" ",e.isEditMode()?"Save changes":"Create"," ")}}function Ge(r,t){if(r&1&&(a(0,"span",39),s(1),i()),r&2){let e=d().$implicit,o=d();l(),k("in ",o.agentOwnerGroup(e))}}function Oe(r,t){if(r&1){let e=I();a(0,"label",36)(1,"input",37),f("change",function(){let n=b(e).$implicit,m=d();return x(m.toggleAgent(n))}),i(),a(2,"span",38),s(3),i(),u(4,Ge,2,1,"span",39),i()}if(r&2){let e=t.$implicit,o=d();w("user-group-form__agent--disabled",o.isAgentDisabled(e)),l(),_("checked",o.isAgentSelected(e))("disabled",o.isAgentDisabled(e)),l(2),h(e.name),l(),g(o.isAgentDisabled(e)?4:-1)}}var Ae=250,ae=class r{route=C(B);router=C(j);destroyRef=C(D);userGroupState=C(oe);namespaceId=this.route.snapshot.params.namespaceId;userGroupId=this.route.snapshot.paramMap.get("userGroupId");returnTo=this.route.snapshot.queryParamMap.get("returnTo");isEditMode=p(!1);isLoading=p(!1);isSubmitting=p(!1);errorMessage=p(null);form=new J({name:new K("",{nonNullable:!0,validators:[F.required,F.maxLength(Ae)]})});get nameControl(){return this.form.controls.name}platformAgents=p([]);namespaceAgents=p([]);takenElsewhere=p(new Map);selectedAgentIds=p(new Set);candidateUsers=p([]);selectedMembers=p([]);originalMemberExternalIds=[];memberDataSource=new G(()=>this.candidateUsers(),()=>new Set(this.selectedMembers().map(t=>t.externalId)));ngOnInit(){this.isEditMode.set(!!this.userGroupId),this.loadFormData()}loadFormData(){this.isLoading.set(!0),this.userGroupState.loadFormData(this.namespaceId).pipe(E(this.destroyRef)).subscribe({next:({namespaceAgents:t,platformAgents:e,groups:o,users:n})=>{this.namespaceAgents.set(t),this.platformAgents.set(e),this.takenElsewhere.set(ne(o,this.userGroupId)),this.candidateUsers.set(n),this.userGroupId?this.loadExistingGroup(this.userGroupId):this.isLoading.set(!1)},error:t=>{console.error("[UserGroupForm] Failed to load form data",t),this.isLoading.set(!1),this.errorMessage.set("Failed to load form data. Please try again.")}})}loadExistingGroup(t){this.userGroupState.loadExistingGroup(t).pipe(E(this.destroyRef)).subscribe({next:({group:e,members:o})=>{this.nameControl.setValue(e.name),this.selectedAgentIds.set(new Set(e.agentIds)),this.originalMemberExternalIds=o.map(n=>n.externalId),this.selectedMembers.set(o.map(n=>({externalId:n.externalId,label:v(n),email:n.email,role:n.role}))),this.isLoading.set(!1)},error:e=>{console.error("[UserGroupForm] Failed to load user group for editing",e),this.isLoading.set(!1),this.navigateBack()}})}isAgentDisabled(t){return this.takenElsewhere().has(t.id??"")}agentOwnerGroup(t){return this.takenElsewhere().get(t.id??"")}isAgentSelected(t){return this.selectedAgentIds().has(t.id??"")}toggleAgent(t){let e=t.id;if(!e||this.isAgentDisabled(t))return;let o=new Set(this.selectedAgentIds());o.has(e)?o.delete(e):o.add(e),this.selectedAgentIds.set(o)}onMemberSelected(t){this.selectedMembers().some(e=>e.externalId===t.id)||this.selectedMembers.update(e=>[...e,{externalId:t.id,label:t.name,email:t.description,role:"MEMBER"}])}removeMember(t){this.selectedMembers.update(e=>e.filter(o=>o.externalId!==t))}setMemberRole(t,e){let o=e==="ADMIN"?"ADMIN":"MEMBER";this.selectedMembers.update(n=>n.map(m=>m.externalId===t?T(U({},m),{role:o}):m))}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),this.errorMessage.set(null);let t=this.nameControl.value.trim(),e=[...this.selectedAgentIds()],o=this.selectedMembers().map(c=>c.externalId),n=this.selectedMembers().filter(c=>c.role==="ADMIN").map(c=>c.externalId);(this.isEditMode()&&this.userGroupId?this.updateGroup(this.userGroupId,t,e,o,n):this.createGroup(t,e,o,n)).pipe(E(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:c=>{this.isSubmitting.set(!1),c.status===409?this.errorMessage.set(`A user group named "${t}" already exists in this namespace.`):c.status===400||c.status===422?this.errorMessage.set(c.error?.message??"Invalid user group data."):this.errorMessage.set("An unexpected error occurred. Please try again.")}})}createGroup(t,e,o,n){return this.userGroupState.create({namespaceId:this.namespaceId,name:t,agentIds:e,memberExternalIdsToAdd:o,adminExternalIds:n})}updateGroup(t,e,o,n,m){let{toAdd:c,toRemove:me}=ie(this.originalMemberExternalIds,n);return this.userGroupState.update(t,{name:e,agentIds:o,memberExternalIdsToAdd:c,memberExternalIdsToRemove:me,adminExternalIds:m})}cancel(){this.navigateBack()}navigateBack(){this.returnTo?this.router.navigateByUrl(this.returnTo):this.router.navigate(["/agentos",this.namespaceId,"user-groups"])}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=R({type:r,selectors:[["agentos-user-group-form"]],decls:12,vars:2,consts:[["agentRow",""],[1,"user-group-form"],[1,"user-group-form__header"],["type","button","title","Back to user groups",1,"user-group-form__back",3,"click"],[1,"user-group-form__back-icon"],[1,"user-group-form__title"],[1,"user-group-form__loading"],[1,"user-group-form__form",3,"formGroup"],[1,"user-group-form__form",3,"ngSubmit","formGroup"],[1,"user-group-form__field"],["for","user-group-name",1,"user-group-form__label"],["aria-hidden","true"],["id","user-group-name","type","text","placeholder","e.g. Support team","formControlName","name","autocomplete","off",1,"user-group-form__input"],[1,"user-group-form__field-error"],[1,"user-group-form__section"],[1,"user-group-form__label"],[1,"user-group-form__label-hint"],[1,"user-group-form__section-hint"],[1,"user-group-form__empty-hint"],[1,"user-group-form__agent-group"],[1,"user-group-form__members"],["placeholder","Add a member\u2026",3,"itemSelected","dataSource"],[1,"user-group-form__error"],[1,"user-group-form__actions"],["type","submit",1,"user-group-form__btn","user-group-form__btn--primary",3,"disabled"],["type","button",1,"user-group-form__btn",3,"click"],[1,"user-group-form__agent-group-title"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"user-group-form__member"],[1,"user-group-form__member-info"],[1,"user-group-form__member-name"],[1,"user-group-form__member-email"],[1,"user-group-form__member-role",3,"change","value"],["value","MEMBER"],["value","ADMIN"],["type","button",1,"user-group-form__member-remove",3,"click","title"],[1,"user-group-form__agent"],["type","checkbox",1,"user-group-form__agent-checkbox",3,"change","checked","disabled"],[1,"user-group-form__agent-name"],[1,"user-group-form__agent-note"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"header",2)(2,"button",3),f("click",function(){return o.cancel()}),a(3,"span",4),s(4,"\u2190"),i(),s(5," User Groups "),i(),a(6,"h1",5),s(7),i()(),u(8,pe,2,0,"p",6)(9,Ee,34,12,"form",7),i(),M(10,Oe,5,6,"ng-template",null,0,z)),e&2&&(l(7),h(o.isEditMode()?"Edit user group":"New user group"),l(),g(o.isLoading()?8:9))},dependencies:[$,te,W,Q,ee,q,H,X,Z,Y,re],styles:[".user-group-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-group-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-group-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-group-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-group-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-group-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-group-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-group-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.user-group-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.user-group-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.user-group-form__label-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);margin-left:.375rem}.user-group-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.user-group-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-group-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-group-form__input--invalid[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.user-group-form__input--invalid[_ngcontent-%COMP%]:focus{border-color:var(--color-error, #ff3b30)}.user-group-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.user-group-form__section-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.user-group-form__empty-hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73);font-style:italic}.user-group-form__agent-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.user-group-form__agent-group-title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73);margin-bottom:.25rem}.user-group-form__agent[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:6px;cursor:pointer;transition:background .15s ease}.user-group-form__agent[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .03))}.user-group-form__agent--disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.55}.user-group-form__agent--disabled[_ngcontent-%COMP%]:hover{background:transparent}.user-group-form__agent-checkbox[_ngcontent-%COMP%]{flex-shrink:0;accent-color:var(--color-primary, #007aff)}.user-group-form__agent-name[_ngcontent-%COMP%]{font-size:.9rem;color:var(--color-text, #1d1d1f)}.user-group-form__agent-note[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);font-style:italic}.user-group-form__members[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.375rem}.user-group-form__member[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.4rem .5rem;border-radius:8px;background:var(--color-surface-hover, rgba(0, 0, 0, .03));border:1px solid var(--color-border, rgba(0, 0, 0, .08))}.user-group-form__member-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.1rem;min-width:0}.user-group-form__member-name[_ngcontent-%COMP%]{font-size:.9rem;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-form__member-email[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-form__member-role[_ngcontent-%COMP%]{flex-shrink:0;padding:.3rem .5rem;border-radius:6px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.8rem;font-family:inherit;cursor:pointer}.user-group-form__member-role[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}.user-group-form__member-remove[_ngcontent-%COMP%]{flex-shrink:0;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:1rem;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.user-group-form__member-remove[_ngcontent-%COMP%]:hover{background:var(--color-error-light, rgba(255, 59, 48, .12));color:var(--color-error, #ff3b30)}.user-group-form__error[_ngcontent-%COMP%]{margin:0;padding:.625rem .875rem;border-radius:8px;background:var(--color-error-light, rgba(255, 59, 48, .08));border:1px solid var(--color-error, #ff3b30);color:var(--color-error, #ff3b30);font-size:.875rem;line-height:1.4}.user-group-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30);line-height:1.3}.user-group-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-group-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-group-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-group-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-group-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-group-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ae as a};
1
+ import{a as oe}from"./chunk-C7HN2AHW.js";import{a as B,c as j}from"./chunk-COLWSJEP.js";import{w as re}from"./chunk-2X6HKQMK.js";import{a as E}from"./chunk-PUWEEZSA.js";import{F as te,c as q,e as F,g as H,h as X,i as J,l as K,n as W,v as Y,w as Z,y as Q,z as ee}from"./chunk-ZJV25K6M.js";import{Ab as O,Bb as I,Db as f,Fb as d,Ka as l,Kc as $,Pb as A,Rb as w,Tb as s,Ub as h,Vb as k,Wa as R,a as U,ab as M,b as T,ca as C,dc as P,ga as b,ha as x,jb as L,jc as z,lb as u,m as N,ma as D,mb as g,pb as y,qb as S,rb as _,sb as a,ta as p,tb as i,ub as V}from"./chunk-3DOXTB6J.js";function ne(r,t){let e=new Map;for(let o of r)if(o.userGroupId!==t)for(let n of o.agentIds)e.has(n)||e.set(n,o.name);return e}function ie(r,t){let e=new Set(r),o=new Set(t);return{toAdd:t.filter(n=>!e.has(n)),toRemove:r.filter(n=>!o.has(n))}}function v(r){return[r.firstname,r.lastname].filter(Boolean).join(" ").trim()||r.externalId}var de=20,G=class{constructor(t,e){this.candidates=t;this.excludedExternalIds=e}search(t){let e=t.toLowerCase(),o=this.excludedExternalIds(),n=this.candidates().filter(m=>!o.has(m.externalId)).filter(m=>this.matches(m,e)).slice(0,de).map(m=>({id:m.externalId,name:v(m),description:m.email}));return N(n)}matches(t,e){return t.externalId.toLowerCase().includes(e)||t.email.toLowerCase().includes(e)||v(t).toLowerCase().includes(e)}};var se=r=>({$implicit:r}),le=(r,t)=>t.id,ce=(r,t)=>t.externalId;function pe(r,t){r&1&&(a(0,"p",6),s(1,"Loading\u2026"),i())}function ue(r,t){r&1&&(a(0,"span",13),s(1,"Name is required."),i())}function ge(r,t){r&1&&(a(0,"p",18),s(1,"No agent configs available in this namespace."),i())}function _e(r,t){r&1&&O(0)}function fe(r,t){if(r&1&&M(0,_e,1,0,"ng-container",27),r&2){let e=t.$implicit;d(3);let o=A(11);_("ngTemplateOutlet",o)("ngTemplateOutletContext",P(2,se,e))}}function be(r,t){if(r&1&&(a(0,"div",19)(1,"span",26),s(2,"Platform"),i(),y(3,fe,1,4,"ng-container",null,le),i()),r&2){let e=d(2);l(3),S(e.platformAgents())}}function xe(r,t){r&1&&O(0)}function he(r,t){if(r&1&&M(0,xe,1,0,"ng-container",27),r&2){let e=t.$implicit;d(3);let o=A(11);_("ngTemplateOutlet",o)("ngTemplateOutletContext",P(2,se,e))}}function Ce(r,t){if(r&1&&(a(0,"div",19)(1,"span",26),s(2,"Namespace"),i(),y(3,he,1,4,"ng-container",null,le),i()),r&2){let e=d(2);l(3),S(e.namespaceAgents())}}function ve(r,t){r&1&&(a(0,"p",18),s(1,"No members yet."),i())}function Me(r,t){if(r&1&&(a(0,"span",31),s(1),i()),r&2){let e=d().$implicit;l(),h(e.email)}}function ye(r,t){if(r&1){let e=I();a(0,"li",28)(1,"div",29)(2,"span",30),s(3),i(),u(4,Me,2,1,"span",31),i(),a(5,"select",32),f("change",function(n){let m=b(e).$implicit,c=d(3);return x(c.setMemberRole(m.externalId,n.target.value))}),a(6,"option",33),s(7,"Member"),i(),a(8,"option",34),s(9,"Admin"),i()(),a(10,"button",35),f("click",function(){let n=b(e).$implicit,m=d(3);return x(m.removeMember(n.externalId))}),s(11," \xD7 "),i()()}if(r&2){let e=t.$implicit;l(3),h(e.label),l(),g(e.email&&e.email!==e.label?4:-1),l(),_("value",e.role),L("aria-label","Role of "+e.label),l(5),_("title","Remove "+e.label)}}function Se(r,t){if(r&1&&(a(0,"ul",20),y(1,ye,12,5,"li",28,ce),i()),r&2){let e=d(2);l(),S(e.selectedMembers())}}function Ie(r,t){if(r&1&&(a(0,"p",22),s(1),i()),r&2){let e=d(2);l(),h(e.errorMessage())}}function Ee(r,t){if(r&1){let e=I();a(0,"form",8),f("ngSubmit",function(){b(e);let n=d();return x(n.submit())}),a(1,"div",9)(2,"label",10),s(3,"Name "),a(4,"span",11),s(5,"*"),i()(),V(6,"input",12),u(7,ue,2,0,"span",13),i(),a(8,"fieldset",14)(9,"legend",15),s(10," Deployed agents "),a(11,"span",16),s(12,"Agents this group can use"),i()(),a(13,"p",17),s(14," Pick from platform agents and this namespace's agents. An agent already deployed to another group in this namespace is unavailable here. "),i(),u(15,ge,2,0,"p",18),u(16,be,5,0,"div",19),u(17,Ce,5,0,"div",19),i(),a(18,"fieldset",14)(19,"legend",15),s(20," Members "),a(21,"span",16),s(22,"Users in this group"),i()(),a(23,"p",17),s(24,"ADMIN members can manage this group; MEMBER is read-only."),i(),u(25,ve,2,0,"p",18)(26,Se,3,0,"ul",20),a(27,"ds-autocomplete-input",21),f("itemSelected",function(n){b(e);let m=d();return x(m.onMemberSelected(n))}),i()(),u(28,Ie,2,1,"p",22),a(29,"div",23)(30,"button",24),s(31),i(),a(32,"button",25),f("click",function(){b(e);let n=d();return x(n.cancel())}),s(33,"Cancel"),i()()()}if(r&2){let e=d();_("formGroup",e.form),l(6),w("user-group-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),l(),g(e.nameControl.invalid&&e.nameControl.touched?7:-1),l(8),g(e.platformAgents().length===0&&e.namespaceAgents().length===0?15:-1),l(),g(e.platformAgents().length>0?16:-1),l(),g(e.namespaceAgents().length>0?17:-1),l(8),g(e.selectedMembers().length===0?25:26),l(2),_("dataSource",e.memberDataSource),l(),g(e.errorMessage()?28:-1),l(2),_("disabled",e.nameControl.invalid||e.isSubmitting()),l(),k(" ",e.isEditMode()?"Save changes":"Create"," ")}}function Ge(r,t){if(r&1&&(a(0,"span",39),s(1),i()),r&2){let e=d().$implicit,o=d();l(),k("in ",o.agentOwnerGroup(e))}}function Oe(r,t){if(r&1){let e=I();a(0,"label",36)(1,"input",37),f("change",function(){let n=b(e).$implicit,m=d();return x(m.toggleAgent(n))}),i(),a(2,"span",38),s(3),i(),u(4,Ge,2,1,"span",39),i()}if(r&2){let e=t.$implicit,o=d();w("user-group-form__agent--disabled",o.isAgentDisabled(e)),l(),_("checked",o.isAgentSelected(e))("disabled",o.isAgentDisabled(e)),l(2),h(e.name),l(),g(o.isAgentDisabled(e)?4:-1)}}var Ae=250,ae=class r{route=C(B);router=C(j);destroyRef=C(D);userGroupState=C(oe);namespaceId=this.route.snapshot.params.namespaceId;userGroupId=this.route.snapshot.paramMap.get("userGroupId");returnTo=this.route.snapshot.queryParamMap.get("returnTo");isEditMode=p(!1);isLoading=p(!1);isSubmitting=p(!1);errorMessage=p(null);form=new J({name:new K("",{nonNullable:!0,validators:[F.required,F.maxLength(Ae)]})});get nameControl(){return this.form.controls.name}platformAgents=p([]);namespaceAgents=p([]);takenElsewhere=p(new Map);selectedAgentIds=p(new Set);candidateUsers=p([]);selectedMembers=p([]);originalMemberExternalIds=[];memberDataSource=new G(()=>this.candidateUsers(),()=>new Set(this.selectedMembers().map(t=>t.externalId)));ngOnInit(){this.isEditMode.set(!!this.userGroupId),this.loadFormData()}loadFormData(){this.isLoading.set(!0),this.userGroupState.loadFormData(this.namespaceId).pipe(E(this.destroyRef)).subscribe({next:({namespaceAgents:t,platformAgents:e,groups:o,users:n})=>{this.namespaceAgents.set(t),this.platformAgents.set(e),this.takenElsewhere.set(ne(o,this.userGroupId)),this.candidateUsers.set(n),this.userGroupId?this.loadExistingGroup(this.userGroupId):this.isLoading.set(!1)},error:t=>{console.error("[UserGroupForm] Failed to load form data",t),this.isLoading.set(!1),this.errorMessage.set("Failed to load form data. Please try again.")}})}loadExistingGroup(t){this.userGroupState.loadExistingGroup(t).pipe(E(this.destroyRef)).subscribe({next:({group:e,members:o})=>{this.nameControl.setValue(e.name),this.selectedAgentIds.set(new Set(e.agentIds)),this.originalMemberExternalIds=o.map(n=>n.externalId),this.selectedMembers.set(o.map(n=>({externalId:n.externalId,label:v(n),email:n.email,role:n.role}))),this.isLoading.set(!1)},error:e=>{console.error("[UserGroupForm] Failed to load user group for editing",e),this.isLoading.set(!1),this.navigateBack()}})}isAgentDisabled(t){return this.takenElsewhere().has(t.id??"")}agentOwnerGroup(t){return this.takenElsewhere().get(t.id??"")}isAgentSelected(t){return this.selectedAgentIds().has(t.id??"")}toggleAgent(t){let e=t.id;if(!e||this.isAgentDisabled(t))return;let o=new Set(this.selectedAgentIds());o.has(e)?o.delete(e):o.add(e),this.selectedAgentIds.set(o)}onMemberSelected(t){this.selectedMembers().some(e=>e.externalId===t.id)||this.selectedMembers.update(e=>[...e,{externalId:t.id,label:t.name,email:t.description,role:"MEMBER"}])}removeMember(t){this.selectedMembers.update(e=>e.filter(o=>o.externalId!==t))}setMemberRole(t,e){let o=e==="ADMIN"?"ADMIN":"MEMBER";this.selectedMembers.update(n=>n.map(m=>m.externalId===t?T(U({},m),{role:o}):m))}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0),this.errorMessage.set(null);let t=this.nameControl.value.trim(),e=[...this.selectedAgentIds()],o=this.selectedMembers().map(c=>c.externalId),n=this.selectedMembers().filter(c=>c.role==="ADMIN").map(c=>c.externalId);(this.isEditMode()&&this.userGroupId?this.updateGroup(this.userGroupId,t,e,o,n):this.createGroup(t,e,o,n)).pipe(E(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:c=>{this.isSubmitting.set(!1),c.status===409?this.errorMessage.set(`A user group named "${t}" already exists in this namespace.`):c.status===400||c.status===422?this.errorMessage.set(c.error?.message??"Invalid user group data."):this.errorMessage.set("An unexpected error occurred. Please try again.")}})}createGroup(t,e,o,n){return this.userGroupState.create({namespaceId:this.namespaceId,name:t,agentIds:e,memberExternalIdsToAdd:o,adminExternalIds:n})}updateGroup(t,e,o,n,m){let{toAdd:c,toRemove:me}=ie(this.originalMemberExternalIds,n);return this.userGroupState.update(t,{name:e,agentIds:o,memberExternalIdsToAdd:c,memberExternalIdsToRemove:me,adminExternalIds:m})}cancel(){this.navigateBack()}navigateBack(){this.returnTo?this.router.navigateByUrl(this.returnTo):this.router.navigate(["/agentos",this.namespaceId,"user-groups"])}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=R({type:r,selectors:[["agentos-user-group-form"]],decls:12,vars:2,consts:[["agentRow",""],[1,"user-group-form"],[1,"user-group-form__header"],["type","button","title","Back to user groups",1,"user-group-form__back",3,"click"],[1,"user-group-form__back-icon"],[1,"user-group-form__title"],[1,"user-group-form__loading"],[1,"user-group-form__form",3,"formGroup"],[1,"user-group-form__form",3,"ngSubmit","formGroup"],[1,"user-group-form__field"],["for","user-group-name",1,"user-group-form__label"],["aria-hidden","true"],["id","user-group-name","type","text","placeholder","e.g. Support team","formControlName","name","autocomplete","off",1,"user-group-form__input"],[1,"user-group-form__field-error"],[1,"user-group-form__section"],[1,"user-group-form__label"],[1,"user-group-form__label-hint"],[1,"user-group-form__section-hint"],[1,"user-group-form__empty-hint"],[1,"user-group-form__agent-group"],[1,"user-group-form__members"],["placeholder","Add a member\u2026",3,"itemSelected","dataSource"],[1,"user-group-form__error"],[1,"user-group-form__actions"],["type","submit",1,"user-group-form__btn","user-group-form__btn--primary",3,"disabled"],["type","button",1,"user-group-form__btn",3,"click"],[1,"user-group-form__agent-group-title"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"user-group-form__member"],[1,"user-group-form__member-info"],[1,"user-group-form__member-name"],[1,"user-group-form__member-email"],[1,"user-group-form__member-role",3,"change","value"],["value","MEMBER"],["value","ADMIN"],["type","button",1,"user-group-form__member-remove",3,"click","title"],[1,"user-group-form__agent"],["type","checkbox",1,"user-group-form__agent-checkbox",3,"change","checked","disabled"],[1,"user-group-form__agent-name"],[1,"user-group-form__agent-note"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"header",2)(2,"button",3),f("click",function(){return o.cancel()}),a(3,"span",4),s(4,"\u2190"),i(),s(5," User Groups "),i(),a(6,"h1",5),s(7),i()(),u(8,pe,2,0,"p",6)(9,Ee,34,12,"form",7),i(),M(10,Oe,5,6,"ng-template",null,0,z)),e&2&&(l(7),h(o.isEditMode()?"Edit user group":"New user group"),l(),g(o.isLoading()?8:9))},dependencies:[$,te,W,Q,ee,q,H,X,Z,Y,re],styles:[".user-group-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-group-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-group-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-group-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-group-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-group-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-group-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-group-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.user-group-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.user-group-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.user-group-form__label-hint[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);margin-left:.375rem}.user-group-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.user-group-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-group-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-group-form__input--invalid[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.user-group-form__input--invalid[_ngcontent-%COMP%]:focus{border-color:var(--color-error, #ff3b30)}.user-group-form__section[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.user-group-form__section-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.user-group-form__empty-hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73);font-style:italic}.user-group-form__agent-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.user-group-form__agent-group-title[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--color-text-secondary, #6e6e73);margin-bottom:.25rem}.user-group-form__agent[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.375rem .5rem;border-radius:6px;cursor:pointer;transition:background .15s ease}.user-group-form__agent[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .03))}.user-group-form__agent--disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.55}.user-group-form__agent--disabled[_ngcontent-%COMP%]:hover{background:transparent}.user-group-form__agent-checkbox[_ngcontent-%COMP%]{flex-shrink:0;accent-color:var(--color-primary, #007aff)}.user-group-form__agent-name[_ngcontent-%COMP%]{font-size:.9rem;color:var(--color-text, #1d1d1f)}.user-group-form__agent-note[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);font-style:italic}.user-group-form__members[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.375rem}.user-group-form__member[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.4rem .5rem;border-radius:8px;background:var(--color-surface-hover, rgba(0, 0, 0, .03));border:1px solid var(--color-border, rgba(0, 0, 0, .08))}.user-group-form__member-info[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.1rem;min-width:0}.user-group-form__member-name[_ngcontent-%COMP%]{font-size:.9rem;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-form__member-email[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-form__member-role[_ngcontent-%COMP%]{flex-shrink:0;padding:.3rem .5rem;border-radius:6px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.8rem;font-family:inherit;cursor:pointer}.user-group-form__member-role[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}.user-group-form__member-remove[_ngcontent-%COMP%]{flex-shrink:0;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:1rem;line-height:1;cursor:pointer;transition:background .15s ease,color .15s ease}.user-group-form__member-remove[_ngcontent-%COMP%]:hover{background:var(--color-error-light, rgba(255, 59, 48, .12));color:var(--color-error, #ff3b30)}.user-group-form__error[_ngcontent-%COMP%]{margin:0;padding:.625rem .875rem;border-radius:8px;background:var(--color-error-light, rgba(255, 59, 48, .08));border:1px solid var(--color-error, #ff3b30);color:var(--color-error, #ff3b30);font-size:.875rem;line-height:1.4}.user-group-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30);line-height:1.3}.user-group-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-group-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-group-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-group-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-group-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-group-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ae as a};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-ENLVIBXZ.js";import{a as D}from"./chunk-5EIDKSSY.js";import"./chunk-VH7ZEMCE.js";import{a as E,c as $}from"./chunk-COLWSJEP.js";import{z as O}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as l}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as x,D as y,Db as m,Fb as a,Lc as T,Pb as N,S as P,Tb as w,Wa as b,ab as v,ca as p,cc as M,fc as B,ga as g,gc as S,ha as h,i as d,jc as k,lb as I,m as u,ma as C,mb as R,rb as s,sb as i,t as f,tb as c,z as _}from"./chunk-3DOXTB6J.js";var F=()=>[];function U(r,t){if(r&1){let o=x();i(0,"agentos-prompt-item",4),m("deleteRequested",function(n){g(o);let A=a(2);return h(A.deletePrompt(n))}),c()}if(r&2){let o=a().$implicit,e=a();s("prompt",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformPrompt(o.id))}}function V(r,t){if(r&1&&I(0,U,1,3,"agentos-prompt-item",3),r&2){let o,e=t.$implicit,n=a();R((o=n.resolvePrompt(e.id))?0:-1,o)}}var j="platform",G="namespace",q=class r{route=p(E);router=p($);destroyRef=p(C);promptState=p(D);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new d(void 0);allPrompts$=this.refresh$.pipe(P(()=>_({platform:this.promptState.listPlatform().pipe(y(()=>u([]))),namespace:this.promptState.listByNamespace(this.namespaceId)})));promptItems$=this.allPrompts$.pipe(f(({platform:t,namespace:o})=>[...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Platform (read-only)"})),...o.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespacePromptsById=new Map;platformPromptsById=new Map;constructor(){this.allPrompts$.pipe(l(this.destroyRef)).subscribe(({platform:t,namespace:o})=>{this.platformPromptsById=new Map(t.map(e=>[e.id??"",e])),this.namespacePromptsById=new Map(o.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(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(t){return this.platformPromptsById.get(t)??this.namespacePromptsById.get(t)??null}isPlatformPrompt(t){return this.platformPromptsById.has(t)}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=b({type:r,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","readOnly"],[3,"deleteRequested","prompt","namespaceId","readOnly"]],template:function(o,e){if(o&1&&(i(0,"ds-entity-list",1),B(1,"async"),m("createRequested",function(){return e.openCreateForm()}),i(2,"button",2),m("click",function(){return e.goBack()}),w(3,"\u2190 Namespaces"),c()(),v(4,V,1,1,"ng-template",null,0,k)),o&2){let n=N(5);s("items",S(1,3,e.promptItems$)??M(5,F))("showCreate",!0)("itemTemplate",n)}},dependencies:[O,L,T],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};
1
+ import{a as L}from"./chunk-ENLVIBXZ.js";import{a as D}from"./chunk-6OUF4MB3.js";import"./chunk-DDBWRK3B.js";import{a as E,c as $}from"./chunk-COLWSJEP.js";import{z as O}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as l}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as x,D as y,Db as m,Fb as a,Lc as T,Pb as N,S as P,Tb as w,Wa as b,ab as v,ca as p,cc as M,fc as B,ga as g,gc as S,ha as h,i as d,jc as k,lb as I,m as u,ma as C,mb as R,rb as s,sb as i,t as f,tb as c,z as _}from"./chunk-3DOXTB6J.js";var F=()=>[];function U(r,t){if(r&1){let o=x();i(0,"agentos-prompt-item",4),m("deleteRequested",function(n){g(o);let A=a(2);return h(A.deletePrompt(n))}),c()}if(r&2){let o=a().$implicit,e=a();s("prompt",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformPrompt(o.id))}}function V(r,t){if(r&1&&I(0,U,1,3,"agentos-prompt-item",3),r&2){let o,e=t.$implicit,n=a();R((o=n.resolvePrompt(e.id))?0:-1,o)}}var j="platform",G="namespace",q=class r{route=p(E);router=p($);destroyRef=p(C);promptState=p(D);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new d(void 0);allPrompts$=this.refresh$.pipe(P(()=>_({platform:this.promptState.listPlatform().pipe(y(()=>u([]))),namespace:this.promptState.listByNamespace(this.namespaceId)})));promptItems$=this.allPrompts$.pipe(f(({platform:t,namespace:o})=>[...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:j,groupLabel:"Platform (read-only)"})),...o.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespacePromptsById=new Map;platformPromptsById=new Map;constructor(){this.allPrompts$.pipe(l(this.destroyRef)).subscribe(({platform:t,namespace:o})=>{this.platformPromptsById=new Map(t.map(e=>[e.id??"",e])),this.namespacePromptsById=new Map(o.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(l(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(t){return this.platformPromptsById.get(t)??this.namespacePromptsById.get(t)??null}isPlatformPrompt(t){return this.platformPromptsById.has(t)}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=b({type:r,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","readOnly"],[3,"deleteRequested","prompt","namespaceId","readOnly"]],template:function(o,e){if(o&1&&(i(0,"ds-entity-list",1),B(1,"async"),m("createRequested",function(){return e.openCreateForm()}),i(2,"button",2),m("click",function(){return e.goBack()}),w(3,"\u2190 Namespaces"),c()(),v(4,V,1,1,"ng-template",null,0,k)),o&2){let n=N(5);s("items",S(1,3,e.promptItems$)??M(5,F))("showCreate",!0)("itemTemplate",n)}},dependencies:[O,L,T],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{a as G}from"./chunk-AIC4U2MU.js";import{a as B}from"./chunk-A2IQII4O.js";import{c as K}from"./chunk-HW7FY6FY.js";import{a as V}from"./chunk-QO3SLUF6.js";import"./chunk-JIYGZGAO.js";import"./chunk-FIDJLAO5.js";import"./chunk-DDBWRK3B.js";import{a as N,c as $}from"./chunk-COLWSJEP.js";import{s as L,z as P}from"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import{a as l}from"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import{Bb as b,Db as u,Fb as o,Ka as A,Lc as M,Pb as x,S as f,Tb as E,Ub as w,Wa as v,ab as C,ca as a,cc as D,fc as O,ga as c,gc as T,ha as m,jc as q,lb as I,m as _,ma as S,mb as R,rb as h,sb as p,t as g,ta as y,tb as d}from"./chunk-3DOXTB6J.js";var W=()=>[];function z(s,e){if(s&1&&(p(0,"p",3),E(1),d()),s&2){let t=o().$implicit;A(),w(t.name)}}function U(s,e){if(s&1){let t=b();p(0,"agentos-auth-setting-item",5),u("editRequested",function(){let n=c(t),r=o(2);return m(r.onEdit(n))})("deleteRequested",function(){let n=c(t),r=o(2);return m(r.onDelete(n))})("duplicateRequested",function(){let n=c(t),r=o(2);return m(r.onDuplicate(n))}),d()}if(s&2){let t=e,i=o(2);h("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!i.isAdmin())}}function X(s,e){if(s&1&&I(0,z,2,1,"p",3)(1,U,1,3,"agentos-auth-setting-item",4),s&2){let t,i=e.$implicit,n=o();R(n.isEmptyPlaceholder(i.id)?0:(t=n.resolve(i.id))?1:-1,t)}}var k=Object.freeze({platform:"Platform (read-only)",namespace:"Auth Settings du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class s{route=a(N);router=a($);destroyRef=a(S);state=a(K);namespaceRole=a(V);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=y(!1);listItems$=this.state.vm$.pipe(g(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(l(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(g(e=>e.get("namespaceId")??""),f(e=>e?this.namespaceRole.isAdminOfNamespace$(e):_(!1)),l(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(l(this.destroyRef)).subscribe(e=>{let t=new Map;e.platform.forEach(i=>{i.id&&t.set(this.itemKey("platform",i.id),{config:i,scope:"platform"})}),e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=t})}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return`${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"auth-settings","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"auth-settings",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(l(this.destroyRef)).subscribe({error:i=>{console.error(`[AuthSettingsAllScopes] Delete failed for ${e.scope}:${t}:`,i)}})}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"auth-settings","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun Auth Setting",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.authType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=v({type:s,selectors:[["agentos-auth-settings-all-scopes"]],decls:5,vars:6,consts:[["authSettingItemTpl",""],["title","Auth Settings","emptyMessage","No auth settings available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"auth-settings-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(p(0,"ds-entity-list",1),O(1,"async"),u("createRequested",function(){return i.openCreateForm()}),p(2,"ds-icon-button",2),u("action",function(){return i.goBack()}),d()(),C(3,X,2,1,"ng-template",null,0,q)),t&2){let n=x(4);h("items",T(1,3,i.listItems$)??D(5,W))("showCreate",!0)("itemTemplate",n)}},dependencies:[P,B,L,M],encapsulation:2,changeDetection:0})};export{j as AuthSettingsAllScopesComponent};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-JIYGZGAO.js";import{a as f}from"./chunk-FIDJLAO5.js";import{e as b}from"./chunk-DDBWRK3B.js";import{D as a,P as D,S as T,V as S,Z as m,a as h,b as A,ca as c,i as l,m as o,t as r,u as g}from"./chunk-3DOXTB6J.js";var q=["ApiKeyAuthSetting","BasicAuthAuthSetting","BearerTokenAuthSetting","OAuthDiscoverableAuthSetting","OAuthMcpDiscoverableAuthSetting","OAuthCustomAuthSetting","OAuthRegisteredAuthSetting"],J={ApiKeyAuthSetting:"API Key",BasicAuthAuthSetting:"Basic Auth (username / password)",BearerTokenAuthSetting:"Bearer Token",OAuthDiscoverableAuthSetting:"OAuth \u2014 Discovery URL",OAuthMcpDiscoverableAuthSetting:"OAuth \u2014 MCP Discoverable",OAuthCustomAuthSetting:"OAuth \u2014 Custom endpoints",OAuthRegisteredAuthSetting:"OAuth \u2014 Registered app"},_="none",C="me",I={ApiKeyAuthSetting:"API_KEY",BasicAuthAuthSetting:"BASIC_AUTH",BearerTokenAuthSetting:"BEARER_TOKEN",OAuthDiscoverableAuthSetting:"OAUTH_DISCOVERABLE",OAuthMcpDiscoverableAuthSetting:"OAUTH_MCP_DISCOVERABLE",OAuthCustomAuthSetting:"OAUTH_CUSTOM",OAuthRegisteredAuthSetting:"OAUTH_REGISTERED"},U={API_KEY:"ApiKeyAuthSetting",BASIC_AUTH:"BasicAuthAuthSetting",BEARER_TOKEN:"BearerTokenAuthSetting",OAUTH_DISCOVERABLE:"OAuthDiscoverableAuthSetting",OAUTH_MCP_DISCOVERABLE:"OAuthMcpDiscoverableAuthSetting",OAUTH_CUSTOM:"OAuthCustomAuthSetting",OAUTH_REGISTERED:"OAuthRegisteredAuthSetting"};function E(n){let t=I[n.authType];return t?A(h({},n),{authType:t}):n}function d(n){return R(n)}function O(n){return n.map(R)}function R(n){let t=n;if(typeof t.authType=="string"){let e=U[t.authType];if(e)return A(h({},t),{authType:e})}return n}var v=class n{controller=c(b);userState=c(f);refresh$=new l(void 0);namespaceId$=new l(null);vm$=g([this.namespaceId$,this.refresh$]).pipe(T(([t])=>{let e=this.loadPlatformSettings().pipe(a(()=>o([])));return t?g([e,this.loadNamespaceSettings(t).pipe(a(()=>o([]))),this.loadUserSettings(t).pipe(a(()=>o([]))),this.loadUserSettings("global").pipe(a(()=>o([])))]).pipe(r(([i,s,u,p])=>({platform:i,namespace:s,userOnNs:u,userGlobal:p}))):g([e,this.loadNamespaceSettings("").pipe(a(()=>o([]))),this.loadUserSettings("global").pipe(a(()=>o([])))]).pipe(r(([i,s,u])=>({platform:i,namespace:s,userOnNs:[],userGlobal:u})))}),D({bufferSize:1,refCount:!0}));setNamespace(t){this.namespaceId$.value!==t&&this.namespaceId$.next(t)}refresh(){this.refresh$.next()}loadUserSettings(t){let e=t==="global"?_:t;return this.controller.listAuthSetting(e,C).pipe(r(i=>O(i)))}userGlobal$=y(this.refresh$,()=>this.loadUserSettings("global"),[]);loadPlatformSettings(){return this.controller.listAuthSetting().pipe(r(t=>O(t)))}loadNamespaceSettings(t){return t?this.controller.listAuthSetting(t).pipe(r(e=>O(e))):o([])}getById(t,e){return this.controller.getByIdAuthSetting(t).pipe(r(i=>d(i)))}create(t,e,i){let u=this.userState.currentUser()?.id;if((e==="userOnNs"||e==="userGlobal")&&!u)throw new Error(`Cannot create ${e} auth setting before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(e==="namespace"&&(i===void 0||i===""))throw new Error("Cannot create namespace-scoped auth setting without a namespaceId");if(e==="userOnNs"&&!i)throw new Error("Cannot create userOnNs auth setting without a namespaceId");let p=E(A(h({},t),{namespaceId:e==="namespace"||e==="userOnNs"?i??void 0:void 0,userId:e==="userOnNs"||e==="userGlobal"?u:void 0}));return this.controller.createAuthSetting(p).pipe(r(B=>d(B)),S(()=>this.refresh()))}update(t,e,i){let s=E(A(h({},e),{namespaceId:i.namespaceId,userId:i.userId,authType:i.authType}));return this.controller.updateAuthSetting(t,s).pipe(r(u=>d(u)),S(()=>this.refresh()))}delete(t,e){return this.controller.deleteAuthSetting(t).pipe(S(()=>this.refresh()))}static \u0275fac=function(e){return new(e||n)};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})};export{q as a,J as b,v as c};
@@ -1 +1 @@
1
- import{a}from"./chunk-ZGOOG7E4.js";import"./chunk-FS4CUJQH.js";import"./chunk-VH7ZEMCE.js";import"./chunk-COLWSJEP.js";import"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import"./chunk-3DOXTB6J.js";export{a as UserGroupFormComponent};
1
+ import{a}from"./chunk-GVUZDCHM.js";import"./chunk-C7HN2AHW.js";import"./chunk-DDBWRK3B.js";import"./chunk-COLWSJEP.js";import"./chunk-2X6HKQMK.js";import"./chunk-EGMTTOHU.js";import"./chunk-TQXOFKZO.js";import"./chunk-PUWEEZSA.js";import"./chunk-WXFL4OGQ.js";import"./chunk-ZJV25K6M.js";import"./chunk-GO5IXCK2.js";import"./chunk-3DOXTB6J.js";export{a as UserGroupFormComponent};