@whoz-oss/coday-client 0.166.6 → 0.166.8

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 (37) hide show
  1. package/browser/{chunk-XPCAHGNH.js → chunk-2VZQFTDA.js} +1 -1
  2. package/browser/{chunk-AN6W7YXQ.js → chunk-3T2UXJWR.js} +1 -1
  3. package/browser/{chunk-NZASIVIS.js → chunk-4KLLJOX7.js} +1 -1
  4. package/browser/{chunk-KDYOGYJA.js → chunk-4VNHFKSB.js} +1 -1
  5. package/browser/{chunk-I646GVFV.js → chunk-53FMBD6R.js} +1 -1
  6. package/browser/{chunk-PD2OWAAU.js → chunk-6KZHR4Y5.js} +1 -1
  7. package/browser/{chunk-AMPCXTWI.js → chunk-75VRFLRQ.js} +1 -1
  8. package/browser/{chunk-AQYGROXP.js → chunk-7J3KCU7P.js} +1 -1
  9. package/browser/{chunk-6TYIL3WE.js → chunk-7Q5TJGZE.js} +1 -1
  10. package/browser/{chunk-2CZ6MYXI.js → chunk-A7XWJPWY.js} +1 -1
  11. package/browser/{chunk-XHG7XV2K.js → chunk-BUJEKX2L.js} +1 -1
  12. package/browser/{chunk-2RBWOM63.js → chunk-CN53EODB.js} +1 -1
  13. package/browser/{chunk-G5ODO5PH.js → chunk-DUYUUS2L.js} +1 -1
  14. package/browser/{chunk-Z4B7GWEY.js → chunk-EJIBPEH4.js} +1 -1
  15. package/browser/{chunk-PBNCEIJ3.js → chunk-EYTNFNF3.js} +1 -1
  16. package/browser/{chunk-6URIZSUF.js → chunk-FQTT35CO.js} +1 -1
  17. package/browser/{chunk-U7GMXXZR.js → chunk-IBWXN2FR.js} +1 -1
  18. package/browser/chunk-ID64B57M.js +1 -0
  19. package/browser/{chunk-ZRAZ37BG.js → chunk-MQ5FOOLD.js} +1 -1
  20. package/browser/{chunk-G4KZWCCB.js → chunk-MY2DGYGP.js} +1 -1
  21. package/browser/{chunk-JUIHGG6M.js → chunk-O6R7UCP5.js} +1 -1
  22. package/browser/{chunk-5BTTSQCB.js → chunk-OCSO7P4Q.js} +1 -1
  23. package/browser/{chunk-PZTYR7LK.js → chunk-OSI53EID.js} +1 -1
  24. package/browser/{chunk-QEU4YDGM.js → chunk-PAW6WFZZ.js} +1 -1
  25. package/browser/{chunk-CCG3DVQL.js → chunk-QCKUWYNZ.js} +1 -1
  26. package/browser/{chunk-ET4W2GJD.js → chunk-TDN7XXYJ.js} +1 -1
  27. package/browser/{chunk-GA32RLK6.js → chunk-V6U3QWKO.js} +1 -1
  28. package/browser/{chunk-JBGE4SXL.js → chunk-XFM4KVZ6.js} +1 -1
  29. package/browser/{chunk-22Q7AW5P.js → chunk-YNZCLWLZ.js} +1 -1
  30. package/browser/{chunk-V3Z53FNF.js → chunk-YODHUBU4.js} +1 -1
  31. package/browser/chunk-YPZHBQKQ.js +1 -0
  32. package/browser/{chunk-3Y3BDXQE.js → chunk-YW2XIVPR.js} +1 -1
  33. package/browser/index.html +1 -1
  34. package/browser/{main-ZSAJSPES.js → main-XJOMTJCP.js} +1 -1
  35. package/package.json +1 -1
  36. package/browser/chunk-DSVRB6HO.js +0 -1
  37. package/browser/chunk-N2KAGC3B.js +0 -1
