@whoz-oss/coday-client 0.198.0 → 0.200.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 (52) hide show
  1. package/browser/{chunk-JL4IPJT5.js → chunk-25QAYY2G.js} +1 -1
  2. package/browser/{chunk-GJ6TA25Y.js → chunk-32PCPEXE.js} +1 -1
  3. package/browser/{chunk-UXIUSXZT.js → chunk-3UZ346ET.js} +1 -1
  4. package/browser/{chunk-IEIHNRZE.js → chunk-5J75SWSV.js} +1 -1
  5. package/browser/chunk-5P2WWCFC.js +1 -0
  6. package/browser/{chunk-NKNHWFYH.js → chunk-5WWHTBZX.js} +1 -1
  7. package/browser/{chunk-V43NZ7XP.js → chunk-6NGGDRZW.js} +1 -1
  8. package/browser/{chunk-KFTYMWZ4.js → chunk-6PHQGWTQ.js} +1 -1
  9. package/browser/{chunk-I4DIX2BH.js → chunk-6QBZFOLP.js} +1 -1
  10. package/browser/chunk-AIJJNBNY.js +1 -0
  11. package/browser/{chunk-TFL7UOY7.js → chunk-APISHLX2.js} +1 -1
  12. package/browser/{chunk-HMYJY2DG.js → chunk-BBQBJKTG.js} +1 -1
  13. package/browser/{chunk-5AH4NMNL.js → chunk-C4YB46JQ.js} +1 -1
  14. package/browser/{chunk-P2XSTJQN.js → chunk-CHJWXPFL.js} +1 -1
  15. package/browser/chunk-CUZOUQER.js +1 -0
  16. package/browser/{chunk-J6KORXMO.js → chunk-DWM36GCL.js} +1 -1
  17. package/browser/chunk-EBPM4OO4.js +1 -0
  18. package/browser/{chunk-JYA4K7VB.js → chunk-EFU22KBF.js} +1 -1
  19. package/browser/{chunk-UNM7FXGM.js → chunk-EXGN47V2.js} +1 -1
  20. package/browser/{chunk-XAAHUCLS.js → chunk-FGH22HXQ.js} +1 -1
  21. package/browser/{chunk-OPMZ42FI.js → chunk-HB7BOQF2.js} +1 -1
  22. package/browser/chunk-INPPLYFX.js +1 -0
  23. package/browser/{chunk-DGE527NX.js → chunk-IQ7EL357.js} +1 -1
  24. package/browser/chunk-JFK2VH3B.js +1 -0
  25. package/browser/chunk-KGOCOJXX.js +1 -0
  26. package/browser/{chunk-LGN67WP4.js → chunk-MEMAC4FG.js} +1 -1
  27. package/browser/{chunk-GS2XHWWW.js → chunk-NBM4ZTYZ.js} +1 -1
  28. package/browser/{chunk-H5QMVJMP.js → chunk-NE7BOWVE.js} +1 -1
  29. package/browser/chunk-NQLFBBMS.js +1 -0
  30. package/browser/chunk-ODQ66F3E.js +1 -0
  31. package/browser/{chunk-K6BO32I7.js → chunk-OX3JLJE5.js} +1 -1
  32. package/browser/chunk-QKXRAKAR.js +1 -0
  33. package/browser/{chunk-ASYQJGDW.js → chunk-RPBI6ZEF.js} +1 -1
  34. package/browser/{chunk-IMS2BEZA.js → chunk-SAT3CQDP.js} +1 -1
  35. package/browser/{chunk-MNRESS2L.js → chunk-TIF4AFYM.js} +1 -1
  36. package/browser/{chunk-72EDCCJQ.js → chunk-TWUUATLS.js} +1 -1
  37. package/browser/{chunk-CL3ICOAL.js → chunk-UXUHAYDM.js} +1 -1
  38. package/browser/{chunk-ESOYLXDB.js → chunk-XBQWHRJH.js} +1 -1
  39. package/browser/{chunk-XZRCNGKM.js → chunk-YG6SBV72.js} +1 -1
  40. package/browser/chunk-YKPIMVQC.js +1 -0
  41. package/browser/{chunk-IVKX5B6K.js → chunk-YPM4SWS3.js} +1 -1
  42. package/browser/{chunk-XLXMYPNG.js → chunk-YRI2TXXT.js} +1 -1
  43. package/browser/{chunk-XYPFMBMS.js → chunk-ZBXL6DSO.js} +1 -1
  44. package/browser/index.html +1 -1
  45. package/browser/{main-SLDWBKWH.js → main-V5E64J66.js} +1 -1
  46. package/package.json +1 -1
  47. package/browser/chunk-BUWF3ZQM.js +0 -1
  48. package/browser/chunk-GVCHIF5U.js +0 -1
  49. package/browser/chunk-IYWU3G5O.js +0 -1
  50. package/browser/chunk-JMHTBAFK.js +0 -1
  51. package/browser/chunk-VOZI5GZY.js +0 -1
  52. package/browser/chunk-Y5A4URQQ.js +0 -1
