@ignos/api-client 20261110.359.1-alpha → 20261110.360.1

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.
@@ -1354,8 +1354,9 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1354
1354
  * @param favorites (optional)
1355
1355
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1356
1356
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1357
+ * @param assetExternalId (optional)
1357
1358
  */
1358
- getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1359
+ getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
1359
1360
  let url_ = this.baseUrl + "/machineutilization?";
1360
1361
  if (assetId !== undefined && assetId !== null)
1361
1362
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
@@ -1367,6 +1368,8 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1367
1368
  url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
1368
1369
  if (utcOffset !== undefined && utcOffset !== null)
1369
1370
  url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
1371
+ if (assetExternalId !== undefined && assetExternalId !== null)
1372
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1370
1373
  url_ = url_.replace(/[?&]$/, "");
1371
1374
  let options_ = {
1372
1375
  method: "GET",
@@ -1814,8 +1817,9 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1814
1817
  * @param favorites (optional)
1815
1818
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1816
1819
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1820
+ * @param assetExternalId (optional)
1817
1821
  */
1818
- getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1822
+ getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
1819
1823
  let url_ = this.baseUrl + "/resourceutilization?";
1820
1824
  if (assetId !== undefined && assetId !== null)
1821
1825
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
@@ -1827,6 +1831,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1827
1831
  url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
1828
1832
  if (utcOffset !== undefined && utcOffset !== null)
1829
1833
  url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
1834
+ if (assetExternalId !== undefined && assetExternalId !== null)
1835
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1830
1836
  url_ = url_.replace(/[?&]$/, "");
1831
1837
  let options_ = {
1832
1838
  method: "GET",
@@ -2818,6 +2824,78 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
2818
2824
  }
2819
2825
  return Promise.resolve(null);
2820
2826
  }
2827
+ getFavoriteRoutesUserSettings() {
2828
+ let url_ = this.baseUrl + "/userappsettings/favorite-routes";
2829
+ url_ = url_.replace(/[?&]$/, "");
2830
+ let options_ = {
2831
+ method: "GET",
2832
+ headers: {
2833
+ "Accept": "application/json"
2834
+ }
2835
+ };
2836
+ return this.transformOptions(options_).then(transformedOptions_ => {
2837
+ return this.http.fetch(url_, transformedOptions_);
2838
+ }).then((_response) => {
2839
+ return this.processGetFavoriteRoutesUserSettings(_response);
2840
+ });
2841
+ }
2842
+ processGetFavoriteRoutesUserSettings(response) {
2843
+ const status = response.status;
2844
+ let _headers = {};
2845
+ if (response.headers && response.headers.forEach) {
2846
+ response.headers.forEach((v, k) => _headers[k] = v);
2847
+ }
2848
+ ;
2849
+ if (status === 200) {
2850
+ return response.text().then((_responseText) => {
2851
+ let result200 = null;
2852
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
2853
+ return result200;
2854
+ });
2855
+ }
2856
+ else if (status !== 200 && status !== 204) {
2857
+ return response.text().then((_responseText) => {
2858
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2859
+ });
2860
+ }
2861
+ return Promise.resolve(null);
2862
+ }
2863
+ setFavoriteRoutesUserSettings(settings) {
2864
+ let url_ = this.baseUrl + "/userappsettings/favorite-routes";
2865
+ url_ = url_.replace(/[?&]$/, "");
2866
+ const content_ = JSON.stringify(settings);
2867
+ let options_ = {
2868
+ body: content_,
2869
+ method: "PUT",
2870
+ headers: {
2871
+ "Content-Type": "application/json",
2872
+ }
2873
+ };
2874
+ return this.transformOptions(options_).then(transformedOptions_ => {
2875
+ return this.http.fetch(url_, transformedOptions_);
2876
+ }).then((_response) => {
2877
+ return this.processSetFavoriteRoutesUserSettings(_response);
2878
+ });
2879
+ }
2880
+ processSetFavoriteRoutesUserSettings(response) {
2881
+ const status = response.status;
2882
+ let _headers = {};
2883
+ if (response.headers && response.headers.forEach) {
2884
+ response.headers.forEach((v, k) => _headers[k] = v);
2885
+ }
2886
+ ;
2887
+ if (status === 204) {
2888
+ return response.text().then((_responseText) => {
2889
+ return;
2890
+ });
2891
+ }
2892
+ else if (status !== 200 && status !== 204) {
2893
+ return response.text().then((_responseText) => {
2894
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
2895
+ });
2896
+ }
2897
+ return Promise.resolve(null);
2898
+ }
2821
2899
  }
