@ignos/api-client 20260711.182.1-alpha → 20260714.184.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,11 +4843,14 @@ export class KpiAdminResourceClient extends AuthorizedApiBase {
4843
4843
  }
4844
4844
  return Promise.resolve(null);
4845
4845
  }
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));
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));
4851
4854
  url_ = url_.replace(/[?&]$/, "");
4852
4855
  const content_ = JSON.stringify(request);
4853
4856
  let options_ = {
@@ -11517,149 +11520,6 @@ export class MachinesClient extends AuthorizedApiBase {
11517
11520
  return Promise.resolve(null);
11518
11521
  }
11519
11522
  }
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
- }
11663
11523
  export class LinksClient extends AuthorizedApiBase {
11664
11524
  constructor(configuration, baseUrl, http) {
11665
11525
  super(configuration);
@@ -20152,121 +20012,6 @@ export class MesEngineeringChangeOrdersClient extends AuthorizedApiBase {
20152
20012
  return Promise.resolve(null);
20153
20013
  }
20154
20014
  }
20155
- export class MesIndirectActivitiesClient extends AuthorizedApiBase {
20156
- constructor(configuration, baseUrl, http) {
20157
- super(configuration);
20158
- this.http = http ? http : window;
20159
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
20160
- }
20161
- listIndirectActivities() {
20162
- let url_ = this.baseUrl + "/mes/indirect-activities";
20163
- url_ = url_.replace(/[?&]$/, "");
20164
- let options_ = {
20165
- method: "GET",
20166
- headers: {
20167
- "Accept": "application/json"
20168
- }
20169
- };
20170
- return this.transformOptions(options_).then(transformedOptions_ => {
20171
- return this.http.fetch(url_, transformedOptions_);
20172
- }).then((_response) => {
20173
- return this.processListIndirectActivities(_response);
20174
- });
20175
- }
20176
- processListIndirectActivities(response) {
20177
- const status = response.status;
20178
- let _headers = {};
20179
- if (response.headers && response.headers.forEach) {
20180
- response.headers.forEach((v, k) => _headers[k] = v);
20181
- }
20182
- ;
20183
- if (status === 200) {
20184
- return response.text().then((_responseText) => {
20185
- let result200 = null;
20186
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20187
- return result200;
20188
- });
20189
- }
20190
- else if (status !== 200 && status !== 204) {
20191
- return response.text().then((_responseText) => {
20192
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20193
- });
20194
- }
20195
- return Promise.resolve(null);
20196
- }
20197
- getMyActiveIndirectActivity() {
20198
- let url_ = this.baseUrl + "/mes/myactiveindirectactivity";
20199
- url_ = url_.replace(/[?&]$/, "");
20200
- let options_ = {
20201
- method: "GET",
20202
- headers: {
20203
- "Accept": "application/json"
20204
- }
20205
- };
20206
- return this.transformOptions(options_).then(transformedOptions_ => {
20207
- return this.http.fetch(url_, transformedOptions_);
20208
- }).then((_response) => {
20209
- return this.processGetMyActiveIndirectActivity(_response);
20210
- });
20211
- }
20212
- processGetMyActiveIndirectActivity(response) {
20213
- const status = response.status;
20214
- let _headers = {};
20215
- if (response.headers && response.headers.forEach) {
20216
- response.headers.forEach((v, k) => _headers[k] = v);
20217
- }
20218
- ;
20219
- if (status === 200) {
20220
- return response.text().then((_responseText) => {
20221
- let result200 = null;
20222
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20223
- return result200;
20224
- });
20225
- }
20226
- else if (status !== 200 && status !== 204) {
20227
- return response.text().then((_responseText) => {
20228
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20229
- });
20230
- }
20231
- return Promise.resolve(null);
20232
- }
20233
- startIndirectActivity(request) {
20234
- let url_ = this.baseUrl + "/mes/start-indirect-activity";
20235
- url_ = url_.replace(/[?&]$/, "");
20236
- const content_ = JSON.stringify(request);
20237
- let options_ = {
20238
- body: content_,
20239
- method: "POST",
20240
- headers: {
20241
- "Content-Type": "application/json",
20242
- }
20243
- };
20244
- return this.transformOptions(options_).then(transformedOptions_ => {
20245
- return this.http.fetch(url_, transformedOptions_);
20246
- }).then((_response) => {
20247
- return this.processStartIndirectActivity(_response);
20248
- });
20249
- }
20250
- processStartIndirectActivity(response) {
20251
- const status = response.status;
20252
- let _headers = {};
20253
- if (response.headers && response.headers.forEach) {
20254
- response.headers.forEach((v, k) => _headers[k] = v);
20255
- }
20256
- ;
20257
- if (status === 204) {
20258
- return response.text().then((_responseText) => {
20259
- return;
20260
- });
20261
- }
20262
- else if (status !== 200 && status !== 204) {
20263
- return response.text().then((_responseText) => {
20264
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20265
- });
20266
- }
20267
- return Promise.resolve(null);
20268
- }
20269
- }
20270
20015
  export class MesLinksClient extends AuthorizedApiBase {
20271
20016
  constructor(configuration, baseUrl, http) {
20272
20017
  super(configuration);
@@ -20553,71 +20298,44 @@ export class MesOrMoveClient extends AuthorizedApiBase {
20553
20298
  return Promise.resolve(null);
20554
20299
  }
20555
20300
  }
20556
- export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
20301
+ export class MesPlannerClient extends AuthorizedApiBase {
20557
20302
  constructor(configuration, baseUrl, http) {
20558
20303
  super(configuration);
20559
20304
  this.http = http ? http : window;
20560
20305
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
20561
20306
  }
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));
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) + "&";
20575
20313
  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());