@@ -1 +1 @@
1
- import{a as D}from"./chunk-EVGEVSVW.js";import{f as E}from"./chunk-BUWF3ZQM.js";import{d as $}from"./chunk-4GVABYH4.js";import{u as B}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 R,Db as s,Fb as g,Hc as M,Pb as P,S as u,Tb as w,Wa as I,ab as h,ac as x,ca as r,dc as T,ec as k,ga as m,ha as l,hc as q,i as _,lb as v,ma as y,mb as b,rb as p,sb as a,t as C,tb as c}from"./chunk-B4RKRLIY.js";var V=()=>[];function F(i,t){if(i&1){let e=R();a(0,"agentos-integration-config-item",4),s("editRequested",function(n){m(e);let f=g(2);return l(f.onEdit(n))})("deleteRequested",function(n){m(e);let f=g(2);return l(f.deleteConfig(n))}),c()}i&2&&p("config",t)}function A(i,t){if(i&1&&v(0,F,1,1,"agentos-integration-config-item",3),i&2){let e,o=t.$implicit,n=g();b((e=n.resolveConfig(o.id))?0:-1,e)}}var S=class i{router=r($);destroyRef=r(y);integrationConfigController=r(E);refresh$=new _(void 0);configs$=this.refresh$.pipe(u(()=>this.integrationConfigController.listIntegrationConfig()));configItems$=this.configs$.pipe(C(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(d(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"])}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"])}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=I({type:i,selectors:[["agentos-platform-integration-configs"]],decls:6,vars:6,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-integration-configs__back",3,"click"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,o){if(e&1&&(a(0,"ds-entity-list",1),T(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"button",2),s("click",function(){return o.goBack()}),w(3," \u2190 Admin "),c()(),h(4,A,1,1,"ng-template",null,0,q)),e&2){let n=P(5);p("items",k(1,3,o.configItems$)??x(5,V))("showCreate",!0)("itemTemplate",n)}},dependencies:[B,D,M],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as PlatformIntegrationConfigsComponent};
1
+ import{a as D}from"./chunk-EVGEVSVW.js";import{f as E}from"./chunk-5P2WWCFC.js";import{d as $}from"./chunk-4GVABYH4.js";import{u as B}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 R,Db as s,Fb as g,Hc as M,Pb as P,S as u,Tb as w,Wa as I,ab as h,ac as x,ca as r,dc as T,ec as k,ga as m,ha as l,hc as q,i as _,lb as v,ma as y,mb as b,rb as p,sb as a,t as C,tb as c}from"./chunk-B4RKRLIY.js";var V=()=>[];function F(i,t){if(i&1){let e=R();a(0,"agentos-integration-config-item",4),s("editRequested",function(n){m(e);let f=g(2);return l(f.onEdit(n))})("deleteRequested",function(n){m(e);let f=g(2);return l(f.deleteConfig(n))}),c()}i&2&&p("config",t)}function A(i,t){if(i&1&&v(0,F,1,1,"agentos-integration-config-item",3),i&2){let e,o=t.$implicit,n=g();b((e=n.resolveConfig(o.id))?0:-1,e)}}var S=class i{router=r($);destroyRef=r(y);integrationConfigController=r(E);refresh$=new _(void 0);configs$=this.refresh$.pipe(u(()=>this.integrationConfigController.listIntegrationConfig()));configItems$=this.configs$.pipe(C(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(d(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"])}deleteConfig(t){this.integrationConfigController.deleteIntegrationConfig(t.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(t){this.router.navigate(["/agentos","admin","integration-configs",t.id??"","edit"])}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=I({type:i,selectors:[["agentos-platform-integration-configs"]],decls:6,vars:6,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-integration-configs__back",3,"click"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(e,o){if(e&1&&(a(0,"ds-entity-list",1),T(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"button",2),s("click",function(){return o.goBack()}),w(3," \u2190 Admin "),c()(),h(4,A,1,1,"ng-template",null,0,q)),e&2){let n=P(5);p("items",k(1,3,o.configItems$)??x(5,V))("showCreate",!0)("itemTemplate",n)}},dependencies:[B,D,M],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as PlatformIntegrationConfigsComponent};
@@ -1 +1 @@
1
- import{b as m}from"./chunk-UNM7FXGM.js";import{c as l}from"./chunk-4GVABYH4.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-B4RKRLIY.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
1
+ import{b as m}from"./chunk-EXGN47V2.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 v}from"./chunk-T3IUNA6F.js";import{a as b}from"./chunk-NKNHWFYH.js";import{f as h}from"./chunk-BUWF3ZQM.js";import{D as g,P as m,S as d,V as a,Z as u,ca as I,i as c,m as o,t as C,u as l}from"./chunk-B4RKRLIY.js";var O="none",S="me",y=class p{nsController=I(h);userState=I(b);refresh$=new c(void 0);namespaceId$=new c(null);vm$=l([this.namespaceId$,this.refresh$]).pipe(d(([e])=>{let n=this.loadPlatformConfigs().pipe(g(()=>o([]))),t=this.loadUserConfigs("global").pipe(g(()=>o([])));return e?l([n,this.loadNamespaceConfigs(e).pipe(g(()=>o([]))),this.loadUserConfigs(e).pipe(g(()=>o([]))),t]).pipe(C(([i,r,f,s])=>({platform:i,namespace:r,userOnNs:f,userGlobal:s}))):l([n,t]).pipe(C(([i,r])=>({platform:i,namespace:[],userOnNs:[],userGlobal:r})))}),m({bufferSize:1,refCount:!0}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e)}refresh(){this.refresh$.next()}loadPlatformConfigs(){return this.nsController.listIntegrationConfig()}loadUserConfigs(e){let n=e==="global"?O:e;return this.nsController.listIntegrationConfig(n,S)}userGlobal$=v(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):o([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let r=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!r)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="platform"){let s={name:e.name,integrationType:e.integrationType,description:e.description,parameters:e.parameters};return this.nsController.createIntegrationConfig(s).pipe(a(()=>this.refresh()))}if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let s={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters};return this.nsController.createIntegrationConfig(s).pipe(a(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let f={name:e.name,integrationType:e.integrationType,description:e.description,userId:r,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters};return this.nsController.createIntegrationConfig(f).pipe(a(()=>this.refresh()))}update(e,n,t,i){let r={name:n.name,integrationType:n.integrationType,description:n.description,userId:i.userId,namespaceId:i.namespaceId,parameters:n.parameters};return this.nsController.updateIntegrationConfig(e,r).pipe(a(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(a(()=>this.refresh()))}static \u0275fac=function(n){return new(n||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{y as a};
1
+ import{a as v}from"./chunk-T3IUNA6F.js";import{a as b}from"./chunk-5WWHTBZX.js";import{f as h}from"./chunk-5P2WWCFC.js";import{D as g,P as m,S as d,V as a,Z as u,ca as I,i as c,m as o,t as C,u as l}from"./chunk-B4RKRLIY.js";var O="none",S="me",y=class p{nsController=I(h);userState=I(b);refresh$=new c(void 0);namespaceId$=new c(null);vm$=l([this.namespaceId$,this.refresh$]).pipe(d(([e])=>{let n=this.loadPlatformConfigs().pipe(g(()=>o([]))),t=this.loadUserConfigs("global").pipe(g(()=>o([])));return e?l([n,this.loadNamespaceConfigs(e).pipe(g(()=>o([]))),this.loadUserConfigs(e).pipe(g(()=>o([]))),t]).pipe(C(([i,r,f,s])=>({platform:i,namespace:r,userOnNs:f,userGlobal:s}))):l([n,t]).pipe(C(([i,r])=>({platform:i,namespace:[],userOnNs:[],userGlobal:r})))}),m({bufferSize:1,refCount:!0}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e)}refresh(){this.refresh$.next()}loadPlatformConfigs(){return this.nsController.listIntegrationConfig()}loadUserConfigs(e){let n=e==="global"?O:e;return this.nsController.listIntegrationConfig(n,S)}userGlobal$=v(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):o([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let r=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!r)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="platform"){let s={name:e.name,integrationType:e.integrationType,description:e.description,parameters:e.parameters};return this.nsController.createIntegrationConfig(s).pipe(a(()=>this.refresh()))}if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let s={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters};return this.nsController.createIntegrationConfig(s).pipe(a(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let f={name:e.name,integrationType:e.integrationType,description:e.description,userId:r,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters};return this.nsController.createIntegrationConfig(f).pipe(a(()=>this.refresh()))}update(e,n,t,i){let r={name:n.name,integrationType:n.integrationType,description:n.description,userId:i.userId,namespaceId:i.namespaceId,parameters:n.parameters};return this.nsController.updateIntegrationConfig(e,r).pipe(a(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(a(()=>this.refresh()))}static \u0275fac=function(n){return new(n||p)};static \u0275prov=u({token:p,factory:p.\u0275fac,providedIn:"root"})};export{y as a};
@@ -1 +1 @@
1
- import{c as R}from"./chunk-SMT5YVCA.js";import{a as I}from"./chunk-BUWF3ZQM.js";import{b as M,d as E}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-WV7ML4CJ.js";import{a as P}from"./chunk-V363EHJE.js";import{Db as d,Jb as y,Ka as s,Kb as v,Lb as C,Ma as g,S as f,Tb as l,Tc as w,Ub as x,Wa as b,ca as n,ma as _,rb as m,sb as a,t as h,ta as p,tb as i}from"./chunk-B4RKRLIY.js";var O=["composerInput"],H=class u{http=n(w);router=n(E);route=n(M);config=n(I);destroyRef=n(_);preferences=n(R);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=p("");isCreating=p(!1);constructor(){g(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),P(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(O,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(c){return o.onInput(c)})("keydown",function(c){return o.onKeydown(c)}),i(),a(7,"div",6)(8,"span",7),l(9),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(s(5),m("value",o.inputValue())("disabled",o.isCreating()),s(4),x(o.preferences.composerHint()),s(),m("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{H as a};
1
+ import{c as R}from"./chunk-SMT5YVCA.js";import{a as I}from"./chunk-5P2WWCFC.js";import{b as M,d as E}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-WV7ML4CJ.js";import{a as P}from"./chunk-V363EHJE.js";import{Db as d,Jb as y,Ka as s,Kb as v,Lb as C,Ma as g,S as f,Tb as l,Tc as w,Ub as x,Wa as b,ca as n,ma as _,rb as m,sb as a,t as h,ta as p,tb as i}from"./chunk-B4RKRLIY.js";var O=["composerInput"],H=class u{http=n(w);router=n(E);route=n(M);config=n(I);destroyRef=n(_);preferences=n(R);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=p("");isCreating=p(!1);constructor(){g(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){this.preferences.shouldSend(t)&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),P(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(O,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:4,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(c){return o.onInput(c)})("keydown",function(c){return o.onKeydown(c)}),i(),a(7,"div",6)(8,"span",7),l(9),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(s(5),m("value",o.inputValue())("disabled",o.isCreating()),s(4),x(o.preferences.composerHint()),s(),m("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px var(--color-shadow, rgba(0, 0, 0, .07));overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{H as a};
@@ -0,0 +1 @@
1
+ import{Qc as Z,Rc as u,Sc as V,Tc as j,Z as A,a as b,aa as Q,b as f,ba as x,ca as O,da as z,g as K,pa as Y}from"./chunk-B4RKRLIY.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:r,credentials:p,encodeParam:o,encoder:t,password:e,username:i,withCredentials:l}={}){n&&(this.apiKeys=n),i!==void 0&&(this.username=i),e!==void 0&&(this.password=e),C!==void 0&&(this.accessToken=C),r!==void 0&&(this.basePath=r),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=o??(a=>this.defaultEncodeParam(a)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(r=>this.isJsonMime(r));return n===void 0?C[0]:n}isJsonMime(C){let n=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return C!==null&&(n.test(C)||C.toLowerCase()==="application/json-patch+json")}lookupCredential(C){let n=this.credentials[C];return typeof n=="function"?n():n}addCredentialToHeaders(C,n,r,p){let o=this.lookupCredential(C);return o?r.set(n,(p??"")+o):r}addCredentialToQuery(C,n,r){let p=this.lookupCredential(C);return p?r.set(n,p):r}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var v=new Q("basePath");var R=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Z;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let r=Array.isArray(C)?C[0]:void 0;r!=null&&(C=r),typeof C!="string"&&(C=this.basePath),this.configuration.basePath=C}this.encoder=this.configuration.encoder||new R}canConsumeForm(C){return C.indexOf("multipart/form-data")!==-1}addToHttpParams(C,n,r,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?r:void 0,p):this.addToHttpParamsRecursive(C,n,r)}addToHttpParamsRecursive(C,n,r,p=!1){if(n==null)return C;if(typeof n=="object"){if(r!=null)return p?Object.keys(n).reduce((o,t)=>o.append(`${r}[${t}]`,n[t]),C):C.append(r,JSON.stringify(n));if(Array.isArray(n))n.forEach(o=>C=this.addToHttpParamsRecursive(C,o,r));else if(n instanceof Date)if(r!=null)C=C.append(r,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(o=>{let t=r?`${r}.${o}`:o;C=this.addToHttpParamsRecursive(C,n[o],t)});return C}else if(r!=null)return C.append(r,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}disableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling disableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/disable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}enableAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling enableAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/enable`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getDefinitionAgentConfig(n,r,p,o="body",t=!1,e){if(n==null)throw new Error("Required parameter id was null or undefined when calling getDefinitionAgentConfig.");let i=new V({encoder:this.encoder});i=this.addToHttpParams(i,r,"withUserOverlay"),i=this.addToHttpParams(i,p,"namespaceId");let l=this.defaultHeaders,a=e?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);a!==void 0&&(l=l.set("Accept",a));let d=e?.context??new u,s=e?.transferCache??!0,c="json";a&&(a.startsWith("text")?c="text":this.configuration.isJsonMime(a)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/definition`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("get",`${h}${g}`,f(b({context:d,params:i,responseType:c},m?{withCredentials:m}:{}),{headers:l,observe:o,transferCache:s,reportProgress:t}))}listByNamespaceAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByNamespaceAgentConfig.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"withDisabled");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/agent-configs/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}listPlatformAgentsAgentConfig(n,r="body",p=!1,o){let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"withDisabled");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/agent-configs/platform",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}searchAgentConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/agent-configs/search",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateAgentConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(r==null)throw new Error("Required parameter agentConfig was null or undefined when calling updateAgentConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/agent-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-models/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-namespaceId/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentAiModel(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-models/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listPlatformLevelAiModel(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/ai-models/platform",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}updateAiModel(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(r==null)throw new Error("Required parameter aiModel was null or undefined when calling updateAiModel.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-models/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/ai-providers/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAiProvider(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/ai-providers",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateAiProvider(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(r==null)throw new Error("Required parameter aiProvider was null or undefined when calling updateAiProvider.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/ai-providers/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}addMessageCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(r==null)throw new Error("Required parameter addMessageRequest was null or undefined when calling addMessageCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/messages`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}createCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}interruptCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/interrupt`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}killCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/kill`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/${this.configuration.encodeParam({name:"userId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/cases/by-user/external/${this.configuration.encodeParam({name:"externalId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/cases/by-user/in-namespace",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateCase(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(r==null)throw new Error("Required parameter _case was null or undefined when calling updateCase.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/cases/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/integration-configs/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,r,p="body",o=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,r,"userId");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c="/api/integration-configs",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}updateIntegrationConfig(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(r==null)throw new Error("Required parameter integrationConfig was null or undefined when calling updateIntegrationConfig.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/integration-configs/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getTypeIntegrationType(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/integration-types/${this.configuration.encodeParam({name:"type",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/integration-types",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling deployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/deploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}getByIdNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/namespaces",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentNamespace(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(r==null)throw new Error("Required parameter namespaceAgentDeployRequest was null or undefined when calling undeployAgentsNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/undeploy-agents`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateNamespace(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(r==null)throw new Error("Required parameter namespace was null or undefined when calling updateNamespace.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/namespaces/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var X=(o=>(o.OpenAI="OpenAI",o.Anthropic="Anthropic",o.Gemini="Gemini",o.vLLM="vLLM",o.Ollama="Ollama",o))(X||{});var N=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}listPlatformPrompt(){let{basePath:n,withCredentials:r}=this.configuration;return this.httpClient.get(`${n}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"PLATFORM"}},r?{withCredentials:r}:{}),{context:new u}))}listByNamespacePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts`,f(b({headers:this.defaultHeaders,params:{scope:"NAMESPACE",namespaceId:n}},p?{withCredentials:p}:{}),{context:new u}))}getByIdPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.get(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}createPrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.post(`${r}/api/prompts`,n,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},p?{withCredentials:p}:{}),{context:new u}))}updatePrompt(n,r){let{basePath:p,withCredentials:o}=this.configuration;return this.httpClient.put(`${p}/api/prompts/${encodeURIComponent(n)}`,r,f(b({headers:this.defaultHeaders.set("Content-Type","application/json")},o?{withCredentials:o}:{}),{context:new u}))}deletePrompt(n){let{basePath:r,withCredentials:p}=this.configuration;return this.httpClient.delete(`${r}/api/prompts/${encodeURIComponent(n)}`,f(b({headers:this.defaultHeaders},p?{withCredentials:p}:{}),{context:new u}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}getByIdCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/case-events/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/case-events/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter feedbackInput was null or undefined when calling createFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/feedbacks",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseEventFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseEventId was null or undefined when calling listByCaseEventFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-case-event/${this.configuration.encodeParam({name:"caseEventId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByCaseFeedback(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseFeedback.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/feedbacks/by-parentId/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}grantAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}grantMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling grantMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("put",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}listNamespaceUsers(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/users`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}revokeAdmin(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeAdmin.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/admins/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}revokeMember(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(r==null)throw new Error("Required parameter targetUserId was null or undefined when calling revokeMember.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s=`/api/namespaces/${this.configuration.encodeParam({name:"namespaceId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/members/${this.configuration.encodeParam({name:"targetUserId",value:r,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("delete",`${c}${s}`,f(b({context:l,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}updateRolesByExternalId(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/namespaces/update-roles-by-external-id",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}debugAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/debug",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}debugPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/debug`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}getPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/reload-agents",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}reloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/reload`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}startPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/start`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}stopPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}/stop`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("post",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}unloadPlugin(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/plugins/${this.configuration.encodeParam({name:"pluginId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:void 0})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/plugins/upload",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("post",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}streamEventsCaseEventSse(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling streamEventsCaseEventSse.");let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,r,"includePreviousEvents");let i=this.defaultHeaders,l=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["text/event-stream"]);l!==void 0&&(i=i.set("Accept",l));let a=t?.context??new u,d=t?.transferCache??!0,s="json";l&&(l.startsWith("text")?s="text":this.configuration.isJsonMime(l)?s="json":s="blob");let c=`/api/cases/${this.configuration.encodeParam({name:"caseId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}/events`,{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("get",`${g}${c}`,f(b({context:a,params:e,responseType:s},h?{withCredentials:h}:{}),{headers:i,observe:p,transferCache:d,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var k=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter getByIdsRequest was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter groupsByExternalIdsRequest was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/groups-by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getMeUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users/me",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listAllUser(n="body",r=!1,p){let o=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(o=o.set("Accept",t));let e=p?.context??new u,i=p?.transferCache??!0,l="json";t&&(t.startsWith("text")?l="text":this.configuration.isJsonMime(t)?l="json":l="blob");let a="/api/users",{basePath:d,withCredentials:s}=this.configuration;return this.httpClient.request("get",`${d}${a}`,f(b({context:e,responseType:l},s?{withCredentials:s}:{}),{headers:o,observe:n,transferCache:i,reportProgress:r}))}listByExternalIdsUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/users/by-external-ids",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}listByParentUser(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/users/by-parentId/${this.configuration.encodeParam({name:"parentId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}updateUser(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(r==null)throw new Error("Required parameter user was null or undefined when calling updateUser.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/users/${this.configuration.encodeParam({name:"id",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};var D=class H extends P{constructor(n,r,p){super(r,p);this.httpClient=n}createUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a=["application/json"],d=this.configuration.selectHeaderContentType(a);d!==void 0&&(t=t.set("Content-Type",d));let s="json";e&&(e.startsWith("text")?s="text":this.configuration.isJsonMime(e)?s="json":s="blob");let c="/api/user-groups",{basePath:g,withCredentials:h}=this.configuration;return this.httpClient.request("post",`${g}${c}`,f(b({context:i,body:n,responseType:s},h?{withCredentials:h}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}deleteUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("delete",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=o?.context??new u,l=o?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:s,withCredentials:c}=this.configuration;return this.httpClient.request("get",`${s}${d}`,f(b({context:i,responseType:a},c?{withCredentials:c}:{}),{headers:t,observe:r,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,r="body",p=!1,o){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling searchByNamespaceIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceId");let e=this.defaultHeaders,i=o?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=o?.context??new u,a=o?.transferCache??!0,d="json";i&&(i.startsWith("text")?d="text":this.configuration.isJsonMime(i)?d="json":d="blob");let s="/api/user-groups",{basePath:c,withCredentials:g}=this.configuration;return this.httpClient.request("get",`${c}${s}`,f(b({context:l,params:t,responseType:d},g?{withCredentials:g}:{}),{headers:e,observe:r,transferCache:a,reportProgress:p}))}updateUserGroup(n,r,p="body",o=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(r==null)throw new Error("Required parameter userGroupUpdateRequest was null or undefined when calling updateUserGroup.");let e=this.defaultHeaders,i=t?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=t?.context??new u,a=t?.transferCache??!0,d=["application/json"],s=this.configuration.selectHeaderContentType(d);s!==void 0&&(e=e.set("Content-Type",s));let c="json";i&&(i.startsWith("text")?c="text":this.configuration.isJsonMime(i)?c="json":c="blob");let g=`/api/user-groups/${this.configuration.encodeParam({name:"userGroupId",value:n,in:"path",style:"simple",explode:!1,dataType:"string",dataFormat:"uuid"})}`,{basePath:h,withCredentials:m}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:r,responseType:c},m?{withCredentials:m}:{}),{headers:e,observe:p,transferCache:a,reportProgress:o}))}static \u0275fac=function(r){return new(r||H)(x(j),x(v,8),x(y,8))};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};function fr(H){return z([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var L=class H{config=O(y);zone=O(Y);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new K(r=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=o=>{try{let t=JSON.parse(o.data);this.zone.run(()=>r.next(t))}catch(t){this.zone.run(()=>r.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=o=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>r.complete()):this.zone.run(()=>r.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=A({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,B as d,$ as e,M as f,U as g,S as h,J as i,W as j,k,X as l,fr as m,N as n};
@@ -1 +1 @@
1
- import{k as l}from"./chunk-BUWF3ZQM.js";import{V as o,Z as s,a as n,ca as a,ta as i}from"./chunk-B4RKRLIY.js";var u=class t{userController=a(l);currentUser=i(null);loadMe(){return this.userController.getMeUser().pipe(o(r=>this.currentUser.set(r)))}updateMe(r){let e=this.currentUser();if(!e)throw new Error("Cannot update: current user not loaded");if(!e.id)throw new Error("Cannot update: current user has no id");let c=n(n({},e),r);return this.userController.updateUser(e.id,c).pipe(o(d=>this.currentUser.set(d)))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{u as a};
1
+ import{k as l}from"./chunk-5P2WWCFC.js";import{V as o,Z as s,a as n,ca as a,ta as i}from"./chunk-B4RKRLIY.js";var u=class t{userController=a(l);currentUser=i(null);loadMe(){return this.userController.getMeUser().pipe(o(r=>this.currentUser.set(r)))}updateMe(r){let e=this.currentUser();if(!e)throw new Error("Cannot update: current user not loaded");if(!e.id)throw new Error("Cannot update: current user has no id");let c=n(n({},e),r);return this.userController.updateUser(e.id,c).pipe(o(d=>this.currentUser.set(d)))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{u as a};
@@ -1 +1 @@
1
- import{h as I}from"./chunk-BUWF3ZQM.js";import{b as k,d as w}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as z,s as L,w as R}from"./chunk-HZF57OLY.js";import{Bb as O,Db as u,Fb as g,Ka as r,Tb as o,Ub as S,Vb as E,Wa as N,a as x,b as v,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=O();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"textarea",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),E(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(w);namespaceController=p(I);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=v(x({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),S(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,z,D,F,V,L,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
1
+ import{h as I}from"./chunk-5P2WWCFC.js";import{b as k,d as w}from"./chunk-4GVABYH4.js";import{a as h}from"./chunk-V363EHJE.js";import{F as B,c as D,e as C,g as F,h as V,i as A,l as s,n as z,s as L,w as R}from"./chunk-HZF57OLY.js";import{Bb as O,Db as u,Fb as g,Ka as r,Tb as o,Ub as S,Vb as E,Wa as N,a as x,b as v,ca as p,ga as _,ha as b,lb as M,ma as y,mb as P,rb as i,sb as n,ta as f,tb as t,ub as l}from"./chunk-B4RKRLIY.js";function T(m,a){m&1&&(n(0,"p",5),o(1,"Loading\u2026"),t())}function $(m,a){if(m&1){let e=O();n(0,"form",7),u("ngSubmit",function(){_(e);let d=g();return b(d.submit())}),n(1,"div",8)(2,"label",9),o(3,"Name "),n(4,"span",10),o(5,"*"),t()(),l(6,"input",11),t(),n(7,"div",8)(8,"label",12),o(9,"Description"),t(),l(10,"textarea",13),t(),n(11,"div",8)(12,"label",14),o(13,"External ID"),t(),l(14,"input",15),t(),n(15,"div",8)(16,"label",16),o(17,"Default agent"),t(),l(18,"input",17),t(),n(19,"div",8)(20,"label",18),o(21,"Config path"),t(),l(22,"input",19),t(),n(23,"div",20)(24,"button",21),o(25),t(),n(26,"button",22),u("click",function(){_(e);let d=g();return b(d.cancel())}),o(27,"Cancel"),t()()()}if(m&2){let e=g();i("formGroup",e.form),r(6),i("formControl",e.nameControl),r(4),i("formControl",e.descriptionControl),r(4),i("formControl",e.externalIdControl),r(4),i("formControl",e.defaultAgentNameControl),r(4),i("formControl",e.configPathControl),r(2),i("disabled",e.nameControl.invalid||e.isSubmitting()),r(),E(" ",e.isEditMode()?"Save changes":"Create"," ")}}var G=class m{route=p(k);router=p(w);namespaceController=p(I);destroyRef=p(y);form=new A({name:new s("",{nonNullable:!0,validators:[C.required,C.minLength(1)]}),description:new s("",{nonNullable:!0}),configPath:new s("",{nonNullable:!0}),externalId:new s("",{nonNullable:!0}),defaultAgentName:new s("",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}isEditMode=f(!1);isSubmitting=f(!1);isLoading=f(!1);existingNamespace=null;ngOnInit(){let a=this.route.snapshot.paramMap.get("namespaceId");a&&(this.isEditMode.set(!0),this.loadNamespace(a))}loadNamespace(a){this.isLoading.set(!0),this.namespaceController.getByIdNamespace(a).pipe(h(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let a=v(x({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",a):this.namespaceController.createNamespace(a)).pipe(h(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos/namespaces"])}static \u0275fac=function(e){return new(e||m)};static \u0275cmp=N({type:m,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,c){e&1&&(n(0,"div",0)(1,"header",1)(2,"button",2),u("click",function(){return c.cancel()}),n(3,"span",3),o(4,"\u2190"),t(),o(5," Namespaces "),t(),n(6,"h1",4),o(7),t()(),M(8,T,2,0,"p",5)(9,$,28,8,"form",6),t()),e&2&&(r(7),S(c.isEditMode()?"Edit namespace":"New namespace"),r(),P(c.isLoading()?8:9))},dependencies:[B,z,D,F,V,L,R],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{G as NamespaceFormComponent};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-OBJWOIYT.js";import{b as B}from"./chunk-BUWF3ZQM.js";import{b as M,d as $}from"./chunk-4GVABYH4.js";import{u as D}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as m}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as b,Db as r,Fb as c,Hc as T,Pb as I,S as d,Tb as x,Wa as y,ab as h,ac as N,ca as a,dc as R,ec as w,ga as C,ha as _,hc as k,i as f,lb as v,ma as u,mb as A,rb as p,sb as s,t as l,tb as g}from"./chunk-B4RKRLIY.js";var F=()=>[];function P(n,t){if(n&1){let e=b();s(0,"agentos-agent-config-item",4),r("deleteRequested",function(i){C(e);let S=c(2);return _(S.deleteConfig(i))}),g()}if(n&2){let e=c(2);p("config",t)("namespaceId",e.namespaceId)}}function L(n,t){if(n&1&&v(0,P,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=c();A((e=i.resolveConfig(o.id))?0:-1,e)}}var E=class n{route=a(M);router=a($);destroyRef=a(u);agentConfigController=a(B);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new f(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listByNamespaceAgentConfig(this.namespaceId)));configItems$=this.configs$.pipe(l(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(m(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(m(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId"],[3,"deleteRequested","config","namespaceId"]],template:function(e,o){if(e&1&&(s(0,"ds-entity-list",1),R(1,"async"),r("createRequested",function(){return o.openCreateForm()}),s(2,"button",2),r("click",function(){return o.goBack()}),x(3," \u2190 Namespaces "),g()(),h(4,L,1,1,"ng-template",null,0,k)),e&2){let i=I(5);p("items",w(1,3,o.configItems$)??N(5,F))("showCreate",!0)("itemTemplate",i)}},dependencies:[D,q,T],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{E as NamespaceAgentConfigsComponent};
1
+ import{a as q}from"./chunk-OBJWOIYT.js";import{b as B}from"./chunk-5P2WWCFC.js";import{b as M,d as $}from"./chunk-4GVABYH4.js";import{u as D}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as m}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as b,Db as r,Fb as c,Hc as T,Pb as I,S as d,Tb as x,Wa as y,ab as h,ac as N,ca as a,dc as R,ec as w,ga as C,ha as _,hc as k,i as f,lb as v,ma as u,mb as A,rb as p,sb as s,t as l,tb as g}from"./chunk-B4RKRLIY.js";var F=()=>[];function P(n,t){if(n&1){let e=b();s(0,"agentos-agent-config-item",4),r("deleteRequested",function(i){C(e);let S=c(2);return _(S.deleteConfig(i))}),g()}if(n&2){let e=c(2);p("config",t)("namespaceId",e.namespaceId)}}function L(n,t){if(n&1&&v(0,P,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=c();A((e=i.resolveConfig(o.id))?0:-1,e)}}var E=class n{route=a(M);router=a($);destroyRef=a(u);agentConfigController=a(B);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new f(void 0);configs$=this.refresh$.pipe(d(()=>this.agentConfigController.listByNamespaceAgentConfig(this.namespaceId)));configItems$=this.configs$.pipe(l(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(m(this.destroyRef)).subscribe(t=>{this.configsById=new Map(t.map(e=>[e.id??"",e]))})}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"])}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(m(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:6,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId"],[3,"deleteRequested","config","namespaceId"]],template:function(e,o){if(e&1&&(s(0,"ds-entity-list",1),R(1,"async"),r("createRequested",function(){return o.openCreateForm()}),s(2,"button",2),r("click",function(){return o.goBack()}),x(3," \u2190 Namespaces "),g()(),h(4,L,1,1,"ng-template",null,0,k)),e&2){let i=I(5);p("items",w(1,3,o.configItems$)??N(5,F))("showCreate",!0)("itemTemplate",i)}},dependencies:[D,q,T],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{E as NamespaceAgentConfigsComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-UXIUSXZT.js";import{a as Z}from"./chunk-H5QMVJMP.js";import"./chunk-T3IUNA6F.js";import"./chunk-NKNHWFYH.js";import{g as B}from"./chunk-BUWF3ZQM.js";import{b as R,d as L}from"./chunk-4GVABYH4.js";import{q as X}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as v,c as y}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import{F as W,c as z,e as x,g as A,h as G,i as q,l as u,n as j,p as $,s as J,w as U,x as H,y as K,z as Q}from"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as T,Db as g,Fb as p,Ka as a,Tb as l,Ub as b,Vb as N,Wa as w,ca as m,ga as _,ha as h,kb as I,kc as D,lb as M,m as E,ma as F,mb as P,pb as O,qb as k,rb as s,sb as i,ta as d,tb as o,ua as V,ub as C}from"./chunk-B4RKRLIY.js";function te(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function ne(r,e){if(r&1&&(i(0,"label",10),C(1,"input",25),i(2,"span"),l(3),o()()),r&2){let t=e.$implicit,n=p(2);a(),s("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),a(2),b(t.label)}}function oe(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),b(t.displayName)}}function ie(r,e){if(r&1){let t=T();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return h(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function re(r,e){if(r&1){let t=T();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return h(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,ne,4,4,"label",10,I().trackByScope,!0),o(),i(6,"div",11)(7,"label",12),l(8,"Type "),i(9,"span",13),l(10,"*"),o()(),i(11,"select",14)(12,"option",15),l(13,"Select type"),o(),O(14,oe,2,2,"option",16,I().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),C(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),C(25,"textarea",20),o(),M(26,ie,2,2,"div",21),i(27,"div",22)(28,"button",23),l(29),o(),i(30,"button",24),g("click",function(){_(t);let c=p();return h(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),k(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),k(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),P((t=n.schema())?26:-1,t),a(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),a(),N(" ",n.isEditMode()?"Save changes":"Create"," ")}}var ae=new Set(["platform","namespace","userOnNs","userGlobal"]),S=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ee=class r{route=m(R);router=m(L);destroyRef=m(F);state=m(Y);integrationTypeController=m(B);namespaceRole=m(Z);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=y(this.isPlatformMode?E(!0):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new q({name:new u("",{nonNullable:!0,validators:[x.required,x.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[x.required]}),scope:new u("namespace",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);scopeOptions=[{value:"platform",label:S.platform},{value:"namespace",label:S.namespace},{value:"userOnNs",label:S.userOnNs},{value:"userGlobal",label:S.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=y(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=y(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=D(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){V(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let c=this.parseScope(t.get("scope"));this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&ae.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t,this.scopeControl.setValue(this.deriveScopeFromConfig(t)),this.applyConfigToForm(t),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters)}onParamsChange(e){this.paramsValue.set(e)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue()},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=w({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),g("click",function(){return n.cancel()}),i(3,"span",3),l(4,"\u2190"),o(),l(5," Integrations "),o(),i(6,"h1",4),l(7),o()(),M(8,te,2,0,"p",5)(9,re,32,8,"form",6),o()),t&2&&(a(7),b(n.isEditMode()?"Edit integration":"New integration"),a(),P(n.isLoading()?8:9))},dependencies:[W,j,K,Q,z,H,$,A,G,J,U,X],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));border-radius:10px;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text, #1d1d1f);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ee as IntegrationFormComponent};
1
+ import{a as Z}from"./chunk-NE7BOWVE.js";import{a as Y}from"./chunk-3UZ346ET.js";import"./chunk-T3IUNA6F.js";import"./chunk-5WWHTBZX.js";import{g as B}from"./chunk-5P2WWCFC.js";import{b as R,d as L}from"./chunk-4GVABYH4.js";import{q as X}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as v,c as y}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import{F as W,c as z,e as x,g as A,h as G,i as q,l as u,n as j,p as $,s as J,w as U,x as H,y as K,z as Q}from"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as T,Db as g,Fb as p,Ka as a,Tb as l,Ub as b,Vb as N,Wa as w,ca as m,ga as _,ha as h,kb as I,kc as D,lb as M,m as E,ma as F,mb as P,pb as O,qb as k,rb as s,sb as i,ta as d,tb as o,ua as V,ub as C}from"./chunk-B4RKRLIY.js";function te(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function ne(r,e){if(r&1&&(i(0,"label",10),C(1,"input",25),i(2,"span"),l(3),o()()),r&2){let t=e.$implicit,n=p(2);a(),s("value",t.value)("formControl",n.scopeControl)("disabled",t.value==="namespace"&&!n.isAdmin()),a(2),b(t.label)}}function oe(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),b(t.displayName)}}function ie(r,e){if(r&1){let t=T();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return h(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function re(r,e){if(r&1){let t=T();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return h(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,ne,4,4,"label",10,I().trackByScope,!0),o(),i(6,"div",11)(7,"label",12),l(8,"Type "),i(9,"span",13),l(10,"*"),o()(),i(11,"select",14)(12,"option",15),l(13,"Select type"),o(),O(14,oe,2,2,"option",16,I().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),C(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),C(25,"textarea",20),o(),M(26,ie,2,2,"div",21),i(27,"div",22)(28,"button",23),l(29),o(),i(30,"button",24),g("click",function(){_(t);let c=p();return h(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),k(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),k(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),P((t=n.schema())?26:-1,t),a(2),s("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),a(),N(" ",n.isEditMode()?"Save changes":"Create"," ")}}var ae=new Set(["platform","namespace","userOnNs","userGlobal"]),S=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ee=class r{route=m(R);router=m(L);destroyRef=m(F);state=m(Y);integrationTypeController=m(B);namespaceRole=m(Z);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=y(this.isPlatformMode?E(!0):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new q({name:new u("",{nonNullable:!0,validators:[x.required,x.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[x.required]}),scope:new u("namespace",{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=d(!1);isSubmitting=d(!1);isLoading=d(!1);scopeOptions=[{value:"platform",label:S.platform},{value:"namespace",label:S.namespace},{value:"userOnNs",label:S.userOnNs},{value:"userGlobal",label:S.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=y(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=y(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=D(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){V(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId");if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let c=this.parseScope(t.get("scope"));this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&ae.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId&&!e.namespaceId?"platform":e.userId?e.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.existingConfig=t,this.scopeControl.setValue(this.deriveScopeFromConfig(t)),this.applyConfigToForm(t),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),console.warn(`[IntegrationForm] Could not load config '${e}' \u2014 navigating back`),this.navigateBack()}})}hydrateFromTemplate(e){this.isLoading.set(!0),this.state.getById(e).pipe(v(this.destroyRef)).subscribe({next:t=>{this.applyConfigToForm(t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})},error:t=>{console.warn(`[IntegrationForm] Could not hydrate from template ${e}:`,t),this.isLoading.set(!1),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:!0})}})}applyConfigToForm(e){this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.typeControl.setValue(e.integrationType),this.initialParams.set(e.parameters),this.paramsValue.set(e.parameters)}onParamsChange(e){this.paramsValue.set(e)}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(!0);let e=this.descriptionControl.value?.trim(),t={name:this.nameControl.value.trim(),description:e||null,integrationType:this.typeControl.value,parameters:this.paramsValue()},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,t,n,this.existingConfig):this.state.create(t,n,this.namespaceId??null)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"])}trackByType(e,t){return t.type}trackByScope(e,t){return t.value}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=w({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"]],template:function(t,n){t&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),g("click",function(){return n.cancel()}),i(3,"span",3),l(4,"\u2190"),o(),l(5," Integrations "),o(),i(6,"h1",4),l(7),o()(),M(8,te,2,0,"p",5)(9,re,32,8,"form",6),o()),t&2&&(a(7),b(n.isEditMode()?"Edit integration":"New integration"),a(),P(n.isLoading()?8:9))},dependencies:[W,j,K,Q,z,H,$,A,G,J,U,X],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));border-radius:10px;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text, #1d1d1f);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:10px;border:1px solid var(--color-border-light, rgba(0, 0, 0, .06));background:var(--glass-bg, rgba(255, 255, 255, .5));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px))}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{ee as IntegrationFormComponent};
@@ -0,0 +1 @@
1
+ import{a as q}from"./chunk-INPPLYFX.js";import{n as B}from"./chunk-5P2WWCFC.js";import{d as $}from"./chunk-4GVABYH4.js";import{u as D}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 v,Db as m,Fb as l,Hc as T,Pb as M,S as _,Tb as R,Wa as g,ab as C,ac as w,ca as p,dc as I,ec as k,ga as u,ha as y,hc as x,i as c,lb as h,ma as P,mb as b,rb as s,sb as i,t as f,tb as a}from"./chunk-B4RKRLIY.js";var F=()=>[];function A(o,e){if(o&1){let t=v();i(0,"agentos-prompt-item",4),m("deleteRequested",function(r){u(t);let S=l(2);return y(S.deletePrompt(r))}),a()}o&2&&s("prompt",e)("platformMode",!0)}function L(o,e){if(o&1&&h(0,A,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=l();b((t=r.resolvePrompt(n.id))?0:-1,t)}}var E=class o{router=p($);destroyRef=p(P);promptController=p(B);refresh$=new c(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptController.listPlatformPrompt()));promptItems$=this.prompts$.pipe(f(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"])}deletePrompt(e){this.promptController.deletePrompt(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=g({type:o,selectors:[["agentos-platform-prompts"]],decls:6,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-prompts__back",3,"click"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(i(0,"ds-entity-list",1),I(1,"async"),m("createRequested",function(){return n.openCreateForm()}),i(2,"button",2),m("click",function(){return n.goBack()}),R(3,"\u2190 Admin"),a()(),C(4,L,1,1,"ng-template",null,0,x)),t&2){let r=M(5);s("items",k(1,3,n.promptItems$)??w(5,F))("showCreate",!0)("itemTemplate",r)}},dependencies:[D,q,T],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{E as PlatformPromptsComponent};
@@ -1 +1 @@
1
- import{a}from"./chunk-MNRESS2L.js";import"./chunk-SMT5YVCA.js";import"./chunk-BUWF3ZQM.js";import"./chunk-FPNEFWYN.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseChatComponent};
1
+ import{a}from"./chunk-TIF4AFYM.js";import"./chunk-SMT5YVCA.js";import"./chunk-5P2WWCFC.js";import"./chunk-FPNEFWYN.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as CaseChatComponent};
@@ -1 +1 @@
1
- import{k as p}from"./chunk-BUWF3ZQM.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
1
+ import{k as p}from"./chunk-5P2WWCFC.js";import{V as s,Z as d,a as n,ca as u,ta as a}from"./chunk-B4RKRLIY.js";var c=class o{userController=u(p);users=a([]);isLoading=a(!1);loadAll(){return this.isLoading.set(!0),this.userController.listAllUser().pipe(s({next:e=>{this.users.set(e),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)}))}createUser(e){return this.userController.createUser(e).pipe(s(()=>{this.loadAll().subscribe()}))}updateUser(e,r){let t=this.users().find(i=>i.id===e);if(!t)throw new Error(`Cannot update: user ${e} not found in state`);let U=n(n({},t),r);return this.userController.updateUser(e,U).pipe(s(i=>{this.users.update(b=>b.map(l=>l.id===i.id?i:l))}))}deleteUser(e){return this.userController.deleteUser(e).pipe(s(()=>{this.users.update(r=>r.filter(t=>t.id!==e))}))}static \u0275fac=function(r){return new(r||o)};static \u0275prov=d({token:o,factory:o.\u0275fac,providedIn:"root"})};export{c as a};
@@ -1 +1 @@
1
- import{b as a}from"./chunk-VOZI5GZY.js";import"./chunk-BUWF3ZQM.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
1
+ import{b as a}from"./chunk-EBPM4OO4.js";import"./chunk-5P2WWCFC.js";import"./chunk-4GVABYH4.js";import"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import"./chunk-B4RKRLIY.js";export{a as NamespaceListComponent};
@@ -1 +1 @@
1
- import{a as S}from"./chunk-64JAXTG4.js";import{c as E,d as B}from"./chunk-BUWF3ZQM.js";import{d as $}from"./chunk-4GVABYH4.js";import{u as D}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as f}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as P,Db as l,Fb as d,Hc as q,Pb as I,S as v,Tb as R,Wa as C,ab as A,ac as w,ca as n,dc as x,ec as T,ga as m,ha as p,hc as k,i as u,lb as b,ma as g,mb as h,rb as c,sb as a,t as M,tb as _,u as y}from"./chunk-B4RKRLIY.js";var N=()=>[];function V(r,t){if(r&1){let o=P();a(0,"agentos-ai-model-item",4),l("editRequested",function(e){m(o);let s=d(2);return p(s.onEdit(e))})("deleteRequested",function(e){m(o);let s=d(2);return p(s.deleteModel(e))}),_()}r&2&&c("model",t)}function F(r,t){if(r&1&&b(0,V,1,1,"agentos-ai-model-item",3),r&2){let o,i=t.$implicit,e=d();h((o=e.resolveModel(i.id))?0:-1,o)}}var L=class r{router=n($);destroyRef=n(g);aiModelController=n(E);aiProviderController=n(B);refresh$=new u(void 0);data$=this.refresh$.pipe(v(()=>y([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")])));modelItems$=this.data$.pipe(M(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(f(this.destroyRef)).subscribe(([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"])}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(f(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"])}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=C({type:r,selectors:[["agentos-platform-ai-models"]],decls:6,vars:6,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-ai-models__back",3,"click"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(a(0,"ds-entity-list",1),x(1,"async"),l("createRequested",function(){return i.openCreateForm()}),a(2,"button",2),l("click",function(){return i.goBack()}),R(3,"\u2190 Admin"),_()(),A(4,F,1,1,"ng-template",null,0,k)),o&2){let e=I(5);c("items",T(1,3,i.modelItems$)??w(5,N))("showCreate",!0)("itemTemplate",e)}},dependencies:[D,S,q],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"],changeDetection:0})};export{L as PlatformAiModelsComponent};
1
+ import{a as S}from"./chunk-64JAXTG4.js";import{c as E,d as B}from"./chunk-5P2WWCFC.js";import{d as $}from"./chunk-4GVABYH4.js";import{u as D}from"./chunk-WV7ML4CJ.js";import"./chunk-BUA6GPP7.js";import"./chunk-Z7E7NSDY.js";import{a as f}from"./chunk-V363EHJE.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as P,Db as l,Fb as d,Hc as q,Pb as I,S as v,Tb as R,Wa as C,ab as A,ac as w,ca as n,dc as x,ec as T,ga as m,ha as p,hc as k,i as u,lb as b,ma as g,mb as h,rb as c,sb as a,t as M,tb as _,u as y}from"./chunk-B4RKRLIY.js";var N=()=>[];function V(r,t){if(r&1){let o=P();a(0,"agentos-ai-model-item",4),l("editRequested",function(e){m(o);let s=d(2);return p(s.onEdit(e))})("deleteRequested",function(e){m(o);let s=d(2);return p(s.deleteModel(e))}),_()}r&2&&c("model",t)}function F(r,t){if(r&1&&b(0,V,1,1,"agentos-ai-model-item",3),r&2){let o,i=t.$implicit,e=d();h((o=e.resolveModel(i.id))?0:-1,o)}}var L=class r{router=n($);destroyRef=n(g);aiModelController=n(E);aiProviderController=n(B);refresh$=new u(void 0);data$=this.refresh$.pipe(v(()=>y([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")])));modelItems$=this.data$.pipe(M(([t,o])=>{let i=new Map(o.map(e=>[e.id??"",e.name]));return t.map(e=>({id:e.id??"",name:e.alias??e.apiModelName,description:e.apiModelName,groupKey:e.aiProviderId,groupLabel:i.get(e.aiProviderId)??e.aiProviderId}))}));modelsById=new Map;constructor(){this.data$.pipe(f(this.destroyRef)).subscribe(([t])=>{this.modelsById=new Map(t.map(o=>[o.id??"",o]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"])}deleteModel(t){this.aiModelController.deleteAiModel(t.id??"").pipe(f(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-models",t.id,"edit"])}resolveModel(t){return this.modelsById.get(t)??null}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=C({type:r,selectors:[["agentos-platform-ai-models"]],decls:6,vars:6,consts:[["aiModelItemTpl",""],["title","Platform AI Models","emptyMessage","No platform AI models defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"platform-ai-models__back",3,"click"],[3,"model"],[3,"editRequested","deleteRequested","model"]],template:function(o,i){if(o&1&&(a(0,"ds-entity-list",1),x(1,"async"),l("createRequested",function(){return i.openCreateForm()}),a(2,"button",2),l("click",function(){return i.goBack()}),R(3,"\u2190 Admin"),_()(),A(4,F,1,1,"ng-template",null,0,k)),o&2){let e=I(5);c("items",T(1,3,i.modelItems$)??w(5,N))("showCreate",!0)("itemTemplate",e)}},dependencies:[D,S,q],styles:[".platform-ai-models__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-models__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"],changeDetection:0})};export{L as PlatformAiModelsComponent};
@@ -0,0 +1 @@
1
+ import{d as c}from"./chunk-4GVABYH4.js";import{Eb as o,Tb as n,Wa as s,ca as l,vb as e,wb as t}from"./chunk-B4RKRLIY.js";var p=class d{router=l(c);navigateTo(a){this.router.navigate([a])}static \u0275fac=function(r){return new(r||d)};static \u0275cmp=s({type:d,selectors:[["agentos-admin-home"]],decls:49,vars:0,consts:[[1,"admin-home"],[1,"admin-home__header"],[1,"admin-home__title"],[1,"admin-home__subtitle"],[1,"admin-home__sections"],["type","button",1,"admin-home__card",3,"click"],[1,"admin-home__card-icon"],[1,"admin-home__card-title"],[1,"admin-home__card-description"]],template:function(r,i){r&1&&(e(0,"div",0)(1,"header",1)(2,"h1",2),n(3,"Administration"),t(),e(4,"p",3),n(5,"Platform-level settings, visible to super-admins only."),t()(),e(6,"nav",4)(7,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/users")}),e(8,"span",6),n(9,"\u{1F464}"),t(),e(10,"span",7),n(11,"Users"),t(),e(12,"span",8),n(13,"Manage all platform users and their admin rights."),t()(),e(14,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/agent-configs")}),e(15,"span",6),n(16,"\u{1F916}"),t(),e(17,"span",7),n(18,"Platform agents"),t(),e(19,"span",8),n(20,"Manage agent configs shared across all namespaces."),t()(),e(21,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/integration-configs")}),e(22,"span",6),n(23,"\u{1F517}"),t(),e(24,"span",7),n(25,"Platform integrations"),t(),e(26,"span",8),n(27,"Manage integration configs shared across all namespaces."),t()(),e(28,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/ai-providers")}),e(29,"span",6),n(30,"\u{1F916}"),t(),e(31,"span",7),n(32,"Platform AI providers"),t(),e(33,"span",8),n(34,"Manage AI provider configs shared across all namespaces."),t()(),e(35,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/ai-models")}),e(36,"span",6),n(37,"\u{1F9E0}"),t(),e(38,"span",7),n(39,"Platform AI models"),t(),e(40,"span",8),n(41,"Manage AI model configs shared across all namespaces."),t()(),e(42,"button",5),o("click",function(){return i.navigateTo("/agentos/admin/prompts")}),e(43,"span",6),n(44,"\u{1F4C4}"),t(),e(45,"span",7),n(46,"Platform prompts"),t(),e(47,"span",8),n(48,"Manage prompts shared across all namespaces."),t()()()())},styles:[".admin-home[_ngcontent-%COMP%]{max-width:640px;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:2rem}.admin-home__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.admin-home__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.admin-home__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6e6e73)}.admin-home__sections[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}.admin-home__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;padding:1.25rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-surface, #fff);cursor:pointer;text-align:left;font-family:inherit;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.admin-home__card[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .02));border-color:var(--color-primary, #007aff);box-shadow:0 2px 8px #007aff14}.admin-home__card-icon[_ngcontent-%COMP%]{font-size:1.75rem;line-height:1}.admin-home__card-title[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;color:var(--color-text, #1d1d1f)}.admin-home__card-description[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}"],changeDetection:0})};export{p as AdminHomeComponent};