@whoz-oss/coday-client 0.194.1 → 0.196.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 (53) hide show
  1. package/browser/{chunk-NCAQB4YV.js → chunk-5AH4NMNL.js} +1 -1
  2. package/browser/chunk-64JAXTG4.js +1 -0
  3. package/browser/chunk-72EDCCJQ.js +1 -0
  4. package/browser/{chunk-3W6IABF7.js → chunk-ASYQJGDW.js} +1 -1
  5. package/browser/chunk-BUWF3ZQM.js +1 -0
  6. package/browser/chunk-CL3ICOAL.js +1 -0
  7. package/browser/{chunk-MSZ6ZUVB.js → chunk-DGE527NX.js} +1 -1
  8. package/browser/chunk-ESOYLXDB.js +1 -0
  9. package/browser/{chunk-VXYHLVHD.js → chunk-GJ6TA25Y.js} +1 -1
  10. package/browser/{chunk-6DJI2ISP.js → chunk-GS2XHWWW.js} +1 -1
  11. package/browser/{chunk-FFVZGJTH.js → chunk-GVCHIF5U.js} +1 -1
  12. package/browser/{chunk-VO2S7HEJ.js → chunk-H5QMVJMP.js} +1 -1
  13. package/browser/{chunk-FOKX6I2Z.js → chunk-HMYJY2DG.js} +1 -1
  14. package/browser/{chunk-TI3SOE5U.js → chunk-I4DIX2BH.js} +1 -1
  15. package/browser/chunk-I7PMQXOL.js +1 -0
  16. package/browser/{chunk-K6LN2G4S.js → chunk-IEIHNRZE.js} +1 -1
  17. package/browser/{chunk-HYLANQ7S.js → chunk-IMS2BEZA.js} +1 -1
  18. package/browser/chunk-IVKX5B6K.js +1 -0
  19. package/browser/chunk-IYWU3G5O.js +1 -0
  20. package/browser/chunk-J6KORXMO.js +1 -0
  21. package/browser/{chunk-O6C6CMJB.js → chunk-JL4IPJT5.js} +1 -1
  22. package/browser/chunk-JMHTBAFK.js +1 -0
  23. package/browser/{chunk-Q2OIC5K4.js → chunk-JYA4K7VB.js} +1 -1
  24. package/browser/chunk-K6BO32I7.js +1 -0
  25. package/browser/{chunk-4H3JC44E.js → chunk-KFTYMWZ4.js} +1 -1
  26. package/browser/chunk-LGN67WP4.js +1 -0
  27. package/browser/{chunk-365PC3K4.js → chunk-MNRESS2L.js} +1 -1
  28. package/browser/{chunk-EYVMSUTE.js → chunk-NKNHWFYH.js} +1 -1
  29. package/browser/{chunk-TGB7TH4A.js → chunk-OPMZ42FI.js} +1 -1
  30. package/browser/chunk-P2XSTJQN.js +1 -0
  31. package/browser/{chunk-RXFB3YPJ.js → chunk-TFL7UOY7.js} +1 -1
  32. package/browser/{chunk-GNOWUH32.js → chunk-UNM7FXGM.js} +1 -1
  33. package/browser/{chunk-NQFFZYA5.js → chunk-UXIUSXZT.js} +1 -1
  34. package/browser/{chunk-QK5VCYWD.js → chunk-V43NZ7XP.js} +1 -1
  35. package/browser/{chunk-673LAQ67.js → chunk-VOZI5GZY.js} +1 -1
  36. package/browser/{chunk-PGVRQZPL.js → chunk-XAAHUCLS.js} +1 -1
  37. package/browser/{chunk-FHXSOZNH.js → chunk-XLXMYPNG.js} +1 -1
  38. package/browser/{chunk-6LKSZT23.js → chunk-XYPFMBMS.js} +1 -1
  39. package/browser/{chunk-ZMRRZN4Q.js → chunk-XZRCNGKM.js} +1 -1
  40. package/browser/chunk-Y5A4URQQ.js +1 -0
  41. package/browser/index.html +1 -1
  42. package/browser/{main-7S5SBCQK.js → main-SLDWBKWH.js} +1 -1
  43. package/package.json +1 -1
  44. package/browser/chunk-5KQRRBRM.js +0 -1
  45. package/browser/chunk-BD2JL3TM.js +0 -1
  46. package/browser/chunk-FYV2X4OT.js +0 -1
  47. package/browser/chunk-NNX3PDIS.js +0 -1
  48. package/browser/chunk-OUX4W4H3.js +0 -1
  49. package/browser/chunk-RGTFHBKY.js +0 -1
  50. package/browser/chunk-SAZYNLEH.js +0 -1
  51. package/browser/chunk-TB64Y6NI.js +0 -1
  52. package/browser/chunk-YL4UR34K.js +0 -1
  53. package/browser/chunk-YUBIVG2D.js +0 -1