20589
20314
  let options_ = {
20590
- body: content_,
20591
- method: "POST",
20315
+ method: "GET",
20592
20316
  headers: {
20593
- "Accept": "application/octet-stream"
20317
+ "Accept": "application/json"
20594
20318
  }
20595
20319
  };
20596
20320
  return this.transformOptions(options_).then(transformedOptions_ => {
20597
20321
  return this.http.fetch(url_, transformedOptions_);
20598
20322
  }).then((_response) => {
20599
- return this.processUpload(_response);
20323
+ return this.processGetPlan(_response);
20600
20324
  });
20601
20325
  }
20602
- processUpload(response) {
20326
+ processGetPlan(response) {
20603
20327
  const status = response.status;
20604
20328
  let _headers = {};
20605
20329
  if (response.headers && response.headers.forEach) {
20606
20330
  response.headers.forEach((v, k) => _headers[k] = v);
20607
20331
  }
20608
20332
  ;
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 }; });
20333
+ if (status === 200) {
20334
+ return response.text().then((_responseText) => {
20335
+ let result200 = null;
20336
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20337
+ return result200;
20338
+ });
20621
20339
  }
20622
20340
  else if (status !== 200 && status !== 204) {
20623
20341
  return response.text().then((_responseText) => {
@@ -20626,25 +20344,28 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
20626
20344
  }
20627
20345
  return Promise.resolve(null);
20628
20346
  }
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));
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));
20634
20352
  url_ = url_.replace(/[?&]$/, "");
20353
+ const content_ = JSON.stringify(request);
20635
20354
  let options_ = {
20636
- method: "GET",
20355
+ body: content_,
20356
+ method: "POST",
20637
20357
  headers: {
20358
+ "Content-Type": "application/json",
20638
20359
  "Accept": "application/json"
20639
20360
  }
20640
20361
  };
20641
20362
  return this.transformOptions(options_).then(transformedOptions_ => {
20642
20363
  return this.http.fetch(url_, transformedOptions_);
20643
20364
  }).then((_response) => {
20644
- return this.processGetAttachments(_response);
20365
+ return this.processPublish(_response);
20645
20366
  });
20646
20367
  }
20647
- processGetAttachments(response) {
20368
+ processPublish(response) {
20648
20369
  const status = response.status;
20649
20370
  let _headers = {};
20650
20371
  if (response.headers && response.headers.forEach) {
@@ -20665,46 +20386,121 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
20665
20386
  }
20666
20387
  return Promise.resolve(null);
20667
20388
  }
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));
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));
20676
20394
  url_ = url_.replace(/[?&]$/, "");
20395
+ const content_ = JSON.stringify(sequence);
20677
20396
  let options_ = {
20678
- method: "GET",
20397
+ body: content_,
20398
+ method: "PUT",
20679
20399
  headers: {
20680
- "Accept": "application/octet-stream"
20400
+ "Content-Type": "application/json",
20401
+ "Accept": "application/json"
20681
20402
  }
20682
20403
  };
