@ignos/api-client 20261110.358.1 → 20261110.359.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.
@@ -1354,9 +1354,8 @@ 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)
1358
1357
  */
1359
- getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
1358
+ getMachineUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1360
1359
  let url_ = this.baseUrl + "/machineutilization?";
1361
1360
  if (assetId !== undefined && assetId !== null)
1362
1361
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
@@ -1368,8 +1367,6 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
1368
1367
  url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
1369
1368
  if (utcOffset !== undefined && utcOffset !== null)
1370
1369
  url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
1371
- if (assetExternalId !== undefined && assetExternalId !== null)
1372
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1373
1370
  url_ = url_.replace(/[?&]$/, "");
1374
1371
  let options_ = {
1375
1372
  method: "GET",
@@ -1817,9 +1814,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1817
1814
  * @param favorites (optional)
1818
1815
  * @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
1819
1816
  * @param utcOffset (optional) Explicit UTC offset for start of today's utilization
1820
- * @param assetExternalId (optional)
1821
1817
  */
1822
- getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset, assetExternalId) {
1818
+ getResourceUtilizations(assetId, favorites, startTimeToday, utcOffset) {
1823
1819
  let url_ = this.baseUrl + "/resourceutilization?";
1824
1820
  if (assetId !== undefined && assetId !== null)
1825
1821
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
@@ -1831,8 +1827,6 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
1831
1827
  url_ += "startTimeToday=" + encodeURIComponent(startTimeToday ? "" + startTimeToday.toISOString() : "") + "&";
1832
1828
  if (utcOffset !== undefined && utcOffset !== null)
1833
1829
  url_ += "utcOffset=" + encodeURIComponent("" + utcOffset) + "&";
1834
- if (assetExternalId !== undefined && assetExternalId !== null)
1835
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
1836
1830
  url_ = url_.replace(/[?&]$/, "");
1837
1831
  let options_ = {
1838
1832
  method: "GET",
@@ -2917,12 +2911,10 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
2917
2911
  this.http = http ? http : window;
2918
2912
  this.baseUrl = baseUrl ?? "";
2919
2913
  }
2920
- getMachineDataHealth(assetId, assetExternalId) {
2914
+ getMachineDataHealth(assetId) {
2921
2915
  let url_ = this.baseUrl + "/systemhealthdashboard?";
2922
2916
  if (assetId !== undefined && assetId !== null)
2923
2917
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
2924
- if (assetExternalId !== undefined && assetExternalId !== null)
2925
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
2926
2918
  url_ = url_.replace(/[?&]$/, "");
2927
2919
  let options_ = {
2928
2920
  method: "GET",
@@ -5323,12 +5315,10 @@ export class ResourcesClient extends AuthorizedApiBase {
5323
5315
  }
5324
5316
  return Promise.resolve(null);
5325
5317
  }
5326
- listCurrentMachineStates(assetId, assetExternalId) {
5318
+ listCurrentMachineStates(assetId) {
5327
5319
  let url_ = this.baseUrl + "/resources/states/now?";
5328
5320
  if (assetId !== undefined && assetId !== null)
5329
5321
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
5330
- if (assetExternalId !== undefined && assetExternalId !== null)
5331
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
5332
5322
  url_ = url_.replace(/[?&]$/, "");
5333
5323
  let options_ = {
5334
5324
  method: "GET",
@@ -6450,6 +6440,188 @@ export class PulseJournalClient extends AuthorizedApiBase {
6450
6440
  }
6451
6441
  return Promise.resolve(null);
6452
6442
  }
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
+ }
6453
6625
  createAlwaysLine(resourceId, request) {
6454
6626
  let url_ = this.baseUrl + "/pulsejournal/{resourceId}/always/lines";
6455
6627
  if (resourceId === undefined || resourceId === null)
@@ -12028,12 +12200,10 @@ export class MachinesClient extends AuthorizedApiBase {
12028
12200
  }
12029
12201
  return Promise.resolve(null);
12030
12202
  }
12031
- listCurrentMachineStates(assetId, assetExternalId) {
12203
+ listCurrentMachineStates(assetId) {
12032
12204
  let url_ = this.baseUrl + "/machines/states/now?";
12033
12205
  if (assetId !== undefined && assetId !== null)
12034
12206
  url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
12035
- if (assetExternalId !== undefined && assetExternalId !== null)
12036
- url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
12037
12207
  url_ = url_.replace(/[?&]$/, "");
12038
12208
  let options_ = {
12039
12209
  method: "GET",
@@ -26158,44 +26328,6 @@ export class MeasurementFormSchemasAdminClient extends AuthorizedApiBase {
26158
26328
  }
26159
26329
  return Promise.resolve(null);
26160
26330
  }
26161
- deleteMeasurementFormSchemaFile(id, slot) {
26162
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files/{slot}";
26163
- if (id === undefined || id === null)
26164
- throw new globalThis.Error("The parameter 'id' must be defined.");
26165
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
26166
- if (slot === undefined || slot === null)
26167
- throw new globalThis.Error("The parameter 'slot' must be defined.");
26168
- url_ = url_.replace("{slot}", encodeURIComponent("" + slot));
26169
- url_ = url_.replace(/[?&]$/, "");
26170
- let options_ = {
26171
- method: "DELETE",
26172
- headers: {}
26173
- };
26174
- return this.transformOptions(options_).then(transformedOptions_ => {
26175
- return this.http.fetch(url_, transformedOptions_);
26176
- }).then((_response) => {
26177
- return this.processDeleteMeasurementFormSchemaFile(_response);
26178
- });
26179
- }
26180
- processDeleteMeasurementFormSchemaFile(response) {
26181
- const status = response.status;
26182
- let _headers = {};
26183
- if (response.headers && response.headers.forEach) {
26184
- response.headers.forEach((v, k) => _headers[k] = v);
26185
- }
26186
- ;
26187
- if (status === 204) {
26188
- return response.text().then((_responseText) => {
26189
- return;
26190
- });
26191
- }
26192
- else if (status !== 200 && status !== 204) {
26193
- return response.text().then((_responseText) => {
26194
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
26195
- });
26196
- }
26197
- return Promise.resolve(null);
26198
- }
26199
26331
  getMeasurementFormImportStatus(id) {
26200
26332
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/importstatus";
26201
26333
  if (id === undefined || id === null)
@@ -27932,45 +28064,6 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
27932
28064
  }
27933
28065
  return Promise.resolve(null);
27934
28066
  }
27935
- listMeasurementFormSchemaFiles(id) {
27936
- let url_ = this.baseUrl + "/measurementforms/schemas/{id}/files";
27937
- if (id === undefined || id === null)
27938
- throw new globalThis.Error("The parameter 'id' must be defined.");
27939
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
27940
- url_ = url_.replace(/[?&]$/, "");
27941
- let options_ = {
27942
- method: "GET",
27943
- headers: {
27944
- "Accept": "application/json"
27945
- }
27946
- };
27947
- return this.transformOptions(options_).then(transformedOptions_ => {
27948
- return this.http.fetch(url_, transformedOptions_);
27949
- }).then((_response) => {
27950
- return this.processListMeasurementFormSchemaFiles(_response);
27951
- });
27952
- }
27953
- processListMeasurementFormSchemaFiles(response) {
27954
- const status = response.status;
27955
- let _headers = {};
27956
- if (response.headers && response.headers.forEach) {
27957
- response.headers.forEach((v, k) => _headers[k] = v);
27958
- }
27959
- ;
27960
- if (status === 200) {
27961
- return response.text().then((_responseText) => {
27962
- let result200 = null;
27963
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
27964
- return result200;
27965
- });
27966
- }
27967
- else if (status !== 200 && status !== 204) {
27968
- return response.text().then((_responseText) => {
27969
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
27970
- });
27971
- }
27972
- return Promise.resolve(null);
27973
- }
27974
28067
  listMeasurementFormSchemaVersions(id) {
27975
28068
  let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
27976
28069
  if (id === undefined || id === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20261110.358.1",
3
+ "version": "20261110.359.1-alpha",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",