@ignos/api-client 20260715.186.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.
@@ -4843,14 +4843,11 @@ export class KpiAdminResourceClient extends AuthorizedApiBase {
4843
4843
  }
4844
4844
  return Promise.resolve(null);
4845
4845
  }
4846
- copyShiftSettingsPeriod(sourceResourceExternalId, sourceEffectiveFrom, request) {
4847
- let url_ = this.baseUrl + "/kpiadminresource/shift-settings/{sourceResourceExternalId}/{sourceEffectiveFrom}/copy";
4848
- if (sourceResourceExternalId === undefined || sourceResourceExternalId === null)
4849
- throw new globalThis.Error("The parameter 'sourceResourceExternalId' must be defined.");
4850
- url_ = url_.replace("{sourceResourceExternalId}", encodeURIComponent("" + sourceResourceExternalId));
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 MesLinksClient extends AuthorizedApiBase {
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
- addMesLink(request) {
20022
- let url_ = this.baseUrl + "/mes/links";
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.processListMesLinks(_response);
20173
+ return this.processListIndirectActivities(_response);
20076
20174
  });
20077
20175
  }
20078
- processListMesLinks(response) {
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
- listUnmappedMesLinks() {
20100
- let url_ = this.baseUrl + "/mes/links/unmapped";
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.processListUnmappedMesLinks(_response);
20209
+ return this.processGetMyActiveIndirectActivity(_response);
20112
20210
  });
20113
20211
  }
20114
- processListUnmappedMesLinks(response) {
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
- updateMesLink(id, request) {
20136
- let url_ = this.baseUrl + "/mes/links/{id}";
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: "PUT",
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.processUpdateMesLink(_response);
20247
+ return this.processStartIndirectActivity(_response);
20154
20248
  });
20155
20249
  }
20156
- processUpdateMesLink(response) {
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,51 +20266,15 @@ export class MesLinksClient extends AuthorizedApiBase {
20215
20266
  }
20216
20267
  return Promise.resolve(null);
20217
20268
  }
20218
- getMesLinkPlaceholders() {
20219
- let url_ = this.baseUrl + "/mes/links/placeholders";
20220
- url_ = url_.replace(/[?&]$/, "");
20221
- let options_ = {
20222
- method: "GET",
20223
- headers: {
20224
- "Accept": "application/json"
20225
- }
20226
- };
20227
- return this.transformOptions(options_).then(transformedOptions_ => {
20228
- return this.http.fetch(url_, transformedOptions_);
20229
- }).then((_response) => {
20230
- return this.processGetMesLinkPlaceholders(_response);
20231
- });
20232
- }
20233
- processGetMesLinkPlaceholders(response) {
20234
- const status = response.status;
20235
- let _headers = {};
20236
- if (response.headers && response.headers.forEach) {
20237
- response.headers.forEach((v, k) => _headers[k] = v);
20238
- }
20239
- ;
20240
- if (status === 200) {
20241
- return response.text().then((_responseText) => {
20242
- let result200 = null;
20243
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20244
- return result200;
20245
- });
20246
- }
20247
- else if (status !== 200 && status !== 204) {
20248
- return response.text().then((_responseText) => {
20249
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20250
- });
20251
- }
20252
- return Promise.resolve(null);
20253
- }
20254
20269
  }
