@whoz-oss/coday-client 0.162.2 → 0.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-4RMKYA7C.js → chunk-2KOOD34U.js} +1 -1
- package/browser/{chunk-OXXWNVGU.js → chunk-2R3GIDFR.js} +1 -1
- package/browser/{chunk-RF7IRXXE.js → chunk-2SIIKYD5.js} +1 -1
- package/browser/{chunk-WPGSXQ5M.js → chunk-3KIPBCWM.js} +1 -1
- package/browser/chunk-56V4XP2P.js +1 -0
- package/browser/{chunk-IJ2PFSZT.js → chunk-66WXJJKC.js} +1 -1
- package/browser/{chunk-5ETOAW5I.js → chunk-6BJTNH3R.js} +1 -1
- package/browser/{chunk-AKNP533G.js → chunk-6SUY2MJB.js} +1 -1
- package/browser/{chunk-WP6SVXZC.js → chunk-7VWRWXNK.js} +1 -1
- package/browser/{chunk-Q7MOXRND.js → chunk-BUM3GLAX.js} +1 -1
- package/browser/{chunk-44ROPJW7.js → chunk-CEFULUJY.js} +1 -1
- package/browser/{chunk-OD5UXNU5.js → chunk-DHNR5YXZ.js} +1 -1
- package/browser/{chunk-Y2JOUXVN.js → chunk-FD73WVQF.js} +1 -1
- package/browser/{chunk-JK7XVLXN.js → chunk-G7E3IFW3.js} +1 -1
- package/browser/{chunk-MRYQF7JC.js → chunk-M6MA42JA.js} +1 -1
- package/browser/{chunk-QIURQTGU.js → chunk-OOGVHCZ2.js} +1 -1
- package/browser/{chunk-CFTOIYSG.js → chunk-PBLZIIUO.js} +1 -1
- package/browser/{chunk-LEIES4AA.js → chunk-QZKTERKZ.js} +1 -1
- package/browser/{chunk-ZKUCVZCJ.js → chunk-REE2C7LL.js} +1 -1
- package/browser/{chunk-GTNTE2V7.js → chunk-RL4KFYQP.js} +1 -1
- package/browser/{chunk-VIFGZQZS.js → chunk-SGFUH5UA.js} +1 -1
- package/browser/{chunk-7INOPTJ6.js → chunk-T3I7NTOQ.js} +1 -1
- package/browser/{chunk-VKFTCAHS.js → chunk-TENYI4EC.js} +1 -1
- package/browser/{chunk-NBZFBJ7T.js → chunk-UFEQT6BE.js} +1 -1
- package/browser/{chunk-5DYITBLP.js → chunk-UYZM2V6A.js} +1 -1
- package/browser/{chunk-ZTTTDVEL.js → chunk-V73M5X7I.js} +1 -1
- package/browser/{chunk-UOGHINOM.js → chunk-WHD2IW2X.js} +1 -1
- package/browser/{chunk-GIMSVKQM.js → chunk-WSSS5C5X.js} +1 -1
- package/browser/{chunk-IKNFRB6Z.js → chunk-X22JI4VZ.js} +1 -1
- package/browser/{chunk-XV6SOT4A.js → chunk-XT4M6T63.js} +1 -1
- package/browser/{chunk-EQGMNQH5.js → chunk-Y4QTMCUV.js} +1 -1
- package/browser/{chunk-73XLCIE3.js → chunk-ZMHXU7WR.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-FLHOTSKQ.js → main-R4ATV5FL.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-SPSXBYO3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pc as Q,Qc as u,Rc as V,Sc as j,Z as m,a as b,aa as L,b as f,ba as x,ca as R,da as K,g as k,pa as z}from"./chunk-QPN22TF2.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 L("basePath");var O=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 O}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 M=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}))}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 S=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 B=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 U=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}))}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,"live");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}))}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}))}searchByNamespaceExternalIdUserGroup(n,o="body",p=!1,r){if(n==null)throw new Error("Required parameter namespaceExternalId was null or undefined when calling searchByNamespaceExternalIdUserGroup.");let t=new V({encoder:this.encoder});t=this.addToHttpParams(t,n,"namespaceExternalId");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 Mr(H){return K([typeof H=="string"?{provide:v,useValue:H}:{provide:y,useValue:new y(b({},H))}])}var D=class H{config=R(y);zone=R(z);connect(C){let n=`${this.config.basePath}/api/cases/${C}/events`;return new k(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,M as e,S as f,B as g,U as h,G as i,J as j,F as k,Y as l,Mr as m};
|
|
1
|
+
import{Pc as Q,Qc as u,Rc as V,Sc as j,Z as m,a as b,aa as L,b as f,ba as x,ca as O,da as K,g as k,pa as z}from"./chunk-QPN22TF2.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 L("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 M=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}))}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 S=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 B=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 U=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 Br(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 k(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,M as e,S as f,B as g,U as h,G as i,J as j,F as k,Y as l,Br as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk-L7OS7MWE.js";import{a as m}from"./chunk-
|
|
1
|
+
import{a as h}from"./chunk-L7OS7MWE.js";import{a as m}from"./chunk-TENYI4EC.js";import{f as u}from"./chunk-V73M5X7I.js";import{D as i,P as C,S as I,V as a,Z as d,ca as c,i as p,m as r,t as f,u as g}from"./chunk-QPN22TF2.js";var O="none",S="me",b=class l{nsController=c(u);userState=c(m);refresh$=new p(void 0);namespaceId$=new p(null);vm$=g([this.namespaceId$,this.refresh$]).pipe(I(([e])=>e?g([this.loadNamespaceConfigs(e).pipe(i(()=>r([]))),this.loadUserConfigs(e).pipe(i(()=>r([]))),this.loadUserConfigs("global").pipe(i(()=>r([])))]).pipe(f(([n,t,o])=>({namespace:n,userOnNs:t,userGlobal:o}))):g([this.loadNamespaceConfigs("").pipe(i(()=>r([]))),this.loadUserConfigs("global").pipe(i(()=>r([])))]).pipe(f(([n,t])=>({namespace:n,userOnNs:[],userGlobal:t})))),C({bufferSize:1,refCount:!0}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e)}refresh(){this.refresh$.next()}loadUserConfigs(e){let n=e==="global"?O:e;return this.nsController.listIntegrationConfig(n,S)}userGlobal$=h(this.refresh$,()=>this.loadUserConfigs("global"),[]);loadNamespaceConfigs(e){return e?this.nsController.listIntegrationConfig(e):r([])}getById(e,n){return this.nsController.getByIdIntegrationConfig(e)}create(e,n,t){let s=this.userState.currentUser()?.id;if((n==="userOnNs"||n==="userGlobal")&&!s)throw new Error(`Cannot create ${n} config before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(n==="namespace"){if(!t)throw new Error("Cannot create namespace-scoped config without a namespaceId");let y={name:e.name,integrationType:e.integrationType,description:e.description,namespaceId:t,parameters:e.parameters};return this.nsController.createIntegrationConfig(y).pipe(a(()=>this.refresh()))}if(n==="userOnNs"&&!t)throw new Error("Cannot create userOnNs config without a namespaceId");let v={name:e.name,integrationType:e.integrationType,description:e.description,userId:s,namespaceId:n==="userOnNs"?t:void 0,parameters:e.parameters};return this.nsController.createIntegrationConfig(v).pipe(a(()=>this.refresh()))}update(e,n,t,o){let s={name:n.name,integrationType:n.integrationType,description:n.description,userId:o.userId,namespaceId:o.namespaceId,parameters:n.parameters};return this.nsController.updateIntegrationConfig(e,s).pipe(a(()=>this.refresh()))}delete(e,n){return this.nsController.deleteIntegrationConfig(e).pipe(a(()=>this.refresh()))}static \u0275fac=function(n){return new(n||l)};static \u0275prov=d({token:l,factory:l.\u0275fac,providedIn:"root"})};export{b as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as m}from"./chunk-
|
|
1
|
+
import{b as m}from"./chunk-XT4M6T63.js";import{c as l}from"./chunk-UARV2YUR.js";import{Wa as a,sb as t,tb as i,ub as o}from"./chunk-QPN22TF2.js";var s=class n{static \u0275fac=function(e){return new(e||n)};static \u0275cmp=a({type:n,selectors:[["agentos-layout"]],decls:4,vars:0,consts:[[1,"layout"],[1,"layout__content"]],template:function(e,u){e&1&&(t(0,"div",0),o(1,"agentos-header"),t(2,"main",1),o(3,"router-outlet"),i()())},dependencies:[l,m],styles:[".layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh}.layout__content[_ngcontent-%COMP%]{flex:1;overflow-y:auto}"]})};export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-66WXJJKC.js";import"./chunk-V73M5X7I.js";import"./chunk-B5UWPZYC.js";import"./chunk-UARV2YUR.js";import"./chunk-DWPYG4F6.js";import"./chunk-XLNZCT7N.js";import"./chunk-WJFUKUVD.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-F4YDJMK7.js";import"./chunk-4YLSQZJK.js";import"./chunk-QPN22TF2.js";export{a as CaseChatComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as w}from"./chunk-
|
|
1
|
+
import{a as w}from"./chunk-TENYI4EC.js";import{j as M}from"./chunk-V73M5X7I.js";import{d as O}from"./chunk-UARV2YUR.js";import{a as S}from"./chunk-WJFUKUVD.js";import{Db as u,Fb as k,Ka as a,Rb as x,Tb as l,Ub as P,Wa as d,ca as i,lb as p,ma as f,mb as m,rb as v,sb as r,ta as h,tb as s,ub as b,vb as y,wb as C,xb as g}from"./chunk-QPN22TF2.js";function H(e,t){e&1&&g(0,"span",1)}function D(e,t){e&1&&g(0,"span",2)}function B(e,t){e&1&&g(0,"span",3)}var _=class e{pluginService=i(M);online=h(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=d({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(n,o){if(n&1&&(y(0,"div",0),p(1,H,1,0,"span",1)(2,D,1,0,"span",2)(3,B,1,0,"span",3),C()),n&2){let c;a(),m((c=o.online())===!0?1:c===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function U(e,t){if(e&1&&(r(0,"span",8),l(1),s()),e&2){let n=k();a(),P(n.userInitials)}}function A(e,t){e&1&&(r(0,"span",9),l(1,"\u25EF"),s())}var E=class e{router=i(O);userState=i(w);destroyRef=i(f);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos"])}navigateToAdmin(){this.router.navigate(["/agentos/admin/users"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(S(this.destroyRef)).subscribe()}get userInitials(){let t=this.currentUser();if(!t)return"";let n=t.firstname?.[0]??"",o=t.lastname?.[0]??"";return(n+o).toUpperCase()||t.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=d({type:e,selectors:[["agentos-header"]],decls:13,vars:4,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"]],template:function(n,o){n&1&&(r(0,"header",0)(1,"button",1),u("click",function(){return o.navigateHome()}),b(2,"img",2),r(3,"span",3),l(4,"Coday"),s()(),r(5,"nav",4),b(6,"agentos-backend-status"),r(7,"button",5),u("click",function(){return o.navigateToAdmin()}),r(8,"span",6),l(9,"\u2699\uFE0F"),s()(),r(10,"button",7),u("click",function(){return o.toggleProfile()}),p(11,U,2,1,"span",8)(12,A,2,0,"span",9),s()()()),n&2&&(a(10),x("header__user-btn--active",o.isOnProfilePage),v("title",o.isOnProfilePage?"Back":"My profile"),a(),m(o.userInitials?11:12))},dependencies:[_],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom: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));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:24px;height:24px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;letter-spacing:-.02em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};export{_ as a,E as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-AIC4U2MU.js";import{a as W}from"./chunk-LEIES4AA.js";import{a as U}from"./chunk-QIURQTGU.js";import"./chunk-L7OS7MWE.js";import"./chunk-VKFTCAHS.js";import"./chunk-ZTTTDVEL.js";import{b as K,d as G}from"./chunk-UARV2YUR.js";import{p as I,u as z,v as F}from"./chunk-DWPYG4F6.js";import"./chunk-XLNZCT7N.js";import{a as C}from"./chunk-WJFUKUVD.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-F4YDJMK7.js";import"./chunk-4YLSQZJK.js";import{Bb as f,Db as p,Fb as s,Hc as B,Ka as d,Pb as k,S as O,Tb as m,Ub as b,Vb as N,Wa as P,ab as E,ac as T,ca as u,dc as V,ec as L,ga as l,ha as c,hc as $,jb as q,kc as R,lb as v,m as M,ma as D,mb as g,nc as A,oc as x,rb as y,sb as r,t as S,ta as h,tb as a}from"./chunk-QPN22TF2.js";function Z(n,t){if(n&1&&(r(0,"span",6),m(1),a()),n&2){let e=s();d(),b(e.config().baseUrl)}}function ee(n,t){if(n&1){let e=f();r(0,"span",8),m(1,"Delete?"),a(),r(2,"ds-icon-button",9),p("action",function(){l(e);let o=s();return c(o.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",10),p("action",function(){l(e);let o=s();return c(o.onDeleteCancelled())}),a()}}function te(n,t){if(n&1){let e=f();r(0,"ds-kebab-menu",13),p("itemSelected",function(o){l(e);let _=s(2);return c(_.onMenuAction(o))}),a()}if(n&2){let e=s(2);y("items",e.menuItems())}}function ie(n,t){if(n&1){let e=f();r(0,"ds-icon-button",11),p("action",function(){l(e);let o=s();return c(o.onDuplicate())}),a(),v(1,te,1,1,"ds-kebab-menu",12)}if(n&2){let e=s();d(),g(e.readOnly()?-1:1)}}var ne=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"}}),w=class n{config=x.required();scope=x.required();readOnly=x(!1);editRequested=A();deleteRequested=A();duplicateRequested=A();pendingDelete=h(!1);badge=R(()=>ne[this.scope()]);menuItems=R(()=>[{key:"edit",label:"Edit provider",icon:"edit"},{key:"delete",label:"Delete provider",icon:"delete",variant:"danger"}]);onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.config());break;case"delete":this.pendingDelete.set(!0);break}}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-provider-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:13,vars:7,consts:[["role","listitem",1,"ai-provider-item"],[1,"ai-provider-item__body"],[1,"ai-provider-item__heading"],[1,"ai-provider-item__name"],[1,"ai-provider-item__badge"],[1,"ai-provider-item__type"],[1,"ai-provider-item__url"],[1,"ai-provider-item__actions"],[1,"ai-provider-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 provider",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),m(4),a(),r(5,"span",4),m(6),a()(),r(7,"span",5),m(8),a(),v(9,Z,2,1,"span",6),a(),r(10,"div",7),v(11,ee,4,0)(12,ie,2,1),a()()),e&2&&(d(4),b(i.config().name),d(),q("data-variant",i.badge().variant)("aria-label",i.badge().ariaLabel),d(),N(" ",i.badge().label," "),d(2),b(i.config().apiType),d(),g(i.config().baseUrl?9:-1),d(2),g(i.pendingDelete()?11:12))},dependencies:[F,I],styles:[".ai-provider-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}.ai-provider-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.ai-provider-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-provider-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.ai-provider-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ai-provider-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.ai-provider-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.ai-provider-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.ai-provider-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.ai-provider-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__url[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover .ai-provider-item__actions[_ngcontent-%COMP%], .ai-provider-item[_ngcontent-%COMP%]:focus-within .ai-provider-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-provider-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var oe=()=>[];function re(n,t){if(n&1&&(r(0,"p",3),m(1),a()),n&2){let e=s().$implicit;d(),b(e.name)}}function ae(n,t){if(n&1){let e=f();r(0,"agentos-ai-provider-item",5),p("editRequested",function(){let o=l(e),_=s(2);return c(_.onEdit(o))})("deleteRequested",function(){let o=l(e),_=s(2);return c(_.onDelete(o))})("duplicateRequested",function(){let o=l(e),_=s(2);return c(_.onDuplicate(o))}),a()}if(n&2){let e=t,i=s(2);y("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!i.isAdmin())}}function se(n,t){if(n&1&&v(0,re,2,1,"p",3)(1,ae,1,3,"agentos-ai-provider-item",4),n&2){let e,i=t.$implicit,o=s();g(o.isEmptyPlaceholder(i.id)?0:(e=o.resolve(i.id))?1:-1,e)}}var X=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),Y="__empty__",H=class n{route=u(K);router=u(G);destroyRef=u(D);state=u(W);namespaceRole=u(U);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(S(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(C(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(S(t=>t.get("namespaceId")??""),O(t=>t?this.namespaceRole.isAdminOfNamespace$(t):M(!1)),C(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(C(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(i=>{i.id&&e.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),t.userOnNs.forEach(i=>{i.id&&e.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),t.userGlobal.forEach(i=>{i.id&&e.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(Y)}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,"ai-providers","new"],{queryParams:{scope:j(this.isAdmin())}})}onEdit(t){let e=t.config.id;e&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(C(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${t.scope}:${e}:`,i)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","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:`${Y}${t}`,name:"Aucun AI Provider",groupKey:t,groupLabel:X[t]}]:e.filter(i=>!!i.id).map(i=>({id:this.itemKey(t,i.id),name:i.name,description:i.apiType,groupKey:t,groupLabel:X[t]}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,i){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),p("createRequested",function(){return i.openCreateForm()}),r(2,"ds-icon-button",2),p("action",function(){return i.goBack()}),a()(),E(3,se,2,1,"ng-template",null,0,$)),e&2){let o=k(4);y("items",L(1,3,i.listItems$)??T(5,oe))("showCreate",!0)("itemTemplate",o)}},dependencies:[z,w,I,B],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{H as AiProvidersAllScopesComponent};
|
|
1
|
+
import{a as j}from"./chunk-AIC4U2MU.js";import{a as W}from"./chunk-QZKTERKZ.js";import{a as U}from"./chunk-OOGVHCZ2.js";import"./chunk-L7OS7MWE.js";import"./chunk-TENYI4EC.js";import"./chunk-V73M5X7I.js";import{b as K,d as G}from"./chunk-UARV2YUR.js";import{p as I,u as z,v as F}from"./chunk-DWPYG4F6.js";import"./chunk-XLNZCT7N.js";import{a as C}from"./chunk-WJFUKUVD.js";import"./chunk-2GHS5VUE.js";import"./chunk-DYANOPHQ.js";import"./chunk-F4YDJMK7.js";import"./chunk-4YLSQZJK.js";import{Bb as f,Db as p,Fb as s,Hc as B,Ka as d,Pb as k,S as O,Tb as m,Ub as b,Vb as N,Wa as P,ab as E,ac as T,ca as u,dc as V,ec as L,ga as l,ha as c,hc as $,jb as q,kc as R,lb as v,m as M,ma as D,mb as g,nc as A,oc as x,rb as y,sb as r,t as S,ta as h,tb as a}from"./chunk-QPN22TF2.js";function Z(n,t){if(n&1&&(r(0,"span",6),m(1),a()),n&2){let e=s();d(),b(e.config().baseUrl)}}function ee(n,t){if(n&1){let e=f();r(0,"span",8),m(1,"Delete?"),a(),r(2,"ds-icon-button",9),p("action",function(){l(e);let o=s();return c(o.onDeleteConfirmed())}),a(),r(3,"ds-icon-button",10),p("action",function(){l(e);let o=s();return c(o.onDeleteCancelled())}),a()}}function te(n,t){if(n&1){let e=f();r(0,"ds-kebab-menu",13),p("itemSelected",function(o){l(e);let _=s(2);return c(_.onMenuAction(o))}),a()}if(n&2){let e=s(2);y("items",e.menuItems())}}function ie(n,t){if(n&1){let e=f();r(0,"ds-icon-button",11),p("action",function(){l(e);let o=s();return c(o.onDuplicate())}),a(),v(1,te,1,1,"ds-kebab-menu",12)}if(n&2){let e=s();d(),g(e.readOnly()?-1:1)}}var ne=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"}}),w=class n{config=x.required();scope=x.required();readOnly=x(!1);editRequested=A();deleteRequested=A();duplicateRequested=A();pendingDelete=h(!1);badge=R(()=>ne[this.scope()]);menuItems=R(()=>[{key:"edit",label:"Edit provider",icon:"edit"},{key:"delete",label:"Delete provider",icon:"delete",variant:"danger"}]);onMenuAction(t){switch(t){case"edit":this.editRequested.emit(this.config());break;case"delete":this.pendingDelete.set(!0);break}}onDuplicate(){this.duplicateRequested.emit(this.config())}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.config())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-provider-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:13,vars:7,consts:[["role","listitem",1,"ai-provider-item"],[1,"ai-provider-item__body"],[1,"ai-provider-item__heading"],[1,"ai-provider-item__name"],[1,"ai-provider-item__badge"],[1,"ai-provider-item__type"],[1,"ai-provider-item__url"],[1,"ai-provider-item__actions"],[1,"ai-provider-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 provider",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(r(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),m(4),a(),r(5,"span",4),m(6),a()(),r(7,"span",5),m(8),a(),v(9,Z,2,1,"span",6),a(),r(10,"div",7),v(11,ee,4,0)(12,ie,2,1),a()()),e&2&&(d(4),b(i.config().name),d(),q("data-variant",i.badge().variant)("aria-label",i.badge().ariaLabel),d(),N(" ",i.badge().label," "),d(2),b(i.config().apiType),d(),g(i.config().baseUrl?9:-1),d(2),g(i.pendingDelete()?11:12))},dependencies:[F,I],styles:[".ai-provider-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}.ai-provider-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.ai-provider-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-provider-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.ai-provider-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ai-provider-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.ai-provider-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.ai-provider-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.ai-provider-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.ai-provider-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__url[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover .ai-provider-item__actions[_ngcontent-%COMP%], .ai-provider-item[_ngcontent-%COMP%]:focus-within .ai-provider-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-provider-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};var oe=()=>[];function re(n,t){if(n&1&&(r(0,"p",3),m(1),a()),n&2){let e=s().$implicit;d(),b(e.name)}}function ae(n,t){if(n&1){let e=f();r(0,"agentos-ai-provider-item",5),p("editRequested",function(){let o=l(e),_=s(2);return c(_.onEdit(o))})("deleteRequested",function(){let o=l(e),_=s(2);return c(_.onDelete(o))})("duplicateRequested",function(){let o=l(e),_=s(2);return c(_.onDuplicate(o))}),a()}if(n&2){let e=t,i=s(2);y("config",e.config)("scope",e.scope)("readOnly",e.scope==="namespace"&&!i.isAdmin())}}function se(n,t){if(n&1&&v(0,re,2,1,"p",3)(1,ae,1,3,"agentos-ai-provider-item",4),n&2){let e,i=t.$implicit,o=s();g(o.isEmptyPlaceholder(i.id)?0:(e=o.resolve(i.id))?1:-1,e)}}var X=Object.freeze({namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),Y="__empty__",H=class n{route=u(K);router=u(G);destroyRef=u(D);state=u(W);namespaceRole=u(U);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=h(!1);listItems$=this.state.vm$.pipe(S(t=>this.toListItems(t)));resolved=new Map;ngOnInit(){this.route.paramMap.pipe(C(this.destroyRef)).subscribe(t=>{let e=t.get("namespaceId")??"";e&&e!==this.namespaceId&&(this.namespaceId=e),this.state.setNamespace(e)}),this.route.paramMap.pipe(S(t=>t.get("namespaceId")??""),O(t=>t?this.namespaceRole.isAdminOfNamespace$(t):M(!1)),C(this.destroyRef)).subscribe(t=>this.isAdmin.set(t)),this.state.vm$.pipe(C(this.destroyRef)).subscribe(t=>{let e=new Map;t.namespace.forEach(i=>{i.id&&e.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"})}),t.userOnNs.forEach(i=>{i.id&&e.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"})}),t.userGlobal.forEach(i=>{i.id&&e.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"})}),this.resolved=e})}isEmptyPlaceholder(t){return t.startsWith(Y)}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,"ai-providers","new"],{queryParams:{scope:j(this.isAdmin())}})}onEdit(t){let e=t.config.id;e&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e,"edit"],{queryParams:{scope:t.scope}})}onDelete(t){let e=t.config.id;e&&this.state.delete(e,t.scope).pipe(C(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${t.scope}:${e}:`,i)}})}onDuplicate(t){if(!t.config.id)return;let e=t.scope==="namespace"&&!this.isAdmin()?"userOnNs":t.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","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:`${Y}${t}`,name:"Aucun AI Provider",groupKey:t,groupLabel:X[t]}]:e.filter(i=>!!i.id).map(i=>({id:this.itemKey(t,i.id),name:i.name,description:i.apiType,groupKey:t,groupLabel:X[t]}))}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=P({type:n,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:6,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(e,i){if(e&1&&(r(0,"ds-entity-list",1),V(1,"async"),p("createRequested",function(){return i.openCreateForm()}),r(2,"ds-icon-button",2),p("action",function(){return i.goBack()}),a()(),E(3,se,2,1,"ng-template",null,0,$)),e&2){let o=k(4);y("items",L(1,3,i.listItems$)??T(5,oe))("showCreate",!0)("itemTemplate",o)}},dependencies:[z,w,I,B],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"],changeDetection:0})};export{H as AiProvidersAllScopesComponent};
|