@ignos/api-client 20240621.0.9621 → 20240625.0.9640
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/lib/ignosportal-api.d.ts +3 -0
- package/lib/ignosportal-api.js +35 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +37 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -657,6 +657,7 @@ export interface IMeasuringToolsClient {
|
|
|
657
657
|
removeMeasuringToolFromWhitelist(id: string): Promise<void>;
|
|
658
658
|
listUnregisteredToolValues(): Promise<UnregisteredToolValueDto[]>;
|
|
659
659
|
deprecateTool(id: string, request: DeprecateToolRequest): Promise<void>;
|
|
660
|
+
restoreTool(id: string): Promise<void>;
|
|
660
661
|
getCalibrationList(status: CalibrationListStatus | undefined): Promise<CalibrationListToolDto[]>;
|
|
661
662
|
importMeasuringTool(request: ImportMeasuringTool): Promise<MeasuringToolDetailDto>;
|
|
662
663
|
importMeasuringTools(request: FileParameter | null | undefined): Promise<MeasuringToolImportResultDto>;
|
|
@@ -724,6 +725,8 @@ export declare class MeasuringToolsClient extends AuthorizedApiBase implements I
|
|
|
724
725
|
protected processListUnregisteredToolValues(response: Response): Promise<UnregisteredToolValueDto[]>;
|
|
725
726
|
deprecateTool(id: string, request: DeprecateToolRequest): Promise<void>;
|
|
726
727
|
protected processDeprecateTool(response: Response): Promise<void>;
|
|
728
|
+
restoreTool(id: string): Promise<void>;
|
|
729
|
+
protected processRestoreTool(response: Response): Promise<void>;
|
|
727
730
|
getCalibrationList(status: CalibrationListStatus | undefined): Promise<CalibrationListToolDto[]>;
|
|
728
731
|
protected processGetCalibrationList(response: Response): Promise<CalibrationListToolDto[]>;
|
|
729
732
|
importMeasuringTool(request: ImportMeasuringTool): Promise<MeasuringToolDetailDto>;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -5461,6 +5461,41 @@ export class MeasuringToolsClient extends AuthorizedApiBase {
|
|
|
5461
5461
|
}
|
|
5462
5462
|
return Promise.resolve(null);
|
|
5463
5463
|
}
|
|
5464
|
+
restoreTool(id) {
|
|
5465
|
+
let url_ = this.baseUrl + "/measuringtools/restore/{id}";
|
|
5466
|
+
if (id === undefined || id === null)
|
|
5467
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5468
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5469
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5470
|
+
let options_ = {
|
|
5471
|
+
method: "PUT",
|
|
5472
|
+
headers: {}
|
|
5473
|
+
};
|
|
5474
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5475
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5476
|
+
}).then((_response) => {
|
|
5477
|
+
return this.processRestoreTool(_response);
|
|
5478
|
+
});
|
|
5479
|
+
}
|
|
5480
|
+
processRestoreTool(response) {
|
|
5481
|
+
const status = response.status;
|
|
5482
|
+
let _headers = {};
|
|
5483
|
+
if (response.headers && response.headers.forEach) {
|
|
5484
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
5485
|
+
}
|
|
5486
|
+
;
|
|
5487
|
+
if (status === 204) {
|
|
5488
|
+
return response.text().then((_responseText) => {
|
|
5489
|
+
return;
|
|
5490
|
+
});
|
|
5491
|
+
}
|
|
5492
|
+
else if (status !== 200 && status !== 204) {
|
|
5493
|
+
return response.text().then((_responseText) => {
|
|
5494
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5495
|
+
});
|
|
5496
|
+
}
|
|
5497
|
+
return Promise.resolve(null);
|
|
5498
|
+
}
|
|
5464
5499
|
getCalibrationList(status) {
|
|
5465
5500
|
let url_ = this.baseUrl + "/measuringtools/calibrationlist?";
|
|
5466
5501
|
if (status === null)
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -4727,6 +4727,8 @@ export interface IMeasuringToolsClient {
|
|
|
4727
4727
|
|
|
4728
4728
|
deprecateTool(id: string, request: DeprecateToolRequest): Promise<void>;
|
|
4729
4729
|
|
|
4730
|
+
restoreTool(id: string): Promise<void>;
|
|
4731
|
+
|
|
4730
4732
|
getCalibrationList(status: CalibrationListStatus | undefined): Promise<CalibrationListToolDto[]>;
|
|
4731
4733
|
|
|
4732
4734
|
importMeasuringTool(request: ImportMeasuringTool): Promise<MeasuringToolDetailDto>;
|
|
@@ -5872,6 +5874,41 @@ export class MeasuringToolsClient extends AuthorizedApiBase implements IMeasurin
|
|
|
5872
5874
|
return Promise.resolve<void>(null as any);
|
|
5873
5875
|
}
|
|
5874
5876
|
|
|
5877
|
+
restoreTool(id: string): Promise<void> {
|
|
5878
|
+
let url_ = this.baseUrl + "/measuringtools/restore/{id}";
|
|
5879
|
+
if (id === undefined || id === null)
|
|
5880
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
5881
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
5882
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
5883
|
+
|
|
5884
|
+
let options_: RequestInit = {
|
|
5885
|
+
method: "PUT",
|
|
5886
|
+
headers: {
|
|
5887
|
+
}
|
|
5888
|
+
};
|
|
5889
|
+
|
|
5890
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
5891
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
5892
|
+
}).then((_response: Response) => {
|
|
5893
|
+
return this.processRestoreTool(_response);
|
|
5894
|
+
});
|
|
5895
|
+
}
|
|
5896
|
+
|
|
5897
|
+
protected processRestoreTool(response: Response): Promise<void> {
|
|
5898
|
+
const status = response.status;
|
|
5899
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
5900
|
+
if (status === 204) {
|
|
5901
|
+
return response.text().then((_responseText) => {
|
|
5902
|
+
return;
|
|
5903
|
+
});
|
|
5904
|
+
} else if (status !== 200 && status !== 204) {
|
|
5905
|
+
return response.text().then((_responseText) => {
|
|
5906
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
5907
|
+
});
|
|
5908
|
+
}
|
|
5909
|
+
return Promise.resolve<void>(null as any);
|
|
5910
|
+
}
|
|
5911
|
+
|
|
5875
5912
|
getCalibrationList(status: CalibrationListStatus | undefined): Promise<CalibrationListToolDto[]> {
|
|
5876
5913
|
let url_ = this.baseUrl + "/measuringtools/calibrationlist?";
|
|
5877
5914
|
if (status === null)
|