20255
- export class MesOrMoveClient extends AuthorizedApiBase {
20270
+ export class MesLinksClient extends AuthorizedApiBase {
20256
20271
  constructor(configuration, baseUrl, http) {
20257
20272
  super(configuration);
20258
20273
  this.http = http ? http : window;
20259
20274
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
20260
20275
  }
20261
- getPrintableLabels(request) {
20262
- let url_ = this.baseUrl + "/mes/labels/printable";
20276
+ addMesLink(request) {
20277
+ let url_ = this.baseUrl + "/mes/links";
20263
20278
  url_ = url_.replace(/[?&]$/, "");
20264
20279
  const content_ = JSON.stringify(request);
20265
20280
  let options_ = {
@@ -20267,16 +20282,15 @@ export class MesOrMoveClient extends AuthorizedApiBase {
20267
20282
  method: "POST",
20268
20283
  headers: {
20269
20284
  "Content-Type": "application/json",
20270
- "Accept": "application/json"
20271
20285
  }
20272
20286
  };
20273
20287
  return this.transformOptions(options_).then(transformedOptions_ => {
20274
20288
  return this.http.fetch(url_, transformedOptions_);
20275
20289
  }).then((_response) => {
20276
- return this.processGetPrintableLabels(_response);
20290
+ return this.processAddMesLink(_response);
20277
20291
  });
20278
20292
  }
20279
- processGetPrintableLabels(response) {
20293
+ processAddMesLink(response) {
20280
20294
  const status = response.status;
20281
20295
  let _headers = {};
20282
20296
  if (response.headers && response.headers.forEach) {
@@ -20285,9 +20299,7 @@ export class MesOrMoveClient extends AuthorizedApiBase {
20285
20299
  ;
20286
20300
  if (status === 200) {
20287
20301
  return response.text().then((_responseText) => {
20288
- let result200 = null;
20289
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20290
- return result200;
20302
+ return;
20291
20303
  });
20292
20304
  }
20293
20305
  else if (status !== 200 && status !== 204) {
@@ -20297,19 +20309,14 @@ export class MesOrMoveClient extends AuthorizedApiBase {
20297
20309
  }
20298
20310
  return Promise.resolve(null);
20299
20311
  }
20300
- }
20301
- export class MesPlannerClient extends AuthorizedApiBase {
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) + "&";
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) + "&";
20313
20320
  url_ = url_.replace(/[?&]$/, "");
20314
20321
  let options_ = {
20315
20322
  method: "GET",
@@ -20320,10 +20327,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
20320
20327
  return this.transformOptions(options_).then(transformedOptions_ => {
20321
20328
  return this.http.fetch(url_, transformedOptions_);
20322
20329
  }).then((_response) => {
20323
- return this.processGetPlan(_response);
20330
+ return this.processListMesLinks(_response);
20324
20331
  });
20325
20332
  }
20326
- processGetPlan(response) {
20333
+ processListMesLinks(response) {
20327
20334
  const status = response.status;
20328
20335
  let _headers = {};
20329
20336
  if (response.headers && response.headers.forEach) {
@@ -20344,28 +20351,22 @@ export class MesPlannerClient extends AuthorizedApiBase {
20344
20351
  }
20345
20352
  return Promise.resolve(null);
20346
20353
  }
20347
- publish(resourceGroupId, request) {
20348
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/publish";
20349
- if (resourceGroupId === undefined || resourceGroupId === null)
20350
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20351
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20354
+ listUnmappedMesLinks() {
20355
+ let url_ = this.baseUrl + "/mes/links/unmapped";
20352
20356
  url_ = url_.replace(/[?&]$/, "");
20353
- const content_ = JSON.stringify(request);
20354
20357
  let options_ = {
20355
- body: content_,
20356
- method: "POST",
20358
+ method: "GET",
20357
20359
  headers: {
20358
- "Content-Type": "application/json",
20359
20360
  "Accept": "application/json"
20360
20361
  }
20361
20362
  };
20362
20363
  return this.transformOptions(options_).then(transformedOptions_ => {
20363
20364
  return this.http.fetch(url_, transformedOptions_);
20364
20365
  }).then((_response) => {
20365
- return this.processPublish(_response);
20366
+ return this.processListUnmappedMesLinks(_response);
20366
20367
  });
20367
20368
  }
20368
- processPublish(response) {
20369
+ processListUnmappedMesLinks(response) {
20369
20370
  const status = response.status;
20370
20371
  let _headers = {};
20371
20372
  if (response.headers && response.headers.forEach) {
@@ -20386,40 +20387,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
20386
20387
  }
20387
20388
  return Promise.resolve(null);
20388
20389
  }
20389
- updateSequence(resourceGroupId, sequence) {
20390
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/sequence";
20391
- if (resourceGroupId === undefined || resourceGroupId === null)
20392
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20393
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
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));
20394
20395
  url_ = url_.replace(/[?&]$/, "");
20395
- const content_ = JSON.stringify(sequence);
20396
+ const content_ = JSON.stringify(request);
20396
20397
  let options_ = {
20397
20398
  body: content_,
20398
20399
  method: "PUT",
20399
20400
  headers: {
20400
20401
  "Content-Type": "application/json",
20401
- "Accept": "application/json"
20402
+ "Accept": "application/octet-stream"
20402
20403
  }
20403
20404
  };
20404
20405
  return this.transformOptions(options_).then(transformedOptions_ => {
20405
20406
  return this.http.fetch(url_, transformedOptions_);
20406
20407
  }).then((_response) => {
20407
- return this.processUpdateSequence(_response);
20408
+ return this.processUpdateMesLink(_response);
20408
20409
  });
20409
20410
  }
20410
- processUpdateSequence(response) {
20411
+ processUpdateMesLink(response) {
20411
20412
  const status = response.status;
20412
20413
  let _headers = {};
20413
20414
  if (response.headers && response.headers.forEach) {
20414
20415
  response.headers.forEach((v, k) => _headers[k] = v);
20415
20416
  }
20416
20417
  ;
20417
- if (status === 200) {
20418
- return response.text().then((_responseText) => {
20419
- let result200 = null;
20420
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20421
- return result200;
20422
- });
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 }; });
20423
20430
  }
20424
20431
  else if (status !== 200 && status !== 204) {
20425
20432
  return response.text().then((_responseText) => {
@@ -20428,36 +20435,32 @@ export class MesPlannerClient extends AuthorizedApiBase {
20428
20435
  }
20429
20436
  return Promise.resolve(null);
20430
20437
  }
20431
- reset(resourceGroupId) {
20432
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/reset";
20433
- if (resourceGroupId === undefined || resourceGroupId === null)
20434
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20435
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
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));
20436
20443
  url_ = url_.replace(/[?&]$/, "");
20437
20444
  let options_ = {
20438
- method: "POST",
20439
- headers: {
20440
- "Accept": "application/json"
20441
- }
20445
+ method: "DELETE",
20446
+ headers: {}
20442
20447
  };
20443
20448
  return this.transformOptions(options_).then(transformedOptions_ => {
20444
20449
  return this.http.fetch(url_, transformedOptions_);
20445
20450
  }).then((_response) => {
20446
- return this.processReset(_response);
20451
+ return this.processDeleteMesLink(_response);
20447
20452
  });
20448
20453
  }
20449
- processReset(response) {
20454
+ processDeleteMesLink(response) {
20450
20455
  const status = response.status;
20451
20456
  let _headers = {};
20452
20457
  if (response.headers && response.headers.forEach) {
20453
20458
  response.headers.forEach((v, k) => _headers[k] = v);
20454
20459
  }
20455
20460
  ;
20456
- if (status === 200) {
20461
+ if (status === 204) {
20457
20462
  return response.text().then((_responseText) => {
20458
- let result200 = null;
20459
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20460
- return result200;
20463
+ return;
20461
20464
  });
20462
20465
  }
20463
20466
  else if (status !== 200 && status !== 204) {
@@ -20467,28 +20470,22 @@ export class MesPlannerClient extends AuthorizedApiBase {
20467
20470
  }
20468
20471
  return Promise.resolve(null);
20469
20472
  }
20470
- saveDraft(resourceGroupId, sequence) {
20471
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
20472
- if (resourceGroupId === undefined || resourceGroupId === null)
20473
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20474
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20473
+ getMesLinkPlaceholders() {
20474
+ let url_ = this.baseUrl + "/mes/links/placeholders";
20475
20475
  url_ = url_.replace(/[?&]$/, "");
20476
- const content_ = JSON.stringify(sequence);
20477
20476
  let options_ = {
20478
- body: content_,
20479
- method: "POST",
20477
+ method: "GET",
20480
20478
  headers: {
20481
- "Content-Type": "application/json",
20482
20479
  "Accept": "application/json"
20483
20480
  }
20484
20481
  };
20485
20482
  return this.transformOptions(options_).then(transformedOptions_ => {
20486
20483
  return this.http.fetch(url_, transformedOptions_);
20487
20484
  }).then((_response) => {
20488
- return this.processSaveDraft(_response);
20485
+ return this.processGetMesLinkPlaceholders(_response);
20489
20486
  });
20490
20487
  }
20491
- processSaveDraft(response) {
20488
+ processGetMesLinkPlaceholders(response) {
20492
20489
  const status = response.status;
20493
20490
  let _headers = {};
20494
20491
  if (response.headers && response.headers.forEach) {
@@ -20509,25 +20506,32 @@ export class MesPlannerClient extends AuthorizedApiBase {
20509
20506
  }
20510
20507
  return Promise.resolve(null);
20511
20508
  }
20512
- discardDraft(resourceGroupId) {
20513
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/draft";
20514
- if (resourceGroupId === undefined || resourceGroupId === null)
20515
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20516
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
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";
20517
20518
  url_ = url_.replace(/[?&]$/, "");
20519
+ const content_ = JSON.stringify(request);
20518
20520
  let options_ = {
20519
- method: "DELETE",
20521
+ body: content_,
20522
+ method: "POST",
20520
20523
  headers: {
20524
+ "Content-Type": "application/json",
20521
20525
  "Accept": "application/json"
20522
20526
  }
20523
20527
  };
20524
20528
  return this.transformOptions(options_).then(transformedOptions_ => {
20525
20529
  return this.http.fetch(url_, transformedOptions_);
20526
20530
  }).then((_response) => {
20527
- return this.processDiscardDraft(_response);
20531
+ return this.processGetPrintableLabels(_response);
20528
20532
  });
20529
20533
  }
20530
- processDiscardDraft(response) {
20534
+ processGetPrintableLabels(response) {
20531
20535
  const status = response.status;
20532
20536
  let _headers = {};
20533
20537
  if (response.headers && response.headers.forEach) {
@@ -20548,45 +20552,72 @@ export class MesPlannerClient extends AuthorizedApiBase {
20548
20552
  }
20549
20553
  return Promise.resolve(null);
20550
20554
  }
20551
- getCapacity(resourceGroupId, from, to) {
20552
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/capacity?";
20553
- if (resourceGroupId === undefined || resourceGroupId === null)
20554
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20555
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20556
- if (from === null)
20557
- throw new globalThis.Error("The parameter 'from' cannot be null.");
20558
- else if (from !== undefined)
20559
- url_ += "from=" + encodeURIComponent(from ? "" + from.toISOString() : "") + "&";
20560
- if (to === null)
20561
- throw new globalThis.Error("The parameter 'to' cannot be null.");
20562
- else if (to !== undefined)
20563
- url_ += "to=" + encodeURIComponent(to ? "" + to.toISOString() : "") + "&";
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));
20564
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());
20565
20589
  let options_ = {
20566
- method: "GET",
20590
+ body: content_,
20591
+ method: "POST",
20567
20592
  headers: {
20568
- "Accept": "application/json"
20593
+ "Accept": "application/octet-stream"
20569
20594
  }
20570
20595
  };
20571
20596
  return this.transformOptions(options_).then(transformedOptions_ => {
20572
20597
  return this.http.fetch(url_, transformedOptions_);
20573
20598
  }).then((_response) => {
20574
- return this.processGetCapacity(_response);
20599
+ return this.processUpload(_response);
20575
20600
  });
20576
20601
  }
20577
- processGetCapacity(response) {
20602
+ processUpload(response) {
20578
20603
  const status = response.status;
20579
20604
  let _headers = {};
20580
20605
  if (response.headers && response.headers.forEach) {
20581
20606
  response.headers.forEach((v, k) => _headers[k] = v);
20582
20607
  }
20583
20608
  ;
20584
- if (status === 200) {
20585
- return response.text().then((_responseText) => {
20586
- let result200 = null;
20587
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20588
- return result200;
20589
- });
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 }; });
20590
20621
  }
20591
20622
  else if (status !== 200 && status !== 204) {
20592
20623
  return response.text().then((_responseText) => {
@@ -20595,11 +20626,11 @@ export class MesPlannerClient extends AuthorizedApiBase {
20595
20626
  }
20596
20627
  return Promise.resolve(null);
20597
20628
  }
20598
- getVersions(resourceGroupId) {
20599
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
20600
- if (resourceGroupId === undefined || resourceGroupId === null)
20601
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20602
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
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));
20603
20634
  url_ = url_.replace(/[?&]$/, "");
20604
20635
  let options_ = {
20605
20636
  method: "GET",
@@ -20610,10 +20641,10 @@ export class MesPlannerClient extends AuthorizedApiBase {
20610
20641
  return this.transformOptions(options_).then(transformedOptions_ => {
20611
20642
  return this.http.fetch(url_, transformedOptions_);
20612
20643
  }).then((_response) => {
20613
- return this.processGetVersions(_response);
20644
+ return this.processGetAttachments(_response);
20614
20645
  });
20615
20646
  }
20616
- processGetVersions(response) {
20647
+ processGetAttachments(response) {
20617
20648
  const status = response.status;
20618
20649
  let _headers = {};
20619
20650
  if (response.headers && response.headers.forEach) {
@@ -20634,40 +20665,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
20634
20665
  }
20635
20666
  return Promise.resolve(null);
20636
20667
  }
20637
- getVersion(resourceGroupId, eventId) {
20638
- let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
20639
- if (resourceGroupId === undefined || resourceGroupId === null)
20640
- throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20641
- url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20642
- if (eventId === undefined || eventId === null)
20643
- throw new globalThis.Error("The parameter 'eventId' must be defined.");
20644
- url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
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));
20645
20676
  url_ = url_.replace(/[?&]$/, "");
20646
20677
  let options_ = {
20647
20678
  method: "GET",
20648
20679
  headers: {
20649
- "Accept": "application/json"
20680
+ "Accept": "application/octet-stream"
20650
20681
  }
20651
20682
  };
20652
20683
  return this.transformOptions(options_).then(transformedOptions_ => {
20653
20684
  return this.http.fetch(url_, transformedOptions_);
20654
20685
  }).then((_response) => {
20655
- return this.processGetVersion(_response);
20686
+ return this.processGetAttachmentFile(_response);
20656
20687
  });
20657
20688
  }
20658
- processGetVersion(response) {
20689
+ processGetAttachmentFile(response) {
20659
20690
  const status = response.status;
20660
20691
  let _headers = {};
20661
20692
  if (response.headers && response.headers.forEach) {
20662
20693
  response.headers.forEach((v, k) => _headers[k] = v);
20663
20694
  }
20664
20695
  ;
20665
- if (status === 200) {
20666
- return response.text().then((_responseText) => {
20667
- let result200 = null;
20668
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20669
- return result200;
20670
- });
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 }; });
20671
20708
  }
20672
20709
  else if (status !== 200 && status !== 204) {
20673
20710
  return response.text().then((_responseText) => {
@@ -20676,37 +20713,46 @@ export class MesPlannerClient extends AuthorizedApiBase {
20676
20713
  }
20677
20714
  return Promise.resolve(null);
20678
20715
  }
20679
- setProgramStatus(command) {
20680
- let url_ = this.baseUrl + "/mes/planner/operations/program-status";
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));
20681
20724
  url_ = url_.replace(/[?&]$/, "");
20682
- const content_ = JSON.stringify(command);
20683
20725
  let options_ = {
20684
- body: content_,
20685
- method: "PUT",
20726
+ method: "DELETE",
20686
20727
  headers: {
20687
- "Content-Type": "application/json",
20688
- "Accept": "application/json"
20728
+ "Accept": "application/octet-stream"
20689
20729
  }
20690
20730
  };
20691
20731
  return this.transformOptions(options_).then(transformedOptions_ => {
20692
20732
  return this.http.fetch(url_, transformedOptions_);
20693
20733
  }).then((_response) => {
20694
- return this.processSetProgramStatus(_response);
20734
+ return this.processDeleteAttachment(_response);
20695
20735
  });
20696
20736
  }
20697
- processSetProgramStatus(response) {
20737
+ processDeleteAttachment(response) {
20698
20738
  const status = response.status;
20699
20739
  let _headers = {};
20700
20740
  if (response.headers && response.headers.forEach) {
20701
20741
  response.headers.forEach((v, k) => _headers[k] = v);
20702
20742
  }
20703
20743
  ;
20704
- if (status === 200) {
20705
- return response.text().then((_responseText) => {
20706
- let result200 = null;
20707
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20708
- return result200;
20709
- });
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 }; });
20710
20756
  }
20711
20757
  else if (status !== 200 && status !== 204) {
20712
20758
  return response.text().then((_responseText) => {