@semantha/product-sdk 9.5.0 → 9.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/{chunk-RZN2RHQH.mjs → chunk-7PSAJIBO.mjs} +2 -2
  2. package/dist/chunk-7PSAJIBO.mjs.map +1 -0
  3. package/dist/{chunk-BD6FBIAB.js → chunk-7QKJ4L7X.js} +2 -2
  4. package/dist/{chunk-BD6FBIAB.js.map → chunk-7QKJ4L7X.js.map} +1 -1
  5. package/dist/chunk-GOPFEO6J.mjs +2 -0
  6. package/dist/chunk-GOPFEO6J.mjs.map +1 -0
  7. package/dist/chunk-J4YBGI4L.js +2 -0
  8. package/dist/chunk-J4YBGI4L.js.map +1 -0
  9. package/dist/{chunk-NGLE5PME.mjs → chunk-OD2QEASW.mjs} +2 -2
  10. package/dist/{chunk-NGLE5PME.mjs.map → chunk-OD2QEASW.mjs.map} +1 -1
  11. package/dist/{chunk-BVBIL2G5.mjs → chunk-PHKAURIE.mjs} +2 -2
  12. package/dist/{chunk-BVBIL2G5.mjs.map → chunk-PHKAURIE.mjs.map} +1 -1
  13. package/dist/{chunk-C5C4JDWY.js → chunk-WAUCJQB4.js} +2 -2
  14. package/dist/{chunk-C5C4JDWY.js.map → chunk-WAUCJQB4.js.map} +1 -1
  15. package/dist/{chunk-ABIRID5N.js → chunk-X7XVWSY4.js} +2 -2
  16. package/dist/chunk-X7XVWSY4.js.map +1 -0
  17. package/dist/file-box/api/index.js +1 -1
  18. package/dist/file-box/api/index.mjs +1 -1
  19. package/dist/file-box/index.js +1 -1
  20. package/dist/file-box/index.mjs +1 -1
  21. package/dist/requirements/api/index.d.mts +6 -6
  22. package/dist/requirements/api/index.d.ts +6 -6
  23. package/dist/requirements/api/index.js +1 -1
  24. package/dist/requirements/api/index.js.map +1 -1
  25. package/dist/requirements/api/index.mjs +1 -1
  26. package/dist/requirements/api/index.mjs.map +1 -1
  27. package/dist/requirements/model/index.d.mts +1 -1
  28. package/dist/requirements/model/index.d.ts +1 -1
  29. package/dist/rest/index.d.mts +1 -1
  30. package/dist/rest/index.d.ts +1 -1
  31. package/dist/rest/index.js +1 -1
  32. package/dist/rest/index.mjs +1 -1
  33. package/dist/structure-navigator/api/index.d.mts +9 -9
  34. package/dist/structure-navigator/api/index.d.ts +9 -9
  35. package/dist/structure-navigator/api/index.js +1 -1
  36. package/dist/structure-navigator/api/index.mjs +1 -1
  37. package/dist/structure-navigator/index.js +1 -1
  38. package/dist/structure-navigator/index.mjs +1 -1
  39. package/dist/table-extractor/api/index.js +1 -1
  40. package/dist/table-extractor/api/index.mjs +1 -1
  41. package/dist/tracking/api/index.js +1 -1
  42. package/dist/tracking/api/index.mjs +1 -1
  43. package/dist/tracking/index.js +1 -1
  44. package/dist/tracking/index.mjs +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-5SQ5QJ63.js +0 -2
  47. package/dist/chunk-5SQ5QJ63.js.map +0 -1
  48. package/dist/chunk-ABIRID5N.js.map +0 -1
  49. package/dist/chunk-M4JMXMAG.mjs +0 -2
  50. package/dist/chunk-M4JMXMAG.mjs.map +0 -1
  51. package/dist/chunk-RZN2RHQH.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var a=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var n=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let s=e.match(/filename="?([^"]+)"?/);s&&s[1]&&(i=s[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var l=(r=>(r.JSON="application/json",r.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",r.PDF="application/pdf",r.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",r.ZIP="application/zip",r.REQIFZ="application/reqifz",r.PNG="image/png",r))(l||{}),u=class p{constructor(t,e,i,s,o){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=s;this.tokenUrl=o;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 a__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=a__default.default.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-p.LEEWAY);}return this.accessToken}async request(t,e,i,s,o){if(!s)s=await this.buildHeadersForJsonRequest();else {let c=await this.buildHeadersForRequest();s={...s,...c};}return new n(a__default.default.request({method:t,url:this.serverUrl+e,headers:{...s,"User-Agent":"semantha TypeScript SDK; "},data:o,params:i}))}async get(t,e,i,s){return this.request("GET",t,e,i,s)}async post(t,e,i,s,o="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let c=await this.buildHeadersForRequest();i={...i,...c};}return new n(a__default.default.post(this.serverUrl+t,s,{params:e,headers:i,responseType: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}}};exports.a=n;exports.b=l;exports.c=u;//# sourceMappingURL=chunk-ABIRID5N.js.map
