@semantha/sdk 11.5.0 → 11.6.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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import m from'axios';import*as ye from'fs';var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Fe(r){return Ce.includes(r)}var Te=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return Te.includes(r)}var Pe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Xe(r){return Pe.includes(r)}var Oe=["DELETE","INSERT","EQUAL"];function We(r){return Oe.includes(r)}var ge=["sentence","paragraph"];function qe(r){return ge.includes(r)}var De=["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","CONTENT_TOO_LARGE","INTERNAL_SERVER_ERROR","GATEWAY_TIMEOUT","DOCUMENTTYPE_NOT_FOUND","DOCUMENTTYPE_NAME_EXISTS","DOCUMENTTYPE_NOT_EDITABLE","COMPARE_DOC_IS_EMPTY","COMPARE_WRONG_LANGUAGE","COMPARE_NO_REFERENCES","DOMAIN_NOT_FOUND","TOO_MANY_TOKENS","NO_FILE_FOUND","FILE_TYPE_NOT_SUPPORTED","FILE_PASSWORDPROTECTED","MISSING_SERVICE_DEFINITION","SERVICE_CALL_ERROR","GENERATIVE_MODEL_ERROR","USED_AS_LINKED_EXTRACTOR","CYCLICAL_DEPENDENCY_LINKED_EXTRACTOR","FILE_TOO_BIG","TOO_MANY_ROWS","REGEX_INVALID","GENERATIVE_MODEL_CONTEXT_EXCEEDED","PROMPT_NOT_DELETABLE","JPEG2000_NOT_SUPPORTED","TRANSLATION_ERROR","RESOURCE_NOT_FOUND","PARENT_RESOURCE_NOT_FOUND","RESOURCE_PARAMETER_CONSTRAINT_VIOLATION","PLATFORM_UNREACHABLE","FILE_SIZE_TOOBIG","USER_REPOSITORY_NOT_CONFIGURED","PDF_NOT_CONFIGURED","INVALID_USER_PASSWORD","UNKNOWN_FINGERPRINTER_ID","JSON_ARRAY_EMPTY","TOKENS_ILLEGAL_TYPE","NO_JSON","INVALID_JSON_FORMAT","JSON_OBJECT_HAS_NO_DOCUMENTS","DOCUMENTS_ARE_NO_JSON_ARRAY","DOCUMENTS_JSON_ARRAY_EMPTY","DOCUMENTS_VALUE_ERROR","DOCUMENTS_TYPE_ERROR","DOCUMENTS_TOO_FEW_DOCUMENTS","REQ_NO_JSON_ARRAY","SENTENCE_LIST_NOT_TWO","IMAGE_NOT_PROVIDED","IMAGE_INVALID_FORMAT","MODEL_NAME_INVALID","THRESHOLD_INVALID","IMAGE_BUFFER_EMPTY","INVALID_MODEL_ID","IMAGE_NOT_PROVIDED_IFP","IMAGE_INVALID_DATA","IMAGE_INVALID_FORMAT_IFP"];function je(r){return De.includes(r)}var Ie=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ke(r){return Ie.includes(r)}var xe=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function tr(r){return xe.includes(r)}var Re=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function rr(r){return Re.includes(r)}var ve=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function ir(r){return ve.includes(r)}var we=["USER","ASSISTANT","SYSTEM"];function sr(r){return we.includes(r)}var Me=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto","fingerprint_exact","document_fingerprint_exact"];function pr(r){return Me.includes(r)}var Se=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function mr(r){return Se.includes(r)}var be=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function Nr(r){return be.includes(r)}var Ae=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function Er(r){return Ae.includes(r)}var _e=["OPERATOR","FUNCTION"];function hr(r){return _e.includes(r)}var He=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto","fingerprint_exact","document_fingerprint_exact"];function fr(r){return He.includes(r)}var Be=["ANY","TOP1","TOP3","TOP5","TOP10"];function Tr(r){return Be.includes(r)}var Je=["TOP1","TOP3","TOP5","TOP10"];function Or(r){return Je.includes(r)}var Le=["SHORT","MEDIUM","LONG"];function Dr(r){return Le.includes(r)}var Ve=["similarity","extraction"];function xr(r){return Ve.includes(r)}var l=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let o=e.match(/filename="?([^"]+)"?/);o&&o[1]&&(i=o[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var n=(s=>(s.JSON="application/json",s.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",s.PDF="application/pdf",s.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",s.ZIP="application/zip",s.REQIFZ="application/reqifz",s.PNG="image/png",s.BINARY="application/octet-stream",s.TEXT_PLAIN="text/plain",s))(n||{}),p=class r{constructor(t,e,i,o,a){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=o;this.tokenUrl=a;this.expireTime=0,this.accessToken="",this.skipAuthHeader=!!t&&!(e||i||o||a);}static LEEWAY=30;expireTime;accessToken;skipAuthHeader;async buildHeadersForJsonRequest(){return this.skipAuthHeader?{Accept:"application/json"}:{Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return this.skipAuthHeader?{}:{Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let t={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await m.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=m.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-r.LEEWAY);}return this.accessToken}async request(t,e,i){if(!i.headers)i.headers=await this.buildHeadersForJsonRequest();else {let o=await this.buildHeadersForRequest();i.headers={...i.headers,...o};}return new l(m.request({method:t,url:this.serverUrl+e,headers:{...i.headers,"User-Agent":"semantha TypeScript SDK; "},data:i.data,params:i.params,responseType:i.responseType}))}async get(t,e,i,o,a="json"){return this.request("GET",t,{params:e,headers:i,data:o,responseType:a})}async post(t,e,i,o,a="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let ue=await this.buildHeadersForRequest();i={...i,...ue};}return new l(m.post(this.serverUrl+t,o,{params:e,headers:i,responseType:a}))}async delete(t,e,i){return this.request("DELETE",t,{data:e,params:i})}async patch(t,e){return this.request("PATCH",t,{data:e})}async put(t,e){return this.request("PUT",t,{data:e})}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new E(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var f=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new u(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}dataproperties(){return new y(this.restClient,this.ENDPOINT)}instances(){return new f(this.restClient,this.ENDPOINT)}metadata(){return new C(this.restClient,this.ENDPOINT)}namedentities(){return new T(this.restClient,this.ENDPOINT)}rules(){return new P(this.restClient,this.ENDPOINT)}stopwords(){return new O(this.restClient,this.ENDPOINT)}synonyms(){return new g(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var w=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var S=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new R(this.restClient,this.ENDPOINT)}documenttypes(){return new v(this.restClient,this.ENDPOINT)}referencedocuments(){return new w(this.restClient,this.ENDPOINT)}references(){return new M(this.restClient,this.ENDPOINT)}};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new S(this.restClient,this.ENDPOINT,t):new N(this.restClient,this.ENDPOINT)}model(){return new x(this.restClient,this.ENDPOINT)}};var A=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/celltypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var _=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/chats/${this.id}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var H=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var B=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var J=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clone";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var L=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toFile()}};var V=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new V(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var k=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/diff";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var U=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/customfields";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var G=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var X=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new X(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var W=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentannotations";}ENDPOINT;async postAsDocx(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),t)).toFile()}};var $=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documentclasses/${this.id}`;}ENDPOINT;customfields(){return new U(this.restClient,this.ENDPOINT)}documentclasses(){return new G(this.restClient,this.ENDPOINT)}referencedocuments(){return new Y(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tree";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;tree(){return new q(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var j=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png"),t)).toFile()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz"),t)).toFile()}};var Q=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new J(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var K=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelinstances";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}};var et=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/prompts/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;validation(){return new rt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var it=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"),null,"blob")).toFile()}};var ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var st=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/markdown";}ENDPOINT;async getAsPlainText(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("text/plain"))).toModel()}};var at=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/paragraphs/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var lt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var dt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentid=i;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new it(this.restClient,this.ENDPOINT,t):new ot(this.restClient,this.ENDPOINT)}markdown(){return new st(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new at(this.restClient,this.ENDPOINT,t):new pt(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new lt(this.restClient,this.ENDPOINT,t):new mt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var ut=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stream";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/statistic";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;namedentities(){return new Nt(this.restClient,this.ENDPOINT)}statistic(){return new Et(this.restClient,this.ENDPOINT)}stream(){return new ut(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toFile()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf"),t)).toFile()}};var yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/settings";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/summarizations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var Tt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.tagname=i;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new Ct(this.restClient,this.ENDPOINT)}};var Pt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/texttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var gt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/translations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var It=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new d(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new _(this.restClient,this.ENDPOINT,t):new H(this.restClient,this.ENDPOINT)}documentannotations(){return new W(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new $(this.restClient,this.ENDPOINT,t):new z(this.restClient,this.ENDPOINT)}documents(){return new j(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new Q(this.restClient,this.ENDPOINT,t):new K(this.restClient,this.ENDPOINT)}modelclasses(){return new Z(this.restClient,this.ENDPOINT)}modelinstances(){return new tt(this.restClient,this.ENDPOINT)}prompts(t){return t!=null?new et(this.restClient,this.ENDPOINT,t):new nt(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new dt(this.restClient,this.ENDPOINT,t):new ct(this.restClient,this.ENDPOINT)}references(){return new ht(this.restClient,this.ENDPOINT)}settings(){return new yt(this.restClient,this.ENDPOINT)}summarizations(){return new ft(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new Tt(this.restClient,this.ENDPOINT,t):new Pt(this.restClient,this.ENDPOINT)}texttypes(){return new Ot(this.restClient,this.ENDPOINT)}translations(){return new gt(this.restClient,this.ENDPOINT)}validation(){return new Dt(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var xt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/info";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/languages";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var wt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/datatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var St=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/boostwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var bt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var At=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var _t=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/dataproperties/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ht=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new B(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Bt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractors";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/formatters";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/namedentities/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ut=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/objectproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Gt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/metadata/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Xt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/regexes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/regexes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Wt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/relations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var $t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/relations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var qt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/rules/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var zt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rulefunctions";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Qt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/stopwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Kt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/synonyms/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var te=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ee=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/attributes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var re=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var ie=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new ee(this.restClient,this.ENDPOINT,t):new re(this.restClient,this.ENDPOINT)}instances(){return new ne(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var oe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var se=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/instances/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ae=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var pe=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new Mt(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new St(this.restClient,this.ENDPOINT,t):new bt(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new ie(this.restClient,this.ENDPOINT,t):new oe(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new _t(this.restClient,this.ENDPOINT,t):new At(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new Ht(this.restClient,this.ENDPOINT,t):new Bt(this.restClient,this.ENDPOINT)}extractors(){return new Jt(this.restClient,this.ENDPOINT)}formatters(){return new Lt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new se(this.restClient,this.ENDPOINT,t):new ae(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new Gt(this.restClient,this.ENDPOINT,t):new Vt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new kt(this.restClient,this.ENDPOINT,t):new Ft(this.restClient,this.ENDPOINT)}objectproperties(){return new Ut(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Xt(this.restClient,this.ENDPOINT,t):new Yt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new Wt(this.restClient,this.ENDPOINT,t):new $t(this.restClient,this.ENDPOINT)}rulefunctions(){return new zt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new qt(this.restClient,this.ENDPOINT,t):new jt(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new Qt(this.restClient,this.ENDPOINT,t):new Kt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new Zt(this.restClient,this.ENDPOINT,t):new te(this.restClient,this.ENDPOINT)}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var le=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var me=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractortypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var de=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadatatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new wt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new pe(this.restClient,this.ENDPOINT,t):new le(this.restClient,this.ENDPOINT)}extractortypes(){return new me(this.restClient,this.ENDPOINT)}metadatatypes(){return new de(this.restClient,this.ENDPOINT)}};var ce="/api/v3",he=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t),e),ce)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t)),ce)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new p(t,void 0,e,i,o),ce)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=ye.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(Ee=>Ee.length!==0).map(Ee=>Ee.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),a=this.getValueOfInPropertiesFile("clientId",i),ue=this.getValueOfInPropertiesFile("clientSecret",i),fe=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,a,ue,fe)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-platform-server"):t.endsWith("/tt-platform-server")||(t+="/tt-platform-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new b(this.restClient,this.endpoint())}celltypes(){return new A(this.restClient,this.endpoint())}conversions(){return new L(this.restClient,this.endpoint())}currentuser(){return new F(this.restClient,this.endpoint())}diff(){return new k(this.restClient,this.endpoint())}domains(t){return t!=null?new It(this.restClient,this.endpoint(),t):new xt(this.restClient,this.endpoint())}info(){return new Rt(this.restClient,this.endpoint())}languages(){return new vt(this.restClient,this.endpoint())}model(){return new Ne(this.restClient,this.endpoint())}};export{d as AnswersEndpoint,Ce as AttributeDatatypeEnumValues,Te as AttributeOverviewDatatypeEnumValues,N as BulkDomainsEndpoint,b as BulkEndpoint,x as BulkModelEndpoint,R as BulkdomainsDocumentclassesEndpoint,v as BulkdomainsDocumenttypesEndpoint,S as BulkdomainsDomainEndpoint,w as BulkdomainsReferencedocumentsEndpoint,M as BulkdomainsReferencesEndpoint,u as BulkmodelBoostwordsEndpoint,c as BulkmodelClassEndpoint,h as BulkmodelClassesEndpoint,y as BulkmodelDatapropertiesEndpoint,D as BulkmodelDomainEndpoint,I as BulkmodelDomainsEndpoint,f as BulkmodelInstancesEndpoint,C as BulkmodelMetadataEndpoint,T as BulkmodelNamedentitiesEndpoint,P as BulkmodelRulesEndpoint,O as BulkmodelStopwordsEndpoint,g as BulkmodelSynonymsEndpoint,E as BulkmodelclassInstancesEndpoint,A as CelltypesEndpoint,_ as ChatEndpoint,H as ChatsEndpoint,B as ChildExtractorclassesEndpoint,Pe as ClassBulkDatatypeEnumValues,J as CloneEndpoint,L as ConversionsEndpoint,F as CurrentuserEndpoint,k as DiffEndpoint,Oe as DifferenceOperationEnumValues,U as DocclassCustomfieldsEndpoint,G as DocclassDocumentclassesEndpoint,Y as DocclassReferencedocumentsEndpoint,X as DocclassTagsEndpoint,W as DocumentannotationsEndpoint,$ as DocumentclassEndpoint,z as DocumentclassesEndpoint,ge as DocumentmodeEnumValues,j as DocumentsEndpoint,Q as DocumenttypeEndpoint,K as DocumenttypesEndpoint,It as DomainEndpoint,xt as DomainsEndpoint,De as ErrorFieldCodeEnumValues,Ie as ExtractorAttributeDatatypeEnumValues,xe as ExtractorTypeEnumValues,Re as FieldTypeEnumValues,it as ImageEndpoint,ot as ImagesEndpoint,Rt as InfoEndpoint,vt as LanguagesEndpoint,st as MarkdownEndpoint,ve as MatcherTypeEnumValues,n as MediaType,we as MessageRoleEnumValues,Me as ModeEnumValues,Mt as ModelAttributesEndpoint,St as ModelBoostwordEndpoint,bt as ModelBoostwordsEndpoint,At as ModelDatapropertiesEndpoint,_t as ModelDatapropertyEndpoint,wt as ModelDatatypesEndpoint,pe as ModelDomainEndpoint,le as ModelDomainsEndpoint,Ne as ModelEndpoint,Ht as ModelExtractorclassEndpoint,Bt as ModelExtractorclassesEndpoint,Jt as ModelExtractorsEndpoint,me as ModelExtractortypesEndpoint,Lt as ModelFormattersEndpoint,Vt as ModelMetadataEndpoint,de as ModelMetadatatypesEndpoint,Ft as ModelNamedentitiesEndpoint,kt as ModelNamedentityEndpoint,Ut as ModelObjectpropertiesEndpoint,Gt as ModelOnemetadataEndpoint,Xt as ModelRegexEndpoint,Yt as ModelRegexesEndpoint,Wt as ModelRelationEndpoint,$t as ModelRelationsEndpoint,qt as ModelRuleEndpoint,zt as ModelRulefunctionsEndpoint,jt as ModelRulesEndpoint,Qt as ModelStopwordEndpoint,Kt as ModelStopwordsEndpoint,Zt as ModelSynonymEndpoint,te as ModelSynonymsEndpoint,Z as ModelclassesEndpoint,tt as ModelinstancesEndpoint,ee as ModelontAttributeEndpoint,re as ModelontAttributesEndpoint,ie as ModelontClassEndpoint,oe as ModelontClassesEndpoint,se as ModelontInstanceEndpoint,ae as ModelontInstancesEndpoint,ne as ModelontclassInstancesEndpoint,Nt as NamedentitiesEndpoint,at as ParagraphEndpoint,pt as ParagraphsEndpoint,et as PromptEndpoint,Se as PromptLabelEnumValues,be as PromptOverviewPromptLabelEnumValues,Ae as PromptPromptLabelEnumValues,rt as PromptValidationEndpoint,nt as PromptsEndpoint,dt as ReferencedocumentEndpoint,ct as ReferencedocumentsEndpoint,ut as ReferencedocumentsStreamEndpoint,ht as ReferencesEndpoint,p as RestClient,l as RestResponse,V as RolesEndpoint,_e as RuleFunctionTypeEnumValues,he as SemanthaAPI,lt as SentenceEndpoint,mt as SentencesEndpoint,He as SettingsDefaultSimilarityModeEnumValues,yt as SettingsEndpoint,Be as SettingsExtractionStrategyEnumValues,Je as SettingsTaggingStrategyEnumValues,Et as StatisticEndpoint,ft as SummarizationsEndpoint,Le as SummarylengthEnumValues,Tt as TagEndpoint,Ct as TagReferencedocumentsEndpoint,Pt as TagsEndpoint,Ot as TexttypesEndpoint,gt as TranslationsEndpoint,q as TreeEndpoint,Ve as TypeEnumValues,Dt as ValidationEndpoint,Fe as isAttributeDatatypeEnumValue,Ue as isAttributeOverviewDatatypeEnumValue,Xe as isClassBulkDatatypeEnumValue,We as isDifferenceOperationEnumValue,qe as isDocumentmodeEnumValue,je as isErrorFieldCodeEnumValue,Ke as isExtractorAttributeDatatypeEnumValue,tr as isExtractorTypeEnumValue,rr as isFieldTypeEnumValue,ir as isMatcherTypeEnumValue,sr as isMessageRoleEnumValue,pr as isModeEnumValue,mr as isPromptLabelEnumValue,Nr as isPromptOverviewPromptLabelEnumValue,Er as isPromptPromptLabelEnumValue,hr as isRuleFunctionTypeEnumValue,fr as isSettingsDefaultSimilarityModeEnumValue,Tr as isSettingsExtractionStrategyEnumValue,Or as isSettingsTaggingStrategyEnumValue,Dr as isSummarylengthEnumValue,xr as isTypeEnumValue};//# sourceMappingURL=index.mjs.map
1
+ import m from'axios';import*as fe from'fs';var Te=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function ke(r){return Te.includes(r)}var Pe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ge(r){return Pe.includes(r)}var Oe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ye(r){return Oe.includes(r)}var ge=["DELETE","INSERT","EQUAL"];function $e(r){return ge.includes(r)}var De=["sentence","paragraph"];function ze(r){return De.includes(r)}var Ie=["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","CONTENT_TOO_LARGE","INTERNAL_SERVER_ERROR","GATEWAY_TIMEOUT","DOCUMENTTYPE_NOT_FOUND","DOCUMENTTYPE_NAME_EXISTS","DOCUMENTTYPE_NOT_EDITABLE","COMPARE_DOC_IS_EMPTY","COMPARE_WRONG_LANGUAGE","COMPARE_NO_REFERENCES","DOMAIN_NOT_FOUND","TOO_MANY_TOKENS","NO_FILE_FOUND","FILE_TYPE_NOT_SUPPORTED","FILE_PASSWORDPROTECTED","MISSING_SERVICE_DEFINITION","SERVICE_CALL_ERROR","GENERATIVE_MODEL_ERROR","USED_AS_LINKED_EXTRACTOR","CYCLICAL_DEPENDENCY_LINKED_EXTRACTOR","FILE_TOO_BIG","TOO_MANY_ROWS","REGEX_INVALID","GENERATIVE_MODEL_CONTEXT_EXCEEDED","PROMPT_NOT_DELETABLE","JPEG2000_NOT_SUPPORTED","TRANSLATION_ERROR","RESOURCE_NOT_FOUND","PARENT_RESOURCE_NOT_FOUND","RESOURCE_PARAMETER_CONSTRAINT_VIOLATION","PLATFORM_UNREACHABLE","FILE_SIZE_TOOBIG","USER_REPOSITORY_NOT_CONFIGURED","PDF_NOT_CONFIGURED","INVALID_USER_PASSWORD","UNKNOWN_FINGERPRINTER_ID","JSON_ARRAY_EMPTY","TOKENS_ILLEGAL_TYPE","NO_JSON","INVALID_JSON_FORMAT","JSON_OBJECT_HAS_NO_DOCUMENTS","DOCUMENTS_ARE_NO_JSON_ARRAY","DOCUMENTS_JSON_ARRAY_EMPTY","DOCUMENTS_VALUE_ERROR","DOCUMENTS_TYPE_ERROR","DOCUMENTS_TOO_FEW_DOCUMENTS","REQ_NO_JSON_ARRAY","SENTENCE_LIST_NOT_TWO","IMAGE_NOT_PROVIDED","IMAGE_INVALID_FORMAT","MODEL_NAME_INVALID","THRESHOLD_INVALID","IMAGE_BUFFER_EMPTY","INVALID_MODEL_ID","IMAGE_NOT_PROVIDED_IFP","IMAGE_INVALID_DATA","IMAGE_INVALID_FORMAT_IFP"];function Qe(r){return Ie.includes(r)}var xe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ze(r){return xe.includes(r)}var Re=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function er(r){return Re.includes(r)}var ve=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function nr(r){return ve.includes(r)}var we=["REGEX","ANDREGEX","ANDNOTREGEX","NOTREGEX","REGEX_CASE_INSENSITIVE","ANDREGEX_CASE_INSENSITIVE","ANDNOTREGEX_CASE_INSENSITIVE","NOTREGEX_CASE_INSENSITIVE","SIMILAR","ANDSIMILAR","ANDNOTSIMILAR","NOTSIMILAR","LIBRARY","ANDLIBRARY","ANDNOTLIBRARY","NOTLIBRARY","PARAGRAPH_DETECTION","CONSTANT","INTERNAL","INTERNAL_2","INTERNAL_3","INTERNAL_4","INTERNAL_5","INTERNAL_6","INTERNAL_7","INTERNAL_8","INTERNAL_9","INTERNAL_10","RANGE","REGEX_PARAGRAPH_LASTMATCH","REGEX_DOCUMENT_LASTMATCH","INTERNAL_PARAGRAPH_LASTMATCH","INTERNAL_DOCUMENT_LASTMATCH","END_OF_DOCUMENT","START_OF_DOCUMENT","NEXT_HEADING","TEXT_TYPE"];function or(r){return we.includes(r)}var Me=["USER","ASSISTANT","SYSTEM"];function ar(r){return Me.includes(r)}var Se=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto","fingerprint_exact","document_fingerprint_exact"];function lr(r){return Se.includes(r)}var be=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function dr(r){return be.includes(r)}var Ae=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function Nr(r){return Ae.includes(r)}var _e=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY"];function cr(r){return _e.includes(r)}var He=["OPERATOR","FUNCTION"];function yr(r){return He.includes(r)}var Be=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto","fingerprint_exact","document_fingerprint_exact"];function Cr(r){return Be.includes(r)}var Je=["ANY","TOP1","TOP3","TOP5","TOP10"];function Pr(r){return Je.includes(r)}var Le=["TOP1","TOP3","TOP5","TOP10"];function gr(r){return Le.includes(r)}var Ve=["SHORT","MEDIUM","LONG"];function Ir(r){return Ve.includes(r)}var Fe=["similarity","extraction"];function Rr(r){return Fe.includes(r)}var l=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let o=e.match(/filename="?([^"]+)"?/);o&&o[1]&&(i=o[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var n=(a=>(a.JSON="application/json",a.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",a.PDF="application/pdf",a.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",a.ZIP="application/zip",a.REQIFZ="application/reqifz",a.PNG="image/png",a.BINARY="application/octet-stream",a.TEXT_PLAIN="text/plain",a))(n||{}),p=class r{constructor(t,e,i,o,s){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=o;this.tokenUrl=s;this.expireTime=0,this.accessToken="",this.skipAuthHeader=!!t&&!(e||i||o||s);}static LEEWAY=30;expireTime;accessToken;skipAuthHeader;async buildHeadersForJsonRequest(){return this.skipAuthHeader?{Accept:"application/json"}:{Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return this.skipAuthHeader?{}:{Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let t={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await m.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=m.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-r.LEEWAY);}return this.accessToken}toRequestData(t,e){if(!e?.["Content-Type"]?.startsWith("multipart/form-data")||(delete e["Content-Type"],!t||typeof t!="object"||t instanceof FormData))return t;let i=new FormData;for(let[o,s]of Object.entries(t))s!=null&&(s instanceof Blob?i.append(o,s,s.name??o):typeof s=="object"?i.append(o,JSON.stringify(s)):i.append(o,String(s)));return i}async request(t,e,i){if(!i.headers)i.headers=await this.buildHeadersForJsonRequest();else {let s=await this.buildHeadersForRequest();i.headers={...i.headers,...s};}let o=this.toRequestData(i.data,i.headers);return new l(m.request({method:t,url:this.serverUrl+e,headers:{...i.headers,"User-Agent":"semantha TypeScript SDK; "},data:o,params:i.params,responseType:i.responseType}))}async get(t,e,i,o,s="json"){return this.request("GET",t,{params:e,headers:i,data:o,responseType:s})}async post(t,e,i,o,s="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let Ee=await this.buildHeadersForRequest();i={...i,...Ee};}return new l(m.post(this.serverUrl+t,this.toRequestData(o,i),{params:e,headers:i,responseType:s}))}async delete(t,e,i){return this.request("DELETE",t,{data:e,params:i})}async patch(t,e){return this.request("PATCH",t,{data:e})}async put(t,e){return this.request("PUT",t,{data:e})}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new E(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var f=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new N(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}dataproperties(){return new y(this.restClient,this.ENDPOINT)}instances(){return new f(this.restClient,this.ENDPOINT)}metadata(){return new C(this.restClient,this.ENDPOINT)}namedentities(){return new T(this.restClient,this.ENDPOINT)}rules(){return new P(this.restClient,this.ENDPOINT)}stopwords(){return new O(this.restClient,this.ENDPOINT)}synonyms(){return new g(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var w=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var S=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new R(this.restClient,this.ENDPOINT)}documenttypes(){return new v(this.restClient,this.ENDPOINT)}referencedocuments(){return new w(this.restClient,this.ENDPOINT)}references(){return new M(this.restClient,this.ENDPOINT)}};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new S(this.restClient,this.ENDPOINT,t):new u(this.restClient,this.ENDPOINT)}model(){return new x(this.restClient,this.ENDPOINT)}};var A=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/celltypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var _=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/chats/${this.id}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var H=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var B=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var J=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clone";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var L=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/conversions";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toFile()}};var V=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var F=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new V(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var k=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/diff";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}};var U=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/customfields";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var G=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var X=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new X(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var W=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentannotations";}ENDPOINT;async postAsDocx(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document","multipart/form-data"),t)).toFile()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf","multipart/form-data"),t)).toFile()}};var $=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documentclasses/${this.id}`;}ENDPOINT;customfields(){return new U(this.restClient,this.ENDPOINT)}documentclasses(){return new G(this.restClient,this.ENDPOINT)}referencedocuments(){return new Y(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tree";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentclasses";}ENDPOINT;tree(){return new q(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var j=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","multipart/form-data"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document","multipart/form-data"),t)).toFile()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png","multipart/form-data"),t)).toFile()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz","multipart/form-data"),t)).toFile()}};var Q=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new J(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var K=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documenttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Z=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/mcptools";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelclasses";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/modelinstances";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","multipart/form-data"),t,"blob")).toFile()}};var rt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/prompts/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var it=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;validation(){return new nt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ot=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"),null,"blob")).toFile()}};var st=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var at=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/markdown";}ENDPOINT;async getAsPlainText(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("text/plain"))).toModel()}};var pt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/paragraphs/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var mt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var ut=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentid=i;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new ot(this.restClient,this.ENDPOINT,t):new st(this.restClient,this.ENDPOINT)}markdown(){return new at(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new pt(this.restClient,this.ENDPOINT,t):new lt(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new mt(this.restClient,this.ENDPOINT,t):new dt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stream";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/statistic";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;namedentities(){return new Nt(this.restClient,this.ENDPOINT)}statistic(){return new ct(this.restClient,this.ENDPOINT)}stream(){return new Et(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}async postJson(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/references";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","multipart/form-data"),t,"blob")).toFile()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document","multipart/form-data"),t)).toFile()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf","multipart/form-data"),t)).toFile()}};var ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/settings";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Ct=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/summarizations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}};var Tt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var Pt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.tagname=i;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new Tt(this.restClient,this.ENDPOINT)}};var Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tags";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var gt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/texttypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/translations";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var It=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/validation";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}};var xt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new d(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new _(this.restClient,this.ENDPOINT,t):new H(this.restClient,this.ENDPOINT)}documentannotations(){return new W(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new $(this.restClient,this.ENDPOINT,t):new z(this.restClient,this.ENDPOINT)}documents(){return new j(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new Q(this.restClient,this.ENDPOINT,t):new K(this.restClient,this.ENDPOINT)}mcptools(){return new Z(this.restClient,this.ENDPOINT)}modelclasses(){return new tt(this.restClient,this.ENDPOINT)}modelinstances(){return new et(this.restClient,this.ENDPOINT)}prompts(t){return t!=null?new rt(this.restClient,this.ENDPOINT,t):new it(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new ut(this.restClient,this.ENDPOINT,t):new ht(this.restClient,this.ENDPOINT)}references(){return new yt(this.restClient,this.ENDPOINT)}settings(){return new ft(this.restClient,this.ENDPOINT)}summarizations(){return new Ct(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new Pt(this.restClient,this.ENDPOINT,t):new Ot(this.restClient,this.ENDPOINT)}texttypes(){return new gt(this.restClient,this.ENDPOINT)}translations(){return new Dt(this.restClient,this.ENDPOINT)}validation(){return new It(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Rt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/info";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var wt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/languages";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json","multipart/form-data"),t)).toModel()}};var Mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/datatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var St=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var bt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/boostwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var At=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boostwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var _t=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/dataproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ht=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/dataproperties/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Bt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new B(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractorclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Lt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractors";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Vt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/formatters";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Ft=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadata";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var kt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/namedentities";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Ut=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/namedentities/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Gt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/objectproperties";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Xt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/metadata/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Yt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/regexes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Wt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/regexes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var $t=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/relations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/relations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var zt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/rules/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var jt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rulefunctions";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Qt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/rules";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Kt=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/stopwords/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Zt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stopwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){return await this.restClient.delete(this.ENDPOINT,void 0,t)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var te=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/synonyms/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ee=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/synonyms";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var re=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/attributes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ie=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}};var oe=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.classid=i;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new re(this.restClient,this.ENDPOINT,t):new ne(this.restClient,this.ENDPOINT)}instances(){return new ie(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var se=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classes";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var ae=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/instances/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var pe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/instances";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var le=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new St(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new bt(this.restClient,this.ENDPOINT,t):new At(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new oe(this.restClient,this.ENDPOINT,t):new se(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new Ht(this.restClient,this.ENDPOINT,t):new _t(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new Bt(this.restClient,this.ENDPOINT,t):new Jt(this.restClient,this.ENDPOINT)}extractors(){return new Lt(this.restClient,this.ENDPOINT)}formatters(){return new Vt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new ae(this.restClient,this.ENDPOINT,t):new pe(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new Xt(this.restClient,this.ENDPOINT,t):new Ft(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new kt(this.restClient,this.ENDPOINT)}objectproperties(){return new Gt(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Yt(this.restClient,this.ENDPOINT,t):new Wt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new $t(this.restClient,this.ENDPOINT,t):new qt(this.restClient,this.ENDPOINT)}rulefunctions(){return new jt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new zt(this.restClient,this.ENDPOINT,t):new Qt(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new Kt(this.restClient,this.ENDPOINT,t):new Zt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new te(this.restClient,this.ENDPOINT,t):new ee(this.restClient,this.ENDPOINT)}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var me=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var de=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/extractortypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var ue=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/metadatatypes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Ne=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new Mt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new le(this.restClient,this.ENDPOINT,t):new me(this.restClient,this.ENDPOINT)}extractortypes(){return new de(this.restClient,this.ENDPOINT)}metadatatypes(){return new ue(this.restClient,this.ENDPOINT)}};var he="/api/v3",ye=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t),e),he)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new p(this.parseServerUrl(t)),he)}static loginWithCredentials(t,e,i,o){return t=this.parseServerUrl(t),new r(new p(t,void 0,e,i,o),he)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=fe.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(ce=>ce.length!==0).map(ce=>ce.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",i),s=this.getValueOfInPropertiesFile("clientId",i),Ee=this.getValueOfInPropertiesFile("clientSecret",i),Ce=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(o,s,Ee,Ce)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-platform-server"):t.endsWith("/tt-platform-server")||(t+="/tt-platform-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new b(this.restClient,this.endpoint())}celltypes(){return new A(this.restClient,this.endpoint())}conversions(){return new L(this.restClient,this.endpoint())}currentuser(){return new F(this.restClient,this.endpoint())}diff(){return new k(this.restClient,this.endpoint())}domains(t){return t!=null?new xt(this.restClient,this.endpoint(),t):new Rt(this.restClient,this.endpoint())}info(){return new vt(this.restClient,this.endpoint())}languages(){return new wt(this.restClient,this.endpoint())}model(){return new Ne(this.restClient,this.endpoint())}};export{d as AnswersEndpoint,Te as AttributeDatatypeEnumValues,Pe as AttributeOverviewDatatypeEnumValues,u as BulkDomainsEndpoint,b as BulkEndpoint,x as BulkModelEndpoint,R as BulkdomainsDocumentclassesEndpoint,v as BulkdomainsDocumenttypesEndpoint,S as BulkdomainsDomainEndpoint,w as BulkdomainsReferencedocumentsEndpoint,M as BulkdomainsReferencesEndpoint,N as BulkmodelBoostwordsEndpoint,c as BulkmodelClassEndpoint,h as BulkmodelClassesEndpoint,y as BulkmodelDatapropertiesEndpoint,D as BulkmodelDomainEndpoint,I as BulkmodelDomainsEndpoint,f as BulkmodelInstancesEndpoint,C as BulkmodelMetadataEndpoint,T as BulkmodelNamedentitiesEndpoint,P as BulkmodelRulesEndpoint,O as BulkmodelStopwordsEndpoint,g as BulkmodelSynonymsEndpoint,E as BulkmodelclassInstancesEndpoint,A as CelltypesEndpoint,_ as ChatEndpoint,H as ChatsEndpoint,B as ChildExtractorclassesEndpoint,Oe as ClassBulkDatatypeEnumValues,J as CloneEndpoint,L as ConversionsEndpoint,F as CurrentuserEndpoint,k as DiffEndpoint,ge as DifferenceOperationEnumValues,U as DocclassCustomfieldsEndpoint,G as DocclassDocumentclassesEndpoint,Y as DocclassReferencedocumentsEndpoint,X as DocclassTagsEndpoint,W as DocumentannotationsEndpoint,$ as DocumentclassEndpoint,z as DocumentclassesEndpoint,De as DocumentmodeEnumValues,j as DocumentsEndpoint,Q as DocumenttypeEndpoint,K as DocumenttypesEndpoint,xt as DomainEndpoint,Rt as DomainsEndpoint,Ie as ErrorFieldCodeEnumValues,xe as ExtractorAttributeDatatypeEnumValues,Re as ExtractorTypeEnumValues,ve as FieldTypeEnumValues,ot as ImageEndpoint,st as ImagesEndpoint,vt as InfoEndpoint,wt as LanguagesEndpoint,at as MarkdownEndpoint,we as MatcherTypeEnumValues,Z as McptoolsEndpoint,n as MediaType,Me as MessageRoleEnumValues,Se as ModeEnumValues,St as ModelAttributesEndpoint,bt as ModelBoostwordEndpoint,At as ModelBoostwordsEndpoint,_t as ModelDatapropertiesEndpoint,Ht as ModelDatapropertyEndpoint,Mt as ModelDatatypesEndpoint,le as ModelDomainEndpoint,me as ModelDomainsEndpoint,Ne as ModelEndpoint,Bt as ModelExtractorclassEndpoint,Jt as ModelExtractorclassesEndpoint,Lt as ModelExtractorsEndpoint,de as ModelExtractortypesEndpoint,Vt as ModelFormattersEndpoint,Ft as ModelMetadataEndpoint,ue as ModelMetadatatypesEndpoint,kt as ModelNamedentitiesEndpoint,Ut as ModelNamedentityEndpoint,Gt as ModelObjectpropertiesEndpoint,Xt as ModelOnemetadataEndpoint,Yt as ModelRegexEndpoint,Wt as ModelRegexesEndpoint,$t as ModelRelationEndpoint,qt as ModelRelationsEndpoint,zt as ModelRuleEndpoint,jt as ModelRulefunctionsEndpoint,Qt as ModelRulesEndpoint,Kt as ModelStopwordEndpoint,Zt as ModelStopwordsEndpoint,te as ModelSynonymEndpoint,ee as ModelSynonymsEndpoint,tt as ModelclassesEndpoint,et as ModelinstancesEndpoint,re as ModelontAttributeEndpoint,ne as ModelontAttributesEndpoint,oe as ModelontClassEndpoint,se as ModelontClassesEndpoint,ae as ModelontInstanceEndpoint,pe as ModelontInstancesEndpoint,ie as ModelontclassInstancesEndpoint,Nt as NamedentitiesEndpoint,pt as ParagraphEndpoint,lt as ParagraphsEndpoint,rt as PromptEndpoint,be as PromptLabelEnumValues,Ae as PromptOverviewPromptLabelEnumValues,_e as PromptPromptLabelEnumValues,nt as PromptValidationEndpoint,it as PromptsEndpoint,ut as ReferencedocumentEndpoint,ht as ReferencedocumentsEndpoint,Et as ReferencedocumentsStreamEndpoint,yt as ReferencesEndpoint,p as RestClient,l as RestResponse,V as RolesEndpoint,He as RuleFunctionTypeEnumValues,ye as SemanthaAPI,mt as SentenceEndpoint,dt as SentencesEndpoint,Be as SettingsDefaultSimilarityModeEnumValues,ft as SettingsEndpoint,Je as SettingsExtractionStrategyEnumValues,Le as SettingsTaggingStrategyEnumValues,ct as StatisticEndpoint,Ct as SummarizationsEndpoint,Ve as SummarylengthEnumValues,Pt as TagEndpoint,Tt as TagReferencedocumentsEndpoint,Ot as TagsEndpoint,gt as TexttypesEndpoint,Dt as TranslationsEndpoint,q as TreeEndpoint,Fe as TypeEnumValues,It as ValidationEndpoint,ke as isAttributeDatatypeEnumValue,Ge as isAttributeOverviewDatatypeEnumValue,Ye as isClassBulkDatatypeEnumValue,$e as isDifferenceOperationEnumValue,ze as isDocumentmodeEnumValue,Qe as isErrorFieldCodeEnumValue,Ze as isExtractorAttributeDatatypeEnumValue,er as isExtractorTypeEnumValue,nr as isFieldTypeEnumValue,or as isMatcherTypeEnumValue,ar as isMessageRoleEnumValue,lr as isModeEnumValue,dr as isPromptLabelEnumValue,Nr as isPromptOverviewPromptLabelEnumValue,cr as isPromptPromptLabelEnumValue,yr as isRuleFunctionTypeEnumValue,Cr as isSettingsDefaultSimilarityModeEnumValue,Pr as isSettingsExtractionStrategyEnumValue,gr as isSettingsTaggingStrategyEnumValue,Ir as isSummarylengthEnumValue,Rr as isTypeEnumValue};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map