2822
2900
  export class UploadClient extends AuthorizedApiBase {
2823
2901
  http;
@@ -2911,10 +2989,12 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
2911
2989
  this.http = http ? http : window;
2912
2990
  this.baseUrl = baseUrl ?? "";
2913
2991
  }
2914
- getMachineDataHealth(assetId) {
2992
+ getMachineDataHealth(assetId, assetExternalId) {
2915
2993
  let url_ = this.baseUrl + "/systemhealthdashboard?";
2916
2994
  if (assetId !== undefined && assetId !== null)
2917
2995
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
2996
+ if (assetExternalId !== undefined && assetExternalId !== null)
2997
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
2918
2998
  url_ = url_.replace(/[?&]$/, "");
2919
2999
  let options_ = {
2920
3000
  method: "GET",
@@ -5315,10 +5395,12 @@ export class ResourcesClient extends AuthorizedApiBase {
5315
5395
  }
5316
5396
  return Promise.resolve(null);
5317
5397
  }
5318
- listCurrentMachineStates(assetId) {
5398
+ listCurrentMachineStates(assetId, assetExternalId) {
5319
5399
  let url_ = this.baseUrl + "/resources/states/now?";
5320
5400
  if (assetId !== undefined && assetId !== null)
5321
5401
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5402
+ if (assetExternalId !== undefined && assetExternalId !== null)
5403
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5322
5404
  url_ = url_.replace(/[?&]$/, "");
5323
5405
  let options_ = {
5324
5406
  method: "GET",
@@ -6440,188 +6522,6 @@ export class PulseJournalClient extends AuthorizedApiBase {
6440
6522
  }
6441
6523
  return Promise.resolve(null);
6442
6524
  }
6443
- setNowLinePinned(resourceId, lineId, request) {
6444
- let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/pin";
6445
- if (resourceId === undefined || resourceId === null)
6446
- throw new globalThis.Error("The parameter 'resourceId' must be defined.");
6447
- url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
6448
- if (lineId === undefined || lineId === null)
6449
- throw new globalThis.Error("The parameter 'lineId' must be defined.");
6450
- url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
6451
- url_ = url_.replace(/[?&]$/, "");
6452
- const content_ = JSON.stringify(request);
6453
- let options_ = {
6454
- body: content_,
6455
- method: "POST",
6456
- headers: {
6457
- "Content-Type": "application/json",
6458
- "Accept": "application/json"
6459
- }
6460
- };
6461
- return this.transformOptions(options_).then(transformedOptions_ => {
6462
- return this.http.fetch(url_, transformedOptions_);
6463
- }).then((_response) => {
6464
- return this.processSetNowLinePinned(_response);
6465
- });
6466
- }
6467
- processSetNowLinePinned(response) {
6468
- const status = response.status;
6469
- let _headers = {};
6470
- if (response.headers && response.headers.forEach) {
6471
- response.headers.forEach((v, k) => _headers[k] = v);
6472
- }
6473
- ;
6474
- if (status === 200) {
6475
- return response.text().then((_responseText) => {
6476
- let result200 = null;
6477
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6478
- return result200;
6479
- });
6480
- }
6481
- else if (status !== 200 && status !== 204) {
6482
- return response.text().then((_responseText) => {
6483
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6484
- });
6485
- }
6486
- return Promise.resolve(null);
6487
- }
6488
- setNowLineImportant(resourceId, lineId, request) {
6489
- let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/important";
6490
- if (resourceId === undefined || resourceId === null)
6491
- throw new globalThis.Error("The parameter 'resourceId' must be defined.");
6492
- url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
6493
- if (lineId === undefined || lineId === null)
6494
- throw new globalThis.Error("The parameter 'lineId' must be defined.");
6495
- url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
6496
- url_ = url_.replace(/[?&]$/, "");
6497
- const content_ = JSON.stringify(request);
6498
- let options_ = {
6499
- body: content_,
6500
- method: "POST",
6501
- headers: {
6502
- "Content-Type": "application/json",
6503
- "Accept": "application/json"
6504
- }
6505
- };
6506
- return this.transformOptions(options_).then(transformedOptions_ => {
6507
- return this.http.fetch(url_, transformedOptions_);
6508
- }).then((_response) => {
6509
- return this.processSetNowLineImportant(_response);
6510
- });
6511
- }
6512
- processSetNowLineImportant(response) {
6513
- const status = response.status;
6514
- let _headers = {};
6515
- if (response.headers && response.headers.forEach) {
6516
- response.headers.forEach((v, k) => _headers[k] = v);
6517
- }
6518
- ;
6519
- if (status === 200) {
6520
- return response.text().then((_responseText) => {
6521
- let result200 = null;
6522
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6523
- return result200;
6524
- });
6525
- }
6526
- else if (status !== 200 && status !== 204) {
6527
- return response.text().then((_responseText) => {
6528
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6529
- });
6530
- }
6531
- return Promise.resolve(null);
6532
- }
6533
- addNowAttachment(resourceId, lineId, request) {
6534
- let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/attachments";
6535
- if (resourceId === undefined || resourceId === null)
6536
- throw new globalThis.Error("The parameter 'resourceId' must be defined.");
6537
- url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
6538
- if (lineId === undefined || lineId === null)
6539
- throw new globalThis.Error("The parameter 'lineId' must be defined.");
6540
- url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
6541
- url_ = url_.replace(/[?&]$/, "");
6542
- const content_ = JSON.stringify(request);
6543
- let options_ = {
6544
- body: content_,
6545
- method: "POST",
6546
- headers: {
6547
- "Content-Type": "application/json",
6548
- "Accept": "application/json"
6549
- }
6550
- };
6551
- return this.transformOptions(options_).then(transformedOptions_ => {
6552
- return this.http.fetch(url_, transformedOptions_);
6553
- }).then((_response) => {
6554
- return this.processAddNowAttachment(_response);
6555
- });
6556
- }
6557
- processAddNowAttachment(response) {
6558
- const status = response.status;
6559
- let _headers = {};
6560
- if (response.headers && response.headers.forEach) {
6561
- response.headers.forEach((v, k) => _headers[k] = v);
6562
- }
6563
- ;
6564
- if (status === 200) {
6565
- return response.text().then((_responseText) => {
6566
- let result200 = null;
6567
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6568
- return result200;
6569
- });
6570
- }
6571
- else if (status !== 200 && status !== 204) {
6572
- return response.text().then((_responseText) => {
6573
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6574
- });
6575
- }
6576
- return Promise.resolve(null);
6577
- }
6578
- removeNowAttachment(resourceId, lineId, attachmentId, eTag) {
6579
- let url_ = this.baseUrl + "/pulsejournal/{resourceId}/now/lines/{lineId}/attachments/{attachmentId}?";
6580
- if (resourceId === undefined || resourceId === null)
6581
- throw new globalThis.Error("The parameter 'resourceId' must be defined.");
6582
- url_ = url_.replace("{resourceId}", encodeURIComponent("" + resourceId));
6583
- if (lineId === undefined || lineId === null)
6584
- throw new globalThis.Error("The parameter 'lineId' must be defined.");
6585
- url_ = url_.replace("{lineId}", encodeURIComponent("" + lineId));
6586
- if (attachmentId === undefined || attachmentId === null)
6587
- throw new globalThis.Error("The parameter 'attachmentId' must be defined.");
6588
- url_ = url_.replace("{attachmentId}", encodeURIComponent("" + attachmentId));
6589
- if (eTag !== undefined && eTag !== null)
6590
- url_ += "eTag=" + encodeURIComponent("" + eTag) + "&";
6591
- url_ = url_.replace(/[?&]$/, "");
6592
- let options_ = {
6593
- method: "DELETE",
6594
- headers: {
6595
- "Accept": "application/json"
6596
- }
6597
- };
6598
- return this.transformOptions(options_).then(transformedOptions_ => {
6599
- return this.http.fetch(url_, transformedOptions_);
6600
- }).then((_response) => {
6601
- return this.processRemoveNowAttachment(_response);
6602
- });
6603
- }
6604
- processRemoveNowAttachment(response) {
6605
- const status = response.status;
6606
- let _headers = {};
6607
- if (response.headers && response.headers.forEach) {
6608
- response.headers.forEach((v, k) => _headers[k] = v);
6609
- }
6610
- ;
6611
- if (status === 200) {
6612
- return response.text().then((_responseText) => {
6613
- let result200 = null;
6614
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6615
- return result200;
6616
- });
6617
- }
6618
- else if (status !== 200 && status !== 204) {
6619
- return response.text().then((_responseText) => {
6620
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6621
- });
6622
- }
6623
- return Promise.resolve(null);
6624
- }
6625
6525
  createAlwaysLine(resourceId, request) {
6626
6526
  let url_ = this.baseUrl + "/pulsejournal/{resourceId}/always/lines";
6627
6527
  if (resourceId === undefined || resourceId === null)
@@ -12200,10 +12100,12 @@ export class MachinesClient extends AuthorizedApiBase {
12200
12100
  }
12201
12101
  return Promise.resolve(null);
12202
12102
  }
12203
- listCurrentMachineStates(assetId) {
12103
+ listCurrentMachineStates(assetId, assetExternalId) {
12204
12104
  let url_ = this.baseUrl + "/machines/states/now?";
12205
12105
  if (assetId !== undefined && assetId !== null)
12206
12106
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
12107
+ if (assetExternalId !== undefined && assetExternalId !== null)
12108
+ url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
12207
12109
  url_ = url_.replace(/[?&]$/, "");
12208
12110
  let options_ = {
12209
12111
  method: "GET",
@@ -26328,6 +26230,44 @@ export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
26328
26230
  }
26329
26231
  return Promise.resolve(null);
26330
26232
  }
26233
+ deleteMeasurementFormSchemaFile(id, slot) {
26234
+ let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files/{slot}";
26235
+ if (id === undefined || id === null)
26236
+ throw new globalThis.Error("The parameter 'id' must be defined.");
26237
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
26238
+ if (slot === undefined || slot === null)
26239
+ throw new globalThis.Error("The parameter 'slot' must be defined.");
26240
+ url_ = url_.replace("{slot}", encodeURIComponent("" + slot));
26241
+ url_ = url_.replace(/[?&]$/, "");
26242
+ let options_ = {
26243
+ method: "DELETE",
26244
+ headers: {}
26245
+ };
26246
+ return this.transformOptions(options_).then(transformedOptions_ => {
26247
+ return this.http.fetch(url_, transformedOptions_);
26248
+ }).then((_response) => {
26249
+ return this.processDeleteMeasurementFormSchemaFile(_response);
26250
+ });
26251
+ }
26252
+ processDeleteMeasurementFormSchemaFile(response) {
26253
+ const status = response.status;
26254
+ let _headers = {};
26255
+ if (response.headers && response.headers.forEach) {
26256
+ response.headers.forEach((v, k) => _headers[k] = v);
26257
+ }
26258
+ ;
26259
+ if (status === 204) {
26260
+ return response.text().then((_responseText) => {
26261
+ return;
26262
+ });
26263
+ }
26264
+ else if (status !== 200 && status !== 204) {
26265
+ return response.text().then((_responseText) => {
26266
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
26267
+ });
26268
+ }
26269
+ return Promise.resolve(null);
26270
+ }
26331
26271
  getMeasurementFormImportStatus(id) {
26332
26272
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/importstatus";
26333
26273
  if (id === undefined || id === null)
@@ -28064,6 +28004,45 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
28064
28004
  }
28065
28005
  return Promise.resolve(null);
28066
28006
  }
28007
+ listMeasurementFormSchemaFiles(id) {
28008
+ let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files";
28009
+ if (id === undefined || id === null)
28010
+ throw new globalThis.Error("The parameter 'id' must be defined.");
28011
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
28012
+ url_ = url_.replace(/[?&]$/, "");
28013
+ let options_ = {
28014
+ method: "GET",
28015
+ headers: {
28016
+ "Accept": "application/json"
28017
+ }
28018
+ };
28019
+ return this.transformOptions(options_).then(transformedOptions_ => {
28020
+ return this.http.fetch(url_, transformedOptions_);
28021
+ }).then((_response) => {
28022
+ return this.processListMeasurementFormSchemaFiles(_response);
28023
+ });
28024
+ }
28025
+ processListMeasurementFormSchemaFiles(response) {
28026
+ const status = response.status;
28027
+ let _headers = {};
28028
+ if (response.headers && response.headers.forEach) {
28029
+ response.headers.forEach((v, k) => _headers[k] = v);
28030
+ }
28031
+ ;
28032
+ if (status === 200) {
28033
+ return response.text().then((_responseText) => {
28034
+ let result200 = null;
28035
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
28036
+ return result200;
28037
+ });
28038
+ }
28039
+ else if (status !== 200 && status !== 204) {
28040
+ return response.text().then((_responseText) => {
28041
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
28042
+ });
28043
+ }
28044
+ return Promise.resolve(null);
28045
+ }
28067
28046
  listMeasurementFormSchemaVersions(id) {
28068
28047
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
28069
28048
  if (id === undefined || id === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261110.359.1-alpha",
3
+ "version": "20261110.360.1",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",