20683
20404
  return this.transformOptions(options_).then(transformedOptions_ => {
20684
20405
  return this.http.fetch(url_, transformedOptions_);
20685
20406
  }).then((_response) => {
20686
- return this.processGetAttachmentFile(_response);
20407
+ return this.processUpdateSequence(_response);
20687
20408
  });
20688
20409
  }
20689
- processGetAttachmentFile(response) {
20410
+ processUpdateSequence(response) {
20690
20411
  const status = response.status;
20691
20412
  let _headers = {};
20692
20413
  if (response.headers && response.headers.forEach) {
20693
20414
  response.headers.forEach((v, k) => _headers[k] = v);
20694
20415
  }
20695
20416
  ;
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);
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
+ });
20423
+ }
20424
+ else if (status !== 200 && status !== 204) {
20425
+ return response.text().then((_responseText) => {
20426
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20427
+ });
20428
+ }
20429
+ return Promise.resolve(null);
20430
+ }
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));
20436
+ url_ = url_.replace(/[?&]$/, "");
20437
+ let options_ = {
20438
+ method: "POST",
20439
+ headers: {
20440
+ "Accept": "application/json"
20702
20441
  }
20703
- else {
20704
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
20705
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
20442
+ };
20443
+ return this.transformOptions(options_).then(transformedOptions_ => {
20444
+ return this.http.fetch(url_, transformedOptions_);
20445
+ }).then((_response) => {
20446
+ return this.processReset(_response);
20447
+ });
20448
+ }
20449
+ processReset(response) {
20450
+ const status = response.status;
20451
+ let _headers = {};
20452
+ if (response.headers && response.headers.forEach) {
20453
+ response.headers.forEach((v, k) => _headers[k] = v);
20454
+ }
20455
+ ;
20456
+ if (status === 200) {
20457
+ return response.text().then((_responseText) => {
20458
+ let result200 = null;
20459
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20460
+ return result200;
20461
+ });
20462
+ }
20463
+ else if (status !== 200 && status !== 204) {
20464
+ return response.text().then((_responseText) => {
20465
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20466
+ });
20467
+ }
20468
+ return Promise.resolve(null);
20469
+ }
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));
20475
+ url_ = url_.replace(/[?&]$/, "");
20476
+ const content_ = JSON.stringify(sequence);
20477
+ let options_ = {
20478
+ body: content_,
20479
+ method: "POST",
20480
+ headers: {
20481
+ "Content-Type": "application/json",
20482
+ "Accept": "application/json"
20706
20483
  }
20707
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
20484
+ };
20485
+ return this.transformOptions(options_).then(transformedOptions_ => {
20486
+ return this.http.fetch(url_, transformedOptions_);
20487
+ }).then((_response) => {
20488
+ return this.processSaveDraft(_response);
20489
+ });
20490
+ }
20491
+ processSaveDraft(response) {
20492
+ const status = response.status;
20493
+ let _headers = {};
20494
+ if (response.headers && response.headers.forEach) {
20495
+ response.headers.forEach((v, k) => _headers[k] = v);
20496
+ }
20497
+ ;
20498
+ if (status === 200) {
20499
+ return response.text().then((_responseText) => {
20500
+ let result200 = null;
20501
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20502
+ return result200;
20503
+ });
20708
20504
  }
20709
20505
  else if (status !== 200 && status !== 204) {
20710
20506
  return response.text().then((_responseText) => {
@@ -20713,46 +20509,157 @@ export class MesProductionOrderAttachmentClient extends AuthorizedApiBase {
20713
20509
  }
20714
20510
  return Promise.resolve(null);
20715
20511
  }
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));
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));
20724
20517
  url_ = url_.replace(/[?&]$/, "");
20725
20518
  let options_ = {
20726
20519
  method: "DELETE",
20727
20520
  headers: {
20728
- "Accept": "application/octet-stream"
20521
+ "Accept": "application/json"
20729
20522
  }
20730
20523
  };
