@semantha/product-sdk 11.3.1 → 11.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,138 @@
1
+ import { DocumentChatRequest, DocumentChatResponse } from '../model/index.mjs';
2
+ import { RestClient } from '../../rest/index.mjs';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/documentchat/domains/{domainname}/documents/{sourcedocid}"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class DocumentEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly sourcedocid;
15
+ private readonly ENDPOINT;
16
+ constructor(restClient: RestClient, parentEndpoint: string, sourcedocid: string);
17
+ /**
18
+ * @param body DocumentChatRequest? -
19
+ */
20
+ post(body?: DocumentChatRequest): Promise<DocumentChatResponse>;
21
+ }
22
+
23
+ /**
24
+ * @author semantha
25
+ *
26
+ * Class to access resource "/api/documentchat/domains/{domainname}/documents"
27
+ * This is a generated file do not change manually!
28
+ */
29
+ declare class DocumentsEndpoint {
30
+ private readonly restClient;
31
+ private readonly parentEndpoint;
32
+ private readonly ENDPOINT;
33
+ constructor(restClient: RestClient, parentEndpoint: string);
34
+ }
35
+
36
+ /**
37
+ * @author semantha
38
+ *
39
+ * Class to access resource "/api/documentchat/domains/{domainname}"
40
+ * This is a generated file do not change manually!
41
+ */
42
+ declare class DomainEndpoint {
43
+ private readonly restClient;
44
+ private readonly parentEndpoint;
45
+ private readonly domainname;
46
+ private readonly ENDPOINT;
47
+ constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
48
+ documents(): DocumentsEndpoint;
49
+ documents(sourcedocid: string): DocumentEndpoint;
50
+ }
51
+
52
+ /**
53
+ * @author semantha
54
+ *
55
+ * Class to access resource "/api/documentchat/domains"
56
+ * This is a generated file do not change manually!
57
+ */
58
+ declare class DomainsEndpoint {
59
+ private readonly restClient;
60
+ private readonly parentEndpoint;
61
+ private readonly ENDPOINT;
62
+ constructor(restClient: RestClient, parentEndpoint: string);
63
+ }
64
+
65
+ /**
66
+ * @author semantha
67
+ *
68
+ * Class to access resource "/api/documentchat"
69
+ * This is a generated file do not change manually!
70
+ */
71
+ declare class DocumentchatEndpoint {
72
+ private readonly restClient;
73
+ private readonly parentEndpoint;
74
+ private readonly ENDPOINT;
75
+ constructor(restClient: RestClient, parentEndpoint: string);
76
+ domains(): DomainsEndpoint;
77
+ domains(domainname: string): DomainEndpoint;
78
+ }
79
+
80
+ /**
81
+ * Entry point to the DocumentChat API.
82
+ *
83
+ * @author semantha
84
+ * Calls the /documentchat, endpoints.
85
+ *
86
+ * Note:
87
+ * The constructor is not meant to be invoked directly
88
+ * use `loginXXX()` with your credentials instead.
89
+ *
90
+ * this is a generated class do not change manually!
91
+ */
92
+ declare class DocumentChatAPI {
93
+ private readonly restClient;
94
+ private readonly parentEndpoint;
95
+ constructor(restClient: RestClient, parentEndpoint: string);
96
+ /**
97
+ * Access to the DocumentChat API
98
+ *
99
+ * @param serverUrl: string - URL to the DocumentChat server.
100
+ * @param apiKey: string - A valid bearer token for accessing the given url.
101
+ *
102
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
103
+ */
104
+ static loginWithApiKey(serverUrl: string, apiKey: string): DocumentChatAPI;
105
+ /**
106
+ * Access to the DocumentChat API, when there is a auth proxy in place to handle the addition of the Authorization header
107
+ *
108
+ * @param serverUrl: string - URL to the DocumentChat server.
109
+ *
110
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
111
+ */
112
+ static loginWithAuthProxy(serverUrl: string): DocumentChatAPI;
113
+ /**
114
+ * Access to the DocumentChat API
115
+ *
116
+ * @param serverUrl: string - URL to the DocumentChat server.
117
+ * @param clientId: string - OAuth2 client id.
118
+ * @param clientSecret: string - OAuth2 client secret.
119
+ * @param tokenUrl: string OAuth2 url to get a valid access token
120
+ *
121
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
122
+ */
123
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): DocumentChatAPI;
124
+ /**
125
+ * Access to the DocumentChat API
126
+ *
127
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
128
+ *
129
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
130
+ */
131
+ static loginWithCredentialsFile(credentialsFilePath: string): DocumentChatAPI;
132
+ private static parseServerUrl;
133
+ private static getValueOfInPropertiesFile;
134
+ endpoint(): string;
135
+ documentchat(): DocumentchatEndpoint;
136
+ }
137
+
138
+ export { DocumentChatAPI, DocumentEndpoint, DocumentchatEndpoint, DocumentsEndpoint, DomainEndpoint, DomainsEndpoint };
@@ -0,0 +1,138 @@
1
+ import { DocumentChatRequest, DocumentChatResponse } from '../model/index.js';
2
+ import { RestClient } from '../../rest/index.js';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/documentchat/domains/{domainname}/documents/{sourcedocid}"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class DocumentEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly sourcedocid;
15
+ private readonly ENDPOINT;
16
+ constructor(restClient: RestClient, parentEndpoint: string, sourcedocid: string);
17
+ /**
18
+ * @param body DocumentChatRequest? -
19
+ */
20
+ post(body?: DocumentChatRequest): Promise<DocumentChatResponse>;
21
+ }
22
+
23
+ /**
24
+ * @author semantha
25
+ *
26
+ * Class to access resource "/api/documentchat/domains/{domainname}/documents"
27
+ * This is a generated file do not change manually!
28
+ */
29
+ declare class DocumentsEndpoint {
30
+ private readonly restClient;
31
+ private readonly parentEndpoint;
32
+ private readonly ENDPOINT;
33
+ constructor(restClient: RestClient, parentEndpoint: string);
34
+ }
35
+
36
+ /**
37
+ * @author semantha
38
+ *
39
+ * Class to access resource "/api/documentchat/domains/{domainname}"
40
+ * This is a generated file do not change manually!
41
+ */
42
+ declare class DomainEndpoint {
43
+ private readonly restClient;
44
+ private readonly parentEndpoint;
45
+ private readonly domainname;
46
+ private readonly ENDPOINT;
47
+ constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
48
+ documents(): DocumentsEndpoint;
49
+ documents(sourcedocid: string): DocumentEndpoint;
50
+ }
51
+
52
+ /**
53
+ * @author semantha
54
+ *
55
+ * Class to access resource "/api/documentchat/domains"
56
+ * This is a generated file do not change manually!
57
+ */
58
+ declare class DomainsEndpoint {
59
+ private readonly restClient;
60
+ private readonly parentEndpoint;
61
+ private readonly ENDPOINT;
62
+ constructor(restClient: RestClient, parentEndpoint: string);
63
+ }
64
+
65
+ /**
66
+ * @author semantha
67
+ *
68
+ * Class to access resource "/api/documentchat"
69
+ * This is a generated file do not change manually!
70
+ */
71
+ declare class DocumentchatEndpoint {
72
+ private readonly restClient;
73
+ private readonly parentEndpoint;
74
+ private readonly ENDPOINT;
75
+ constructor(restClient: RestClient, parentEndpoint: string);
76
+ domains(): DomainsEndpoint;
77
+ domains(domainname: string): DomainEndpoint;
78
+ }
79
+
80
+ /**
81
+ * Entry point to the DocumentChat API.
82
+ *
83
+ * @author semantha
84
+ * Calls the /documentchat, endpoints.
85
+ *
86
+ * Note:
87
+ * The constructor is not meant to be invoked directly
88
+ * use `loginXXX()` with your credentials instead.
89
+ *
90
+ * this is a generated class do not change manually!
91
+ */
92
+ declare class DocumentChatAPI {
93
+ private readonly restClient;
94
+ private readonly parentEndpoint;
95
+ constructor(restClient: RestClient, parentEndpoint: string);
96
+ /**
97
+ * Access to the DocumentChat API
98
+ *
99
+ * @param serverUrl: string - URL to the DocumentChat server.
100
+ * @param apiKey: string - A valid bearer token for accessing the given url.
101
+ *
102
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
103
+ */
104
+ static loginWithApiKey(serverUrl: string, apiKey: string): DocumentChatAPI;
105
+ /**
106
+ * Access to the DocumentChat API, when there is a auth proxy in place to handle the addition of the Authorization header
107
+ *
108
+ * @param serverUrl: string - URL to the DocumentChat server.
109
+ *
110
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
111
+ */
112
+ static loginWithAuthProxy(serverUrl: string): DocumentChatAPI;
113
+ /**
114
+ * Access to the DocumentChat API
115
+ *
116
+ * @param serverUrl: string - URL to the DocumentChat server.
117
+ * @param clientId: string - OAuth2 client id.
118
+ * @param clientSecret: string - OAuth2 client secret.
119
+ * @param tokenUrl: string OAuth2 url to get a valid access token
120
+ *
121
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
122
+ */
123
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): DocumentChatAPI;
124
+ /**
125
+ * Access to the DocumentChat API
126
+ *
127
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
128
+ *
129
+ * @return DocumentChatAPI: Entry point to the DocumentChat API.
130
+ */
131
+ static loginWithCredentialsFile(credentialsFilePath: string): DocumentChatAPI;
132
+ private static parseServerUrl;
133
+ private static getValueOfInPropertiesFile;
134
+ endpoint(): string;
135
+ documentchat(): DocumentchatEndpoint;
136
+ }
137
+
138
+ export { DocumentChatAPI, DocumentEndpoint, DocumentchatEndpoint, DocumentsEndpoint, DomainEndpoint, DomainsEndpoint };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkMUWVKP6I_js=require('../../chunk-MUWVKP6I.js'),h=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 h__namespace=/*#__PURE__*/_interopNamespace(h);var o=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.sourcedocid=n;this.ENDPOINT=this.parentEndpoint+`/documents/${this.sourcedocid}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT};var p=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documents(t){return t!=null?new o(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentchat";}ENDPOINT;domains(t){return t!=null?new p(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}};var c="/api",u=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 chunkMUWVKP6I_js.c(this.parseServerUrl(t),e),c)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkMUWVKP6I_js.c(this.parseServerUrl(t)),c)}static loginWithCredentials(t,e,n,d){return t=this.parseServerUrl(t),new r(new chunkMUWVKP6I_js.c(t,void 0,e,n,d),c)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=h__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(m=>m.length!==0).map(m=>m.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",n),f=this.getValueOfInPropertiesFile("clientId",n),g=this.getValueOfInPropertiesFile("clientSecret",n),E=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(d,f,g,E)}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}documentchat(){return new l(this.restClient,this.endpoint())}};exports.DocumentChatAPI=u;exports.DocumentEndpoint=o;exports.DocumentchatEndpoint=l;exports.DocumentsEndpoint=s;exports.DomainEndpoint=p;exports.DomainsEndpoint=a;//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/document-chat/api/document.ts","../../../semantha-product-sdk/document-chat/api/documents.ts","../../../semantha-product-sdk/document-chat/api/domain.ts","../../../semantha-product-sdk/document-chat/api/domains.ts","../../../semantha-product-sdk/document-chat/api/documentchat.ts","../../../semantha-product-sdk/document-chat/api/documentChatAPI.ts"],"names":["DocumentEndpoint","restClient","parentEndpoint","sourcedocid","body","DocumentsEndpoint","DomainEndpoint","domainname","DomainsEndpoint","DocumentchatEndpoint","PARENT_ENDPOINT","DocumentChatAPI","_DocumentChatAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","h","line","searchKey"],"mappings":"2bAWO,IAAMA,CAAAA,CAAN,KAAuB,CAG5B,WAAA,CACmBC,EACAC,CAAAA,CACAC,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAF,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,EACA,IAAA,CAAA,WAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,IAAA,CAAK,cAAA,CAAiB,cAAmB,IAAA,CAAK,WAAW,CAAA,EAC3E,CARiB,QAAA,CAajB,MAAM,KACJC,CAAAA,CAC+B,CAC/B,QACE,MAAM,IAAA,CAAK,WAAW,IAAA,CACpB,IAAA,CAAK,QAAA,CACL,EAAC,CACD,IAAA,CAAK,WAAW,QAAA,CAAA,kBAAuB,CAAA,CACvCA,CACF,CAAA,EACA,OAAA,EACJ,CACF,EC7BO,IAAMC,CA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KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,CAAA,CAAA,CAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,YAAA,EAAqC,CACnC,OAAO,IAAId,CAAAA,CAAqB,IAAA,CAAK,WAAY,IAAA,CAAK,QAAA,EAAU,CAClE,CAEF","file":"index.js","sourcesContent":["import { DocumentChatRequest } from '../model';\nimport { DocumentChatResponse } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/domains/{domainname}/documents/{sourcedocid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly sourcedocid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documents\" + `/${this.sourcedocid}`;\n }\n\n /**\n * @param body DocumentChatRequest? - \n */\n async post(\n body?: DocumentChatRequest,\n ): Promise<DocumentChatResponse> {\n return (\n await this.restClient.post<DocumentChatResponse>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/domains/{domainname}/documents\"\n * This is a generated file do not change manually!\n */\nexport class DocumentsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documents\";\n }\n}\n","import { DocumentEndpoint } from './document';\nimport { DocumentsEndpoint } from './documents';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/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 documents(): DocumentsEndpoint;\n documents(sourcedocid: string): DocumentEndpoint\n \n documents(sourcedocid?: string): DocumentEndpoint | DocumentsEndpoint {\n if(sourcedocid !== undefined && sourcedocid !== null) {\n\t return new DocumentEndpoint(this.restClient, this.ENDPOINT, sourcedocid);\n } else {\n\t return new DocumentsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/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 { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat\"\n * This is a generated file do not change manually!\n */\nexport class DocumentchatEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentchat\";\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 { DocumentchatEndpoint } from './documentchat';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the DocumentChat API.\n *\n * @author semantha\n * Calls the /documentchat, 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 DocumentChatAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the DocumentChat API\n *\n * @param serverUrl: string - URL to the DocumentChat server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): DocumentChatAPI {\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 DocumentChatAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the DocumentChat API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the DocumentChat server.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): DocumentChatAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new DocumentChatAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the DocumentChat API\n *\n * @param serverUrl: string - URL to the DocumentChat 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 DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): DocumentChatAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new DocumentChatAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the DocumentChat API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : DocumentChatAPI {\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 DocumentChatAPI.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 documentchat(): DocumentchatEndpoint {\n return new DocumentchatEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,2 @@
1
+ import {c as c$1}from'../../chunk-5PB4IBX4.mjs';import*as h from'fs';var o=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.sourcedocid=n;this.ENDPOINT=this.parentEndpoint+`/documents/${this.sourcedocid}`;}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documents";}ENDPOINT};var p=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;documents(t){return t!=null?new o(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentchat";}ENDPOINT;domains(t){return t!=null?new p(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}};var c="/api",u=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),c)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new c$1(this.parseServerUrl(t)),c)}static loginWithCredentials(t,e,n,d){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,n,d),c)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=h.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(m=>m.length!==0).map(m=>m.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",n),f=this.getValueOfInPropertiesFile("clientId",n),g=this.getValueOfInPropertiesFile("clientSecret",n),E=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(d,f,g,E)}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}documentchat(){return new l(this.restClient,this.endpoint())}};export{u as DocumentChatAPI,o as DocumentEndpoint,l as DocumentchatEndpoint,s as DocumentsEndpoint,p as DomainEndpoint,a as DomainsEndpoint};//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/document-chat/api/document.ts","../../../semantha-product-sdk/document-chat/api/documents.ts","../../../semantha-product-sdk/document-chat/api/domain.ts","../../../semantha-product-sdk/document-chat/api/domains.ts","../../../semantha-product-sdk/document-chat/api/documentchat.ts","../../../semantha-product-sdk/document-chat/api/documentChatAPI.ts"],"names":["DocumentEndpoint","restClient","parentEndpoint","sourcedocid","body","DocumentsEndpoint","DomainEndpoint","domainname","DomainsEndpoint","DocumentchatEndpoint","PARENT_ENDPOINT","DocumentChatAPI","_DocumentChatAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","line","searchKey"],"mappings":"qEAWO,IAAMA,CAAAA,CAAN,KAAuB,CAG5B,WAAA,CACmBC,EACAC,CAAAA,CACAC,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAF,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,EACA,IAAA,CAAA,WAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,IAAA,CAAK,cAAA,CAAiB,cAAmB,IAAA,CAAK,WAAW,CAAA,EAC3E,CARiB,QAAA,CAajB,MAAM,KACJC,CAAAA,CAC+B,CAC/B,QACE,MAAM,IAAA,CAAK,WAAW,IAAA,CACpB,IAAA,CAAK,QAAA,CACL,EAAC,CACD,IAAA,CAAK,WAAW,QAAA,CAAA,kBAAuB,CAAA,CACvCA,CACF,CAAA,EACA,OAAA,EACJ,CACF,EC7BO,IAAMC,CAAAA,CAAN,KAAwB,CAG7B,WAAA,CACmBJ,EACAC,CAAAA,CACjB,CAFiB,gBAAAD,CAAAA,CACA,IAAA,CA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A,CAAK,cACd,CAEA,YAAA,EAAqC,CACnC,OAAO,IAAIb,CAAAA,CAAqB,IAAA,CAAK,WAAY,IAAA,CAAK,QAAA,EAAU,CAClE,CAEF","file":"index.mjs","sourcesContent":["import { DocumentChatRequest } from '../model';\nimport { DocumentChatResponse } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/domains/{domainname}/documents/{sourcedocid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly sourcedocid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documents\" + `/${this.sourcedocid}`;\n }\n\n /**\n * @param body DocumentChatRequest? - \n */\n async post(\n body?: DocumentChatRequest,\n ): Promise<DocumentChatResponse> {\n return (\n await this.restClient.post<DocumentChatResponse>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/domains/{domainname}/documents\"\n * This is a generated file do not change manually!\n */\nexport class DocumentsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documents\";\n }\n}\n","import { DocumentEndpoint } from './document';\nimport { DocumentsEndpoint } from './documents';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/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 documents(): DocumentsEndpoint;\n documents(sourcedocid: string): DocumentEndpoint\n \n documents(sourcedocid?: string): DocumentEndpoint | DocumentsEndpoint {\n if(sourcedocid !== undefined && sourcedocid !== null) {\n\t return new DocumentEndpoint(this.restClient, this.ENDPOINT, sourcedocid);\n } else {\n\t return new DocumentsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat/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 { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/documentchat\"\n * This is a generated file do not change manually!\n */\nexport class DocumentchatEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentchat\";\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 { DocumentchatEndpoint } from './documentchat';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the DocumentChat API.\n *\n * @author semantha\n * Calls the /documentchat, 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 DocumentChatAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the DocumentChat API\n *\n * @param serverUrl: string - URL to the DocumentChat server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): DocumentChatAPI {\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 DocumentChatAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the DocumentChat API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the DocumentChat server.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): DocumentChatAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new DocumentChatAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the DocumentChat API\n *\n * @param serverUrl: string - URL to the DocumentChat 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 DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): DocumentChatAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new DocumentChatAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the DocumentChat API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return DocumentChatAPI: Entry point to the DocumentChat API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : DocumentChatAPI {\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 DocumentChatAPI.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 documentchat(): DocumentchatEndpoint {\n return new DocumentchatEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface Message {
7
+ role?: MessageRoleEnum;
8
+ content?: string;
9
+ }
10
+
11
+ /**
12
+ * @author semantha
13
+ *
14
+ * This is a generated file do not change manually!
15
+ */
16
+ interface DocumentChatRequest {
17
+ messages: Message[];
18
+ }
19
+
20
+ /**
21
+ * @author semantha
22
+ *
23
+ * This is a generated file do not change manually!
24
+ */
25
+ interface DocumentChatResponse {
26
+ messages: Message[];
27
+ }
28
+
29
+ /**
30
+ * @author semantha
31
+ *
32
+ * This is a generated file do not change manually!
33
+ */
34
+ declare const MessageRoleEnumValues: readonly ["USER", "ASSISTANT", "SYSTEM"];
35
+ type MessageRoleEnum = (typeof MessageRoleEnumValues)[number];
36
+ declare function isMessageRoleEnumValue(value: any): value is MessageRoleEnum;
37
+
38
+ export { type DocumentChatRequest, type DocumentChatResponse, type Message, type MessageRoleEnum, MessageRoleEnumValues, isMessageRoleEnumValue };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface Message {
7
+ role?: MessageRoleEnum;
8
+ content?: string;
9
+ }
10
+
11
+ /**
12
+ * @author semantha
13
+ *
14
+ * This is a generated file do not change manually!
15
+ */
16
+ interface DocumentChatRequest {
17
+ messages: Message[];
18
+ }
19
+
20
+ /**
21
+ * @author semantha
22
+ *
23
+ * This is a generated file do not change manually!
24
+ */
25
+ interface DocumentChatResponse {
26
+ messages: Message[];
27
+ }
28
+
29
+ /**
30
+ * @author semantha
31
+ *
32
+ * This is a generated file do not change manually!
33
+ */
34
+ declare const MessageRoleEnumValues: readonly ["USER", "ASSISTANT", "SYSTEM"];
35
+ type MessageRoleEnum = (typeof MessageRoleEnumValues)[number];
36
+ declare function isMessageRoleEnumValue(value: any): value is MessageRoleEnum;
37
+
38
+ export { type DocumentChatRequest, type DocumentChatResponse, type Message, type MessageRoleEnum, MessageRoleEnumValues, isMessageRoleEnumValue };
@@ -0,0 +1,2 @@
1
+ 'use strict';var o=["USER","ASSISTANT","SYSTEM"];function s(e){return o.includes(e)}exports.MessageRoleEnumValues=o;exports.isMessageRoleEnumValue=s;//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/document-chat/model/messageRoleEnum.ts"],"names":["MessageRoleEnumValues","isMessageRoleEnumValue","value"],"mappings":"aAKO,IAAMA,CAAAA,CAAwB,CACnC,MAAA,CACA,WAAA,CACA,QACF,EAGO,SAASC,CAAAA,CAAuBC,CAAAA,CAAsC,CAC3E,OAAOF,CAAAA,CAAsB,QAAA,CAASE,CAAK,CAC7C","file":"index.js","sourcesContent":["/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const MessageRoleEnumValues = [\n 'USER',\n 'ASSISTANT',\n 'SYSTEM'\n] as const;\nexport type MessageRoleEnum = (typeof MessageRoleEnumValues)[number];\n\nexport function isMessageRoleEnumValue(value: any): value is MessageRoleEnum {\n return MessageRoleEnumValues.includes(value);\n}\n\n"]}
@@ -0,0 +1,2 @@
1
+ var o=["USER","ASSISTANT","SYSTEM"];function s(e){return o.includes(e)}export{o as MessageRoleEnumValues,s as isMessageRoleEnumValue};//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/document-chat/model/messageRoleEnum.ts"],"names":["MessageRoleEnumValues","isMessageRoleEnumValue","value"],"mappings":"AAKO,IAAMA,CAAAA,CAAwB,CACnC,MAAA,CACA,WAAA,CACA,QACF,EAGO,SAASC,CAAAA,CAAuBC,CAAAA,CAAsC,CAC3E,OAAOF,CAAAA,CAAsB,QAAA,CAASE,CAAK,CAC7C","file":"index.mjs","sourcesContent":["/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const MessageRoleEnumValues = [\n 'USER',\n 'ASSISTANT',\n 'SYSTEM'\n] as const;\nexport type MessageRoleEnum = (typeof MessageRoleEnumValues)[number];\n\nexport function isMessageRoleEnumValue(value: any): value is MessageRoleEnum {\n return MessageRoleEnumValues.includes(value);\n}\n\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkB3MSOEJM_js=require('../chunk-B3MSOEJM.js'),chunkZSFNB534_js=require('../chunk-ZSFNB534.js');require('../chunk-MUWVKP6I.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkB3MSOEJM_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_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 chunkB3MSOEJM_js=require('../chunk-B3MSOEJM.js');require('../chunk-MUWVKP6I.js');var chunkZSFNB534_js=require('../chunk-ZSFNB534.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkB3MSOEJM_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkB3MSOEJM_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-YB4SU52R.mjs';export{a as FileTypeEnumValues,b as isFileTypeEnumValue}from'../chunk-DURTIKAP.mjs';import'../chunk-5PB4IBX4.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-YB4SU52R.mjs';import'../chunk-5PB4IBX4.mjs';export{a as FileTypeEnumValues,b as isFileTypeEnumValue}from'../chunk-DURTIKAP.mjs';//# sourceMappingURL=index.mjs.map
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,27 @@
1
+ import { PromptResultResponseContainer, PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, AnalysisResultComment, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.mjs';
1
2
  import { RestClient, RestResponse } from '../../rest/index.mjs';
2
- import { PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, AnalysisResultComment, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.mjs';
3
3
  import 'axios';
4
4
 
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}/pagedresults"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class AitasksPagedresultsEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ get(params: {
17
+ workitemid?: string;
18
+ status?: string;
19
+ sort?: string;
20
+ limit: number;
21
+ offset: number;
22
+ }): Promise<PromptResultResponseContainer>;
23
+ }
24
+
5
25
  /**
6
26
  * @author semantha
7
27
  *
@@ -45,6 +65,7 @@ declare class AitaskEndpoint {
45
65
  private readonly analysisid;
46
66
  private readonly ENDPOINT;
47
67
  constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
68
+ pagedresults(): AitasksPagedresultsEndpoint;
48
69
  results(): AitasksResultsEndpoint;
49
70
  }
50
71
 
@@ -601,4 +622,4 @@ declare class RequirementsAPI {
601
622
  requirements(): RequirementsEndpoint;
602
623
  }
603
624
 
604
- export { AitaskEndpoint, AitasksEndpoint, AitasksResultsEndpoint, AitasksresultsExportEndpoint, AnalysesEndpoint, AnalysisEndpoint, AnalysisResultsEndpoint, BulkEndpoint, ClassificationsEndpoint, CommentsEndpoint, CurrentuserEndpoint, DomainEndpoint, DomainsEndpoint, EvaluationEndpoint, EvaluationsEndpoint, ExceltemplateEndpoint, ExceltemplatesEndpoint, ExportEndpoint, NewEndpoint, PagedresultsEndpoint, ReferencesEndpoint, ReportEndpoint, RequirementsAPI, RequirementsEndpoint, ResultEndpoint, ResultsEndpoint, RolesEndpoint, StatsEndpoint };
625
+ export { AitaskEndpoint, AitasksEndpoint, AitasksPagedresultsEndpoint, AitasksResultsEndpoint, AitasksresultsExportEndpoint, AnalysesEndpoint, AnalysisEndpoint, AnalysisResultsEndpoint, BulkEndpoint, ClassificationsEndpoint, CommentsEndpoint, CurrentuserEndpoint, DomainEndpoint, DomainsEndpoint, EvaluationEndpoint, EvaluationsEndpoint, ExceltemplateEndpoint, ExceltemplatesEndpoint, ExportEndpoint, NewEndpoint, PagedresultsEndpoint, ReferencesEndpoint, ReportEndpoint, RequirementsAPI, RequirementsEndpoint, ResultEndpoint, ResultsEndpoint, RolesEndpoint, StatsEndpoint };
@@ -1,7 +1,27 @@
1
+ import { PromptResultResponseContainer, PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, AnalysisResultComment, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.js';
1
2
  import { RestClient, RestResponse } from '../../rest/index.js';
2
- import { PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, AnalysisResultComment, Evaluation, ExcelTemplateDetails, ModeEnum, ExtendedReference, AnalysisResult } from '../model/index.js';
3
3
  import 'axios';
4
4
 
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}/pagedresults"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class AitasksPagedresultsEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ get(params: {
17
+ workitemid?: string;
18
+ status?: string;
19
+ sort?: string;
20
+ limit: number;
21
+ offset: number;
22
+ }): Promise<PromptResultResponseContainer>;
23
+ }
24
+
5
25
  /**
6
26
  * @author semantha
7
27
  *
@@ -45,6 +65,7 @@ declare class AitaskEndpoint {
45
65
  private readonly analysisid;
46
66
  private readonly ENDPOINT;
47
67
  constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
68
+ pagedresults(): AitasksPagedresultsEndpoint;
48
69
  results(): AitasksResultsEndpoint;
49
70
  }
50
71
 
@@ -601,4 +622,4 @@ declare class RequirementsAPI {
601
622
  requirements(): RequirementsEndpoint;
602
623
  }
603
624
 
604
- export { AitaskEndpoint, AitasksEndpoint, AitasksResultsEndpoint, AitasksresultsExportEndpoint, AnalysesEndpoint, AnalysisEndpoint, AnalysisResultsEndpoint, BulkEndpoint, ClassificationsEndpoint, CommentsEndpoint, CurrentuserEndpoint, DomainEndpoint, DomainsEndpoint, EvaluationEndpoint, EvaluationsEndpoint, ExceltemplateEndpoint, ExceltemplatesEndpoint, ExportEndpoint, NewEndpoint, PagedresultsEndpoint, ReferencesEndpoint, ReportEndpoint, RequirementsAPI, RequirementsEndpoint, ResultEndpoint, ResultsEndpoint, RolesEndpoint, StatsEndpoint };
625
+ export { AitaskEndpoint, AitasksEndpoint, AitasksPagedresultsEndpoint, AitasksResultsEndpoint, AitasksresultsExportEndpoint, AnalysesEndpoint, AnalysisEndpoint, AnalysisResultsEndpoint, BulkEndpoint, ClassificationsEndpoint, CommentsEndpoint, CurrentuserEndpoint, DomainEndpoint, DomainsEndpoint, EvaluationEndpoint, EvaluationsEndpoint, ExceltemplateEndpoint, ExceltemplatesEndpoint, ExportEndpoint, NewEndpoint, PagedresultsEndpoint, ReferencesEndpoint, ReportEndpoint, RequirementsAPI, RequirementsEndpoint, ResultEndpoint, ResultsEndpoint, RolesEndpoint, StatsEndpoint };
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkMUWVKP6I_js=require('../../chunk-MUWVKP6I.js'),F=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 F__namespace=/*#__PURE__*/_interopNamespace(F);var l=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 p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new l(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,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/aitasks/${this.analysisid}`;}ENDPOINT;results(){return new p(this.restClient,this.ENDPOINT)}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/aitasks";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/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 N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new E(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 h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stats";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/pagedresults";}ENDPOINT;stats(){return new u(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var y=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;pagedresults(){return new c(this.restClient,this.ENDPOINT)}results(){return new h(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 C=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 C(this.restClient,this.ENDPOINT)}};var f=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 g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT};var P=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 T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new T(this.restClient,this.ENDPOINT)}};var D=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 v=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 I=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 R=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new I(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 x=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 w=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 P(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 A=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;aitasks(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new m(this.restClient,this.ENDPOINT)}analyses(t){return t!=null?new y(this.restClient,this.ENDPOINT,t):new N(this.restClient,this.ENDPOINT)}bulk(){return new f(this.restClient,this.ENDPOINT)}classifications(){return new g(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new v(this.restClient,this.ENDPOINT,t):new R(this.restClient,this.ENDPOINT)}references(){return new x(this.restClient,this.ENDPOINT)}results(t){return t!=null?new w(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new O(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new A(this.restClient,this.ENDPOINT,t):new M(this.restClient,this.ENDPOINT)}};var k="/api",J=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 chunkMUWVKP6I_js.c(this.parseServerUrl(t),e),k)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkMUWVKP6I_js.c(this.parseServerUrl(t)),k)}static loginWithCredentials(t,e,n,S){return t=this.parseServerUrl(t),new r(new chunkMUWVKP6I_js.c(t,void 0,e,n,S),k)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=F__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(H=>H.length!==0).map(H=>H.split("=")),S=this.getValueOfInPropertiesFile("serverUrl",n),W=this.getValueOfInPropertiesFile("clientId",n),X=this.getValueOfInPropertiesFile("clientSecret",n),B=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(S,W,X,B)}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 b(this.restClient,this.endpoint())}};exports.AitaskEndpoint=d;exports.AitasksEndpoint=m;exports.AitasksResultsEndpoint=p;exports.AitasksresultsExportEndpoint=l;exports.AnalysesEndpoint=N;exports.AnalysisEndpoint=y;exports.AnalysisResultsEndpoint=h;exports.BulkEndpoint=f;exports.ClassificationsEndpoint=g;exports.CommentsEndpoint=P;exports.CurrentuserEndpoint=O;exports.DomainEndpoint=A;exports.DomainsEndpoint=M;exports.EvaluationEndpoint=D;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=v;exports.ExceltemplatesEndpoint=R;exports.ExportEndpoint=C;exports.NewEndpoint=I;exports.PagedresultsEndpoint=c;exports.ReferencesEndpoint=x;exports.ReportEndpoint=E;exports.RequirementsAPI=J;exports.RequirementsEndpoint=b;exports.ResultEndpoint=w;exports.ResultsEndpoint=s;exports.RolesEndpoint=T;exports.StatsEndpoint=u;//# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkMUWVKP6I_js=require('../../chunk-MUWVKP6I.js'),W=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 W__namespace=/*#__PURE__*/_interopNamespace(W);var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/pagedresults";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).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+"/results";}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,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/aitasks/${this.analysisid}`;}ENDPOINT;pagedresults(){return new l(this.restClient,this.ENDPOINT)}results(){return new m(this.restClient,this.ENDPOINT)}};var E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/aitasks";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/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 N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new u(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 h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/stats";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var y=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/pagedresults";}ENDPOINT;stats(){return new c(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var C=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.analysisid=n;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;pagedresults(){return new y(this.restClient,this.ENDPOINT)}results(){return new h(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 f=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 f(this.restClient,this.ENDPOINT)}};var g=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 P=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/classifications";}ENDPOINT};var T=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 O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT};var D=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new O(this.restClient,this.ENDPOINT)}};var v=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 I=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 R=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 x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new R(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 w=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 A=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 T(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 M=class{constructor(t,e,n){this.restClient=t;this.parentEndpoint=e;this.domainname=n;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;aitasks(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new E(this.restClient,this.ENDPOINT)}analyses(t){return t!=null?new C(this.restClient,this.ENDPOINT,t):new N(this.restClient,this.ENDPOINT)}bulk(){return new g(this.restClient,this.ENDPOINT)}classifications(){return new P(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new v(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new I(this.restClient,this.ENDPOINT,t):new x(this.restClient,this.ENDPOINT)}references(){return new w(this.restClient,this.ENDPOINT)}results(t){return t!=null?new A(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var b=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var S=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new D(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new M(this.restClient,this.ENDPOINT,t):new b(this.restClient,this.ENDPOINT)}};var J="/api",F=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 chunkMUWVKP6I_js.c(this.parseServerUrl(t),e),J)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkMUWVKP6I_js.c(this.parseServerUrl(t)),J)}static loginWithCredentials(t,e,n,H){return t=this.parseServerUrl(t),new r(new chunkMUWVKP6I_js.c(t,void 0,e,n,H),J)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=W__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(k=>k.length!==0).map(k=>k.split("=")),H=this.getValueOfInPropertiesFile("serverUrl",n),X=this.getValueOfInPropertiesFile("clientId",n),B=this.getValueOfInPropertiesFile("clientSecret",n),$=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(H,X,B,$)}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 S(this.restClient,this.endpoint())}};exports.AitaskEndpoint=d;exports.AitasksEndpoint=E;exports.AitasksPagedresultsEndpoint=l;exports.AitasksResultsEndpoint=m;exports.AitasksresultsExportEndpoint=p;exports.AnalysesEndpoint=N;exports.AnalysisEndpoint=C;exports.AnalysisResultsEndpoint=h;exports.BulkEndpoint=g;exports.ClassificationsEndpoint=P;exports.CommentsEndpoint=T;exports.CurrentuserEndpoint=D;exports.DomainEndpoint=M;exports.DomainsEndpoint=b;exports.EvaluationEndpoint=v;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=I;exports.ExceltemplatesEndpoint=x;exports.ExportEndpoint=f;exports.NewEndpoint=R;exports.PagedresultsEndpoint=y;exports.ReferencesEndpoint=w;exports.ReportEndpoint=u;exports.RequirementsAPI=F;exports.RequirementsEndpoint=S;exports.ResultEndpoint=A;exports.ResultsEndpoint=s;exports.RolesEndpoint=O;exports.StatsEndpoint=c;//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map