@semantha/product-sdk 10.4.0 → 10.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/requirements/api/index.d.mts +71 -38
- package/dist/requirements/api/index.d.ts +71 -38
- package/dist/requirements/api/index.js +1 -1
- package/dist/requirements/api/index.js.map +1 -1
- package/dist/requirements/api/index.mjs +1 -1
- package/dist/requirements/api/index.mjs.map +1 -1
- package/dist/requirements/model/index.d.mts +80 -66
- package/dist/requirements/model/index.d.ts +80 -66
- package/dist/requirements/model/index.js +1 -1
- package/dist/requirements/model/index.mjs +1 -1
- package/dist/structure-navigator/index.js +1 -1
- package/dist/structure-navigator/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,70 @@
|
|
|
1
1
|
import { RestClient, RestResponse } from '../../rest/index.mjs';
|
|
2
|
-
import { AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation,
|
|
2
|
+
import { PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, Classification, AnalysisResultComment, CurrentUser, 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}/results/export"
|
|
9
|
+
* This is a generated file do not change manually!
|
|
10
|
+
*/
|
|
11
|
+
declare class AitasksresultsExportEndpoint {
|
|
12
|
+
private readonly restClient;
|
|
13
|
+
private readonly parentEndpoint;
|
|
14
|
+
private readonly ENDPOINT;
|
|
15
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
16
|
+
postAsXlsx(params?: {
|
|
17
|
+
templateid?: string;
|
|
18
|
+
}): Promise<Blob>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @author semantha
|
|
23
|
+
*
|
|
24
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}/results"
|
|
25
|
+
* This is a generated file do not change manually!
|
|
26
|
+
*/
|
|
27
|
+
declare class AitasksResultsEndpoint {
|
|
28
|
+
private readonly restClient;
|
|
29
|
+
private readonly parentEndpoint;
|
|
30
|
+
private readonly ENDPOINT;
|
|
31
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
32
|
+
export(): AitasksresultsExportEndpoint;
|
|
33
|
+
get(): Promise<PromptResult[]>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @author semantha
|
|
38
|
+
*
|
|
39
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}"
|
|
40
|
+
* This is a generated file do not change manually!
|
|
41
|
+
*/
|
|
42
|
+
declare class AitaskEndpoint {
|
|
43
|
+
private readonly restClient;
|
|
44
|
+
private readonly parentEndpoint;
|
|
45
|
+
private readonly analysisid;
|
|
46
|
+
private readonly ENDPOINT;
|
|
47
|
+
constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
|
|
48
|
+
results(): AitasksResultsEndpoint;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @author semantha
|
|
53
|
+
*
|
|
54
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks"
|
|
55
|
+
* This is a generated file do not change manually!
|
|
56
|
+
*/
|
|
57
|
+
declare class AitasksEndpoint {
|
|
58
|
+
private readonly restClient;
|
|
59
|
+
private readonly parentEndpoint;
|
|
60
|
+
private readonly ENDPOINT;
|
|
61
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
62
|
+
/**
|
|
63
|
+
* @param body AiTaskInput? -
|
|
64
|
+
*/
|
|
65
|
+
post(body?: AiTaskInput): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
|
|
5
68
|
/**
|
|
6
69
|
* @author semantha
|
|
7
70
|
*
|
|
@@ -55,8 +118,6 @@ declare class AnalysesEndpoint {
|
|
|
55
118
|
* @param goodmatchesthreshold number? -
|
|
56
119
|
* @param matchallreferences boolean? -
|
|
57
120
|
* @param showdocscore boolean? -
|
|
58
|
-
* @param type string? -
|
|
59
|
-
* @param promptid string? -
|
|
60
121
|
*/
|
|
61
122
|
post(data: {
|
|
62
123
|
file?: FormDataContentDisposition;
|
|
@@ -70,8 +131,6 @@ declare class AnalysesEndpoint {
|
|
|
70
131
|
goodmatchesthreshold?: number;
|
|
71
132
|
matchallreferences?: boolean;
|
|
72
133
|
showdocscore?: boolean;
|
|
73
|
-
type?: string;
|
|
74
|
-
promptid?: string;
|
|
75
134
|
}): Promise<void>;
|
|
76
135
|
/**
|
|
77
136
|
* @param body AnalysisCreation? -
|
|
@@ -79,37 +138,6 @@ declare class AnalysesEndpoint {
|
|
|
79
138
|
postJson(body?: AnalysisCreation): Promise<void>;
|
|
80
139
|
}
|
|
81
140
|
|
|
82
|
-
/**
|
|
83
|
-
* @author semantha
|
|
84
|
-
*
|
|
85
|
-
* Class to access resource "/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers/export"
|
|
86
|
-
* This is a generated file do not change manually!
|
|
87
|
-
*/
|
|
88
|
-
declare class AnalysisExportEndpoint {
|
|
89
|
-
private readonly restClient;
|
|
90
|
-
private readonly parentEndpoint;
|
|
91
|
-
private readonly ENDPOINT;
|
|
92
|
-
constructor(restClient: RestClient, parentEndpoint: string);
|
|
93
|
-
postAsXlsx(params?: {
|
|
94
|
-
templateid?: string;
|
|
95
|
-
}): Promise<Blob>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @author semantha
|
|
100
|
-
*
|
|
101
|
-
* Class to access resource "/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers"
|
|
102
|
-
* This is a generated file do not change manually!
|
|
103
|
-
*/
|
|
104
|
-
declare class AnalysisAnswersEndpoint {
|
|
105
|
-
private readonly restClient;
|
|
106
|
-
private readonly parentEndpoint;
|
|
107
|
-
private readonly ENDPOINT;
|
|
108
|
-
constructor(restClient: RestClient, parentEndpoint: string);
|
|
109
|
-
export(): AnalysisExportEndpoint;
|
|
110
|
-
get(): Promise<PromptResult[]>;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
141
|
/**
|
|
114
142
|
* @author semantha
|
|
115
143
|
*
|
|
@@ -121,7 +149,6 @@ declare class AnalysisResultsEndpoint {
|
|
|
121
149
|
private readonly parentEndpoint;
|
|
122
150
|
private readonly ENDPOINT;
|
|
123
151
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
124
|
-
answers(): AnalysisAnswersEndpoint;
|
|
125
152
|
get(params?: {
|
|
126
153
|
withdetails?: boolean;
|
|
127
154
|
}): Promise<AnalysisResultOverview[]>;
|
|
@@ -147,6 +174,8 @@ declare class StatsEndpoint {
|
|
|
147
174
|
classifications?: string;
|
|
148
175
|
additionaldataname?: string;
|
|
149
176
|
additionaldatavalues?: string;
|
|
177
|
+
samescorematches?: boolean;
|
|
178
|
+
sort?: string;
|
|
150
179
|
}): Promise<AnalysisResultsStatsResponseContainer>;
|
|
151
180
|
}
|
|
152
181
|
|
|
@@ -171,6 +200,8 @@ declare class PagedresultsEndpoint {
|
|
|
171
200
|
classifications?: string;
|
|
172
201
|
additionaldataname?: string;
|
|
173
202
|
additionaldatavalues?: string;
|
|
203
|
+
samescorematches?: boolean;
|
|
204
|
+
sort?: string;
|
|
174
205
|
limit: number;
|
|
175
206
|
offset: number;
|
|
176
207
|
}): Promise<AnalysisResultsResponseContainer>;
|
|
@@ -473,6 +504,8 @@ declare class DomainEndpoint {
|
|
|
473
504
|
private readonly domainname;
|
|
474
505
|
private readonly ENDPOINT;
|
|
475
506
|
constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
|
|
507
|
+
aitasks(): AitasksEndpoint;
|
|
508
|
+
aitasks(analysisid: string): AitaskEndpoint;
|
|
476
509
|
analyses(): AnalysesEndpoint;
|
|
477
510
|
analyses(analysisid: string): AnalysisEndpoint;
|
|
478
511
|
bulk(): BulkEndpoint;
|
|
@@ -565,4 +598,4 @@ declare class RequirementsAPI {
|
|
|
565
598
|
requirements(): RequirementsEndpoint;
|
|
566
599
|
}
|
|
567
600
|
|
|
568
|
-
export {
|
|
601
|
+
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 };
|
|
@@ -1,7 +1,70 @@
|
|
|
1
1
|
import { RestClient, RestResponse } from '../../rest/index.js';
|
|
2
|
-
import { AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation,
|
|
2
|
+
import { PromptResult, AiTaskInput, AnalysesReport, Analysis, FormDataContentDisposition, AnalysisInput, AnalysisCreation, AnalysisResultOverview, AnalysisResultsStatsResponseContainer, AnalysisResultsResponseContainer, Entity, Classification, AnalysisResultComment, CurrentUser, 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}/results/export"
|
|
9
|
+
* This is a generated file do not change manually!
|
|
10
|
+
*/
|
|
11
|
+
declare class AitasksresultsExportEndpoint {
|
|
12
|
+
private readonly restClient;
|
|
13
|
+
private readonly parentEndpoint;
|
|
14
|
+
private readonly ENDPOINT;
|
|
15
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
16
|
+
postAsXlsx(params?: {
|
|
17
|
+
templateid?: string;
|
|
18
|
+
}): Promise<Blob>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @author semantha
|
|
23
|
+
*
|
|
24
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}/results"
|
|
25
|
+
* This is a generated file do not change manually!
|
|
26
|
+
*/
|
|
27
|
+
declare class AitasksResultsEndpoint {
|
|
28
|
+
private readonly restClient;
|
|
29
|
+
private readonly parentEndpoint;
|
|
30
|
+
private readonly ENDPOINT;
|
|
31
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
32
|
+
export(): AitasksresultsExportEndpoint;
|
|
33
|
+
get(): Promise<PromptResult[]>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @author semantha
|
|
38
|
+
*
|
|
39
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks/{analysisid}"
|
|
40
|
+
* This is a generated file do not change manually!
|
|
41
|
+
*/
|
|
42
|
+
declare class AitaskEndpoint {
|
|
43
|
+
private readonly restClient;
|
|
44
|
+
private readonly parentEndpoint;
|
|
45
|
+
private readonly analysisid;
|
|
46
|
+
private readonly ENDPOINT;
|
|
47
|
+
constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
|
|
48
|
+
results(): AitasksResultsEndpoint;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @author semantha
|
|
53
|
+
*
|
|
54
|
+
* Class to access resource "/api/requirements/domains/{domainname}/aitasks"
|
|
55
|
+
* This is a generated file do not change manually!
|
|
56
|
+
*/
|
|
57
|
+
declare class AitasksEndpoint {
|
|
58
|
+
private readonly restClient;
|
|
59
|
+
private readonly parentEndpoint;
|
|
60
|
+
private readonly ENDPOINT;
|
|
61
|
+
constructor(restClient: RestClient, parentEndpoint: string);
|
|
62
|
+
/**
|
|
63
|
+
* @param body AiTaskInput? -
|
|
64
|
+
*/
|
|
65
|
+
post(body?: AiTaskInput): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
|
|
5
68
|
/**
|
|
6
69
|
* @author semantha
|
|
7
70
|
*
|
|
@@ -55,8 +118,6 @@ declare class AnalysesEndpoint {
|
|
|
55
118
|
* @param goodmatchesthreshold number? -
|
|
56
119
|
* @param matchallreferences boolean? -
|
|
57
120
|
* @param showdocscore boolean? -
|
|
58
|
-
* @param type string? -
|
|
59
|
-
* @param promptid string? -
|
|
60
121
|
*/
|
|
61
122
|
post(data: {
|
|
62
123
|
file?: FormDataContentDisposition;
|
|
@@ -70,8 +131,6 @@ declare class AnalysesEndpoint {
|
|
|
70
131
|
goodmatchesthreshold?: number;
|
|
71
132
|
matchallreferences?: boolean;
|
|
72
133
|
showdocscore?: boolean;
|
|
73
|
-
type?: string;
|
|
74
|
-
promptid?: string;
|
|
75
134
|
}): Promise<void>;
|
|
76
135
|
/**
|
|
77
136
|
* @param body AnalysisCreation? -
|
|
@@ -79,37 +138,6 @@ declare class AnalysesEndpoint {
|
|
|
79
138
|
postJson(body?: AnalysisCreation): Promise<void>;
|
|
80
139
|
}
|
|
81
140
|
|
|
82
|
-
/**
|
|
83
|
-
* @author semantha
|
|
84
|
-
*
|
|
85
|
-
* Class to access resource "/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers/export"
|
|
86
|
-
* This is a generated file do not change manually!
|
|
87
|
-
*/
|
|
88
|
-
declare class AnalysisExportEndpoint {
|
|
89
|
-
private readonly restClient;
|
|
90
|
-
private readonly parentEndpoint;
|
|
91
|
-
private readonly ENDPOINT;
|
|
92
|
-
constructor(restClient: RestClient, parentEndpoint: string);
|
|
93
|
-
postAsXlsx(params?: {
|
|
94
|
-
templateid?: string;
|
|
95
|
-
}): Promise<Blob>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @author semantha
|
|
100
|
-
*
|
|
101
|
-
* Class to access resource "/api/requirements/domains/{domainname}/analyses/{analysisid}/results/answers"
|
|
102
|
-
* This is a generated file do not change manually!
|
|
103
|
-
*/
|
|
104
|
-
declare class AnalysisAnswersEndpoint {
|
|
105
|
-
private readonly restClient;
|
|
106
|
-
private readonly parentEndpoint;
|
|
107
|
-
private readonly ENDPOINT;
|
|
108
|
-
constructor(restClient: RestClient, parentEndpoint: string);
|
|
109
|
-
export(): AnalysisExportEndpoint;
|
|
110
|
-
get(): Promise<PromptResult[]>;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
141
|
/**
|
|
114
142
|
* @author semantha
|
|
115
143
|
*
|
|
@@ -121,7 +149,6 @@ declare class AnalysisResultsEndpoint {
|
|
|
121
149
|
private readonly parentEndpoint;
|
|
122
150
|
private readonly ENDPOINT;
|
|
123
151
|
constructor(restClient: RestClient, parentEndpoint: string);
|
|
124
|
-
answers(): AnalysisAnswersEndpoint;
|
|
125
152
|
get(params?: {
|
|
126
153
|
withdetails?: boolean;
|
|
127
154
|
}): Promise<AnalysisResultOverview[]>;
|
|
@@ -147,6 +174,8 @@ declare class StatsEndpoint {
|
|
|
147
174
|
classifications?: string;
|
|
148
175
|
additionaldataname?: string;
|
|
149
176
|
additionaldatavalues?: string;
|
|
177
|
+
samescorematches?: boolean;
|
|
178
|
+
sort?: string;
|
|
150
179
|
}): Promise<AnalysisResultsStatsResponseContainer>;
|
|
151
180
|
}
|
|
152
181
|
|
|
@@ -171,6 +200,8 @@ declare class PagedresultsEndpoint {
|
|
|
171
200
|
classifications?: string;
|
|
172
201
|
additionaldataname?: string;
|
|
173
202
|
additionaldatavalues?: string;
|
|
203
|
+
samescorematches?: boolean;
|
|
204
|
+
sort?: string;
|
|
174
205
|
limit: number;
|
|
175
206
|
offset: number;
|
|
176
207
|
}): Promise<AnalysisResultsResponseContainer>;
|
|
@@ -473,6 +504,8 @@ declare class DomainEndpoint {
|
|
|
473
504
|
private readonly domainname;
|
|
474
505
|
private readonly ENDPOINT;
|
|
475
506
|
constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
|
|
507
|
+
aitasks(): AitasksEndpoint;
|
|
508
|
+
aitasks(analysisid: string): AitaskEndpoint;
|
|
476
509
|
analyses(): AnalysesEndpoint;
|
|
477
510
|
analyses(analysisid: string): AnalysisEndpoint;
|
|
478
511
|
bulk(): BulkEndpoint;
|
|
@@ -565,4 +598,4 @@ declare class RequirementsAPI {
|
|
|
565
598
|
requirements(): RequirementsEndpoint;
|
|
566
599
|
}
|
|
567
600
|
|
|
568
|
-
export {
|
|
601
|
+
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 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkWFUCUDFC_js=require('../../chunk-WFUCUDFC.js'),J=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 J__namespace=/*#__PURE__*/_interopNamespace(J);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){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 N=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/pagedresults";}ENDPOINT;stats(){return new E(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}};var h=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 N(this.restClient,this.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 u=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 u(this.restClient,this.ENDPOINT)}};var c=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 y=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 f=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new f(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var P=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 T=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 O=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 D=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new O(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 I=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 v=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 R=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 h(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new c(this.restClient,this.ENDPOINT)}classifications(){return new y(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new P(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new T(this.restClient,this.ENDPOINT,t):new D(this.restClient,this.ENDPOINT)}references(){return new I(this.restClient,this.ENDPOINT)}results(t){return t!=null?new v(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var x=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var w=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new g(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new R(this.restClient,this.ENDPOINT,t):new x(this.restClient,this.ENDPOINT)}};var b="/api",H=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 chunkWFUCUDFC_js.c(this.parseServerUrl(t),e),b)}static loginWithCredentials(t,e,n,A){return t=this.parseServerUrl(t),new r(new chunkWFUCUDFC_js.c(t,void 0,e,n,A),b)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=J__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(M=>M.length!==0).map(M=>M.split("=")),A=this.getValueOfInPropertiesFile("serverUrl",n),F=this.getValueOfInPropertiesFile("clientId",n),W=this.getValueOfInPropertiesFile("clientSecret",n),X=this.getValueOfInPropertiesFile("tokenUrl",n);return r.loginWithCredentials(A,F,W,X)}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 w(this.restClient,this.endpoint())}};exports.AnalysesEndpoint=l;exports.AnalysisAnswersEndpoint=m;exports.AnalysisEndpoint=h;exports.AnalysisExportEndpoint=p;exports.AnalysisResultsEndpoint=d;exports.BulkEndpoint=c;exports.ClassificationsEndpoint=y;exports.CommentsEndpoint=C;exports.CurrentuserEndpoint=g;exports.DomainEndpoint=R;exports.DomainsEndpoint=x;exports.EvaluationEndpoint=P;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=T;exports.ExceltemplatesEndpoint=D;exports.ExportEndpoint=u;exports.NewEndpoint=O;exports.PagedresultsEndpoint=N;exports.ReferencesEndpoint=I;exports.ReportEndpoint=a;exports.RequirementsAPI=H;exports.RequirementsEndpoint=w;exports.ResultEndpoint=v;exports.ResultsEndpoint=s;exports.RolesEndpoint=f;exports.StatsEndpoint=E;//# sourceMappingURL=index.js.map
|
|
1
|
+
'use strict';var chunkWFUCUDFC_js=require('../../chunk-WFUCUDFC.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 a=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 l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new a(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var p=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 l(this.restClient,this.ENDPOINT)}};var d=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 m=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 E=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new m(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 N=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 h=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 u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/pagedresults";}ENDPOINT;stats(){return new h(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 u(this.restClient,this.ENDPOINT)}results(){return new N(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 y=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 y(this.restClient,this.ENDPOINT)}};var C=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 f=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 g=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 P=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 T=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new P(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var O=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 D=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 v=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 R=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 x=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 g(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 w=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 p(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}analyses(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new E(this.restClient,this.ENDPOINT)}bulk(){return new C(this.restClient,this.ENDPOINT)}classifications(){return new f(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new O(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new D(this.restClient,this.ENDPOINT,t):new v(this.restClient,this.ENDPOINT)}references(){return new R(this.restClient,this.ENDPOINT)}results(t){return t!=null?new x(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 M=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new T(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new w(this.restClient,this.ENDPOINT,t):new A(this.restClient,this.ENDPOINT)}};var J="/api",k=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 chunkWFUCUDFC_js.c(this.parseServerUrl(t),e),J)}static loginWithCredentials(t,e,n,S){return t=this.parseServerUrl(t),new r(new chunkWFUCUDFC_js.c(t,void 0,e,n,S),J)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let n=F__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(b=>b.length!==0).map(b=>b.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 M(this.restClient,this.endpoint())}};exports.AitaskEndpoint=p;exports.AitasksEndpoint=d;exports.AitasksResultsEndpoint=l;exports.AitasksresultsExportEndpoint=a;exports.AnalysesEndpoint=E;exports.AnalysisEndpoint=c;exports.AnalysisResultsEndpoint=N;exports.BulkEndpoint=C;exports.ClassificationsEndpoint=f;exports.CommentsEndpoint=g;exports.CurrentuserEndpoint=T;exports.DomainEndpoint=w;exports.DomainsEndpoint=A;exports.EvaluationEndpoint=O;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=D;exports.ExceltemplatesEndpoint=v;exports.ExportEndpoint=y;exports.NewEndpoint=I;exports.PagedresultsEndpoint=u;exports.ReferencesEndpoint=R;exports.ReportEndpoint=m;exports.RequirementsAPI=k;exports.RequirementsEndpoint=M;exports.ResultEndpoint=x;exports.ResultsEndpoint=s;exports.RolesEndpoint=P;exports.StatsEndpoint=h;//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|