@ignos/api-client 20240627.0.9676 → 20240701.0.9700
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 +52 -0
- package/lib/ignosportal-api.js +261 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +306 -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>;
|
|
@@ -8861,6 +8886,33 @@ export declare class LocationSuggestionsItemDto implements ILocationSuggestionsI
|
|
|
8861
8886
|
export interface ILocationSuggestionsItemDto {
|
|
8862
8887
|
workOrderId: string;
|
|
8863
8888
|
}
|
|
8889
|
+
export declare class MaterialDesciptionDto implements IMaterialDesciptionDto {
|
|
8890
|
+
materialId: string;
|
|
8891
|
+
materialName: string;
|
|
8892
|
+
covered: MaterialCoveredDto;
|
|
8893
|
+
constructor(data?: IMaterialDesciptionDto);
|
|
8894
|
+
init(_data?: any): void;
|
|
8895
|
+
static fromJS(data: any): MaterialDesciptionDto;
|
|
8896
|
+
toJSON(data?: any): any;
|
|
8897
|
+
}
|
|
8898
|
+
export interface IMaterialDesciptionDto {
|
|
8899
|
+
materialId: string;
|
|
8900
|
+
materialName: string;
|
|
8901
|
+
covered: MaterialCoveredDto;
|
|
8902
|
+
}
|
|
8903
|
+
export type MaterialCoveredDto = "NotDefined" | "NotCovered" | "Covered";
|
|
8904
|
+
export declare class MaterialUpdateDto implements IMaterialUpdateDto {
|
|
8905
|
+
materialName: string;
|
|
8906
|
+
covered: MaterialCoveredDto;
|
|
8907
|
+
constructor(data?: IMaterialUpdateDto);
|
|
8908
|
+
init(_data?: any): void;
|
|
8909
|
+
static fromJS(data: any): MaterialUpdateDto;
|
|
8910
|
+
toJSON(data?: any): any;
|
|
8911
|
+
}
|
|
8912
|
+
export interface IMaterialUpdateDto {
|
|
8913
|
+
materialName: string;
|
|
8914
|
+
covered: MaterialCoveredDto;
|
|
8915
|
+
}
|
|
8864
8916
|
export declare class TrackingHistoryListDto implements ITrackingHistoryListDto {
|
|
8865
8917
|
results: TrackingHistoryDto[];
|
|
8866
8918
|
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);
|
|
@@ -31909,6 +32112,64 @@ export class LocationSuggestionsItemDto {
|
|
|
31909
32112
|
return data;
|
|
31910
32113
|
}
|
|
31911
32114
|
}
|
|
32115
|
+
export class MaterialDesciptionDto {
|
|
32116
|
+
constructor(data) {
|
|
32117
|
+
if (data) {
|
|
32118
|
+
for (var property in data) {
|
|
32119
|
+
if (data.hasOwnProperty(property))
|
|
32120
|
+
this[property] = data[property];
|
|
32121
|
+
}
|
|
32122
|
+
}
|
|
32123
|
+
}
|
|
32124
|
+
init(_data) {
|
|
32125
|
+
if (_data) {
|
|
32126
|
+
this.materialId = _data["materialId"];
|
|
32127
|
+
this.materialName = _data["materialName"];
|
|
32128
|
+
this.covered = _data["covered"];
|
|
32129
|
+
}
|
|
32130
|
+
}
|
|
32131
|
+
static fromJS(data) {
|
|
32132
|
+
data = typeof data === 'object' ? data : {};
|
|
32133
|
+
let result = new MaterialDesciptionDto();
|
|
32134
|
+
result.init(data);
|
|
32135
|
+
return result;
|
|
32136
|
+
}
|
|
32137
|
+
toJSON(data) {
|
|
32138
|
+
data = typeof data === 'object' ? data : {};
|
|
32139
|
+
data["materialId"] = this.materialId;
|
|
32140
|
+
data["materialName"] = this.materialName;
|
|
32141
|
+
data["covered"] = this.covered;
|
|
32142
|
+
return data;
|
|
32143
|
+
}
|
|
32144
|
+
}
|
|
32145
|
+
export class MaterialUpdateDto {
|
|
32146
|
+
constructor(data) {
|
|
32147
|
+
if (data) {
|
|
32148
|
+
for (var property in data) {
|
|
32149
|
+
if (data.hasOwnProperty(property))
|
|
32150
|
+
this[property] = data[property];
|
|
32151
|
+
}
|
|
32152
|
+
}
|
|
32153
|
+
}
|
|
32154
|
+
init(_data) {
|
|
32155
|
+
if (_data) {
|
|
32156
|
+
this.materialName = _data["materialName"];
|
|
32157
|
+
this.covered = _data["covered"];
|
|
32158
|
+
}
|
|
32159
|
+
}
|
|
32160
|
+
static fromJS(data) {
|
|
32161
|
+
data = typeof data === 'object' ? data : {};
|
|
32162
|
+
let result = new MaterialUpdateDto();
|
|
32163
|
+
result.init(data);
|
|
32164
|
+
return result;
|
|
32165
|
+
}
|
|
32166
|
+
toJSON(data) {
|
|
32167
|
+
data = typeof data === 'object' ? data : {};
|
|
32168
|
+
data["materialName"] = this.materialName;
|
|
32169
|
+
data["covered"] = this.covered;
|
|
32170
|
+
return data;
|
|
32171
|
+
}
|
|
32172
|
+
}
|
|
31912
32173
|
export class TrackingHistoryListDto {
|
|
31913
32174
|
constructor(data) {
|
|
31914
32175
|
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>;
|
|
@@ -39822,6 +40042,92 @@ export interface ILocationSuggestionsItemDto {
|
|
|
39822
40042
|
workOrderId: string;
|
|
39823
40043
|
}
|
|
39824
40044
|
|
|
40045
|
+
export class MaterialDesciptionDto implements IMaterialDesciptionDto {
|
|
40046
|
+
materialId!: string;
|
|
40047
|
+
materialName!: string;
|
|
40048
|
+
covered!: MaterialCoveredDto;
|
|
40049
|
+
|
|
40050
|
+
constructor(data?: IMaterialDesciptionDto) {
|
|
40051
|
+
if (data) {
|
|
40052
|
+
for (var property in data) {
|
|
40053
|
+
if (data.hasOwnProperty(property))
|
|
40054
|
+
(<any>this)[property] = (<any>data)[property];
|
|
40055
|
+
}
|
|
40056
|
+
}
|
|
40057
|
+
}
|
|
40058
|
+
|
|
40059
|
+
init(_data?: any) {
|
|
40060
|
+
if (_data) {
|
|
40061
|
+
this.materialId = _data["materialId"];
|
|
40062
|
+
this.materialName = _data["materialName"];
|
|
40063
|
+
this.covered = _data["covered"];
|
|
40064
|
+
}
|
|
40065
|
+
}
|
|
40066
|
+
|
|
40067
|
+
static fromJS(data: any): MaterialDesciptionDto {
|
|
40068
|
+
data = typeof data === 'object' ? data : {};
|
|
40069
|
+
let result = new MaterialDesciptionDto();
|
|
40070
|
+
result.init(data);
|
|
40071
|
+
return result;
|
|
40072
|
+
}
|
|
40073
|
+
|
|
40074
|
+
toJSON(data?: any) {
|
|
40075
|
+
data = typeof data === 'object' ? data : {};
|
|
40076
|
+
data["materialId"] = this.materialId;
|
|
40077
|
+
data["materialName"] = this.materialName;
|
|
40078
|
+
data["covered"] = this.covered;
|
|
40079
|
+
return data;
|
|
40080
|
+
}
|
|
40081
|
+
}
|
|
40082
|
+
|
|
40083
|
+
export interface IMaterialDesciptionDto {
|
|
40084
|
+
materialId: string;
|
|
40085
|
+
materialName: string;
|
|
40086
|
+
covered: MaterialCoveredDto;
|
|
40087
|
+
}
|
|
40088
|
+
|
|
40089
|
+
export type MaterialCoveredDto = "NotDefined" | "NotCovered" | "Covered";
|
|
40090
|
+
|
|
40091
|
+
export class MaterialUpdateDto implements IMaterialUpdateDto {
|
|
40092
|
+
materialName!: string;
|
|
40093
|
+
covered!: MaterialCoveredDto;
|
|
40094
|
+
|
|
40095
|
+
constructor(data?: IMaterialUpdateDto) {
|
|
40096
|
+
if (data) {
|
|
40097
|
+
for (var property in data) {
|
|
40098
|
+
if (data.hasOwnProperty(property))
|
|
40099
|
+
(<any>this)[property] = (<any>data)[property];
|
|
40100
|
+
}
|
|
40101
|
+
}
|
|
40102
|
+
}
|
|
40103
|
+
|
|
40104
|
+
init(_data?: any) {
|
|
40105
|
+
if (_data) {
|
|
40106
|
+
this.materialName = _data["materialName"];
|
|
40107
|
+
this.covered = _data["covered"];
|
|
40108
|
+
}
|
|
40109
|
+
}
|
|
40110
|
+
|
|
40111
|
+
static fromJS(data: any): MaterialUpdateDto {
|
|
40112
|
+
data = typeof data === 'object' ? data : {};
|
|
40113
|
+
let result = new MaterialUpdateDto();
|
|
40114
|
+
result.init(data);
|
|
40115
|
+
return result;
|
|
40116
|
+
}
|
|
40117
|
+
|
|
40118
|
+
toJSON(data?: any) {
|
|
40119
|
+
data = typeof data === 'object' ? data : {};
|
|
40120
|
+
data["materialName"] = this.materialName;
|
|
40121
|
+
data["covered"] = this.covered;
|
|
40122
|
+
return data;
|
|
40123
|
+
}
|
|
40124
|
+
}
|
|
40125
|
+
|
|
40126
|
+
export interface IMaterialUpdateDto {
|
|
40127
|
+
materialName: string;
|
|
40128
|
+
covered: MaterialCoveredDto;
|
|
40129
|
+
}
|
|
40130
|
+
|
|
39825
40131
|
export class TrackingHistoryListDto implements ITrackingHistoryListDto {
|
|
39826
40132
|
results!: TrackingHistoryDto[];
|
|
39827
40133
|
continuationToken?: string | null;
|