2
- //# sourceMappingURL=chunk-ABIRID5N.js.map
1
+ 'use strict';var a=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var n=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async toFile(){let t=await this.response,e=t?.headers["content-disposition"],i="file";if(e){let s=e.match(/filename="?([^"]+)"?/);s&&s[1]&&(i=s[1]);}return new File([t.data],i)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var l=(r=>(r.JSON="application/json",r.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",r.PDF="application/pdf",r.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",r.ZIP="application/zip",r.REQIFZ="application/reqifz",r.PNG="image/png",r))(l||{}),u=class c{constructor(t,e,i,s,o){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=s;this.tokenUrl=o;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 a__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=a__default.default.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-c.LEEWAY);}return this.accessToken}async request(t,e,i,s,o){if(!s)s=await this.buildHeadersForJsonRequest();else {let p=await this.buildHeadersForRequest();s={...s,...p};}return new n(a__default.default.request({method:t,url:this.serverUrl+e,headers:{...s,"User-Agent":"semantha TypeScript SDK; "},data:o,params:i}))}async get(t,e,i,s){return this.request("GET",t,e,i,s)}async post(t,e,i,s,o="json"){if(!i)i=await this.buildHeadersForJsonRequest();else {let p=await this.buildHeadersForRequest();i={...i,...p};}return new n(a__default.default.post(this.serverUrl+t,s,{params:e,headers:i,responseType:o}))}async delete(t,e){return 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}}};exports.a=n;exports.b=l;exports.c=u;//# sourceMappingURL=chunk-X7XVWSY4.js.map
2
+ //# sourceMappingURL=chunk-X7XVWSY4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../semantha-product-sdk/rest/restResponse.ts","../semantha-product-sdk/rest/restClient.ts"],"names":["RestResponse","response","contentDisposition","filename","match","MediaType","RestClient","_RestClient","serverUrl","apiKey","clientId","client_secret","tokenUrl","data","axios","method","url","params","headers","authHeader","responseType","acceptMimeType","contentType"],"mappings":"oJAEaA,IAAAA,CAAAA,CAAN,KAAsB,CAC3B,WAAA,CAA6BC,CAAqC,CAAA,CAArC,IAAAA,CAAAA,QAAAA,CAAAA,EAAsC,CAEnE,MAAM,OAAA,EAAsB,CAC1B,OAAA,CAAQ,MAAM,IAAA,CAAK,UAAU,IAC/B,CAEA,MAAM,MAAA,EAAwB,CAC5B,IAAMA,EAA0B,MAAM,IAAA,CAAK,QACrCC,CAAAA,CAAAA,CAAqBD,CAAU,EAAA,OAAA,CAAQ,qBAAqB,CAC9DE,CAAAA,CAAAA,CAAW,MACf,CAAA,GAAID,CAAoB,CAAA,CACtB,IAAME,CAAQF,CAAAA,CAAAA,CAAmB,KAAM,CAAA,sBAAsB,CACzDE,CAAAA,CAAAA,EAASA,EAAM,CAAC,CAAA,GAClBD,CAAWC,CAAAA,CAAAA,CAAM,CAAC,CAAA,EAEtB,CACA,OAAO,IAAI,IAAK,CAAA,CAACH,CAAS,CAAA,IAAI,EAAGE,CAAQ,CAC3C,CAEA,MAAM,aAAiC,EAAA,CACrC,QAAQ,MAAM,IAAA,CAAK,QAAU,EAAA,MAC/B,CAEA,MAAM,eAAiC,CACrC,OAAA,CAAQ,MAAM,IAAA,CAAK,QAAU,EAAA,UAC/B,CACF,EC1BO,IAAKE,CACVA,CAAAA,CAAAA,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{ AxiosResponse } from 'axios';\n\nexport class RestResponse<T> {\n constructor(private readonly response: Promise<AxiosResponse<T>>) {}\n\n async toModel(): Promise<T> {\n return (await this.response).data;\n }\n\n async toFile(): Promise<File> {\n const response: AxiosResponse = await this.response;\n const contentDisposition = response?.headers['content-disposition'];\n let filename = 'file'\n if (contentDisposition) {\n const match = contentDisposition.match(/filename=\"?([^\"]+)\"?/)\n if (match && match[1]) {\n filename = match[1]\n }\n }\n return new File([response.data], filename)\n }\n\n async getStatusCode(): Promise<number> {\n return (await this.response).status;\n }\n\n async getStatusText(): Promise<string> {\n return (await this.response).statusText;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';\nimport { RestResponse } from './restResponse';\n\nexport enum MediaType {\n JSON = 'application/json',\n XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n PDF = 'application/pdf',\n DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n ZIP = 'application/zip',\n REQIFZ = 'application/reqifz',\n PNG = 'image/png'\n}\n\nexport class RestClient {\n // in seconds\n private static readonly LEEWAY = 30;\n\n private expireTime: number;\n private accessToken: string;\n\n constructor(\n private readonly serverUrl: string,\n private readonly apiKey?: string,\n private readonly clientId?: string,\n private readonly client_secret?: string,\n private readonly tokenUrl?: string\n ) {\n this.expireTime = 0.0;\n this.accessToken = '';\n }\n\n async buildHeadersForJsonRequest(): Promise<{ [key: string]: string }> {\n return {\n Accept: 'application/json',\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async buildHeadersForRequest(): Promise<{ [key: string]: string }> {\n return {\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async getToken(): Promise<string> {\n if (this.apiKey) {\n return this.apiKey;\n }\n if (\n this.clientId &&\n this.client_secret &&\n this.tokenUrl &&\n (this.accessToken == '' || this.expireTime < performance.now())\n ) {\n const data = {\n grant_type: 'client_credentials',\n client_id: this.clientId,\n client_secret: this.client_secret,\n scope: 'openid'\n };\n const response = await axios.post(this.tokenUrl, data, {\n headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' }\n });\n if (response.status >= axios.HttpStatusCode.BadRequest) {\n // example for error response: {\"error\":\"invalid_client\",\"error_description\":\"Invalid client or Invalid client credentials\"}\n // we have no token -> this leads to a permission error\n return '';\n }\n this.accessToken = response.data['id_token'] ?? response.data['access_token'];\n this.expireTime = performance.now() + (response.data['expires_in'] - RestClient.LEEWAY);\n }\n return this.accessToken;\n }\n\n private async request<R>(\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n url: string,\n params?: any,\n headers?: { [key: string]: string },\n data?: any\n ): Promise<RestResponse<R>> {\n if (!headers) {\n headers = await this.buildHeadersForJsonRequest();\n } else {\n const authHeader = await this.buildHeadersForRequest();\n headers = { ...headers, ...authHeader };\n }\n return new RestResponse<R>(\n axios.request<R>({\n method: method,\n url: this.serverUrl + url,\n headers: { ...headers, 'User-Agent': 'semantha TypeScript SDK; ' },\n data: data,\n params: params\n })\n );\n }\n\n async get<R>(url: string, params?: any, headers?: { [key: string]: string }, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('GET', url, params, headers, data);\n }\n\n async post<R>(url: string, params?: any, headers?: { [key: string]: string }, data?: any, responseType: ResponseType = 'json'): Promise<RestResponse<R>> {\n if (!headers) {\n headers = await this.buildHeadersForJsonRequest();\n } else {\n const authHeader = await this.buildHeadersForRequest();\n headers = { ...headers, ...authHeader };\n }\n return new RestResponse<R>(axios.post<R>(this.serverUrl + url, data, {params, headers, responseType}))\n }\n\n async delete(url: string, data?: any): Promise<RestResponse<void>> {\n return this.request<void>('DELETE', url, (data = data));\n }\n\n async patch<R>(url: string, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('PATCH', url, (data = data));\n }\n\n async put<R>(url: string, data: any): Promise<RestResponse<R>> {\n return this.request<R>('PUT', url, (data = data));\n }\n\n toHeader(acceptMimeType: MediaType, contentType?: string): { [key: string]: string } {\n if (contentType) {\n return { Accept: acceptMimeType, 'Content-Type': contentType };\n }\n return { Accept: acceptMimeType };\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkC5C4JDWY_js=require('../../chunk-C5C4JDWY.js');require('../../chunk-ABIRID5N.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkC5C4JDWY_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.e}});//# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkWAUCJQB4_js=require('../../chunk-WAUCJQB4.js');require('../../chunk-X7XVWSY4.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkWAUCJQB4_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.e}});//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../../chunk-BVBIL2G5.mjs';import'../../chunk-RZN2RHQH.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../../chunk-PHKAURIE.mjs';import'../../chunk-7PSAJIBO.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkC5C4JDWY_js=require('../chunk-C5C4JDWY.js'),chunkZSFNB534_js=require('../chunk-ZSFNB534.js');require('../chunk-ABIRID5N.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkC5C4JDWY_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkC5C4JDWY_js.e}});Object.defineProperty(exports,"FileTypeEnumValues",{enumerable:true,get:function(){return chunkZSFNB534_js.a}});Object.defineProperty(exports,"isFileTypeEnumValue",{enumerable:true,get:function(){return chunkZSFNB534_js.b}});//# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkWAUCJQB4_js=require('../chunk-WAUCJQB4.js'),chunkZSFNB534_js=require('../chunk-ZSFNB534.js');require('../chunk-X7XVWSY4.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkWAUCJQB4_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkWAUCJQB4_js.e}});Object.defineProperty(exports,"FileTypeEnumValues",{enumerable:true,get:function(){return chunkZSFNB534_js.a}});Object.defineProperty(exports,"isFileTypeEnumValue",{enumerable:true,get:function(){return chunkZSFNB534_js.b}});//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../chunk-BVBIL2G5.mjs';export{a as FileTypeEnumValues,b as isFileTypeEnumValue}from'../chunk-DURTIKAP.mjs';import'../chunk-RZN2RHQH.mjs';//# sourceMappingURL=index.mjs.map
1
+ export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../chunk-PHKAURIE.mjs';export{a as FileTypeEnumValues,b as isFileTypeEnumValue}from'../chunk-DURTIKAP.mjs';import'../chunk-7PSAJIBO.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,5 +1,5 @@
1
+ import { RestClient, RestResponse } from '../../rest/index.mjs';
1
2
  import { AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, PromptResult, AnalysisResultOverview, Entity, Classification, AnalysisResultComment, CurrentUser, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.mjs';
2
- import { RestClient } from '../../rest/index.mjs';
3
3
  import 'axios';
4
4
 
5
5
  /**
@@ -42,7 +42,7 @@ declare class AnalysesEndpoint {
42
42
  constructor(restClient: RestClient, parentEndpoint: string);
43
43
  report(): ReportEndpoint;
44
44
  get(): Promise<Analysis[]>;
45
- delete(): Promise<void>;
45
+ delete(): Promise<RestResponse<void>>;
46
46
  /**
47
47
  * @param file FormDataContentDisposition? -
48
48
  * @param analysisdata AnalysisInput[]? -
@@ -140,7 +140,7 @@ declare class AnalysisEndpoint {
140
140
  private readonly ENDPOINT;
141
141
  constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
142
142
  results(): AnalysisResultsEndpoint;
143
- delete(): Promise<void>;
143
+ delete(): Promise<RestResponse<void>>;
144
144
  /**
145
145
  * @param body Entity -
146
146
  */
@@ -290,7 +290,7 @@ declare class EvaluationsEndpoint {
290
290
  private readonly parentEndpoint;
291
291
  private readonly ENDPOINT;
292
292
  constructor(restClient: RestClient, parentEndpoint: string);
293
- delete(): Promise<void>;
293
+ delete(): Promise<RestResponse<void>>;
294
294
  /**
295
295
  * @param body Evaluation[] -
296
296
  */
@@ -316,7 +316,7 @@ declare class ExceltemplateEndpoint {
316
316
  get(params?: {
317
317
  analysisid?: string;
318
318
  }): Promise<ExcelTemplateDetails>;
319
- delete(): Promise<void>;
319
+ delete(): Promise<RestResponse<void>>;
320
320
  /**
321
321
  * @param body ExcelTemplateDetails -
322
322
  */
@@ -404,7 +404,7 @@ declare class ResultEndpoint {
404
404
  get(params?: {
405
405
  withreferencedocument?: boolean;
406
406
  }): Promise<AnalysisResult>;
407
- delete(): Promise<void>;
407
+ delete(): Promise<RestResponse<void>>;
408
408
  /**
409
409
  * @param body AnalysisResult -
410
410
  */
@@ -1,5 +1,5 @@
1
+ import { RestClient, RestResponse } from '../../rest/index.js';
1
2
  import { AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, PromptResult, AnalysisResultOverview, Entity, Classification, AnalysisResultComment, CurrentUser, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.js';
2
- import { RestClient } from '../../rest/index.js';
3
3
  import 'axios';
4
4
 
5
5
  /**
@@ -42,7 +42,7 @@ declare class AnalysesEndpoint {
42
42
  constructor(restClient: RestClient, parentEndpoint: string);
43
43
  report(): ReportEndpoint;
44
44
  get(): Promise<Analysis[]>;
45
- delete(): Promise<void>;
45
+ delete(): Promise<RestResponse<void>>;
46
46
  /**
47
47
  * @param file FormDataContentDisposition? -
48
48
  * @param analysisdata AnalysisInput[]? -
@@ -140,7 +140,7 @@ declare class AnalysisEndpoint {
140
140
  private readonly ENDPOINT;
141
141
  constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
142
142
  results(): AnalysisResultsEndpoint;
143
- delete(): Promise<void>;
143
+ delete(): Promise<RestResponse<void>>;
144
144
  /**
145
145
  * @param body Entity -
146
146
  */
@@ -290,7 +290,7 @@ declare class EvaluationsEndpoint {
290
290
  private readonly parentEndpoint;
291
291
  private readonly ENDPOINT;
292
292
  constructor(restClient: RestClient, parentEndpoint: string);
293
- delete(): Promise<void>;
293
+ delete(): Promise<RestResponse<void>>;
294
294
  /**
295
295
  * @param body Evaluation[] -
296
296
  */
@@ -316,7 +316,7 @@ declare class ExceltemplateEndpoint {
316
316
  get(params?: {
317
317
  analysisid?: string;
318
318
  }): Promise<ExcelTemplateDetails>;
319
- delete(): Promise<void>;
319
+ delete(): Promise<RestResponse<void>>;
320
320
  /**
321
321
  * @param body ExcelTemplateDetails -
322
322
  */
@@ -404,7 +404,7 @@ declare class ResultEndpoint {
404
404
  get(params?: {
405
405
  withreferencedocument?: boolean;
406
406
  }): Promise<AnalysisResult>;
407
- delete(): Promise<void>;
407
+ delete(): Promise<RestResponse<void>>;
408
408
  /**
409
409
  * @param body AnalysisResult -
410
410
  */
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkABIRID5N_js=require('../../chunk-ABIRID5N.js'),b=require('fs');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 b__namespace=/*#__PURE__*/_interopNamespace(b);var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/report";}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()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(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 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 p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;async postAsXlsx(t){return (await this.restClient.post(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),{},"blob")).toFile()}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;answers(){return new m(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var E=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new d(this.restClient,this.ENDPOINT)}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;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 s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new N(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/comments";}ENDPOINT;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+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new y(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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;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 P=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}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 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+"/new";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new g(this.restClient,this.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+"/references";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.resultid=n;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new c(this.restClient,this.ENDPOINT)}evaluations(){return new o(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 v=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;analyses(t){return t!=null?new E(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new h(this.restClient,this.ENDPOINT)}classifications(){return new u(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new f(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new P(this.restClient,this.ENDPOINT,t):new T(this.restClient,this.ENDPOINT)}references(){return new O(this.restClient,this.ENDPOINT)}results(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new C(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new v(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var M="/api",S=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 chunkABIRID5N_js.c(this.parseServerUrl(t),e),M)}static loginWithCredentials(t,e,n,R){return t=this.parseServerUrl(t),new r(new chunkABIRID5N_js.c(t,void 0,e,n,R),M)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=b__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(w=>w.length!==0).map(w=>w.split("=")),R=this.getValueOfInPropertiesFile("serverUrl",n),H=this.getValueOfInPropertiesFile("clientId",n),J=this.getValueOfInPropertiesFile("clientSecret",n),F=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(R,H,J,F)}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-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-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}requirements(){return new x(this.restClient,this.endpoint())}};exports.AnalysesEndpoint=l;exports.AnalysisAnswersEndpoint=m;exports.AnalysisEndpoint=E;exports.AnalysisExportEndpoint=p;exports.AnalysisResultsEndpoint=d;exports.BulkEndpoint=h;exports.ClassificationsEndpoint=u;exports.CommentsEndpoint=c;exports.CurrentuserEndpoint=C;exports.DomainEndpoint=v;exports.DomainsEndpoint=I;exports.EvaluationEndpoint=f;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=P;exports.ExceltemplatesEndpoint=T;exports.ExportEndpoint=N;exports.NewEndpoint=g;exports.ReferencesEndpoint=O;exports.ReportEndpoint=a;exports.RequirementsAPI=S;exports.RequirementsEndpoint=x;exports.ResultEndpoint=D;exports.ResultsEndpoint=s;exports.RolesEndpoint=y;//# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkX7XVWSY4_js=require('../../chunk-X7XVWSY4.js'),b=require('fs');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 b__namespace=/*#__PURE__*/_interopNamespace(b);var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/report";}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()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}async postJson(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+"/export";}ENDPOINT;async postAsXlsx(t){return (await this.restClient.post(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),{},"blob")).toFile()}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;answers(){return new m(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var E=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new d(this.restClient,this.ENDPOINT)}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;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 s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new N(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/comments";}ENDPOINT;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+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new y(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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async 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+"/new";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new g(this.restClient,this.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+"/references";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.resultid=n;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new c(this.restClient,this.ENDPOINT)}evaluations(){return new o(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,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;analyses(t){return t!=null?new E(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new h(this.restClient,this.ENDPOINT)}classifications(){return new u(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new f(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new P(this.restClient,this.ENDPOINT,t):new T(this.restClient,this.ENDPOINT)}references(){return new O(this.restClient,this.ENDPOINT)}results(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new C(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new I(this.restClient,this.ENDPOINT,t):new v(this.restClient,this.ENDPOINT)}};var M="/api",S=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 chunkX7XVWSY4_js.c(this.parseServerUrl(t),e),M)}static loginWithCredentials(t,e,n,R){return t=this.parseServerUrl(t),new r(new chunkX7XVWSY4_js.c(t,void 0,e,n,R),M)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=b__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(w=>w.length!==0).map(w=>w.split("=")),R=this.getValueOfInPropertiesFile("serverUrl",n),H=this.getValueOfInPropertiesFile("clientId",n),J=this.getValueOfInPropertiesFile("clientSecret",n),F=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(R,H,J,F)}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-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-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}requirements(){return new x(this.restClient,this.endpoint())}};exports.AnalysesEndpoint=l;exports.AnalysisAnswersEndpoint=m;exports.AnalysisEndpoint=E;exports.AnalysisExportEndpoint=p;exports.AnalysisResultsEndpoint=d;exports.BulkEndpoint=h;exports.ClassificationsEndpoint=u;exports.CommentsEndpoint=c;exports.CurrentuserEndpoint=C;exports.DomainEndpoint=I;exports.DomainsEndpoint=v;exports.EvaluationEndpoint=f;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=P;exports.ExceltemplatesEndpoint=T;exports.ExportEndpoint=N;exports.NewEndpoint=g;exports.ReferencesEndpoint=O;exports.ReportEndpoint=a;exports.RequirementsAPI=S;exports.RequirementsEndpoint=x;exports.ResultEndpoint=D;exports.ResultsEndpoint=s;exports.RolesEndpoint=y;//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../semantha-product-sdk/requirements/api/report.ts","../../../semantha-product-sdk/requirements/api/analyses.ts","../../../semantha-product-sdk/requirements/api/analysisExport.ts","../../../semantha-product-sdk/requirements/api/analysisAnswers.ts","../../../semantha-product-sdk/requirements/api/analysisResults.ts","../../../semantha-product-sdk/requirements/api/analysis.ts","../../../semantha-product-sdk/requirements/api/export.ts","../../../semantha-product-sdk/requirements/api/results.ts","../../../semantha-product-sdk/requirements/api/bulk.ts","../../../semantha-product-sdk/requirements/api/classifications.ts","../../../semantha-product-sdk/requirements/api/comments.ts","../../../semantha-product-sdk/requirements/api/roles.ts","../../../semantha-product-sdk/requirements/api/currentuser.ts","../../../semantha-product-sdk/requirements/api/evaluation.ts","../../../semantha-product-sdk/requirements/api/evaluations.ts","../../../semantha-product-sdk/requirements/api/exceltemplate.ts","../../../semantha-product-sdk/requirements/api/new.ts","../../../semantha-product-sdk/requirements/api/exceltemplates.ts","../../../semantha-product-sdk/requirements/api/references.ts","../../../semantha-product-sdk/requirements/api/result.ts","../../../semantha-product-sdk/requirements/api/domain.ts","../../../semantha-product-sdk/requirements/api/domains.ts","../../../semantha-product-sdk/requirements/api/requirements.ts","../../../semantha-product-sdk/requirements/api/requirementsAPI.ts"],"names":["ReportEndpoint","restClient","parentEndpoint","body","params","AnalysesEndpoint","data","AnalysisExportEndpoint","AnalysisAnswersEndpoint","AnalysisResultsEndpoint","AnalysisEndpoint","analysisid","ExportEndpoint","ResultsEndpoint","BulkEndpoint","ClassificationsEndpoint","CommentsEndpoint","RolesEndpoint","CurrentuserEndpoint","EvaluationEndpoint","id","EvaluationsEndpoint","ExceltemplateEndpoint","NewEndpoint","ExceltemplatesEndpoint","ReferencesEndpoint","ResultEndpoint","resultid","DomainEndpoint","domainname","DomainsEndpoint","RequirementsEndpoint","PARENT_ENDPOINT","RequirementsAPI","_RequirementsAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","b","line","searchKey"],"mappings":"2bAUaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,EACAC,CACjB,CAAA,CAFiB,gBAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,EAEjB,IAAK,CAAA,QAAA,CAAW,KAAK,cAAiB,CAAA,UACxC,CAPiB,QAYjB,CAAA,MAAM,KACJC,CACAC,CAAAA,CAAAA,CAG0B,CAC1B,OACE,CAAA,MAAM,KAAK,UAAW,CAAA,IAAA,CACpB,KAAK,QACLA,CAAAA,CAAAA,CACA,KA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qBC,EAAWG,CAAUC,CAAAA,CAAAA,CAAcC,CAAQ,CACzF,CACG,MAAM,IAAI,KAAA,CAAM,6DAA6D,CAC/E,CAEA,OAAe,cAAeL,CAAAA,CAAAA,CAA2B,CACvD,OAAIA,CAAAA,CAAU,SAAS,GAAG,CAAA,GACxBA,EAAYA,CAAU,CAAA,KAAA,CAAM,EAAG,EAAE,CAAA,CAAA,CAE/BA,EAAU,QAAS,CAAA,sBAAsB,EAC3CA,CAAYA,CAAAA,CAAAA,CAAU,QAAQ,sBAAwB,CAAA,oBAAoB,EAChEA,CAAU,CAAA,QAAA,CAAS,oBAAoB,CAAA,GACjDA,CAAa,EAAA,oBAAA,CAAA,CAERA,CACT,CAEA,OAAe,2BAA2BU,CAAmBH,CAAAA,CAAAA,CAA2B,CACtF,IAAWE,IAAAA,CAAAA,IAAQF,EACjB,GAAIE,CAAAA,CAAK,CAAC,CAAMC,GAAAA,CAAAA,CACd,OAAOD,CAAK,CAAA,CAAC,EAAE,OAAQ,CAAA,KAAA,CAAO,GAAG,CAGrC,CAAA,MAAM,MAAM,CAAiCC,8BAAAA,EAAAA,CAAS,GAAG,CAC3D,CAEA,UAAmB,CACjB,OAAO,KAAK,cACd,CAEA,cAAqC,CACnC,OAAO,IAAId,CAAqB,CAAA,IAAA,CAAK,WAAY,IAAK,CAAA,QAAA,EAAU,CAClE,CAEF","file":"index.js","sourcesContent":["import { AnalysesReport } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/report\"\n * This is a generated file do not change manually!\n */\nexport class ReportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/report\";\n }\n\n /**\n * @param body string[]? - \n */\n async post(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<AnalysesReport> {\n return (\n await this.restClient.post<AnalysesReport>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n \n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Analysis } from '../model';\nimport { AnalysisCreation } from '../model';\nimport { AnalysisInput } from '../model';\nimport { FormDataContentDisposition } from '../model';\nimport { MediaType } from '../../rest';\nimport { ReportEndpoint } from './report';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses\"\n * This is a generated file do not change manually!\n */\nexport class AnalysesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\";\n }\n\n report(): ReportEndpoint {\n return new ReportEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Analysis[]> {\n return (\n await this.restClient.get<Analysis[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param file FormDataContentDisposition? - \n * @param analysisdata AnalysisInput[]? - \n * @param similaritythreshold number? - \n * @param strategy string? - \n * @param name string? - \n * @param maxreferences number? - \n * @param tags string? - \n * @param documentclassids string[]? - \n * @param goodmatchesthreshold number? - \n * @param matchallreferences boolean? - \n * @param showdocscore boolean? - \n * @param type string? - \n * @param promptid string? - \n */\n async post(data: {\n file?: FormDataContentDisposition,\n analysisdata?: AnalysisInput[],\n similaritythreshold?: number,\n strategy?: string,\n name?: string,\n maxreferences?: number,\n tags?: string,\n documentclassids?: string[],\n goodmatchesthreshold?: number,\n matchallreferences?: boolean,\n showdocscore?: boolean,\n type?: string,\n promptid?: string,\n }): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n \n /**\n * @param body AnalysisCreation? - \n */\n async postJson(\n body?: AnalysisCreation,\n ): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers/export\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisExportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/export\";\n }\n\n async postAsXlsx(params?: {\n templateid?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n {},\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { AnalysisExportEndpoint } from './analysisExport';\nimport { MediaType } from '../../rest';\nimport { PromptResult } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisAnswersEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/answers\";\n }\n\n export(): AnalysisExportEndpoint {\n return new AnalysisExportEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<PromptResult[]> {\n return (\n await this.restClient.get<PromptResult[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { AnalysisAnswersEndpoint } from './analysisAnswers';\nimport { AnalysisResultOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisResultsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\";\n }\n\n answers(): AnalysisAnswersEndpoint {\n return new AnalysisAnswersEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(params?: {\n withdetails?: boolean,\n }): Promise<AnalysisResultOverview[]> {\n return (\n await this.restClient.get<AnalysisResultOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Analysis } from '../model';\nimport { AnalysisResultsEndpoint } from './analysisResults';\nimport { Entity } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly analysisid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\" + `/${this.analysisid}`;\n }\n\n results(): AnalysisResultsEndpoint {\n return new AnalysisResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Entity - \n */\n async patch(\n body: Entity,\n ): Promise<Analysis> {\n return (\n await this.restClient.patch<Analysis>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/export\"\n * This is a generated file do not change manually!\n */\nexport class ExportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/export\";\n }\n\n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { ExportEndpoint } from './export';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results\"\n * This is a generated file do not change manually!\n */\nexport class ResultsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\";\n }\n\n export(): ExportEndpoint {\n return new ExportEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { RestClient } from '../../rest';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/bulk\"\n * This is a generated file do not change manually!\n */\nexport class BulkEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/bulk\";\n }\n\n results(): ResultsEndpoint {\n return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { Classification } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/classifications\"\n * This is a generated file do not change manually!\n */\nexport class ClassificationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/classifications\";\n }\n\n async get(): Promise<Classification[]> {\n return (\n await this.restClient.get<Classification[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { AnalysisResultComment } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/comments\"\n * This is a generated file do not change manually!\n */\nexport class CommentsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/comments\";\n }\n\n /**\n * @param body AnalysisResultComment? - \n */\n async post(\n body?: AnalysisResultComment,\n ): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser/roles\"\n * This is a generated file do not change manually!\n */\nexport class RolesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/roles\";\n }\n\n /**\n * Get the role/s of the current user.\n */\n async get(): Promise<string[]> {\n return (\n await this.restClient.get<string[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { CurrentUser } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { RolesEndpoint } from './roles';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser\"\n * This is a generated file do not change manually!\n */\nexport class CurrentuserEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/currentuser\";\n }\n\n roles(): RolesEndpoint {\n return new RolesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Get information about the current user.\n */\n async get(): Promise<CurrentUser> {\n return (\n await this.restClient.get<CurrentUser>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/evaluations/{id}\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\" + `/${this.id}`;\n }\n\n async get(): Promise<Evaluation> {\n return (\n await this.restClient.get<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation - \n */\n async patch(\n body: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.patch<Evaluation>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/evaluations\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\";\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Evaluation[] - \n */\n async put(\n body: Evaluation[],\n ): Promise<Evaluation[]> {\n return (\n await this.restClient.put<Evaluation[]>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation? - \n */\n async post(\n body?: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.post<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/{id}\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplateEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\" + `/${this.id}`;\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body ExcelTemplateDetails - \n */\n async put(\n body: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.put<ExcelTemplateDetails>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/new\"\n * This is a generated file do not change manually!\n */\nexport class NewEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/new\";\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Entity } from '../model';\nimport { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { NewEndpoint } from './new';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplatesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\";\n }\n\n new(): NewEndpoint {\n return new NewEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Entity[]> {\n return (\n await this.restClient.get<Entity[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body ExcelTemplateDetails? - \n */\n async post(\n body?: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.post<ExcelTemplateDetails>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { AnalysisInput } from '../model';\nimport { ExtendedReference } from '../model';\nimport { MediaType } from '../../rest';\nimport { ModeEnum } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/references\"\n * This is a generated file do not change manually!\n */\nexport class ReferencesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/references\";\n }\n\n /**\n * @param file AnalysisInput? - \n * @param referencedocument Blob? - Optional reference documents\n * @param tags string? - \n * @param similaritythreshold number? - \n * @param documentclassids string[]? - \n * @param mode ModeEnum? - \n */\n async post(data: {\n file?: AnalysisInput,\n referencedocument?: Blob,\n tags?: string,\n similaritythreshold?: number,\n documentclassids?: string[],\n mode?: ModeEnum,\n }): Promise<ExtendedReference[]> {\n return (\n await this.restClient.post<ExtendedReference[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { AnalysisResult } from '../model';\nimport { CommentsEndpoint } from './comments';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}\"\n * This is a generated file do not change manually!\n */\nexport class ResultEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly resultid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\" + `/${this.resultid}`;\n }\n\n comments(): CommentsEndpoint {\n return new CommentsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint {\n return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(params?: {\n withreferencedocument?: boolean,\n }): Promise<AnalysisResult> {\n return (\n await this.restClient.get<AnalysisResult>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body AnalysisResult - \n */\n async patch(\n body: AnalysisResult,\n ): Promise<AnalysisResult> {\n return (\n await this.restClient.patch<AnalysisResult>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { AnalysesEndpoint } from './analyses';\nimport { AnalysisEndpoint } from './analysis';\nimport { BulkEndpoint } from './bulk';\nimport { ClassificationsEndpoint } from './classifications';\nimport { EvaluationEndpoint } from './evaluation';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { ExceltemplateEndpoint } from './exceltemplate';\nimport { ExceltemplatesEndpoint } from './exceltemplates';\nimport { ReferencesEndpoint } from './references';\nimport { RestClient } from '../../rest';\nimport { ResultEndpoint } from './result';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n analyses(): AnalysesEndpoint;\n analyses(analysisid: string): AnalysisEndpoint\n \n analyses(analysisid?: string): AnalysisEndpoint | AnalysesEndpoint {\n if(analysisid !== undefined && analysisid !== null) {\n\t return new AnalysisEndpoint(this.restClient, this.ENDPOINT, analysisid);\n } else {\n\t return new AnalysesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n bulk(): BulkEndpoint {\n return new BulkEndpoint(this.restClient, this.ENDPOINT);\n }\n\n classifications(): ClassificationsEndpoint {\n return new ClassificationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint;\n evaluations(id: string): EvaluationEndpoint\n \n evaluations(id?: string): EvaluationEndpoint | EvaluationsEndpoint {\n if(id !== undefined && id !== null) {\n\t return new EvaluationEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n exceltemplates(): ExceltemplatesEndpoint;\n exceltemplates(id: string): ExceltemplateEndpoint\n \n exceltemplates(id?: string): ExceltemplateEndpoint | ExceltemplatesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new ExceltemplateEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new ExceltemplatesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n references(): ReferencesEndpoint {\n return new ReferencesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n results(): ResultsEndpoint;\n results(resultid: string): ResultEndpoint\n \n results(resultid?: string): ResultEndpoint | ResultsEndpoint {\n if(resultid !== undefined && resultid !== null) {\n\t return new ResultEndpoint(this.restClient, this.ENDPOINT, resultid);\n } else {\n\t return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { CurrentuserEndpoint } from './currentuser';\nimport { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements\"\n * This is a generated file do not change manually!\n */\nexport class RequirementsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/requirements\";\n }\n\n currentuser(): CurrentuserEndpoint {\n return new CurrentuserEndpoint(this.restClient, this.ENDPOINT);\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { RequirementsEndpoint } from './requirements';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the Requirements API.\n *\n * @author semantha\n * Calls the /requirements, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class RequirementsAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): RequirementsAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new RequirementsAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): RequirementsAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new RequirementsAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the Requirements API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : RequirementsAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return RequirementsAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n requirements(): RequirementsEndpoint {\n return new RequirementsEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
1
+ {"version":3,"sources":["../../../semantha-product-sdk/requirements/api/report.ts","../../../semantha-product-sdk/requirements/api/analyses.ts","../../../semantha-product-sdk/requirements/api/analysisExport.ts","../../../semantha-product-sdk/requirements/api/analysisAnswers.ts","../../../semantha-product-sdk/requirements/api/analysisResults.ts","../../../semantha-product-sdk/requirements/api/analysis.ts","../../../semantha-product-sdk/requirements/api/export.ts","../../../semantha-product-sdk/requirements/api/results.ts","../../../semantha-product-sdk/requirements/api/bulk.ts","../../../semantha-product-sdk/requirements/api/classifications.ts","../../../semantha-product-sdk/requirements/api/comments.ts","../../../semantha-product-sdk/requirements/api/roles.ts","../../../semantha-product-sdk/requirements/api/currentuser.ts","../../../semantha-product-sdk/requirements/api/evaluation.ts","../../../semantha-product-sdk/requirements/api/evaluations.ts","../../../semantha-product-sdk/requirements/api/exceltemplate.ts","../../../semantha-product-sdk/requirements/api/new.ts","../../../semantha-product-sdk/requirements/api/exceltemplates.ts","../../../semantha-product-sdk/requirements/api/references.ts","../../../semantha-product-sdk/requirements/api/result.ts","../../../semantha-product-sdk/requirements/api/domain.ts","../../../semantha-product-sdk/requirements/api/domains.ts","../../../semantha-product-sdk/requirements/api/requirements.ts","../../../semantha-product-sdk/requirements/api/requirementsAPI.ts"],"names":["ReportEndpoint","restClient","parentEndpoint","body","params","AnalysesEndpoint","data","AnalysisExportEndpoint","AnalysisAnswersEndpoint","AnalysisResultsEndpoint","AnalysisEndpoint","analysisid","ExportEndpoint","ResultsEndpoint","BulkEndpoint","ClassificationsEndpoint","CommentsEndpoint","RolesEndpoint","CurrentuserEndpoint","EvaluationEndpoint","id","EvaluationsEndpoint","ExceltemplateEndpoint","NewEndpoint","ExceltemplatesEndpoint","ReferencesEndpoint","ResultEndpoint","resultid","DomainEndpoint","domainname","DomainsEndpoint","RequirementsEndpoint","PARENT_ENDPOINT","RequirementsAPI","_RequirementsAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","b","line","searchKey"],"mappings":"2bAUaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,EACAC,CACjB,CAAA,CAFiB,gBAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,EAEjB,IAAK,CAAA,QAAA,CAAW,KAAK,cAAiB,CAAA,UACxC,CAPiB,QAYjB,CAAA,MAAM,KACJC,CACAC,CAAAA,CAAAA,CAG0B,CAC1B,OACE,CAAA,MAAM,KAAK,UAAW,CAAA,IAAA,CACpB,KAAK,QACLA,CAAAA,CAAAA,CACA,KAAK,UAAW,CAAA,QAAA,CAAA,kBAAuB,EACvCD,CACF,CAAA,EACA,SACJ,CAKA,MAAM,UACJA,CAAAA,CAAAA,CACAC,CAGgB,CAAA,CAChB,OACE,CAAA,MAAM,KAAK,UAAW,CAAA,IAAA,CACpB,KAAK,QACLA,CAAAA,CAAAA,CACA,KAAK,UAAW,CAAA,QAAA,CAAA,mEAAuB,EACvCD,CACA,CAAA,MACF,GACA,MAAO,EACX,CACF,EC5CO,IAAME,EAAN,KAAuB,CAG5B,YACmBJ,CACAC,CAAAA,CAAAA,CACjB,CAFiB,IAAAD,CAAAA,UAAAA,CAAAA,CAAAA,CACA,oBAAAC,CAEjB,CAAA,IAAA,CAAK,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A,CAAmBH,EAA2B,CACtF,IAAA,IAAWE,KAAQF,CACjB,CAAA,GAAIE,EAAK,CAAC,CAAA,GAAMC,EACd,OAAOD,CAAAA,CAAK,CAAC,CAAE,CAAA,OAAA,CAAQ,KAAO,CAAA,GAAG,CAGrC,CAAA,MAAM,MAAM,CAAiCC,8BAAAA,EAAAA,CAAS,GAAG,CAC3D,CAEA,UAAmB,CACjB,OAAO,KAAK,cACd,CAEA,cAAqC,CACnC,OAAO,IAAId,CAAqB,CAAA,IAAA,CAAK,WAAY,IAAK,CAAA,QAAA,EAAU,CAClE,CAEF","file":"index.js","sourcesContent":["import { AnalysesReport } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/report\"\n * This is a generated file do not change manually!\n */\nexport class ReportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/report\";\n }\n\n /**\n * @param body string[]? - \n */\n async post(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<AnalysesReport> {\n return (\n await this.restClient.post<AnalysesReport>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n \n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Analysis } from '../model';\nimport { AnalysisCreation } from '../model';\nimport { AnalysisInput } from '../model';\nimport { FormDataContentDisposition } from '../model';\nimport { MediaType } from '../../rest';\nimport { ReportEndpoint } from './report';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses\"\n * This is a generated file do not change manually!\n */\nexport class AnalysesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\";\n }\n\n report(): ReportEndpoint {\n return new ReportEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Analysis[]> {\n return (\n await this.restClient.get<Analysis[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param file FormDataContentDisposition? - \n * @param analysisdata AnalysisInput[]? - \n * @param similaritythreshold number? - \n * @param strategy string? - \n * @param name string? - \n * @param maxreferences number? - \n * @param tags string? - \n * @param documentclassids string[]? - \n * @param goodmatchesthreshold number? - \n * @param matchallreferences boolean? - \n * @param showdocscore boolean? - \n * @param type string? - \n * @param promptid string? - \n */\n async post(data: {\n file?: FormDataContentDisposition,\n analysisdata?: AnalysisInput[],\n similaritythreshold?: number,\n strategy?: string,\n name?: string,\n maxreferences?: number,\n tags?: string,\n documentclassids?: string[],\n goodmatchesthreshold?: number,\n matchallreferences?: boolean,\n showdocscore?: boolean,\n type?: string,\n promptid?: string,\n }): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n \n /**\n * @param body AnalysisCreation? - \n */\n async postJson(\n body?: AnalysisCreation,\n ): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers/export\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisExportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/export\";\n }\n\n async postAsXlsx(params?: {\n templateid?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n {},\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { AnalysisExportEndpoint } from './analysisExport';\nimport { MediaType } from '../../rest';\nimport { PromptResult } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisAnswersEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/answers\";\n }\n\n export(): AnalysisExportEndpoint {\n return new AnalysisExportEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<PromptResult[]> {\n return (\n await this.restClient.get<PromptResult[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { AnalysisAnswersEndpoint } from './analysisAnswers';\nimport { AnalysisResultOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}/results\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisResultsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\";\n }\n\n answers(): AnalysisAnswersEndpoint {\n return new AnalysisAnswersEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(params?: {\n withdetails?: boolean,\n }): Promise<AnalysisResultOverview[]> {\n return (\n await this.restClient.get<AnalysisResultOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Analysis } from '../model';\nimport { AnalysisResultsEndpoint } from './analysisResults';\nimport { Entity } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly analysisid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\" + `/${this.analysisid}`;\n }\n\n results(): AnalysisResultsEndpoint {\n return new AnalysisResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Entity - \n */\n async patch(\n body: Entity,\n ): Promise<Analysis> {\n return (\n await this.restClient.patch<Analysis>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/export\"\n * This is a generated file do not change manually!\n */\nexport class ExportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/export\";\n }\n\n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { ExportEndpoint } from './export';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results\"\n * This is a generated file do not change manually!\n */\nexport class ResultsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\";\n }\n\n export(): ExportEndpoint {\n return new ExportEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { RestClient } from '../../rest';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/bulk\"\n * This is a generated file do not change manually!\n */\nexport class BulkEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/bulk\";\n }\n\n results(): ResultsEndpoint {\n return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { Classification } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/classifications\"\n * This is a generated file do not change manually!\n */\nexport class ClassificationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/classifications\";\n }\n\n async get(): Promise<Classification[]> {\n return (\n await this.restClient.get<Classification[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { AnalysisResultComment } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/comments\"\n * This is a generated file do not change manually!\n */\nexport class CommentsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/comments\";\n }\n\n /**\n * @param body AnalysisResultComment? - \n */\n async post(\n body?: AnalysisResultComment,\n ): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser/roles\"\n * This is a generated file do not change manually!\n */\nexport class RolesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/roles\";\n }\n\n /**\n * Get the role/s of the current user.\n */\n async get(): Promise<string[]> {\n return (\n await this.restClient.get<string[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { CurrentUser } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { RolesEndpoint } from './roles';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser\"\n * This is a generated file do not change manually!\n */\nexport class CurrentuserEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/currentuser\";\n }\n\n roles(): RolesEndpoint {\n return new RolesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Get information about the current user.\n */\n async get(): Promise<CurrentUser> {\n return (\n await this.restClient.get<CurrentUser>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/evaluations/{id}\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\" + `/${this.id}`;\n }\n\n async get(): Promise<Evaluation> {\n return (\n await this.restClient.get<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation - \n */\n async patch(\n body: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.patch<Evaluation>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/evaluations\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\";\n }\n\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Evaluation[] - \n */\n async put(\n body: Evaluation[],\n ): Promise<Evaluation[]> {\n return (\n await this.restClient.put<Evaluation[]>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation? - \n */\n async post(\n body?: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.post<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/{id}\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplateEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\" + `/${this.id}`;\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body ExcelTemplateDetails - \n */\n async put(\n body: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.put<ExcelTemplateDetails>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/new\"\n * This is a generated file do not change manually!\n */\nexport class NewEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/new\";\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Entity } from '../model';\nimport { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { NewEndpoint } from './new';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplatesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\";\n }\n\n new(): NewEndpoint {\n return new NewEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Entity[]> {\n return (\n await this.restClient.get<Entity[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body ExcelTemplateDetails? - \n */\n async post(\n body?: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.post<ExcelTemplateDetails>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { AnalysisInput } from '../model';\nimport { ExtendedReference } from '../model';\nimport { MediaType } from '../../rest';\nimport { ModeEnum } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/references\"\n * This is a generated file do not change manually!\n */\nexport class ReferencesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/references\";\n }\n\n /**\n * @param file AnalysisInput? - \n * @param referencedocument Blob? - Optional reference documents\n * @param tags string? - \n * @param similaritythreshold number? - \n * @param documentclassids string[]? - \n * @param mode ModeEnum? - \n */\n async post(data: {\n file?: AnalysisInput,\n referencedocument?: Blob,\n tags?: string,\n similaritythreshold?: number,\n documentclassids?: string[],\n mode?: ModeEnum,\n }): Promise<ExtendedReference[]> {\n return (\n await this.restClient.post<ExtendedReference[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { AnalysisResult } from '../model';\nimport { CommentsEndpoint } from './comments';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}\"\n * This is a generated file do not change manually!\n */\nexport class ResultEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly resultid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\" + `/${this.resultid}`;\n }\n\n comments(): CommentsEndpoint {\n return new CommentsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint {\n return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(params?: {\n withreferencedocument?: boolean,\n }): Promise<AnalysisResult> {\n return (\n await this.restClient.get<AnalysisResult>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body AnalysisResult - \n */\n async patch(\n body: AnalysisResult,\n ): Promise<AnalysisResult> {\n return (\n await this.restClient.patch<AnalysisResult>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { AnalysesEndpoint } from './analyses';\nimport { AnalysisEndpoint } from './analysis';\nimport { BulkEndpoint } from './bulk';\nimport { ClassificationsEndpoint } from './classifications';\nimport { EvaluationEndpoint } from './evaluation';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { ExceltemplateEndpoint } from './exceltemplate';\nimport { ExceltemplatesEndpoint } from './exceltemplates';\nimport { ReferencesEndpoint } from './references';\nimport { RestClient } from '../../rest';\nimport { ResultEndpoint } from './result';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n analyses(): AnalysesEndpoint;\n analyses(analysisid: string): AnalysisEndpoint\n \n analyses(analysisid?: string): AnalysisEndpoint | AnalysesEndpoint {\n if(analysisid !== undefined && analysisid !== null) {\n\t return new AnalysisEndpoint(this.restClient, this.ENDPOINT, analysisid);\n } else {\n\t return new AnalysesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n bulk(): BulkEndpoint {\n return new BulkEndpoint(this.restClient, this.ENDPOINT);\n }\n\n classifications(): ClassificationsEndpoint {\n return new ClassificationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint;\n evaluations(id: string): EvaluationEndpoint\n \n evaluations(id?: string): EvaluationEndpoint | EvaluationsEndpoint {\n if(id !== undefined && id !== null) {\n\t return new EvaluationEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n exceltemplates(): ExceltemplatesEndpoint;\n exceltemplates(id: string): ExceltemplateEndpoint\n \n exceltemplates(id?: string): ExceltemplateEndpoint | ExceltemplatesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new ExceltemplateEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new ExceltemplatesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n references(): ReferencesEndpoint {\n return new ReferencesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n results(): ResultsEndpoint;\n results(resultid: string): ResultEndpoint\n \n results(resultid?: string): ResultEndpoint | ResultsEndpoint {\n if(resultid !== undefined && resultid !== null) {\n\t return new ResultEndpoint(this.restClient, this.ENDPOINT, resultid);\n } else {\n\t return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { CurrentuserEndpoint } from './currentuser';\nimport { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements\"\n * This is a generated file do not change manually!\n */\nexport class RequirementsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/requirements\";\n }\n\n currentuser(): CurrentuserEndpoint {\n return new CurrentuserEndpoint(this.restClient, this.ENDPOINT);\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { RequirementsEndpoint } from './requirements';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the Requirements API.\n *\n * @author semantha\n * Calls the /requirements, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class RequirementsAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): RequirementsAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new RequirementsAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): RequirementsAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new RequirementsAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the Requirements API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : RequirementsAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return RequirementsAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n requirements(): RequirementsEndpoint {\n return new RequirementsEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -1,2 +1,2 @@
1
- import {c as c$1}from'../../chunk-RZN2RHQH.mjs';import*as b from'fs';var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/report";}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()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(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 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 p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;async postAsXlsx(t){return (await this.restClient.post(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),{},"blob")).toFile()}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;answers(){return new m(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var E=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new d(this.restClient,this.ENDPOINT)}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;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 s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new N(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/comments";}ENDPOINT;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+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new y(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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;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 P=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}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 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+"/new";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new g(this.restClient,this.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+"/references";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.resultid=n;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new c(this.restClient,this.ENDPOINT)}evaluations(){return new o(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 v=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;analyses(t){return t!=null?new E(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new h(this.restClient,this.ENDPOINT)}classifications(){return new u(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new f(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new P(this.restClient,this.ENDPOINT,t):new T(this.restClient,this.ENDPOINT)}references(){return new O(this.restClient,this.ENDPOINT)}results(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var I=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new C(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new v(this.restClient,this.ENDPOINT,t):new I(this.restClient,this.ENDPOINT)}};var M="/api",S=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 c$1(this.parseServerUrl(t),e),M)}static loginWithCredentials(t,e,n,R){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,n,R),M)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=b.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(w=>w.length!==0).map(w=>w.split("=")),R=this.getValueOfInPropertiesFile("serverUrl",n),H=this.getValueOfInPropertiesFile("clientId",n),J=this.getValueOfInPropertiesFile("clientSecret",n),F=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(R,H,J,F)}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-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-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}requirements(){return new x(this.restClient,this.endpoint())}};export{l as AnalysesEndpoint,m as AnalysisAnswersEndpoint,E as AnalysisEndpoint,p as AnalysisExportEndpoint,d as AnalysisResultsEndpoint,h as BulkEndpoint,u as ClassificationsEndpoint,c as CommentsEndpoint,C as CurrentuserEndpoint,v as DomainEndpoint,I as DomainsEndpoint,f as EvaluationEndpoint,o as EvaluationsEndpoint,P as ExceltemplateEndpoint,T as ExceltemplatesEndpoint,N as ExportEndpoint,g as NewEndpoint,O as ReferencesEndpoint,a as ReportEndpoint,S as RequirementsAPI,x as RequirementsEndpoint,D as ResultEndpoint,s as ResultsEndpoint,y as RolesEndpoint};//# sourceMappingURL=index.mjs.map
1
+ import {c as c$1}from'../../chunk-7PSAJIBO.mjs';import*as b from'fs';var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/report";}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()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}async postJson(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+"/export";}ENDPOINT;async postAsXlsx(t){return (await this.restClient.post(this.ENDPOINT,t,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),{},"blob")).toFile()}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/answers";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;answers(){return new m(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var E=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new d(this.restClient,this.ENDPOINT)}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/export";}ENDPOINT;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 s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new N(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/bulk";}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/comments";}ENDPOINT;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+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new y(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,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;async delete(){return await this.restClient.delete(this.ENDPOINT)}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var P=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.id=n;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async 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+"/new";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new g(this.restClient,this.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+"/references";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var D=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.resultid=n;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new c(this.restClient,this.ENDPOINT)}evaluations(){return new o(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,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;analyses(t){return t!=null?new E(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new h(this.restClient,this.ENDPOINT)}classifications(){return new u(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new f(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new P(this.restClient,this.ENDPOINT,t):new T(this.restClient,this.ENDPOINT)}references(){return new O(this.restClient,this.ENDPOINT)}results(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var v=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new C(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new I(this.restClient,this.ENDPOINT,t):new v(this.restClient,this.ENDPOINT)}};var M="/api",S=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 c$1(this.parseServerUrl(t),e),M)}static loginWithCredentials(t,e,n,R){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,n,R),M)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=b.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(w=>w.length!==0).map(w=>w.split("=")),R=this.getValueOfInPropertiesFile("serverUrl",n),H=this.getValueOfInPropertiesFile("clientId",n),J=this.getValueOfInPropertiesFile("clientSecret",n),F=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(R,H,J,F)}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-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-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}requirements(){return new x(this.restClient,this.endpoint())}};export{l as AnalysesEndpoint,m as AnalysisAnswersEndpoint,E as AnalysisEndpoint,p as AnalysisExportEndpoint,d as AnalysisResultsEndpoint,h as BulkEndpoint,u as ClassificationsEndpoint,c as CommentsEndpoint,C as CurrentuserEndpoint,I as DomainEndpoint,v as DomainsEndpoint,f as EvaluationEndpoint,o as EvaluationsEndpoint,P as ExceltemplateEndpoint,T as ExceltemplatesEndpoint,N as ExportEndpoint,g as NewEndpoint,O as ReferencesEndpoint,a as ReportEndpoint,S as RequirementsAPI,x as RequirementsEndpoint,D as ResultEndpoint,s as ResultsEndpoint,y as RolesEndpoint};//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map