@ignos/api-client 20240627.0.9676 → 20240701.0.9706
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 +58 -0
- package/lib/ignosportal-api.js +267 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +318 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -1546,6 +1546,31 @@ export declare class MoveLocationsClient extends AuthorizedApiBase implements IM
|
|
|
1546
1546
|
suggestionsLocations(locationSuggestions: LocationSuggestionsDto): Promise<LocationDto[]>;
|
|
1547
1547
|
protected processSuggestionsLocations(response: Response): Promise<LocationDto[]>;
|
|
1548
1548
|
}
|
|
1549
|
+
export interface IMoveMaterialsClient {
|
|
1550
|
+
listMaterials(): Promise<MaterialDesciptionDto[]>;
|
|
1551
|
+
addMaterial(update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
1552
|
+
removeMaterial(materialId: string): Promise<void>;
|
|
1553
|
+
updateMaterial(materialId: string, update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
1554
|
+
importMaterials(request: FileParameter | null | undefined): Promise<void>;
|
|
1555
|
+
}
|
|
1556
|
+
export declare class MoveMaterialsClient extends AuthorizedApiBase implements IMoveMaterialsClient {
|
|
1557
|
+
private http;
|
|
1558
|
+
private baseUrl;
|
|
1559
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
|
|
1560
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
|
|
1561
|
+
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
1562
|
+
});
|
|
1563
|
+
listMaterials(): Promise<MaterialDesciptionDto[]>;
|
|
1564
|
+
protected processListMaterials(response: Response): Promise<MaterialDesciptionDto[]>;
|
|
1565
|
+
addMaterial(update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
1566
|
+
protected processAddMaterial(response: Response): Promise<MaterialDesciptionDto>;
|
|
1567
|
+
removeMaterial(materialId: string): Promise<void>;
|
|
1568
|
+
protected processRemoveMaterial(response: Response): Promise<void>;
|
|
1569
|
+
updateMaterial(materialId: string, update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
1570
|
+
protected processUpdateMaterial(response: Response): Promise<MaterialDesciptionDto>;
|
|
1571
|
+
importMaterials(request: FileParameter | null | undefined): Promise<void>;
|
|
1572
|
+
protected processImportMaterials(response: Response): Promise<void>;
|
|
1573
|
+
}
|
|
1549
1574
|
export interface IMoveTrackingClient {
|
|
1550
1575
|
listTrackingHistory(request: TrackingRequestListDto): Promise<TrackingHistoryListDto>;
|
|
1551
1576
|
getTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
|
|
@@ -4131,6 +4156,9 @@ export declare class MeasuringToolDto implements IMeasuringToolDto {
|
|
|
4131
4156
|
deprecatedDate?: Date | null;
|
|
4132
4157
|
lastLocation?: string | null;
|
|
4133
4158
|
lastLocationDate?: Date | null;
|
|
4159
|
+
usageLastMonth?: number | null;
|
|
4160
|
+
usageLastYear?: number | null;
|
|
4161
|
+
usageSinceLastCalibration?: number | null;
|
|
4134
4162
|
calibrationStatus: CalibrationStatusDto;
|
|
4135
4163
|
constructor(data?: IMeasuringToolDto);
|
|
4136
4164
|
init(_data?: any): void;
|
|
@@ -4155,6 +4183,9 @@ export interface IMeasuringToolDto {
|
|
|
4155
4183
|
deprecatedDate?: Date | null;
|
|
4156
4184
|
lastLocation?: string | null;
|
|
4157
4185
|
lastLocationDate?: Date | null;
|
|
4186
|
+
usageLastMonth?: number | null;
|
|
4187
|
+
usageLastYear?: number | null;
|
|
4188
|
+
usageSinceLastCalibration?: number | null;
|
|
4158
4189
|
calibrationStatus: CalibrationStatusDto;
|
|
4159
4190
|
}
|
|
4160
4191
|
export type CalibrationStatusDto = "Uncalibrated" | "Deprecated" | "Expired" | "SoonDue" | "Valid";
|
|
@@ -8861,6 +8892,33 @@ export declare class LocationSuggestionsItemDto implements ILocationSuggestionsI
|
|
|
8861
8892
|
export interface ILocationSuggestionsItemDto {
|
|
8862
8893
|
workOrderId: string;
|
|
8863
8894
|
}
|
|
8895
|
+
export declare class MaterialDesciptionDto implements IMaterialDesciptionDto {
|
|
8896
|
+
materialId: string;
|
|
8897
|
+
materialName: string;
|
|
8898
|
+
covered: MaterialCoveredDto;
|
|
8899
|
+
constructor(data?: IMaterialDesciptionDto);
|
|
8900
|
+
init(_data?: any): void;
|
|
8901
|
+
static fromJS(data: any): MaterialDesciptionDto;
|
|
8902
|
+
toJSON(data?: any): any;
|
|
8903
|
+
}
|
|
8904
|
+
export interface IMaterialDesciptionDto {
|
|
8905
|
+
materialId: string;
|
|
8906
|
+
materialName: string;
|
|
8907
|
+
covered: MaterialCoveredDto;
|
|
8908
|
+
}
|
|
8909
|
+
export type MaterialCoveredDto = "NotDefined" | "NotCovered" | "Covered";
|
|
8910
|
+
export declare class MaterialUpdateDto implements IMaterialUpdateDto {
|
|
8911
|
+
materialName: string;
|
|
8912
|
+
covered: MaterialCoveredDto;
|
|
8913
|
+
constructor(data?: IMaterialUpdateDto);
|
|
8914
|
+
init(_data?: any): void;
|
|
8915
|
+
static fromJS(data: any): MaterialUpdateDto;
|
|
8916
|
+
toJSON(data?: any): any;
|
|
8917
|
+
}
|
|
8918
|
+
export interface IMaterialUpdateDto {
|
|
8919
|
+
materialName: string;
|
|
8920
|
+
covered: MaterialCoveredDto;
|
|
8921
|
+
}
|
|
8864
8922
|
export declare class TrackingHistoryListDto implements ITrackingHistoryListDto {
|
|
8865
8923
|
results: TrackingHistoryDto[];
|
|
8866
8924
|
continuationToken?: string | null;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -12761,6 +12761,209 @@ export class MoveLocationsClient extends AuthorizedApiBase {
|
|
|
12761
12761
|
return Promise.resolve(null);
|
|
12762
12762
|
}
|
|
12763
12763
|
}
|
|
12764
|
+
export class MoveMaterialsClient extends AuthorizedApiBase {
|
|
12765
|
+
constructor(configuration, baseUrl, http) {
|
|
12766
|
+
super(configuration);
|
|
12767
|
+
this.jsonParseReviver = undefined;
|
|
12768
|
+
this.http = http ? http : window;
|
|
12769
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
12770
|
+
}
|
|
12771
|
+
listMaterials() {
|
|
12772
|
+
let url_ = this.baseUrl + "/move/materials/list";
|
|
12773
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12774
|
+
let options_ = {
|
|
12775
|
+
method: "POST",
|
|
12776
|
+
headers: {
|
|
12777
|
+
"Accept": "application/json"
|
|
12778
|
+
}
|
|
12779
|
+
};
|
|
12780
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12781
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12782
|
+
}).then((_response) => {
|
|
12783
|
+
return this.processListMaterials(_response);
|
|
12784
|
+
});
|
|
12785
|
+
}
|
|
12786
|
+
processListMaterials(response) {
|
|
12787
|
+
const status = response.status;
|
|
12788
|
+
let _headers = {};
|
|
12789
|
+
if (response.headers && response.headers.forEach) {
|
|
12790
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12791
|
+
}
|
|
12792
|
+
;
|
|
12793
|
+
if (status === 200) {
|
|
12794
|
+
return response.text().then((_responseText) => {
|
|
12795
|
+
let result200 = null;
|
|
12796
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12797
|
+
if (Array.isArray(resultData200)) {
|
|
12798
|
+
result200 = [];
|
|
12799
|
+
for (let item of resultData200)
|
|
12800
|
+
result200.push(MaterialDesciptionDto.fromJS(item));
|
|
12801
|
+
}
|
|
12802
|
+
return result200;
|
|
12803
|
+
});
|
|
12804
|
+
}
|
|
12805
|
+
else if (status !== 200 && status !== 204) {
|
|
12806
|
+
return response.text().then((_responseText) => {
|
|
12807
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12808
|
+
});
|
|
12809
|
+
}
|
|
12810
|
+
return Promise.resolve(null);
|
|
12811
|
+
}
|
|
12812
|
+
addMaterial(update) {
|
|
12813
|
+
let url_ = this.baseUrl + "/move/materials";
|
|
12814
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12815
|
+
const content_ = JSON.stringify(update);
|
|
12816
|
+
let options_ = {
|
|
12817
|
+
body: content_,
|
|
12818
|
+
method: "POST",
|
|
12819
|
+
headers: {
|
|
12820
|
+
"Content-Type": "application/json",
|
|
12821
|
+
"Accept": "application/json"
|
|
12822
|
+
}
|
|
12823
|
+
};
|
|
12824
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12825
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12826
|
+
}).then((_response) => {
|
|
12827
|
+
return this.processAddMaterial(_response);
|
|
12828
|
+
});
|
|
12829
|
+
}
|
|
12830
|
+
processAddMaterial(response) {
|
|
12831
|
+
const status = response.status;
|
|
12832
|
+
let _headers = {};
|
|
12833
|
+
if (response.headers && response.headers.forEach) {
|
|
12834
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12835
|
+
}
|
|
12836
|
+
;
|
|
12837
|
+
if (status === 200) {
|
|
12838
|
+
return response.text().then((_responseText) => {
|
|
12839
|
+
let result200 = null;
|
|
12840
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12841
|
+
result200 = MaterialDesciptionDto.fromJS(resultData200);
|
|
12842
|
+
return result200;
|
|
12843
|
+
});
|
|
12844
|
+
}
|
|
12845
|
+
else if (status !== 200 && status !== 204) {
|
|
12846
|
+
return response.text().then((_responseText) => {
|
|
12847
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12848
|
+
});
|
|
12849
|
+
}
|
|
12850
|
+
return Promise.resolve(null);
|
|
12851
|
+
}
|
|
12852
|
+
removeMaterial(materialId) {
|
|
12853
|
+
let url_ = this.baseUrl + "/move/materials/{materialId}";
|
|
12854
|
+
if (materialId === undefined || materialId === null)
|
|
12855
|
+
throw new Error("The parameter 'materialId' must be defined.");
|
|
12856
|
+
url_ = url_.replace("{materialId}", encodeURIComponent("" + materialId));
|
|
12857
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12858
|
+
let options_ = {
|
|
12859
|
+
method: "DELETE",
|
|
12860
|
+
headers: {}
|
|
12861
|
+
};
|
|
12862
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12863
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12864
|
+
}).then((_response) => {
|
|
12865
|
+
return this.processRemoveMaterial(_response);
|
|
12866
|
+
});
|
|
12867
|
+
}
|
|
12868
|
+
processRemoveMaterial(response) {
|
|
12869
|
+
const status = response.status;
|
|
12870
|
+
let _headers = {};
|
|
12871
|
+
if (response.headers && response.headers.forEach) {
|
|
12872
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12873
|
+
}
|
|
12874
|
+
;
|
|
12875
|
+
if (status === 204) {
|
|
12876
|
+
return response.text().then((_responseText) => {
|
|
12877
|
+
return;
|
|
12878
|
+
});
|
|
12879
|
+
}
|
|
12880
|
+
else if (status !== 200 && status !== 204) {
|
|
12881
|
+
return response.text().then((_responseText) => {
|
|
12882
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12883
|
+
});
|
|
12884
|
+
}
|
|
12885
|
+
return Promise.resolve(null);
|
|
12886
|
+
}
|
|
12887
|
+
updateMaterial(materialId, update) {
|
|
12888
|
+
let url_ = this.baseUrl + "/move/materials/{materialId}";
|
|
12889
|
+
if (materialId === undefined || materialId === null)
|
|
12890
|
+
throw new Error("The parameter 'materialId' must be defined.");
|
|
12891
|
+
url_ = url_.replace("{materialId}", encodeURIComponent("" + materialId));
|
|
12892
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12893
|
+
const content_ = JSON.stringify(update);
|
|
12894
|
+
let options_ = {
|
|
12895
|
+
body: content_,
|
|
12896
|
+
method: "PUT",
|
|
12897
|
+
headers: {
|
|
12898
|
+
"Content-Type": "application/json",
|
|
12899
|
+
"Accept": "application/json"
|
|
12900
|
+
}
|
|
12901
|
+
};
|
|
12902
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12903
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12904
|
+
}).then((_response) => {
|
|
12905
|
+
return this.processUpdateMaterial(_response);
|
|
12906
|
+
});
|
|
12907
|
+
}
|
|
12908
|
+
processUpdateMaterial(response) {
|
|
12909
|
+
const status = response.status;
|
|
12910
|
+
let _headers = {};
|
|
12911
|
+
if (response.headers && response.headers.forEach) {
|
|
12912
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12913
|
+
}
|
|
12914
|
+
;
|
|
12915
|
+
if (status === 200) {
|
|
12916
|
+
return response.text().then((_responseText) => {
|
|
12917
|
+
let result200 = null;
|
|
12918
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12919
|
+
result200 = MaterialDesciptionDto.fromJS(resultData200);
|
|
12920
|
+
return result200;
|
|
12921
|
+
});
|
|
12922
|
+
}
|
|
12923
|
+
else if (status !== 200 && status !== 204) {
|
|
12924
|
+
return response.text().then((_responseText) => {
|
|
12925
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12926
|
+
});
|
|
12927
|
+
}
|
|
12928
|
+
return Promise.resolve(null);
|
|
12929
|
+
}
|
|
12930
|
+
importMaterials(request) {
|
|
12931
|
+
let url_ = this.baseUrl + "/move/materials/csv";
|
|
12932
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12933
|
+
const content_ = new FormData();
|
|
12934
|
+
if (request !== null && request !== undefined)
|
|
12935
|
+
content_.append("request", request.data, request.fileName ? request.fileName : "request");
|
|
12936
|
+
let options_ = {
|
|
12937
|
+
body: content_,
|
|
12938
|
+
method: "POST",
|
|
12939
|
+
headers: {}
|
|
12940
|
+
};
|
|
12941
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12942
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12943
|
+
}).then((_response) => {
|
|
12944
|
+
return this.processImportMaterials(_response);
|
|
12945
|
+
});
|
|
12946
|
+
}
|
|
12947
|
+
processImportMaterials(response) {
|
|
12948
|
+
const status = response.status;
|
|
12949
|
+
let _headers = {};
|
|
12950
|
+
if (response.headers && response.headers.forEach) {
|
|
12951
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12952
|
+
}
|
|
12953
|
+
;
|
|
12954
|
+
if (status === 204) {
|
|
12955
|
+
return response.text().then((_responseText) => {
|
|
12956
|
+
return;
|
|
12957
|
+
});
|
|
12958
|
+
}
|
|
12959
|
+
else if (status !== 200 && status !== 204) {
|
|
12960
|
+
return response.text().then((_responseText) => {
|
|
12961
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12962
|
+
});
|
|
12963
|
+
}
|
|
12964
|
+
return Promise.resolve(null);
|
|
12965
|
+
}
|
|
12966
|
+
}
|
|
12764
12967
|
export class MoveTrackingClient extends AuthorizedApiBase {
|
|
12765
12968
|
constructor(configuration, baseUrl, http) {
|
|
12766
12969
|
super(configuration);
|
|
@@ -22512,6 +22715,9 @@ export class MeasuringToolDto {
|
|
|
22512
22715
|
this.deprecatedDate = _data["deprecatedDate"] ? new Date(_data["deprecatedDate"].toString()) : undefined;
|
|
22513
22716
|
this.lastLocation = _data["lastLocation"];
|
|
22514
22717
|
this.lastLocationDate = _data["lastLocationDate"] ? new Date(_data["lastLocationDate"].toString()) : undefined;
|
|
22718
|
+
this.usageLastMonth = _data["usageLastMonth"];
|
|
22719
|
+
this.usageLastYear = _data["usageLastYear"];
|
|
22720
|
+
this.usageSinceLastCalibration = _data["usageSinceLastCalibration"];
|
|
22515
22721
|
this.calibrationStatus = _data["calibrationStatus"];
|
|
22516
22722
|
}
|
|
22517
22723
|
}
|
|
@@ -22540,6 +22746,9 @@ export class MeasuringToolDto {
|
|
|
22540
22746
|
data["deprecatedDate"] = this.deprecatedDate ? this.deprecatedDate.toISOString() : undefined;
|
|
22541
22747
|
data["lastLocation"] = this.lastLocation;
|
|
22542
22748
|
data["lastLocationDate"] = this.lastLocationDate ? this.lastLocationDate.toISOString() : undefined;
|
|
22749
|
+
data["usageLastMonth"] = this.usageLastMonth;
|
|
22750
|
+
data["usageLastYear"] = this.usageLastYear;
|
|
22751
|
+
data["usageSinceLastCalibration"] = this.usageSinceLastCalibration;
|
|
22543
22752
|
data["calibrationStatus"] = this.calibrationStatus;
|
|
22544
22753
|
return data;
|
|
22545
22754
|
}
|
|
@@ -31909,6 +32118,64 @@ export class LocationSuggestionsItemDto {
|
|
|
31909
32118
|
return data;
|
|
31910
32119
|
}
|
|
31911
32120
|
}
|
|
32121
|
+
export class MaterialDesciptionDto {
|
|
32122
|
+
constructor(data) {
|
|
32123
|
+
if (data) {
|
|
32124
|
+
for (var property in data) {
|
|
32125
|
+
if (data.hasOwnProperty(property))
|
|
32126
|
+
this[property] = data[property];
|
|
32127
|
+
}
|
|
32128
|
+
}
|
|
32129
|
+
}
|
|
32130
|
+
init(_data) {
|
|
32131
|
+
if (_data) {
|
|
32132
|
+
this.materialId = _data["materialId"];
|
|
32133
|
+
this.materialName = _data["materialName"];
|
|
32134
|
+
this.covered = _data["covered"];
|
|
32135
|
+
}
|
|
32136
|
+
}
|
|
32137
|
+
static fromJS(data) {
|
|
32138
|
+
data = typeof data === 'object' ? data : {};
|
|
32139
|
+
let result = new MaterialDesciptionDto();
|
|
32140
|
+
result.init(data);
|
|
32141
|
+
return result;
|
|
32142
|
+
}
|
|
32143
|
+
toJSON(data) {
|
|
32144
|
+
data = typeof data === 'object' ? data : {};
|
|
32145
|
+
data["materialId"] = this.materialId;
|
|
32146
|
+
data["materialName"] = this.materialName;
|
|
32147
|
+
data["covered"] = this.covered;
|
|
32148
|
+
return data;
|
|
32149
|
+
}
|
|
32150
|
+
}
|
|
32151
|
+
export class MaterialUpdateDto {
|
|
32152
|
+
constructor(data) {
|
|
32153
|
+
if (data) {
|
|
32154
|
+
for (var property in data) {
|
|
32155
|
+
if (data.hasOwnProperty(property))
|
|
32156
|
+
this[property] = data[property];
|
|
32157
|
+
}
|
|
32158
|
+
}
|
|
32159
|
+
}
|
|
32160
|
+
init(_data) {
|
|
32161
|
+
if (_data) {
|
|
32162
|
+
this.materialName = _data["materialName"];
|
|
32163
|
+
this.covered = _data["covered"];
|
|
32164
|
+
}
|
|
32165
|
+
}
|
|
32166
|
+
static fromJS(data) {
|
|
32167
|
+
data = typeof data === 'object' ? data : {};
|
|
32168
|
+
let result = new MaterialUpdateDto();
|
|
32169
|
+
result.init(data);
|
|
32170
|
+
return result;
|
|
32171
|
+
}
|
|
32172
|
+
toJSON(data) {
|
|
32173
|
+
data = typeof data === 'object' ? data : {};
|
|
32174
|
+
data["materialName"] = this.materialName;
|
|
32175
|
+
data["covered"] = this.covered;
|
|
32176
|
+
return data;
|
|
32177
|
+
}
|
|
32178
|
+
}
|
|
31912
32179
|
export class TrackingHistoryListDto {
|
|
31913
32180
|
constructor(data) {
|
|
31914
32181
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -13630,6 +13630,226 @@ export class MoveLocationsClient extends AuthorizedApiBase implements IMoveLocat
|
|
|
13630
13630
|
}
|
|
13631
13631
|
}
|
|
13632
13632
|
|
|
13633
|
+
export interface IMoveMaterialsClient {
|
|
13634
|
+
|
|
13635
|
+
listMaterials(): Promise<MaterialDesciptionDto[]>;
|
|
13636
|
+
|
|
13637
|
+
addMaterial(update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
13638
|
+
|
|
13639
|
+
removeMaterial(materialId: string): Promise<void>;
|
|
13640
|
+
|
|
13641
|
+
updateMaterial(materialId: string, update: MaterialUpdateDto): Promise<MaterialDesciptionDto>;
|
|
13642
|
+
|
|
13643
|
+
importMaterials(request: FileParameter | null | undefined): Promise<void>;
|
|
13644
|
+
}
|
|
13645
|
+
|
|
13646
|
+
export class MoveMaterialsClient extends AuthorizedApiBase implements IMoveMaterialsClient {
|
|
13647
|
+
private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
|
|
13648
|
+
private baseUrl: string;
|
|
13649
|
+
protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
|
|
13650
|
+
|
|
13651
|
+
constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> }) {
|
|
13652
|
+
super(configuration);
|
|
13653
|
+
this.http = http ? http : window as any;
|
|
13654
|
+
this.baseUrl = baseUrl ?? "";
|
|
13655
|
+
}
|
|
13656
|
+
|
|
13657
|
+
listMaterials(): Promise<MaterialDesciptionDto[]> {
|
|
13658
|
+
let url_ = this.baseUrl + "/move/materials/list";
|
|
13659
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13660
|
+
|
|
13661
|
+
let options_: RequestInit = {
|
|
13662
|
+
method: "POST",
|
|
13663
|
+
headers: {
|
|
13664
|
+
"Accept": "application/json"
|
|
13665
|
+
}
|
|
13666
|
+
};
|
|
13667
|
+
|
|
13668
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13669
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13670
|
+
}).then((_response: Response) => {
|
|
13671
|
+
return this.processListMaterials(_response);
|
|
13672
|
+
});
|
|
13673
|
+
}
|
|
13674
|
+
|
|
13675
|
+
protected processListMaterials(response: Response): Promise<MaterialDesciptionDto[]> {
|
|
13676
|
+
const status = response.status;
|
|
13677
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13678
|
+
if (status === 200) {
|
|
13679
|
+
return response.text().then((_responseText) => {
|
|
13680
|
+
let result200: any = null;
|
|
13681
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13682
|
+
if (Array.isArray(resultData200)) {
|
|
13683
|
+
result200 = [] as any;
|
|
13684
|
+
for (let item of resultData200)
|
|
13685
|
+
result200!.push(MaterialDesciptionDto.fromJS(item));
|
|
13686
|
+
}
|
|
13687
|
+
return result200;
|
|
13688
|
+
});
|
|
13689
|
+
} else if (status !== 200 && status !== 204) {
|
|
13690
|
+
return response.text().then((_responseText) => {
|
|
13691
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13692
|
+
});
|
|
13693
|
+
}
|
|
13694
|
+
return Promise.resolve<MaterialDesciptionDto[]>(null as any);
|
|
13695
|
+
}
|
|
13696
|
+
|
|
13697
|
+
addMaterial(update: MaterialUpdateDto): Promise<MaterialDesciptionDto> {
|
|
13698
|
+
let url_ = this.baseUrl + "/move/materials";
|
|
13699
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13700
|
+
|
|
13701
|
+
const content_ = JSON.stringify(update);
|
|
13702
|
+
|
|
13703
|
+
let options_: RequestInit = {
|
|
13704
|
+
body: content_,
|
|
13705
|
+
method: "POST",
|
|
13706
|
+
headers: {
|
|
13707
|
+
"Content-Type": "application/json",
|
|
13708
|
+
"Accept": "application/json"
|
|
13709
|
+
}
|
|
13710
|
+
};
|
|
13711
|
+
|
|
13712
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13713
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13714
|
+
}).then((_response: Response) => {
|
|
13715
|
+
return this.processAddMaterial(_response);
|
|
13716
|
+
});
|
|
13717
|
+
}
|
|
13718
|
+
|
|
13719
|
+
protected processAddMaterial(response: Response): Promise<MaterialDesciptionDto> {
|
|
13720
|
+
const status = response.status;
|
|
13721
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13722
|
+
if (status === 200) {
|
|
13723
|
+
return response.text().then((_responseText) => {
|
|
13724
|
+
let result200: any = null;
|
|
13725
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13726
|
+
result200 = MaterialDesciptionDto.fromJS(resultData200);
|
|
13727
|
+
return result200;
|
|
13728
|
+
});
|
|
13729
|
+
} else if (status !== 200 && status !== 204) {
|
|
13730
|
+
return response.text().then((_responseText) => {
|
|
13731
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13732
|
+
});
|
|
13733
|
+
}
|
|
13734
|
+
return Promise.resolve<MaterialDesciptionDto>(null as any);
|
|
13735
|
+
}
|
|
13736
|
+
|
|
13737
|
+
removeMaterial(materialId: string): Promise<void> {
|
|
13738
|
+
let url_ = this.baseUrl + "/move/materials/{materialId}";
|
|
13739
|
+
if (materialId === undefined || materialId === null)
|
|
13740
|
+
throw new Error("The parameter 'materialId' must be defined.");
|
|
13741
|
+
url_ = url_.replace("{materialId}", encodeURIComponent("" + materialId));
|
|
13742
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13743
|
+
|
|
13744
|
+
let options_: RequestInit = {
|
|
13745
|
+
method: "DELETE",
|
|
13746
|
+
headers: {
|
|
13747
|
+
}
|
|
13748
|
+
};
|
|
13749
|
+
|
|
13750
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13751
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13752
|
+
}).then((_response: Response) => {
|
|
13753
|
+
return this.processRemoveMaterial(_response);
|
|
13754
|
+
});
|
|
13755
|
+
}
|
|
13756
|
+
|
|
13757
|
+
protected processRemoveMaterial(response: Response): Promise<void> {
|
|
13758
|
+
const status = response.status;
|
|
13759
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13760
|
+
if (status === 204) {
|
|
13761
|
+
return response.text().then((_responseText) => {
|
|
13762
|
+
return;
|
|
13763
|
+
});
|
|
13764
|
+
} else if (status !== 200 && status !== 204) {
|
|
13765
|
+
return response.text().then((_responseText) => {
|
|
13766
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13767
|
+
});
|
|
13768
|
+
}
|
|
13769
|
+
return Promise.resolve<void>(null as any);
|
|
13770
|
+
}
|
|
13771
|
+
|
|
13772
|
+
updateMaterial(materialId: string, update: MaterialUpdateDto): Promise<MaterialDesciptionDto> {
|
|
13773
|
+
let url_ = this.baseUrl + "/move/materials/{materialId}";
|
|
13774
|
+
if (materialId === undefined || materialId === null)
|
|
13775
|
+
throw new Error("The parameter 'materialId' must be defined.");
|
|
13776
|
+
url_ = url_.replace("{materialId}", encodeURIComponent("" + materialId));
|
|
13777
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13778
|
+
|
|
13779
|
+
const content_ = JSON.stringify(update);
|
|
13780
|
+
|
|
13781
|
+
let options_: RequestInit = {
|
|
13782
|
+
body: content_,
|
|
13783
|
+
method: "PUT",
|
|
13784
|
+
headers: {
|
|
13785
|
+
"Content-Type": "application/json",
|
|
13786
|
+
"Accept": "application/json"
|
|
13787
|
+
}
|
|
13788
|
+
};
|
|
13789
|
+
|
|
13790
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13791
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13792
|
+
}).then((_response: Response) => {
|
|
13793
|
+
return this.processUpdateMaterial(_response);
|
|
13794
|
+
});
|
|
13795
|
+
}
|
|
13796
|
+
|
|
13797
|
+
protected processUpdateMaterial(response: Response): Promise<MaterialDesciptionDto> {
|
|
13798
|
+
const status = response.status;
|
|
13799
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13800
|
+
if (status === 200) {
|
|
13801
|
+
return response.text().then((_responseText) => {
|
|
13802
|
+
let result200: any = null;
|
|
13803
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
13804
|
+
result200 = MaterialDesciptionDto.fromJS(resultData200);
|
|
13805
|
+
return result200;
|
|
13806
|
+
});
|
|
13807
|
+
} else if (status !== 200 && status !== 204) {
|
|
13808
|
+
return response.text().then((_responseText) => {
|
|
13809
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13810
|
+
});
|
|
13811
|
+
}
|
|
13812
|
+
return Promise.resolve<MaterialDesciptionDto>(null as any);
|
|
13813
|
+
}
|
|
13814
|
+
|
|
13815
|
+
importMaterials(request: FileParameter | null | undefined): Promise<void> {
|
|
13816
|
+
let url_ = this.baseUrl + "/move/materials/csv";
|
|
13817
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
13818
|
+
|
|
13819
|
+
const content_ = new FormData();
|
|
13820
|
+
if (request !== null && request !== undefined)
|
|
13821
|
+
content_.append("request", request.data, request.fileName ? request.fileName : "request");
|
|
13822
|
+
|
|
13823
|
+
let options_: RequestInit = {
|
|
13824
|
+
body: content_,
|
|
13825
|
+
method: "POST",
|
|
13826
|
+
headers: {
|
|
13827
|
+
}
|
|
13828
|
+
};
|
|
13829
|
+
|
|
13830
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
13831
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
13832
|
+
}).then((_response: Response) => {
|
|
13833
|
+
return this.processImportMaterials(_response);
|
|
13834
|
+
});
|
|
13835
|
+
}
|
|
13836
|
+
|
|
13837
|
+
protected processImportMaterials(response: Response): Promise<void> {
|
|
13838
|
+
const status = response.status;
|
|
13839
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
13840
|
+
if (status === 204) {
|
|
13841
|
+
return response.text().then((_responseText) => {
|
|
13842
|
+
return;
|
|
13843
|
+
});
|
|
13844
|
+
} else if (status !== 200 && status !== 204) {
|
|
13845
|
+
return response.text().then((_responseText) => {
|
|
13846
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
13847
|
+
});
|
|
13848
|
+
}
|
|
13849
|
+
return Promise.resolve<void>(null as any);
|
|
13850
|
+
}
|
|
13851
|
+
}
|
|
13852
|
+
|
|
13633
13853
|
export interface IMoveTrackingClient {
|
|
13634
13854
|
|
|
13635
13855
|
listTrackingHistory(request: TrackingRequestListDto): Promise<TrackingHistoryListDto>;
|
|
@@ -25649,6 +25869,9 @@ export class MeasuringToolDto implements IMeasuringToolDto {
|
|
|
25649
25869
|
deprecatedDate?: Date | null;
|
|
25650
25870
|
lastLocation?: string | null;
|
|
25651
25871
|
lastLocationDate?: Date | null;
|
|
25872
|
+
usageLastMonth?: number | null;
|
|
25873
|
+
usageLastYear?: number | null;
|
|
25874
|
+
usageSinceLastCalibration?: number | null;
|
|
25652
25875
|
calibrationStatus!: CalibrationStatusDto;
|
|
25653
25876
|
|
|
25654
25877
|
constructor(data?: IMeasuringToolDto) {
|
|
@@ -25679,6 +25902,9 @@ export class MeasuringToolDto implements IMeasuringToolDto {
|
|
|
25679
25902
|
this.deprecatedDate = _data["deprecatedDate"] ? new Date(_data["deprecatedDate"].toString()) : <any>undefined;
|
|
25680
25903
|
this.lastLocation = _data["lastLocation"];
|
|
25681
25904
|
this.lastLocationDate = _data["lastLocationDate"] ? new Date(_data["lastLocationDate"].toString()) : <any>undefined;
|
|
25905
|
+
this.usageLastMonth = _data["usageLastMonth"];
|
|
25906
|
+
this.usageLastYear = _data["usageLastYear"];
|
|
25907
|
+
this.usageSinceLastCalibration = _data["usageSinceLastCalibration"];
|
|
25682
25908
|
this.calibrationStatus = _data["calibrationStatus"];
|
|
25683
25909
|
}
|
|
25684
25910
|
}
|
|
@@ -25709,6 +25935,9 @@ export class MeasuringToolDto implements IMeasuringToolDto {
|
|
|
25709
25935
|
data["deprecatedDate"] = this.deprecatedDate ? this.deprecatedDate.toISOString() : <any>undefined;
|
|
25710
25936
|
data["lastLocation"] = this.lastLocation;
|
|
25711
25937
|
data["lastLocationDate"] = this.lastLocationDate ? this.lastLocationDate.toISOString() : <any>undefined;
|
|
25938
|
+
data["usageLastMonth"] = this.usageLastMonth;
|
|
25939
|
+
data["usageLastYear"] = this.usageLastYear;
|
|
25940
|
+
data["usageSinceLastCalibration"] = this.usageSinceLastCalibration;
|
|
25712
25941
|
data["calibrationStatus"] = this.calibrationStatus;
|
|
25713
25942
|
return data;
|
|
25714
25943
|
}
|
|
@@ -25732,6 +25961,9 @@ export interface IMeasuringToolDto {
|
|
|
25732
25961
|
deprecatedDate?: Date | null;
|
|
25733
25962
|
lastLocation?: string | null;
|
|
25734
25963
|
lastLocationDate?: Date | null;
|
|
25964
|
+
usageLastMonth?: number | null;
|
|
25965
|
+
usageLastYear?: number | null;
|
|
25966
|
+
usageSinceLastCalibration?: number | null;
|
|
25735
25967
|
calibrationStatus: CalibrationStatusDto;
|
|
25736
25968
|
}
|
|
25737
25969
|
|
|
@@ -39822,6 +40054,92 @@ export interface ILocationSuggestionsItemDto {
|
|
|
39822
40054
|
workOrderId: string;
|
|
39823
40055
|
}
|
|
39824
40056
|
|
|
40057
|
+
export class MaterialDesciptionDto implements IMaterialDesciptionDto {
|
|
40058
|
+
materialId!: string;
|
|
40059
|
+
materialName!: string;
|
|
40060
|
+
covered!: MaterialCoveredDto;
|
|
40061
|
+
|
|
40062
|
+
constructor(data?: IMaterialDesciptionDto) {
|
|
40063
|
+
if (data) {
|
|
40064
|
+
for (var property in data) {
|
|
40065
|
+
if (data.hasOwnProperty(property))
|
|
40066
|
+
(<any>this)[property] = (<any>data)[property];
|
|
40067
|
+
}
|
|
40068
|
+
}
|
|
40069
|
+
}
|
|
40070
|
+
|
|
40071
|
+
init(_data?: any) {
|
|
40072
|
+
if (_data) {
|
|
40073
|
+
this.materialId = _data["materialId"];
|
|
40074
|
+
this.materialName = _data["materialName"];
|
|
40075
|
+
this.covered = _data["covered"];
|
|
40076
|
+
}
|
|
40077
|
+
}
|
|
40078
|
+
|
|
40079
|
+
static fromJS(data: any): MaterialDesciptionDto {
|
|
40080
|
+
data = typeof data === 'object' ? data : {};
|
|
40081
|
+
let result = new MaterialDesciptionDto();
|
|
40082
|
+
result.init(data);
|
|
40083
|
+
return result;
|
|
40084
|
+
}
|
|
40085
|
+
|
|
40086
|
+
toJSON(data?: any) {
|
|
40087
|
+
data = typeof data === 'object' ? data : {};
|
|
40088
|
+
data["materialId"] = this.materialId;
|
|
40089
|
+
data["materialName"] = this.materialName;
|
|
40090
|
+
data["covered"] = this.covered;
|
|
40091
|
+
return data;
|
|
40092
|
+
}
|
|
40093
|
+
}
|
|
40094
|
+
|
|
40095
|
+
export interface IMaterialDesciptionDto {
|
|
40096
|
+
materialId: string;
|
|
40097
|
+
materialName: string;
|
|
40098
|
+
covered: MaterialCoveredDto;
|
|
40099
|
+
}
|
|
40100
|
+
|
|
40101
|
+
export type MaterialCoveredDto = "NotDefined" | "NotCovered" | "Covered";
|
|
40102
|
+
|
|
40103
|
+
export class MaterialUpdateDto implements IMaterialUpdateDto {
|
|
40104
|
+
materialName!: string;
|
|
40105
|
+
covered!: MaterialCoveredDto;
|
|
40106
|
+
|
|
40107
|
+
constructor(data?: IMaterialUpdateDto) {
|
|
40108
|
+
if (data) {
|
|
40109
|
+
for (var property in data) {
|
|
40110
|
+
if (data.hasOwnProperty(property))
|
|
40111
|
+
(<any>this)[property] = (<any>data)[property];
|
|
40112
|
+
}
|
|
40113
|
+
}
|
|
40114
|
+
}
|
|
40115
|
+
|
|
40116
|
+
init(_data?: any) {
|
|
40117
|
+
if (_data) {
|
|
40118
|
+
this.materialName = _data["materialName"];
|
|
40119
|
+
this.covered = _data["covered"];
|
|
40120
|
+
}
|
|
40121
|
+
}
|
|
40122
|
+
|
|
40123
|
+
static fromJS(data: any): MaterialUpdateDto {
|
|
40124
|
+
data = typeof data === 'object' ? data : {};
|
|
40125
|
+
let result = new MaterialUpdateDto();
|
|
40126
|
+
result.init(data);
|
|
40127
|
+
return result;
|
|
40128
|
+
}
|
|
40129
|
+
|
|
40130
|
+
toJSON(data?: any) {
|
|
40131
|
+
data = typeof data === 'object' ? data : {};
|
|
40132
|
+
data["materialName"] = this.materialName;
|
|
40133
|
+
data["covered"] = this.covered;
|
|
40134
|
+
return data;
|
|
40135
|
+
}
|
|
40136
|
+
}
|
|
40137
|
+
|
|
40138
|
+
export interface IMaterialUpdateDto {
|
|
40139
|
+
materialName: string;
|
|
40140
|
+
covered: MaterialCoveredDto;
|
|
40141
|
+
}
|
|
40142
|
+
|
|
39825
40143
|
export class TrackingHistoryListDto implements ITrackingHistoryListDto {
|
|
39826
40144
|
results!: TrackingHistoryDto[];
|
|
39827
40145
|
continuationToken?: string | null;
|