@semantha/product-sdk 9.2.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.
Files changed (119) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/dist/chunk-4R65LLWL.js +2 -0
  4. package/dist/chunk-4R65LLWL.js.map +1 -0
  5. package/dist/chunk-7Y3CRYXW.mjs +2 -0
  6. package/dist/chunk-7Y3CRYXW.mjs.map +1 -0
  7. package/dist/chunk-BE73RDIS.mjs +2 -0
  8. package/dist/chunk-BE73RDIS.mjs.map +1 -0
  9. package/dist/chunk-DOK44NQJ.mjs +2 -0
  10. package/dist/chunk-DOK44NQJ.mjs.map +1 -0
  11. package/dist/chunk-DURTIKAP.mjs +2 -0
  12. package/dist/chunk-DURTIKAP.mjs.map +1 -0
  13. package/dist/chunk-F5JCME7D.js +2 -0
  14. package/dist/chunk-F5JCME7D.js.map +1 -0
  15. package/dist/chunk-I2MRAQSD.mjs +2 -0
  16. package/dist/chunk-I2MRAQSD.mjs.map +1 -0
  17. package/dist/chunk-IISTQOX3.js +2 -0
  18. package/dist/chunk-IISTQOX3.js.map +1 -0
  19. package/dist/chunk-JCDJ3B7Q.js +2 -0
  20. package/dist/chunk-JCDJ3B7Q.js.map +1 -0
  21. package/dist/chunk-OP5BUX5G.js +2 -0
  22. package/dist/chunk-OP5BUX5G.js.map +1 -0
  23. package/dist/chunk-TNZ7KC6A.mjs +2 -0
  24. package/dist/chunk-TNZ7KC6A.mjs.map +1 -0
  25. package/dist/chunk-Y763UUOV.mjs +2 -0
  26. package/dist/chunk-Y763UUOV.mjs.map +1 -0
  27. package/dist/chunk-Z3N63BWG.js +2 -0
  28. package/dist/chunk-Z3N63BWG.js.map +1 -0
  29. package/dist/chunk-ZSFNB534.js +2 -0
  30. package/dist/chunk-ZSFNB534.js.map +1 -0
  31. package/dist/eventTypeEnum-B89xECKK.d.mts +240 -0
  32. package/dist/eventTypeEnum-B89xECKK.d.ts +240 -0
  33. package/dist/file-box/api/index.d.mts +133 -0
  34. package/dist/file-box/api/index.d.ts +133 -0
  35. package/dist/file-box/api/index.js +2 -0
  36. package/dist/file-box/api/index.js.map +1 -0
  37. package/dist/file-box/api/index.mjs +2 -0
  38. package/dist/file-box/api/index.mjs.map +1 -0
  39. package/dist/file-box/index.d.mts +4 -0
  40. package/dist/file-box/index.d.ts +4 -0
  41. package/dist/file-box/index.js +2 -0
  42. package/dist/file-box/index.js.map +1 -0
  43. package/dist/file-box/index.mjs +2 -0
  44. package/dist/file-box/index.mjs.map +1 -0
  45. package/dist/file-box/model/index.d.mts +47 -0
  46. package/dist/file-box/model/index.d.ts +47 -0
  47. package/dist/file-box/model/index.js +2 -0
  48. package/dist/file-box/model/index.js.map +1 -0
  49. package/dist/file-box/model/index.mjs +2 -0
  50. package/dist/file-box/model/index.mjs.map +1 -0
  51. package/dist/modeEnum-CSw6xLrL.d.mts +600 -0
  52. package/dist/modeEnum-CSw6xLrL.d.ts +600 -0
  53. package/dist/requirements/api/index.d.mts +466 -0
  54. package/dist/requirements/api/index.d.ts +466 -0
  55. package/dist/requirements/api/index.js +2 -0
  56. package/dist/requirements/api/index.js.map +1 -0
  57. package/dist/requirements/api/index.mjs +2 -0
  58. package/dist/requirements/api/index.mjs.map +1 -0
  59. package/dist/requirements/model/index.d.mts +20 -0
  60. package/dist/requirements/model/index.d.ts +20 -0
  61. package/dist/requirements/model/index.js +2 -0
  62. package/dist/requirements/model/index.js.map +1 -0
  63. package/dist/requirements/model/index.mjs +2 -0
  64. package/dist/requirements/model/index.mjs.map +1 -0
  65. package/dist/rest/index.d.mts +52 -0
  66. package/dist/rest/index.d.ts +52 -0
  67. package/dist/rest/index.js +2 -0
  68. package/dist/rest/index.js.map +1 -0
  69. package/dist/rest/index.mjs +2 -0
  70. package/dist/rest/index.mjs.map +1 -0
  71. package/dist/structure-navigator/api/index.d.mts +311 -0
  72. package/dist/structure-navigator/api/index.d.ts +311 -0
  73. package/dist/structure-navigator/api/index.js +2 -0
  74. package/dist/structure-navigator/api/index.js.map +1 -0
  75. package/dist/structure-navigator/api/index.mjs +2 -0
  76. package/dist/structure-navigator/api/index.mjs.map +1 -0
  77. package/dist/structure-navigator/index.d.mts +5 -0
  78. package/dist/structure-navigator/index.d.ts +5 -0
  79. package/dist/structure-navigator/index.js +2 -0
  80. package/dist/structure-navigator/index.js.map +1 -0
  81. package/dist/structure-navigator/index.mjs +2 -0
  82. package/dist/structure-navigator/index.mjs.map +1 -0
  83. package/dist/structure-navigator/model/index.d.mts +70 -0
  84. package/dist/structure-navigator/model/index.d.ts +70 -0
  85. package/dist/structure-navigator/model/index.js +2 -0
  86. package/dist/structure-navigator/model/index.js.map +1 -0
  87. package/dist/structure-navigator/model/index.mjs +2 -0
  88. package/dist/structure-navigator/model/index.mjs.map +1 -0
  89. package/dist/table-extractor/api/index.d.mts +92 -0
  90. package/dist/table-extractor/api/index.d.ts +92 -0
  91. package/dist/table-extractor/api/index.js +2 -0
  92. package/dist/table-extractor/api/index.js.map +1 -0
  93. package/dist/table-extractor/api/index.mjs +2 -0
  94. package/dist/table-extractor/api/index.mjs.map +1 -0
  95. package/dist/table-extractor/model/index.d.mts +20 -0
  96. package/dist/table-extractor/model/index.d.ts +20 -0
  97. package/dist/table-extractor/model/index.js +2 -0
  98. package/dist/table-extractor/model/index.js.map +1 -0
  99. package/dist/table-extractor/model/index.mjs +2 -0
  100. package/dist/table-extractor/model/index.mjs.map +1 -0
  101. package/dist/tracking/api/index.d.mts +133 -0
  102. package/dist/tracking/api/index.d.ts +133 -0
  103. package/dist/tracking/api/index.js +2 -0
  104. package/dist/tracking/api/index.js.map +1 -0
  105. package/dist/tracking/api/index.mjs +2 -0
  106. package/dist/tracking/api/index.mjs.map +1 -0
  107. package/dist/tracking/index.d.mts +4 -0
  108. package/dist/tracking/index.d.ts +4 -0
  109. package/dist/tracking/index.js +2 -0
  110. package/dist/tracking/index.js.map +1 -0
  111. package/dist/tracking/index.mjs +2 -0
  112. package/dist/tracking/index.mjs.map +1 -0
  113. package/dist/tracking/model/index.d.mts +32 -0
  114. package/dist/tracking/model/index.d.ts +32 -0
  115. package/dist/tracking/model/index.js +2 -0
  116. package/dist/tracking/model/index.js.map +1 -0
  117. package/dist/tracking/model/index.mjs +2 -0
  118. package/dist/tracking/model/index.mjs.map +1 -0
  119. package/package.json +38 -0
