@semantha/sdk 9.3.0 → 9.3.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.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
1
|
+
import { AxiosResponse, ResponseType } from 'axios';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @author semantha
|
|
@@ -1785,6 +1785,7 @@ declare class RestResponse<T> {
|
|
|
1785
1785
|
private readonly response;
|
|
1786
1786
|
constructor(response: Promise<AxiosResponse<T>>);
|
|
1787
1787
|
toModel(): Promise<T>;
|
|
1788
|
+
toFile(): Promise<File>;
|
|
1788
1789
|
getStatusCode(): Promise<number>;
|
|
1789
1790
|
getStatusText(): Promise<string>;
|
|
1790
1791
|
}
|
|
@@ -1822,7 +1823,7 @@ declare class RestClient {
|
|
|
1822
1823
|
}, data?: any): Promise<RestResponse<R>>;
|
|
1823
1824
|
post<R>(url: string, params?: any, headers?: {
|
|
1824
1825
|
[key: string]: string;
|
|
1825
|
-
}, data?: any): Promise<RestResponse<R>>;
|
|
1826
|
+
}, data?: any, responseType?: ResponseType): Promise<RestResponse<R>>;
|
|
1826
1827
|
delete(url: string, data?: any): Promise<void>;
|
|
1827
1828
|
patch<R>(url: string, data?: any): Promise<RestResponse<R>>;
|
|
1828
1829
|
put<R>(url: string, data: any): Promise<RestResponse<R>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
1
|
+
import { AxiosResponse, ResponseType } from 'axios';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @author semantha
|
|
@@ -1785,6 +1785,7 @@ declare class RestResponse<T> {
|
|
|
1785
1785
|
private readonly response;
|
|
1786
1786
|
constructor(response: Promise<AxiosResponse<T>>);
|
|
1787
1787
|
toModel(): Promise<T>;
|
|
1788
|
+
toFile(): Promise<File>;
|
|
1788
1789
|
getStatusCode(): Promise<number>;
|
|
1789
1790
|
getStatusText(): Promise<string>;
|
|
1790
1791
|
}
|
|
@@ -1822,7 +1823,7 @@ declare class RestClient {
|
|
|
1822
1823
|
}, data?: any): Promise<RestResponse<R>>;
|
|
1823
1824
|
post<R>(url: string, params?: any, headers?: {
|
|
1824
1825
|
[key: string]: string;
|
|
1825
|
-
}, data?: any): Promise<RestResponse<R>>;
|
|
1826
|
+
}, data?: any, responseType?: ResponseType): Promise<RestResponse<R>>;
|
|
1826
1827
|
delete(url: string, data?: any): Promise<void>;
|
|
1827
1828
|
patch<R>(url: string, data?: any): Promise<RestResponse<R>>;
|
|
1828
1829
|
put<R>(url: string, data: any): Promise<RestResponse<R>>;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var Ne=require('axios'),he=require('fs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var Ne__default=/*#__PURE__*/_interopDefault(Ne);var he__namespace=/*#__PURE__*/_interopNamespace(he);var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return Ce.includes(r)}var fe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Xe(r){return fe.includes(r)}var Te=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function We(r){return Te.includes(r)}var Pe=["LOCAL","BALANCED","GLOBAL"];function qe(r){return Pe.includes(r)}var ge=["DELETE","INSERT","EQUAL"];function Ke(r){return ge.includes(r)}var Oe=["sentence","paragraph"];function Qe(r){return Oe.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","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 tr(r){return De.includes(r)}var Ie=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function rr(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 nr(r){return xe.includes(r)}var Re=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function sr(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 pr(r){return ve.includes(r)}var Me=["USER","ASSISTANT","SYSTEM"];function mr(r){return Me.includes(r)}var we=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function ur(r){return we.includes(r)}var Se=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function Er(r){return Se.includes(r)}var be=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function hr(r){return be.includes(r)}var Ae=["HOURS","DAYS","MONTHS","YEARS"];function Cr(r){return Ae.includes(r)}var _e=["OPERATOR","FUNCTION"];function Tr(r){return _e.includes(r)}var He=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function gr(r){return He.includes(r)}var Be=["ANY","TOP1","TOP3","TOP5","TOP10"];function Dr(r){return Be.includes(r)}var Je=["TOP1","TOP3","TOP5","TOP10"];function xr(r){return Je.includes(r)}var Le=["LOCAL","BALANCED","GLOBAL"];function vr(r){return Le.includes(r)}var Ve=["HOURS","DAYS","MONTHS","YEARS"];function wr(r){return Ve.includes(r)}var ke=["SHORT","MEDIUM","LONG"];function br(r){return ke.includes(r)}var Fe=["similarity","extraction"];function _r(r){return Fe.includes(r)}var l=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var i=(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))(i||{}),a=class r{constructor(t,e,n,o,p){this.serverUrl=t;this.apiKey=e;this.clientId=n;this.client_secret=o;this.tokenUrl=p;this.expireTime=0,this.accessToken="";}static LEEWAY=30;expireTime;accessToken;async buildHeadersForJsonRequest(){return {Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return {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 Ne__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=Ne__default.default.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,n,o,p){if(!o)o=await this.buildHeadersForJsonRequest();else {let ue=await this.buildHeadersForRequest();o={...o,...ue};}return new l(Ne__default.default.request({method:t,url:this.serverUrl+e,headers:{...o,"User-Agent":"semantha TypeScript SDK; "},data:p,params:n}))}async get(t,e,n,o){return this.request("GET",t,e,n,o)}async post(t,e,n,o){return this.request("POST",t,e,n,o)}async delete(t,e){this.request("DELETE",t,e=e);}async patch(t,e){return this.request("PATCH",t,e=e)}async put(t,e){return this.request("PUT",t,e=e)}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var m=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 d=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 N=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 E=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.classid=n;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new N(this.restClient,this.ENDPOINT)}};var c=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 h=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 y=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 f=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 T=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 P=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 O=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new u(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new E(this.restClient,this.ENDPOINT,t):new c(this.restClient,this.ENDPOINT)}dataproperties(){return new h(this.restClient,this.ENDPOINT)}instances(){return new y(this.restClient,this.ENDPOINT)}metadata(){return new C(this.restClient,this.ENDPOINT)}namedentities(){return new f(this.restClient,this.ENDPOINT)}rules(){return new T(this.restClient,this.ENDPOINT)}stopwords(){return new P(this.restClient,this.ENDPOINT)}synonyms(){return new g(this.restClient,this.ENDPOINT)}};var D=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new O(this.restClient,this.ENDPOINT,t):new D(this.restClient,this.ENDPOINT)}};var x=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 post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var R=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 v=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){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 w=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new x(this.restClient,this.ENDPOINT)}documenttypes(){return new R(this.restClient,this.ENDPOINT)}referencedocuments(){return new v(this.restClient,this.ENDPOINT)}references(){return new M(this.restClient,this.ENDPOINT)}};var S=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new w(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}model(){return new I(this.restClient,this.ENDPOINT)}};var b=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 A=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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 _=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var H=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 B=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 J=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clusters";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,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)).toModel()}};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 k=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 F=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(){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){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){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)).toModel()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),t)).toModel()}};var $=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}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+"/documentclasses";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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+"/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)).toModel()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toModel()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png"),t)).toModel()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz"),t)).toModel()}};var K=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new B(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var j=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Q=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 Z=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)).toModel()}};var tt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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 et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var rt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"))).toModel()}};var it=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var nt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var st=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var at=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/sentences";}ENDPOINT};var pt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.documentid=n;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new rt(this.restClient,this.ENDPOINT,t):new it(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new nt(this.restClient,this.ENDPOINT,t):new ot(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new st(this.restClient,this.ENDPOINT,t):new at(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){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+"/namedentities";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var mt=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 dt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;clusters(){return new J(this.restClient,this.ENDPOINT)}namedentities(){return new lt(this.restClient,this.ENDPOINT)}statistic(){return new mt(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"))).toModel()}async delete(){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 ut=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)).toModel()}async postAsDocx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),t)).toModel()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf"),t)).toModel()}};var Nt=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 Et=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/cluster";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}async postJson(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+"/similaritymatrix";}ENDPOINT;cluster(){return new Et(this.restClient,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){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 yt=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(){await this.restClient.delete(this.ENDPOINT);}};var Ct=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.tagname=n;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new yt(this.restClient,this.ENDPOINT)}};var ft=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 Tt=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(){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+"/transactions";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var gt=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 Ot=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new m(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new A(this.restClient,this.ENDPOINT,t):new _(this.restClient,this.ENDPOINT)}documentannotations(){return new W(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new $(this.restClient,this.ENDPOINT,t):new q(this.restClient,this.ENDPOINT)}documents(){return new z(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new K(this.restClient,this.ENDPOINT,t):new j(this.restClient,this.ENDPOINT)}modelclasses(){return new Q(this.restClient,this.ENDPOINT)}modelinstances(){return new Z(this.restClient,this.ENDPOINT)}prompts(t){return t!=null?new tt(this.restClient,this.ENDPOINT,t):new et(this.restClient,this.ENDPOINT)}referencedocuments(t){return t!=null?new pt(this.restClient,this.ENDPOINT,t):new dt(this.restClient,this.ENDPOINT)}references(){return new ut(this.restClient,this.ENDPOINT)}settings(){return new Nt(this.restClient,this.ENDPOINT)}similaritymatrix(){return new ct(this.restClient,this.ENDPOINT)}summarizations(){return new ht(this.restClient,this.ENDPOINT)}tags(t){return t!=null?new Ct(this.restClient,this.ENDPOINT,t):new ft(this.restClient,this.ENDPOINT)}texttypes(){return new Tt(this.restClient,this.ENDPOINT)}transactions(){return new Pt(this.restClient,this.ENDPOINT)}validation(){return new gt(this.restClient,this.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+"/domains";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var It=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 xt=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 Rt=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 vt=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 Mt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/backups";}ENDPOINT;async post(){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),{})).toModel()}};var wt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var St=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var bt=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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var _t=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new H(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ht=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(){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 Bt=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 Jt=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 Lt=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Vt=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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Ft=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 Ut=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Gt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Xt=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var Yt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/relations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/rulefunctions";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var zt=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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/stopwords";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/synonyms";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var te=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/attributes";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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){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(){await this.restClient.delete(this.ENDPOINT);}};var ie=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.classid=n;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new te(this.restClient,this.ENDPOINT,t):new ee(this.restClient,this.ENDPOINT)}instances(){return new re(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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+"/classes";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var oe=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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+"/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"))).toModel()}async delete(){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 ae=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new vt(this.restClient,this.ENDPOINT)}backups(){return new Mt(this.restClient,this.ENDPOINT)}boostwords(t){return t!=null?new wt(this.restClient,this.ENDPOINT,t):new St(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new ie(this.restClient,this.ENDPOINT,t):new ne(this.restClient,this.ENDPOINT)}dataproperties(t){return t!=null?new At(this.restClient,this.ENDPOINT,t):new bt(this.restClient,this.ENDPOINT)}extractorclasses(t){return t!=null?new _t(this.restClient,this.ENDPOINT,t):new Ht(this.restClient,this.ENDPOINT)}extractors(){return new Bt(this.restClient,this.ENDPOINT)}formatters(){return new Jt(this.restClient,this.ENDPOINT)}instances(t){return t!=null?new oe(this.restClient,this.ENDPOINT,t):new se(this.restClient,this.ENDPOINT)}metadata(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new Lt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new kt(this.restClient,this.ENDPOINT,t):new Vt(this.restClient,this.ENDPOINT)}objectproperties(){return new Ft(this.restClient,this.ENDPOINT)}regexes(t){return t!=null?new Gt(this.restClient,this.ENDPOINT,t):new Xt(this.restClient,this.ENDPOINT)}relations(t){return t!=null?new Yt(this.restClient,this.ENDPOINT,t):new Wt(this.restClient,this.ENDPOINT)}rulefunctions(){return new qt(this.restClient,this.ENDPOINT)}rules(t){return t!=null?new $t(this.restClient,this.ENDPOINT,t):new zt(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new Kt(this.restClient,this.ENDPOINT,t):new jt(this.restClient,this.ENDPOINT)}synonyms(t){return t!=null?new Qt(this.restClient,this.ENDPOINT,t):new Zt(this.restClient,this.ENDPOINT)}async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var pe=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var le=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 me=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 de=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;datatypes(){return new Rt(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new ae(this.restClient,this.ENDPOINT,t):new pe(this.restClient,this.ENDPOINT)}extractortypes(){return new le(this.restClient,this.ENDPOINT)}metadatatypes(){return new me(this.restClient,this.ENDPOINT)}};var Ee="/api/v3",ce=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 a(this.parseServerUrl(t),e),Ee)}static loginWithCredentials(t,e,n,o){return t=this.parseServerUrl(t),new r(new a(t,void 0,e,n,o),Ee)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=he__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(s=>s.length!==0).map(s=>s.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",n),p=this.getValueOfInPropertiesFile("clientId",n),ue=this.getValueOfInPropertiesFile("clientSecret",n),ye=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(o,p,ue,ye)}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 n of e)if(n[0]===t)return n[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new S(this.restClient,this.endpoint())}celltypes(){return new b(this.restClient,this.endpoint())}conversions(){return new L(this.restClient,this.endpoint())}currentuser(){return new k(this.restClient,this.endpoint())}diff(){return new F(this.restClient,this.endpoint())}domains(t){return t!=null?new Ot(this.restClient,this.endpoint(),t):new Dt(this.restClient,this.endpoint())}info(){return new It(this.restClient,this.endpoint())}languages(){return new xt(this.restClient,this.endpoint())}model(){return new de(this.restClient,this.endpoint())}};exports.AnswersEndpoint=m;exports.AttributeDatatypeEnumValues=Ce;exports.AttributeOverviewDatatypeEnumValues=fe;exports.BulkDomainsEndpoint=d;exports.BulkEndpoint=S;exports.BulkModelEndpoint=I;exports.BulkdomainsDocumentclassesEndpoint=x;exports.BulkdomainsDocumenttypesEndpoint=R;exports.BulkdomainsDomainEndpoint=w;exports.BulkdomainsReferencedocumentsEndpoint=v;exports.BulkdomainsReferencesEndpoint=M;exports.BulkmodelBoostwordsEndpoint=u;exports.BulkmodelClassEndpoint=E;exports.BulkmodelClassesEndpoint=c;exports.BulkmodelDatapropertiesEndpoint=h;exports.BulkmodelDomainEndpoint=O;exports.BulkmodelDomainsEndpoint=D;exports.BulkmodelInstancesEndpoint=y;exports.BulkmodelMetadataEndpoint=C;exports.BulkmodelNamedentitiesEndpoint=f;exports.BulkmodelRulesEndpoint=T;exports.BulkmodelStopwordsEndpoint=P;exports.BulkmodelSynonymsEndpoint=g;exports.BulkmodelclassInstancesEndpoint=N;exports.CelltypesEndpoint=b;exports.ChatEndpoint=A;exports.ChatsEndpoint=_;exports.ChildExtractorclassesEndpoint=H;exports.ClassBulkDatatypeEnumValues=Te;exports.CloneEndpoint=B;exports.ClusteringstructureEnumValues=Pe;exports.ClustersEndpoint=J;exports.ConversionsEndpoint=L;exports.CurrentuserEndpoint=k;exports.DiffEndpoint=F;exports.DifferenceOperationEnumValues=ge;exports.DocclassCustomfieldsEndpoint=U;exports.DocclassDocumentclassesEndpoint=G;exports.DocclassReferencedocumentsEndpoint=Y;exports.DocclassTagsEndpoint=X;exports.DocumentannotationsEndpoint=W;exports.DocumentclassEndpoint=$;exports.DocumentclassesEndpoint=q;exports.DocumentmodeEnumValues=Oe;exports.DocumentsEndpoint=z;exports.DocumenttypeEndpoint=K;exports.DocumenttypesEndpoint=j;exports.DomainEndpoint=Ot;exports.DomainsEndpoint=Dt;exports.ErrorFieldCodeEnumValues=De;exports.ExtractorAttributeDatatypeEnumValues=Ie;exports.ExtractorTypeEnumValues=xe;exports.FieldTypeEnumValues=Re;exports.ImageEndpoint=rt;exports.ImagesEndpoint=it;exports.InfoEndpoint=It;exports.LanguagesEndpoint=xt;exports.MatcherTypeEnumValues=ve;exports.MediaType=i;exports.MessageRoleEnumValues=Me;exports.ModeEnumValues=we;exports.ModelAttributesEndpoint=vt;exports.ModelBackupsEndpoint=Mt;exports.ModelBoostwordEndpoint=wt;exports.ModelBoostwordsEndpoint=St;exports.ModelDatapropertiesEndpoint=bt;exports.ModelDatapropertyEndpoint=At;exports.ModelDatatypesEndpoint=Rt;exports.ModelDomainEndpoint=ae;exports.ModelDomainsEndpoint=pe;exports.ModelEndpoint=de;exports.ModelExtractorclassEndpoint=_t;exports.ModelExtractorclassesEndpoint=Ht;exports.ModelExtractorsEndpoint=Bt;exports.ModelExtractortypesEndpoint=le;exports.ModelFormattersEndpoint=Jt;exports.ModelMetadataEndpoint=Lt;exports.ModelMetadatatypesEndpoint=me;exports.ModelNamedentitiesEndpoint=Vt;exports.ModelNamedentityEndpoint=kt;exports.ModelObjectpropertiesEndpoint=Ft;exports.ModelOnemetadataEndpoint=Ut;exports.ModelRegexEndpoint=Gt;exports.ModelRegexesEndpoint=Xt;exports.ModelRelationEndpoint=Yt;exports.ModelRelationsEndpoint=Wt;exports.ModelRuleEndpoint=$t;exports.ModelRulefunctionsEndpoint=qt;exports.ModelRulesEndpoint=zt;exports.ModelStopwordEndpoint=Kt;exports.ModelStopwordsEndpoint=jt;exports.ModelSynonymEndpoint=Qt;exports.ModelSynonymsEndpoint=Zt;exports.ModelclassesEndpoint=Q;exports.ModelinstancesEndpoint=Z;exports.ModelontAttributeEndpoint=te;exports.ModelontAttributesEndpoint=ee;exports.ModelontClassEndpoint=ie;exports.ModelontClassesEndpoint=ne;exports.ModelontInstanceEndpoint=oe;exports.ModelontInstancesEndpoint=se;exports.ModelontclassInstancesEndpoint=re;exports.NamedentitiesEndpoint=lt;exports.ParagraphEndpoint=nt;exports.ParagraphsEndpoint=ot;exports.PromptEndpoint=tt;exports.PromptOverviewPromptLabelEnumValues=Se;exports.PromptPromptLabelEnumValues=be;exports.PromptsEndpoint=et;exports.RangeEnumValues=Ae;exports.ReferencedocumentEndpoint=pt;exports.ReferencedocumentsEndpoint=dt;exports.ReferencesEndpoint=ut;exports.RestClient=a;exports.RestResponse=l;exports.RolesEndpoint=V;exports.RuleFunctionTypeEnumValues=_e;exports.SemanthaAPI=ce;exports.SentenceEndpoint=st;exports.SentencesEndpoint=at;exports.SettingsDefaultSimilarityModeEnumValues=He;exports.SettingsEndpoint=Nt;exports.SettingsExtractionStrategyEnumValues=Be;exports.SettingsTaggingStrategyEnumValues=Je;exports.SimilaritymatrixClusterEndpoint=Et;exports.SimilaritymatrixEndpoint=ct;exports.SmartClusterSemiSupervisedRequestClusteringStructureEnumValues=Le;exports.SmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValues=Ve;exports.StatisticEndpoint=mt;exports.SummarizationsEndpoint=ht;exports.SummarylengthEnumValues=ke;exports.TagEndpoint=Ct;exports.TagReferencedocumentsEndpoint=yt;exports.TagsEndpoint=ft;exports.TexttypesEndpoint=Tt;exports.TransactionsEndpoint=Pt;exports.TypeEnumValues=Fe;exports.ValidationEndpoint=gt;exports.isAttributeDatatypeEnumValue=Ue;exports.isAttributeOverviewDatatypeEnumValue=Xe;exports.isClassBulkDatatypeEnumValue=We;exports.isClusteringstructureEnumValue=qe;exports.isDifferenceOperationEnumValue=Ke;exports.isDocumentmodeEnumValue=Qe;exports.isErrorFieldCodeEnumValue=tr;exports.isExtractorAttributeDatatypeEnumValue=rr;exports.isExtractorTypeEnumValue=nr;exports.isFieldTypeEnumValue=sr;exports.isMatcherTypeEnumValue=pr;exports.isMessageRoleEnumValue=mr;exports.isModeEnumValue=ur;exports.isPromptOverviewPromptLabelEnumValue=Er;exports.isPromptPromptLabelEnumValue=hr;exports.isRangeEnumValue=Cr;exports.isRuleFunctionTypeEnumValue=Tr;exports.isSettingsDefaultSimilarityModeEnumValue=gr;exports.isSettingsExtractionStrategyEnumValue=Dr;exports.isSettingsTaggingStrategyEnumValue=xr;exports.isSmartClusterSemiSupervisedRequestClusteringStructureEnumValue=vr;exports.isSmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValue=wr;exports.isSummarylengthEnumValue=br;exports.isTypeEnumValue=_r;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var d=require('axios'),he=require('fs');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var d__default=/*#__PURE__*/_interopDefault(d);var he__namespace=/*#__PURE__*/_interopNamespace(he);var Ce=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Ue(r){return Ce.includes(r)}var fe=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function Xe(r){return fe.includes(r)}var Te=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function We(r){return Te.includes(r)}var Pe=["LOCAL","BALANCED","GLOBAL"];function $e(r){return Pe.includes(r)}var ge=["DELETE","INSERT","EQUAL"];function je(r){return ge.includes(r)}var Oe=["sentence","paragraph"];function Qe(r){return Oe.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","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 tr(r){return De.includes(r)}var Ie=["STRING","CURRENCY","DATE","NUMBER","YEAR","BOOLEAN","INTEGER"];function rr(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 nr(r){return xe.includes(r)}var Re=["CLASS","OBJECT_PROPERTY","DATA_PROPERTY"];function sr(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 pr(r){return ve.includes(r)}var we=["USER","ASSISTANT","SYSTEM"];function mr(r){return we.includes(r)}var Me=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function ur(r){return Me.includes(r)}var Se=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function Er(r){return Se.includes(r)}var be=["COMPARE","REQUIREMENTS","SEARCH","LIBRARY","INTERNAL","CUSTOM"];function hr(r){return be.includes(r)}var Ae=["HOURS","DAYS","MONTHS","YEARS"];function Cr(r){return Ae.includes(r)}var _e=["OPERATOR","FUNCTION"];function Tr(r){return _e.includes(r)}var He=["fingerprint","keyword","document","document_fingerprint","fingerprint_keyword","auto"];function gr(r){return He.includes(r)}var Be=["ANY","TOP1","TOP3","TOP5","TOP10"];function Dr(r){return Be.includes(r)}var Je=["TOP1","TOP3","TOP5","TOP10"];function xr(r){return Je.includes(r)}var Le=["LOCAL","BALANCED","GLOBAL"];function vr(r){return Le.includes(r)}var Ve=["HOURS","DAYS","MONTHS","YEARS"];function Mr(r){return Ve.includes(r)}var ke=["SHORT","MEDIUM","LONG"];function br(r){return ke.includes(r)}var Fe=["similarity","extraction"];function _r(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"],n="file";if(e){let o=e.match(/filename="?([^"]+)"?/);o&&o[1]&&(n=o[1]);}return new File([t.data.blob()],n)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var i=(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))(i||{}),m=class r{constructor(t,e,n,o,a){this.serverUrl=t;this.apiKey=e;this.clientId=n;this.client_secret=o;this.tokenUrl=a;this.expireTime=0,this.accessToken="";}static LEEWAY=30;expireTime;accessToken;async buildHeadersForJsonRequest(){return {Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return {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 d__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=d__default.default.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,n,o,a){if(!o)o=await this.buildHeadersForJsonRequest();else {let p=await this.buildHeadersForRequest();o={...o,...p};}return new l(d__default.default.request({method:t,url:this.serverUrl+e,headers:{...o,"User-Agent":"semantha TypeScript SDK; "},data:a,params:n}))}async get(t,e,n,o){return this.request("GET",t,e,n,o)}async post(t,e,n,o,a="json"){if(!n)n=await this.buildHeadersForJsonRequest();else {let p=await this.buildHeadersForRequest();n={...n,...p};}return new l(d__default.default.post(t,{params:e,headers:n,data:o,responseType:a}))}async delete(t,e){this.request("DELETE",t,e=e);}async patch(t,e){return this.request("PATCH",t,e=e)}async put(t,e){return this.request("PUT",t,e=e)}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};var u=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 E=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 c=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 h=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.classid=n;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;instances(){return new c(this.restClient,this.ENDPOINT)}};var y=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 C=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 T=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 P=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 g=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 D=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 I=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boostwords(){return new E(this.restClient,this.ENDPOINT)}classes(t){return t!=null?new h(this.restClient,this.ENDPOINT,t):new y(this.restClient,this.ENDPOINT)}dataproperties(){return new C(this.restClient,this.ENDPOINT)}instances(){return new f(this.restClient,this.ENDPOINT)}metadata(){return new T(this.restClient,this.ENDPOINT)}namedentities(){return new P(this.restClient,this.ENDPOINT)}rules(){return new g(this.restClient,this.ENDPOINT)}stopwords(){return new O(this.restClient,this.ENDPOINT)}synonyms(){return new D(this.restClient,this.ENDPOINT)}};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/model";}ENDPOINT;domains(t){return t!=null?new I(this.restClient,this.ENDPOINT,t):new x(this.restClient,this.ENDPOINT)}};var v=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 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+"/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 M=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){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 S=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 b=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documentclasses(){return new v(this.restClient,this.ENDPOINT)}documenttypes(){return new w(this.restClient,this.ENDPOINT)}referencedocuments(){return new M(this.restClient,this.ENDPOINT)}references(){return new S(this.restClient,this.ENDPOINT)}};var A=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;domains(t){return t!=null?new b(this.restClient,this.ENDPOINT,t):new N(this.restClient,this.ENDPOINT)}model(){return new R(this.restClient,this.ENDPOINT)}};var _=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 H=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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 B=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/chats";}ENDPOINT};var J=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 L=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 V=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/clusters";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var k=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)).toModel()}};var F=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 U=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new F(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var G=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 X=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/customfields";}ENDPOINT;async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Y=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){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 W=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 q=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;tags(){return new W(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(t){await this.restClient.delete(this.ENDPOINT,t);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var $=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)).toModel()}async postAsPdf(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),t)).toModel()}};var z=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/documentclasses/${this.id}`;}ENDPOINT;customfields(){return new X(this.restClient,this.ENDPOINT)}documentclasses(){return new Y(this.restClient,this.ENDPOINT)}referencedocuments(){return new q(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var j=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var K=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)).toModel()}async postAsPng(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("image/png"),t)).toModel()}async postAsReqifz(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/reqifz"),t)).toModel()}};var Q=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/documenttypes/${this.id}`;}ENDPOINT;clone(){return new L(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Z=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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).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"),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 rt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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 it=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/prompts";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var nt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/images/${this.id}`;}ENDPOINT;async getAsBinary(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/octet-stream"))).toModel()}};var ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/images";}ENDPOINT};var st=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var at=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/paragraphs";}ENDPOINT};var pt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/sentences/${this.id}`;}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+"/sentences";}ENDPOINT};var mt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.documentid=n;this.ENDPOINT=this.parentEndpoint+`/referencedocuments/${this.documentid}`;}ENDPOINT;images(t){return t!=null?new nt(this.restClient,this.ENDPOINT,t):new ot(this.restClient,this.ENDPOINT)}paragraphs(t){return t!=null?new st(this.restClient,this.ENDPOINT,t):new at(this.restClient,this.ENDPOINT)}sentences(t){return t!=null?new pt(this.restClient,this.ENDPOINT,t):new lt(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){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+"/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+"/statistic";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var Nt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/referencedocuments";}ENDPOINT;clusters(){return new V(this.restClient,this.ENDPOINT)}namedentities(){return new dt(this.restClient,this.ENDPOINT)}statistic(){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"))).toModel()}async delete(){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 Et=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)).toModel()}async postAsPdf(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/pdf"),t)).toModel()}};var ct=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 ht=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/cluster";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}async postJson(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var yt=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/similaritymatrix";}ENDPOINT;cluster(){return new ht(this.restClient,this.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+"/summarizations";}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+"/referencedocuments";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}};var Tt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.tagname=n;this.ENDPOINT=this.parentEndpoint+`/tags/${this.tagname}`;}ENDPOINT;referencedocuments(){return new ft(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 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(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var Ot=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/transactions";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).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,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;answers(){return new u(this.restClient,this.ENDPOINT)}chats(t){return t!=null?new H(this.restClient,this.ENDPOINT,t):new B(this.restClient,this.ENDPOINT)}documentannotations(){return new $(this.restClient,this.ENDPOINT)}documentclasses(t){return t!=null?new z(this.restClient,this.ENDPOINT,t):new j(this.restClient,this.ENDPOINT)}documents(){return new K(this.restClient,this.ENDPOINT)}documenttypes(t){return t!=null?new Q(this.restClient,this.ENDPOINT,t):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 mt(this.restClient,this.ENDPOINT,t):new Nt(this.restClient,this.ENDPOINT)}references(){return new Et(this.restClient,this.ENDPOINT)}settings(){return new ct(this.restClient,this.ENDPOINT)}similaritymatrix(){return new yt(this.restClient,this.ENDPOINT)}summarizations(){return new Ct(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 gt(this.restClient,this.ENDPOINT)}transactions(){return new Ot(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){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/backups";}ENDPOINT;async post(){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),{})).toModel()}};var bt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Bt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/extractorclasses/${this.id}`;}ENDPOINT;extractorclasses(){return new J(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){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(){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 kt=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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var Yt=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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 Kt=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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var te=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var ie=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(){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(){await this.restClient.delete(this.ENDPOINT);}};var oe=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.classid=n;this.ENDPOINT=this.parentEndpoint+`/classes/${this.classid}`;}ENDPOINT;attributes(t){return t!=null?new re(this.restClient,this.ENDPOINT,t):new ie(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(){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(){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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;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(){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"))).toModel()}async delete(){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,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;attributes(){return new Mt(this.restClient,this.ENDPOINT)}backups(){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 kt(this.restClient,this.ENDPOINT)}namedentities(t){return t!=null?new Ut(this.restClient,this.ENDPOINT,t):new Ft(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 qt(this.restClient,this.ENDPOINT,t):new $t(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 Kt(this.restClient,this.ENDPOINT)}stopwords(t){return t!=null?new Qt(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"))).toModel()}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 wt(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 Ee="/api/v3",ce=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 m(this.parseServerUrl(t),e),Ee)}static loginWithCredentials(t,e,n,o){return t=this.parseServerUrl(t),new r(new m(t,void 0,e,n,o),Ee)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=he__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(s=>s.length!==0).map(s=>s.split("=")),o=this.getValueOfInPropertiesFile("serverUrl",n),a=this.getValueOfInPropertiesFile("clientId",n),p=this.getValueOfInPropertiesFile("clientSecret",n),ye=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(o,a,p,ye)}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 n of e)if(n[0]===t)return n[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}bulk(){return new A(this.restClient,this.endpoint())}celltypes(){return new _(this.restClient,this.endpoint())}conversions(){return new k(this.restClient,this.endpoint())}currentuser(){return new U(this.restClient,this.endpoint())}diff(){return new G(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())}};exports.AnswersEndpoint=u;exports.AttributeDatatypeEnumValues=Ce;exports.AttributeOverviewDatatypeEnumValues=fe;exports.BulkDomainsEndpoint=N;exports.BulkEndpoint=A;exports.BulkModelEndpoint=R;exports.BulkdomainsDocumentclassesEndpoint=v;exports.BulkdomainsDocumenttypesEndpoint=w;exports.BulkdomainsDomainEndpoint=b;exports.BulkdomainsReferencedocumentsEndpoint=M;exports.BulkdomainsReferencesEndpoint=S;exports.BulkmodelBoostwordsEndpoint=E;exports.BulkmodelClassEndpoint=h;exports.BulkmodelClassesEndpoint=y;exports.BulkmodelDatapropertiesEndpoint=C;exports.BulkmodelDomainEndpoint=I;exports.BulkmodelDomainsEndpoint=x;exports.BulkmodelInstancesEndpoint=f;exports.BulkmodelMetadataEndpoint=T;exports.BulkmodelNamedentitiesEndpoint=P;exports.BulkmodelRulesEndpoint=g;exports.BulkmodelStopwordsEndpoint=O;exports.BulkmodelSynonymsEndpoint=D;exports.BulkmodelclassInstancesEndpoint=c;exports.CelltypesEndpoint=_;exports.ChatEndpoint=H;exports.ChatsEndpoint=B;exports.ChildExtractorclassesEndpoint=J;exports.ClassBulkDatatypeEnumValues=Te;exports.CloneEndpoint=L;exports.ClusteringstructureEnumValues=Pe;exports.ClustersEndpoint=V;exports.ConversionsEndpoint=k;exports.CurrentuserEndpoint=U;exports.DiffEndpoint=G;exports.DifferenceOperationEnumValues=ge;exports.DocclassCustomfieldsEndpoint=X;exports.DocclassDocumentclassesEndpoint=Y;exports.DocclassReferencedocumentsEndpoint=q;exports.DocclassTagsEndpoint=W;exports.DocumentannotationsEndpoint=$;exports.DocumentclassEndpoint=z;exports.DocumentclassesEndpoint=j;exports.DocumentmodeEnumValues=Oe;exports.DocumentsEndpoint=K;exports.DocumenttypeEndpoint=Q;exports.DocumenttypesEndpoint=Z;exports.DomainEndpoint=It;exports.DomainsEndpoint=xt;exports.ErrorFieldCodeEnumValues=De;exports.ExtractorAttributeDatatypeEnumValues=Ie;exports.ExtractorTypeEnumValues=xe;exports.FieldTypeEnumValues=Re;exports.ImageEndpoint=nt;exports.ImagesEndpoint=ot;exports.InfoEndpoint=Rt;exports.LanguagesEndpoint=vt;exports.MatcherTypeEnumValues=ve;exports.MediaType=i;exports.MessageRoleEnumValues=we;exports.ModeEnumValues=Me;exports.ModelAttributesEndpoint=Mt;exports.ModelBackupsEndpoint=St;exports.ModelBoostwordEndpoint=bt;exports.ModelBoostwordsEndpoint=At;exports.ModelDatapropertiesEndpoint=_t;exports.ModelDatapropertyEndpoint=Ht;exports.ModelDatatypesEndpoint=wt;exports.ModelDomainEndpoint=le;exports.ModelDomainsEndpoint=me;exports.ModelEndpoint=Ne;exports.ModelExtractorclassEndpoint=Bt;exports.ModelExtractorclassesEndpoint=Jt;exports.ModelExtractorsEndpoint=Lt;exports.ModelExtractortypesEndpoint=de;exports.ModelFormattersEndpoint=Vt;exports.ModelMetadataEndpoint=kt;exports.ModelMetadatatypesEndpoint=ue;exports.ModelNamedentitiesEndpoint=Ft;exports.ModelNamedentityEndpoint=Ut;exports.ModelObjectpropertiesEndpoint=Gt;exports.ModelOnemetadataEndpoint=Xt;exports.ModelRegexEndpoint=Yt;exports.ModelRegexesEndpoint=Wt;exports.ModelRelationEndpoint=qt;exports.ModelRelationsEndpoint=$t;exports.ModelRuleEndpoint=zt;exports.ModelRulefunctionsEndpoint=jt;exports.ModelRulesEndpoint=Kt;exports.ModelStopwordEndpoint=Qt;exports.ModelStopwordsEndpoint=Zt;exports.ModelSynonymEndpoint=te;exports.ModelSynonymsEndpoint=ee;exports.ModelclassesEndpoint=tt;exports.ModelinstancesEndpoint=et;exports.ModelontAttributeEndpoint=re;exports.ModelontAttributesEndpoint=ie;exports.ModelontClassEndpoint=oe;exports.ModelontClassesEndpoint=se;exports.ModelontInstanceEndpoint=ae;exports.ModelontInstancesEndpoint=pe;exports.ModelontclassInstancesEndpoint=ne;exports.NamedentitiesEndpoint=dt;exports.ParagraphEndpoint=st;exports.ParagraphsEndpoint=at;exports.PromptEndpoint=rt;exports.PromptOverviewPromptLabelEnumValues=Se;exports.PromptPromptLabelEnumValues=be;exports.PromptsEndpoint=it;exports.RangeEnumValues=Ae;exports.ReferencedocumentEndpoint=mt;exports.ReferencedocumentsEndpoint=Nt;exports.ReferencesEndpoint=Et;exports.RestClient=m;exports.RestResponse=l;exports.RolesEndpoint=F;exports.RuleFunctionTypeEnumValues=_e;exports.SemanthaAPI=ce;exports.SentenceEndpoint=pt;exports.SentencesEndpoint=lt;exports.SettingsDefaultSimilarityModeEnumValues=He;exports.SettingsEndpoint=ct;exports.SettingsExtractionStrategyEnumValues=Be;exports.SettingsTaggingStrategyEnumValues=Je;exports.SimilaritymatrixClusterEndpoint=ht;exports.SimilaritymatrixEndpoint=yt;exports.SmartClusterSemiSupervisedRequestClusteringStructureEnumValues=Le;exports.SmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValues=Ve;exports.StatisticEndpoint=ut;exports.SummarizationsEndpoint=Ct;exports.SummarylengthEnumValues=ke;exports.TagEndpoint=Tt;exports.TagReferencedocumentsEndpoint=ft;exports.TagsEndpoint=Pt;exports.TexttypesEndpoint=gt;exports.TransactionsEndpoint=Ot;exports.TypeEnumValues=Fe;exports.ValidationEndpoint=Dt;exports.isAttributeDatatypeEnumValue=Ue;exports.isAttributeOverviewDatatypeEnumValue=Xe;exports.isClassBulkDatatypeEnumValue=We;exports.isClusteringstructureEnumValue=$e;exports.isDifferenceOperationEnumValue=je;exports.isDocumentmodeEnumValue=Qe;exports.isErrorFieldCodeEnumValue=tr;exports.isExtractorAttributeDatatypeEnumValue=rr;exports.isExtractorTypeEnumValue=nr;exports.isFieldTypeEnumValue=sr;exports.isMatcherTypeEnumValue=pr;exports.isMessageRoleEnumValue=mr;exports.isModeEnumValue=ur;exports.isPromptOverviewPromptLabelEnumValue=Er;exports.isPromptPromptLabelEnumValue=hr;exports.isRangeEnumValue=Cr;exports.isRuleFunctionTypeEnumValue=Tr;exports.isSettingsDefaultSimilarityModeEnumValue=gr;exports.isSettingsExtractionStrategyEnumValue=Dr;exports.isSettingsTaggingStrategyEnumValue=xr;exports.isSmartClusterSemiSupervisedRequestClusteringStructureEnumValue=vr;exports.isSmartClusterSemiSupervisedRequestTopicOverTimeRangeEnumValue=Mr;exports.isSummarylengthEnumValue=br;exports.isTypeEnumValue=_r;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|