@nebulateam/jarvis-sdk 0.0.0-stage → 5.57.9-fix.1

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/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ var we=Object.defineProperty;var f=(c,e)=>we(c,"name",{value:e,configurable:!0});var p=class{static{f(this,"JarvisApiBase")}config;constructor(e){this.config=e}transformOptions=e=>{let{jarvisToken:n,jarvisCallInfoHeader:s}=this.config;return e.headers={...e.headers,...n&&{"jarvis-auth-token":n},...s&&{"X-Jarvis-Call-Info":s}},Promise.resolve(e)}},C=class extends p{static{f(this,"AccountV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getDetail(e,n){let s=this.baseUrl+"/accounts/api/public/account/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetDetail(i))}processGetDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/accounts/api/public/account/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},me=class extends p{static{f(this,"JarvisAppConfigurationV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getJarvisAppConfiguration(e){let n=this.baseUrl+"/api/public/jarvis-app-configuration/get?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetJarvisAppConfiguration(t))}processGetJarvisAppConfiguration(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ge=class extends p{static{f(this,"PublicNotificationClient")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getActualCheckpoint(e){let n=this.baseUrl+"/auth/api/public/notifications/get-actual-checkpoint?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetActualCheckpoint(t))}processGetActualCheckpoint(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getNotificationList(e){let n=this.baseUrl+"/auth/api/public/notifications/get-notification-list?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetNotificationList(t))}processGetNotificationList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}poll(e,n){let s=this.baseUrl+"/auth/api/public/notifications/poll?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processPoll(i))}processPoll(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ye=class extends p{static{f(this,"AuthProxyV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}ping(e){let n=this.baseUrl+"/auth/api/public/proxy/ping?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processPing(t))}processPing(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}reportLoginEvent(e,n){let s=this.baseUrl+"/auth/api/public/proxy/report-login-event?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processReportLoginEvent(i))}processReportLoginEvent(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}suspendSignalr(e,n){let s=this.baseUrl+"/auth/api/public/proxy/suspend-signalr?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSuspendSignalr(i))}processSuspendSignalr(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}generateTemporaryToken(e,n){let s=this.baseUrl+"/auth/api/public/proxy/temporary-token?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGenerateTemporaryToken(i))}processGenerateTemporaryToken(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}validateAdCredentials(e,n){let s=this.baseUrl+"/auth/api/public/proxy/validate-ad-credentials?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processValidateAdCredentials(i))}processValidateAdCredentials(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}validateToken(e,n){let s=this.baseUrl+"/auth/api/public/proxy/validate-token?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processValidateToken(i))}processValidateToken(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},be=class extends p{static{f(this,"TeamsV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getById(e,n){let s=this.baseUrl+"/auth/api/public/teams/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetById(i))}processGetById(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}update(e,n){let s=this.baseUrl+"/auth/api/public/teams/update?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpdate(i))}processUpdate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},S=class extends p{static{f(this,"UsersV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}current(e){let n=this.baseUrl+"/auth/api/public/users/current?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processCurrent(t))}processCurrent(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getEmails(e,n){let s=this.baseUrl+"/auth/api/public/users/get-emails?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetEmails(i))}processGetEmails(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchUsers(e,n){let s=this.baseUrl+"/auth/api/public/users/search-users?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchUsers(i))}processSearchUsers(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translateIdList(e,n){let s=this.baseUrl+"/auth/api/public/users/translate-id-list?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslateIdList(i))}processTranslateIdList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},k=class extends p{static{f(this,"AvatarV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getAvatar(e,n,s){let t=this.baseUrl+"/collaboration/api/public/avatar/{id}/{fullName}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fullName' must be defined.");t=t.replace("{fullName}",encodeURIComponent(""+s)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let r={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(t,i)).then(i=>this.processGetAvatar(i))}processGetAvatar(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}},q=class extends p{static{f(this,"ContactV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/contacts/api/public/contact/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/contacts/api/public/contact/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},T=class extends p{static{f(this,"DatasetV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}deleteItemsBlock(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/delete-items?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDeleteItemsBlock(i))}processDeleteItemsBlock(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsertDatasetByTypeOrId(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/detail/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsertDatasetByTypeOrId(i))}processUpsertDatasetByTypeOrId(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDatasetByTypeOrId(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/detail/{datasetIdOrDatasetType}?";if(n==null)throw new globalThis.Error("The parameter 'datasetIdOrDatasetType' must be defined.");s=s.replace("{datasetIdOrDatasetType}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetDatasetByTypeOrId(r))}processGetDatasetByTypeOrId(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getFacetFieldConfig(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/facet-config?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetFacetFieldConfig(i))}processGetFacetFieldConfig(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}itemInfo(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/item-info?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processItemInfo(i))}processItemInfo(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}itemInfoOmnisearch(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/item-info-omnisearchitem?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processItemInfoOmnisearch(i))}processItemInfoOmnisearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}listFacets(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/list/facets?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processListFacets(i))}processListFacets(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}list(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/list/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processList(i))}processList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}saveItemsBlock(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/save-items?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSaveItemsBlock(i))}processSaveItemsBlock(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchGroupedItems(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/search-grouped-items?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchGroupedItems(i))}processSearchGroupedItems(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchItems(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/search-items?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchItems(i))}processSearchItems(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}truncateType(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/truncate?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTruncateType(i))}processTruncateType(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}uploadDatasetFromExcelFile(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/upload-dataset-from-excelfile?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUploadDatasetFromExcelFile(i))}processUploadDatasetFromExcelFile(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchItemsV2(e,n,s){let t=this.baseUrl+"/dataset/api/public/dataset/{datasetId}/search-items?";if(n==null)throw new globalThis.Error("The parameter 'datasetId' must be defined.");t=t.replace("{datasetId}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSearchItemsV2(a))}processSearchItemsV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDatasetConfigById(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/{id}/config?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetDatasetConfigById(r))}processGetDatasetConfigById(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},De=class extends p{static{f(this,"AcesV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getList(e){let n=this.baseUrl+"/dms/api/public/aces/list?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetList(t))}processGetList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getAce(e,n){let s=this.baseUrl+"/dms/api/public/aces/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetAce(r))}processGetAce(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},A=class extends p{static{f(this,"ContainerV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}archiveContainerV2(e,n){let s=this.baseUrl+"/dms/api/public/container/2/{id}/archive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processArchiveContainerV2(r))}processArchiveContainerV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}copy(e,n){let s=this.baseUrl+"/dms/api/public/container/copy?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCopy(i))}processCopy(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}createFromPath(e,n){let s=this.baseUrl+"/dms/api/public/container/create-from-path?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreateFromPath(i))}processCreateFromPath(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}pathExists(e,n){let s=this.baseUrl+"/dms/api/public/container/path-exist?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processPathExists(i))}processPathExists(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/dms/api/public/container/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}setFavourite(e,n){let s=this.baseUrl+"/dms/api/public/container/set-favourite?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSetFavourite(i))}processSetFavourite(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/dms/api/public/container/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}get(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGet(r))}processGet(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}archiveContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/archive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processArchiveContainer(r))}processArchiveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}browseContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/browse?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processBrowseContainer(r))}processBrowseContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}createChildContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/create-child-container?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processCreateChildContainer(a))}processCreateChildContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}deleteContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/delete?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDeleteContainer(r))}processDeleteContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}editContainerProperties(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/edit-properties?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processEditContainerProperties(a))}processEditContainerProperties(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getFullPath(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/full-path?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetFullPath(r))}processGetFullPath(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}moveContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/move?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processMoveContainer(a))}processMoveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}renameContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/rename?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processRenameContainer(a))}processRenameContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}unarchiveContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/unarchive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUnarchiveContainer(a))}processUnarchiveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}updateCustomProperties(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/update-custom-properties?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUpdateCustomProperties(a))}processUpdateCustomProperties(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}updateContainerMetadata(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/update-metadata?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUpdateContainerMetadata(a))}processUpdateContainerMetadata(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},U=class extends p{static{f(this,"DmsSearchV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}searchV2(e,n){let s=this.baseUrl+"/dms/api/public/dms-search/2/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchV2(i))}processSearchV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/dms/api/public/dms-search/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},E=class extends p{static{f(this,"DocumentTypeV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}list(e){let n=this.baseUrl+"/dms/api/public/document-type/list?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processList(t))}processList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},w=class extends p{static{f(this,"DocumentV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}copy(e,n){let s=this.baseUrl+"/dms/api/public/document/copy?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCopy(i))}processCopy(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detail(e,n){let s=this.baseUrl+"/dms/api/public/document/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}import(e,n){let s=this.baseUrl+"/dms/api/public/document/import?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processImport(i))}processImport(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/dms/api/public/document/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}update(e,n){let s=this.baseUrl+"/dms/api/public/document/update?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpdate(i))}processUpdate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/dms/api/public/document/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}preview(e,n,s,t){let r=this.baseUrl+"/dms/api/public/document/{documentId}/preview/{blobId}?";if(n==null)throw new globalThis.Error("The parameter 'documentId' must be defined.");if(r=r.replace("{documentId}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'blobId' must be defined.");r=r.replace("{blobId}",encodeURIComponent(""+s)),e!=null&&(r+="api-version="+encodeURIComponent(""+e)+"&"),t!=null&&(r+="size="+encodeURIComponent(""+t)+"&"),r=r.replace(/[?&]$/,"");let i={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(i).then(a=>this.http.fetch(r,a)).then(a=>this.processPreview(a))}processPreview(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}setMetadataValues(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{documentId}/set-metadata-values?";if(n==null)throw new globalThis.Error("The parameter 'documentId' must be defined.");t=t.replace("{documentId}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetMetadataValues(a))}processSetMetadataValues(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}get(e,n,s,t){let r=this.baseUrl+"/dms/api/public/document/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(r=r.replace("{id}",encodeURIComponent(""+n)),e!=null&&(r+="api-version="+encodeURIComponent(""+e)+"&"),s===null)throw new globalThis.Error("The parameter 'history' cannot be null.");if(s!==void 0&&(r+="history="+encodeURIComponent(""+s)+"&"),t===null)throw new globalThis.Error("The parameter 'includeNestedFields' cannot be null.");t!==void 0&&(r+="includeNestedFields="+encodeURIComponent(""+t)+"&"),r=r.replace(/[?&]$/,"");let i={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(r,a)).then(a=>this.processGet(a))}processGet(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}addRevision(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/add-revision?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processAddRevision(a))}processAddRevision(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}approveRevision(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/approve-revision?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processApproveRevision(a))}processApproveRevision(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}archive(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/archive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processArchive(r))}processArchive(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}delete(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/delete?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDelete(r))}processDelete(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}download(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/download?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),s!=null&&(t+="fileName="+encodeURIComponent(""+s)+"&"),t=t.replace(/[?&]$/,"");let r={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(t,i)).then(i=>this.processDownload(i))}processDownload(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}downloadBlob(e,n,s,t,r){let i=this.baseUrl+"/dms/api/public/document/{id}/download/{fileIdOrBlobId}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fileIdOrBlobId' must be defined.");i=i.replace("{fileIdOrBlobId}",encodeURIComponent(""+s)),e!=null&&(i+="api-version="+encodeURIComponent(""+e)+"&"),t!=null&&(i+="fileName="+encodeURIComponent(""+t)+"&"),r!=null&&(i+="format="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");let a={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(a).then(m=>this.http.fetch(i,m)).then(m=>this.processDownloadBlob(m))}processDownloadBlob(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}setAbstract(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-abstract?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetAbstract(a))}processSetAbstract(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}setTags(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-tags?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetTags(a))}processSetTags(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}setTitle(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-title?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetTitle(a))}processSetTitle(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}unarchive(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/unarchive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processUnarchive(r))}processUnarchive(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ve=class extends p{static{f(this,"FileManipulatorV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}convertToPdf(e,n){let s=this.baseUrl+"/dms/api/public/file-manipulator/pdf-convert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processConvertToPdf(i))}processConvertToPdf(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}mergeInPdf(e,n){let s=this.baseUrl+"/dms/api/public/file-manipulator/pdf-merge?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processMergeInPdf(i))}processMergeInPdf(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}},Pe=class extends p{static{f(this,"PermalinkV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}create(e,n){let s=this.baseUrl+"/dms/api/public/permalink/create?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreate(i))}processCreate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}navigate(e,n){let s=this.baseUrl+"/dms/api/public/permalink/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processNavigate(r))}processNavigate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Oe=class extends p{static{f(this,"SearchV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}search(e,n){let s=this.baseUrl+"/dms/api/public/search/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchByOwner(e,n){let s=this.baseUrl+"/dms/api/public/search/search-by-owner?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchByOwner(i))}processSearchByOwner(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},xe=class extends p{static{f(this,"WorkCalendarV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}create(e,n){let s=this.baseUrl+"/planning/api/public/workcalendar?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreate(i))}processCreate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDefault(e){let n=this.baseUrl+"/planning/api/public/workcalendar/default?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetDefault(t))}processGetDefault(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n,s,t){let r=this.baseUrl+"/planning/api/public/workcalendar/search?";if(e!=null&&(r+="api-version="+encodeURIComponent(""+e)+"&"),n!=null&&(r+="name="+encodeURIComponent(""+n)+"&"),s===null)throw new globalThis.Error("The parameter 'pageSize' cannot be null.");if(s!==void 0&&(r+="pageSize="+encodeURIComponent(""+s)+"&"),t===null)throw new globalThis.Error("The parameter 'startIndex' cannot be null.");t!==void 0&&(r+="startIndex="+encodeURIComponent(""+t)+"&"),r=r.replace(/[?&]$/,"");let i={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(r,a)).then(a=>this.processSearch(a))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getById(e,n){let s=this.baseUrl+"/planning/api/public/workcalendar/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetById(r))}processGetById(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}update(e,n,s){let t=this.baseUrl+"/planning/api/public/workcalendar/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");t=t.replace("{id}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUpdate(a))}processUpdate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Ie=class extends p{static{f(this,"ChatV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}archiveRoom(e,n){let s=this.baseUrl+"/system/api/public/chat/archive?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processArchiveRoom(i))}processArchiveRoom(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}changeRoomTitle(e,n){let s=this.baseUrl+"/system/api/public/chat/change-room-title?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processChangeRoomTitle(i))}processChangeRoomTitle(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}clearAllMessages(e,n){let s=this.baseUrl+"/system/api/public/chat/clear-all-messages?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processClearAllMessages(i))}processClearAllMessages(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}createRoom(e,n){let s=this.baseUrl+"/system/api/public/chat/create?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreateRoom(i))}processCreateRoom(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}createChatBot(e,n){let s=this.baseUrl+"/system/api/public/chat/create-chat-bot?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreateChatBot(i))}processCreateChatBot(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}deleteMessage(e,n){let s=this.baseUrl+"/system/api/public/chat/delete-message?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDeleteMessage(i))}processDeleteMessage(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}editMessage(e,n){let s=this.baseUrl+"/system/api/public/chat/edit-message?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processEditMessage(i))}processEditMessage(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getMessages(e,n){let s=this.baseUrl+"/system/api/public/chat/get-messages?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetMessages(i))}processGetMessages(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getUndeliveredMessages(e,n){let s=this.baseUrl+"/system/api/public/chat/get-undelivered-messages?";if(e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),n===null)throw new globalThis.Error("The parameter 'limit' cannot be null.");n!==void 0&&(s+="limit="+encodeURIComponent(""+n)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetUndeliveredMessages(r))}processGetUndeliveredMessages(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getUserRooms(e){let n=this.baseUrl+"/system/api/public/chat/get-user-rooms?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetUserRooms(t))}processGetUserRooms(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}markMessagesAsDelivered(e,n){let s=this.baseUrl+"/system/api/public/chat/mark-messages-as-delivered?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processMarkMessagesAsDelivered(i))}processMarkMessagesAsDelivered(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}sendMessage(e,n){let s=this.baseUrl+"/system/api/public/chat/send-message?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSendMessage(i))}processSendMessage(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},N=class extends p{static{f(this,"JarvisFieldsV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}downloadFieldFiles(e,n,s,t,r){let i=this.baseUrl+"/system/api/public/fields/download/{aggregateId}/{fieldId}?";if(n==null)throw new globalThis.Error("The parameter 'aggregateId' must be defined.");if(i=i.replace("{aggregateId}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fieldId' must be defined.");if(i=i.replace("{fieldId}",encodeURIComponent(""+s)),e!=null&&(i+="api-version="+encodeURIComponent(""+e)+"&"),t===null)throw new globalThis.Error("The parameter 'format' cannot be null.");t!==void 0&&(i+="format="+encodeURIComponent(""+t)+"&"),r!=null&&(i+="fileName="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");let a={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(a).then(m=>this.http.fetch(i,m)).then(m=>this.processDownloadFieldFiles(m))}processDownloadFieldFiles(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("Access denied",n,t,s,r)}):n===404?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("Field not found or contains no files",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}downloadFile(e,n,s,t,r){let i=this.baseUrl+"/system/api/public/fields/download/{aggregateId}/{fieldId}/{fileId}?";if(n==null)throw new globalThis.Error("The parameter 'aggregateId' must be defined.");if(i=i.replace("{aggregateId}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fieldId' must be defined.");if(i=i.replace("{fieldId}",encodeURIComponent(""+s)),t==null)throw new globalThis.Error("The parameter 'fileId' must be defined.");if(i=i.replace("{fileId}",encodeURIComponent(""+t)),r==null)throw new globalThis.Error("The parameter 'format' must be defined.");i=i.replace("{format}",encodeURIComponent(""+r)),e!=null&&(i+="api-version="+encodeURIComponent(""+e)+"&"),i=i.replace(/[?&]$/,"");let a={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(a).then(m=>this.http.fetch(i,m)).then(m=>this.processDownloadFile(m))}processDownloadFile(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("Access denied",n,t,s,r)}):n===404?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("File not found",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}downloadFile2(e,n,s,t,r){let i=this.baseUrl+"/system/api/public/fields/download/{aggregateId}/{fieldId}/{fileId}/{format}?";if(n==null)throw new globalThis.Error("The parameter 'aggregateId' must be defined.");if(i=i.replace("{aggregateId}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fieldId' must be defined.");if(i=i.replace("{fieldId}",encodeURIComponent(""+s)),t==null)throw new globalThis.Error("The parameter 'fileId' must be defined.");if(i=i.replace("{fileId}",encodeURIComponent(""+t)),r==null)throw new globalThis.Error("The parameter 'format' must be defined.");i=i.replace("{format}",encodeURIComponent(""+r)),e!=null&&(i+="api-version="+encodeURIComponent(""+e)+"&"),i=i.replace(/[?&]$/,"");let a={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(a).then(m=>this.http.fetch(i,m)).then(m=>this.processDownloadFile2(m))}processDownloadFile2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("Access denied",n,t,s,r)}):n===404?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("File not found",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}ensureFieldDefinition(e,n){let s=this.baseUrl+"/system/api/public/fields/ensure-field-definition?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processEnsureFieldDefinition(i))}processEnsureFieldDefinition(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}ensureFieldDefinitions(e,n){let s=this.baseUrl+"/system/api/public/fields/ensure-field-definitions?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processEnsureFieldDefinitions(i))}processEnsureFieldDefinitions(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}get(e,n){let s=this.baseUrl+"/system/api/public/fields/getlist?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGet(i))}processGet(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchSelection(e,n){let s=this.baseUrl+"/system/api/public/fields/search-selection?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchSelection(i))}processSearchSelection(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},J=class extends p{static{f(this,"FileUploadV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}uploadMultipartV2(e,n){let s=this.baseUrl+"/system/api/public/files/2/upload-multipart?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t=new FormData;n?.forEach(i=>t.append("Files",i.data,i.fileName?i.fileName:"Files"));let r={body:t,method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUploadMultipartV2(i))}processUploadMultipartV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upload(e){let n=this.baseUrl+"/system/api/public/files/upload?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processUpload(t))}processUpload(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}uploadMultipart(e,n){let s=this.baseUrl+"/system/api/public/files/upload-multipart?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t=new FormData;n?.forEach(i=>t.append("Files",i.data,i.fileName?i.fileName:"Files"));let r={body:t,method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUploadMultipart(i))}processUploadMultipart(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Ce=class extends p{static{f(this,"IdentitiesManagerV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}reserve(e,n){let s=this.baseUrl+"/system/api/public/identities-manager/reserve?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processReserve(i))}processReserve(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Se=class extends p{static{f(this,"IdTranslationV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}testDeprecated(e){let n=this.baseUrl+"/system/api/public/idtranslation/testdeprecated?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processTestDeprecated(t))}processTestDeprecated(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}testDeprecatedFields(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/testdeprecatedfields?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTestDeprecatedFields(i))}processTestDeprecatedFields(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}testPreview(e){let n=this.baseUrl+"/system/api/public/idtranslation/testpreview?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processTestPreview(t))}processTestPreview(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translate(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/translate?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslate(i))}processTranslate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translateDictionary(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/translate-dictionary?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslateDictionary(i))}processTranslateDictionary(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},j=class extends p{static{f(this,"IntegrationV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}mapSymbolicName(e,n){let s=this.baseUrl+"/system/api/public/integration/omni-mapper?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processMapSymbolicName(i))}processMapSymbolicName(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}resolveText(e,n){let s=this.baseUrl+"/system/api/public/integration/omni-mapper/resolve-text?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processResolveText(i))}processResolveText(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}tryMapSymbolicName(e,n){let s=this.baseUrl+"/system/api/public/integration/omni-mapper/try?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTryMapSymbolicName(i))}processTryMapSymbolicName(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}refreshIndex(e,n){let s=this.baseUrl+"/system/api/public/integration/refresh-index?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processRefreshIndex(i))}processRefreshIndex(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getReindexStatus(e){let n=this.baseUrl+"/system/api/public/integration/reindex-status?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetReindexStatus(t))}processGetReindexStatus(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchPercolators(e,n){let s=this.baseUrl+"/system/api/public/integration/search-percolators?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchPercolators(i))}processSearchPercolators(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}updatePercolator(e,n){let s=this.baseUrl+"/system/api/public/integration/update-percolator?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpdatePercolator(i))}processUpdatePercolator(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ke=class extends p{static{f(this,"LoggerV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}trace(e,n){let s=this.baseUrl+"/system/api/public/logger/trace?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTrace(i))}processTrace(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},V=class extends p{static{f(this,"LongRunningJobPublicV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getStatusDetail(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/detail?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetStatusDetail(r))}processGetStatusDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}startLongRunningJob(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/start?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processStartLongRunningJob(r))}processStartLongRunningJob(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getStatus(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/status?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");s=s.replace("{id}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetStatus(r))}processGetStatus(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},W=class extends p{static{f(this,"PropertiesV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}search(e,n){let s=this.baseUrl+"/system/api/public/properties/definition/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDefinitions(e,n){let s=this.baseUrl+"/system/api/public/properties/definitions-by-ids?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetDefinitions(i))}processGetDefinitions(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchSelection(e,n){let s=this.baseUrl+"/system/api/public/properties/search-selection?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchSelection(i))}processSearchSelection(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},M=class extends p{static{f(this,"TicketV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getAttachment(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/get-attachment?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetAttachment(i))}processGetAttachment(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}getContentAsString(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/get-content?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetContentAsString(i))}processGetContentAsString(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}received(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/received/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processReceived(i))}processReceived(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchV2(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchV2(i))}processSearchV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}sent(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/sent/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSent(i))}processSent(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},F=class extends p{static{f(this,"WorkspacePlanningV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/workspaces/api/public/planning/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/workspaces/api/public/planning/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsertMany(e,n){let s=this.baseUrl+"/workspaces/api/public/planning/upsert-many?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsertMany(i))}processUpsertMany(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},_=class extends p{static{f(this,"TaskTypeV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/workspaces/api/public/tasktypes/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/workspaces/api/public/tasktypes/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/workspaces/api/public/tasktypes/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},L=class extends p{static{f(this,"WorkspaceV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}searchAllWorkspaces(e,n){let s=this.baseUrl+"/workspaces/api/public/workspace/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchAllWorkspaces(i))}processSearchAllWorkspaces(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}superNewFunction(e){let n=this.baseUrl+"/workspaces/api/public/workspace/super-new-function?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processSuperNewFunction(t))}processSuperNewFunction(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/workspaces/api/public/workspace/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}settings(e,n){let s=this.baseUrl+"/workspaces/api/public/workspace/{workspaceId}/settings?";if(n==null)throw new globalThis.Error("The parameter 'workspaceId' must be defined.");s=s.replace("{workspaceId}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processSettings(r))}processSettings(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchUsers(e,n,s){let t=this.baseUrl+"/workspaces/api/public/workspace/{workspaceId}/users/search?";if(n==null)throw new globalThis.Error("The parameter 'workspaceId' must be defined.");t=t.replace("{workspaceId}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSearchUsers(a))}processSearchUsers(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},B=class extends p{static{f(this,"WorkTaskV2Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}ai(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/ai?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processAi(i))}processAi(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detailNew(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/detail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetailNew(i))}processDetailNew(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detailList(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/detail-list?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetailList(i))}processDetailList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getAttachment(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/get-content?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetAttachment(i))}processGetAttachment(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>o("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchAllWorkspaces(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/search-all-workspaces?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchAllWorkspaces(i))}processSearchAllWorkspaces(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchTodoItems(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/todoitems/search?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchTodoItems(i))}processSearchTodoItems(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/upsert?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsertMany(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/upsert-many?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsertMany(i))}processUpsertMany(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchV2(e,n,s){let t=this.baseUrl+"/workspaces/api/public/worktask/{workspaceId}/search?";if(n==null)throw new globalThis.Error("The parameter 'workspaceId' must be defined.");t=t.replace("{workspaceId}",encodeURIComponent(""+n)),e!=null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSearchV2(a))}processSearchV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detail(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/{workTaskId}?";if(n==null)throw new globalThis.Error("The parameter 'workTaskId' must be defined.");s=s.replace("{workTaskId}",encodeURIComponent(""+n)),e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDetail(r))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),o("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>o("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Ne=(t=>(t.None="None",t.Info="Info",t.Warning="Warning",t.Error="Error",t))(Ne||{}),Je=(s=>(s[s.Unknown=0]="Unknown",s[s.MachineEncrypted=1]="MachineEncrypted",s[s.PublicKeyEncrypted=2]="PublicKeyEncrypted",s))(Je||{}),je=(n=>(n[n.And=0]="And",n[n.Or=1]="Or",n))(je||{}),Ve=(t=>(t[t.Received=0]="Received",t[t.Cc=1]="Cc",t[t.Sent=2]="Sent",t[t.AllConfirmed=3]="AllConfirmed",t))(Ve||{}),We=(r=>(r[r.String=0]="String",r[r.Numeric=1]="Numeric",r[r.DateTime=2]="DateTime",r[r.Boolean=3]="Boolean",r[r.DateWithoutTime=4]="DateWithoutTime",r))(We||{}),Me=(s=>(s[s.String=0]="String",s[s.Numeric=1]="Numeric",s[s.DateTime=2]="DateTime",s))(Me||{}),Fe=(u=>(u[u.Unknown=0]="Unknown",u[u.IsNull=1]="IsNull",u[u.IsNotNull=2]="IsNotNull",u[u.OneOf=4]="OneOf",u[u.Contains=8]="Contains",u[u.DoesNotContain=16]="DoesNotContain",u[u.StartsWith=32]="StartsWith",u[u.EndsWith=64]="EndsWith",u[u.Equals=128]="Equals",u[u.NotEqual=256]="NotEqual",u[u.GreaterThan=512]="GreaterThan",u[u.GreaterThanOrEqualTo=1024]="GreaterThanOrEqualTo",u[u.LessThan=2048]="LessThan",u[u.LessThanOrEqualTo=4096]="LessThanOrEqualTo",u[u.NotOneOf=8192]="NotOneOf",u[u.Between=16384]="Between",u))(Fe||{}),_e=(n=>(n[n.And=0]="And",n[n.Or=1]="Or",n))(_e||{}),Le=(t=>(t[t.Unknown=0]="Unknown",t[t.String=1]="String",t[t.Numeric=2]="Numeric",t[t.DateTime=3]="DateTime",t))(Le||{}),Be=(r=>(r[r.Unknown=0]="Unknown",r[r.Sum=1]="Sum",r[r.Average=2]="Average",r[r.Max=3]="Max",r[r.Min=4]="Min",r))(Be||{}),$e=(u=>(u.Unknown="unknown",u.String="string",u.Number="number",u.Boolean="boolean",u.Date="date",u.DateTime="dateTime",u.Time="time",u.Currency="currency",u.Percent="percent",u.Hyperlink="hyperlink",u.Entity="entity",u.Enum="enum",u.Integer="integer",u.File="file",u.RTE="rte",u.Counter="counter",u))($e||{}),Ge=(y=>(y.Unknown="unknown",y.NoSearch="no-search",y.Custom="custom",y.ByFacet="by-facet",y.ByFacetId="by-facet-id",y.ByUDVL="by-user-defined-value-list",y.ByUser="by-user",y.ByUserAndGroup="by-user-and-group",y.ByAvailableValues="by-available-values",y.Disabled="disabled",y))(Ge||{}),ze=(b=>(b.Unknown="unknown",b.Selection="selection",b.AutoComplete="auto-complete",b.TranslatedAutoComplete="translated-auto-complete",b.DateRange="date-range",b.SearchText="string",b.Custom="custom",b.Users="users",b.Enum="enum",b))(ze||{}),Qe=(r=>(r.Unknown="unknown",r.Standard="standard",r.ExternalLink="external-link",r.Link="link",r.InlineRichText="inline-rich-text",r))(Qe||{}),Ke=(a=>(a.Unknown="unknown",a.Grid="grid",a.Board="board",a.Gantt="gantt",a.Gallery="gallery",a.List="list",a.Planning="planning",a))(Ke||{}),Xe=(n=>(n.Block="block",n.Skip="skip",n))(Xe||{}),Ye=(t=>(t[t.None=0]="None",t[t.Contextual=1]="Contextual",t[t.Readonly=2]="Readonly",t[t.Hidden=4]="Hidden",t))(Ye||{}),Ze=(s=>(s[s.Undefined=0]="Undefined",s[s.Container=1]="Container",s[s.Document=2]="Document",s))(Ze||{}),He=(s=>(s[s.Optional=0]="Optional",s[s.Automatic=1]="Automatic",s[s.Required=2]="Required",s))(He||{}),et=(i=>(i[i.Unknown=0]="Unknown",i[i.Default=1]="Default",i[i.FormDataString=2]="FormDataString",i[i.FormDataInt=3]="FormDataInt",i[i.FormDataDate=4]="FormDataDate",i[i.FormDataUdt=5]="FormDataUdt",i))(et||{}),tt=(g=>(g.Unknown="Unknown",g.Integer="integer",g.Number="number",g.String="string",g.DateTime="datetime",g.Date="date",g.Boolean="bool",g.OmniSearchDataSource="omnisearch-data-source",g.Hyperlink="hyperlink",g.Counter="counter",g.Enum="enum",g.File="file",g.RTE="rte",g))(tt||{}),nt=(t=>(t.Original="original",t.Thumbnail="thumbnail",t.LargeThumbnail="largethumbnail",t.Pdf="pdf",t))(nt||{}),st=(d=>(d[d.Continue=100]="Continue",d[d.SwitchingProtocols=101]="SwitchingProtocols",d[d.Processing=102]="Processing",d[d.EarlyHints=103]="EarlyHints",d[d.OK=200]="OK",d[d.Created=201]="Created",d[d.Accepted=202]="Accepted",d[d.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",d[d.NoContent=204]="NoContent",d[d.ResetContent=205]="ResetContent",d[d.PartialContent=206]="PartialContent",d[d.MultiStatus=207]="MultiStatus",d[d.AlreadyReported=208]="AlreadyReported",d[d.IMUsed=226]="IMUsed",d[d.MultipleChoices=300]="MultipleChoices",d[d.Ambiguous=300]="Ambiguous",d[d.MovedPermanently=301]="MovedPermanently",d[d.Moved=301]="Moved",d[d.Found=302]="Found",d[d.Redirect=302]="Redirect",d[d.SeeOther=303]="SeeOther",d[d.RedirectMethod=303]="RedirectMethod",d[d.NotModified=304]="NotModified",d[d.UseProxy=305]="UseProxy",d[d.Unused=306]="Unused",d[d.TemporaryRedirect=307]="TemporaryRedirect",d[d.RedirectKeepVerb=307]="RedirectKeepVerb",d[d.PermanentRedirect=308]="PermanentRedirect",d[d.BadRequest=400]="BadRequest",d[d.Unauthorized=401]="Unauthorized",d[d.PaymentRequired=402]="PaymentRequired",d[d.Forbidden=403]="Forbidden",d[d.NotFound=404]="NotFound",d[d.MethodNotAllowed=405]="MethodNotAllowed",d[d.NotAcceptable=406]="NotAcceptable",d[d.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",d[d.RequestTimeout=408]="RequestTimeout",d[d.Conflict=409]="Conflict",d[d.Gone=410]="Gone",d[d.LengthRequired=411]="LengthRequired",d[d.PreconditionFailed=412]="PreconditionFailed",d[d.RequestEntityTooLarge=413]="RequestEntityTooLarge",d[d.RequestUriTooLong=414]="RequestUriTooLong",d[d.UnsupportedMediaType=415]="UnsupportedMediaType",d[d.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",d[d.ExpectationFailed=417]="ExpectationFailed",d[d.MisdirectedRequest=421]="MisdirectedRequest",d[d.UnprocessableEntity=422]="UnprocessableEntity",d[d.UnprocessableContent=422]="UnprocessableContent",d[d.Locked=423]="Locked",d[d.FailedDependency=424]="FailedDependency",d[d.UpgradeRequired=426]="UpgradeRequired",d[d.PreconditionRequired=428]="PreconditionRequired",d[d.TooManyRequests=429]="TooManyRequests",d[d.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",d[d.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",d[d.InternalServerError=500]="InternalServerError",d[d.NotImplemented=501]="NotImplemented",d[d.BadGateway=502]="BadGateway",d[d.ServiceUnavailable=503]="ServiceUnavailable",d[d.GatewayTimeout=504]="GatewayTimeout",d[d.HttpVersionNotSupported=505]="HttpVersionNotSupported",d[d.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",d[d.InsufficientStorage=507]="InsufficientStorage",d[d.LoopDetected=508]="LoopDetected",d[d.NotExtended=510]="NotExtended",d[d.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",d))(st||{}),rt=(a=>(a[a.Sunday=0]="Sunday",a[a.Monday=1]="Monday",a[a.Tuesday=2]="Tuesday",a[a.Wednesday=3]="Wednesday",a[a.Thursday=4]="Thursday",a[a.Friday=5]="Friday",a[a.Saturday=6]="Saturday",a))(rt||{}),it=(r=>(r.Minutes="Minutes",r.Hours="Hours",r.Days="Days",r.Weeks="Weeks",r.Months="Months",r))(it||{}),ot=(n=>(n.Activity="Activity",n.Milestone="Milestone",n))(ot||{}),at=(n=>(n.Open="Open",n.Closed="Closed",n))(at||{}),dt=(s=>(s.None="None",s.MustStartOn="MustStartOn",s.MustFinishOn="MustFinishOn",s))(dt||{}),ut=(t=>(t.FinishToStart="FinishToStart",t.StartToStart="StartToStart",t.FinishToFinish="FinishToFinish",t.StartToFinish="StartToFinish",t))(ut||{}),lt=(t=>(t.Grid="grid",t.Board="board",t.Gantt="gantt",t.Planning="planning",t))(lt||{}),ct=(s=>(s.String="string",s.Numeric="numeric",s.DateTime="datetime",s))(ct||{}),ft=(t=>(t.Unknown="Unknown",t.String="string",t.Numeric="numeric",t.DateTime="datetime",t))(ft||{}),pt=(r=>(r.Unknown="Unknown",r.Sum="sum",r.Average="average",r.Max="max",r.Min="min",r))(pt||{}),ht=(u=>(u[u.Unknown=0]="Unknown",u[u.IsNull=1]="IsNull",u[u.IsNotNull=2]="IsNotNull",u[u.OneOf=4]="OneOf",u[u.Contains=8]="Contains",u[u.DoesNotContain=16]="DoesNotContain",u[u.StartsWith=32]="StartsWith",u[u.EndsWith=64]="EndsWith",u[u.Equals=128]="Equals",u[u.NotEqual=256]="NotEqual",u[u.GreaterThan=512]="GreaterThan",u[u.GreaterThanOrEqualTo=1024]="GreaterThanOrEqualTo",u[u.LessThan=2048]="LessThan",u[u.LessThanOrEqualTo=4096]="LessThanOrEqualTo",u[u.NotOneOf=8192]="NotOneOf",u[u.Between=16384]="Between",u))(ht||{}),Rt=(r=>(r.Month="month",r.Day="day",r.Week="week",r.Quarter="quarter",r.Year="year",r))(Rt||{}),mt=(s=>(s.Large="large",s.Medium="medium",s.Small="small",s))(mt||{}),gt=(r=>(r.Month="month",r.Day="day",r.Week="week",r.Quarter="quarter",r.Year="year",r))(gt||{}),yt=(s=>(s.Unknown="Unknown",s.Http="Http",s.Modal="Modal",s))(yt||{}),bt=(t=>(t.Unknown="Unknown",t.Action="Action",t.GroupLabel="GroupLabel",t.Divider="Divider",t))(bt||{}),Dt=(s=>(s.Unknown="Unknown",s.MultiSelectionMenu="MultiSelectionMenu",s.SelectionBar="SelectionBar",s))(Dt||{}),vt=(s=>(s.Unknown="Unknown",s.Edit="Edit",s.Read="Read",s))(vt||{}),Pt=(n=>(n.OnlyActivity="OnlyActivity",n.Subtree="Subtree",n))(Pt||{}),Ot=(u=>(u.Unknown="Unknown",u.IsNull="IsNull",u.IsNotNull="IsNotNull",u.OneOf="OneOf",u.Contains="Contains",u.DoesNotContain="DoesNotContain",u.StartsWith="StartsWith",u.EndsWith="EndsWith",u.Equals="Equals",u.NotEqual="NotEqual",u.GreaterThan="GreaterThan",u.GreaterThanOrEqualTo="GreaterThanOrEqualTo",u.LessThan="LessThan",u.LessThanOrEqualTo="LessThanOrEqualTo",u.NotOneOf="NotOneOf",u.Between="Between",u))(Ot||{}),G=class extends Error{static{f(this,"ApiException")}message;status;response;headers;result;constructor(e,n,s,t,r){super(),this.message=e,this.status=n,this.response=s,this.headers=t,this.result=r}isApiException=!0;static isApiException(e){return e.isApiException===!0}};function o(c,e,n,s,t){throw t??new G(c,e,n,s,null)}f(o,"throwException");var qe=class{static{f(this,"JarvisApiBaseClient")}constructor(){}},Te=class{constructor(e,n){this.jarvisToken=e;this.jarvisCallInfoHeader=n}static{f(this,"JarvisApiConfig")}};var h=class{static{f(this,"JarvisApiBase")}config;constructor(e){this.config=e}transformOptions=e=>{let{jarvisToken:n,jarvisCallInfoHeader:s}=this.config;return e.headers={...e.headers,...n&&{"jarvis-auth-token":n},...s&&{"X-Jarvis-Call-Info":s}},Promise.resolve(e)}},z=class extends h{static{f(this,"AccountV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getDetail(e,n){let s=this.baseUrl+"/accounts/api/public/account/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetDetail(i))}processGetDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/accounts/api/public/account/upsert?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Q=class extends h{static{f(this,"JarvisAppConfigurationV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getJarvisAppConfiguration(e){let n=this.baseUrl+"/api/public/jarvis-app-configuration/get?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetJarvisAppConfiguration(t))}processGetJarvisAppConfiguration(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},K=class extends h{static{f(this,"OutlookExtension1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}createFromMail(e,n){let s=this.baseUrl+"/api/v1/outlook-extension/create-from-mail?";e!=null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),n!=null&&n&&n.forEach((r,i)=>{for(let a in r)r.hasOwnProperty(a)&&(s+="form["+i+"]."+a+"="+encodeURIComponent(""+r[a])+"&")}),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processCreateFromMail(r))}processCreateFromMail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}test(e){let n=this.baseUrl+"/api/v1/outlook-extension/test?";e!=null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processTest(t))}processTest(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}};var X=class extends h{static{f(this,"AuthProxyV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}ping(e){let n=this.baseUrl+"/auth/api/public/proxy/ping?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processPing(t))}processPing(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}reportLoginEvent(e,n){let s=this.baseUrl+"/auth/api/public/proxy/report-login-event?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processReportLoginEvent(i))}processReportLoginEvent(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}suspendSignalr(e,n){let s=this.baseUrl+"/auth/api/public/proxy/suspend-signalr?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSuspendSignalr(i))}processSuspendSignalr(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}generateTemporaryToken(e,n){let s=this.baseUrl+"/auth/api/public/proxy/temporary-token?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGenerateTemporaryToken(i))}processGenerateTemporaryToken(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}validateAdCredentials(e,n){let s=this.baseUrl+"/auth/api/public/proxy/validate-ad-credentials?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processValidateAdCredentials(i))}processValidateAdCredentials(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}validateToken(e,n){let s=this.baseUrl+"/auth/api/public/proxy/validate-token?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processValidateToken(i))}processValidateToken(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Y=class extends h{static{f(this,"TeamsV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getById(e,n){let s=this.baseUrl+"/auth/api/public/teams/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetById(i))}processGetById(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}update(e,n){let s=this.baseUrl+"/auth/api/public/teams/update?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpdate(i))}processUpdate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},Z=class extends h{static{f(this,"UsersV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}current(e){let n=this.baseUrl+"/auth/api/public/users/current?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processCurrent(t))}processCurrent(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getEmails(e,n){let s=this.baseUrl+"/auth/api/public/users/get-emails?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetEmails(i))}processGetEmails(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchUsers(e,n){let s=this.baseUrl+"/auth/api/public/users/search-users?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchUsers(i))}processSearchUsers(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===403?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translateIdList(e,n){let s=this.baseUrl+"/auth/api/public/users/translate-id-list?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslateIdList(i))}processTranslateIdList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},H=class extends h{static{f(this,"AvatarV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getAvatar(e,n,s){let t=this.baseUrl+"/collaboration/api/public/avatar/{id}/{fullName}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fullName' must be defined.");if(t=t.replace("{fullName}",encodeURIComponent(""+s)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let r={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(t,i)).then(i=>this.processGetAvatar(i))}processGetAvatar(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}},ee=class extends h{static{f(this,"PropertiesV1Old1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}search(e,n){let s=this.baseUrl+"/collaboration/api/public/properties/definition/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDefinitions(e,n){let s=this.baseUrl+"/collaboration/api/public/properties/definitions-by-ids?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetDefinitions(i))}processGetDefinitions(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},P=class extends h{static{f(this,"ContactV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/contacts/api/public/contact/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/contacts/api/public/contact/upsert?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},te=class extends h{static{f(this,"DatasetV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}deleteItemsBlock(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/delete-items?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDeleteItemsBlock(i))}processDeleteItemsBlock(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsertDatasetByTypeOrId(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/detail/upsert?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsertDatasetByTypeOrId(i))}processUpsertDatasetByTypeOrId(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDatasetByTypeOrId(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/detail/{datasetIdOrDatasetType}?";if(n==null)throw new globalThis.Error("The parameter 'datasetIdOrDatasetType' must be defined.");if(s=s.replace("{datasetIdOrDatasetType}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetDatasetByTypeOrId(r))}processGetDatasetByTypeOrId(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getFacetFieldConfig(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/facet-config?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetFacetFieldConfig(i))}processGetFacetFieldConfig(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}itemInfo(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/item-info?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processItemInfo(i))}processItemInfo(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}itemInfoOmnisearch(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/item-info-omnisearchitem?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processItemInfoOmnisearch(i))}processItemInfoOmnisearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}listFacets(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/list/facets?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processListFacets(i))}processListFacets(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}listSearch(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/list/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processListSearch(i))}processListSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}saveItemsBlock(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/save-items?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSaveItemsBlock(i))}processSaveItemsBlock(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchGroupedItems(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/search-grouped-items?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchGroupedItems(i))}processSearchGroupedItems(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchItems(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/search-items?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchItems(i))}processSearchItems(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}truncateType(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/truncate?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTruncateType(i))}processTruncateType(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDatasetConfigById(e,n){let s=this.baseUrl+"/dataset/api/public/dataset/{id}/config?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetDatasetConfigById(r))}processGetDatasetConfigById(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ne=class extends h{static{f(this,"AcesV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getList(e){let n=this.baseUrl+"/dms/api/public/aces/list?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processGetList(t))}processGetList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getAce(e,n){let s=this.baseUrl+"/dms/api/public/aces/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetAce(r))}processGetAce(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},se=class extends h{static{f(this,"ContainerV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}createFromPath(e,n){let s=this.baseUrl+"/dms/api/public/container/create-from-path?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreateFromPath(i))}processCreateFromPath(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}pathExists(e,n){let s=this.baseUrl+"/dms/api/public/container/path-exist?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processPathExists(i))}processPathExists(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}get(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGet(r))}processGet(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}archiveContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/archive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processArchiveContainer(r))}processArchiveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}browseContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/browse?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processBrowseContainer(r))}processBrowseContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}createChildContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/create-child-container?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processCreateChildContainer(a))}processCreateChildContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}deleteContainer(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/delete?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDeleteContainer(r))}processDeleteContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}editContainerProperties(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/edit-properties?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processEditContainerProperties(a))}processEditContainerProperties(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getFullPath(e,n){let s=this.baseUrl+"/dms/api/public/container/{id}/full-path?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetFullPath(r))}processGetFullPath(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}moveContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/move?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processMoveContainer(a))}processMoveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}renameContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/rename?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processRenameContainer(a))}processRenameContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}unarchiveContainer(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/unarchive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUnarchiveContainer(a))}processUnarchiveContainer(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}updateCustomProperties(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/update-custom-properties?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUpdateCustomProperties(a))}processUpdateCustomProperties(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}updateContainerMetadata(e,n,s){let t=this.baseUrl+"/dms/api/public/container/{id}/update-metadata?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processUpdateContainerMetadata(a))}processUpdateContainerMetadata(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},re=class extends h{static{f(this,"DocumentTypeV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}list(e){let n=this.baseUrl+"/dms/api/public/document-type/list?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processList(t))}processList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ie=class extends h{static{f(this,"DocumentV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/dms/api/public/document/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}import(e,n){let s=this.baseUrl+"/dms/api/public/document/import?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processImport(i))}processImport(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}update(e,n){let s=this.baseUrl+"/dms/api/public/document/update?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpdate(i))}processUpdate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}preview(e,n,s,t){let r=this.baseUrl+"/dms/api/public/document/{documentId}/preview/{blobId}?";if(n==null)throw new globalThis.Error("The parameter 'documentId' must be defined.");if(r=r.replace("{documentId}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'blobId' must be defined.");if(r=r.replace("{blobId}",encodeURIComponent(""+s)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(r+="api-version="+encodeURIComponent(""+e)+"&"),t!=null&&(r+="size="+encodeURIComponent(""+t)+"&"),r=r.replace(/[?&]$/,"");let i={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(i).then(a=>this.http.fetch(r,a)).then(a=>this.processPreview(a))}processPreview(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}setMetadataValues(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{documentId}/set-metadata-values?";if(n==null)throw new globalThis.Error("The parameter 'documentId' must be defined.");if(t=t.replace("{documentId}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetMetadataValues(a))}processSetMetadataValues(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}get(e,n,s,t){let r=this.baseUrl+"/dms/api/public/document/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(r=r.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");if(e!==null&&(r+="api-version="+encodeURIComponent(""+e)+"&"),s===null)throw new globalThis.Error("The parameter 'history' cannot be null.");if(s!==void 0&&(r+="history="+encodeURIComponent(""+s)+"&"),t===null)throw new globalThis.Error("The parameter 'includeNestedFields' cannot be null.");t!==void 0&&(r+="includeNestedFields="+encodeURIComponent(""+t)+"&"),r=r.replace(/[?&]$/,"");let i={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(r,a)).then(a=>this.processGet(a))}processGet(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}addRevision(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/add-revision?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processAddRevision(a))}processAddRevision(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}approveRevision(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/approve-revision?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processApproveRevision(a))}processApproveRevision(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}archive(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/archive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processArchive(r))}processArchive(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}delete(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/delete?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDelete(r))}processDelete(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}download(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/download?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),s!=null&&(t+="fileName="+encodeURIComponent(""+s)+"&"),t=t.replace(/[?&]$/,"");let r={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(t,i)).then(i=>this.processDownload(i))}processDownload(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}downloadBlob(e,n,s,t,r){let i=this.baseUrl+"/dms/api/public/document/{id}/download/{fileIdOrBlobId}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(i=i.replace("{id}",encodeURIComponent(""+n)),s==null)throw new globalThis.Error("The parameter 'fileIdOrBlobId' must be defined.");if(i=i.replace("{fileIdOrBlobId}",encodeURIComponent(""+s)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(i+="api-version="+encodeURIComponent(""+e)+"&"),t!=null&&(i+="fileName="+encodeURIComponent(""+t)+"&"),r!=null&&(i+="format="+encodeURIComponent(""+r)+"&"),i=i.replace(/[?&]$/,"");let a={method:"GET",headers:{Accept:"application/octet-stream"}};return this.transformOptions(a).then(m=>this.http.fetch(i,m)).then(m=>this.processDownloadBlob(m))}processDownloadBlob(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}setAbstract(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-abstract?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetAbstract(a))}processSetAbstract(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}setTags(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-tags?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetTags(a))}processSetTags(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}setTitle(e,n,s){let t=this.baseUrl+"/dms/api/public/document/{id}/set-title?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(t=t.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(t+="api-version="+encodeURIComponent(""+e)+"&"),t=t.replace(/[?&]$/,"");let i={body:JSON.stringify(s),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(i).then(a=>this.http.fetch(t,a)).then(a=>this.processSetTitle(a))}processSetTitle(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}unarchive(e,n){let s=this.baseUrl+"/dms/api/public/document/{id}/unarchive?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processUnarchive(r))}processUnarchive(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},oe=class extends h{static{f(this,"PermalinkV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}create(e,n){let s=this.baseUrl+"/dms/api/public/permalink/create?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processCreate(i))}processCreate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}navigate(e,n){let s=this.baseUrl+"/dms/api/public/permalink/{id}?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processNavigate(r))}processNavigate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ae=class extends h{static{f(this,"SearchV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}search(e,n){let s=this.baseUrl+"/dms/api/public/search/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchByOwner(e,n){let s=this.baseUrl+"/dms/api/public/search/search-by-owner?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchByOwner(i))}processSearchByOwner(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},de=class extends h{static{f(this,"FileUploadV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}uploadMultipartV2(e,n){let s=this.baseUrl+"/system/api/public/files/2/upload-multipart?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t=new FormData;n?.forEach(i=>t.append("Files",i.data,i.fileName?i.fileName:"Files"));let r={body:t,method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUploadMultipartV2(i))}processUploadMultipartV2(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upload(e){let n=this.baseUrl+"/system/api/public/files/upload?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processUpload(t))}processUpload(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}uploadMultipart(e,n){let s=this.baseUrl+"/system/api/public/files/upload-multipart?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t=new FormData;n?.forEach(i=>t.append("Files",i.data,i.fileName?i.fileName:"Files"));let r={body:t,method:"POST",headers:{Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUploadMultipart(i))}processUploadMultipart(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},O=class extends h{static{f(this,"IdTranslationV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}testDeprecated(e){let n=this.baseUrl+"/system/api/public/idtranslation/testdeprecated?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processTestDeprecated(t))}processTestDeprecated(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}testDeprecatedFields(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/testdeprecatedfields?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTestDeprecatedFields(i))}processTestDeprecatedFields(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}testPreview(e){let n=this.baseUrl+"/system/api/public/idtranslation/testpreview?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(n+="api-version="+encodeURIComponent(""+e)+"&"),n=n.replace(/[?&]$/,"");let s={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(s).then(t=>this.http.fetch(n,t)).then(t=>this.processTestPreview(t))}processTestPreview(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translate(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/translate?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslate(i))}processTranslate(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}translateDictionary(e,n){let s=this.baseUrl+"/system/api/public/idtranslation/translate-dictionary?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processTranslateDictionary(i))}processTranslateDictionary(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ue=class extends h{static{f(this,"LongRunningJobPublicV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}getStatusDetail(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/detail?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetStatusDetail(r))}processGetStatusDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}startLongRunningJob(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/start?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processStartLongRunningJob(r))}processStartLongRunningJob(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getStatus(e,n){let s=this.baseUrl+"/system/api/public/lrj/{id}/status?";if(n==null)throw new globalThis.Error("The parameter 'id' must be defined.");if(s=s.replace("{id}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processGetStatus(r))}processGetStatus(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},x=class extends h{static{f(this,"PropertiesV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}search(e,n){let s=this.baseUrl+"/system/api/public/properties/definition/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getDefinitions(e,n){let s=this.baseUrl+"/system/api/public/properties/definitions-by-ids?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetDefinitions(i))}processGetDefinitions(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}searchSelection(e,n){let s=this.baseUrl+"/system/api/public/properties/search-selection?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearchSelection(i))}processSearchSelection(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},le=class extends h{static{f(this,"TicketV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detail(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetail(i))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}getAttachment(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/get-attachment?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/octet-stream"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetAttachment(i))}processGetAttachment(e){let n=e.status,s={};if(e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200||n===206){let t=e.headers?e.headers.get("content-disposition"):void 0,r=t?/filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(t):void 0,i=r&&r.length>1?r[3]||r[2]:void 0;return i?i=decodeURIComponent(i):(r=t?/filename="?([^"]*?)"?(;|$)/g.exec(t):void 0,i=r&&r.length>1?r[1]:void 0),e.blob().then(a=>({fileName:i,data:a,status:n,headers:s}))}else if(n!==200&&n!==204)return e.text().then(t=>l("An unexpected server error occurred.",n,t,s));return Promise.resolve(null)}getContentAsString(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/get-content?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processGetContentAsString(i))}processGetContentAsString(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/tickets/api/public/ticket/upsert?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},ce=class extends h{static{f(this,"WorkspaceV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}settings(e,n){let s=this.baseUrl+"/workspaces/api/public/workspace/{workspaceId}/settings?";if(n==null)throw new globalThis.Error("The parameter 'workspaceId' must be defined.");if(s=s.replace("{workspaceId}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processSettings(r))}processSettings(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}},fe=class extends h{static{f(this,"WorkTaskV1Client")}http;baseUrl;jsonParseReviver=void 0;constructor(e,n,s){super(e),this.http=s||globalThis,this.baseUrl=n??""}detailNew(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/detail?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetailNew(i))}processDetailNew(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detailList(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/detail-list?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processDetailList(i))}processDetailList(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}search(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/search?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processSearch(i))}processSearch(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}upsert(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/upsert?";if(e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let r={body:JSON.stringify(n),method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"}};return this.transformOptions(r).then(i=>this.http.fetch(s,i)).then(i=>this.processUpsert(i))}processUpsert(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}detail(e,n){let s=this.baseUrl+"/workspaces/api/public/worktask/{workTaskId}?";if(n==null)throw new globalThis.Error("The parameter 'workTaskId' must be defined.");if(s=s.replace("{workTaskId}",encodeURIComponent(""+n)),e===void 0)throw new globalThis.Error("The parameter 'api_version' must be defined.");e!==null&&(s+="api-version="+encodeURIComponent(""+e)+"&"),s=s.replace(/[?&]$/,"");let t={method:"GET",headers:{Accept:"application/json"}};return this.transformOptions(t).then(r=>this.http.fetch(s,r)).then(r=>this.processDetail(r))}processDetail(e){let n=e.status,s={};return e.headers&&e.headers.forEach&&e.headers.forEach((t,r)=>s[r]=t),n===200?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),r}):n===400?e.text().then(t=>{let r=null;return r=t===""?null:JSON.parse(t,this.jsonParseReviver),l("A server side error occurred.",n,t,s,r)}):n!==200&&n!==204?e.text().then(t=>l("An unexpected server error occurred.",n,t,s)):Promise.resolve(null)}};var pe=class extends Error{static{f(this,"ApiException")}message;status;response;headers;result;constructor(e,n,s,t,r){super(),this.message=e,this.status=n,this.response=s,this.headers=t,this.result=r}isApiException=!0;static isApiException(e){return e.isApiException===!0}};function l(c,e,n,s,t){throw t??new pe(c,e,n,s,null)}f(l,"throwException");var v=class extends Error{static{f(this,"AutomationApiException")}message;status;constructor(e,n){super(),this.message=e,this.status=n}};var I=class c{static{f(this,"ResponseDto")}ok=!0;json={};static create(e,n,s){let t=new c;return t.ok=e,t.json={body:n,errorMessage:s},t}},$=class{static{f(this,"AutomationClient")}baseUrl;workflowActivationBaseUrl;automationRoot;headers;fetchImpl;constructor(e={}){let n=(e.baseUrl??"").replace(/\/+$/,"");this.automationRoot=`${n}/automation`,this.baseUrl=`${this.automationRoot}/v1`,this.workflowActivationBaseUrl=`${this.automationRoot}/workflows`,this.headers={...e.token&&{"jarvis-auth-token":e.token},...e.callInfoHeader&&{"X-Jarvis-Call-Info":e.callInfoHeader}},this.fetchImpl=e.fetch}request(e,n={}){return this.send(`${this.automationRoot}/${e.replace(/^\//,"")}`,n)}async getWorkflowInstance(e){let n=`${this.baseUrl}/workflow-instances/${e}`,s=await this.fetchGet(n);if(s.status===200)return await s.json();throw new v(`Error getting workflow instance with id ${e}`,s.status)}async getWorkflowInstances(e){let{status:n,orderBy:s,pageSize:t,workflow:r}=e,i=`${this.baseUrl}/workflow-instances?orderBy=${s}&pageSize=${t}&workflow=${r}`;n&&(i+=`&status=${n}`);let a=await this.fetchGet(i);if(a.status===200)return await a.json();throw new v("Error getting workflow instances",a.status)}async dispatchSignal(e,n){let s=`${this.baseUrl}/signals/${e}/dispatch`,t={input:n},r=await this.fetchPost(s,t);if(r.status===200)return await r.json();throw new v("Error dispatching signal",r.status)}async triggerWorkflow(e,n,s){let t=`${this.workflowActivationBaseUrl}/${n.replace(/^\//,"")}`;try{if(!s&&e==="POST")return I.create(!1,void 0,"Missing post body");let r;e==="POST"?r=await this.fetchPost(t,s):r=await this.fetchGet(t,s||void 0);let i=await r.json();return I.create(r.ok,i,i.errorMessage)}catch(r){return console.error(r),I.create(!1,void 0,r?.message??"Unknown error")}}async fetchGet(e,n){let s=n?`?${new URLSearchParams(n).toString()}`:"";return this.send(`${e}${s}`,{method:"GET"})}async fetchPost(e,n){return this.send(e,{method:"POST",headers:{"Content-Type":"application/json"},body:n?JSON.stringify(n):void 0})}send(e,n){let s=n;if(Object.keys(this.headers).length){let t={};new Headers(n.headers).forEach((r,i)=>{t[i]=r}),s={...n,headers:{...t,...this.headers}}}return this.fetchImpl?this.fetchImpl(e,s):fetch(e,s)}};var he=class c{constructor(e="it-IT"){this._locale=e}static{f(this,"Formatters")}static longDate={weekday:"long",year:"numeric",month:"long",day:"numeric"};static shortDate={year:"numeric",month:"numeric",day:"numeric"};dateTime=(e,n)=>new Intl.DateTimeFormat(this._locale,n||c.shortDate).format(e);toAPIDateOnly=e=>[e.getFullYear(),(e.getMonth()+1).toString().padStart(2,"0"),e.getDate().toString().padStart(2,"0")].join("")},Re=class{constructor(e,n,s,t){this.root=e;this.token=n;this.callInfo=s;this.root=e||"",this.token=n,this.callInfo=s,this.http=t?{fetch:(r,i)=>t(r,i)}:void 0,this.root.endsWith("/")&&(this.root=this.root.substring(0,this.root.length-1)),this.format=new he}static{f(this,"JarvisClient")}format;http;createAutomationClient=e=>new $({baseUrl:this.root,token:this.token,callInfoHeader:e??this.callInfo,fetch:this.http?.fetch});isLocalHost(){return this.root.indexOf("localhost")>-1||this.root.indexOf("127.0.0.1")>-1}createTicketClient=e=>new R(M,this.root,this.token,e??this.callInfo).createClient(this.http);createWorkspaceClient=e=>new R(L,this.root,this.token,e??this.callInfo).createClient(this.http);createWorkspacePlanningClient=e=>new R(F,this.root,this.token,e??this.callInfo).createClient(this.http);createWorkTaskClient=e=>new R(B,this.root,this.token,e??this.callInfo).createClient(this.http);createDatasetClient=e=>new R(T,this.root,this.token,e??this.callInfo).createClient(this.http);createDocumentClient=e=>new R(w,this.root,this.token,e??this.callInfo).createClient(this.http);createContainerClient=e=>new R(A,this.root,this.token,e??this.callInfo).createClient(this.http);createDocumentTypeClient=e=>new R(E,this.root,this.token,e??this.callInfo).createClient(this.http);createDmsSearchClient=e=>new R(U,this.root,this.token,e??this.callInfo).createClient(this.http);createUsersClient=e=>new R(S,this.root,this.token,e??this.callInfo).createClient(this.http);createFileUploadClient=e=>new R(J,this.root,this.token,e??this.callInfo).createClient(this.http);createContactV1Client=e=>new R(P,this.root,this.token,e??this.callInfo).createClient(this.http);createContactV2Client=e=>new R(q,this.root,this.token,e??this.callInfo).createClient(this.http);createAccountV2Client=e=>new R(C,this.root,this.token,e??this.callInfo).createClient(this.http);createPropertiesClient=e=>new R(W,this.root,this.token,e??this.callInfo).createClient(this.http);createFieldsClient=e=>new R(N,this.root,this.token,e??this.callInfo).createClient(this.http);createPropertiesV1Client=e=>new R(x,this.root,this.token,e??this.callInfo).createClient(this.http);createIdTranslationV1Client=e=>new R(O,this.root,this.token,e??this.callInfo).createClient(this.http);createLongRunningJobClient=e=>new R(V,this.root,this.token,e??this.callInfo).createClient(this.http);createTaskTypeV2Client=e=>new R(_,this.root,this.token,e??this.callInfo).createClient(this.http);createAvatarClient=e=>new R(k,this.root,this.token,e??this.callInfo).createClient(this.http);createIntegrationClient=e=>new R(j,this.root,this.token,e??this.callInfo).createClient(this.http)},R=class{constructor(e,n,s,t){this.clientType=e;this.baseUrl=n;this.token=s;this.jarvisCallInfoHeader=t}static{f(this,"JarvisTsClient")}createClient(e){return new this.clientType({jarvisToken:this.token,jarvisCallInfoHeader:this.jarvisCallInfoHeader},this.baseUrl,e)}},Ae=class c{static{f(this,"Jarvis")}static CreateClient=(e,n,s)=>new Re(e,n,s?.callInfoHeader,s?.fetch);static Autodiscover=(e,n,s)=>(n=n||window.location,n.hostname==="localhost"||n.hostname==="127.0.0.1"?c.CreateDevClient(e,s):c.ConnectTo(n,e?.token,s));static CreateDevClient=(e,n)=>c.CreateClient(e?.url??JARVIS_URI,e?.token??token,n);static ConnectTo=(e,n,s)=>{let t=e.hostname,r=e.port,i=e.protocol;return c.CreateClient(`${i}//${t}:${r}`,n,s)}};var D="JARVIS_EVENT",Ue=(u=>(u.Navigate="navigate",u.NavigateById="navigateById",u.ReloadById="reloadById",u.OpenDetail="openDetail",u.ShowToast="showToast",u.ShowDialog="showDialog",u.ShowDialogResponse="showDialogResponse",u.Subscription="subscription",u.Notification="notification",u.GetConfiguration="getConfiguration",u.ConfigurationResponse="configurationResponse",u.ShowContextMenu="showContextMenu",u.ShowContextMenuResponse="showContextMenuResponse",u.DeleteItem="deleteItem",u.CloneItem="cloneItem",u.EditItem="editItem",u))(Ue||{}),xt=(t=>(t.Open="open",t.Edit="edit",t.Delete="delete",t.Clone="clone",t))(xt||{});var Ee=class{static{f(this,"JarvisShell")}_targetOrigin="*";INIT_ERROR_MESSAGE=`JarvisShell not initialized correctly. Some functions may not work correctly.
2
+ Please initialize it before using it, e.g.:
3
+ const jarvisShell = new JarvisShell();
4
+ jarvisShell.init(() => /* do stuff */);
5
+
6
+ `;subscriptions={};dialogCallbacks={};contextMenuCallbacks={};configuration=null;tempConfigSubscription=null;htmlElement=null;constructor(){this.subscriptions={},window.parent===window?(window.addEventListener(`${D}:${"configurationResponse"}`,e=>{let n=e;this.reactToMessage(n?.detail)}),window.addEventListener(`${D}:${"notification"}`,e=>{let n=e;this.reactToMessage(n?.detail)}),window.addEventListener(`${D}:${"showDialogResponse"}`,e=>{let n=e;this.reactToMessage(n?.detail)}),window.addEventListener(`${D}:${"showContextMenuResponse"}`,e=>{let n=e;this.reactToMessage(n?.detail)})):window.addEventListener("message",e=>{this.reactToMessage(e?.data)})}reactToMessage(e){if(e.kind==="configurationResponse"){let n=e.data;this.tempConfigSubscription!=null&&(this.tempConfigSubscription(n),this.tempConfigSubscription=null)}if(e.kind==="notification"){let n=e.data,s=this.subscriptions[n.notification.event];s&&s(n.notification)}if(e.kind==="showDialogResponse"){let n=e.data,s=this.dialogCallbacks[n.id];s&&(s(n.response),delete this.dialogCallbacks[n.id])}if(e.kind==="showContextMenuResponse"){let n=e.data,s=this.contextMenuCallbacks[n.requestId];s&&(s(n.actionId,n.contextData),delete this.dialogCallbacks[n.requestId])}}init(e,n=null){this.htmlElement=n,this.getConfiguration(s=>{this.configuration=s,e(this,s)})}on=(e,n)=>{if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else{if(!this.configuration?.capabilities.includes("subscription"))throw new Error(`${"subscription"} capability not supported by this host`);let[s,...t]=e.split(".");this.configuration?.events[s]?.includes(e)||console.warn(`${"subscription"} for event ${e} is not supported by this host.`)}this.sendMessage({kind:"subscription",data:{event:e}}),this.subscriptions[e]=n};getConfiguration=e=>{this.tempConfigSubscription=e,this.sendMessage({kind:"getConfiguration",data:{}})};openDetail(e){if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("openDetail"))throw new Error(`${"openDetail"} capability not supported by this host`);let n={id:e};this.sendMessage({kind:"openDetail",data:n})}navigate(e,n,s){if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("openDetail"))throw new Error(`${"openDetail"} capability not supported by this host`);let t={url:e,openNewTab:n,external:s};this.sendMessage({kind:"navigate",data:t})}navigateById(e,n,s){if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("navigateById"))throw new Error(`${"navigateById"} capability not supported by this host`);let t={id:e,parentId:n,openNewTab:s};this.sendMessage({kind:"navigateById",data:t})}showToast=(e,n,s)=>{if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("showToast"))throw new Error(`${"showToast"} capability not supported by this host`);let t={title:e,message:n,kind:s};this.sendMessage({kind:"showToast",data:t})};showDialog=(e,n)=>{if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("showDialog"))throw new Error(`${"showDialog"} capability not supported by this host`);let s=Math.random().toString()+new Date().getTime().toString(),t={id:s,kind:e.kind,subtitle:e.subtitle,title:e.title,body:e.body,isDanger:e.isDanger};this.sendMessage({kind:"showDialog",data:t}),this.dialogCallbacks[s]=n};showContextMenu=(e,n,s)=>{if(!this.configuration)console.error(this.INIT_ERROR_MESSAGE);else if(!this.configuration?.capabilities.includes("showContextMenu"))throw new Error(`${"showContextMenu"} capability not supported by this host`);let t=Math.random().toString()+new Date().getTime().toString(),r={x:e.x,y:e.y,requestId:t,entries:n};this.sendMessage({kind:"showContextMenu",data:r}),this.contextMenuCallbacks[t]=s};sendMessage(e){window.parent===window?this.htmlElement?.dispatchEvent(new CustomEvent(`${D}:message_from_web_component`,{bubbles:!0,composed:!0,detail:{id:D,kind:e.kind,data:e.data}})):window.parent?.postMessage({id:D,kind:e.kind,data:e.data},this._targetOrigin)}};export{z as AccountV1Client,C as AccountV2Client,ne as AcesV1Client,De as AcesV2Client,Je as AnswerType,G as ApiException,X as AuthProxyV1Client,ye as AuthProxyV2Client,v as AutomationApiException,$ as AutomationClient,H as AvatarV1Client,k as AvatarV2Client,Ie as ChatV2Client,P as ContactV1Client,q as ContactV2Client,se as ContainerV1Client,A as ContainerV2Client,te as DatasetV1Client,T as DatasetV2Client,rt as DayOfWeek,U as DmsSearchV2Client,re as DocumentTypeV1Client,E as DocumentTypeV2Client,ie as DocumentV1Client,w as DocumentV2Client,it as DueDateReminderUnit,Ze as EContainerChildInfo,Ve as ETicketListRequestType,ht as FieldFilterPublicType,Ot as FieldFilterPublicType2,Fe as FieldFilterType,nt as FileFormat,ve as FileManipulatorV2Client,de as FileUploadV1Client,J as FileUploadV2Client,_e as FilteringLogic,he as Formatters,Rt as GantZoomLevels,Be as GroupOmniSearchAggregationType,st as HttpStatusCode,O as IdTranslationV1Client,Se as IdTranslationV2Client,Ce as IdentitiesManagerV2Client,j as IntegrationV2Client,D as JARVIS_COMMAND_EVENT_ID,Ae as Jarvis,dt as JarvisActivityConstraintTypePublic,p as JarvisApiBase,qe as JarvisApiBaseClient,Te as JarvisApiConfig,Q as JarvisAppConfigurationV1Client,me as JarvisAppConfigurationV2Client,Re as JarvisClient,xt as JarvisExternalContextMenuAction,Ue as JarvisExternalMessageKind,tt as JarvisFieldType,N as JarvisFieldsV2Client,ut as JarvisProjectActivityLinkTypePublic,at as JarvisProjectActivityStatusPublic,ot as JarvisProjectActivityTypePublic,Ee as JarvisShell,R as JarvisTsClient,ke as LoggerV2Client,ue as LongRunningJobPublicV1Client,V as LongRunningJobPublicV2Client,Qe as OmniSearchFieldCellTemplate,ze as OmniSearchItemConfigurationFilterColumnTemplate,Ge as OmniSearchItemConfigurationFilterStrategy,$e as OmniSearchItemGridColumnDataType,Le as OmniSearchItemPropertyType,mt as OmnisearchItemSize,K as OutlookExtension1Client,oe as PermalinkV1Client,Pe as PermalinkV2Client,Pt as PlanningCopyModePublic,gt as PlanningZoomLevels,x as PropertiesV1Client,ee as PropertiesV1Old1Client,W as PropertiesV2Client,Ye as PropertyDefinitionReferenceFlags,He as ProtocolNumberType,vt as PublicActionPermission,Dt as PublicActionSurface,yt as PublicCtaType,bt as PublicDropDownItemType,je as PublicFilteringLogic,ge as PublicNotificationClient,Ke as PublicOmniSearchViewDisplayMode,ct as PublicSearchableDataType,pt as PublicWorkspaceAggregationType,ft as PublicWorkspaceItemPropertyType,Xe as RequiredProtocolNumberCopyPolicy,I as ResponseDto,Ne as ResponseLogSeverity,et as SearchResultFacetType,ae as SearchV1Client,Oe as SearchV2Client,We as SearchableDataType,Me as SearchableDataType2,_ as TaskTypeV2Client,Y as TeamsV1Client,be as TeamsV2Client,le as TicketV1Client,M as TicketV2Client,Z as UsersV1Client,S as UsersV2Client,xe as WorkCalendarV2Client,fe as WorkTaskV1Client,B as WorkTaskV2Client,F as WorkspacePlanningV2Client,lt as WorkspacePublicViewDisplayMode,ce as WorkspaceV1Client,L as WorkspaceV2Client};