@@ -1 +1 @@
1
- import{b as z,f as D}from"./chunk-N2KAGC3B.js";import{b as V,d as T}from"./chunk-4GVABYH4.js";import{a as M}from"./chunk-V363EHJE.js";import{F as U,b as L,c as $,e as O,g as B,h as G,i as W,l as d,n as j,s as q,w as J}from"./chunk-HZF57OLY.js";import{Bb as E,Db as h,Fb as s,Ka as a,Tb as r,Ub as w,Vb as R,Wa as A,a as k,b as I,ca as p,ga as v,ha as y,lb as C,ma as P,mb as b,pb as F,qb as N,rb as c,sb as o,ta as _,tb as n,ub as f,z as S}from"./chunk-B4RKRLIY.js";var K=(i,t)=>t.config.id;function Q(i,t){i&1&&(o(0,"p",5),r(1,"Loading\u2026"),n())}function X(i,t){if(i&1&&(o(0,"span",32),r(1),n()),i&2){let e=s().$implicit;a(),w(e.config.integrationType)}}function Y(i,t){if(i&1&&f(0,"input",33),i&2){let e=s().$implicit;c("formControl",e.toolsControl)}}function Z(i,t){if(i&1){let e=E();o(0,"div",28)(1,"label",29)(2,"input",30),h("change",function(){let g=v(e).$implicit,m=s(3);return y(m.toggleIntegration(g))}),n(),o(3,"span",31),r(4),n(),C(5,X,2,1,"span",32),n(),C(6,Y,1,1,"input",33),n()}if(i&2){let e=t.$implicit;a(2),c("checked",e.enabled()),a(2),w(e.config.name),a(),b(e.config.integrationType?5:-1),a(),b(e.enabled()?6:-1)}}function ee(i,t){if(i&1&&(o(0,"fieldset",18)(1,"legend",26),r(2,"Integrations"),n(),o(3,"p",27),r(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),n(),F(5,Z,7,4,"div",28,K),n()),i&2){let e=s(2);a(5),N(e.integrationRows())}}function ne(i,t){if(i&1){let e=E();o(0,"form",7),h("ngSubmit",function(){v(e);let g=s();return y(g.submit())}),o(1,"div",8)(2,"label",9),r(3,"Name "),o(4,"span",10),r(5,"*"),n()(),f(6,"input",11),n(),o(7,"div",8)(8,"label",12),r(9,"Description"),n(),f(10,"input",13),n(),o(11,"div",8)(12,"label",14),r(13,"Model name"),n(),f(14,"input",15),n(),o(15,"div",8)(16,"label",16),r(17,"Instructions"),n(),f(18,"textarea",17),n(),C(19,ee,7,0,"fieldset",18),o(20,"div",8)(21,"label",19),f(22,"input",20),o(23,"span",21),r(24,"Advanced mode"),n()(),o(25,"p",22),r(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),n()(),o(27,"div",23)(28,"button",24),r(29),n(),o(30,"button",25),h("click",function(){v(e);let g=s();return y(g.cancel())}),r(31,"Cancel"),n()()()}if(i&2){let e=s();c("formGroup",e.form),a(6),c("formControl",e.nameControl),a(4),c("formControl",e.descriptionControl),a(4),c("formControl",e.modelNameControl),a(4),c("formControl",e.instructionsControl),a(),b(e.integrationRows().length>0?19:-1),a(3),c("formControl",e.advancedExecutionControl),a(6),c("disabled",e.form.invalid||e.isSubmitting()),a(),R(" ",e.isEditMode()?"Save changes":"Create"," ")}}var H=class i{route=p(V);router=p(T);destroyRef=p(P);agentConfigController=p(z);integrationConfigController=p(D);namespaceId=this.route.snapshot.params.namespaceId;form=new W({name:new d("",{nonNullable:!0,validators:[O.required,O.minLength(1)]}),description:new d(null),modelName:new d(null),instructions:new d(null),advancedExecution:new d(!1,{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}isEditMode=_(!1);isSubmitting=_(!1);isLoading=_(!1);integrationRows=_([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(!0),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0)}loadConfigAndIntegrations(t){this.isLoading.set(!0),S({config:this.agentConfigController.getByIdAgentConfig(t),integrations:this.integrationConfigController.listIntegrationConfig(this.namespaceId)}).pipe(M(this.destroyRef)).subscribe({next:({config:e,integrations:l})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??!1),this.integrationRows.set(this.buildIntegrationRows(l,e.integrations??void 0)),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}loadIntegrations(t){this.integrationConfigController.listIntegrationConfig(this.namespaceId).pipe(M(this.destroyRef)).subscribe({next:e=>{this.integrationRows.set(this.buildIntegrationRows(e,t??void 0))}})}buildIntegrationRows(t,e){return t.map(l=>{let g=l.name??"",m=e?.[g],x=e!=null&&g in e,u=Array.isArray(m)?m.join(", "):"";return{config:l,enabled:_(x),toolsControl:new d(u,{nonNullable:!0})}})}toggleIntegration(t){t.enabled.update(e=>!e)}buildIntegrationsPayload(){let e=this.integrationRows().filter(g=>g.enabled());if(e.length===0)return;let l={};for(let g of e){let m=g.config.name??"",x=g.toolsControl.value.trim();x===""?l[m]=null:l[m]=x.split(",").map(u=>u.trim()).filter(u=>u.length>0)}return l}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=I(k({},this.existingConfig??{}),{namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(M(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["agentos-agent-config-form"]],decls:10,vars:2,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__label"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"]],template:function(e,l){e&1&&(o(0,"div",0)(1,"header",1)(2,"button",2),h("click",function(){return l.cancel()}),o(3,"span",3),r(4,"\u2190"),n(),r(5," Agent Configs "),n(),o(6,"h1",4),r(7),n()(),C(8,Q,2,0,"p",5)(9,ne,32,9,"form",6),n()),e&2&&(a(7),w(l.isEditMode()?"Edit agent config":"New agent config"),a(),b(l.isLoading()?8:9))},dependencies:[U,j,$,L,B,G,q,J],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-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}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-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}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-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}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{H as AgentConfigFormComponent};
1
+ import{b as z,f as D}from"./chunk-ID64B57M.js";import{b as V,d as T}from"./chunk-4GVABYH4.js";import{a as M}from"./chunk-V363EHJE.js";import{F as U,b as L,c as $,e as O,g as B,h as G,i as W,l as d,n as j,s as q,w as J}from"./chunk-HZF57OLY.js";import{Bb as E,Db as h,Fb as s,Ka as a,Tb as r,Ub as w,Vb as R,Wa as A,a as k,b as I,ca as p,ga as v,ha as y,lb as C,ma as P,mb as b,pb as F,qb as N,rb as c,sb as o,ta as _,tb as n,ub as f,z as S}from"./chunk-B4RKRLIY.js";var K=(i,t)=>t.config.id;function Q(i,t){i&1&&(o(0,"p",5),r(1,"Loading\u2026"),n())}function X(i,t){if(i&1&&(o(0,"span",32),r(1),n()),i&2){let e=s().$implicit;a(),w(e.config.integrationType)}}function Y(i,t){if(i&1&&f(0,"input",33),i&2){let e=s().$implicit;c("formControl",e.toolsControl)}}function Z(i,t){if(i&1){let e=E();o(0,"div",28)(1,"label",29)(2,"input",30),h("change",function(){let g=v(e).$implicit,m=s(3);return y(m.toggleIntegration(g))}),n(),o(3,"span",31),r(4),n(),C(5,X,2,1,"span",32),n(),C(6,Y,1,1,"input",33),n()}if(i&2){let e=t.$implicit;a(2),c("checked",e.enabled()),a(2),w(e.config.name),a(),b(e.config.integrationType?5:-1),a(),b(e.enabled()?6:-1)}}function ee(i,t){if(i&1&&(o(0,"fieldset",18)(1,"legend",26),r(2,"Integrations"),n(),o(3,"p",27),r(4," Select which integrations this agent can use. Leave tool names empty to allow all tools from an integration. "),n(),F(5,Z,7,4,"div",28,K),n()),i&2){let e=s(2);a(5),N(e.integrationRows())}}function ne(i,t){if(i&1){let e=E();o(0,"form",7),h("ngSubmit",function(){v(e);let g=s();return y(g.submit())}),o(1,"div",8)(2,"label",9),r(3,"Name "),o(4,"span",10),r(5,"*"),n()(),f(6,"input",11),n(),o(7,"div",8)(8,"label",12),r(9,"Description"),n(),f(10,"input",13),n(),o(11,"div",8)(12,"label",14),r(13,"Model name"),n(),f(14,"input",15),n(),o(15,"div",8)(16,"label",16),r(17,"Instructions"),n(),f(18,"textarea",17),n(),C(19,ee,7,0,"fieldset",18),o(20,"div",8)(21,"label",19),f(22,"input",20),o(23,"span",21),r(24,"Advanced mode"),n()(),o(25,"p",22),r(26," When enabled, this agent uses a multi-step reasoning loop instead of a single LLM call. "),n()(),o(27,"div",23)(28,"button",24),r(29),n(),o(30,"button",25),h("click",function(){v(e);let g=s();return y(g.cancel())}),r(31,"Cancel"),n()()()}if(i&2){let e=s();c("formGroup",e.form),a(6),c("formControl",e.nameControl),a(4),c("formControl",e.descriptionControl),a(4),c("formControl",e.modelNameControl),a(4),c("formControl",e.instructionsControl),a(),b(e.integrationRows().length>0?19:-1),a(3),c("formControl",e.advancedExecutionControl),a(6),c("disabled",e.form.invalid||e.isSubmitting()),a(),R(" ",e.isEditMode()?"Save changes":"Create"," ")}}var H=class i{route=p(V);router=p(T);destroyRef=p(P);agentConfigController=p(z);integrationConfigController=p(D);namespaceId=this.route.snapshot.params.namespaceId;form=new W({name:new d("",{nonNullable:!0,validators:[O.required,O.minLength(1)]}),description:new d(null),modelName:new d(null),instructions:new d(null),advancedExecution:new d(!1,{nonNullable:!0})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get modelNameControl(){return this.form.controls.modelName}get instructionsControl(){return this.form.controls.instructions}get advancedExecutionControl(){return this.form.controls.advancedExecution}isEditMode=_(!1);isSubmitting=_(!1);isLoading=_(!1);integrationRows=_([]);existingConfig=null;ngOnInit(){let t=this.route.snapshot.paramMap.get("agentConfigId");t?(this.isEditMode.set(!0),this.loadConfigAndIntegrations(t)):this.loadIntegrations(void 0)}loadConfigAndIntegrations(t){this.isLoading.set(!0),S({config:this.agentConfigController.getByIdAgentConfig(t),integrations:this.integrationConfigController.listIntegrationConfig(this.namespaceId)}).pipe(M(this.destroyRef)).subscribe({next:({config:e,integrations:l})=>{this.existingConfig=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.modelNameControl.setValue(e.modelName??null),this.instructionsControl.setValue(e.instructions??null),this.advancedExecutionControl.setValue(e.advancedExecution??!1),this.integrationRows.set(this.buildIntegrationRows(l,e.integrations??void 0)),this.isLoading.set(!1)},error:()=>{this.isLoading.set(!1),this.navigateBack()}})}loadIntegrations(t){this.integrationConfigController.listIntegrationConfig(this.namespaceId).pipe(M(this.destroyRef)).subscribe({next:e=>{this.integrationRows.set(this.buildIntegrationRows(e,t??void 0))}})}buildIntegrationRows(t,e){return t.map(l=>{let g=l.name??"",m=e?.[g],x=e!=null&&g in e,u=Array.isArray(m)?m.join(", "):"";return{config:l,enabled:_(x),toolsControl:new d(u,{nonNullable:!0})}})}toggleIntegration(t){t.enabled.update(e=>!e)}buildIntegrationsPayload(){let e=this.integrationRows().filter(g=>g.enabled());if(e.length===0)return;let l={};for(let g of e){let m=g.config.name??"",x=g.toolsControl.value.trim();x===""?l[m]=null:l[m]=x.split(",").map(u=>u.trim()).filter(u=>u.length>0)}return l}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(!0);let t=I(k({},this.existingConfig??{}),{namespaceId:this.namespaceId,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,modelName:this.modelNameControl.value?.trim()||void 0,instructions:this.instructionsControl.value?.trim()||void 0,integrations:this.buildIntegrationsPayload(),advancedExecution:this.advancedExecutionControl.value});(this.isEditMode()?this.agentConfigController.updateAgentConfig(this.existingConfig.id??"",t):this.agentConfigController.createAgentConfig(t)).pipe(M(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs"])}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=A({type:i,selectors:[["agentos-agent-config-form"]],decls:10,vars:2,consts:[[1,"agent-config-form"],[1,"agent-config-form__header"],["type","button","title","Back to agent configs",1,"agent-config-form__back",3,"click"],[1,"agent-config-form__back-icon"],[1,"agent-config-form__title"],[1,"agent-config-form__loading"],[1,"agent-config-form__form",3,"formGroup"],[1,"agent-config-form__form",3,"ngSubmit","formGroup"],[1,"agent-config-form__field"],["for","agent-config-name",1,"agent-config-form__label"],["aria-hidden","true"],["id","agent-config-name","type","text","placeholder","e.g. Support agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-description",1,"agent-config-form__label"],["id","agent-config-description","type","text","placeholder","Optional \u2014 short description of this agent","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-model-name",1,"agent-config-form__label"],["id","agent-config-model-name","type","text","placeholder","Optional \u2014 model alias or name to use","autocomplete","off",1,"agent-config-form__input",3,"formControl"],["for","agent-config-instructions",1,"agent-config-form__label"],["id","agent-config-instructions","rows","6","placeholder","Optional \u2014 system instructions for this agent",1,"agent-config-form__textarea",3,"formControl"],[1,"agent-config-form__integrations"],[1,"agent-config-form__toggle-label"],["type","checkbox",1,"agent-config-form__toggle-checkbox",3,"formControl"],[1,"agent-config-form__toggle-text"],[1,"agent-config-form__toggle-hint"],[1,"agent-config-form__actions"],["type","submit",1,"agent-config-form__btn","agent-config-form__btn--primary",3,"disabled"],["type","button",1,"agent-config-form__btn",3,"click"],[1,"agent-config-form__label"],[1,"agent-config-form__integrations-hint"],[1,"agent-config-form__integration-row"],[1,"agent-config-form__integration-toggle"],["type","checkbox",1,"agent-config-form__integration-checkbox",3,"change","checked"],[1,"agent-config-form__integration-name"],[1,"agent-config-form__integration-type"],["type","text","placeholder","Tool names, comma-separated (empty = all tools)","autocomplete","off",1,"agent-config-form__input","agent-config-form__integration-tools",3,"formControl"]],template:function(e,l){e&1&&(o(0,"div",0)(1,"header",1)(2,"button",2),h("click",function(){return l.cancel()}),o(3,"span",3),r(4,"\u2190"),n(),r(5," Agent Configs "),n(),o(6,"h1",4),r(7),n()(),C(8,Q,2,0,"p",5)(9,ne,32,9,"form",6),n()),e&2&&(a(7),w(l.isEditMode()?"Edit agent config":"New agent config"),a(),b(l.isLoading()?8:9))},dependencies:[U,j,$,L,B,G,q,J],styles:[".agent-config-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.agent-config-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.agent-config-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}.agent-config-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.agent-config-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.agent-config-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.agent-config-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.agent-config-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.agent-config-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__input[_ngcontent-%COMP%], .agent-config-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}.agent-config-form__input[_ngcontent-%COMP%]:focus, .agent-config-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.agent-config-form__input[_ngcontent-%COMP%]::placeholder, .agent-config-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.agent-config-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px;line-height:1.5}.agent-config-form__integrations[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem;margin:0;display:flex;flex-direction:column;gap:.75rem}.agent-config-form__integrations-hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__integration-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.agent-config-form__integration-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__integration-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__integration-name[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__integration-type[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace}.agent-config-form__integration-tools[_ngcontent-%COMP%]{margin-left:1.5rem;font-size:.875rem}.agent-config-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.agent-config-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.agent-config-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.agent-config-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.agent-config-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.agent-config-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}.agent-config-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.agent-config-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.agent-config-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.agent-config-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"],changeDetection:0})};export{H as AgentConfigFormComponent};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-N2KAGC3B.js";import{b as w,d as M}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-VDRETD5H.js";import{a as I}from"./chunk-V363EHJE.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,S as f,Tb as l,Tc as x,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-B4RKRLIY.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px #00000012;overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
1
+ import{a as E}from"./chunk-ID64B57M.js";import{b as w,d as M}from"./chunk-4GVABYH4.js";import{p as k}from"./chunk-VDRETD5H.js";import{a as I}from"./chunk-V363EHJE.js";import{Db as d,Jb as y,Ka as m,Kb as v,Lb as C,Ma as _,S as f,Tb as l,Tc as x,Wa as b,ca as n,ma as g,rb as p,sb as a,t as h,ta as c,tb as i}from"./chunk-B4RKRLIY.js";var H=["composerInput"],P=class u{http=n(x);router=n(M);route=n(w);config=n(E);destroyRef=n(g);composerInput;namespaceId=this.route.snapshot.params.namespaceId;inputValue=c("");isCreating=c(!1);constructor(){_(()=>{this.composerInput?.nativeElement.focus()})}get canSend(){return!!this.inputValue().trim()&&!this.isCreating()}onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){if(!this.canSend)return;let t=this.inputValue().trim();this.inputValue.set(""),this.isCreating.set(!0),this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).pipe(f(e=>this.http.post(`${this.config.basePath}/api/cases/${e.id}/messages`,{content:t,userId:"default-user"}).pipe(h(()=>e))),I(this.destroyRef)).subscribe({next:e=>{this.router.navigate([e.id??""],{relativeTo:this.route})},error:e=>{console.error("[CaseHome] Failed to create case or send first message",e),this.isCreating.set(!1),this.inputValue.set(t)}})}static \u0275fac=function(e){return new(e||u)};static \u0275cmp=b({type:u,selectors:[["agentos-case-home"]],viewQuery:function(e,o){if(e&1&&y(H,5),e&2){let r;v(r=C())&&(o.composerInput=r.first)}},decls:11,vars:3,consts:[["composerInput",""],[1,"case-home"],[1,"case-home__hero"],[1,"case-home__headline"],[1,"case-home__composer"],["placeholder","Describe your task or ask a question\u2026","rows","4",1,"case-home__input",3,"input","keydown","value","disabled"],[1,"case-home__composer-footer"],[1,"case-home__hint"],["icon","send","variant","primary","title","Start case (Enter)",3,"action","disabled"]],template:function(e,o){e&1&&(a(0,"div",1)(1,"div",2)(2,"h1",3),l(3,"What can I help you with?"),i(),a(4,"div",4)(5,"textarea",5,0),d("input",function(s){return o.onInput(s)})("keydown",function(s){return o.onKeydown(s)}),i(),a(7,"div",6)(8,"span",7),l(9,"Enter to send\xA0\xA0\xB7\xA0\xA0Shift+Enter for new line"),i(),a(10,"ds-icon-button",8),d("action",function(){return o.submit()}),i()()()()()),e&2&&(m(5),p("value",o.inputValue())("disabled",o.isCreating()),m(5),p("disabled",!o.canSend))},dependencies:[k],styles:[".case-home[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center}.case-home__hero[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:2rem 1.5rem 4rem;max-width:680px;width:100%}.case-home__headline[_ngcontent-%COMP%]{margin:0;font-size:clamp(1.5rem,4vw,2.25rem);font-weight:700;letter-spacing:-.03em;color:var(--color-text, #1d1d1f);text-align:center}.case-home__composer[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:16px;box-shadow:0 4px 24px #00000012;overflow:hidden;transition:box-shadow .2s ease,border-color .2s ease}.case-home__composer[_ngcontent-%COMP%]:focus-within{box-shadow:0 4px 32px #007aff26;border-color:var(--color-primary, #007aff)}.case-home__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:1rem 1.25rem .5rem;border:none;background:transparent;color:var(--color-text, #1d1d1f);font-size:1rem;font-family:inherit;line-height:1.6;outline:none;box-sizing:border-box}.case-home__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-home__input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.case-home__composer-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .5rem .5rem 1.25rem}.case-home__hint[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};export{P as a};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-2CZ6MYXI.js";import{a as U}from"./chunk-AIC4U2MU.js";import{a as j}from"./chunk-JUIHGG6M.js";import"./chunk-T3IUNA6F.js";import"./chunk-ZRAZ37BG.js";import"./chunk-N2KAGC3B.js";import{b as G,d as z}from"./chunk-4GVABYH4.js";import{p as w,u as K}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as y}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as _,Db as d,Fb as s,Hc as B,Ka as g,Pb as P,S as M,Tb as p,Ub as b,Vb as T,Wa as I,ab as A,ac as N,ca as m,dc as V,ec as k,ga as c,ha as l,hc as L,jb as q,kc as $,lb as u,m as D,ma as E,mb as C,nc as h,oc as x,rb as O,sb as r,t as R,ta as v,tb as a}from"./chunk-B4RKRLIY.js";function Q(o,t){if(o&1){let e=_();r(0,"span",7),p(1,"Delete?"),a(),r(2,"ds-icon-button",8),d("action",function(){c(e);let i=s();return l(i.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",9),d("action",function(){c(e);let i=s();return l(i.onDeleteCancelled())}),a()}}function Z(o,t){if(o&1){let e=_();r(0,"ds-icon-button",11),d("action",function(){c(e);let i=s(2);return l(i.onEdit())}),a(),r(1,"ds-icon-button",12),d("action",function(){c(e);let i=s(2);return l(i.onDeleteArmed())}),a()}}function ee(o,t){if(o&1){let e=_();r(0,"ds-icon-button",10),d("action",function(){c(e);let i=s();return l(i.onDuplicate())}),a(),u(1,Z,2,0)}if(o&2){let e=s();g(),C(e.readOnly()?-1:1)}}var te=Object.freeze({namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),S=class o{config=x.required();scope=x.required();readOnly=x(!1);editRequested=h();deleteRequested=h();duplicateRequested=h();pendingDelete=v(!1);badge=$(()=>te[this.scope()]);onEdit(){this.editRequested.emit(this.config())}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteArmed(){this.pendingDelete.set(!0)}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),p(4),a(),r(5,"span",4),p(6),a()(),r(7,"span",5),p(8),a()(),r(9,"div",6),u(10,Q,4,0)(11,ee,2,1),a()()),e&2&&(g(4),b(n.config().name),g(),q("data-variant",n.badge().variant)("aria-label",n.badge().ariaLabel),g(),T(" ",n.badge().label," "),g(2),b(n.config().integrationType),g(2),C(n.pendingDelete()?10:11))},dependencies:[w],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;padding:.15rem .5rem;border-radius:999px;border:1px solid transparent;text-transform:uppercase;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary);border-color:var(--color-border)}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 12%,transparent);color:var(--color-info);border-color:color-mix(in srgb,var(--color-info) 30%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 12%,transparent);color:var(--color-warning);border-color:color-mix(in srgb,var(--color-warning) 30%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var ne=()=>[];function ie(o,t){if(o&1&&(r(0,"p",3),p(1),a()),o&2){let e=s().$implicit;g(),b(e.name)}}function oe(o,t){if(o&1){let e=_();r(0,"agentos-integration-config-item",5),d("editRequested",function(){let i=c(e),f=s(2);return l(f.onEdit(i))})("deleteRequested",function(){let i=c(e),f=s(2);return l(f.onDelete(i))})("duplicateRequested",function(){let i=c(e),f=s(2);return l(f.onDuplicate(i))}),a()}if(o&2){let e=t,n=s(2);O("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!n.isAdmin())}}function re(o,t){if(o&1&&u(0,ie,2,1,"p",3)(1,oe,1,3,"agentos-integration-config-item",4),o&2){let e,n=t.$implicit,i=s();C(i.isEmptyPlaceholder(n.id)?0:(e=i.resolve(n.id))?1:-1,e)}}var W=Object.freeze({namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),X="__empty__",Y=class o{route=m(G);router=m(z);destroyRef=m(E);state=m(F);namespaceRole=m(j);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=v(!1);listItems$=this.state.vm$.pipe(R(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(y(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(R(t=>t.get("namespaceId")??""),M(t=>t?this.namespaceRole.isAdminOfNamespace$(t):D(!1)),y(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(y(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(n=>{n.id&&e.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),t.userOnNs.forEach(n=>{n.id&&e.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),t.userGlobal.forEach(n=>{n.id&&e.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(X)}resolve(t){return this.resolved.get(t)??null}itemKey(t,e){return`${t}:${e}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:U(this.isAdmin())}})}onEdit(t){let e=t.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(y(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${t.scope}:${e}:`,n)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:e,template:t.config.id,templateScope:t.scope}})}toListItems(t){let e=[];return e.push(...this.sectionItems("namespace",t.namespace)),e.push(...this.sectionItems("userOnNs",t.userOnNs)),e.push(...this.sectionItems("userGlobal",t.userGlobal)),e}sectionItems(t,e){return e.length===0?[{id:`${X}${t}`,name:"Aucune configuration",groupKey:t,groupLabel:W[t]}]:e.filter(n=>!!n.id).map(n=>({id:this.itemKey(t,n.id),name:n.name,description:n.integrationType,groupKey:t,groupLabel:W[t]}))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,n){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),d("createRequested",function(){return n.openCreateForm()}),r(2,"ds-icon-button",2),d("action",function(){return n.goBack()}),a()(),A(3,re,2,1,"ng-template",null,0,L)),e&2){let i=P(4);O("items",k(1,3,n.listItems$)??N(5,ne))("showCreate",!0)("itemTemplate",i)}},dependencies:[K,S,w,B],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{Y as IntegrationsAllScopesComponent};
1
+ import{a as F}from"./chunk-A7XWJPWY.js";import{a as U}from"./chunk-AIC4U2MU.js";import{a as j}from"./chunk-O6R7UCP5.js";import"./chunk-T3IUNA6F.js";import"./chunk-MQ5FOOLD.js";import"./chunk-ID64B57M.js";import{b as G,d as z}from"./chunk-4GVABYH4.js";import{p as w,u as K}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as y}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as _,Db as d,Fb as s,Hc as B,Ka as g,Pb as P,S as M,Tb as p,Ub as b,Vb as T,Wa as I,ab as A,ac as N,ca as m,dc as V,ec as k,ga as c,ha as l,hc as L,jb as q,kc as $,lb as u,m as D,ma as E,mb as C,nc as h,oc as x,rb as O,sb as r,t as R,ta as v,tb as a}from"./chunk-B4RKRLIY.js";function Q(o,t){if(o&1){let e=_();r(0,"span",7),p(1,"Delete?"),a(),r(2,"ds-icon-button",8),d("action",function(){c(e);let i=s();return l(i.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",9),d("action",function(){c(e);let i=s();return l(i.onDeleteCancelled())}),a()}}function Z(o,t){if(o&1){let e=_();r(0,"ds-icon-button",11),d("action",function(){c(e);let i=s(2);return l(i.onEdit())}),a(),r(1,"ds-icon-button",12),d("action",function(){c(e);let i=s(2);return l(i.onDeleteArmed())}),a()}}function ee(o,t){if(o&1){let e=_();r(0,"ds-icon-button",10),d("action",function(){c(e);let i=s();return l(i.onDuplicate())}),a(),u(1,Z,2,0)}if(o&2){let e=s();g(),C(e.readOnly()?-1:1)}}var te=Object.freeze({namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),S=class o{config=x.required();scope=x.required();readOnly=x(!1);editRequested=h();deleteRequested=h();duplicateRequested=h();pendingDelete=v(!1);badge=$(()=>te[this.scope()]);onEdit(){this.editRequested.emit(this.config())}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteArmed(){this.pendingDelete.set(!0)}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integration-config-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:6,consts:[["role","listitem",1,"integration-config-item"],[1,"integration-config-item__body"],[1,"integration-config-item__heading"],[1,"integration-config-item__name"],[1,"integration-config-item__badge"],[1,"integration-config-item__type"],[1,"integration-config-item__actions"],[1,"integration-config-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this configuration",3,"action"],["icon","edit","title","Edit integration",3,"action"],["icon","delete","variant","danger","title","Delete integration",3,"action"]],template:function(e,n){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),p(4),a(),r(5,"span",4),p(6),a()(),r(7,"span",5),p(8),a()(),r(9,"div",6),u(10,Q,4,0)(11,ee,2,1),a()()),e&2&&(g(4),b(n.config().name),g(),q("data-variant",n.badge().variant)("aria-label",n.badge().ariaLabel),g(),T(" ",n.badge().label," "),g(2),b(n.config().integrationType),g(2),C(n.pendingDelete()?10:11))},dependencies:[w],styles:[".integration-config-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.integration-config-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.integration-config-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.integration-config-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.integration-config-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;padding:.15rem .5rem;border-radius:999px;border:1px solid transparent;text-transform:uppercase;white-space:nowrap}.integration-config-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary);border-color:var(--color-border)}.integration-config-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 12%,transparent);color:var(--color-info);border-color:color-mix(in srgb,var(--color-info) 30%,transparent)}.integration-config-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 12%,transparent);color:var(--color-warning);border-color:color-mix(in srgb,var(--color-warning) 30%,transparent)}.integration-config-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.integration-config-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.integration-config-item[_ngcontent-%COMP%]:hover .integration-config-item__actions[_ngcontent-%COMP%], .integration-config-item[_ngcontent-%COMP%]:focus-within .integration-config-item__actions[_ngcontent-%COMP%]{opacity:1}.integration-config-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var ne=()=>[];function ie(o,t){if(o&1&&(r(0,"p",3),p(1),a()),o&2){let e=s().$implicit;g(),b(e.name)}}function oe(o,t){if(o&1){let e=_();r(0,"agentos-integration-config-item",5),d("editRequested",function(){let i=c(e),f=s(2);return l(f.onEdit(i))})("deleteRequested",function(){let i=c(e),f=s(2);return l(f.onDelete(i))})("duplicateRequested",function(){let i=c(e),f=s(2);return l(f.onDuplicate(i))}),a()}if(o&2){let e=t,n=s(2);O("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!n.isAdmin())}}function re(o,t){if(o&1&&u(0,ie,2,1,"p",3)(1,oe,1,3,"agentos-integration-config-item",4),o&2){let e,n=t.$implicit,i=s();C(i.isEmptyPlaceholder(n.id)?0:(e=i.resolve(n.id))?1:-1,e)}}var W=Object.freeze({namespace:"Configurations du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),X="__empty__",Y=class o{route=m(G);router=m(z);destroyRef=m(E);state=m(F);namespaceRole=m(j);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=v(!1);listItems$=this.state.vm$.pipe(R(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(y(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(R(t=>t.get("namespaceId")??""),M(t=>t?this.namespaceRole.isAdminOfNamespace$(t):D(!1)),y(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(y(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(n=>{n.id&&e.set(this.itemKey("namespace",n.id),{config:n,scope:"namespace"})}),t.userOnNs.forEach(n=>{n.id&&e.set(this.itemKey("userOnNs",n.id),{config:n,scope:"userOnNs"})}),t.userGlobal.forEach(n=>{n.id&&e.set(this.itemKey("userGlobal",n.id),{config:n,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(X)}resolve(t){return this.resolved.get(t)??null}itemKey(t,e){return`${t}:${e}`}goBack(){this.router.navigate(["/agentos","namespaces"])}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:U(this.isAdmin())}})}onEdit(t){let e=t.config.id??"";this.router.navigate(["/agentos",this.namespaceId,"integrations",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(y(this.destroyRef)).subscribe({error:n=>{console.error(`[IntegrationsAllScopes] Delete failed for ${t.scope}:${e}:`,n)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"integrations","new"],{queryParams:{scope:e,template:t.config.id,templateScope:t.scope}})}toListItems(t){let e=[];return e.push(...this.sectionItems("namespace",t.namespace)),e.push(...this.sectionItems("userOnNs",t.userOnNs)),e.push(...this.sectionItems("userGlobal",t.userGlobal)),e}sectionItems(t,e){return e.length===0?[{id:`${X}${t}`,name:"Aucune configuration",groupKey:t,groupLabel:W[t]}]:e.filter(n=>!!n.id).map(n=>({id:this.itemKey(t,n.id),name:n.name,description:n.integrationType,groupKey:t,groupLabel:W[t]}))}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=I({type:o,selectors:[["agentos-integrations-all-scopes"]],decls:5,vars:6,consts:[["integrationItemTpl",""],["title","Integrations","emptyMessage","No integrations available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"integrations-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,n){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),d("createRequested",function(){return n.openCreateForm()}),r(2,"ds-icon-button",2),d("action",function(){return n.goBack()}),a()(),A(3,re,2,1,"ng-template",null,0,L)),e&2){let i=P(4);O("items",k(1,3,n.listItems$)??N(5,ne))("showCreate",!0)("itemTemplate",i)}},dependencies:[K,S,w,B],styles:[".integrations-all-scopes__empty[_ngcontent-%COMP%]{margin:0;padding:.65rem 1rem;font-size:.85rem;font-style:italic;color:var(--color-text-secondary)}"],changeDetection:0})};export{Y as IntegrationsAllScopesComponent};
@@ -0,0 +1 @@
1
+ import{Qc as Q,Rc as u,Sc as V,Tc as j,Z as m,a as b,aa as k,b as f,ba as x,ca as O,da as K,g as L,pa as z}from"./chunk-B4RKRLIY.js";var y=class{apiKeys;username;password;accessToken;basePath;withCredentials;encoder;encodeParam;credentials;constructor({accessToken:C,apiKeys:n,basePath:o,credentials:p,encodeParam:r,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),o!==void 0&&(this.basePath=o),l!==void 0&&(this.withCredentials=l),t&&(this.encoder=t),this.encodeParam=r??(a=>this.defaultEncodeParam(a)),this.credentials=p??{}}selectHeaderContentType(C){if(C.length===0)return;let n=C.find(o=>this.isJsonMime(o));return n===void 0?C[0]:n}selectHeaderAccept(C){if(C.length===0)return;let n=C.find(o=>this.isJsonMime(o));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,o,p){let r=this.lookupCredential(C);return r?o.set(n,(p??"")+r):o}addCredentialToQuery(C,n,o){let p=this.lookupCredential(C);return p?o.set(n,p):o}defaultEncodeParam(C){let n=C.dataFormat==="date-time"&&C.value instanceof Date?C.value.toISOString():C.value;return encodeURIComponent(String(n))}};var v=new k("basePath");var R=class{encodeKey(C){return encodeURIComponent(C)}encodeValue(C){return encodeURIComponent(C)}decodeKey(C){return decodeURIComponent(C)}decodeValue(C){return decodeURIComponent(C)}};var P=class{basePath="http://localhost:8124";defaultHeaders=new Q;configuration;encoder;constructor(C,n){if(this.configuration=n||new y,typeof this.configuration.basePath!="string"){let o=Array.isArray(C)?C[0]:void 0;o!=null&&(C=o),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,o,p=!1){return typeof n=="object"&&!(n instanceof Date)?this.addToHttpParamsRecursive(C,n,p?o:void 0,p):this.addToHttpParamsRecursive(C,n,o)}addToHttpParamsRecursive(C,n,o,p=!1){if(n==null)return C;if(typeof n=="object"){if(o!=null)return p?Object.keys(n).reduce((r,t)=>r.append(`${o}[${t}]`,n[t]),C):C.append(o,JSON.stringify(n));if(Array.isArray(n))n.forEach(r=>C=this.addToHttpParamsRecursive(C,r,o));else if(n instanceof Date)if(o!=null)C=C.append(o,n.toISOString());else throw Error("key may not be null if value is Date");else Object.keys(n).forEach(r=>{let t=o?`${o}.${r}`:r;C=this.addToHttpParamsRecursive(C,n[r],t)});return C}else if(o!=null)return C.append(o,n);throw Error("key may not be null if value is not object or array")}};var E=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter agentConfig was null or undefined when calling createAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByParentAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.transferCache??!0,a="json";e&&(e.startsWith("text")?a="text":this.configuration.isJsonMime(e)?a="json":a="blob");let d=`/api/agent-configs/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:o,transferCache:l,reportProgress:p}))}searchAgentConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter agentConfigSearchRequest was null or undefined when calling searchAgentConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}updateAgentConfig(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAgentConfig.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var q=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter aiModel was null or undefined when calling createAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByNamespaceIdAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listByNamespaceIdAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByParentAiModel(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentAiModel.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}updateAiModel(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiModel.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var $=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter aiProvider was null or undefined when calling createAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsAiProvider(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsAiProvider.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listAiProvider(n,o,p="body",r=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,o,"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:r}))}updateAiProvider(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateAiProvider.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var B=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}addMessageCase(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling addMessageCase.");if(o==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:A}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}createCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter _case was null or undefined when calling createCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}interruptCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling interruptCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}killCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling killCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByParentCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByUserCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userId was null or undefined when calling listByUserCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByUserExternalIdCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter externalId was null or undefined when calling listByUserExternalIdCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByUserInNamespaceCase(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter listByUserInNamespaceRequest was null or undefined when calling listByUserInNamespaceCase.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}updateCase(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateCase.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var U=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter integrationConfig was null or undefined when calling createIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsIntegrationConfig(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsIntegrationConfig.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listIntegrationConfig(n,o,p="body",r=!1,t){let e=new V({encoder:this.encoder});e=this.addToHttpParams(e,n,"namespaceId"),e=this.addToHttpParams(e,o,"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:r}))}updateIntegrationConfig(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateIntegrationConfig.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var M=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}getTypeIntegrationType(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter type was null or undefined when calling getTypeIntegrationType.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listTypesIntegrationType(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var S=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespace was null or undefined when calling createNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deployAgentsNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling deployAgentsNamespace.");if(o==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:A}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}getByIdNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listAllNamespace(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}listByExternalIdsNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByParentNamespace(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentNamespace.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}undeployAgentsNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling undeployAgentsNamespace.");if(o==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:A}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}updateNamespace(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateNamespace.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var Y=(p=>(p.OpenAI="OpenAI",p.Anthropic="Anthropic",p.Gemini="Gemini",p.vLLM="vLLM",p))(Y||{});var N=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}getByIdCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByCaseCaseEventRest(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter caseId was null or undefined when calling listByCaseCaseEventRest.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var G=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}grantAdmin(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantAdmin.");if(o==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:o,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:r}))}grantMember(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling grantMember.");if(o==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:o,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:r}))}listNamespaceUsers(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling listNamespaceUsers.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}revokeAdmin(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeAdmin.");if(o==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:o,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:r}))}revokeMember(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter namespaceId was null or undefined when calling revokeMember.");if(o==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:o,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:r}))}updateRolesByExternalId(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter syncUserRolesRequest was null or undefined when calling updateRolesByExternalId.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var J=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}debugAllPlugins(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}debugPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling debugPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getAllPlugins(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}getPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling getPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}reloadAllAgentsPlugin(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}reloadPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling reloadPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}startPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling startPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}stopPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling stopPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}unloadPlugin(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter pluginId was null or undefined when calling unloadPlugin.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}uploadPlugin(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["*/*"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var W=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}streamEventsCaseEventSse(n,o,p="body",r=!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,o,"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:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var F=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter user was null or undefined when calling createUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling deleteUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter id was null or undefined when calling getByIdUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getByIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getGroupsByExternalIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling getGroupsByExternalIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getMeUser(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}listAllUser(n="body",o=!1,p){let r=this.defaultHeaders,t=p?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);t!==void 0&&(r=r.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:r,observe:n,transferCache:i,reportProgress:o}))}listByExternalIdsUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter requestBody was null or undefined when calling listByExternalIdsUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}listByParentUser(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter parentId was null or undefined when calling listByParentUser.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}updateUser(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter id was null or undefined when calling updateUser.");if(o==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:A}=this.configuration;return this.httpClient.request("put",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};var _=class H extends P{constructor(n,o,p){super(o,p);this.httpClient=n}createUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupCreateRequest was null or undefined when calling createUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}deleteUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling deleteUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept([]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}getByIdUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling getByIdUserGroup.");let t=this.defaultHeaders,e=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);e!==void 0&&(t=t.set("Accept",e));let i=r?.context??new u,l=r?.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:o,transferCache:l,reportProgress:p}))}searchByNamespaceIdUserGroup(n,o="body",p=!1,r){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=r?.httpHeaderAccept??this.configuration.selectHeaderAccept(["application/json"]);i!==void 0&&(e=e.set("Accept",i));let l=r?.context??new u,a=r?.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:o,transferCache:a,reportProgress:p}))}updateUserGroup(n,o,p="body",r=!1,t){if(n==null)throw new Error("Required parameter userGroupId was null or undefined when calling updateUserGroup.");if(o==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:A}=this.configuration;return this.httpClient.request("post",`${h}${g}`,f(b({context:l,body:o,responseType:c},A?{withCredentials:A}:{}),{headers:e,observe:p,transferCache:a,reportProgress:r}))}static \u0275fac=function(o){return new(o||H)(x(j),x(v,8),x(y,8))};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};function Jr(H){return K([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var D=class H{config=O(y);zone=O(z);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new L(o=>{let p=this.zone.runOutsideAngular(()=>new EventSource(n));return p.onmessage=r=>{try{let t=JSON.parse(r.data);this.zone.run(()=>o.next(t))}catch(t){this.zone.run(()=>o.error(new Error(`Failed to parse SSE event: ${t}`)))}},p.onerror=r=>{p.readyState===EventSource.CLOSED?this.zone.run(()=>o.complete()):this.zone.run(()=>o.error(new Error(`SSE connection error for case ${C}`))),p.close()},()=>p.close()})}static \u0275fac=function(n){return new(n||H)};static \u0275prov=m({token:H,factory:H.\u0275fac,providedIn:"root"})};export{y as a,E as b,q as c,$ as d,B as e,U as f,M as g,S as h,G as i,J as j,F as k,Y as l,Jr as m};
@@ -1 +1 @@
1
- import{k as l}from"./chunk-N2KAGC3B.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-ID64B57M.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{a as ce}from"./chunk-6TYIL3WE.js";import{a as de,b as pe}from"./chunk-GA32RLK6.js";import{a as me}from"./chunk-AQYGROXP.js";import{a as se,b as le}from"./chunk-QEU4YDGM.js";import{a as Z}from"./chunk-XUO5X2DR.js";import{a as ee,b as te,c as oe}from"./chunk-G5ODO5PH.js";import{a as ae}from"./chunk-6URIZSUF.js";import{a as re}from"./chunk-CCG3DVQL.js";import{a as ie}from"./chunk-KDYOGYJA.js";import{a as V,b as ne}from"./chunk-2RBWOM63.js";import"./chunk-ZRAZ37BG.js";import{a as R,e as D}from"./chunk-N2KAGC3B.js";import{a as H,b as N,c as U}from"./chunk-FPNEFWYN.js";import{b as F,d as L}from"./chunk-4GVABYH4.js";import{p as B}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Cb as M,Db as f,Eb as I,Fb as b,Hc as k,Ka as m,Tb as o,Tc as T,Ub as C,Wa as _,Wc as z,Za as x,ca as c,dc as O,ec as w,kb as y,lb as g,mb as u,pb as A,qb as S,rb as P,sb as r,ta as h,tb as i,ub as E,vb as d,wb as p}from"./chunk-B4RKRLIY.js";var a=()=>!0;var fe=[{path:"",loadComponent:()=>import("./chunk-T6BQJAEY.js").then(e=>e.AgentosShellComponent),children:[{path:":namespaceId/cases",canActivate:[a],loadComponent:()=>import("./chunk-I646GVFV.js").then(e=>e.CaseShellComponent),children:[{path:"",loadComponent:()=>import("./chunk-AMPCXTWI.js").then(e=>e.CaseHomeComponent)},{path:":caseId",loadComponent:()=>import("./chunk-3Y3BDXQE.js").then(e=>e.CaseChatComponent)}]},{path:"",loadComponent:()=>import("./chunk-DSVRB6HO.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[a],loadComponent:()=>import("./chunk-PD2OWAAU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[a],loadComponent:()=>import("./chunk-PD2OWAAU.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[a],loadComponent:()=>import("./chunk-ET4W2GJD.js").then(e=>e.NamespaceListComponent)},{path:":namespaceId/integrations/new",canActivate:[a],loadComponent:()=>import("./chunk-5BTTSQCB.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[a],loadComponent:()=>import("./chunk-5BTTSQCB.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[a],loadComponent:()=>import("./chunk-U7GMXXZR.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[a],loadComponent:()=>import("./chunk-XPCAHGNH.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[a],loadComponent:()=>import("./chunk-XPCAHGNH.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[a],loadComponent:()=>import("./chunk-PZTYR7LK.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[a],loadComponent:()=>import("./chunk-NZASIVIS.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[a],loadComponent:()=>import("./chunk-NZASIVIS.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[a],loadComponent:()=>import("./chunk-V3Z53FNF.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[a],loadComponent:()=>import("./chunk-PBNCEIJ3.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[a],loadComponent:()=>import("./chunk-PBNCEIJ3.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs",canActivate:[a],loadComponent:()=>import("./chunk-AN6W7YXQ.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"admin/users/new",canActivate:[a],loadComponent:()=>import("./chunk-JBGE4SXL.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[a],loadComponent:()=>import("./chunk-JBGE4SXL.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[a],loadComponent:()=>import("./chunk-22Q7AW5P.js").then(e=>e.UserListComponent)},{path:"me",canActivate:[a],loadComponent:()=>import("./chunk-XHG7XV2K.js").then(e=>e.UserProfileComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function X(e,t){e&1&&(d(0,"p",6),o(1,"No cases yet. Start one below."),p())}function q(e,t){if(e&1&&(d(0,"div",7)(1,"span",8),o(2),p(),d(3,"span",9),o(4),p()()),e&2){let n=t.$implicit;m(2),C(n.id),m(2),C(n.status)}}function J(e,t){if(e&1&&A(0,q,5,2,"div",7,y().trackById,!0),e&2){let n=b();S(n)}}function Q(e,t){e&1&&g(0,X,2,0,"p",6)(1,J,2,0),e&2&&u(t.length===0?0:1)}var G=class e{http=c(T);router=c(L);route=c(F);config=c(R);caseController=c(D);namespaceId=this.route.snapshot.params.namespaceId;cases$=this.caseController.listByParentCase(this.namespaceId);inputValue=h("");onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){this.inputValue().trim()&&this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).subscribe(n=>{this.inputValue.set(""),this.router.navigate(["/agentos",this.namespaceId,"cases",n.id??""])})}trackById(t,n){return n.id??""}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=_({type:e,selectors:[["agentos-case-list"]],decls:11,vars:4,consts:[[1,"case-list"],[1,"case-list__header"],[1,"case-list__items"],[1,"case-list__composer"],["placeholder","Start a new case\u2026","rows","3",1,"case-list__input",3,"input","keydown","value"],[1,"case-list__hint"],[1,"case-list__empty"],[1,"case-list__item"],[1,"case-list__item-id"],[1,"case-list__item-status"]],template:function(n,s){if(n&1&&(d(0,"div",0)(1,"header",1)(2,"h2"),o(3,"Cases"),p()(),d(4,"div",2),g(5,Q,2,1),O(6,"async"),p(),d(7,"div",3)(8,"textarea",4),I("input",function(v){return s.onInput(v)})("keydown",function(v){return s.onKeydown(v)}),p(),d(9,"p",5),o(10,"Press Enter to send, Shift+Enter for new line"),p()()()),n&2){let l;m(5),u((l=w(6,2,s.cases$))?5:-1,l),m(3),M("value",s.inputValue())}},dependencies:[k],styles:[".case-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;max-width:720px;margin:0 auto;padding:2rem;gap:1.5rem}.case-list__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.case-list__items[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.case-list__empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-list__composer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.case-list__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;box-sizing:border-box;transition:border-color .15s ease}.case-list__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.case-list__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-list__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};function Y(e,t){if(e&1&&(r(0,"p",11),o(1," Last action: "),r(2,"strong"),o(3),i()()),e&2){let n=b();m(3),C(n.lastAction())}}var $=class e{lastAction=h(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=_({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(n,s){n&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),o(3,"AgentOS UI"),i(),r(4,"h1"),o(5,"Hello AgentOS"),i(),r(6,"p"),o(7," This component lives in "),r(8,"code"),o(9,"libs/agentos-ui"),i(),o(10," \u2014 isolated from Coday internals, ready to be published as "),r(11,"code"),o(12,"@whoz-oss/agentos-ui"),i(),o(13,". "),i(),E(14,"agentos-backend-status"),r(15,"ul",3)(16,"li"),o(17,"\u2726 No imports from Coday app"),i(),r(18,"li"),o(19,"\u2726 CSS custom properties as host contract"),i(),r(20,"li"),o(21,"\u2726 Standalone Angular components"),i(),r(22,"li"),o(23,"\u2726 Signals-first reactive state"),i()(),r(24,"div",4)(25,"p",5),o(26,"ds-icon-button from "),r(27,"code"),o(28,"@whoz-oss/design-system"),i()(),r(29,"div",6)(30,"ds-icon-button",7),f("action",function(){return s.onSend()}),i(),r(31,"ds-icon-button",8),f("action",function(){return s.onStop()}),i(),r(32,"ds-icon-button",9),f("action",function(){return s.onAttach()}),i(),r(33,"ds-icon-button",10),f("action",function(){return s.onAttach()}),i()(),g(34,Y,4,1,"p",11),i()()()),n&2&&(m(33),P("disabled",!0),m(),u(s.lastAction()?34:-1))},dependencies:[B,V],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};var j=class e{sanitizer=c(z);renderer=this.buildRenderer();transform(t){if(!t)return"";let n=N.parse(t,{renderer:this.renderer,breaks:!0,gfm:!0,async:!1}),s=U.sanitize(n,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.sanitizer.bypassSecurityTrustHtml(s)}buildRenderer(){let t=new H,n=t.link.bind(t);return t.link=s=>{let l=n(s);return this.isExternal(s.href)&&(l=l.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),l},t}isExternal(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(n){return!1}}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=x({name:"agentosMarkdown",type:e,pure:!0})};export{fe as AGENTOS_ROUTES,Z as AgentosShellComponent,V as BackendStatusComponent,re as CaseChatComponent,te as CaseDrawerComponent,ae as CaseHomeComponent,ee as CaseItemComponent,G as CaseListComponent,oe as CaseShellComponent,ne as HeaderComponent,$ as HelloAgentosComponent,ie as LayoutComponent,j as MarkdownPipe,se as NamespaceItemComponent,le as NamespaceListComponent,me as UserAdminStateService,ce as UserFormComponent,de as UserItemComponent,pe as UserListComponent,a as agentosReadyGuard};
1
+ import{a as ce}from"./chunk-7Q5TJGZE.js";import{a as de,b as pe}from"./chunk-V6U3QWKO.js";import{a as me}from"./chunk-7J3KCU7P.js";import{a as se,b as le}from"./chunk-PAW6WFZZ.js";import{a as Z}from"./chunk-XUO5X2DR.js";import{a as ee,b as te,c as oe}from"./chunk-DUYUUS2L.js";import{a as ae}from"./chunk-FQTT35CO.js";import{a as re}from"./chunk-QCKUWYNZ.js";import{a as ie}from"./chunk-4VNHFKSB.js";import{a as V,b as ne}from"./chunk-CN53EODB.js";import"./chunk-MQ5FOOLD.js";import{a as R,e as D}from"./chunk-ID64B57M.js";import{a as H,b as N,c as U}from"./chunk-FPNEFWYN.js";import{b as F,d as L}from"./chunk-4GVABYH4.js";import{p as B}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Cb as M,Db as f,Eb as I,Fb as b,Hc as k,Ka as m,Tb as o,Tc as T,Ub as C,Wa as _,Wc as z,Za as x,ca as c,dc as O,ec as w,kb as y,lb as g,mb as u,pb as A,qb as S,rb as P,sb as r,ta as h,tb as i,ub as E,vb as d,wb as p}from"./chunk-B4RKRLIY.js";var a=()=>!0;var fe=[{path:"",loadComponent:()=>import("./chunk-T6BQJAEY.js").then(e=>e.AgentosShellComponent),children:[{path:":namespaceId/cases",canActivate:[a],loadComponent:()=>import("./chunk-53FMBD6R.js").then(e=>e.CaseShellComponent),children:[{path:"",loadComponent:()=>import("./chunk-75VRFLRQ.js").then(e=>e.CaseHomeComponent)},{path:":caseId",loadComponent:()=>import("./chunk-YW2XIVPR.js").then(e=>e.CaseChatComponent)}]},{path:"",loadComponent:()=>import("./chunk-YPZHBQKQ.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[a],loadComponent:()=>import("./chunk-6KZHR4Y5.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[a],loadComponent:()=>import("./chunk-6KZHR4Y5.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[a],loadComponent:()=>import("./chunk-TDN7XXYJ.js").then(e=>e.NamespaceListComponent)},{path:":namespaceId/integrations/new",canActivate:[a],loadComponent:()=>import("./chunk-OCSO7P4Q.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[a],loadComponent:()=>import("./chunk-OCSO7P4Q.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[a],loadComponent:()=>import("./chunk-IBWXN2FR.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[a],loadComponent:()=>import("./chunk-2VZQFTDA.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[a],loadComponent:()=>import("./chunk-2VZQFTDA.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[a],loadComponent:()=>import("./chunk-OSI53EID.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[a],loadComponent:()=>import("./chunk-4KLLJOX7.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[a],loadComponent:()=>import("./chunk-4KLLJOX7.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[a],loadComponent:()=>import("./chunk-YODHUBU4.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[a],loadComponent:()=>import("./chunk-EYTNFNF3.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[a],loadComponent:()=>import("./chunk-EYTNFNF3.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs",canActivate:[a],loadComponent:()=>import("./chunk-3T2UXJWR.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:"admin/users/new",canActivate:[a],loadComponent:()=>import("./chunk-XFM4KVZ6.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[a],loadComponent:()=>import("./chunk-XFM4KVZ6.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[a],loadComponent:()=>import("./chunk-YNZCLWLZ.js").then(e=>e.UserListComponent)},{path:"me",canActivate:[a],loadComponent:()=>import("./chunk-BUJEKX2L.js").then(e=>e.UserProfileComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function X(e,t){e&1&&(d(0,"p",6),o(1,"No cases yet. Start one below."),p())}function q(e,t){if(e&1&&(d(0,"div",7)(1,"span",8),o(2),p(),d(3,"span",9),o(4),p()()),e&2){let n=t.$implicit;m(2),C(n.id),m(2),C(n.status)}}function J(e,t){if(e&1&&A(0,q,5,2,"div",7,y().trackById,!0),e&2){let n=b();S(n)}}function Q(e,t){e&1&&g(0,X,2,0,"p",6)(1,J,2,0),e&2&&u(t.length===0?0:1)}var G=class e{http=c(T);router=c(L);route=c(F);config=c(R);caseController=c(D);namespaceId=this.route.snapshot.params.namespaceId;cases$=this.caseController.listByParentCase(this.namespaceId);inputValue=h("");onInput(t){this.inputValue.set(t.target.value)}onKeydown(t){t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),this.submit())}submit(){this.inputValue().trim()&&this.http.post(`${this.config.basePath}/api/cases`,{namespaceId:this.namespaceId,metadata:{}}).subscribe(n=>{this.inputValue.set(""),this.router.navigate(["/agentos",this.namespaceId,"cases",n.id??""])})}trackById(t,n){return n.id??""}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=_({type:e,selectors:[["agentos-case-list"]],decls:11,vars:4,consts:[[1,"case-list"],[1,"case-list__header"],[1,"case-list__items"],[1,"case-list__composer"],["placeholder","Start a new case\u2026","rows","3",1,"case-list__input",3,"input","keydown","value"],[1,"case-list__hint"],[1,"case-list__empty"],[1,"case-list__item"],[1,"case-list__item-id"],[1,"case-list__item-status"]],template:function(n,s){if(n&1&&(d(0,"div",0)(1,"header",1)(2,"h2"),o(3,"Cases"),p()(),d(4,"div",2),g(5,Q,2,1),O(6,"async"),p(),d(7,"div",3)(8,"textarea",4),I("input",function(v){return s.onInput(v)})("keydown",function(v){return s.onKeydown(v)}),p(),d(9,"p",5),o(10,"Press Enter to send, Shift+Enter for new line"),p()()()),n&2){let l;m(5),u((l=w(6,2,s.cases$))?5:-1,l),m(3),M("value",s.inputValue())}},dependencies:[k],styles:[".case-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;max-width:720px;margin:0 auto;padding:2rem;gap:1.5rem}.case-list__header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.case-list__items[_ngcontent-%COMP%]{flex:1;overflow-y:auto}.case-list__empty[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.case-list__composer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.case-list__input[_ngcontent-%COMP%]{width:100%;resize:none;padding:.75rem 1rem;border-radius:12px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));color:var(--color-text, #1d1d1f);font-size:.95rem;font-family:inherit;line-height:1.5;outline:none;box-sizing:border-box;transition:border-color .15s ease}.case-list__input[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.case-list__input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.case-list__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);opacity:.7}"]})};function Y(e,t){if(e&1&&(r(0,"p",11),o(1," Last action: "),r(2,"strong"),o(3),i()()),e&2){let n=b();m(3),C(n.lastAction())}}var $=class e{lastAction=h(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=_({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(n,s){n&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),o(3,"AgentOS UI"),i(),r(4,"h1"),o(5,"Hello AgentOS"),i(),r(6,"p"),o(7," This component lives in "),r(8,"code"),o(9,"libs/agentos-ui"),i(),o(10," \u2014 isolated from Coday internals, ready to be published as "),r(11,"code"),o(12,"@whoz-oss/agentos-ui"),i(),o(13,". "),i(),E(14,"agentos-backend-status"),r(15,"ul",3)(16,"li"),o(17,"\u2726 No imports from Coday app"),i(),r(18,"li"),o(19,"\u2726 CSS custom properties as host contract"),i(),r(20,"li"),o(21,"\u2726 Standalone Angular components"),i(),r(22,"li"),o(23,"\u2726 Signals-first reactive state"),i()(),r(24,"div",4)(25,"p",5),o(26,"ds-icon-button from "),r(27,"code"),o(28,"@whoz-oss/design-system"),i()(),r(29,"div",6)(30,"ds-icon-button",7),f("action",function(){return s.onSend()}),i(),r(31,"ds-icon-button",8),f("action",function(){return s.onStop()}),i(),r(32,"ds-icon-button",9),f("action",function(){return s.onAttach()}),i(),r(33,"ds-icon-button",10),f("action",function(){return s.onAttach()}),i()(),g(34,Y,4,1,"p",11),i()()()),n&2&&(m(33),P("disabled",!0),m(),u(s.lastAction()?34:-1))},dependencies:[B,V],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};var j=class e{sanitizer=c(z);renderer=this.buildRenderer();transform(t){if(!t)return"";let n=N.parse(t,{renderer:this.renderer,breaks:!0,gfm:!0,async:!1}),s=U.sanitize(n,{ADD_TAGS:["span"],ADD_ATTR:["aria-hidden","aria-label","target","rel"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))/i});return this.sanitizer.bypassSecurityTrustHtml(s)}buildRenderer(){let t=new H,n=t.link.bind(t);return t.link=s=>{let l=n(s);return this.isExternal(s.href)&&(l=l.replace("<a ",'<a target="_blank" rel="noopener noreferrer" ').replace("</a>",'<span class="external-link-icon" aria-hidden="true">\u2197</span></a>')),l},t}isExternal(t){if(!t||t.startsWith("/")||t.startsWith("#")||t.startsWith("?"))return!1;if(t.startsWith("//"))return!0;try{return new URL(t,window.location.href).hostname!==window.location.hostname}catch(n){return!1}}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=x({name:"agentosMarkdown",type:e,pure:!0})};export{fe as AGENTOS_ROUTES,Z as AgentosShellComponent,V as BackendStatusComponent,re as CaseChatComponent,te as CaseDrawerComponent,ae as CaseHomeComponent,ee as CaseItemComponent,G as CaseListComponent,oe as CaseShellComponent,ne as HeaderComponent,$ as HelloAgentosComponent,ie as LayoutComponent,j as MarkdownPipe,se as NamespaceItemComponent,le as NamespaceListComponent,me as UserAdminStateService,ce as UserFormComponent,de as UserItemComponent,pe as UserListComponent,a as agentosReadyGuard};
@@ -1 +1 @@
1
- import{a as h}from"./chunk-ZRAZ37BG.js";import{i as b}from"./chunk-N2KAGC3B.js";import{b as u}from"./chunk-V363EHJE.js";import{D as p,P as f,S as m,Z as l,ca as a,m as r,t as c}from"./chunk-B4RKRLIY.js";var v=class i{userState=a(h);permissions=a(b);currentUser$=u(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return r(!1);let t=this.cache.get(e);if(t)return t;let o=this.currentUser$.pipe(m(s=>s?s.isAdmin?r(!0):this.permissions.listNamespaceUsers(e).pipe(c(d=>d.some(n=>n.id===s.id&&n.role==="ADMIN")),p(()=>r(!1))):r(!1)),f({bufferSize:1,refCount:!1}));return this.cache.set(e,o),o}static \u0275fac=function(t){return new(t||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v as a};
1
+ import{a as h}from"./chunk-MQ5FOOLD.js";import{i as b}from"./chunk-ID64B57M.js";import{b as u}from"./chunk-V363EHJE.js";import{D as p,P as f,S as m,Z as l,ca as a,m as r,t as c}from"./chunk-B4RKRLIY.js";var v=class i{userState=a(h);permissions=a(b);currentUser$=u(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return r(!1);let t=this.cache.get(e);if(t)return t;let o=this.currentUser$.pipe(m(s=>s?s.isAdmin?r(!0):this.permissions.listNamespaceUsers(e).pipe(c(d=>d.some(n=>n.id===s.id&&n.role==="ADMIN")),p(()=>r(!1))):r(!1)),f({bufferSize:1,refCount:!1}));return this.cache.set(e,o),o}static \u0275fac=function(t){return new(t||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v as a};
@@ -1 +1 @@
1
- import{a as X}from"./chunk-2CZ6MYXI.js";import{a as Y}from"./chunk-JUIHGG6M.js";import"./chunk-T3IUNA6F.js";import"./chunk-ZRAZ37BG.js";import{g as L}from"./chunk-N2KAGC3B.js";import{b as D,d as R}from"./chunk-4GVABYH4.js";import{q as W}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as v,c as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import{F as Q,c as B,e as y,g as z,h as A,i as G,l as u,n as q,p as j,s as $,w as U,x as J,y as H,z as K}from"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as k,Db as g,Fb as p,Ka as a,Tb as l,Ub as h,Vb as N,Wa as w,ca as m,ga as _,ha as C,kb as S,kc as V,lb as I,ma as E,mb as M,pb as O,qb as P,rb as s,sb as i,ta as d,tb as o,ua as F,ub as b}from"./chunk-B4RKRLIY.js";function ee(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function te(r,e){if(r&1&&(i(0,"label",10),b(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),h(t.label)}}function ne(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),h(t.displayName)}}function oe(r,e){if(r&1){let t=k();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return C(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function ie(r,e){if(r&1){let t=k();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return C(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,te,4,4,"label",10,S().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,ne,2,2,"option",16,S().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),b(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),b(25,"textarea",20),o(),I(26,oe,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 C(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),P(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),P(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),M((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 re=new Set(["namespace","userOnNs","userGlobal"]),T=Object.freeze({namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),Z=class r{route=m(D);router=m(R);destroyRef=m(E);state=m(X);integrationTypeController=m(L);namespaceRole=m(Y);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=x(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:!1});form=new G({name:new u("",{nonNullable:!0,validators:[y.required,y.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[y.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:"namespace",label:T.namespace},{value:"userOnNs",label:T.userOnNs},{value:"userGlobal",label:T.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=x(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=x(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=V(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){F(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId"),c=this.parseScope(t.get("scope"));if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&re.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId?"namespace":e.namespaceId?"userOnNs":"userGlobal"}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)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){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()(),I(8,ee,2,0,"p",5)(9,ie,32,8,"form",6),o()),t&2&&(a(7),h(n.isEditMode()?"Edit integration":"New integration"),a(),M(n.isLoading()?8:9))},dependencies:[Q,q,H,K,B,J,j,z,A,$,U,W],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{Z as IntegrationFormComponent};
1
+ import{a as X}from"./chunk-A7XWJPWY.js";import{a as Y}from"./chunk-O6R7UCP5.js";import"./chunk-T3IUNA6F.js";import"./chunk-MQ5FOOLD.js";import{g as L}from"./chunk-ID64B57M.js";import{b as D,d as R}from"./chunk-4GVABYH4.js";import{q as W}from"./chunk-VDRETD5H.js";import"./chunk-BUA6GPP7.js";import{a as v,c as x}from"./chunk-V363EHJE.js";import"./chunk-Z7E7NSDY.js";import"./chunk-ZEMOOOQR.js";import{F as Q,c as B,e as y,g as z,h as A,i as G,l as u,n as q,p as j,s as $,w as U,x as J,y as H,z as K}from"./chunk-HZF57OLY.js";import"./chunk-EF2BOSEH.js";import{Bb as k,Db as g,Fb as p,Ka as a,Tb as l,Ub as h,Vb as N,Wa as w,ca as m,ga as _,ha as C,kb as S,kc as V,lb as I,ma as E,mb as M,pb as O,qb as P,rb as s,sb as i,ta as d,tb as o,ua as F,ub as b}from"./chunk-B4RKRLIY.js";function ee(r,e){r&1&&(i(0,"p",5),l(1,"Loading\u2026"),o())}function te(r,e){if(r&1&&(i(0,"label",10),b(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),h(t.label)}}function ne(r,e){if(r&1&&(i(0,"option",16),l(1),o()),r&2){let t=e.$implicit;s("value",t.type),a(),h(t.displayName)}}function oe(r,e){if(r&1){let t=k();i(0,"div",21)(1,"ds-json-schema-form",26),g("valueChange",function(c){_(t);let f=p(2);return C(f.onParamsChange(c))}),o()()}if(r&2){let t=p(2);a(),s("schema",e)("value",t.initialParams())}}function ie(r,e){if(r&1){let t=k();i(0,"form",7),g("ngSubmit",function(){_(t);let c=p();return C(c.submit())}),i(1,"fieldset",8)(2,"legend",9),l(3,"Scope"),o(),O(4,te,4,4,"label",10,S().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,ne,2,2,"option",16,S().trackByType,!0),o()(),i(16,"div",11)(17,"label",17),l(18,"Name "),i(19,"span",13),l(20,"*"),o()(),b(21,"input",18),o(),i(22,"div",11)(23,"label",19),l(24,"Description"),o(),b(25,"textarea",20),o(),I(26,oe,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 C(c.cancel())}),l(31,"Cancel"),o()()()}if(r&2){let t,n=p();s("formGroup",n.form),a(),s("disabled",n.isEditMode()),a(3),P(n.scopeOptions),a(7),s("formControl",n.typeControl),a(3),P(n.integrationTypes()),a(7),s("formControl",n.nameControl),a(4),s("formControl",n.descriptionControl),a(),M((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 re=new Set(["namespace","userOnNs","userGlobal"]),T=Object.freeze({namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),Z=class r{route=m(D);router=m(R);destroyRef=m(E);state=m(X);integrationTypeController=m(L);namespaceRole=m(Y);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=x(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:!1});form=new G({name:new u("",{nonNullable:!0,validators:[y.required,y.minLength(1)]}),description:new u(null),type:new u("",{nonNullable:!0,validators:[y.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:"namespace",label:T.namespace},{value:"userOnNs",label:T.userOnNs},{value:"userGlobal",label:T.userGlobal}];paramsValue=d(null);initialParams=d(null);integrationTypes=x(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=x(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=V(()=>{let e=this.selectedType();return e?this.integrationTypes().find(n=>n.type===e)?.configSchema??null:null});existingConfig=null;constructor(){F(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs")})}ngOnInit(){this.state.setNamespace(this.namespaceId);let e=this.route.snapshot.paramMap,t=this.route.snapshot.queryParamMap,n=e.get("integrationId"),c=this.parseScope(t.get("scope"));if(n){this.isEditMode.set(!0),this.scopeControl.disable(),this.loadConfig(n);return}this.scopeControl.setValue(c);let f=t.get("template");f&&this.hydrateFromTemplate(f)}parseScope(e){return e&&re.has(e)?e:"namespace"}deriveScopeFromConfig(e){return!e.userId?"namespace":e.namespaceId?"userOnNs":"userGlobal"}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)).pipe(v(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(!1)})}cancel(){this.navigateBack()}navigateBack(){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()(),I(8,ee,2,0,"p",5)(9,ie,32,8,"form",6),o()),t&2&&(a(7),h(n.isEditMode()?"Edit integration":"New integration"),a(),M(n.isLoading()?8:9))},dependencies:[Q,q,H,K,B,J,j,z,A,$,U,W],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{Z as IntegrationFormComponent};