@ignos/api-client 20260715.185.1-alpha → 20260715.187.1-alpha
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 +222 -192
- package/lib/ignosportal-api.js +346 -253
- package/package.json +1 -1
- package/src/ignosportal-api.ts +567 -456
package/lib/ignosportal-api.js
CHANGED
|
@@ -4843,14 +4843,11 @@ export class KpiAdminResourceClient extends AuthorizedApiBase {
|
|
|
4843
4843
|
}
|
|
4844
4844
|
return Promise.resolve(null);
|
|
4845
4845
|
}
|
|
4846
|
-
copyShiftSettingsPeriod(
|
|
4847
|
-
let url_ = this.baseUrl + "/kpiadminresource/shift-settings/{
|
|
4848
|
-
if (
|
|
4849
|
-
throw new globalThis.Error("The parameter '
|
|
4850
|
-
url_ = url_.replace("{
|
|
4851
|
-
if (sourceEffectiveFrom === undefined || sourceEffectiveFrom === null)
|
|
4852
|
-
throw new globalThis.Error("The parameter 'sourceEffectiveFrom' must be defined.");
|
|
4853
|
-
url_ = url_.replace("{sourceEffectiveFrom}", encodeURIComponent("" + sourceEffectiveFrom));
|
|
4846
|
+
copyShiftSettingsPeriod(resourceExternalId, request) {
|
|
4847
|
+
let url_ = this.baseUrl + "/kpiadminresource/shift-settings/{resourceExternalId}/copy";
|
|
4848
|
+
if (resourceExternalId === undefined || resourceExternalId === null)
|
|
4849
|
+
throw new globalThis.Error("The parameter 'resourceExternalId' must be defined.");
|
|
4850
|
+
url_ = url_.replace("{resourceExternalId}", encodeURIComponent("" + resourceExternalId));
|
|
4854
4851
|
url_ = url_.replace(/[?&]$/, "");
|
|
4855
4852
|
const content_ = JSON.stringify(request);
|
|
4856
4853
|
let options_ = {
|
|
@@ -11520,6 +11517,149 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
11520
11517
|
return Promise.resolve(null);
|
|
11521
11518
|
}
|
|
11522
11519
|
}
|
|
11520
|
+
export class MachineDataClient extends AuthorizedApiBase {
|
|
11521
|
+
constructor(configuration, baseUrl, http) {
|
|
11522
|
+
super(configuration);
|
|
11523
|
+
this.http = http ? http : window;
|
|
11524
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
11525
|
+
}
|
|
11526
|
+
getLiveMachineData(assetId, externalIds) {
|
|
11527
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/live-machinedata?";
|
|
11528
|
+
if (assetId === undefined || assetId === null)
|
|
11529
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11530
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11531
|
+
if (externalIds === null)
|
|
11532
|
+
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
11533
|
+
else if (externalIds !== undefined)
|
|
11534
|
+
externalIds && externalIds.forEach(item => { url_ += "externalIds=" + encodeURIComponent("" + item) + "&"; });
|
|
11535
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11536
|
+
let options_ = {
|
|
11537
|
+
method: "GET",
|
|
11538
|
+
headers: {
|
|
11539
|
+
"Accept": "application/json"
|
|
11540
|
+
}
|
|
11541
|
+
};
|
|
11542
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11543
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11544
|
+
}).then((_response) => {
|
|
11545
|
+
return this.processGetLiveMachineData(_response);
|
|
11546
|
+
});
|
|
11547
|
+
}
|
|
11548
|
+
processGetLiveMachineData(response) {
|
|
11549
|
+
const status = response.status;
|
|
11550
|
+
let _headers = {};
|
|
11551
|
+
if (response.headers && response.headers.forEach) {
|
|
11552
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11553
|
+
}
|
|
11554
|
+
;
|
|
11555
|
+
if (status === 200) {
|
|
11556
|
+
return response.text().then((_responseText) => {
|
|
11557
|
+
let result200 = null;
|
|
11558
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11559
|
+
return result200;
|
|
11560
|
+
});
|
|
11561
|
+
}
|
|
11562
|
+
else if (status !== 200 && status !== 204) {
|
|
11563
|
+
return response.text().then((_responseText) => {
|
|
11564
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11565
|
+
});
|
|
11566
|
+
}
|
|
11567
|
+
return Promise.resolve(null);
|
|
11568
|
+
}
|
|
11569
|
+
getTimeseriesGraph(assetId, externalIds, startTime, endTime) {
|
|
11570
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph?";
|
|
11571
|
+
if (assetId === undefined || assetId === null)
|
|
11572
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11573
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11574
|
+
if (externalIds === null)
|
|
11575
|
+
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
11576
|
+
else if (externalIds !== undefined)
|
|
11577
|
+
externalIds && externalIds.forEach(item => { url_ += "externalIds=" + encodeURIComponent("" + item) + "&"; });
|
|
11578
|
+
if (startTime === null)
|
|
11579
|
+
throw new globalThis.Error("The parameter 'startTime' cannot be null.");
|
|
11580
|
+
else if (startTime !== undefined)
|
|
11581
|
+
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
11582
|
+
if (endTime === null)
|
|
11583
|
+
throw new globalThis.Error("The parameter 'endTime' cannot be null.");
|
|
11584
|
+
else if (endTime !== undefined)
|
|
11585
|
+
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
11586
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11587
|
+
let options_ = {
|
|
11588
|
+
method: "GET",
|
|
11589
|
+
headers: {
|
|
11590
|
+
"Accept": "application/json"
|
|
11591
|
+
}
|
|
11592
|
+
};
|
|
11593
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11594
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11595
|
+
}).then((_response) => {
|
|
11596
|
+
return this.processGetTimeseriesGraph(_response);
|
|
11597
|
+
});
|
|
11598
|
+
}
|
|
11599
|
+
processGetTimeseriesGraph(response) {
|
|
11600
|
+
const status = response.status;
|
|
11601
|
+
let _headers = {};
|
|
11602
|
+
if (response.headers && response.headers.forEach) {
|
|
11603
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11604
|
+
}
|
|
11605
|
+
;
|
|
11606
|
+
if (status === 200) {
|
|
11607
|
+
return response.text().then((_responseText) => {
|
|
11608
|
+
let result200 = null;
|
|
11609
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11610
|
+
return result200;
|
|
11611
|
+
});
|
|
11612
|
+
}
|
|
11613
|
+
else if (status !== 200 && status !== 204) {
|
|
11614
|
+
return response.text().then((_responseText) => {
|
|
11615
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11616
|
+
});
|
|
11617
|
+
}
|
|
11618
|
+
return Promise.resolve(null);
|
|
11619
|
+
}
|
|
11620
|
+
exportTimeseriesGraph(assetId, request) {
|
|
11621
|
+
let url_ = this.baseUrl + "/machinedata/{assetId}/timeseries-graph/export-csv";
|
|
11622
|
+
if (assetId === undefined || assetId === null)
|
|
11623
|
+
throw new globalThis.Error("The parameter 'assetId' must be defined.");
|
|
11624
|
+
url_ = url_.replace("{assetId}", encodeURIComponent("" + assetId));
|
|
11625
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
11626
|
+
const content_ = JSON.stringify(request);
|
|
11627
|
+
let options_ = {
|
|
11628
|
+
body: content_,
|
|
11629
|
+
method: "POST",
|
|
11630
|
+
headers: {
|
|
11631
|
+
"Content-Type": "application/json",
|
|
11632
|
+
"Accept": "application/json"
|
|
11633
|
+
}
|
|
11634
|
+
};
|
|
11635
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
11636
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
11637
|
+
}).then((_response) => {
|
|
11638
|
+
return this.processExportTimeseriesGraph(_response);
|
|
11639
|
+
});
|
|
11640
|
+
}
|
|
11641
|
+
processExportTimeseriesGraph(response) {
|
|
11642
|
+
const status = response.status;
|
|
11643
|
+
let _headers = {};
|
|
11644
|
+
if (response.headers && response.headers.forEach) {
|
|
11645
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
11646
|
+
}
|
|
11647
|
+
;
|
|
11648
|
+
if (status === 200) {
|
|
11649
|
+
return response.text().then((_responseText) => {
|
|
11650
|
+
let result200 = null;
|
|
11651
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
11652
|
+
return result200;
|
|
11653
|
+
});
|
|
11654
|
+
}
|
|
11655
|
+
else if (status !== 200 && status !== 204) {
|
|
11656
|
+
return response.text().then((_responseText) => {
|
|
11657
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
11658
|
+
});
|
|
11659
|
+
}
|
|
11660
|
+
return Promise.resolve(null);
|
|
11661
|
+
}
|
|
11662
|
+
}
|
|
11523
11663
|
export class LinksClient extends AuthorizedApiBase {
|
|
11524
11664
|
constructor(configuration, baseUrl, http) {
|
|
11525
11665
|
super(configuration);
|
|
@@ -20012,56 +20152,14 @@ export class MesEngineeringChangeOrdersClient extends AuthorizedApiBase {
|
|
|
20012
20152
|
return Promise.resolve(null);
|
|
20013
20153
|
}
|
|
20014
20154
|
}
|
|
20015
|
-
export class
|
|
20155
|
+
export class MesIndirectActivitiesClient extends AuthorizedApiBase {
|
|
20016
20156
|
constructor(configuration, baseUrl, http) {
|
|
20017
20157
|
super(configuration);
|
|
20018
20158
|
this.http = http ? http : window;
|
|
20019
20159
|
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20020
20160
|
}
|
|
20021
|
-
|
|
20022
|
-
let url_ = this.baseUrl + "/mes/
|
|
20023
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
20024
|
-
const content_ = JSON.stringify(request);
|
|
20025
|
-
let options_ = {
|
|
20026
|
-
body: content_,
|
|
20027
|
-
method: "POST",
|
|
20028
|
-
headers: {
|
|
20029
|
-
"Content-Type": "application/json",
|
|
20030
|
-
}
|
|
20031
|
-
};
|
|
20032
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20033
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
20034
|
-
}).then((_response) => {
|
|
20035
|
-
return this.processAddMesLink(_response);
|
|
20036
|
-
});
|
|
20037
|
-
}
|
|
20038
|
-
processAddMesLink(response) {
|
|
20039
|
-
const status = response.status;
|
|
20040
|
-
let _headers = {};
|
|
20041
|
-
if (response.headers && response.headers.forEach) {
|
|
20042
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20043
|
-
}
|
|
20044
|
-
;
|
|
20045
|
-
if (status === 200) {
|
|
20046
|
-
return response.text().then((_responseText) => {
|
|
20047
|
-
return;
|
|
20048
|
-
});
|
|
20049
|
-
}
|
|
20050
|
-
else if (status !== 200 && status !== 204) {
|
|
20051
|
-
return response.text().then((_responseText) => {
|
|
20052
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20053
|
-
});
|
|
20054
|
-
}
|
|
20055
|
-
return Promise.resolve(null);
|
|
20056
|
-
}
|
|
20057
|
-
listMesLinks(types, workOrderId, operation) {
|
|
20058
|
-
let url_ = this.baseUrl + "/mes/links?";
|
|
20059
|
-
if (types !== undefined && types !== null)
|
|
20060
|
-
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
20061
|
-
if (workOrderId !== undefined && workOrderId !== null)
|
|
20062
|
-
url_ += "workOrderId=" + encodeURIComponent("" + workOrderId) + "&";
|
|
20063
|
-
if (operation !== undefined && operation !== null)
|
|
20064
|
-
url_ += "operation=" + encodeURIComponent("" + operation) + "&";
|
|
20161
|
+
listIndirectActivities() {
|
|
20162
|
+
let url_ = this.baseUrl + "/mes/indirect-activities";
|
|
20065
20163
|
url_ = url_.replace(/[?&]$/, "");
|
|
20066
20164
|
let options_ = {
|
|
20067
20165
|
method: "GET",
|
|
@@ -20072,10 +20170,10 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20072
20170
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20073
20171
|
return this.http.fetch(url_, transformedOptions_);
|
|
20074
20172
|
}).then((_response) => {
|
|
20075
|
-
return this.
|
|
20173
|
+
return this.processListIndirectActivities(_response);
|
|
20076
20174
|
});
|
|
20077
20175
|
}
|
|
20078
|
-
|
|
20176
|
+
processListIndirectActivities(response) {
|
|
20079
20177
|
const status = response.status;
|
|
20080
20178
|
let _headers = {};
|
|
20081
20179
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20096,8 +20194,8 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20096
20194
|
}
|
|
20097
20195
|
return Promise.resolve(null);
|
|
20098
20196
|
}
|
|
20099
|
-
|
|
20100
|
-
let url_ = this.baseUrl + "/mes/
|
|
20197
|
+
getMyActiveIndirectActivity() {
|
|
20198
|
+
let url_ = this.baseUrl + "/mes/myactiveindirectactivity";
|
|
20101
20199
|
url_ = url_.replace(/[?&]$/, "");
|
|
20102
20200
|
let options_ = {
|
|
20103
20201
|
method: "GET",
|
|
@@ -20108,10 +20206,10 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20108
20206
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20109
20207
|
return this.http.fetch(url_, transformedOptions_);
|
|
20110
20208
|
}).then((_response) => {
|
|
20111
|
-
return this.
|
|
20209
|
+
return this.processGetMyActiveIndirectActivity(_response);
|
|
20112
20210
|
});
|
|
20113
20211
|
}
|
|
20114
|
-
|
|
20212
|
+
processGetMyActiveIndirectActivity(response) {
|
|
20115
20213
|
const status = response.status;
|
|
20116
20214
|
let _headers = {};
|
|
20117
20215
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20132,71 +20230,24 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20132
20230
|
}
|
|
20133
20231
|
return Promise.resolve(null);
|
|
20134
20232
|
}
|
|
20135
|
-
|
|
20136
|
-
let url_ = this.baseUrl + "/mes/
|
|
20137
|
-
if (id === undefined || id === null)
|
|
20138
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20139
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20233
|
+
startIndirectActivity(request) {
|
|
20234
|
+
let url_ = this.baseUrl + "/mes/start-indirect-activity";
|
|
20140
20235
|
url_ = url_.replace(/[?&]$/, "");
|
|
20141
20236
|
const content_ = JSON.stringify(request);
|
|
20142
20237
|
let options_ = {
|
|
20143
20238
|
body: content_,
|
|
20144
|
-
method: "
|
|
20239
|
+
method: "POST",
|
|
20145
20240
|
headers: {
|
|
20146
20241
|
"Content-Type": "application/json",
|
|
20147
|
-
"Accept": "application/octet-stream"
|
|
20148
20242
|
}
|
|
20149
20243
|
};
|
|
20150
20244
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20151
20245
|
return this.http.fetch(url_, transformedOptions_);
|
|
20152
20246
|
}).then((_response) => {
|
|
20153
|
-
return this.
|
|
20247
|
+
return this.processStartIndirectActivity(_response);
|
|
20154
20248
|
});
|
|
20155
20249
|
}
|
|
20156
|
-
|
|
20157
|
-
const status = response.status;
|
|
20158
|
-
let _headers = {};
|
|
20159
|
-
if (response.headers && response.headers.forEach) {
|
|
20160
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20161
|
-
}
|
|
20162
|
-
;
|
|
20163
|
-
if (status === 200 || status === 206) {
|
|
20164
|
-
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
20165
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
20166
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
20167
|
-
if (fileName) {
|
|
20168
|
-
fileName = decodeURIComponent(fileName);
|
|
20169
|
-
}
|
|
20170
|
-
else {
|
|
20171
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
20172
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
20173
|
-
}
|
|
20174
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
20175
|
-
}
|
|
20176
|
-
else if (status !== 200 && status !== 204) {
|
|
20177
|
-
return response.text().then((_responseText) => {
|
|
20178
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
20179
|
-
});
|
|
20180
|
-
}
|
|
20181
|
-
return Promise.resolve(null);
|
|
20182
|
-
}
|
|
20183
|
-
deleteMesLink(id) {
|
|
20184
|
-
let url_ = this.baseUrl + "/mes/links/{id}";
|
|
20185
|
-
if (id === undefined || id === null)
|
|
20186
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20187
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20188
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
20189
|
-
let options_ = {
|
|
20190
|
-
method: "DELETE",
|
|
20191
|
-
headers: {}
|
|
20192
|
-
};
|
|
20193
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20194
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
20195
|
-
}).then((_response) => {
|
|
20196
|
-
return this.processDeleteMesLink(_response);
|
|
20197
|
-
});
|
|
20198
|
-
}
|
|
20199
|
-
processDeleteMesLink(response) {
|
|
20250
|
+
processStartIndirectActivity(response) {
|
|
20200
20251
|
const status = response.status;
|
|
20201
20252
|
let _headers = {};
|
|
20202
20253
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20215,22 +20266,31 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20215
20266
|
}
|
|
20216
20267
|
return Promise.resolve(null);
|
|
20217
20268
|
}
|
|
20218
|
-
|
|
20219
|
-
|
|
20269
|
+
}
|
|
20270
|
+
export class MesLinksClient extends AuthorizedApiBase {
|
|
20271
|
+
constructor(configuration, baseUrl, http) {
|
|
20272
|
+
super(configuration);
|
|
20273
|
+
this.http = http ? http : window;
|
|
20274
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20275
|
+
}
|
|
20276
|
+
addMesLink(request) {
|
|
20277
|
+
let url_ = this.baseUrl + "/mes/links";
|
|
20220
20278
|
url_ = url_.replace(/[?&]$/, "");
|
|
20279
|
+
const content_ = JSON.stringify(request);
|
|
20221
20280
|
let options_ = {
|
|
20222
|
-
|
|
20281
|
+
body: content_,
|
|
20282
|
+
method: "POST",
|
|
20223
20283
|
headers: {
|
|
20224
|
-
"
|
|
20284
|
+
"Content-Type": "application/json",
|
|
20225
20285
|
}
|
|
20226
20286
|
};
|
|
20227
20287
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20228
20288
|
return this.http.fetch(url_, transformedOptions_);
|
|
20229
20289
|
}).then((_response) => {
|
|
20230
|
-
return this.
|
|
20290
|
+
return this.processAddMesLink(_response);
|
|
20231
20291
|
});
|
|
20232
20292
|
}
|
|
20233
|
-
|
|
20293
|
+
processAddMesLink(response) {
|
|
20234
20294
|
const status = response.status;
|
|
20235
20295
|
let _headers = {};
|
|
20236
20296
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20239,9 +20299,7 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20239
20299
|
;
|
|
20240
20300
|
if (status === 200) {
|
|
20241
20301
|
return response.text().then((_responseText) => {
|
|
20242
|
-
|
|
20243
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20244
|
-
return result200;
|
|
20302
|
+
return;
|
|
20245
20303
|
});
|
|
20246
20304
|
}
|
|
20247
20305
|
else if (status !== 200 && status !== 204) {
|
|
@@ -20251,32 +20309,28 @@ export class MesLinksClient extends AuthorizedApiBase {
|
|
|
20251
20309
|
}
|
|
20252
20310
|
return Promise.resolve(null);
|
|
20253
20311
|
}
|
|
20254
|
-
|
|
20255
|
-
|
|
20256
|
-
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
|
-
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
let url_ = this.baseUrl + "/mes/labels/printable";
|
|
20312
|
+
listMesLinks(types, workOrderId, operation) {
|
|
20313
|
+
let url_ = this.baseUrl + "/mes/links?";
|
|
20314
|
+
if (types !== undefined && types !== null)
|
|
20315
|
+
types && types.forEach(item => { url_ += "types=" + encodeURIComponent("" + item) + "&"; });
|
|
20316
|
+
if (workOrderId !== undefined && workOrderId !== null)
|
|
20317
|
+
url_ += "workOrderId=" + encodeURIComponent("" + workOrderId) + "&";
|
|
20318
|
+
if (operation !== undefined && operation !== null)
|
|
20319
|
+
url_ += "operation=" + encodeURIComponent("" + operation) + "&";
|
|
20263
20320
|
url_ = url_.replace(/[?&]$/, "");
|
|
20264
|
-
const content_ = JSON.stringify(request);
|
|
20265
20321
|
let options_ = {
|
|
20266
|
-
|
|
20267
|
-
method: "POST",
|
|
20322
|
+
method: "GET",
|
|
20268
20323
|
headers: {
|
|
20269
|
-
"Content-Type": "application/json",
|
|
20270
20324
|
"Accept": "application/json"
|
|
20271
20325
|
}
|
|
20272
20326
|
};
|
|
20273
20327
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20274
20328
|
return this.http.fetch(url_, transformedOptions_);
|
|
20275
20329
|
}).then((_response) => {
|
|
20276
|
-
return this.
|
|
20330
|
+
return this.processListMesLinks(_response);
|
|
20277
20331
|
});
|
|
20278
20332
|
}
|
|
20279
|
-
|
|
20333
|
+
processListMesLinks(response) {
|
|
20280
20334
|
const status = response.status;
|
|
20281
20335
|
let _headers = {};
|
|
20282
20336
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20297,19 +20351,8 @@ export class MesOrMoveClient extends AuthorizedApiBase {
|
|
|
20297
20351
|
}
|
|
20298
20352
|
return Promise.resolve(null);
|
|
20299
20353
|
}
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
constructor(configuration, baseUrl, http) {
|
|
20303
|
-
super(configuration);
|
|
20304
|
-
this.http = http ? http : window;
|
|
20305
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20306
|
-
}
|
|
20307
|
-
getPlan(resourceGroupId) {
|
|
20308
|
-
let url_ = this.baseUrl + "/mes/planner/plan?";
|
|
20309
|
-
if (resourceGroupId === null)
|
|
20310
|
-
throw new globalThis.Error("The parameter 'resourceGroupId' cannot be null.");
|
|
20311
|
-
else if (resourceGroupId !== undefined)
|
|
20312
|
-
url_ += "resourceGroupId=" + encodeURIComponent("" + resourceGroupId) + "&";
|
|
20354
|
+
listUnmappedMesLinks() {
|
|
20355
|
+
let url_ = this.baseUrl + "/mes/links/unmapped";
|
|
20313
20356
|
url_ = url_.replace(/[?&]$/, "");
|
|
20314
20357
|
let options_ = {
|
|
20315
20358
|
method: "GET",
|
|
@@ -20320,10 +20363,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20320
20363
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20321
20364
|
return this.http.fetch(url_, transformedOptions_);
|
|
20322
20365
|
}).then((_response) => {
|
|
20323
|
-
return this.
|
|
20366
|
+
return this.processListUnmappedMesLinks(_response);
|
|
20324
20367
|
});
|
|
20325
20368
|
}
|
|
20326
|
-
|
|
20369
|
+
processListUnmappedMesLinks(response) {
|
|
20327
20370
|
const status = response.status;
|
|
20328
20371
|
let _headers = {};
|
|
20329
20372
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20344,40 +20387,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20344
20387
|
}
|
|
20345
20388
|
return Promise.resolve(null);
|
|
20346
20389
|
}
|
|
20347
|
-
|
|
20348
|
-
let url_ = this.baseUrl + "/mes/
|
|
20349
|
-
if (
|
|
20350
|
-
throw new globalThis.Error("The parameter '
|
|
20351
|
-
url_ = url_.replace("{
|
|
20390
|
+
updateMesLink(id, request) {
|
|
20391
|
+
let url_ = this.baseUrl + "/mes/links/{id}";
|
|
20392
|
+
if (id === undefined || id === null)
|
|
20393
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20394
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20352
20395
|
url_ = url_.replace(/[?&]$/, "");
|
|
20353
20396
|
const content_ = JSON.stringify(request);
|
|
20354
20397
|
let options_ = {
|
|
20355
20398
|
body: content_,
|
|
20356
|
-
method: "
|
|
20399
|
+
method: "PUT",
|
|
20357
20400
|
headers: {
|
|
20358
20401
|
"Content-Type": "application/json",
|
|
20359
|
-
"Accept": "application/
|
|
20402
|
+
"Accept": "application/octet-stream"
|
|
20360
20403
|
}
|
|
20361
20404
|
};
|
|
20362
20405
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20363
20406
|
return this.http.fetch(url_, transformedOptions_);
|
|
20364
20407
|
}).then((_response) => {
|
|
20365
|
-
return this.
|
|
20408
|
+
return this.processUpdateMesLink(_response);
|
|
20366
20409
|
});
|
|
20367
20410
|
}
|
|
20368
|
-
|
|
20411
|
+
processUpdateMesLink(response) {
|
|
20369
20412
|
const status = response.status;
|
|
20370
20413
|
let _headers = {};
|
|
20371
20414
|
if (response.headers && response.headers.forEach) {
|
|
20372
20415
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20373
20416
|
}
|
|
20374
20417
|
;
|
|
20375
|
-
if (status === 200) {
|
|
20376
|
-
|
|
20377
|
-
|
|
20378
|
-
|
|
20379
|
-
|
|
20380
|
-
|
|
20418
|
+
if (status === 200 || status === 206) {
|
|
20419
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
20420
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
20421
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
20422
|
+
if (fileName) {
|
|
20423
|
+
fileName = decodeURIComponent(fileName);
|
|
20424
|
+
}
|
|
20425
|
+
else {
|
|
20426
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
20427
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
20428
|
+
}
|
|
20429
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
20381
20430
|
}
|
|
20382
20431
|
else if (status !== 200 && status !== 204) {
|
|
20383
20432
|
return response.text().then((_responseText) => {
|
|
@@ -20386,39 +20435,32 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20386
20435
|
}
|
|
20387
20436
|
return Promise.resolve(null);
|
|
20388
20437
|
}
|
|
20389
|
-
|
|
20390
|
-
let url_ = this.baseUrl + "/mes/
|
|
20391
|
-
if (
|
|
20392
|
-
throw new globalThis.Error("The parameter '
|
|
20393
|
-
url_ = url_.replace("{
|
|
20438
|
+
deleteMesLink(id) {
|
|
20439
|
+
let url_ = this.baseUrl + "/mes/links/{id}";
|
|
20440
|
+
if (id === undefined || id === null)
|
|
20441
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20442
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20394
20443
|
url_ = url_.replace(/[?&]$/, "");
|
|
20395
|
-
const content_ = JSON.stringify(sequence);
|
|
20396
20444
|
let options_ = {
|
|
20397
|
-
|
|
20398
|
-
|
|
20399
|
-
headers: {
|
|
20400
|
-
"Content-Type": "application/json",
|
|
20401
|
-
"Accept": "application/json"
|
|
20402
|
-
}
|
|
20445
|
+
method: "DELETE",
|
|
20446
|
+
headers: {}
|
|
20403
20447
|
};
|
|
20404
20448
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20405
20449
|
return this.http.fetch(url_, transformedOptions_);
|
|
20406
20450
|
}).then((_response) => {
|
|
20407
|
-
return this.
|
|
20451
|
+
return this.processDeleteMesLink(_response);
|
|
20408
20452
|
});
|
|
20409
20453
|
}
|
|
20410
|
-
|
|
20454
|
+
processDeleteMesLink(response) {
|
|
20411
20455
|
const status = response.status;
|
|
20412
20456
|
let _headers = {};
|
|
20413
20457
|
if (response.headers && response.headers.forEach) {
|
|
20414
20458
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20415
20459
|
}
|
|
20416
20460
|
;
|
|
20417
|
-
if (status ===
|
|
20461
|
+
if (status === 204) {
|
|
20418
20462
|
return response.text().then((_responseText) => {
|
|
20419
|
-
|
|
20420
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
20421
|
-
return result200;
|
|
20463
|
+
return;
|
|
20422
20464
|
});
|
|
20423
20465
|
}
|
|
20424
20466
|
else if (status !== 200 && status !== 204) {
|
|
@@ -20428,14 +20470,11 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20428
20470
|
}
|
|
20429
20471
|
return Promise.resolve(null);
|
|
20430
20472
|
}
|
|
20431
|
-
|
|
20432
|
-
let url_ = this.baseUrl + "/mes/
|
|
20433
|
-
if (resourceGroupId === undefined || resourceGroupId === null)
|
|
20434
|
-
throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
|
|
20435
|
-
url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
|
|
20473
|
+
getMesLinkPlaceholders() {
|
|
20474
|
+
let url_ = this.baseUrl + "/mes/links/placeholders";
|
|
20436
20475
|
url_ = url_.replace(/[?&]$/, "");
|
|
20437
20476
|
let options_ = {
|
|
20438
|
-
method: "
|
|
20477
|
+
method: "GET",
|
|
20439
20478
|
headers: {
|
|
20440
20479
|
"Accept": "application/json"
|
|
20441
20480
|
}
|
|
@@ -20443,10 +20482,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20443
20482
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20444
20483
|
return this.http.fetch(url_, transformedOptions_);
|
|
20445
20484
|
}).then((_response) => {
|
|
20446
|
-
return this.
|
|
20485
|
+
return this.processGetMesLinkPlaceholders(_response);
|
|
20447
20486
|
});
|
|
20448
20487
|
}
|
|
20449
|
-
|
|
20488
|
+
processGetMesLinkPlaceholders(response) {
|
|
20450
20489
|
const status = response.status;
|
|
20451
20490
|
let _headers = {};
|
|
20452
20491
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20467,13 +20506,17 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20467
20506
|
}
|
|
20468
20507
|
return Promise.resolve(null);
|
|
20469
20508
|
}
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20509
|
+
}
|
|
20510
|
+
export class MesOrMoveClient extends AuthorizedApiBase {
|
|
20511
|
+
constructor(configuration, baseUrl, http) {
|
|
20512
|
+
super(configuration);
|
|
20513
|
+
this.http = http ? http : window;
|
|
20514
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20515
|
+
}
|
|
20516
|
+
getPrintableLabels(request) {
|
|
20517
|
+
let url_ = this.baseUrl + "/mes/labels/printable";
|
|
20475
20518
|
url_ = url_.replace(/[?&]$/, "");
|
|
20476
|
-
const content_ = JSON.stringify(
|
|
20519
|
+
const content_ = JSON.stringify(request);
|
|
20477
20520
|
let options_ = {
|
|
20478
20521
|
body: content_,
|
|
20479
20522
|
method: "POST",
|
|
@@ -20485,10 +20528,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20485
20528
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20486
20529
|
return this.http.fetch(url_, transformedOptions_);
|
|
20487
20530
|
}).then((_response) => {
|
|
20488
|
-
return this.
|
|
20531
|
+
return this.processGetPrintableLabels(_response);
|
|
20489
20532
|
});
|
|
20490
20533
|
}
|
|
20491
|
-
|
|
20534
|
+
processGetPrintableLabels(response) {
|
|
20492
20535
|
const status = response.status;
|
|
20493
20536
|
let _headers = {};
|
|
20494
20537
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20509,37 +20552,72 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20509
20552
|
}
|
|
20510
20553
|
return Promise.resolve(null);
|
|
20511
20554
|
}
|
|
20512
|
-
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20555
|
+
}
|
|
20556
|
+
export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
|
|
20557
|
+
constructor(configuration, baseUrl, http) {
|
|
20558
|
+
super(configuration);
|
|
20559
|
+
this.http = http ? http : window;
|
|
20560
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
20561
|
+
}
|
|
20562
|
+
/**
|
|
20563
|
+
* Upload a new attachment (with or without a file)
|
|
20564
|
+
* @param type (optional)
|
|
20565
|
+
* @param description (optional)
|
|
20566
|
+
* @param file (optional)
|
|
20567
|
+
* @param notes (optional)
|
|
20568
|
+
* @param url (optional)
|
|
20569
|
+
*/
|
|
20570
|
+
upload(id, type, description, file, notes, url) {
|
|
20571
|
+
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments";
|
|
20572
|
+
if (id === undefined || id === null)
|
|
20573
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20574
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20517
20575
|
url_ = url_.replace(/[?&]$/, "");
|
|
20576
|
+
const content_ = new FormData();
|
|
20577
|
+
if (type === null || type === undefined)
|
|
20578
|
+
throw new globalThis.Error("The parameter 'type' cannot be null.");
|
|
20579
|
+
else
|
|
20580
|
+
content_.append("type", type.toString());
|
|
20581
|
+
if (description !== null && description !== undefined)
|
|
20582
|
+
content_.append("description", description.toString());
|
|
20583
|
+
if (file !== null && file !== undefined)
|
|
20584
|
+
content_.append("file", file.data, file.fileName ? file.fileName : "file");
|
|
20585
|
+
if (notes !== null && notes !== undefined)
|
|
20586
|
+
content_.append("notes", notes.toString());
|
|
20587
|
+
if (url !== null && url !== undefined)
|
|
20588
|
+
content_.append("url", url.toString());
|
|
20518
20589
|
let options_ = {
|
|
20519
|
-
|
|
20590
|
+
body: content_,
|
|
20591
|
+
method: "POST",
|
|
20520
20592
|
headers: {
|
|
20521
|
-
"Accept": "application/
|
|
20593
|
+
"Accept": "application/octet-stream"
|
|
20522
20594
|
}
|
|
20523
20595
|
};
|
|
20524
20596
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20525
20597
|
return this.http.fetch(url_, transformedOptions_);
|
|
20526
20598
|
}).then((_response) => {
|
|
20527
|
-
return this.
|
|
20599
|
+
return this.processUpload(_response);
|
|
20528
20600
|
});
|
|
20529
20601
|
}
|
|
20530
|
-
|
|
20602
|
+
processUpload(response) {
|
|
20531
20603
|
const status = response.status;
|
|
20532
20604
|
let _headers = {};
|
|
20533
20605
|
if (response.headers && response.headers.forEach) {
|
|
20534
20606
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20535
20607
|
}
|
|
20536
20608
|
;
|
|
20537
|
-
if (status === 200) {
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20609
|
+
if (status === 200 || status === 206) {
|
|
20610
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
20611
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
20612
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
20613
|
+
if (fileName) {
|
|
20614
|
+
fileName = decodeURIComponent(fileName);
|
|
20615
|
+
}
|
|
20616
|
+
else {
|
|
20617
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
20618
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
20619
|
+
}
|
|
20620
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
20543
20621
|
}
|
|
20544
20622
|
else if (status !== 200 && status !== 204) {
|
|
20545
20623
|
return response.text().then((_responseText) => {
|
|
@@ -20548,11 +20626,11 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20548
20626
|
}
|
|
20549
20627
|
return Promise.resolve(null);
|
|
20550
20628
|
}
|
|
20551
|
-
|
|
20552
|
-
let url_ = this.baseUrl + "/mes/
|
|
20553
|
-
if (
|
|
20554
|
-
throw new globalThis.Error("The parameter '
|
|
20555
|
-
url_ = url_.replace("{
|
|
20629
|
+
getAttachments(id) {
|
|
20630
|
+
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments";
|
|
20631
|
+
if (id === undefined || id === null)
|
|
20632
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20633
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20556
20634
|
url_ = url_.replace(/[?&]$/, "");
|
|
20557
20635
|
let options_ = {
|
|
20558
20636
|
method: "GET",
|
|
@@ -20563,10 +20641,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20563
20641
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20564
20642
|
return this.http.fetch(url_, transformedOptions_);
|
|
20565
20643
|
}).then((_response) => {
|
|
20566
|
-
return this.
|
|
20644
|
+
return this.processGetAttachments(_response);
|
|
20567
20645
|
});
|
|
20568
20646
|
}
|
|
20569
|
-
|
|
20647
|
+
processGetAttachments(response) {
|
|
20570
20648
|
const status = response.status;
|
|
20571
20649
|
let _headers = {};
|
|
20572
20650
|
if (response.headers && response.headers.forEach) {
|
|
@@ -20587,40 +20665,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20587
20665
|
}
|
|
20588
20666
|
return Promise.resolve(null);
|
|
20589
20667
|
}
|
|
20590
|
-
|
|
20591
|
-
let url_ = this.baseUrl + "/mes/
|
|
20592
|
-
if (
|
|
20593
|
-
throw new globalThis.Error("The parameter '
|
|
20594
|
-
url_ = url_.replace("{
|
|
20595
|
-
if (
|
|
20596
|
-
throw new globalThis.Error("The parameter '
|
|
20597
|
-
url_ = url_.replace("{
|
|
20668
|
+
getAttachmentFile(id, attachmentId) {
|
|
20669
|
+
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
20670
|
+
if (id === undefined || id === null)
|
|
20671
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20672
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20673
|
+
if (attachmentId === undefined || attachmentId === null)
|
|
20674
|
+
throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
|
|
20675
|
+
url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
|
|
20598
20676
|
url_ = url_.replace(/[?&]$/, "");
|
|
20599
20677
|
let options_ = {
|
|
20600
20678
|
method: "GET",
|
|
20601
20679
|
headers: {
|
|
20602
|
-
"Accept": "application/
|
|
20680
|
+
"Accept": "application/octet-stream"
|
|
20603
20681
|
}
|
|
20604
20682
|
};
|
|
20605
20683
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20606
20684
|
return this.http.fetch(url_, transformedOptions_);
|
|
20607
20685
|
}).then((_response) => {
|
|
20608
|
-
return this.
|
|
20686
|
+
return this.processGetAttachmentFile(_response);
|
|
20609
20687
|
});
|
|
20610
20688
|
}
|
|
20611
|
-
|
|
20689
|
+
processGetAttachmentFile(response) {
|
|
20612
20690
|
const status = response.status;
|
|
20613
20691
|
let _headers = {};
|
|
20614
20692
|
if (response.headers && response.headers.forEach) {
|
|
20615
20693
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20616
20694
|
}
|
|
20617
20695
|
;
|
|
20618
|
-
if (status === 200) {
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20696
|
+
if (status === 200 || status === 206) {
|
|
20697
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
20698
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
20699
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
20700
|
+
if (fileName) {
|
|
20701
|
+
fileName = decodeURIComponent(fileName);
|
|
20702
|
+
}
|
|
20703
|
+
else {
|
|
20704
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
20705
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
20706
|
+
}
|
|
20707
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
20624
20708
|
}
|
|
20625
20709
|
else if (status !== 200 && status !== 204) {
|
|
20626
20710
|
return response.text().then((_responseText) => {
|
|
@@ -20629,37 +20713,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
|
|
|
20629
20713
|
}
|
|
20630
20714
|
return Promise.resolve(null);
|
|
20631
20715
|
}
|
|
20632
|
-
|
|
20633
|
-
let url_ = this.baseUrl + "/mes/
|
|
20716
|
+
deleteAttachment(id, attachmentId) {
|
|
20717
|
+
let url_ = this.baseUrl + "/mes/productionorders/{id}/attachments/{attachmentId}";
|
|
20718
|
+
if (id === undefined || id === null)
|
|
20719
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
20720
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
20721
|
+
if (attachmentId === undefined || attachmentId === null)
|
|
20722
|
+
throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
|
|
20723
|
+
url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
|
|
20634
20724
|
url_ = url_.replace(/[?&]$/, "");
|
|
20635
|
-
const content_ = JSON.stringify(command);
|
|
20636
20725
|
let options_ = {
|
|
20637
|
-
|
|
20638
|
-
method: "PUT",
|
|
20726
|
+
method: "DELETE",
|
|
20639
20727
|
headers: {
|
|
20640
|
-
"
|
|
20641
|
-
"Accept": "application/json"
|
|
20728
|
+
"Accept": "application/octet-stream"
|
|
20642
20729
|
}
|
|
20643
20730
|
};
|
|
20644
20731
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
20645
20732
|
return this.http.fetch(url_, transformedOptions_);
|
|
20646
20733
|
}).then((_response) => {
|
|
20647
|
-
return this.
|
|
20734
|
+
return this.processDeleteAttachment(_response);
|
|
20648
20735
|
});
|
|
20649
20736
|
}
|
|
20650
|
-
|
|
20737
|
+
processDeleteAttachment(response) {
|
|
20651
20738
|
const status = response.status;
|
|
20652
20739
|
let _headers = {};
|
|
20653
20740
|
if (response.headers && response.headers.forEach) {
|
|
20654
20741
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
20655
20742
|
}
|
|
20656
20743
|
;
|
|
20657
|
-
if (status === 200) {
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20744
|
+
if (status === 200 || status === 206) {
|
|
20745
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
20746
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
20747
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
20748
|
+
if (fileName) {
|
|
20749
|
+
fileName = decodeURIComponent(fileName);
|
|
20750
|
+
}
|
|
20751
|
+
else {
|
|
20752
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
20753
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
20754
|
+
}
|
|
20755
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
20663
20756
|
}
|
|
20664
20757
|
else if (status !== 200 && status !== 204) {
|
|
20665
20758
|
return response.text().then((_responseText) => {
|