@ignos/api-client 20261105.348.1-alpha → 20261106.349.1-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ignosportal-api.d.ts +150 -332
- package/lib/ignosportal-api.js +47 -344
- package/package.json +1 -1
- package/src/ignosportal-api.ts +186 -659
package/lib/ignosportal-api.js
CHANGED
|
@@ -1350,15 +1350,15 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
|
|
|
1350
1350
|
time zone. The current utilization is calculated starting from the start of the current date offset from UTC
|
|
1351
1351
|
by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
|
|
1352
1352
|
client and server
|
|
1353
|
-
* @param
|
|
1353
|
+
* @param assetExternalId (optional)
|
|
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
1357
|
*/
|
|
1358
|
-
getMachineUtilizations(
|
|
1358
|
+
getMachineUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
|
|
1359
1359
|
let url_ = this.baseUrl + "/machineutilization?";
|
|
1360
|
-
if (
|
|
1361
|
-
url_ += "
|
|
1360
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
1361
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
1362
1362
|
if (favorites === null)
|
|
1363
1363
|
throw new globalThis.Error("The parameter 'favorites' cannot be null.");
|
|
1364
1364
|
else if (favorites !== undefined)
|
|
@@ -1665,10 +1665,8 @@ export class MachineUtilizationClient extends AuthorizedApiBase {
|
|
|
1665
1665
|
}
|
|
1666
1666
|
return Promise.resolve(null);
|
|
1667
1667
|
}
|
|
1668
|
-
listPowerOnUtilizationDatapoints(
|
|
1668
|
+
listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
|
|
1669
1669
|
let url_ = this.baseUrl + "/machineutilization/power-on/datapoints?";
|
|
1670
|
-
if (id !== undefined && id !== null)
|
|
1671
|
-
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
1672
1670
|
if (externalId !== undefined && externalId !== null)
|
|
1673
1671
|
url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
|
|
1674
1672
|
if (nDays !== undefined && nDays !== null)
|
|
@@ -1810,15 +1808,15 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
1810
1808
|
time zone. The current utilization is calculated starting from the start of the current date offset from UTC
|
|
1811
1809
|
by the offset used. Pass in utcOffset to avoid problems relating to clock drift between
|
|
1812
1810
|
client and server
|
|
1813
|
-
* @param
|
|
1811
|
+
* @param assetExternalId (optional)
|
|
1814
1812
|
* @param favorites (optional)
|
|
1815
1813
|
* @param startTimeToday (optional) UTC offset for start of today's utilization is extracted from this value
|
|
1816
1814
|
* @param utcOffset (optional) Explicit UTC offset for start of today's utilization
|
|
1817
1815
|
*/
|
|
1818
|
-
getResourceUtilizations(
|
|
1816
|
+
getResourceUtilizations(assetExternalId, favorites, startTimeToday, utcOffset) {
|
|
1819
1817
|
let url_ = this.baseUrl + "/resourceutilization?";
|
|
1820
|
-
if (
|
|
1821
|
-
url_ += "
|
|
1818
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
1819
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
1822
1820
|
if (favorites === null)
|
|
1823
1821
|
throw new globalThis.Error("The parameter 'favorites' cannot be null.");
|
|
1824
1822
|
else if (favorites !== undefined)
|
|
@@ -2077,10 +2075,8 @@ export class ResourceUtilizationClient extends AuthorizedApiBase {
|
|
|
2077
2075
|
}
|
|
2078
2076
|
return Promise.resolve(null);
|
|
2079
2077
|
}
|
|
2080
|
-
listPowerOnUtilizationDatapoints(
|
|
2078
|
+
listPowerOnUtilizationDatapoints(externalId, nDays, startTime, endTime) {
|
|
2081
2079
|
let url_ = this.baseUrl + "/resourceutilization/power-on/datapoints?";
|
|
2082
|
-
if (id !== undefined && id !== null)
|
|
2083
|
-
url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
2084
2080
|
if (externalId !== undefined && externalId !== null)
|
|
2085
2081
|
url_ += "externalId=" + encodeURIComponent("" + externalId) + "&";
|
|
2086
2082
|
if (nDays !== undefined && nDays !== null)
|
|
@@ -2911,10 +2907,10 @@ export class SystemHealthDashboardClient extends AuthorizedApiBase {
|
|
|
2911
2907
|
this.http = http ? http : window;
|
|
2912
2908
|
this.baseUrl = baseUrl ?? "";
|
|
2913
2909
|
}
|
|
2914
|
-
getMachineDataHealth(
|
|
2910
|
+
getMachineDataHealth(assetExternalId) {
|
|
2915
2911
|
let url_ = this.baseUrl + "/systemhealthdashboard?";
|
|
2916
|
-
if (
|
|
2917
|
-
url_ += "
|
|
2912
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
2913
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
2918
2914
|
url_ = url_.replace(/[?&]$/, "");
|
|
2919
2915
|
let options_ = {
|
|
2920
2916
|
method: "GET",
|
|
@@ -5073,10 +5069,8 @@ export class KpiResourceClient extends AuthorizedApiBase {
|
|
|
5073
5069
|
}
|
|
5074
5070
|
return Promise.resolve(null);
|
|
5075
5071
|
}
|
|
5076
|
-
getUptimeNormalTrend(
|
|
5072
|
+
getUptimeNormalTrend(assetExternalId, date, utcOffset) {
|
|
5077
5073
|
let url_ = this.baseUrl + "/kpiresource/normal-day-trendline?";
|
|
5078
|
-
if (assetId !== undefined && assetId !== null)
|
|
5079
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
5080
5074
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
5081
5075
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
5082
5076
|
if (date !== undefined && date !== null)
|
|
@@ -5315,10 +5309,10 @@ export class ResourcesClient extends AuthorizedApiBase {
|
|
|
5315
5309
|
}
|
|
5316
5310
|
return Promise.resolve(null);
|
|
5317
5311
|
}
|
|
5318
|
-
listCurrentMachineStates(
|
|
5312
|
+
listCurrentMachineStates(assetExternalId) {
|
|
5319
5313
|
let url_ = this.baseUrl + "/resources/states/now?";
|
|
5320
|
-
if (
|
|
5321
|
-
url_ += "
|
|
5314
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
5315
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
5322
5316
|
url_ = url_.replace(/[?&]$/, "");
|
|
5323
5317
|
let options_ = {
|
|
5324
5318
|
method: "GET",
|
|
@@ -6908,11 +6902,10 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
6908
6902
|
* @param startTime (optional)
|
|
6909
6903
|
* @param endTime (optional)
|
|
6910
6904
|
* @param ianaTimeZone (optional)
|
|
6911
|
-
* @param assetId (optional)
|
|
6912
6905
|
* @param assetExternalId (optional)
|
|
6913
6906
|
* @deprecated
|
|
6914
6907
|
*/
|
|
6915
|
-
getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone,
|
|
6908
|
+
getUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
|
|
6916
6909
|
let url_ = this.baseUrl + "/utilization/datapoints?";
|
|
6917
6910
|
if (utilizationType === null)
|
|
6918
6911
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -6926,8 +6919,6 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
6926
6919
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
6927
6920
|
if (ianaTimeZone !== undefined && ianaTimeZone !== null)
|
|
6928
6921
|
url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
|
|
6929
|
-
if (assetId !== undefined && assetId !== null)
|
|
6930
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
6931
6922
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
6932
6923
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
6933
6924
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -7154,7 +7145,7 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
7154
7145
|
}
|
|
7155
7146
|
return Promise.resolve(null);
|
|
7156
7147
|
}
|
|
7157
|
-
getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone,
|
|
7148
|
+
getResourceUtilizationDatapoints(utilizationType, startTime, endTime, ianaTimeZone, assetExternalId) {
|
|
7158
7149
|
let url_ = this.baseUrl + "/pulseutilization/datapoints?";
|
|
7159
7150
|
if (utilizationType === null)
|
|
7160
7151
|
throw new globalThis.Error("The parameter 'utilizationType' cannot be null.");
|
|
@@ -7168,8 +7159,6 @@ export class UtilizationClient extends AuthorizedApiBase {
|
|
|
7168
7159
|
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
7169
7160
|
if (ianaTimeZone !== undefined && ianaTimeZone !== null)
|
|
7170
7161
|
url_ += "ianaTimeZone=" + encodeURIComponent("" + ianaTimeZone) + "&";
|
|
7171
|
-
if (assetId !== undefined && assetId !== null)
|
|
7172
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
7173
7162
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
7174
7163
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
7175
7164
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -11776,10 +11765,8 @@ export class KpiClient extends AuthorizedApiBase {
|
|
|
11776
11765
|
}
|
|
11777
11766
|
return Promise.resolve(null);
|
|
11778
11767
|
}
|
|
11779
|
-
getUptimeNormalTrend(
|
|
11768
|
+
getUptimeNormalTrend(assetExternalId, date, utcOffset) {
|
|
11780
11769
|
let url_ = this.baseUrl + "/kpi/normal-day-trendline?";
|
|
11781
|
-
if (assetId !== undefined && assetId !== null)
|
|
11782
|
-
url_ += "assetId=" + encodeURIComponent("" + assetId) + "&";
|
|
11783
11770
|
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
11784
11771
|
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
11785
11772
|
if (date !== undefined && date !== null)
|
|
@@ -12018,10 +12005,10 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
12018
12005
|
}
|
|
12019
12006
|
return Promise.resolve(null);
|
|
12020
12007
|
}
|
|
12021
|
-
listCurrentMachineStates(
|
|
12008
|
+
listCurrentMachineStates(assetExternalId) {
|
|
12022
12009
|
let url_ = this.baseUrl + "/machines/states/now?";
|
|
12023
|
-
if (
|
|
12024
|
-
url_ += "
|
|
12010
|
+
if (assetExternalId !== undefined && assetExternalId !== null)
|
|
12011
|
+
url_ += "assetExternalId=" + encodeURIComponent("" + assetExternalId) + "&";
|
|
12025
12012
|
url_ = url_.replace(/[?&]$/, "");
|
|
12026
12013
|
let options_ = {
|
|
12027
12014
|
method: "GET",
|
|
@@ -12651,11 +12638,11 @@ export class MachineDataClient extends AuthorizedApiBase {
|
|
|
12651
12638
|
this.http = http ? http : window;
|
|
12652
12639
|
this.baseUrl = baseUrl ?? "";
|
|
12653
12640
|
}
|
|
12654
|
-
getLiveMachineData(
|
|
12655
|
-
let url_ = this.baseUrl + "/machinedata/{
|
|
12656
|
-
if (
|
|
12657
|
-
throw new globalThis.Error("The parameter '
|
|
12658
|
-
url_ = url_.replace("{
|
|
12641
|
+
getLiveMachineData(assetExternalId, externalIds) {
|
|
12642
|
+
let url_ = this.baseUrl + "/machinedata/{assetExternalId}/live-machinedata?";
|
|
12643
|
+
if (assetExternalId === undefined || assetExternalId === null)
|
|
12644
|
+
throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
|
|
12645
|
+
url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
|
|
12659
12646
|
if (externalIds === null)
|
|
12660
12647
|
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
12661
12648
|
else if (externalIds !== undefined)
|
|
@@ -12694,11 +12681,11 @@ export class MachineDataClient extends AuthorizedApiBase {
|
|
|
12694
12681
|
}
|
|
12695
12682
|
return Promise.resolve(null);
|
|
12696
12683
|
}
|
|
12697
|
-
getTimeseriesGraph(
|
|
12698
|
-
let url_ = this.baseUrl + "/machinedata/{
|
|
12699
|
-
if (
|
|
12700
|
-
throw new globalThis.Error("The parameter '
|
|
12701
|
-
url_ = url_.replace("{
|
|
12684
|
+
getTimeseriesGraph(assetExternalId, externalIds, startTime, endTime) {
|
|
12685
|
+
let url_ = this.baseUrl + "/machinedata/{assetExternalId}/timeseries-graph?";
|
|
12686
|
+
if (assetExternalId === undefined || assetExternalId === null)
|
|
12687
|
+
throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
|
|
12688
|
+
url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
|
|
12702
12689
|
if (externalIds === null)
|
|
12703
12690
|
throw new globalThis.Error("The parameter 'externalIds' cannot be null.");
|
|
12704
12691
|
else if (externalIds !== undefined)
|
|
@@ -12745,11 +12732,11 @@ export class MachineDataClient extends AuthorizedApiBase {
|
|
|
12745
12732
|
}
|
|
12746
12733
|
return Promise.resolve(null);
|
|
12747
12734
|
}
|
|
12748
|
-
exportTimeseriesGraph(
|
|
12749
|
-
let url_ = this.baseUrl + "/machinedata/{
|
|
12750
|
-
if (
|
|
12751
|
-
throw new globalThis.Error("The parameter '
|
|
12752
|
-
url_ = url_.replace("{
|
|
12735
|
+
exportTimeseriesGraph(assetExternalId, request) {
|
|
12736
|
+
let url_ = this.baseUrl + "/machinedata/{assetExternalId}/timeseries-graph/export-csv";
|
|
12737
|
+
if (assetExternalId === undefined || assetExternalId === null)
|
|
12738
|
+
throw new globalThis.Error("The parameter 'assetExternalId' must be defined.");
|
|
12739
|
+
url_ = url_.replace("{assetExternalId}", encodeURIComponent("" + assetExternalId));
|
|
12753
12740
|
url_ = url_.replace(/[?&]$/, "");
|
|
12754
12741
|
const content_ = JSON.stringify(request);
|
|
12755
12742
|
let options_ = {
|
|
@@ -18445,7 +18432,7 @@ export class CdfClient extends AuthorizedApiBase {
|
|
|
18445
18432
|
return Promise.resolve(null);
|
|
18446
18433
|
}
|
|
18447
18434
|
}
|
|
18448
|
-
export class
|
|
18435
|
+
export class WorkspaceMigrationAdminClient extends AuthorizedApiBase {
|
|
18449
18436
|
http;
|
|
18450
18437
|
baseUrl;
|
|
18451
18438
|
constructor(configuration, baseUrl, http) {
|
|
@@ -18453,11 +18440,12 @@ export class InspectAdminClient extends AuthorizedApiBase {
|
|
|
18453
18440
|
this.http = http ? http : window;
|
|
18454
18441
|
this.baseUrl = baseUrl ?? "";
|
|
18455
18442
|
}
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18443
|
+
migrateAssetIds(dryRun) {
|
|
18444
|
+
let url_ = this.baseUrl + "/admin/workspaces/migrate-asset-ids?";
|
|
18445
|
+
if (dryRun === null)
|
|
18446
|
+
throw new globalThis.Error("The parameter 'dryRun' cannot be null.");
|
|
18447
|
+
else if (dryRun !== undefined)
|
|
18448
|
+
url_ += "dryRun=" + encodeURIComponent("" + dryRun) + "&";
|
|
18461
18449
|
url_ = url_.replace(/[?&]$/, "");
|
|
18462
18450
|
let options_ = {
|
|
18463
18451
|
method: "POST",
|
|
@@ -18468,10 +18456,10 @@ export class InspectAdminClient extends AuthorizedApiBase {
|
|
|
18468
18456
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
18469
18457
|
return this.http.fetch(url_, transformedOptions_);
|
|
18470
18458
|
}).then((_response) => {
|
|
18471
|
-
return this.
|
|
18459
|
+
return this.processMigrateAssetIds(_response);
|
|
18472
18460
|
});
|
|
18473
18461
|
}
|
|
18474
|
-
|
|
18462
|
+
processMigrateAssetIds(response) {
|
|
18475
18463
|
const status = response.status;
|
|
18476
18464
|
let _headers = {};
|
|
18477
18465
|
if (response.headers && response.headers.forEach) {
|
|
@@ -27850,45 +27838,6 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27850
27838
|
}
|
|
27851
27839
|
return Promise.resolve(null);
|
|
27852
27840
|
}
|
|
27853
|
-
postCountMeasurementFormSchemas(request) {
|
|
27854
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/list/counts";
|
|
27855
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
27856
|
-
const content_ = JSON.stringify(request);
|
|
27857
|
-
let options_ = {
|
|
27858
|
-
body: content_,
|
|
27859
|
-
method: "POST",
|
|
27860
|
-
headers: {
|
|
27861
|
-
"Content-Type": "application/json",
|
|
27862
|
-
"Accept": "application/json"
|
|
27863
|
-
}
|
|
27864
|
-
};
|
|
27865
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
27866
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
27867
|
-
}).then((_response) => {
|
|
27868
|
-
return this.processPostCountMeasurementFormSchemas(_response);
|
|
27869
|
-
});
|
|
27870
|
-
}
|
|
27871
|
-
processPostCountMeasurementFormSchemas(response) {
|
|
27872
|
-
const status = response.status;
|
|
27873
|
-
let _headers = {};
|
|
27874
|
-
if (response.headers && response.headers.forEach) {
|
|
27875
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
27876
|
-
}
|
|
27877
|
-
;
|
|
27878
|
-
if (status === 200) {
|
|
27879
|
-
return response.text().then((_responseText) => {
|
|
27880
|
-
let result200 = null;
|
|
27881
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
27882
|
-
return result200;
|
|
27883
|
-
});
|
|
27884
|
-
}
|
|
27885
|
-
else if (status !== 200 && status !== 204) {
|
|
27886
|
-
return response.text().then((_responseText) => {
|
|
27887
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
27888
|
-
});
|
|
27889
|
-
}
|
|
27890
|
-
return Promise.resolve(null);
|
|
27891
|
-
}
|
|
27892
27841
|
listMeasurementFormSchemaVersions(id) {
|
|
27893
27842
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions";
|
|
27894
27843
|
if (id === undefined || id === null)
|
|
@@ -27928,45 +27877,6 @@ export class MeasurementFormSchemasClient extends AuthorizedApiBase {
|
|
|
27928
27877
|
}
|
|
27929
27878
|
return Promise.resolve(null);
|
|
27930
27879
|
}
|
|
27931
|
-
listMeasurementFormSchemaInstances(id) {
|
|
27932
|
-
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/instances";
|
|
27933
|
-
if (id === undefined || id === null)
|
|
27934
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
27935
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
27936
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
27937
|
-
let options_ = {
|
|
27938
|
-
method: "GET",
|
|
27939
|
-
headers: {
|
|
27940
|
-
"Accept": "application/json"
|
|
27941
|
-
}
|
|
27942
|
-
};
|
|
27943
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
27944
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
27945
|
-
}).then((_response) => {
|
|
27946
|
-
return this.processListMeasurementFormSchemaInstances(_response);
|
|
27947
|
-
});
|
|
27948
|
-
}
|
|
27949
|
-
processListMeasurementFormSchemaInstances(response) {
|
|
27950
|
-
const status = response.status;
|
|
27951
|
-
let _headers = {};
|
|
27952
|
-
if (response.headers && response.headers.forEach) {
|
|
27953
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
27954
|
-
}
|
|
27955
|
-
;
|
|
27956
|
-
if (status === 200) {
|
|
27957
|
-
return response.text().then((_responseText) => {
|
|
27958
|
-
let result200 = null;
|
|
27959
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
27960
|
-
return result200;
|
|
27961
|
-
});
|
|
27962
|
-
}
|
|
27963
|
-
else if (status !== 200 && status !== 204) {
|
|
27964
|
-
return response.text().then((_responseText) => {
|
|
27965
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
27966
|
-
});
|
|
27967
|
-
}
|
|
27968
|
-
return Promise.resolve(null);
|
|
27969
|
-
}
|
|
27970
27880
|
listMeasurementFormSchemaVersionChanges(id) {
|
|
27971
27881
|
let url_ = this.baseUrl + "/measurementforms/schemas/{id}/versions/changes";
|
|
27972
27882
|
if (id === undefined || id === null)
|
|
@@ -29448,9 +29358,6 @@ export class MeasurementFormsInstancesInstanceAdminClient extends AuthorizedApiB
|
|
|
29448
29358
|
}
|
|
29449
29359
|
return Promise.resolve(null);
|
|
29450
29360
|
}
|
|
29451
|
-
/**
|
|
29452
|
-
* @deprecated
|
|
29453
|
-
*/
|
|
29454
29361
|
updateMeasurementFormInstance(id, request) {
|
|
29455
29362
|
let url_ = this.baseUrl + "/measurementforms/instances/{id}";
|
|
29456
29363
|
if (id === undefined || id === null)
|
|
@@ -29620,84 +29527,6 @@ export class MeasurementFormsInstancesInstanceAdminClient extends AuthorizedApiB
|
|
|
29620
29527
|
}
|
|
29621
29528
|
return Promise.resolve(null);
|
|
29622
29529
|
}
|
|
29623
|
-
postCountMeasurementFormsByStatus(request) {
|
|
29624
|
-
let url_ = this.baseUrl + "/measurementforms/instances/bystatus/v2/counts";
|
|
29625
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
29626
|
-
const content_ = JSON.stringify(request);
|
|
29627
|
-
let options_ = {
|
|
29628
|
-
body: content_,
|
|
29629
|
-
method: "POST",
|
|
29630
|
-
headers: {
|
|
29631
|
-
"Content-Type": "application/json",
|
|
29632
|
-
"Accept": "application/json"
|
|
29633
|
-
}
|
|
29634
|
-
};
|
|
29635
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29636
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
29637
|
-
}).then((_response) => {
|
|
29638
|
-
return this.processPostCountMeasurementFormsByStatus(_response);
|
|
29639
|
-
});
|
|
29640
|
-
}
|
|
29641
|
-
processPostCountMeasurementFormsByStatus(response) {
|
|
29642
|
-
const status = response.status;
|
|
29643
|
-
let _headers = {};
|
|
29644
|
-
if (response.headers && response.headers.forEach) {
|
|
29645
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
29646
|
-
}
|
|
29647
|
-
;
|
|
29648
|
-
if (status === 200) {
|
|
29649
|
-
return response.text().then((_responseText) => {
|
|
29650
|
-
let result200 = null;
|
|
29651
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
29652
|
-
return result200;
|
|
29653
|
-
});
|
|
29654
|
-
}
|
|
29655
|
-
else if (status !== 200 && status !== 204) {
|
|
29656
|
-
return response.text().then((_responseText) => {
|
|
29657
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29658
|
-
});
|
|
29659
|
-
}
|
|
29660
|
-
return Promise.resolve(null);
|
|
29661
|
-
}
|
|
29662
|
-
postListMeasurementFormsByStatusV2(request) {
|
|
29663
|
-
let url_ = this.baseUrl + "/measurementforms/instances/bystatus/v2";
|
|
29664
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
29665
|
-
const content_ = JSON.stringify(request);
|
|
29666
|
-
let options_ = {
|
|
29667
|
-
body: content_,
|
|
29668
|
-
method: "POST",
|
|
29669
|
-
headers: {
|
|
29670
|
-
"Content-Type": "application/json",
|
|
29671
|
-
"Accept": "application/json"
|
|
29672
|
-
}
|
|
29673
|
-
};
|
|
29674
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29675
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
29676
|
-
}).then((_response) => {
|
|
29677
|
-
return this.processPostListMeasurementFormsByStatusV2(_response);
|
|
29678
|
-
});
|
|
29679
|
-
}
|
|
29680
|
-
processPostListMeasurementFormsByStatusV2(response) {
|
|
29681
|
-
const status = response.status;
|
|
29682
|
-
let _headers = {};
|
|
29683
|
-
if (response.headers && response.headers.forEach) {
|
|
29684
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
29685
|
-
}
|
|
29686
|
-
;
|
|
29687
|
-
if (status === 200) {
|
|
29688
|
-
return response.text().then((_responseText) => {
|
|
29689
|
-
let result200 = null;
|
|
29690
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
29691
|
-
return result200;
|
|
29692
|
-
});
|
|
29693
|
-
}
|
|
29694
|
-
else if (status !== 200 && status !== 204) {
|
|
29695
|
-
return response.text().then((_responseText) => {
|
|
29696
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29697
|
-
});
|
|
29698
|
-
}
|
|
29699
|
-
return Promise.resolve(null);
|
|
29700
|
-
}
|
|
29701
29530
|
createMeasurementFormInstance2(id, request) {
|
|
29702
29531
|
let url_ = this.baseUrl + "/measurementforms/instances/{id}/createinstance";
|
|
29703
29532
|
if (id === undefined || id === null)
|
|
@@ -29740,132 +29569,6 @@ export class MeasurementFormsInstancesInstanceAdminClient extends AuthorizedApiB
|
|
|
29740
29569
|
}
|
|
29741
29570
|
return Promise.resolve(null);
|
|
29742
29571
|
}
|
|
29743
|
-
editMeasurementFormInstance(id, request) {
|
|
29744
|
-
let url_ = this.baseUrl + "/measurementforms/instances/{id}/edit";
|
|
29745
|
-
if (id === undefined || id === null)
|
|
29746
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
29747
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
29748
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
29749
|
-
const content_ = JSON.stringify(request);
|
|
29750
|
-
let options_ = {
|
|
29751
|
-
body: content_,
|
|
29752
|
-
method: "PUT",
|
|
29753
|
-
headers: {
|
|
29754
|
-
"Content-Type": "application/json",
|
|
29755
|
-
"Accept": "application/json"
|
|
29756
|
-
}
|
|
29757
|
-
};
|
|
29758
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29759
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
29760
|
-
}).then((_response) => {
|
|
29761
|
-
return this.processEditMeasurementFormInstance(_response);
|
|
29762
|
-
});
|
|
29763
|
-
}
|
|
29764
|
-
processEditMeasurementFormInstance(response) {
|
|
29765
|
-
const status = response.status;
|
|
29766
|
-
let _headers = {};
|
|
29767
|
-
if (response.headers && response.headers.forEach) {
|
|
29768
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
29769
|
-
}
|
|
29770
|
-
;
|
|
29771
|
-
if (status === 200) {
|
|
29772
|
-
return response.text().then((_responseText) => {
|
|
29773
|
-
let result200 = null;
|
|
29774
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
29775
|
-
return result200;
|
|
29776
|
-
});
|
|
29777
|
-
}
|
|
29778
|
-
else if (status !== 200 && status !== 204) {
|
|
29779
|
-
return response.text().then((_responseText) => {
|
|
29780
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29781
|
-
});
|
|
29782
|
-
}
|
|
29783
|
-
return Promise.resolve(null);
|
|
29784
|
-
}
|
|
29785
|
-
/**
|
|
29786
|
-
* What saving the edited serial numbers would do to them and their measurements, without saving.
|
|
29787
|
-
*/
|
|
29788
|
-
previewMeasurementFormInstanceEdit(id, request) {
|
|
29789
|
-
let url_ = this.baseUrl + "/measurementforms/instances/{id}/edit/preview";
|
|
29790
|
-
if (id === undefined || id === null)
|
|
29791
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
29792
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
29793
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
29794
|
-
const content_ = JSON.stringify(request);
|
|
29795
|
-
let options_ = {
|
|
29796
|
-
body: content_,
|
|
29797
|
-
method: "POST",
|
|
29798
|
-
headers: {
|
|
29799
|
-
"Content-Type": "application/json",
|
|
29800
|
-
"Accept": "application/json"
|
|
29801
|
-
}
|
|
29802
|
-
};
|
|
29803
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29804
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
29805
|
-
}).then((_response) => {
|
|
29806
|
-
return this.processPreviewMeasurementFormInstanceEdit(_response);
|
|
29807
|
-
});
|
|
29808
|
-
}
|
|
29809
|
-
processPreviewMeasurementFormInstanceEdit(response) {
|
|
29810
|
-
const status = response.status;
|
|
29811
|
-
let _headers = {};
|
|
29812
|
-
if (response.headers && response.headers.forEach) {
|
|
29813
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
29814
|
-
}
|
|
29815
|
-
;
|
|
29816
|
-
if (status === 200) {
|
|
29817
|
-
return response.text().then((_responseText) => {
|
|
29818
|
-
let result200 = null;
|
|
29819
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
29820
|
-
return result200;
|
|
29821
|
-
});
|
|
29822
|
-
}
|
|
29823
|
-
else if (status !== 200 && status !== 204) {
|
|
29824
|
-
return response.text().then((_responseText) => {
|
|
29825
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29826
|
-
});
|
|
29827
|
-
}
|
|
29828
|
-
return Promise.resolve(null);
|
|
29829
|
-
}
|
|
29830
|
-
getSerialNumberMeasurements(id) {
|
|
29831
|
-
let url_ = this.baseUrl + "/measurementforms/instances/{id}/serial-number-measurements";
|
|
29832
|
-
if (id === undefined || id === null)
|
|
29833
|
-
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
29834
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
29835
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
29836
|
-
let options_ = {
|
|
29837
|
-
method: "GET",
|
|
29838
|
-
headers: {
|
|
29839
|
-
"Accept": "application/json"
|
|
29840
|
-
}
|
|
29841
|
-
};
|
|
29842
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
29843
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
29844
|
-
}).then((_response) => {
|
|
29845
|
-
return this.processGetSerialNumberMeasurements(_response);
|
|
29846
|
-
});
|
|
29847
|
-
}
|
|
29848
|
-
processGetSerialNumberMeasurements(response) {
|
|
29849
|
-
const status = response.status;
|
|
29850
|
-
let _headers = {};
|
|
29851
|
-
if (response.headers && response.headers.forEach) {
|
|
29852
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
29853
|
-
}
|
|
29854
|
-
;
|
|
29855
|
-
if (status === 200) {
|
|
29856
|
-
return response.text().then((_responseText) => {
|
|
29857
|
-
let result200 = null;
|
|
29858
|
-
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
29859
|
-
return result200;
|
|
29860
|
-
});
|
|
29861
|
-
}
|
|
29862
|
-
else if (status !== 200 && status !== 204) {
|
|
29863
|
-
return response.text().then((_responseText) => {
|
|
29864
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
29865
|
-
});
|
|
29866
|
-
}
|
|
29867
|
-
return Promise.resolve(null);
|
|
29868
|
-
}
|
|
29869
29572
|
reactivateMeasurementFormInstance(id) {
|
|
29870
29573
|
let url_ = this.baseUrl + "/measurementforms/instances/{id}/reactivate";
|
|
29871
29574
|
if (id === undefined || id === null)
|