20731
20524
  return this.transformOptions(options_).then(transformedOptions_ => {
20732
20525
  return this.http.fetch(url_, transformedOptions_);
20733
20526
  }).then((_response) => {
20734
- return this.processDeleteAttachment(_response);
20527
+ return this.processDiscardDraft(_response);
20735
20528
  });
20736
20529
  }
20737
- processDeleteAttachment(response) {
20530
+ processDiscardDraft(response) {
20738
20531
  const status = response.status;
20739
20532
  let _headers = {};
20740
20533
  if (response.headers && response.headers.forEach) {
20741
20534
  response.headers.forEach((v, k) => _headers[k] = v);
20742
20535
  }
20743
20536
  ;
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);
20537
+ if (status === 200) {
20538
+ return response.text().then((_responseText) => {
20539
+ let result200 = null;
20540
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20541
+ return result200;
20542
+ });
20543
+ }
20544
+ else if (status !== 200 && status !== 204) {
20545
+ return response.text().then((_responseText) => {
20546
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20547
+ });
20548
+ }
20549
+ return Promise.resolve(null);
20550
+ }
20551
+ getVersions(resourceGroupId) {
20552
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions";
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
+ url_ = url_.replace(/[?&]$/, "");
20557
+ let options_ = {
20558
+ method: "GET",
20559
+ headers: {
20560
+ "Accept": "application/json"
20750
20561
  }
20751
- else {
20752
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
20753
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
20562
+ };
20563
+ return this.transformOptions(options_).then(transformedOptions_ => {
20564
+ return this.http.fetch(url_, transformedOptions_);
20565
+ }).then((_response) => {
20566
+ return this.processGetVersions(_response);
20567
+ });
20568
+ }
20569
+ processGetVersions(response) {
20570
+ const status = response.status;
20571
+ let _headers = {};
20572
+ if (response.headers && response.headers.forEach) {
20573
+ response.headers.forEach((v, k) => _headers[k] = v);
20574
+ }
20575
+ ;
20576
+ if (status === 200) {
20577
+ return response.text().then((_responseText) => {
20578
+ let result200 = null;
20579
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20580
+ return result200;
20581
+ });
20582
+ }
20583
+ else if (status !== 200 && status !== 204) {
20584
+ return response.text().then((_responseText) => {
20585
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20586
+ });
20587
+ }
20588
+ return Promise.resolve(null);
20589
+ }
20590
+ getVersion(resourceGroupId, eventId) {
20591
+ let url_ = this.baseUrl + "/mes/planner/plan/{resourceGroupId}/versions/{eventId}";
20592
+ if (resourceGroupId === undefined || resourceGroupId === null)
20593
+ throw new globalThis.Error("The parameter 'resourceGroupId' must be defined.");
20594
+ url_ = url_.replace("{resourceGroupId}", encodeURIComponent("" + resourceGroupId));
20595
+ if (eventId === undefined || eventId === null)
20596
+ throw new globalThis.Error("The parameter 'eventId' must be defined.");
20597
+ url_ = url_.replace("{eventId}", encodeURIComponent("" + eventId));
20598
+ url_ = url_.replace(/[?&]$/, "");
20599
+ let options_ = {
20600
+ method: "GET",
20601
+ headers: {
20602
+ "Accept": "application/json"
20754
20603
  }
20755
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
20604
+ };
20605
+ return this.transformOptions(options_).then(transformedOptions_ => {
20606
+ return this.http.fetch(url_, transformedOptions_);
20607
+ }).then((_response) => {
20608
+ return this.processGetVersion(_response);
20609
+ });
20610
+ }
20611
+ processGetVersion(response) {
20612
+ const status = response.status;
20613
+ let _headers = {};
20614
+ if (response.headers && response.headers.forEach) {
20615
+ response.headers.forEach((v, k) => _headers[k] = v);
20616
+ }
20617
+ ;
20618
+ if (status === 200) {
20619
+ return response.text().then((_responseText) => {
20620
+ let result200 = null;
20621
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20622
+ return result200;
20623
+ });
20624
+ }
20625
+ else if (status !== 200 && status !== 204) {
20626
+ return response.text().then((_responseText) => {
20627
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
20628
+ });
20629
+ }
20630
+ return Promise.resolve(null);
20631
+ }
20632
+ setProgramStatus(command) {
20633
+ let url_ = this.baseUrl + "/mes/planner/operations/program-status";
20634
+ url_ = url_.replace(/[?&]$/, "");
20635
+ const content_ = JSON.stringify(command);
20636
+ let options_ = {
20637
+ body: content_,
20638
+ method: "PUT",
20639
+ headers: {
20640
+ "Content-Type": "application/json",
20641
+ "Accept": "application/json"
20642
+ }
20643
+ };
20644
+ return this.transformOptions(options_).then(transformedOptions_ => {
20645
+ return this.http.fetch(url_, transformedOptions_);
20646
+ }).then((_response) => {
20647
+ return this.processSetProgramStatus(_response);
20648
+ });
20649
+ }
20650
+ processSetProgramStatus(response) {
20651
+ const status = response.status;
20652
+ let _headers = {};
20653
+ if (response.headers && response.headers.forEach) {
20654
+ response.headers.forEach((v, k) => _headers[k] = v);
20655
+ }
20656
+ ;
20657
+ if (status === 200) {
20658
+ return response.text().then((_responseText) => {
20659
+ let result200 = null;
20660
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
20661
+ return result200;
20662
+ });
20756
20663
  }
20757
20664
  else if (status !== 200 && status !== 204) {
20758
20665
  return response.text().then((_responseText) => {
@@ -23211,204 +23118,6 @@ export class InspectMatchSpecificationsClient extends AuthorizedApiBase {
23211
23118
  return Promise.resolve(null);
23212
23119
  }
23213
23120
  }
23214
- export class InspectSchemaCreatorClient extends AuthorizedApiBase {
23215
- constructor(configuration, baseUrl, http) {
23216
- super(configuration);
23217
- this.http = http ? http : window;
23218
- this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
23219
- }
23220
- getSchemaCreatorState(id) {
23221
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
23222
- if (id === undefined || id === null)
23223
- throw new globalThis.Error("The parameter 'id' must be defined.");
23224
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
23225
- url_ = url_.replace(/[?&]$/, "");
23226
- let options_ = {
23227
- method: "GET",
23228
- headers: {
23229
- "Accept": "application/json"
23230
- }
23231
- };
23232
- return this.transformOptions(options_).then(transformedOptions_ => {
23233
- return this.http.fetch(url_, transformedOptions_);
23234
- }).then((_response) => {
23235
- return this.processGetSchemaCreatorState(_response);
23236
- });
23237
- }
23238
- processGetSchemaCreatorState(response) {
23239
- const status = response.status;
23240
- let _headers = {};
23241
- if (response.headers && response.headers.forEach) {
23242
- response.headers.forEach((v, k) => _headers[k] = v);
23243
- }
23244
- ;
23245
- if (status === 200) {
23246
- return response.text().then((_responseText) => {
23247
- let result200 = null;
23248
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
23249
- return result200;
23250
- });
23251
- }
23252
- else if (status !== 200 && status !== 204) {
23253
- return response.text().then((_responseText) => {
23254
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
23255
- });
23256
- }
23257
- return Promise.resolve(null);
23258
- }
23259
- /**
23260
- * Creates the initial creator state for a schema version. Returns 409 if
23261
- state already exists; the caller should re-fetch it instead of writing.
23262
- */
23263
- createSchemaCreatorState(id, state) {
23264
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
23265
- if (id === undefined || id === null)
23266
- throw new globalThis.Error("The parameter 'id' must be defined.");
23267
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
23268
- url_ = url_.replace(/[?&]$/, "");
23269
- const content_ = JSON.stringify(state);
23270
- let options_ = {
23271
- body: content_,
23272
- method: "POST",
23273
- headers: {
23274
- "Content-Type": "application/json",
23275
- "Accept": "application/json"
23276
- }
23277
- };
23278
- return this.transformOptions(options_).then(transformedOptions_ => {
23279
- return this.http.fetch(url_, transformedOptions_);
23280
- }).then((_response) => {
23281
- return this.processCreateSchemaCreatorState(_response);
23282
- });
23283
- }
23284
- processCreateSchemaCreatorState(response) {
23285
- const status = response.status;
23286
- let _headers = {};
23287
- if (response.headers && response.headers.forEach) {
23288
- response.headers.forEach((v, k) => _headers[k] = v);
23289
- }
23290
- ;
23291
- if (status === 201) {
23292
- return response.text().then((_responseText) => {
23293
- let result201 = null;
23294
- result201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
23295
- return result201;
23296
- });
23297
- }
23298
- else if (status === 409) {
23299
- return response.text().then((_responseText) => {
23300
- let result409 = null;
23301
- result409 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
23302
- return throwException("A server side error occurred.", status, _responseText, _headers, result409);
23303
- });
23304
- }
23305
- else if (status !== 200 && status !== 204) {
23306
- return response.text().then((_responseText) => {
23307
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
23308
- });
23309
- }
23310
- return Promise.resolve(null);
23311
- }
23312
- updateSchemaCreatorState(id, state) {
23313
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate";
23314
- if (id === undefined || id === null)
23315
- throw new globalThis.Error("The parameter 'id' must be defined.");
23316
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
23317
- url_ = url_.replace(/[?&]$/, "");
23318
- const content_ = JSON.stringify(state);
23319
- let options_ = {
23320
- body: content_,
23321
- method: "PUT",
23322
- headers: {
23323
- "Content-Type": "application/json",
23324
- "Accept": "application/json"
23325
- }
23326
- };
23327
- return this.transformOptions(options_).then(transformedOptions_ => {
23328
- return this.http.fetch(url_, transformedOptions_);
23329
- }).then((_response) => {
23330
- return this.processUpdateSchemaCreatorState(_response);
23331
- });
23332
- }
23333
- processUpdateSchemaCreatorState(response) {
23334
- const status = response.status;
23335
- let _headers = {};
23336
- if (response.headers && response.headers.forEach) {
23337
- response.headers.forEach((v, k) => _headers[k] = v);
23338
- }
23339
- ;
23340
- if (status === 200) {
23341
- return response.text().then((_responseText) => {
23342
- let result200 = null;
23343
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
23344
- return result200;
23345
- });
23346
- }
23347
- else if (status !== 200 && status !== 204) {
23348
- return response.text().then((_responseText) => {
23349
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
23350
- });
23351
- }
23352
- return Promise.resolve(null);
23353
- }
23354
- /**
23355
- * Starts an async snip resolve; the result is delivered through the
23356
- SchemaCreatorSnipResolved SignalR notification.
23357
- * @param image (optional)
23358
- */
23359
- resolveSchemaCreatorSnip(id, elementId, image) {
23360
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/creatorstate/elements/{elementId}/resolvesnip";
23361
- if (id === undefined || id === null)
23362
- throw new globalThis.Error("The parameter 'id' must be defined.");
23363
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
23364
- if (elementId === undefined || elementId === null)
23365
- throw new globalThis.Error("The parameter 'elementId' must be defined.");
23366
- url_ = url_.replace("{elementId}", encodeURIComponent("" + elementId));
23367
- url_ = url_.replace(/[?&]$/, "");
23368
- const content_ = new FormData();
23369
- if (image !== null && image !== undefined)
23370
- content_.append("image", image.data, image.fileName ? image.fileName : "image");
23371
- let options_ = {
23372
- body: content_,
23373
- method: "POST",
23374
- headers: {
23375
- "Accept": "application/octet-stream"
23376
- }
23377
- };
23378
- return this.transformOptions(options_).then(transformedOptions_ => {
23379
- return this.http.fetch(url_, transformedOptions_);
23380
- }).then((_response) => {
23381
- return this.processResolveSchemaCreatorSnip(_response);
23382
- });
23383
- }
23384
- processResolveSchemaCreatorSnip(response) {
23385
- const status = response.status;
23386
- let _headers = {};
23387
- if (response.headers && response.headers.forEach) {
23388
- response.headers.forEach((v, k) => _headers[k] = v);
23389
- }
23390
- ;
23391
- if (status === 200 || status === 206) {
23392
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
23393
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
23394
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
23395
- if (fileName) {
23396
- fileName = decodeURIComponent(fileName);
23397
- }
23398
- else {
23399
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
23400
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
23401
- }
23402
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
23403
- }
23404
- else if (status !== 200 && status !== 204) {
23405
- return response.text().then((_responseText) => {
23406
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
23407
- });
23408
- }
23409
- return Promise.resolve(null);
23410
- }
23411
- }
23412
23121
  export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
23413
23122
  constructor(configuration, baseUrl, http) {
23414
23123
  super(configuration);