@@ -0,0 +1,466 @@
1
+ import { A as AnalysesReport, a as Analysis, N as FormDataContentDisposition, b as AnalysisInput, B as Entity, v as Classification, g as AnalysisResultComment, w as CurrentUser, F as Evaluation, K as ExcelTemplateDetails, R as ModeEnum, L as ExtendedReference, f as AnalysisResult } from '../../modeEnum-CSw6xLrL.js';
2
+ import { RestClient } from '../../rest/index.js';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/requirements/domains/{domainname}/analyses/report"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class ReportEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ /**
17
+ * @param body string[]? -
18
+ */
19
+ post(body: string[], params?: {
20
+ templateid?: string;
21
+ timezone?: string;
22
+ }): Promise<AnalysesReport>;
23
+ /**
24
+ * @param body string[]? -
25
+ */
26
+ postAsXlsx(body: string[], params?: {
27
+ templateid?: string;
28
+ timezone?: string;
29
+ }): Promise<Blob>;
30
+ }
31
+
32
+ /**
33
+ * @author semantha
34
+ *
35
+ * Class to access resource "/api/requirements/domains/{domainname}/analyses"
36
+ * This is a generated file do not change manually!
37
+ */
38
+ declare class AnalysesEndpoint {
39
+ private readonly restClient;
40
+ private readonly parentEndpoint;
41
+ private readonly ENDPOINT;
42
+ constructor(restClient: RestClient, parentEndpoint: string);
43
+ report(): ReportEndpoint;
44
+ get(): Promise<Analysis[]>;
45
+ delete(): Promise<void>;
46
+ /**
47
+ * @param file FormDataContentDisposition? -
48
+ * @param analysisdata AnalysisInput[]? -
49
+ * @param similaritythreshold number? -
50
+ * @param strategy string? -
51
+ * @param name string? -
52
+ * @param maxreferences number? -
53
+ * @param tags string? -
54
+ * @param documentclassids string[]? -
55
+ * @param goodmatchesthreshold number? -
56
+ * @param matchallreferences boolean? -
57
+ * @param showdocscore boolean? -
58
+ * @param type string? -
59
+ * @param promptid string? -
60
+ */
61
+ post(data: {
62
+ file?: FormDataContentDisposition;
63
+ analysisdata?: AnalysisInput[];
64
+ similaritythreshold?: number;
65
+ strategy?: string;
66
+ name?: string;
67
+ maxreferences?: number;
68
+ tags?: string;
69
+ documentclassids?: string[];
70
+ goodmatchesthreshold?: number;
71
+ matchallreferences?: boolean;
72
+ showdocscore?: boolean;
73
+ type?: string;
74
+ promptid?: string;
75
+ }): Promise<void>;
76
+ }
77
+
78
+ /**
79
+ * @author semantha
80
+ *
81
+ * Class to access resource "/api/requirements/domains/{domainname}/results/export"
82
+ * This is a generated file do not change manually!
83
+ */
84
+ declare class ExportEndpoint {
85
+ private readonly restClient;
86
+ private readonly parentEndpoint;
87
+ private readonly ENDPOINT;
88
+ constructor(restClient: RestClient, parentEndpoint: string);
89
+ /**
90
+ * @param body string[]? -
91
+ */
92
+ postAsXlsx(body: string[], params?: {
93
+ templateid?: string;
94
+ }): Promise<Blob>;
95
+ }
96
+
97
+ /**
98
+ * @author semantha
99
+ *
100
+ * Class to access resource "/api/requirements/domains/{domainname}/results"
101
+ * This is a generated file do not change manually!
102
+ */
103
+ declare class ResultsEndpoint {
104
+ private readonly restClient;
105
+ private readonly parentEndpoint;
106
+ private readonly ENDPOINT;
107
+ constructor(restClient: RestClient, parentEndpoint: string);
108
+ export(): ExportEndpoint;
109
+ }
110
+
111
+ /**
112
+ * @author semantha
113
+ *
114
+ * Class to access resource "/api/requirements/domains/{domainname}/analyses/{analysisid}"
115
+ * This is a generated file do not change manually!
116
+ */
117
+ declare class AnalysisEndpoint {
118
+ private readonly restClient;
119
+ private readonly parentEndpoint;
120
+ private readonly analysisid;
121
+ private readonly ENDPOINT;
122
+ constructor(restClient: RestClient, parentEndpoint: string, analysisid: string);
123
+ results(): ResultsEndpoint;
124
+ delete(): Promise<void>;
125
+ /**
126
+ * @param body Entity -
127
+ */
128
+ patch(body: Entity): Promise<Analysis>;
129
+ }
130
+
131
+ /**
132
+ * @author semantha
133
+ *
134
+ * Class to access resource "/api/requirements/domains/{domainname}/bulk"
135
+ * This is a generated file do not change manually!
136
+ */
137
+ declare class BulkEndpoint {
138
+ private readonly restClient;
139
+ private readonly parentEndpoint;
140
+ private readonly ENDPOINT;
141
+ constructor(restClient: RestClient, parentEndpoint: string);
142
+ results(): ResultsEndpoint;
143
+ }
144
+
145
+ /**
146
+ * @author semantha
147
+ *
148
+ * Class to access resource "/api/requirements/domains/{domainname}/classifications"
149
+ * This is a generated file do not change manually!
150
+ */
151
+ declare class ClassificationsEndpoint {
152
+ private readonly restClient;
153
+ private readonly parentEndpoint;
154
+ private readonly ENDPOINT;
155
+ constructor(restClient: RestClient, parentEndpoint: string);
156
+ get(): Promise<Classification[]>;
157
+ }
158
+
159
+ /**
160
+ * @author semantha
161
+ *
162
+ * Class to access resource "/api/requirements/domains/{domainname}/results/{resultid}/comments"
163
+ * This is a generated file do not change manually!
164
+ */
165
+ declare class CommentsEndpoint {
166
+ private readonly restClient;
167
+ private readonly parentEndpoint;
168
+ private readonly ENDPOINT;
169
+ constructor(restClient: RestClient, parentEndpoint: string);
170
+ /**
171
+ * @param body AnalysisResultComment? -
172
+ */
173
+ post(body?: AnalysisResultComment): Promise<void>;
174
+ }
175
+
176
+ /**
177
+ * @author semantha
178
+ *
179
+ * Class to access resource "/api/requirements/currentuser/roles"
180
+ * This is a generated file do not change manually!
181
+ */
182
+ declare class RolesEndpoint {
183
+ private readonly restClient;
184
+ private readonly parentEndpoint;
185
+ private readonly ENDPOINT;
186
+ constructor(restClient: RestClient, parentEndpoint: string);
187
+ /**
188
+ * Get the role/s of the current user.
189
+ */
190
+ get(): Promise<string[]>;
191
+ }
192
+
193
+ /**
194
+ * @author semantha
195
+ *
196
+ * Class to access resource "/api/requirements/currentuser"
197
+ * This is a generated file do not change manually!
198
+ */
199
+ declare class CurrentuserEndpoint {
200
+ private readonly restClient;
201
+ private readonly parentEndpoint;
202
+ private readonly ENDPOINT;
203
+ constructor(restClient: RestClient, parentEndpoint: string);
204
+ roles(): RolesEndpoint;
205
+ /**
206
+ * Get information about the current user.
207
+ */
208
+ get(): Promise<CurrentUser>;
209
+ }
210
+
211
+ /**
212
+ * @author semantha
213
+ *
214
+ * Class to access resource "/api/requirements/domains/{domainname}/evaluations/{id}"
215
+ * This is a generated file do not change manually!
216
+ */
217
+ declare class EvaluationEndpoint {
218
+ private readonly restClient;
219
+ private readonly parentEndpoint;
220
+ private readonly id;
221
+ private readonly ENDPOINT;
222
+ constructor(restClient: RestClient, parentEndpoint: string, id: string);
223
+ get(): Promise<Evaluation>;
224
+ /**
225
+ * @param body Evaluation -
226
+ */
227
+ patch(body: Evaluation): Promise<Evaluation>;
228
+ }
229
+
230
+ /**
231
+ * @author semantha
232
+ *
233
+ * Class to access resource "/api/requirements/domains/{domainname}/results/{resultid}/evaluations"
234
+ * This is a generated file do not change manually!
235
+ */
236
+ declare class EvaluationsEndpoint {
237
+ private readonly restClient;
238
+ private readonly parentEndpoint;
239
+ private readonly ENDPOINT;
240
+ constructor(restClient: RestClient, parentEndpoint: string);
241
+ delete(): Promise<void>;
242
+ /**
243
+ * @param body Evaluation[] -
244
+ */
245
+ put(body: Evaluation[]): Promise<Evaluation[]>;
246
+ /**
247
+ * @param body Evaluation? -
248
+ */
249
+ post(body?: Evaluation): Promise<Evaluation>;
250
+ }
251
+
252
+ /**
253
+ * @author semantha
254
+ *
255
+ * Class to access resource "/api/requirements/domains/{domainname}/exceltemplates/{id}"
256
+ * This is a generated file do not change manually!
257
+ */
258
+ declare class ExceltemplateEndpoint {
259
+ private readonly restClient;
260
+ private readonly parentEndpoint;
261
+ private readonly id;
262
+ private readonly ENDPOINT;
263
+ constructor(restClient: RestClient, parentEndpoint: string, id: string);
264
+ get(params?: {
265
+ analysisid?: string;
266
+ }): Promise<ExcelTemplateDetails>;
267
+ delete(): Promise<void>;
268
+ /**
269
+ * @param body ExcelTemplateDetails -
270
+ */
271
+ put(body: ExcelTemplateDetails): Promise<ExcelTemplateDetails>;
272
+ }
273
+
274
+ /**
275
+ * @author semantha
276
+ *
277
+ * Class to access resource "/api/requirements/domains/{domainname}/exceltemplates/new"
278
+ * This is a generated file do not change manually!
279
+ */
280
+ declare class NewEndpoint {
281
+ private readonly restClient;
282
+ private readonly parentEndpoint;
283
+ private readonly ENDPOINT;
284
+ constructor(restClient: RestClient, parentEndpoint: string);
285
+ get(params?: {
286
+ analysisid?: string;
287
+ }): Promise<ExcelTemplateDetails>;
288
+ }
289
+
290
+ /**
291
+ * @author semantha
292
+ *
293
+ * Class to access resource "/api/requirements/domains/{domainname}/exceltemplates"
294
+ * This is a generated file do not change manually!
295
+ */
296
+ declare class ExceltemplatesEndpoint {
297
+ private readonly restClient;
298
+ private readonly parentEndpoint;
299
+ private readonly ENDPOINT;
300
+ constructor(restClient: RestClient, parentEndpoint: string);
301
+ new(): NewEndpoint;
302
+ get(): Promise<Entity[]>;
303
+ /**
304
+ * @param body ExcelTemplateDetails? -
305
+ */
306
+ post(body?: ExcelTemplateDetails): Promise<ExcelTemplateDetails>;
307
+ }
308
+
309
+ /**
310
+ * @author semantha
311
+ *
312
+ * Class to access resource "/api/requirements/domains/{domainname}/references"
313
+ * This is a generated file do not change manually!
314
+ */
315
+ declare class ReferencesEndpoint {
316
+ private readonly restClient;
317
+ private readonly parentEndpoint;
318
+ private readonly ENDPOINT;
319
+ constructor(restClient: RestClient, parentEndpoint: string);
320
+ /**
321
+ * @param file AnalysisInput? -
322
+ * @param referencedocument Blob? - Optional reference documents
323
+ * @param tags string? -
324
+ * @param similaritythreshold number? -
325
+ * @param documentclassids string[]? -
326
+ * @param mode ModeEnum? -
327
+ */
328
+ post(data: {
329
+ file?: AnalysisInput;
330
+ referencedocument?: Blob;
331
+ tags?: string;
332
+ similaritythreshold?: number;
333
+ documentclassids?: string[];
334
+ mode?: ModeEnum;
335
+ }): Promise<ExtendedReference[]>;
336
+ }
337
+
338
+ /**
339
+ * @author semantha
340
+ *
341
+ * Class to access resource "/api/requirements/domains/{domainname}/results/{resultid}"
342
+ * This is a generated file do not change manually!
343
+ */
344
+ declare class ResultEndpoint {
345
+ private readonly restClient;
346
+ private readonly parentEndpoint;
347
+ private readonly resultid;
348
+ private readonly ENDPOINT;
349
+ constructor(restClient: RestClient, parentEndpoint: string, resultid: string);
350
+ comments(): CommentsEndpoint;
351
+ evaluations(): EvaluationsEndpoint;
352
+ get(params?: {
353
+ withreferencedocument?: boolean;
354
+ }): Promise<AnalysisResult>;
355
+ delete(): Promise<void>;
356
+ /**
357
+ * @param body AnalysisResult -
358
+ */
359
+ patch(body: AnalysisResult): Promise<AnalysisResult>;
360
+ }
361
+
362
+ /**
363
+ * @author semantha
364
+ *
365
+ * Class to access resource "/api/requirements/domains/{domainname}"
366
+ * This is a generated file do not change manually!
367
+ */
368
+ declare class DomainEndpoint {
369
+ private readonly restClient;
370
+ private readonly parentEndpoint;
371
+ private readonly domainname;
372
+ private readonly ENDPOINT;
373
+ constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
374
+ analyses(): AnalysesEndpoint;
375
+ analyses(analysisid: string): AnalysisEndpoint;
376
+ bulk(): BulkEndpoint;
377
+ classifications(): ClassificationsEndpoint;
378
+ evaluations(): EvaluationsEndpoint;
379
+ evaluations(id: string): EvaluationEndpoint;
380
+ exceltemplates(): ExceltemplatesEndpoint;
381
+ exceltemplates(id: string): ExceltemplateEndpoint;
382
+ references(): ReferencesEndpoint;
383
+ results(): ResultsEndpoint;
384
+ results(resultid: string): ResultEndpoint;
385
+ }
386
+
387
+ /**
388
+ * @author semantha
389
+ *
390
+ * Class to access resource "/api/requirements/domains"
391
+ * This is a generated file do not change manually!
392
+ */
393
+ declare class DomainsEndpoint {
394
+ private readonly restClient;
395
+ private readonly parentEndpoint;
396
+ private readonly ENDPOINT;
397
+ constructor(restClient: RestClient, parentEndpoint: string);
398
+ }
399
+
400
+ /**
401
+ * @author semantha
402
+ *
403
+ * Class to access resource "/api/requirements"
404
+ * This is a generated file do not change manually!
405
+ */
406
+ declare class RequirementsEndpoint {
407
+ private readonly restClient;
408
+ private readonly parentEndpoint;
409
+ private readonly ENDPOINT;
410
+ constructor(restClient: RestClient, parentEndpoint: string);
411
+ currentuser(): CurrentuserEndpoint;
412
+ domains(): DomainsEndpoint;
413
+ domains(domainname: string): DomainEndpoint;
414
+ }
415
+
416
+ /**
417
+ * Entry point to the Requirements API.
418
+ *
419
+ * @author semantha
420
+ * Calls the /requirements, endpoints.
421
+ *
422
+ * Note:
423
+ * The constructor is not meant to be invoked directly
424
+ * use `loginXXX()` with your credentials instead.
425
+ *
426
+ * this is a generated class do not change manually!
427
+ */
428
+ declare class RequirementsAPI {
429
+ private readonly restClient;
430
+ private readonly parentEndpoint;
431
+ constructor(restClient: RestClient, parentEndpoint: string);
432
+ /**
433
+ * Access to the Requirements API
434
+ *
435
+ * @param serverUrl: string - URL to the Requirements server.
436
+ * @param apiKey: string - A valid bearer token for accessing the given url.
437
+ *
438
+ * @return RequirementsAPI: Entry point to the Requirements API.
439
+ */
440
+ static loginWithApiKey(serverUrl: string, apiKey: string): RequirementsAPI;
441
+ /**
442
+ * Access to the Requirements API
443
+ *
444
+ * @param serverUrl: string - URL to the Requirements server.
445
+ * @param clientId: string - OAuth2 client id.
446
+ * @param clientSecret: string - OAuth2 client secret.
447
+ * @param tokenUrl: string OAuth2 url to get a valid access token
448
+ *
449
+ * @return RequirementsAPI: Entry point to the Requirements API.
450
+ */
451
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): RequirementsAPI;
452
+ /**
453
+ * Access to the Requirements API
454
+ *
455
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
456
+ *
457
+ * @return RequirementsAPI: Entry point to the Requirements API.
458
+ */
459
+ static loginWithCredentialsFile(credentialsFilePath: string): RequirementsAPI;
460
+ private static parseServerUrl;
461
+ private static getValueOfInPropertiesFile;
462
+ endpoint(): string;
463
+ requirements(): RequirementsEndpoint;
464
+ }
465
+
466
+ export { AnalysesEndpoint, AnalysisEndpoint, BulkEndpoint, ClassificationsEndpoint, CommentsEndpoint, CurrentuserEndpoint, DomainEndpoint, DomainsEndpoint, EvaluationEndpoint, EvaluationsEndpoint, ExceltemplateEndpoint, ExceltemplatesEndpoint, ExportEndpoint, NewEndpoint, ReferencesEndpoint, ReportEndpoint, RequirementsAPI, RequirementsEndpoint, ResultEndpoint, ResultsEndpoint, RolesEndpoint };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkZ3N63BWG_js=require('../../chunk-Z3N63BWG.js'),M=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 M__namespace=/*#__PURE__*/_interopNamespace(M);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)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=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)).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}};var d=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.analysisid=r;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var m=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 E=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 N=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 h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new h(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var f=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 C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new f(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 P=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 g=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.resultid=r;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new N(this.restClient,this.ENDPOINT)}evaluations(){return new o(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var T=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.domainname=r;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;analyses(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new m(this.restClient,this.ENDPOINT)}classifications(){return new E(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new y(this.restClient,this.ENDPOINT,t):new C(this.restClient,this.ENDPOINT)}references(){return new P(this.restClient,this.ENDPOINT)}results(t){return t!=null?new g(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var D=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new u(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new T(this.restClient,this.ENDPOINT,t):new D(this.restClient,this.ENDPOINT)}};var R="/api",w=class i{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 i(new chunkZ3N63BWG_js.c(this.parseServerUrl(t),e),R)}static loginWithCredentials(t,e,r,I){return t=this.parseServerUrl(t),new i(new chunkZ3N63BWG_js.c(t,void 0,e,r,I),R)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=M__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(v=>v.length!==0).map(v=>v.split("=")),I=this.getValueOfInPropertiesFile("serverUrl",r),A=this.getValueOfInPropertiesFile("clientId",r),S=this.getValueOfInPropertiesFile("clientSecret",r),H=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(I,A,S,H)}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 r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}requirements(){return new O(this.restClient,this.endpoint())}};exports.AnalysesEndpoint=l;exports.AnalysisEndpoint=d;exports.BulkEndpoint=m;exports.ClassificationsEndpoint=E;exports.CommentsEndpoint=N;exports.CurrentuserEndpoint=u;exports.DomainEndpoint=T;exports.DomainsEndpoint=D;exports.EvaluationEndpoint=c;exports.EvaluationsEndpoint=o;exports.ExceltemplateEndpoint=y;exports.ExceltemplatesEndpoint=C;exports.ExportEndpoint=p;exports.NewEndpoint=f;exports.ReferencesEndpoint=P;exports.ReportEndpoint=a;exports.RequirementsAPI=w;exports.RequirementsEndpoint=O;exports.ResultEndpoint=g;exports.ResultsEndpoint=s;exports.RolesEndpoint=h;//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/requirements/api/report.ts","../../../semantha-product-sdk/requirements/api/analyses.ts","../../../semantha-product-sdk/requirements/api/export.ts","../../../semantha-product-sdk/requirements/api/results.ts","../../../semantha-product-sdk/requirements/api/analysis.ts","../../../semantha-product-sdk/requirements/api/bulk.ts","../../../semantha-product-sdk/requirements/api/classifications.ts","../../../semantha-product-sdk/requirements/api/comments.ts","../../../semantha-product-sdk/requirements/api/roles.ts","../../../semantha-product-sdk/requirements/api/currentuser.ts","../../../semantha-product-sdk/requirements/api/evaluation.ts","../../../semantha-product-sdk/requirements/api/evaluations.ts","../../../semantha-product-sdk/requirements/api/exceltemplate.ts","../../../semantha-product-sdk/requirements/api/new.ts","../../../semantha-product-sdk/requirements/api/exceltemplates.ts","../../../semantha-product-sdk/requirements/api/references.ts","../../../semantha-product-sdk/requirements/api/result.ts","../../../semantha-product-sdk/requirements/api/domain.ts","../../../semantha-product-sdk/requirements/api/domains.ts","../../../semantha-product-sdk/requirements/api/requirements.ts","../../../semantha-product-sdk/requirements/api/requirementsAPI.ts"],"names":["ReportEndpoint","restClient","parentEndpoint","body","params","AnalysesEndpoint","data","ExportEndpoint","ResultsEndpoint","AnalysisEndpoint","analysisid","BulkEndpoint","ClassificationsEndpoint","CommentsEndpoint","RolesEndpoint","CurrentuserEndpoint","EvaluationEndpoint","id","EvaluationsEndpoint","ExceltemplateEndpoint","NewEndpoint","ExceltemplatesEndpoint","ReferencesEndpoint","ResultEndpoint","resultid","DomainEndpoint","domainname","DomainsEndpoint","RequirementsEndpoint","PARENT_ENDPOINT","RequirementsAPI","_RequirementsAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","M","line","searchKey"],"mappings":"2bAUO,IAAMA,EAAN,KAAqB,CAG1B,WACmBC,CAAAA,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,EAEjB,IAAK,CAAA,QAAA,CAAW,KAAK,cAAiB,CAAA,UACxC,CAPiB,QAYjB,CAAA,MAAM,IACJC,CAAAA,CAAAA,CACAC,EAG0B,CAC1B,OAAA,CACE,MAAM,IAAK,CAAA,UAAA,CAAW,KACpB,IAAK,CAAA,QAAA,CACLA,CACA,CAAA,IAAA,CAAK,WAAW,Q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A,EAAU,QAAS,CAAA,GAAG,IACxBA,CAAYA,CAAAA,CAAAA,CAAU,MAAM,CAAG,CAAA,EAAE,CAE/BA,CAAAA,CAAAA,CAAAA,CAAU,SAAS,sBAAsB,CAAA,CAC3CA,EAAYA,CAAU,CAAA,OAAA,CAAQ,uBAAwB,oBAAoB,CAAA,CAChEA,CAAU,CAAA,QAAA,CAAS,oBAAoB,CACjDA,GAAAA,CAAAA,EAAa,sBAERA,CACT,CAEA,OAAe,0BAA2BU,CAAAA,CAAAA,CAAmBH,CAA2B,CAAA,CACtF,QAAWE,CAAQF,IAAAA,CAAAA,CACjB,GAAIE,CAAK,CAAA,CAAC,IAAMC,CACd,CAAA,OAAOD,CAAK,CAAA,CAAC,EAAE,OAAQ,CAAA,KAAA,CAAO,GAAG,CAGrC,CAAA,MAAM,MAAM,CAAiCC,8BAAAA,EAAAA,CAAS,CAAG,CAAA,CAAA,CAC3D,CAEA,QAAmB,EAAA,CACjB,OAAO,IAAK,CAAA,cACd,CAEA,YAAqC,EAAA,CACnC,OAAO,IAAId,EAAqB,IAAK,CAAA,UAAA,CAAY,KAAK,QAAS,EAAC,CAClE,CAEF","file":"index.js","sourcesContent":["import { AnalysesReport } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/report\"\n * This is a generated file do not change manually!\n */\nexport class ReportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/report\";\n }\n\n /**\n * @param body string[]? - \n */\n async post(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<AnalysesReport> {\n return (\n await this.restClient.post<AnalysesReport>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n \n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n timezone?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body\n )\n ).toModel();\n }\n}\n","import { Analysis } from '../model';\nimport { AnalysisInput } from '../model';\nimport { FormDataContentDisposition } from '../model';\nimport { MediaType } from '../../rest';\nimport { ReportEndpoint } from './report';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses\"\n * This is a generated file do not change manually!\n */\nexport class AnalysesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\";\n }\n\n report(): ReportEndpoint {\n return new ReportEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Analysis[]> {\n return (\n await this.restClient.get<Analysis[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param file FormDataContentDisposition? - \n * @param analysisdata AnalysisInput[]? - \n * @param similaritythreshold number? - \n * @param strategy string? - \n * @param name string? - \n * @param maxreferences number? - \n * @param tags string? - \n * @param documentclassids string[]? - \n * @param goodmatchesthreshold number? - \n * @param matchallreferences boolean? - \n * @param showdocscore boolean? - \n * @param type string? - \n * @param promptid string? - \n */\n async post(data: {\n file?: FormDataContentDisposition,\n analysisdata?: AnalysisInput[],\n similaritythreshold?: number,\n strategy?: string,\n name?: string,\n maxreferences?: number,\n tags?: string,\n documentclassids?: string[],\n goodmatchesthreshold?: number,\n matchallreferences?: boolean,\n showdocscore?: boolean,\n type?: string,\n promptid?: string,\n }): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/export\"\n * This is a generated file do not change manually!\n */\nexport class ExportEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/export\";\n }\n\n /**\n * @param body string[]? - \n */\n async postAsXlsx(\n body: string[],\n params?: {\n templateid?: string,\n }): Promise<Blob> {\n return (\n await this.restClient.post<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.XLSX),\n body\n )\n ).toModel();\n }\n}\n","import { ExportEndpoint } from './export';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results\"\n * This is a generated file do not change manually!\n */\nexport class ResultsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\";\n }\n\n export(): ExportEndpoint {\n return new ExportEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { Analysis } from '../model';\nimport { Entity } from '../model';\nimport { RestClient } from '../../rest';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/analyses/{analysisid}\"\n * This is a generated file do not change manually!\n */\nexport class AnalysisEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly analysisid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/analyses\" + `/${this.analysisid}`;\n }\n\n results(): ResultsEndpoint {\n return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Entity - \n */\n async patch(\n body: Entity,\n ): Promise<Analysis> {\n return (\n await this.restClient.patch<Analysis>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { RestClient } from '../../rest';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/bulk\"\n * This is a generated file do not change manually!\n */\nexport class BulkEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/bulk\";\n }\n\n results(): ResultsEndpoint {\n return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import { Classification } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/classifications\"\n * This is a generated file do not change manually!\n */\nexport class ClassificationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/classifications\";\n }\n\n async get(): Promise<Classification[]> {\n return (\n await this.restClient.get<Classification[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { AnalysisResultComment } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/comments\"\n * This is a generated file do not change manually!\n */\nexport class CommentsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/comments\";\n }\n\n /**\n * @param body AnalysisResultComment? - \n */\n async post(\n body?: AnalysisResultComment,\n ): Promise<void> {\n return (\n await this.restClient.post<void>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser/roles\"\n * This is a generated file do not change manually!\n */\nexport class RolesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/roles\";\n }\n\n /**\n * Get the role/s of the current user.\n */\n async get(): Promise<string[]> {\n return (\n await this.restClient.get<string[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { CurrentUser } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { RolesEndpoint } from './roles';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/currentuser\"\n * This is a generated file do not change manually!\n */\nexport class CurrentuserEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/currentuser\";\n }\n\n roles(): RolesEndpoint {\n return new RolesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Get information about the current user.\n */\n async get(): Promise<CurrentUser> {\n return (\n await this.restClient.get<CurrentUser>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/evaluations/{id}\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\" + `/${this.id}`;\n }\n\n async get(): Promise<Evaluation> {\n return (\n await this.restClient.get<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation - \n */\n async patch(\n body: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.patch<Evaluation>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Evaluation } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}/evaluations\"\n * This is a generated file do not change manually!\n */\nexport class EvaluationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/evaluations\";\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body Evaluation[] - \n */\n async put(\n body: Evaluation[],\n ): Promise<Evaluation[]> {\n return (\n await this.restClient.put<Evaluation[]>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * @param body Evaluation? - \n */\n async post(\n body?: Evaluation,\n ): Promise<Evaluation> {\n return (\n await this.restClient.post<Evaluation>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/{id}\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplateEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\" + `/${this.id}`;\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body ExcelTemplateDetails - \n */\n async put(\n body: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.put<ExcelTemplateDetails>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates/new\"\n * This is a generated file do not change manually!\n */\nexport class NewEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/new\";\n }\n\n async get(params?: {\n analysisid?: string,\n }): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.get<ExcelTemplateDetails>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Entity } from '../model';\nimport { ExcelTemplateDetails } from '../model';\nimport { MediaType } from '../../rest';\nimport { NewEndpoint } from './new';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/exceltemplates\"\n * This is a generated file do not change manually!\n */\nexport class ExceltemplatesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/exceltemplates\";\n }\n\n new(): NewEndpoint {\n return new NewEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(): Promise<Entity[]> {\n return (\n await this.restClient.get<Entity[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * @param body ExcelTemplateDetails? - \n */\n async post(\n body?: ExcelTemplateDetails,\n ): Promise<ExcelTemplateDetails> {\n return (\n await this.restClient.post<ExcelTemplateDetails>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { AnalysisInput } from '../model';\nimport { ExtendedReference } from '../model';\nimport { MediaType } from '../../rest';\nimport { ModeEnum } from '../model';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/references\"\n * This is a generated file do not change manually!\n */\nexport class ReferencesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/references\";\n }\n\n /**\n * @param file AnalysisInput? - \n * @param referencedocument Blob? - Optional reference documents\n * @param tags string? - \n * @param similaritythreshold number? - \n * @param documentclassids string[]? - \n * @param mode ModeEnum? - \n */\n async post(data: {\n file?: AnalysisInput,\n referencedocument?: Blob,\n tags?: string,\n similaritythreshold?: number,\n documentclassids?: string[],\n mode?: ModeEnum,\n }): Promise<ExtendedReference[]> {\n return (\n await this.restClient.post<ExtendedReference[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { AnalysisResult } from '../model';\nimport { CommentsEndpoint } from './comments';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}/results/{resultid}\"\n * This is a generated file do not change manually!\n */\nexport class ResultEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly resultid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/results\" + `/${this.resultid}`;\n }\n\n comments(): CommentsEndpoint {\n return new CommentsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint {\n return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n async get(params?: {\n withreferencedocument?: boolean,\n }): Promise<AnalysisResult> {\n return (\n await this.restClient.get<AnalysisResult>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n async delete(): Promise<void> {\n await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * @param body AnalysisResult - \n */\n async patch(\n body: AnalysisResult,\n ): Promise<AnalysisResult> {\n return (\n await this.restClient.patch<AnalysisResult>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { AnalysesEndpoint } from './analyses';\nimport { AnalysisEndpoint } from './analysis';\nimport { BulkEndpoint } from './bulk';\nimport { ClassificationsEndpoint } from './classifications';\nimport { EvaluationEndpoint } from './evaluation';\nimport { EvaluationsEndpoint } from './evaluations';\nimport { ExceltemplateEndpoint } from './exceltemplate';\nimport { ExceltemplatesEndpoint } from './exceltemplates';\nimport { ReferencesEndpoint } from './references';\nimport { RestClient } from '../../rest';\nimport { ResultEndpoint } from './result';\nimport { ResultsEndpoint } from './results';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n analyses(): AnalysesEndpoint;\n analyses(analysisid: string): AnalysisEndpoint\n \n analyses(analysisid?: string): AnalysisEndpoint | AnalysesEndpoint {\n if(analysisid !== undefined && analysisid !== null) {\n\t return new AnalysisEndpoint(this.restClient, this.ENDPOINT, analysisid);\n } else {\n\t return new AnalysesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n bulk(): BulkEndpoint {\n return new BulkEndpoint(this.restClient, this.ENDPOINT);\n }\n\n classifications(): ClassificationsEndpoint {\n return new ClassificationsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n evaluations(): EvaluationsEndpoint;\n evaluations(id: string): EvaluationEndpoint\n \n evaluations(id?: string): EvaluationEndpoint | EvaluationsEndpoint {\n if(id !== undefined && id !== null) {\n\t return new EvaluationEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new EvaluationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n exceltemplates(): ExceltemplatesEndpoint;\n exceltemplates(id: string): ExceltemplateEndpoint\n \n exceltemplates(id?: string): ExceltemplateEndpoint | ExceltemplatesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new ExceltemplateEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new ExceltemplatesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n references(): ReferencesEndpoint {\n return new ReferencesEndpoint(this.restClient, this.ENDPOINT);\n }\n\n results(): ResultsEndpoint;\n results(resultid: string): ResultEndpoint\n \n results(resultid?: string): ResultEndpoint | ResultsEndpoint {\n if(resultid !== undefined && resultid !== null) {\n\t return new ResultEndpoint(this.restClient, this.ENDPOINT, resultid);\n } else {\n\t return new ResultsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { CurrentuserEndpoint } from './currentuser';\nimport { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/requirements\"\n * This is a generated file do not change manually!\n */\nexport class RequirementsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/requirements\";\n }\n\n currentuser(): CurrentuserEndpoint {\n return new CurrentuserEndpoint(this.restClient, this.ENDPOINT);\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { RequirementsEndpoint } from './requirements';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the Requirements API.\n *\n * @author semantha\n * Calls the /requirements, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class RequirementsAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): RequirementsAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new RequirementsAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the Requirements API\n *\n * @param serverUrl: string - URL to the Requirements server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): RequirementsAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new RequirementsAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the Requirements API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return RequirementsAPI: Entry point to the Requirements API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : RequirementsAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return RequirementsAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n requirements(): RequirementsEndpoint {\n return new RequirementsEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,2 @@
1
+ import {c as c$1}from'../../chunk-DOK44NQJ.mjs';import*as M from'fs';var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/report";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}async postAsXlsx(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),t)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/analyses";}ENDPOINT;report(){return new a(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=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)).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/results";}ENDPOINT;export(){return new p(this.restClient,this.ENDPOINT)}};var d=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.analysisid=r;this.ENDPOINT=this.parentEndpoint+`/analyses/${this.analysisid}`;}ENDPOINT;results(){return new s(this.restClient,this.ENDPOINT)}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var m=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 E=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 N=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 h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/roles";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/currentuser";}ENDPOINT;roles(){return new h(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var c=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/evaluations/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/evaluations";}ENDPOINT;async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var y=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/exceltemplates/${this.id}`;}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var f=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 C=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/exceltemplates";}ENDPOINT;new(){return new f(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 P=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 g=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.resultid=r;this.ENDPOINT=this.parentEndpoint+`/results/${this.resultid}`;}ENDPOINT;comments(){return new N(this.restClient,this.ENDPOINT)}evaluations(){return new o(this.restClient,this.ENDPOINT)}async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){await this.restClient.delete(this.ENDPOINT);}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var T=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.domainname=r;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;analyses(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}bulk(){return new m(this.restClient,this.ENDPOINT)}classifications(){return new E(this.restClient,this.ENDPOINT)}evaluations(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}exceltemplates(t){return t!=null?new y(this.restClient,this.ENDPOINT,t):new C(this.restClient,this.ENDPOINT)}references(){return new P(this.restClient,this.ENDPOINT)}results(t){return t!=null?new g(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var D=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var O=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/requirements";}ENDPOINT;currentuser(){return new u(this.restClient,this.ENDPOINT)}domains(t){return t!=null?new T(this.restClient,this.ENDPOINT,t):new D(this.restClient,this.ENDPOINT)}};var R="/api",w=class i{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 i(new c$1(this.parseServerUrl(t),e),R)}static loginWithCredentials(t,e,r,I){return t=this.parseServerUrl(t),new i(new c$1(t,void 0,e,r,I),R)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=M.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(v=>v.length!==0).map(v=>v.split("=")),I=this.getValueOfInPropertiesFile("serverUrl",r),A=this.getValueOfInPropertiesFile("clientId",r),S=this.getValueOfInPropertiesFile("clientSecret",r),H=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(I,A,S,H)}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 r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}requirements(){return new O(this.restClient,this.endpoint())}};export{l as AnalysesEndpoint,d as AnalysisEndpoint,m as BulkEndpoint,E as ClassificationsEndpoint,N as CommentsEndpoint,u as CurrentuserEndpoint,T as DomainEndpoint,D as DomainsEndpoint,c as EvaluationEndpoint,o as EvaluationsEndpoint,y as ExceltemplateEndpoint,C as ExceltemplatesEndpoint,p as ExportEndpoint,f as NewEndpoint,P as ReferencesEndpoint,a as ReportEndpoint,w as RequirementsAPI,O as RequirementsEndpoint,g as ResultEndpoint,s as ResultsEndpoint,h as RolesEndpoint};//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map