@@ -1 +1 @@
1
- import{b as a}from"./chunk-673LAQ67.js";import"./chunk-YUBIVG2D.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
1
+ import{b as a}from"./chunk-VOZI5GZY.js";import"./chunk-BUWF3ZQM.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
@@ -0,0 +1 @@
1
+ import{d as y}from"./chunk-4GVABYH4.js";import{p as w,v as I}from"./chunk-WV7ML4CJ.js";import{Bb as u,Db as p,Fb as d,Ka as r,Tb as m,Ub as g,Vb as h,Wa as C,ca as f,ga as s,ha as c,lb as v,mb as x,oa as _,rb as M,sb as t,ta as b,tb as i}from"./chunk-B4RKRLIY.js";function A(n,a){if(n&1){let e=u();t(0,"span",7),m(1,"Delete?"),i(),t(2,"ds-icon-button",8),p("action",function(){s(e);let l=d();return c(l.onDeleteConfirmed())}),i(),t(3,"ds-icon-button",9),p("action",function(){s(e);let l=d();return c(l.onDeleteCancelled())}),i()}}function O(n,a){if(n&1){let e=u();t(0,"ds-kebab-menu",10),p("itemSelected",function(l){s(e);let k=d();return c(k.onMenuAction(l))}),i()}if(n&2){let e=d();M("items",e.menuItems)}}var D=class n{router=f(y);model;namespaceId;deleteRequested=new _;editRequested=new _;pendingDelete=b(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model.alias??this.model.apiModelName}onMenuAction(a){switch(a){case"edit":this.editRequested.observed?this.editRequested.emit(this.model):this.namespaceId&&this.router.navigate(["/agentos",this.namespaceId,"ai-models",this.model.id,"edit"]);break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model)}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=C({type:n,selectors:[["agentos-ai-model-item"]],inputs:{model:"model",namespaceId:"namespaceId"},outputs:{deleteRequested:"deleteRequested",editRequested:"editRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(t(0,"div",0)(1,"div",1)(2,"span",2),m(3),i(),t(4,"span",3),m(5),i(),t(6,"span",4)(7,"span"),m(8),i()()(),t(9,"div",5),v(10,A,4,0)(11,O,1,1,"ds-kebab-menu",6),i()()),e&2&&(r(3),g(o.displayTitle),r(2),g(o.model.apiModelName),r(3),h("priority: ",o.model.priority),r(2),x(o.pendingDelete()?10:11))},dependencies:[I,w],styles:[".ai-model-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};export{D as a};
@@ -0,0 +1 @@
1
+ import{a as ne}from"./chunk-CL3ICOAL.js";import{a as ie}from"./chunk-H5QMVJMP.js";import"./chunk-T3IUNA6F.js";import"./chunk-NKNHWFYH.js";import{l as L}from"./chunk-BUWF3ZQM.js";import{b as K,d as G}from"./chunk-4GVABYH4.js";import{a as A,c as B}from"./chunk-V363EHJE.js";import{F as oe,c as z,e as _,g as $,h as q,i as S,l as p,n as j,p as H,r as J,s as Q,t as W,u as X,v as Y,w as Z,x as ee,y as re,z as te}from"./chunk-HZF57OLY.js";import{Bb as k,Db as v,Fb as m,Ka as l,Tb as i,Ub as P,Vb as U,Wa as I,ca as f,ga as g,ha as h,kb as V,lb as M,ma as N,mb as O,nb as R,ob as D,pb as C,qb as x,rb as d,sb as o,ta as y,tb as t,ua as T,ub as u}from"./chunk-B4RKRLIY.js";function de(n,r){n&1&&(o(0,"p",5),i(1,"Loading\u2026"),t())}function pe(n,r){if(n&1&&(o(0,"label",30),u(1,"input",31),o(2,"span"),i(3),t()()),n&2){let e=r.$implicit,a=m(3);l(),d("formControl",a.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!a.isAdmin()),l(2),P(e.label)}}function me(n,r){if(n&1&&(o(0,"fieldset",8)(1,"legend",24),i(2,"Port\xE9e de la configuration"),t(),C(3,pe,4,4,"label",30,V().trackByScope,!0),t()),n&2){let e=m(2);d("disabled",e.isEditMode()),l(3),x(e.scopeOptions)}}function ce(n,r){if(n&1&&(o(0,"option",13),i(1),t()),n&2){let e=r.$implicit;d("value",e),l(),P(e)}}function ue(n,r){if(n&1){let e=k();o(0,"div",26),u(1,"input",32)(2,"input",33),o(3,"button",34),v("click",function(){let s=g(e).$index,c=m(2);return h(c.removeHeader(s))}),i(4," \xD7 "),t()()}if(n&2){let e=r.$index;d("formGroupName",e)}}function fe(n,r){if(n&1){let e=k();o(0,"form",7),v("ngSubmit",function(){g(e);let s=m();return h(s.submit())}),M(1,me,5,1,"fieldset",8),o(2,"div",9)(3,"label",10),i(4,"API type "),o(5,"span",11),i(6,"*"),t()(),o(7,"select",12),C(8,ce,2,2,"option",13,D),t()(),o(10,"div",9)(11,"label",14),i(12,"Name "),o(13,"span",11),i(14,"*"),t()(),u(15,"input",15),t(),o(16,"div",9)(17,"label",16),i(18,"Description"),t(),u(19,"input",17),t(),o(20,"div",9)(21,"label",18),i(22,"Base URL"),t(),u(23,"input",19),t(),o(24,"div",9)(25,"label",20),i(26,"API key"),t(),u(27,"input",21),t(),o(28,"div",22)(29,"div",23)(30,"span",24),i(31,"Custom headers"),t(),o(32,"button",25),v("click",function(){g(e);let s=m();return h(s.addHeader())}),i(33,"+ Add header"),t()(),C(34,ue,5,1,"div",26,R),t(),o(36,"div",27)(37,"button",28),i(38),t(),o(39,"button",29),v("click",function(){g(e);let s=m();return h(s.cancel())}),i(40,"Cancel"),t()()()}if(n&2){let e=m();d("formGroup",e.form),l(),O(e.isPlatformMode?-1:1),l(6),d("formControl",e.apiTypeControl),l(),x(e.apiTypeOptions),l(7),d("formControl",e.nameControl),l(4),d("formControl",e.descriptionControl),l(4),d("formControl",e.baseUrlControl),l(4),d("formControl",e.apiKeyControl),l(),d("formArrayName","headers"),l(6),x(e.headersArray.controls),l(3),d("disabled",e.form.invalid||e.isSubmitting()),l(),U(" ",e.isEditMode()?"Save changes":"Create"," ")}}var ve=new Set(["namespace","userOnNs","userGlobal"]),E=Object.freeze({namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ae=class n{route=f(K);router=f(G);destroyRef=f(N);state=f(ne);namespaceRole=f(ie);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?y(!0):B(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:!1});apiTypeOptions=Object.values(L);scopeOptions=[{value:"namespace",label:E.namespace},{value:"userOnNs",label:E.userOnNs},{value:"userGlobal",label:E.userGlobal}];form=new S({name:new p("",{nonNullable:!0,validators:[_.required,_.minLength(1)]}),description:new p(null),apiType:new p("OpenAI",{nonNullable:!0,validators:[_.required]}),baseUrl:new p("",{nonNullable:!0}),apiKey:new p("",{nonNullable:!0}),scope:new p("namespace",{nonNullable:!0}),headers:new J([],{validators:[]})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get apiTypeControl(){return this.form.controls.apiType}get baseUrlControl(){return this.form.controls.baseUrl}get apiKeyControl(){return this.form.controls.apiKey}get scopeControl(){return this.form.controls.scope}get headersArray(){return this.form.controls.headers}addHeader(){this.headersArray.push(new S({key:new p("",{nonNullable:!0,validators:[_.required]}),value:new p("",{nonNullable:!0})}))}removeHeader(r){this.headersArray.removeAt(r)}isEditMode=y(!1);isSubmitting=y(!1);isLoading=y(!1);existingConfig=null;initialApiKey="";constructor(){this.isPlatformMode||T(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let r=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,a=r.get("aiProviderId"),s=this.isPlatformMode?"namespace":this.parseScope(e.get("scope"));if(a){this.isEditMode.set(!0),this.scopeControl.disable(),this.apiTypeControl.disable(),this.loadConfig(a);return}this.scopeControl.setValue(s);let c=e.get("template");c&&this.hydrateFromTemplate(c)}parseScope(r){return r&&ve.has(r)?r:"namespace"}deriveScopeFromConfig(r){return!r.userId?"namespace":r.namespaceId?"userOnNs":"userGlobal"}loadConfig(r){this.isLoading.set(!0),this.state.getById(r).pipe(A(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[AiProviderForm] Could not load provider '${r}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(r){this.isLoading.set(!0),this.state.getById(r).pipe(A(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.apiTypeControl.setValue(e.apiType),this.baseUrlControl.setValue(e.baseUrl??""),this.apiKeyControl.setValue(""),this.initialApiKey="",this.apiKeyControl.markAsTouched(),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:e=>{console.warn(`[AiProviderForm] Could not hydrate from template ${r}:`,e),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(r){this.nameControl.setValue(r.name),this.descriptionControl.setValue(r.description??null),this.apiTypeControl.setValue(r.apiType),this.baseUrlControl.setValue(r.baseUrl??"");let e=r.apiKey??"";this.apiKeyControl.setValue(e),this.initialApiKey=e,this.headersArray.clear();for(let[a,s]of Object.entries(r.headers??{}))this.headersArray.push(new S({key:new p(a,{nonNullable:!0,validators:[_.required]}),value:new p(s,{nonNullable:!0})}))}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let r=this.descriptionControl.value?.trim(),e=this.baseUrlControl.value.trim(),a=this.apiKeyControl.value,s=this.isEditMode()&&a===this.initialApiKey?null:a,c=this.headersArray.controls.filter(b=>b.controls.key.value.trim()).map(b=>[b.controls.key.value.trim(),b.controls.value.value]),le=c.length>0?Object.fromEntries(c):null,w={name:this.nameControl.value.trim(),apiType:this.apiTypeControl.value,description:r||null,baseUrl:e||null,apiKey:s,headers:le},F=this.form.getRawValue().scope,se=this.isPlatformMode?null:this.namespaceId??null;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,F,this.existingConfig):this.state.create(w,F,se)).pipe(A(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-providers"]):this.router.navigate(["/agentos",this.namespaceId,"ai-providers"])}trackByScope(r,e){return e.value}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["agentos-ai-provider-form"]],decls:10,vars:2,consts:[[1,"ai-provider-form"],[1,"ai-provider-form__header"],["type","button","title","Back to AI providers",1,"ai-provider-form__back",3,"click"],[1,"ai-provider-form__back-icon"],[1,"ai-provider-form__title"],[1,"ai-provider-form__loading"],[1,"ai-provider-form__form",3,"formGroup"],[1,"ai-provider-form__form",3,"ngSubmit","formGroup"],[1,"ai-provider-form__scope",3,"disabled"],[1,"ai-provider-form__field"],["for","llm-api-type",1,"ai-provider-form__label"],["aria-hidden","true"],["id","llm-api-type",1,"ai-provider-form__select",3,"formControl"],[3,"value"],["for","llm-name",1,"ai-provider-form__label"],["id","llm-name","type","text","placeholder","e.g. OpenAI prod","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-description",1,"ai-provider-form__label"],["id","llm-description","type","text","placeholder","Optional \u2014 short description of this provider","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-base-url",1,"ai-provider-form__label"],["id","llm-base-url","type","url","placeholder","Optional \u2014 leave empty for default endpoint","autocomplete","off",1,"ai-provider-form__input",3,"formControl"],["for","llm-api-key",1,"ai-provider-form__label"],["id","llm-api-key","type","password","placeholder","sk-\u2026","autocomplete","new-password",1,"ai-provider-form__input","ai-provider-form__input--secret",3,"formControl"],[1,"ai-provider-form__headers",3,"formArrayName"],[1,"ai-provider-form__headers-title"],[1,"ai-provider-form__label"],["type","button",1,"ai-provider-form__headers-add",3,"click"],[1,"ai-provider-form__header-row",3,"formGroupName"],[1,"ai-provider-form__actions"],["type","submit",1,"ai-provider-form__btn","ai-provider-form__btn--primary",3,"disabled"],["type","button",1,"ai-provider-form__btn",3,"click"],[1,"ai-provider-form__scope-option"],["type","radio",3,"formControl","value","disabled"],["type","text","placeholder","Header name","formControlName","key","autocomplete","off",1,"ai-provider-form__input"],["type","text","placeholder","Value","formControlName","value","autocomplete","off",1,"ai-provider-form__input"],["type","button","title","Remove header","aria-label","Remove header",1,"ai-provider-form__header-remove",3,"click"]],template:function(e,a){e&1&&(o(0,"div",0)(1,"header",1)(2,"button",2),v("click",function(){return a.cancel()}),o(3,"span",3),i(4,"\u2190"),t(),i(5," AI Providers "),t(),o(6,"h1",4),i(7),t()(),M(8,de,2,0,"p",5)(9,fe,41,10,"form",6),t()),e&2&&(l(7),P(a.isEditMode()?"Edit AI provider":"New AI provider"),l(),O(a.isLoading()?8:9))},dependencies:[oe,j,re,te,z,ee,H,$,q,Q,Z,Y,W,X],styles:[".ai-provider-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.ai-provider-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border);border-radius:8px;padding:.75rem 1rem;margin:0}.ai-provider-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.ai-provider-form__scope-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--color-text);cursor:pointer}.ai-provider-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.ai-provider-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.ai-provider-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.ai-provider-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.ai-provider-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.ai-provider-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.ai-provider-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.ai-provider-form__input[_ngcontent-%COMP%], .ai-provider-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.ai-provider-form__input[_ngcontent-%COMP%]:focus, .ai-provider-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.ai-provider-form__input[_ngcontent-%COMP%]::placeholder, .ai-provider-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.ai-provider-form__input--secret[_ngcontent-%COMP%]{font-family:monospace;letter-spacing:.05em}.ai-provider-form__headers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.ai-provider-form__headers-title[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.ai-provider-form__headers-add[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.8125rem;font-family:inherit;color:var(--color-primary, #007aff)}.ai-provider-form__headers-add[_ngcontent-%COMP%]:hover{text-decoration:underline}.ai-provider-form__header-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr auto;gap:.5rem;align-items:center}.ai-provider-form__header-remove[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:6px;cursor:pointer;font-size:1rem;color:var(--color-text-secondary, #6e6e73);transition:background .15s ease;flex-shrink:0}.ai-provider-form__header-remove[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-provider-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.ai-provider-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.ai-provider-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.ai-provider-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.ai-provider-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.ai-provider-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 AiProviderFormComponent};
@@ -1 +1 @@
1
- import{a as L}from"./chunk-KWZFKFOK.js";import{b as z}from"./chunk-YUBIVG2D.js";import"./chunk-FPNEFWYN.js";import{b as T,d as A,e as D}from"./chunk-4GVABYH4.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as b,Db as f,Fb as l,Ga as M,Ka as r,Rb as u,Tb as a,Ub as p,Vb as h,Wa as I,ca as _,dc as O,ec as w,ga as C,ha as x,jb as v,lb as d,ma as P,mb as s,pb as S,qb as E,rb as y,sb as i,ta as m,tb as t,ub as k}from"./chunk-B4RKRLIY.js";var F=(n,o)=>o.name;function B(n,o){n&1&&(i(0,"p",6),a(1,"Loading\u2026"),t())}function $(n,o){n&1&&(i(0,"p",7),a(1,"Failed to load agent definition."),t())}function j(n,o){if(n&1&&(i(0,"dt",12),a(1,"User context"),t(),i(2,"dd",14),a(3),t()),n&2){let e=l();r(3),p(e.userId)}}function H(n,o){if(n&1&&(i(0,"pre",21),a(1),t()),n&2){let e=l(2);r(),p(e.systemPrompt)}}function J(n,o){if(n&1){let e=b();i(0,"section",9)(1,"button",19),f("click",function(){C(e);let g=l(2);return x(g.toggleSystemPrompt())}),i(2,"h2",10),a(3,"System Prompt"),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,H,2,1,"pre",21),t()}if(n&2){let e=l(2);r(),v("aria-expanded",!e.systemPromptCollapsed()),r(3),u("agent-config-inspect__chevron--open",!e.systemPromptCollapsed()),r(2),s(e.systemPromptCollapsed()?-1:6)}}function U(n,o){if(n&1&&(i(0,"pre",21),a(1),t()),n&2){let e=l(2);r(),p(e.instructions)}}function G(n,o){if(n&1){let e=b();i(0,"section",9)(1,"button",19),f("click",function(){C(e);let g=l(2);return x(g.toggleInstructions())}),i(2,"h2",10),a(3,"Instructions"),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,U,2,1,"pre",21),t()}if(n&2){let e=l(2);r(),v("aria-expanded",!e.instructionsCollapsed()),r(3),u("agent-config-inspect__chevron--open",!e.instructionsCollapsed()),r(2),s(e.instructionsCollapsed()?-1:6)}}function q(n,o){n&1&&(i(0,"p",17),a(1,"No tools available for this agent."),t())}function K(n,o){if(n&1&&(k(0,"div",26),O(1,"agentosMarkdown")),n&2){let e=l(2).$implicit;y("innerHTML",w(1,1,e.description),M)}}function Q(n,o){if(n&1&&(i(0,"div",25),d(1,K,2,3,"div",26),i(2,"pre",27),a(3),t()()),n&2){let e=l().$implicit,c=l(3);r(),s(e.description?1:-1),r(2),p(c.formatSchema(e.inputSchema))}}function W(n,o){if(n&1){let e=b();i(0,"li",22)(1,"button",23),f("click",function(){let g=C(e).$implicit,V=l(3);return x(V.toggleTool(g))}),i(2,"span",24),a(3),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,Q,4,2,"div",25),t()}if(n&2){let e=o.$implicit,c=l(3);r(),v("aria-expanded",c.isToolExpanded(e)),r(2),p(e.name),r(),u("agent-config-inspect__chevron--open",c.isToolExpanded(e)),r(2),s(c.isToolExpanded(e)?6:-1)}}function X(n,o){if(n&1&&(i(0,"ul",18),S(1,W,7,5,"li",22,F),t()),n&2){let e=l();r(),E(e.tools)}}function Y(n,o){if(n&1&&(i(0,"div",8)(1,"section",9)(2,"h2",10),a(3,"General"),t(),i(4,"dl",11)(5,"dt",12),a(6,"Name"),t(),i(7,"dd",13),a(8),t(),i(9,"dt",12),a(10,"Resolved model"),t(),i(11,"dd",14),a(12),t(),i(13,"dt",12),a(14,"Provider"),t(),i(15,"dd",13),a(16),t(),i(17,"dt",12),a(18,"Advanced execution"),t(),i(19,"dd",13)(20,"span",15),a(21),t()(),d(22,j,4,1),t()(),d(23,J,7,4,"section",9),d(24,G,7,4,"section",9),i(25,"section",9)(26,"h2",10),a(27," Tools "),i(28,"span",16),a(29),t()(),d(30,q,2,0,"p",17)(31,X,3,0,"ul",18),t()()),n&2){let e=o;r(8),p(e.name),r(4),p(e.resolvedModelApiName),r(4),p(e.resolvedProviderName),r(4),u("agent-config-inspect__badge--active",e.advancedExecution),r(),h(" ",e.advancedExecution?"Enabled":"Disabled"," "),r(),s(e.userId?22:-1),r(),s(e.systemPrompt?23:-1),r(),s(e.instructions?24:-1),r(5),h("(",e.tools.length,")"),r(),s(e.tools.length===0?30:31)}}var R=class n{route=_(T);router=_(A);destroyRef=_(P);agentConfigController=_(z);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;isPlatformMode=!this.namespaceId;isLoading=m(!0);hasError=m(!1);definition=m(null);expandedTools=m(new Set);systemPromptCollapsed=m(!0);instructionsCollapsed=m(!0);ngOnInit(){this.agentConfigController.getDefinitionAgentConfig(this.agentConfigId).pipe(N(this.destroyRef)).subscribe({next:o=>{this.definition.set(o),this.isLoading.set(!1)},error:()=>{this.hasError.set(!0),this.isLoading.set(!1)}})}toggleTool(o){this.expandedTools.update(e=>{let c=new Set(e);return c.has(o.name)?c.delete(o.name):c.add(o.name),c})}isToolExpanded(o){return this.expandedTools().has(o.name)}toggleSystemPrompt(){this.systemPromptCollapsed.update(o=>!o)}toggleInstructions(){this.instructionsCollapsed.update(o=>!o)}formatSchema(o){try{return JSON.stringify(JSON.parse(o),null,2)}catch(e){return o}}editRoute(){return this.isPlatformMode?["/agentos","admin","agent-configs",this.agentConfigId,"edit"]:["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["agentos-agent-config-inspect"]],decls:13,vars:2,consts:[[1,"agent-config-inspect"],[1,"agent-config-inspect__header"],["type","button","title","Back to agent configs",1,"agent-config-inspect__back",3,"click"],[1,"agent-config-inspect__back-icon"],[1,"agent-config-inspect__title"],[1,"agent-config-inspect__sibling-link",3,"routerLink"],[1,"agent-config-inspect__loading"],[1,"agent-config-inspect__error"],[1,"agent-config-inspect__content"],[1,"agent-config-inspect__section"],[1,"agent-config-inspect__section-title"],[1,"agent-config-inspect__dl"],[1,"agent-config-inspect__dt"],[1,"agent-config-inspect__dd"],[1,"agent-config-inspect__dd","agent-config-inspect__dd--mono"],[1,"agent-config-inspect__badge"],[1,"agent-config-inspect__count"],[1,"agent-config-inspect__empty"],[1,"agent-config-inspect__tools"],["type","button",1,"agent-config-inspect__collapsible",3,"click"],[1,"agent-config-inspect__chevron"],[1,"agent-config-inspect__instructions"],[1,"agent-config-inspect__tool"],["type","button",1,"agent-config-inspect__tool-header",3,"click"],[1,"agent-config-inspect__tool-name"],[1,"agent-config-inspect__tool-body"],[1,"agent-config-inspect__tool-description",3,"innerHTML"],[1,"agent-config-inspect__schema"]],template:function(e,c){if(e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return c.back()}),i(3,"span",3),a(4,"\u2190"),t(),a(5," Agent Configs "),t(),i(6,"h1",4),a(7,"Agent definition"),t(),i(8,"a",5),a(9,"Edit config \u2192"),t()(),d(10,B,2,0,"p",6)(11,$,2,0,"p",7)(12,Y,32,11,"div",8),t()),e&2){let g;r(8),y("routerLink",c.editRoute()),r(2),s(c.isLoading()?10:c.hasError()?11:(g=c.definition())?12:-1,g)}},dependencies:[D,L],styles:[".agent-config-inspect[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:720px;margin:0 auto;padding:2rem 1rem}.agent-config-inspect__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-inspect__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.agent-config-inspect__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-inspect__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-inspect__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.agent-config-inspect__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-primary, #007aff);text-decoration:none}.agent-config-inspect__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-inspect__loading[_ngcontent-%COMP%], .agent-config-inspect__error[_ngcontent-%COMP%], .agent-config-inspect__empty[_ngcontent-%COMP%]{margin:0;font-size:.9rem;color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__error[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-config-inspect__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.agent-config-inspect__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.25rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:10px}.agent-config-inspect__section-title[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f)}.agent-config-inspect__count[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;margin-left:.25rem}.agent-config-inspect__dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1.25rem;margin:0}.agent-config-inspect__dt[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);align-self:center}.agent-config-inspect__dd[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;color:var(--color-text, #1d1d1f);align-self:center;word-break:break-word}.agent-config-inspect__dd--mono[_ngcontent-%COMP%]{font-family:monospace;font-size:.875rem}.agent-config-inspect__badge[_ngcontent-%COMP%]{display:inline-block;padding:.2em .6em;border-radius:4px;font-size:.75rem;font-weight:500;background:var(--color-surface-muted, rgba(0, 0, 0, .06));color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__badge--active[_ngcontent-%COMP%]{background:var(--color-success-bg, #e3f5e1);color:var(--color-success, #34c759)}.agent-config-inspect__collapsible[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;background:none;border:none;padding:0;cursor:pointer;font-family:inherit;text-align:left}.agent-config-inspect__chevron[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-secondary, #6e6e73);transition:transform .15s ease;flex-shrink:0}.agent-config-inspect__chevron--open[_ngcontent-%COMP%]{transform:rotate(180deg)}.agent-config-inspect__instructions[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;border-radius:6px;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.875rem;font-family:inherit;color:var(--color-text, #1d1d1f);white-space:pre-wrap;word-break:break-word;line-height:1.6;max-height:400px;overflow-y:auto}.agent-config-inspect__tools[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.agent-config-inspect__tool[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .08));border-radius:6px;overflow:hidden}.agent-config-inspect__tool-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;padding:.75rem 1rem;background:none;border:none;cursor:pointer;font-family:inherit;text-align:left;transition:background .1s ease}.agent-config-inspect__tool-header[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.agent-config-inspect__tool-name[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-inspect__tool-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:0 1rem .75rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08))}.agent-config-inspect__tool-description[_ngcontent-%COMP%]{margin:0;padding-top:.75rem;font-size:.8125rem;line-height:1.5;color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__tool-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .25rem}.agent-config-inspect__tool-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.agent-config-inspect__tool-description[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:monospace;font-size:.8em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:3px}.agent-config-inspect__schema[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.8125rem;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:pre;overflow-x:auto;line-height:1.5;max-height:360px;overflow-y:auto}"],changeDetection:0})};export{R as AgentConfigInspectComponent};
1
+ import{a as L}from"./chunk-KWZFKFOK.js";import{b as z}from"./chunk-BUWF3ZQM.js";import"./chunk-FPNEFWYN.js";import{b as T,d as A,e as D}from"./chunk-4GVABYH4.js";import{a as N}from"./chunk-V363EHJE.js";import{Bb as b,Db as f,Fb as l,Ga as M,Ka as r,Rb as u,Tb as a,Ub as p,Vb as h,Wa as I,ca as _,dc as O,ec as w,ga as C,ha as x,jb as v,lb as d,ma as P,mb as s,pb as S,qb as E,rb as y,sb as i,ta as m,tb as t,ub as k}from"./chunk-B4RKRLIY.js";var F=(n,o)=>o.name;function B(n,o){n&1&&(i(0,"p",6),a(1,"Loading\u2026"),t())}function $(n,o){n&1&&(i(0,"p",7),a(1,"Failed to load agent definition."),t())}function j(n,o){if(n&1&&(i(0,"dt",12),a(1,"User context"),t(),i(2,"dd",14),a(3),t()),n&2){let e=l();r(3),p(e.userId)}}function H(n,o){if(n&1&&(i(0,"pre",21),a(1),t()),n&2){let e=l(2);r(),p(e.systemPrompt)}}function J(n,o){if(n&1){let e=b();i(0,"section",9)(1,"button",19),f("click",function(){C(e);let g=l(2);return x(g.toggleSystemPrompt())}),i(2,"h2",10),a(3,"System Prompt"),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,H,2,1,"pre",21),t()}if(n&2){let e=l(2);r(),v("aria-expanded",!e.systemPromptCollapsed()),r(3),u("agent-config-inspect__chevron--open",!e.systemPromptCollapsed()),r(2),s(e.systemPromptCollapsed()?-1:6)}}function U(n,o){if(n&1&&(i(0,"pre",21),a(1),t()),n&2){let e=l(2);r(),p(e.instructions)}}function G(n,o){if(n&1){let e=b();i(0,"section",9)(1,"button",19),f("click",function(){C(e);let g=l(2);return x(g.toggleInstructions())}),i(2,"h2",10),a(3,"Instructions"),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,U,2,1,"pre",21),t()}if(n&2){let e=l(2);r(),v("aria-expanded",!e.instructionsCollapsed()),r(3),u("agent-config-inspect__chevron--open",!e.instructionsCollapsed()),r(2),s(e.instructionsCollapsed()?-1:6)}}function q(n,o){n&1&&(i(0,"p",17),a(1,"No tools available for this agent."),t())}function K(n,o){if(n&1&&(k(0,"div",26),O(1,"agentosMarkdown")),n&2){let e=l(2).$implicit;y("innerHTML",w(1,1,e.description),M)}}function Q(n,o){if(n&1&&(i(0,"div",25),d(1,K,2,3,"div",26),i(2,"pre",27),a(3),t()()),n&2){let e=l().$implicit,c=l(3);r(),s(e.description?1:-1),r(2),p(c.formatSchema(e.inputSchema))}}function W(n,o){if(n&1){let e=b();i(0,"li",22)(1,"button",23),f("click",function(){let g=C(e).$implicit,V=l(3);return x(V.toggleTool(g))}),i(2,"span",24),a(3),t(),i(4,"span",20),a(5," \u25BC "),t()(),d(6,Q,4,2,"div",25),t()}if(n&2){let e=o.$implicit,c=l(3);r(),v("aria-expanded",c.isToolExpanded(e)),r(2),p(e.name),r(),u("agent-config-inspect__chevron--open",c.isToolExpanded(e)),r(2),s(c.isToolExpanded(e)?6:-1)}}function X(n,o){if(n&1&&(i(0,"ul",18),S(1,W,7,5,"li",22,F),t()),n&2){let e=l();r(),E(e.tools)}}function Y(n,o){if(n&1&&(i(0,"div",8)(1,"section",9)(2,"h2",10),a(3,"General"),t(),i(4,"dl",11)(5,"dt",12),a(6,"Name"),t(),i(7,"dd",13),a(8),t(),i(9,"dt",12),a(10,"Resolved model"),t(),i(11,"dd",14),a(12),t(),i(13,"dt",12),a(14,"Provider"),t(),i(15,"dd",13),a(16),t(),i(17,"dt",12),a(18,"Advanced execution"),t(),i(19,"dd",13)(20,"span",15),a(21),t()(),d(22,j,4,1),t()(),d(23,J,7,4,"section",9),d(24,G,7,4,"section",9),i(25,"section",9)(26,"h2",10),a(27," Tools "),i(28,"span",16),a(29),t()(),d(30,q,2,0,"p",17)(31,X,3,0,"ul",18),t()()),n&2){let e=o;r(8),p(e.name),r(4),p(e.resolvedModelApiName),r(4),p(e.resolvedProviderName),r(4),u("agent-config-inspect__badge--active",e.advancedExecution),r(),h(" ",e.advancedExecution?"Enabled":"Disabled"," "),r(),s(e.userId?22:-1),r(),s(e.systemPrompt?23:-1),r(),s(e.instructions?24:-1),r(5),h("(",e.tools.length,")"),r(),s(e.tools.length===0?30:31)}}var R=class n{route=_(T);router=_(A);destroyRef=_(P);agentConfigController=_(z);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;isPlatformMode=!this.namespaceId;isLoading=m(!0);hasError=m(!1);definition=m(null);expandedTools=m(new Set);systemPromptCollapsed=m(!0);instructionsCollapsed=m(!0);ngOnInit(){this.agentConfigController.getDefinitionAgentConfig(this.agentConfigId).pipe(N(this.destroyRef)).subscribe({next:o=>{this.definition.set(o),this.isLoading.set(!1)},error:()=>{this.hasError.set(!0),this.isLoading.set(!1)}})}toggleTool(o){this.expandedTools.update(e=>{let c=new Set(e);return c.has(o.name)?c.delete(o.name):c.add(o.name),c})}isToolExpanded(o){return this.expandedTools().has(o.name)}toggleSystemPrompt(){this.systemPromptCollapsed.update(o=>!o)}toggleInstructions(){this.instructionsCollapsed.update(o=>!o)}formatSchema(o){try{return JSON.stringify(JSON.parse(o),null,2)}catch(e){return o}}editRoute(){return this.isPlatformMode?["/agentos","admin","agent-configs",this.agentConfigId,"edit"]:["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin","agent-configs"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=I({type:n,selectors:[["agentos-agent-config-inspect"]],decls:13,vars:2,consts:[[1,"agent-config-inspect"],[1,"agent-config-inspect__header"],["type","button","title","Back to agent configs",1,"agent-config-inspect__back",3,"click"],[1,"agent-config-inspect__back-icon"],[1,"agent-config-inspect__title"],[1,"agent-config-inspect__sibling-link",3,"routerLink"],[1,"agent-config-inspect__loading"],[1,"agent-config-inspect__error"],[1,"agent-config-inspect__content"],[1,"agent-config-inspect__section"],[1,"agent-config-inspect__section-title"],[1,"agent-config-inspect__dl"],[1,"agent-config-inspect__dt"],[1,"agent-config-inspect__dd"],[1,"agent-config-inspect__dd","agent-config-inspect__dd--mono"],[1,"agent-config-inspect__badge"],[1,"agent-config-inspect__count"],[1,"agent-config-inspect__empty"],[1,"agent-config-inspect__tools"],["type","button",1,"agent-config-inspect__collapsible",3,"click"],[1,"agent-config-inspect__chevron"],[1,"agent-config-inspect__instructions"],[1,"agent-config-inspect__tool"],["type","button",1,"agent-config-inspect__tool-header",3,"click"],[1,"agent-config-inspect__tool-name"],[1,"agent-config-inspect__tool-body"],[1,"agent-config-inspect__tool-description",3,"innerHTML"],[1,"agent-config-inspect__schema"]],template:function(e,c){if(e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return c.back()}),i(3,"span",3),a(4,"\u2190"),t(),a(5," Agent Configs "),t(),i(6,"h1",4),a(7,"Agent definition"),t(),i(8,"a",5),a(9,"Edit config \u2192"),t()(),d(10,B,2,0,"p",6)(11,$,2,0,"p",7)(12,Y,32,11,"div",8),t()),e&2){let g;r(8),y("routerLink",c.editRoute()),r(2),s(c.isLoading()?10:c.hasError()?11:(g=c.definition())?12:-1,g)}},dependencies:[D,L],styles:[".agent-config-inspect[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:720px;margin:0 auto;padding:2rem 1rem}.agent-config-inspect__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-inspect__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.agent-config-inspect__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-inspect__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-inspect__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.agent-config-inspect__sibling-link[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-primary, #007aff);text-decoration:none}.agent-config-inspect__sibling-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-inspect__loading[_ngcontent-%COMP%], .agent-config-inspect__error[_ngcontent-%COMP%], .agent-config-inspect__empty[_ngcontent-%COMP%]{margin:0;font-size:.9rem;color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__error[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-config-inspect__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.agent-config-inspect__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.25rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:10px}.agent-config-inspect__section-title[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f)}.agent-config-inspect__count[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;margin-left:.25rem}.agent-config-inspect__dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;gap:.5rem 1.25rem;margin:0}.agent-config-inspect__dt[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);align-self:center}.agent-config-inspect__dd[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;color:var(--color-text, #1d1d1f);align-self:center;word-break:break-word}.agent-config-inspect__dd--mono[_ngcontent-%COMP%]{font-family:monospace;font-size:.875rem}.agent-config-inspect__badge[_ngcontent-%COMP%]{display:inline-block;padding:.2em .6em;border-radius:4px;font-size:.75rem;font-weight:500;background:var(--color-surface-muted, rgba(0, 0, 0, .06));color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__badge--active[_ngcontent-%COMP%]{background:var(--color-success-bg, #e3f5e1);color:var(--color-success, #34c759)}.agent-config-inspect__collapsible[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;background:none;border:none;padding:0;cursor:pointer;font-family:inherit;text-align:left}.agent-config-inspect__chevron[_ngcontent-%COMP%]{font-size:.7rem;color:var(--color-text-secondary, #6e6e73);transition:transform .15s ease;flex-shrink:0}.agent-config-inspect__chevron--open[_ngcontent-%COMP%]{transform:rotate(180deg)}.agent-config-inspect__instructions[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;border-radius:6px;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.875rem;font-family:inherit;color:var(--color-text, #1d1d1f);white-space:pre-wrap;word-break:break-word;line-height:1.6;max-height:400px;overflow-y:auto}.agent-config-inspect__tools[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.agent-config-inspect__tool[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .08));border-radius:6px;overflow:hidden}.agent-config-inspect__tool-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;padding:.75rem 1rem;background:none;border:none;cursor:pointer;font-family:inherit;text-align:left;transition:background .1s ease}.agent-config-inspect__tool-header[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.agent-config-inspect__tool-name[_ngcontent-%COMP%]{font-size:.875rem;font-weight:600;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.agent-config-inspect__tool-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:0 1rem .75rem;border-top:1px solid var(--color-border, rgba(0, 0, 0, .08))}.agent-config-inspect__tool-description[_ngcontent-%COMP%]{margin:0;padding-top:.75rem;font-size:.8125rem;line-height:1.5;color:var(--color-text-secondary, #6e6e73)}.agent-config-inspect__tool-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 .25rem}.agent-config-inspect__tool-description[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.agent-config-inspect__tool-description[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:monospace;font-size:.8em;background:var(--color-surface-muted, rgba(0, 0, 0, .06));padding:.1em .3em;border-radius:3px}.agent-config-inspect__schema[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.8125rem;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:pre;overflow-x:auto;line-height:1.5;max-height:360px;overflow-y:auto}"],changeDetection:0})};export{R as AgentConfigInspectComponent};
@@ -0,0 +1 @@
1
+ import{Qc as Y,Rc as u,Sc as V,Tc as j,Z as A,a as b,aa as K,b as f,ba as x,ca as O,da as Q,g as L,pa as z}from"./chunk-B4RKRLIY.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:a,credentials:p,encodeParam:o,encoder:t,password:e,username:i,withCredentials:l}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),C!==void 0&&(this.accessToken=C),a!==void 0&&(this.basePath=a),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=o??(r=>this.defaultEncodeParam(r)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(a=>this.isJsonMime(a));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(a=>this.isJsonMime(a));return n===void 0?C[0]:n}isJsonMime(C){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return C!==null&&(n.test(C)||C.toLowerCase()==="application/json-patch+json")}lookupCredential(C){let n=this.credentials[C];return typeof n=="function"?n():n}addCredentialToHeaders(C,n,a,p){let o=this.lookupCredential(C);return o?a.set(n,(p??"")+o):a}addCredentialToQuery(C,n,a){let p=this.lookupCredential(C);return p?a.set(n,p):a}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var v=new K("basePath");var R=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Y;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let a=Array.isArray(C)?C[0]:void 0;a!=null&&(C=a),typeof C!="string"&&(C=this.basePath),this.configuration.basePath=C}this.encoder=this.configuration.encoder||new R}canConsumeForm(C){return C.indexOf("multipart/form-data")!==-1}addToHttpParams(C,n,a,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?a:void 0,p):this.addToHttpParamsRecursive(C,n,a)}addToHttpParamsRecursive(C,n,a,p=!1){if(n==null)return C;if(typeof n=="object"){if(a!=null)return p?Object.keys(n).reduce((o,t)=>o.append(`${a}[${t}]`,n[t]),C):C.append(a,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>C=this.addToHttpParamsRecursive(C,o,a));else if(n instanceof Date)if(a!=null)C=C.append(a,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(o=>{let t=a?`${a}.${o}`:o;C=this.addToHttpParamsRecursive(C,n[o],t)});return C}else if(a!=null)return C.append(a,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}disableAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/disable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}enableAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/enable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,a,p,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new V({encoder:this.encoder});i=this.addToHttpParams(i,a,"withUserOverlay"),i=this.addToHttpParams(i,p,"namespaceId");let l=this.defaultHeaders,r=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);r!==void 0&&(l=l.set("Accept",r));let d=e?.context??new u,s=e?.transferCache??!0,c="json";r&&(r.startsWith("text")?c="text":this.configuration.isJsonMime(r)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/definition`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("get",`${h}${g}`,f(b({context:d,params:i,responseType:c},m?{withCredentials:m}:{}),{headers:l,observe:o,transferCache:s,reportProgress:t}))}listByNamespaceAgentConfig(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByNamespaceAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,a,"withDisabled");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let r=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:r,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,a="body",p=!1,o){let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"withDisabled");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,r=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/agent-configs/platform",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:a,transferCache:r,reportProgress:p}))}searchAgentConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/search",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}updateAgentConfig(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(a==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByParentAiModel(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listPlatformLevelAiModel(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}updateAiModel(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(a==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createAiProvider(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteAiProvider(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listAiProvider(n,a,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,a,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let r=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:r,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateAiProvider(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(a==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}addMessageCase(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(a==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}createCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}interruptCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}killCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByParentCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByUserCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/by-user/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/cases/by-user/external/${this.configuration.encodeParam({name:"externalId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}updateCase(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(a==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createIntegrationConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,a,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,a,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let r=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:r,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(a==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}getTypeIntegrationType(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(a==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling deployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/deploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}getByIdNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}listByExternalIdsNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByParentNamespace(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(a==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling undeployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/undeploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}updateNamespace(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(a==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var Z=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(Z||{});var N=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}getByIdCaseEventRest(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/case-events/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createFeedback(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter feedbackInput was null or undefined when calling createFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/feedbacks",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByCaseEventFeedback(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter caseEventId was null or undefined when calling listByCaseEventFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/feedbacks/by-case-event/${this.configuration.encodeParam({name:"caseEventId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByCaseFeedback(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/feedbacks/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}grantAdmin(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(a==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=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:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}grantMember(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(a==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=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:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}listNamespaceUsers(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/users`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}revokeAdmin(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(a==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=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:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}revokeMember(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(a==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=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:a,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}updateRolesByExternalId(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}debugAllPlugins(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}debugPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}getPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}reloadPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}startPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}stopPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}unloadPlugin(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}streamEventsCaseEventSse(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,a,"includePreviousEvents");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);l!==void 0&&(i=i.set("Accept",l));let r=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:r,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdsUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter groupsByExternalIdsRequest was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/groups-by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getMeUser(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}listAllUser(n="body",a=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let r="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${r}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:a}))}listByExternalIdsUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}listByParentUser(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}updateUser(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(a==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var D=class H extends P{constructor(n,a,p){super(a,p);this.httpClient=n}createUserGroup(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r=["application/json"],d=this.configuration.selectHeaderContentType(r);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/user-groups",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}deleteUserGroup(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,r="json";e&&(e.startsWith("text")?r="text":this.configuration.isJsonMime(e)?r="json":r="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:r},c?{withCredentials:c}:{}),{headers:t,observe:a,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,a="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling searchByNamespaceIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceId");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,r=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:a,transferCache:r,reportProgress:p}))}updateUserGroup(n,a,p="body",o=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(a==null)throw new Error("Required parameter userGroupUpdateRequest was null or undefined when calling updateUserGroup.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,r=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:a,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:r,reportProgress:o}))}static \u0275fac=function(a){return new(a||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};function sr(H){return Q([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var k=class H{config=O(y);zone=O(z);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new L(a=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=o=>{try{let t=JSON.parse(o.data);this.zone.run(()=>a.next(t))}catch(t){this.zone.run(()=>a.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=o=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>a.complete()):this.zone.run(()=>a.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,B as d,$ as e,M as f,U as g,S as h,F as i,J as j,_ as k,Z as l,sr as m};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-T3IUNA6F.js";import{a as f}from"./chunk-NKNHWFYH.js";import{d as m}from"./chunk-BUWF3ZQM.js";import{D as o,P as h,S as b,V as a,Z as A,a as P,ca as c,i as v,m as s,t as u,u as d}from"./chunk-B4RKRLIY.js";var S="none",N="me",g=class l{nsController=c(m);userState=c(f);refresh$=new v(void 0);namespaceId$=new v(null);vm$=d([this.namespaceId$,this.refresh$]).pipe(b(([e])=>e?d([this.loadNamespaceProviders(e).pipe(o(()=>s([]))),this.loadUserProviders(e).pipe(o(()=>s([]))),this.loadUserProviders("global").pipe(o(()=>s([])))]).pipe(u(([r,i,n])=>({namespace:r,userOnNs:i,userGlobal:n}))):d([this.loadNamespaceProviders("").pipe(o(()=>s([]))),this.loadUserProviders("global").pipe(o(()=>s([])))]).pipe(u(([r,i])=>({namespace:r,userOnNs:[],userGlobal:i})))),h({bufferSize:1,refCount:!0}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e)}refresh(){this.refresh$.next()}loadUserProviders(e){let r=e==="global"?S:e;return this.nsController.listAiProvider(r,N)}userGlobal$=y(this.refresh$,()=>this.loadUserProviders("global"),[]);loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):s([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let t=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!t)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let O={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(O).pipe(a(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let p={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:t,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(p).pipe(a(()=>this.refresh()))}update(e,r,i,n){let t=r.apiKey===null?{}:{apiKey:r.apiKey},p=P({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},t);return this.nsController.updateAiProvider(e,p).pipe(a(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(a(()=>this.refresh()))}static \u0275fac=function(r){return new(r||l)};static \u0275prov=A({token:l,factory:l.\u0275fac,providedIn:"root"})};export{g as a};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-FOKX6I2Z.js";import{a as T}from"./chunk-EYVMSUTE.js";import{b as I,d as w}from"./chunk-4GVABYH4.js";import{a as _}from"./chunk-V363EHJE.js";import{F as R,b as A,c as N,e as C,g as F,h as U,i as z,l as d,n as D,v as V,w as L}from"./chunk-HZF57OLY.js";import{Bb as P,Db as f,Fb as c,Ka as l,Tb as n,Ub as y,Vb as k,Wa as O,ca as u,ga as p,ha as g,lb as x,ma as E,mb as v,rb as h,sb as r,ta as b,tb as e,ub as m}from"./chunk-B4RKRLIY.js";function q(a,i){a&1&&(r(0,"p",5),n(1,"Loading\u2026"),e())}function $(a,i){if(a&1&&(r(0,"span",13),n(1),e()),a&2){let t=c(2);l(),y(t.form.controls.email.value)}}function j(a,i){a&1&&m(0,"input",14)}function H(a,i){if(a&1){let t=P();r(0,"form",7),f("ngSubmit",function(){p(t);let s=c();return g(s.save())}),r(1,"div",8)(2,"h2",9),n(3,"Identity"),e(),r(4,"div",10)(5,"label",11),n(6,"Email "),r(7,"span",12),n(8,"*"),e()(),x(9,$,2,1,"span",13)(10,j,1,0,"input",14),e(),r(11,"div",10)(12,"label",15),n(13,"External ID"),e(),m(14,"input",16),e()(),r(15,"div",8)(16,"h2",9),n(17,"Profile"),e(),r(18,"div",10)(19,"label",17),n(20,"First name"),e(),m(21,"input",18),e(),r(22,"div",10)(23,"label",19),n(24,"Last name"),e(),m(25,"input",20),e(),r(26,"div",21)(27,"label",22),n(28,"Bio"),e(),m(29,"textarea",23),e()(),r(30,"div",8)(31,"h2",9),n(32,"Permissions"),e(),r(33,"div",24),m(34,"input",25),r(35,"label",26),n(36," Super admin (full access to AgentOS) "),e()()(),r(37,"div",27)(38,"button",28),n(39),e(),r(40,"button",29),f("click",function(){p(t);let s=c();return g(s.cancel())}),n(41,"Cancel"),e()()()}if(a&2){let t=c();h("formGroup",t.form),l(9),v(t.isEditMode?9:10),l(29),h("disabled",t.form.invalid||t.isSaving()),l(),k(" ",t.isSaving()?"Saving\u2026":t.isEditMode?"Save changes":"Create user"," ")}}var B=class a{route=u(I);router=u(w);destroyRef=u(E);userAdminState=u(G);userState=u(T);userId=this.route.snapshot.params.userId;isEditMode=!!this.userId;isSaving=b(!1);isLoading=b(!1);form=new z({email:new d("",{nonNullable:!0,validators:[C.required,C.email]}),externalId:new d("",{nonNullable:!0}),firstname:new d("",{nonNullable:!0}),lastname:new d("",{nonNullable:!0}),bio:new d("",{nonNullable:!0}),isAdmin:new d(!1,{nonNullable:!0})});ngOnInit(){if(!this.isEditMode)return;let i=()=>{this.userState.currentUser()?.id===this.userId&&this.form.controls.isAdmin.disable()};this.userState.currentUser()?i():this.userState.loadMe().pipe(_(this.destroyRef)).subscribe({next:()=>i(),error:()=>this.form.controls.isAdmin.disable()});let t=this.userAdminState.users().find(o=>o.id===this.userId);if(t){this.syncForm(t),this.form.controls.email.disable();return}this.isLoading.set(!0),this.userAdminState.loadAll().pipe(_(this.destroyRef)).subscribe({next:()=>{let o=this.userAdminState.users().find(s=>s.id===this.userId);o&&(this.syncForm(o),this.form.controls.email.disable()),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}get title(){return this.isEditMode?"Edit user":"New user"}save(){if(this.form.invalid||this.isSaving())return;this.isSaving.set(!0);let{email:i,externalId:t,firstname:o,lastname:s,bio:S,isAdmin:M}=this.form.getRawValue();(this.isEditMode?this.userAdminState.updateUser(this.userId,{externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M}):this.userAdminState.createUser({email:i||void 0,externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M})).pipe(_(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSaving.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/admin/users"])}syncForm(i){this.form.setValue({email:i.email??"",externalId:i.externalId??"",firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",isAdmin:i.isAdmin??!1})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=O({type:a,selectors:[["agentos-user-form"]],decls:10,vars:2,consts:[[1,"user-form"],[1,"user-form__header"],["type","button","title","Back to users",1,"user-form__back",3,"click"],[1,"user-form__back-icon"],[1,"user-form__title"],[1,"user-form__loading"],[1,"user-form__body",3,"formGroup"],[1,"user-form__body",3,"ngSubmit","formGroup"],[1,"user-form__section"],[1,"user-form__section-title"],[1,"user-form__field"],["for","uf-email",1,"user-form__label"],[1,"user-form__required"],[1,"user-form__value","user-form__value--readonly"],["id","uf-email","type","email","placeholder","user@example.com","formControlName","email","autocomplete","email",1,"user-form__input"],["for","uf-externalId",1,"user-form__label"],["id","uf-externalId","type","text","placeholder","External identifier","formControlName","externalId",1,"user-form__input"],["for","uf-firstname",1,"user-form__label"],["id","uf-firstname","type","text","placeholder","First name","formControlName","firstname","autocomplete","given-name",1,"user-form__input"],["for","uf-lastname",1,"user-form__label"],["id","uf-lastname","type","text","placeholder","Last name","formControlName","lastname","autocomplete","family-name",1,"user-form__input"],[1,"user-form__field","user-form__field--bio"],["for","uf-bio",1,"user-form__label"],["id","uf-bio","placeholder","A short description","formControlName","bio","rows","4",1,"user-form__input","user-form__input--textarea"],[1,"user-form__field","user-form__field--checkbox"],["id","uf-isAdmin","type","checkbox","formControlName","isAdmin",1,"user-form__checkbox"],["for","uf-isAdmin",1,"user-form__label","user-form__label--checkbox"],[1,"user-form__actions"],["type","submit",1,"user-form__btn","user-form__btn--primary",3,"disabled"],["type","button",1,"user-form__btn",3,"click"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return o.cancel()}),r(3,"span",3),n(4,"\u2190"),e(),n(5," Users "),e(),r(6,"h1",4),n(7),e()(),x(8,q,2,0,"p",5)(9,H,42,4,"form",6),e()),t&2&&(l(7),y(o.title),l(),v(o.isLoading()?8:9))},dependencies:[R,D,N,A,F,U,L,V],styles:[".user-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-form__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-form__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-form__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-form__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-form__field--bio[_ngcontent-%COMP%]{align-items:start}.user-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-form__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.user-form__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f)}.user-form__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-form__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{B as a};
1
+ import{a as G}from"./chunk-HMYJY2DG.js";import{a as T}from"./chunk-NKNHWFYH.js";import{b as I,d as w}from"./chunk-4GVABYH4.js";import{a as _}from"./chunk-V363EHJE.js";import{F as R,b as A,c as N,e as C,g as F,h as U,i as z,l as d,n as D,v as V,w as L}from"./chunk-HZF57OLY.js";import{Bb as P,Db as f,Fb as c,Ka as l,Tb as n,Ub as y,Vb as k,Wa as O,ca as u,ga as p,ha as g,lb as x,ma as E,mb as v,rb as h,sb as r,ta as b,tb as e,ub as m}from"./chunk-B4RKRLIY.js";function q(a,i){a&1&&(r(0,"p",5),n(1,"Loading\u2026"),e())}function $(a,i){if(a&1&&(r(0,"span",13),n(1),e()),a&2){let t=c(2);l(),y(t.form.controls.email.value)}}function j(a,i){a&1&&m(0,"input",14)}function H(a,i){if(a&1){let t=P();r(0,"form",7),f("ngSubmit",function(){p(t);let s=c();return g(s.save())}),r(1,"div",8)(2,"h2",9),n(3,"Identity"),e(),r(4,"div",10)(5,"label",11),n(6,"Email "),r(7,"span",12),n(8,"*"),e()(),x(9,$,2,1,"span",13)(10,j,1,0,"input",14),e(),r(11,"div",10)(12,"label",15),n(13,"External ID"),e(),m(14,"input",16),e()(),r(15,"div",8)(16,"h2",9),n(17,"Profile"),e(),r(18,"div",10)(19,"label",17),n(20,"First name"),e(),m(21,"input",18),e(),r(22,"div",10)(23,"label",19),n(24,"Last name"),e(),m(25,"input",20),e(),r(26,"div",21)(27,"label",22),n(28,"Bio"),e(),m(29,"textarea",23),e()(),r(30,"div",8)(31,"h2",9),n(32,"Permissions"),e(),r(33,"div",24),m(34,"input",25),r(35,"label",26),n(36," Super admin (full access to AgentOS) "),e()()(),r(37,"div",27)(38,"button",28),n(39),e(),r(40,"button",29),f("click",function(){p(t);let s=c();return g(s.cancel())}),n(41,"Cancel"),e()()()}if(a&2){let t=c();h("formGroup",t.form),l(9),v(t.isEditMode?9:10),l(29),h("disabled",t.form.invalid||t.isSaving()),l(),k(" ",t.isSaving()?"Saving\u2026":t.isEditMode?"Save changes":"Create user"," ")}}var B=class a{route=u(I);router=u(w);destroyRef=u(E);userAdminState=u(G);userState=u(T);userId=this.route.snapshot.params.userId;isEditMode=!!this.userId;isSaving=b(!1);isLoading=b(!1);form=new z({email:new d("",{nonNullable:!0,validators:[C.required,C.email]}),externalId:new d("",{nonNullable:!0}),firstname:new d("",{nonNullable:!0}),lastname:new d("",{nonNullable:!0}),bio:new d("",{nonNullable:!0}),isAdmin:new d(!1,{nonNullable:!0})});ngOnInit(){if(!this.isEditMode)return;let i=()=>{this.userState.currentUser()?.id===this.userId&&this.form.controls.isAdmin.disable()};this.userState.currentUser()?i():this.userState.loadMe().pipe(_(this.destroyRef)).subscribe({next:()=>i(),error:()=>this.form.controls.isAdmin.disable()});let t=this.userAdminState.users().find(o=>o.id===this.userId);if(t){this.syncForm(t),this.form.controls.email.disable();return}this.isLoading.set(!0),this.userAdminState.loadAll().pipe(_(this.destroyRef)).subscribe({next:()=>{let o=this.userAdminState.users().find(s=>s.id===this.userId);o&&(this.syncForm(o),this.form.controls.email.disable()),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}get title(){return this.isEditMode?"Edit user":"New user"}save(){if(this.form.invalid||this.isSaving())return;this.isSaving.set(!0);let{email:i,externalId:t,firstname:o,lastname:s,bio:S,isAdmin:M}=this.form.getRawValue();(this.isEditMode?this.userAdminState.updateUser(this.userId,{externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M}):this.userAdminState.createUser({email:i||void 0,externalId:t||void 0,firstname:o||void 0,lastname:s||void 0,bio:S||void 0,isAdmin:M})).pipe(_(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSaving.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/admin/users"])}syncForm(i){this.form.setValue({email:i.email??"",externalId:i.externalId??"",firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??"",isAdmin:i.isAdmin??!1})}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=O({type:a,selectors:[["agentos-user-form"]],decls:10,vars:2,consts:[[1,"user-form"],[1,"user-form__header"],["type","button","title","Back to users",1,"user-form__back",3,"click"],[1,"user-form__back-icon"],[1,"user-form__title"],[1,"user-form__loading"],[1,"user-form__body",3,"formGroup"],[1,"user-form__body",3,"ngSubmit","formGroup"],[1,"user-form__section"],[1,"user-form__section-title"],[1,"user-form__field"],["for","uf-email",1,"user-form__label"],[1,"user-form__required"],[1,"user-form__value","user-form__value--readonly"],["id","uf-email","type","email","placeholder","user@example.com","formControlName","email","autocomplete","email",1,"user-form__input"],["for","uf-externalId",1,"user-form__label"],["id","uf-externalId","type","text","placeholder","External identifier","formControlName","externalId",1,"user-form__input"],["for","uf-firstname",1,"user-form__label"],["id","uf-firstname","type","text","placeholder","First name","formControlName","firstname","autocomplete","given-name",1,"user-form__input"],["for","uf-lastname",1,"user-form__label"],["id","uf-lastname","type","text","placeholder","Last name","formControlName","lastname","autocomplete","family-name",1,"user-form__input"],[1,"user-form__field","user-form__field--bio"],["for","uf-bio",1,"user-form__label"],["id","uf-bio","placeholder","A short description","formControlName","bio","rows","4",1,"user-form__input","user-form__input--textarea"],[1,"user-form__field","user-form__field--checkbox"],["id","uf-isAdmin","type","checkbox","formControlName","isAdmin",1,"user-form__checkbox"],["for","uf-isAdmin",1,"user-form__label","user-form__label--checkbox"],[1,"user-form__actions"],["type","submit",1,"user-form__btn","user-form__btn--primary",3,"disabled"],["type","button",1,"user-form__btn",3,"click"]],template:function(t,o){t&1&&(r(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return o.cancel()}),r(3,"span",3),n(4,"\u2190"),e(),n(5," Users "),e(),r(6,"h1",4),n(7),e()(),x(8,q,2,0,"p",5)(9,H,42,4,"form",6),e()),t&2&&(l(7),y(o.title),l(),v(o.isLoading()?8:9))},dependencies:[R,D,N,A,F,U,L,V],styles:[".user-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.user-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.user-form__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-form__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-form__section-title[_ngcontent-%COMP%]{margin:0;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--color-text-secondary, #6e6e73);border-bottom:1px solid var(--color-border-light, rgba(0, 0, 0, .06));padding-bottom:.5rem}.user-form__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-form__field--bio[_ngcontent-%COMP%]{align-items:start}.user-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.user-form__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.user-form__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text, #1d1d1f)}.user-form__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.875rem}.user-form__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease;resize:none}.user-form__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.user-form__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.user-form__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.user-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.user-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.user-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{B as a};
@@ -0,0 +1 @@
1
+ import{a as B}from"./chunk-I7PMQXOL.js";import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-CL3ICOAL.js";import{a as V}from"./chunk-H5QMVJMP.js";import"./chunk-T3IUNA6F.js";import"./chunk-NKNHWFYH.js";import"./chunk-BUWF3ZQM.js";import{b as N,d as D}from"./chunk-4GVABYH4.js";import{p as $,u as L}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as d}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as b,Db as u,Fb as s,Hc as q,Ka as h,Pb as S,S as g,Tb as x,Ub as E,Wa as I,ab as P,ac as w,ca as n,dc as O,ec as M,ga as c,ha as l,hc as T,lb as C,m as f,ma as y,mb as R,rb as v,sb as p,t as _,ta as A,tb as m}from"./chunk-B4RKRLIY.js";var z=()=>[];function W(r,e){if(r&1&&(p(0,"p",3),x(1),m()),r&2){let t=s().$implicit;h(),E(t.name)}}function U(r,e){if(r&1){let t=b();p(0,"agentos-ai-provider-item",5),u("editRequested",function(){let o=c(t),a=s(2);return l(a.onEdit(o))})("deleteRequested",function(){let o=c(t),a=s(2);return l(a.onDelete(o))})("duplicateRequested",function(){let o=c(t),a=s(2);return l(a.onDuplicate(o))}),m()}if(r&2){let t=e,i=s(2);v("config",t.config)("scope",t.scope)("readOnly",t.scope==="namespace"&&!i.isAdmin())}}function X(r,e){if(r&1&&C(0,W,2,1,"p",3)(1,U,1,3,"agentos-ai-provider-item",4),r&2){let t,i=e.$implicit,o=s();R(o.isEmptyPlaceholder(i.id)?0:(t=o.resolve(i.id))?1:-1,t)}}var k=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class r{route=n(N);router=n(D);destroyRef=n(y);state=n(K);namespaceRole=n(V);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=A(!1);listItems$=this.state.vm$.pipe(_(e=>this.toListItems(e)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(d(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t)}),this.route.paramMap.pipe(_(e=>e.get("namespaceId")??""),g(e=>e?this.namespaceRole.isAdminOfNamespace$(e):f(!1)),d(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(d(this.destroyRef)).subscribe(e=>{let t=new Map;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,"ai-providers","new"],{queryParams:{scope:G(this.isAdmin())}})}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",t,"edit"],{queryParams:{scope:e.scope}})}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(d(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${e.scope}:${t}:`,i)}})}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}})}toListItems(e){let t=[];return 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 AI Provider",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.apiType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=I({type:r,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(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()}),m()(),P(3,X,2,1,"ng-template",null,0,T)),t&2){let o=S(4);v("items",M(1,3,i.listItems$)??w(5,z))("showCreate",!0)("itemTemplate",o)}},dependencies:[L,B,$,q],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{j as AiProvidersAllScopesComponent};
@@ -1 +1 @@
1
- import{b as m}from"./chunk-GNOWUH32.js";import{c as l}from"./chunk-4GVABYH4.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-B4RKRLIY.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
1
+ import{b as m}from"./chunk-UNM7FXGM.js";import{c as l}from"./chunk-4GVABYH4.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-B4RKRLIY.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-AIC4U2MU.js";import{a as K}from"./chunk-VO2S7HEJ.js";import{a as B}from"./chunk-EVGEVSVW.js";import{a as V}from"./chunk-NQFFZYA5.js";import"./chunk-T3IUNA6F.js";import"./chunk-EYVMSUTE.js";import"./chunk-YUBIVG2D.js";import{b as D,d as $}from"./chunk-4GVABYH4.js";import{p as P,u as L}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as c}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as A,Db as g,Fb as s,Hc as N,Ka as C,Pb as x,S as y,Tb as E,Ub as w,Wa as v,ab as R,ac as O,ca as r,dc as M,ec as T,ga as l,ha as m,hc 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-B4RKRLIY.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==="namespace"||t.scope==="platform")&&!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 V}from"./chunk-UXIUSXZT.js";import{a as B}from"./chunk-EVGEVSVW.js";import{a as K}from"./chunk-H5QMVJMP.js";import"./chunk-T3IUNA6F.js";import"./chunk-NKNHWFYH.js";import"./chunk-BUWF3ZQM.js";import{b as D,d as $}from"./chunk-4GVABYH4.js";import{p as P,u as L}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as c}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as A,Db as g,Fb as s,Hc as N,Ka as C,Pb as x,S as y,Tb as E,Ub as w,Wa as v,ab as R,ac as O,ca as r,dc as M,ec as T,ga as l,ha as m,hc 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-B4RKRLIY.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==="namespace"||t.scope==="platform")&&!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{b as Y}from"./chunk-GNOWUH32.js";import{e as K}from"./chunk-YUBIVG2D.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-WV7ML4CJ.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as _,rb as f,sb as i,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class o{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(o,e){if(o&1){let t=h();i(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),i(1,"span",4),W(2),s()()}if(o&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class o{cases=[];activeCaseId=null;caseSelected=new _;createRequested=new _;closeRequested=new _;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(i(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),i(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);f("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:color-mix(in srgb,var(--color-text-inverse, #fff) 70%,transparent)}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function oe(o,e){if(o&1){let t=h();i(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class o{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(i(0,"div",0),S(1,"agentos-header",1),i(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),i(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),i(6,"div",6),P(7,oe,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),f("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
1
+ import{b as Y}from"./chunk-UNM7FXGM.js";import{e as K}from"./chunk-BUWF3ZQM.js";import{a as A,b as H,c as G,d as J}from"./chunk-4GVABYH4.js";import{o as U,p as g,u as X}from"./chunk-WV7ML4CJ.js";import{c as b}from"./chunk-V363EHJE.js";import{A as D,B as O,Bb as h,Db as l,Fb as m,Jb as N,Ka as c,Kb as k,Lb as L,Pb as V,Rb as F,S as R,Tb as W,Ub as $,Wa as d,Xb as B,Yb as Q,Zb as j,ab as q,ca as p,ga as u,ha as C,hc as z,i as I,lb as P,m as x,mb as E,oa as _,rb as f,sb as i,t as y,ta as M,tb as s,ub as S,va as T}from"./chunk-B4RKRLIY.js";var v=class o{case;static toListItem(e){return{id:e.id??"",name:e.id??"\u2014",description:void 0}}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-item"]],inputs:{case:"case"},decls:0,vars:0,template:function(t,n){},encapsulation:2,changeDetection:0})};var ne=["caseItemTpl"];function ae(o,e){if(o&1){let t=h();i(0,"button",3),l("click",function(){let a=u(t).$implicit,r=m();return C(r.onItemSelected(a.id))}),i(1,"span",4),W(2),s()()}if(o&2){let t=e.$implicit,n=m();F("case-drawer-item--active",t.id===n.activeCaseId),c(2),$(t.name)}}var w=class o{cases=[];activeCaseId=null;caseSelected=new _;createRequested=new _;closeRequested=new _;caseItemTpl;caseItems=[];ngOnChanges(e){e.cases&&(this.caseItems=this.cases.map(v.toListItem))}onItemSelected(e){this.caseSelected.emit(e)}onCreateRequested(){this.createRequested.emit()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-drawer"]],viewQuery:function(t,n){if(t&1&&N(ne,7),t&2){let a;k(a=L())&&(n.caseItemTpl=a.first)}},inputs:{cases:"cases",activeCaseId:"activeCaseId"},outputs:{caseSelected:"caseSelected",createRequested:"createRequested",closeRequested:"closeRequested"},features:[T],decls:4,vars:3,consts:[["caseItemTpl",""],["title","Cases","emptyMessage","No cases yet. Start one below.","searchPlaceholder","Filter cases\u2026","cardMinWidth","220px","contentMaxWidth","100%",3,"itemSelected","createRequested","items","itemTemplate","showCreate"],["toolbar-start","","icon","chevron_left","variant","default","title","Close drawer",3,"action"],["type","button",1,"case-drawer-item",3,"click"],[1,"case-drawer-item__name"]],template:function(t,n){if(t&1&&(i(0,"ds-entity-list",1),l("itemSelected",function(r){return n.onItemSelected(r)})("createRequested",function(){return n.onCreateRequested()}),i(1,"ds-icon-button",2),l("action",function(){return n.closeRequested.emit()}),s()(),q(2,ae,3,3,"ng-template",null,0,z)),t&2){let a=V(3);f("items",n.caseItems)("itemTemplate",a)("showCreate",!0)}},dependencies:[X,g],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.case-drawer-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.5rem .75rem;border-radius:8px;border:none;background:transparent;cursor:pointer;text-align:left;font-family:inherit;font-size:.875rem;color:var(--color-text, #1d1d1f);transition:background .12s ease;gap:.5rem}.case-drawer-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .05))}.case-drawer-item--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-inverse, #fff)}.case-drawer-item--active[_ngcontent-%COMP%] .case-drawer-item__status[_ngcontent-%COMP%]{color:color-mix(in srgb,var(--color-text-inverse, #fff) 70%,transparent)}.case-drawer-item--active[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover, #0051d5)}.case-drawer-item__name[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.8rem}'],changeDetection:0})};function oe(o,e){if(o&1){let t=h();i(0,"div",7)(1,"ds-icon-button",8),l("action",function(){u(t);let a=m();return C(a.toggleDrawer())}),s()()}}var te=class o{router=p(J);route=p(H);caseController=p(K);namespaceId=this.route.snapshot.params.namespaceId;drawerOpen=M(!0);refresh$=new I(void 0);cases$=this.refresh$.pipe(R(()=>this.caseController.listByParentCase(this.namespaceId)));cases=b(this.cases$,{initialValue:[]});activeCaseId=b(D(x(this.router.url),this.router.events.pipe(O(e=>e instanceof A),y(e=>e.urlAfterRedirects))).pipe(y(e=>this.extractCaseId(e))),{initialValue:null});extractCaseId(e){return e.match(/\/cases\/([^/?#]+)/)?.[1]??null}toggleDrawer(){this.drawerOpen.update(e=>!e)}onCaseSelected(e){this.router.navigate([e],{relativeTo:this.route})}onCreateRequested(){this.router.navigate(["."],{relativeTo:this.route})}refreshCases(){this.refresh$.next()}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=d({type:o,selectors:[["agentos-case-shell"]],decls:9,vars:4,consts:[[1,"case-shell"],[1,"case-shell__header"],[1,"case-shell__body"],["drawerWidth","400px",3,"openChange","open"],["dsDrawerSide","",1,"case-shell__sidenav"],[3,"caseSelected","createRequested","closeRequested","cases","activeCaseId"],["dsDrawerContent","",1,"case-shell__content"],[1,"case-shell__toggle"],["icon","menu","variant","default","title","Open drawer",3,"action"]],template:function(t,n){t&1&&(i(0,"div",0),S(1,"agentos-header",1),i(2,"div",2)(3,"ds-drawer",3),j("openChange",function(r){return Q(n.drawerOpen,r)||(n.drawerOpen=r),r}),i(4,"div",4)(5,"agentos-case-drawer",5),l("caseSelected",function(r){return n.onCaseSelected(r)})("createRequested",function(){return n.onCreateRequested()})("closeRequested",function(){return n.toggleDrawer()}),s()(),i(6,"div",6),P(7,oe,2,0,"div",7),S(8,"router-outlet"),s()()()()),t&2&&(c(3),B("open",n.drawerOpen),c(2),f("cases",n.cases())("activeCaseId",n.activeCaseId()),c(2),E(n.drawerOpen()?-1:7))},dependencies:[G,U,w,Y,g],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100dvh}.case-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.case-shell__header[_ngcontent-%COMP%]{flex-shrink:0}.case-shell__body[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.case-shell__sidenav[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__content[_ngcontent-%COMP%]{position:relative;flex:1;display:flex;flex-direction:column;height:100%;overflow:hidden}.case-shell__toggle[_ngcontent-%COMP%]{position:absolute;top:.375rem;left:.5rem;z-index:10}"]})};export{v as a,w as b,te as c};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-EYVMSUTE.js";import{i as b}from"./chunk-YUBIVG2D.js";import{b as u}from"./chunk-V363EHJE.js";import{D as p,P as f,S as m,Z as l,ca as a,m as r,t as c}from"./chunk-B4RKRLIY.js";var v=class i{userState=a(h);permissions=a(b);currentUser$=u(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return r(!1);let t=this.cache.get(e);if(t)return t;let o=this.currentUser$.pipe(m(s=>s?s.isAdmin?r(!0):this.permissions.listNamespaceUsers(e).pipe(c(d=>d.some(n=>n.id===s.id&&n.role==="ADMIN")),p(()=>r(!1))):r(!1)),f({bufferSize:1,refCount:!1}));return this.cache.set(e,o),o}static \u0275fac=function(t){return new(t||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{a as h}from"./chunk-NKNHWFYH.js";import{i as b}from"./chunk-BUWF3ZQM.js";import{b as u}from"./chunk-V363EHJE.js";import{D as p,P as f,S as m,Z as l,ca as a,m as r,t as c}from"./chunk-B4RKRLIY.js";var v=class i{userState=a(h);permissions=a(b);currentUser$=u(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return r(!1);let t=this.cache.get(e);if(t)return t;let o=this.currentUser$.pipe(m(s=>s?s.isAdmin?r(!0):this.permissions.listNamespaceUsers(e).pipe(c(d=>d.some(n=>n.id===s.id&&n.role==="ADMIN")),p(()=>r(!1))):r(!1)),f({bufferSize:1,refCount:!1}));return this.cache.set(e,o),o}static \u0275fac=function(t){return new(t||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v as a};
@@ -1 +1 @@
1
- import{k as p}from"./chunk-YUBIVG2D.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{k as p}from"./chunk-BUWF3ZQM.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};