@ignos/api-client 20250806.0.12288 → 20250806.0.12310-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 +102 -29
- package/lib/ignosportal-api.js +417 -98
- package/package.json +1 -1
- package/src/ignosportal-api.ts +508 -121
package/lib/ignosportal-api.js
CHANGED
|
@@ -6909,54 +6909,6 @@ export class MachinesClient extends AuthorizedApiBase {
|
|
|
6909
6909
|
}
|
|
6910
6910
|
return Promise.resolve(null);
|
|
6911
6911
|
}
|
|
6912
|
-
getWorkOrderTimeline(id, startTime, endTime) {
|
|
6913
|
-
let url_ = this.baseUrl + "/machines/{id}/workorder/timeline?";
|
|
6914
|
-
if (id === undefined || id === null)
|
|
6915
|
-
throw new Error("The parameter 'id' must be defined.");
|
|
6916
|
-
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
6917
|
-
if (startTime !== undefined && startTime !== null)
|
|
6918
|
-
url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
|
|
6919
|
-
if (endTime !== undefined && endTime !== null)
|
|
6920
|
-
url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
|
|
6921
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
6922
|
-
let options_ = {
|
|
6923
|
-
method: "GET",
|
|
6924
|
-
headers: {
|
|
6925
|
-
"Accept": "application/json"
|
|
6926
|
-
}
|
|
6927
|
-
};
|
|
6928
|
-
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
6929
|
-
return this.http.fetch(url_, transformedOptions_);
|
|
6930
|
-
}).then((_response) => {
|
|
6931
|
-
return this.processGetWorkOrderTimeline(_response);
|
|
6932
|
-
});
|
|
6933
|
-
}
|
|
6934
|
-
processGetWorkOrderTimeline(response) {
|
|
6935
|
-
const status = response.status;
|
|
6936
|
-
let _headers = {};
|
|
6937
|
-
if (response.headers && response.headers.forEach) {
|
|
6938
|
-
response.headers.forEach((v, k) => _headers[k] = v);
|
|
6939
|
-
}
|
|
6940
|
-
;
|
|
6941
|
-
if (status === 200) {
|
|
6942
|
-
return response.text().then((_responseText) => {
|
|
6943
|
-
let result200 = null;
|
|
6944
|
-
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
6945
|
-
if (Array.isArray(resultData200)) {
|
|
6946
|
-
result200 = [];
|
|
6947
|
-
for (let item of resultData200)
|
|
6948
|
-
result200.push(WorkOrderDatapoint.fromJS(item));
|
|
6949
|
-
}
|
|
6950
|
-
return result200;
|
|
6951
|
-
});
|
|
6952
|
-
}
|
|
6953
|
-
else if (status !== 200 && status !== 204) {
|
|
6954
|
-
return response.text().then((_responseText) => {
|
|
6955
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
6956
|
-
});
|
|
6957
|
-
}
|
|
6958
|
-
return Promise.resolve(null);
|
|
6959
|
-
}
|
|
6960
6912
|
getMachineUtilizationSummary() {
|
|
6961
6913
|
let url_ = this.baseUrl + "/machines/utilization/summary";
|
|
6962
6914
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -22770,6 +22722,275 @@ export class WorkordersClient extends AuthorizedApiBase {
|
|
|
22770
22722
|
}
|
|
22771
22723
|
return Promise.resolve(null);
|
|
22772
22724
|
}
|
|
22725
|
+
getDiscussionMessages(id) {
|
|
22726
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
|
|
22727
|
+
if (id === undefined || id === null)
|
|
22728
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22729
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22730
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22731
|
+
let options_ = {
|
|
22732
|
+
method: "GET",
|
|
22733
|
+
headers: {
|
|
22734
|
+
"Accept": "application/json"
|
|
22735
|
+
}
|
|
22736
|
+
};
|
|
22737
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22738
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22739
|
+
}).then((_response) => {
|
|
22740
|
+
return this.processGetDiscussionMessages(_response);
|
|
22741
|
+
});
|
|
22742
|
+
}
|
|
22743
|
+
processGetDiscussionMessages(response) {
|
|
22744
|
+
const status = response.status;
|
|
22745
|
+
let _headers = {};
|
|
22746
|
+
if (response.headers && response.headers.forEach) {
|
|
22747
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22748
|
+
}
|
|
22749
|
+
;
|
|
22750
|
+
if (status === 200) {
|
|
22751
|
+
return response.text().then((_responseText) => {
|
|
22752
|
+
let result200 = null;
|
|
22753
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22754
|
+
if (Array.isArray(resultData200)) {
|
|
22755
|
+
result200 = [];
|
|
22756
|
+
for (let item of resultData200)
|
|
22757
|
+
result200.push(WorkorderDiscussionMessageDto.fromJS(item));
|
|
22758
|
+
}
|
|
22759
|
+
return result200;
|
|
22760
|
+
});
|
|
22761
|
+
}
|
|
22762
|
+
else if (status !== 200 && status !== 204) {
|
|
22763
|
+
return response.text().then((_responseText) => {
|
|
22764
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22765
|
+
});
|
|
22766
|
+
}
|
|
22767
|
+
return Promise.resolve(null);
|
|
22768
|
+
}
|
|
22769
|
+
addDiscussionMessage(id, request) {
|
|
22770
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
|
|
22771
|
+
if (id === undefined || id === null)
|
|
22772
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22773
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22774
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22775
|
+
const content_ = JSON.stringify(request);
|
|
22776
|
+
let options_ = {
|
|
22777
|
+
body: content_,
|
|
22778
|
+
method: "POST",
|
|
22779
|
+
headers: {
|
|
22780
|
+
"Content-Type": "application/json",
|
|
22781
|
+
"Accept": "application/json"
|
|
22782
|
+
}
|
|
22783
|
+
};
|
|
22784
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22785
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22786
|
+
}).then((_response) => {
|
|
22787
|
+
return this.processAddDiscussionMessage(_response);
|
|
22788
|
+
});
|
|
22789
|
+
}
|
|
22790
|
+
processAddDiscussionMessage(response) {
|
|
22791
|
+
const status = response.status;
|
|
22792
|
+
let _headers = {};
|
|
22793
|
+
if (response.headers && response.headers.forEach) {
|
|
22794
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22795
|
+
}
|
|
22796
|
+
;
|
|
22797
|
+
if (status === 201) {
|
|
22798
|
+
return response.text().then((_responseText) => {
|
|
22799
|
+
let result201 = null;
|
|
22800
|
+
let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22801
|
+
result201 = WorkorderDiscussionMessageDto.fromJS(resultData201);
|
|
22802
|
+
return result201;
|
|
22803
|
+
});
|
|
22804
|
+
}
|
|
22805
|
+
else if (status !== 200 && status !== 204) {
|
|
22806
|
+
return response.text().then((_responseText) => {
|
|
22807
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22808
|
+
});
|
|
22809
|
+
}
|
|
22810
|
+
return Promise.resolve(null);
|
|
22811
|
+
}
|
|
22812
|
+
updateMessage(id, messageId, content) {
|
|
22813
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
|
|
22814
|
+
if (id === undefined || id === null)
|
|
22815
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22816
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22817
|
+
if (messageId === undefined || messageId === null)
|
|
22818
|
+
throw new Error("The parameter 'messageId' must be defined.");
|
|
22819
|
+
url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
|
|
22820
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22821
|
+
const content_ = JSON.stringify(content);
|
|
22822
|
+
let options_ = {
|
|
22823
|
+
body: content_,
|
|
22824
|
+
method: "PUT",
|
|
22825
|
+
headers: {
|
|
22826
|
+
"Content-Type": "application/json",
|
|
22827
|
+
"Accept": "application/octet-stream"
|
|
22828
|
+
}
|
|
22829
|
+
};
|
|
22830
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22831
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22832
|
+
}).then((_response) => {
|
|
22833
|
+
return this.processUpdateMessage(_response);
|
|
22834
|
+
});
|
|
22835
|
+
}
|
|
22836
|
+
processUpdateMessage(response) {
|
|
22837
|
+
const status = response.status;
|
|
22838
|
+
let _headers = {};
|
|
22839
|
+
if (response.headers && response.headers.forEach) {
|
|
22840
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22841
|
+
}
|
|
22842
|
+
;
|
|
22843
|
+
if (status === 200 || status === 206) {
|
|
22844
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
22845
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
22846
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
22847
|
+
if (fileName) {
|
|
22848
|
+
fileName = decodeURIComponent(fileName);
|
|
22849
|
+
}
|
|
22850
|
+
else {
|
|
22851
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
22852
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
22853
|
+
}
|
|
22854
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
22855
|
+
}
|
|
22856
|
+
else if (status !== 200 && status !== 204) {
|
|
22857
|
+
return response.text().then((_responseText) => {
|
|
22858
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22859
|
+
});
|
|
22860
|
+
}
|
|
22861
|
+
return Promise.resolve(null);
|
|
22862
|
+
}
|
|
22863
|
+
deleteMessage(id, messageId) {
|
|
22864
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
|
|
22865
|
+
if (id === undefined || id === null)
|
|
22866
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22867
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22868
|
+
if (messageId === undefined || messageId === null)
|
|
22869
|
+
throw new Error("The parameter 'messageId' must be defined.");
|
|
22870
|
+
url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
|
|
22871
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22872
|
+
let options_ = {
|
|
22873
|
+
method: "DELETE",
|
|
22874
|
+
headers: {
|
|
22875
|
+
"Accept": "application/octet-stream"
|
|
22876
|
+
}
|
|
22877
|
+
};
|
|
22878
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22879
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22880
|
+
}).then((_response) => {
|
|
22881
|
+
return this.processDeleteMessage(_response);
|
|
22882
|
+
});
|
|
22883
|
+
}
|
|
22884
|
+
processDeleteMessage(response) {
|
|
22885
|
+
const status = response.status;
|
|
22886
|
+
let _headers = {};
|
|
22887
|
+
if (response.headers && response.headers.forEach) {
|
|
22888
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22889
|
+
}
|
|
22890
|
+
;
|
|
22891
|
+
if (status === 200 || status === 206) {
|
|
22892
|
+
const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
|
|
22893
|
+
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
22894
|
+
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
22895
|
+
if (fileName) {
|
|
22896
|
+
fileName = decodeURIComponent(fileName);
|
|
22897
|
+
}
|
|
22898
|
+
else {
|
|
22899
|
+
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
22900
|
+
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
22901
|
+
}
|
|
22902
|
+
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
22903
|
+
}
|
|
22904
|
+
else if (status !== 200 && status !== 204) {
|
|
22905
|
+
return response.text().then((_responseText) => {
|
|
22906
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22907
|
+
});
|
|
22908
|
+
}
|
|
22909
|
+
return Promise.resolve(null);
|
|
22910
|
+
}
|
|
22911
|
+
getLastRead(id, operationId, resourceId) {
|
|
22912
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read?";
|
|
22913
|
+
if (id === undefined || id === null)
|
|
22914
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22915
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22916
|
+
if (operationId !== undefined && operationId !== null)
|
|
22917
|
+
url_ += "operationId=" + encodeURIComponent("" + operationId) + "&";
|
|
22918
|
+
if (resourceId !== undefined && resourceId !== null)
|
|
22919
|
+
url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
|
|
22920
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22921
|
+
let options_ = {
|
|
22922
|
+
method: "GET",
|
|
22923
|
+
headers: {
|
|
22924
|
+
"Accept": "application/json"
|
|
22925
|
+
}
|
|
22926
|
+
};
|
|
22927
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22928
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22929
|
+
}).then((_response) => {
|
|
22930
|
+
return this.processGetLastRead(_response);
|
|
22931
|
+
});
|
|
22932
|
+
}
|
|
22933
|
+
processGetLastRead(response) {
|
|
22934
|
+
const status = response.status;
|
|
22935
|
+
let _headers = {};
|
|
22936
|
+
if (response.headers && response.headers.forEach) {
|
|
22937
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22938
|
+
}
|
|
22939
|
+
;
|
|
22940
|
+
if (status === 200) {
|
|
22941
|
+
return response.text().then((_responseText) => {
|
|
22942
|
+
let result200 = null;
|
|
22943
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
22944
|
+
result200 = WorkorderDiscussionReadStatusDto.fromJS(resultData200);
|
|
22945
|
+
return result200;
|
|
22946
|
+
});
|
|
22947
|
+
}
|
|
22948
|
+
else if (status !== 200 && status !== 204) {
|
|
22949
|
+
return response.text().then((_responseText) => {
|
|
22950
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22951
|
+
});
|
|
22952
|
+
}
|
|
22953
|
+
return Promise.resolve(null);
|
|
22954
|
+
}
|
|
22955
|
+
setLastRead(id, request) {
|
|
22956
|
+
let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read";
|
|
22957
|
+
if (id === undefined || id === null)
|
|
22958
|
+
throw new Error("The parameter 'id' must be defined.");
|
|
22959
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
22960
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
22961
|
+
const content_ = JSON.stringify(request);
|
|
22962
|
+
let options_ = {
|
|
22963
|
+
body: content_,
|
|
22964
|
+
method: "POST",
|
|
22965
|
+
headers: {
|
|
22966
|
+
"Content-Type": "application/json",
|
|
22967
|
+
}
|
|
22968
|
+
};
|
|
22969
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
22970
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
22971
|
+
}).then((_response) => {
|
|
22972
|
+
return this.processSetLastRead(_response);
|
|
22973
|
+
});
|
|
22974
|
+
}
|
|
22975
|
+
processSetLastRead(response) {
|
|
22976
|
+
const status = response.status;
|
|
22977
|
+
let _headers = {};
|
|
22978
|
+
if (response.headers && response.headers.forEach) {
|
|
22979
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
22980
|
+
}
|
|
22981
|
+
;
|
|
22982
|
+
if (status === 204) {
|
|
22983
|
+
return response.text().then((_responseText) => {
|
|
22984
|
+
return;
|
|
22985
|
+
});
|
|
22986
|
+
}
|
|
22987
|
+
else if (status !== 200 && status !== 204) {
|
|
22988
|
+
return response.text().then((_responseText) => {
|
|
22989
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
22990
|
+
});
|
|
22991
|
+
}
|
|
22992
|
+
return Promise.resolve(null);
|
|
22993
|
+
}
|
|
22773
22994
|
}
|
|
22774
22995
|
export class AzureRegionDto {
|
|
22775
22996
|
constructor(data) {
|
|
@@ -30397,56 +30618,6 @@ export class WorkOrderProjectDto {
|
|
|
30397
30618
|
return data;
|
|
30398
30619
|
}
|
|
30399
30620
|
}
|
|
30400
|
-
export class WorkOrderDatapoint {
|
|
30401
|
-
constructor(data) {
|
|
30402
|
-
if (data) {
|
|
30403
|
-
for (var property in data) {
|
|
30404
|
-
if (data.hasOwnProperty(property))
|
|
30405
|
-
this[property] = data[property];
|
|
30406
|
-
}
|
|
30407
|
-
}
|
|
30408
|
-
}
|
|
30409
|
-
init(_data) {
|
|
30410
|
-
if (_data) {
|
|
30411
|
-
this.workOrder = _data["workOrder"];
|
|
30412
|
-
this.id = _data["id"];
|
|
30413
|
-
this.externalId = _data["externalId"];
|
|
30414
|
-
this.subType = _data["subType"];
|
|
30415
|
-
this.startTime = _data["startTime"];
|
|
30416
|
-
this.endTime = _data["endTime"];
|
|
30417
|
-
if (_data["metaData"]) {
|
|
30418
|
-
this.metaData = {};
|
|
30419
|
-
for (let key in _data["metaData"]) {
|
|
30420
|
-
if (_data["metaData"].hasOwnProperty(key))
|
|
30421
|
-
this.metaData[key] = _data["metaData"][key];
|
|
30422
|
-
}
|
|
30423
|
-
}
|
|
30424
|
-
}
|
|
30425
|
-
}
|
|
30426
|
-
static fromJS(data) {
|
|
30427
|
-
data = typeof data === 'object' ? data : {};
|
|
30428
|
-
let result = new WorkOrderDatapoint();
|
|
30429
|
-
result.init(data);
|
|
30430
|
-
return result;
|
|
30431
|
-
}
|
|
30432
|
-
toJSON(data) {
|
|
30433
|
-
data = typeof data === 'object' ? data : {};
|
|
30434
|
-
data["workOrder"] = this.workOrder;
|
|
30435
|
-
data["id"] = this.id;
|
|
30436
|
-
data["externalId"] = this.externalId;
|
|
30437
|
-
data["subType"] = this.subType;
|
|
30438
|
-
data["startTime"] = this.startTime;
|
|
30439
|
-
data["endTime"] = this.endTime;
|
|
30440
|
-
if (this.metaData) {
|
|
30441
|
-
data["metaData"] = {};
|
|
30442
|
-
for (let key in this.metaData) {
|
|
30443
|
-
if (this.metaData.hasOwnProperty(key))
|
|
30444
|
-
data["metaData"][key] = this.metaData[key];
|
|
30445
|
-
}
|
|
30446
|
-
}
|
|
30447
|
-
return data;
|
|
30448
|
-
}
|
|
30449
|
-
}
|
|
30450
30621
|
export class UtilizationSummaryDto {
|
|
30451
30622
|
constructor(data) {
|
|
30452
30623
|
if (data) {
|
|
@@ -46695,6 +46866,154 @@ export class CreateWorkOrderMapping {
|
|
|
46695
46866
|
return data;
|
|
46696
46867
|
}
|
|
46697
46868
|
}
|
|
46869
|
+
export class WorkorderDiscussionMessageDto {
|
|
46870
|
+
constructor(data) {
|
|
46871
|
+
if (data) {
|
|
46872
|
+
for (var property in data) {
|
|
46873
|
+
if (data.hasOwnProperty(property))
|
|
46874
|
+
this[property] = data[property];
|
|
46875
|
+
}
|
|
46876
|
+
}
|
|
46877
|
+
}
|
|
46878
|
+
init(_data) {
|
|
46879
|
+
if (_data) {
|
|
46880
|
+
this.id = _data["id"];
|
|
46881
|
+
this.workorderId = _data["workorderId"];
|
|
46882
|
+
this.companyId = _data["companyId"];
|
|
46883
|
+
this.content = _data["content"];
|
|
46884
|
+
this.senderUpn = _data["senderUpn"];
|
|
46885
|
+
this.senderName = _data["senderName"];
|
|
46886
|
+
this.operationId = _data["operationId"];
|
|
46887
|
+
this.operationName = _data["operationName"];
|
|
46888
|
+
this.resourceId = _data["resourceId"];
|
|
46889
|
+
this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
|
|
46890
|
+
}
|
|
46891
|
+
}
|
|
46892
|
+
static fromJS(data) {
|
|
46893
|
+
data = typeof data === 'object' ? data : {};
|
|
46894
|
+
let result = new WorkorderDiscussionMessageDto();
|
|
46895
|
+
result.init(data);
|
|
46896
|
+
return result;
|
|
46897
|
+
}
|
|
46898
|
+
toJSON(data) {
|
|
46899
|
+
data = typeof data === 'object' ? data : {};
|
|
46900
|
+
data["id"] = this.id;
|
|
46901
|
+
data["workorderId"] = this.workorderId;
|
|
46902
|
+
data["companyId"] = this.companyId;
|
|
46903
|
+
data["content"] = this.content;
|
|
46904
|
+
data["senderUpn"] = this.senderUpn;
|
|
46905
|
+
data["senderName"] = this.senderName;
|
|
46906
|
+
data["operationId"] = this.operationId;
|
|
46907
|
+
data["operationName"] = this.operationName;
|
|
46908
|
+
data["resourceId"] = this.resourceId;
|
|
46909
|
+
data["created"] = this.created ? this.created.toISOString() : undefined;
|
|
46910
|
+
return data;
|
|
46911
|
+
}
|
|
46912
|
+
}
|
|
46913
|
+
export class AddDiscussionMessageRequest {
|
|
46914
|
+
constructor(data) {
|
|
46915
|
+
if (data) {
|
|
46916
|
+
for (var property in data) {
|
|
46917
|
+
if (data.hasOwnProperty(property))
|
|
46918
|
+
this[property] = data[property];
|
|
46919
|
+
}
|
|
46920
|
+
}
|
|
46921
|
+
}
|
|
46922
|
+
init(_data) {
|
|
46923
|
+
if (_data) {
|
|
46924
|
+
this.companyId = _data["companyId"];
|
|
46925
|
+
this.message = _data["message"];
|
|
46926
|
+
this.senderUpn = _data["senderUpn"];
|
|
46927
|
+
this.senderName = _data["senderName"];
|
|
46928
|
+
this.operationId = _data["operationId"];
|
|
46929
|
+
this.operationName = _data["operationName"];
|
|
46930
|
+
this.resourceId = _data["resourceId"];
|
|
46931
|
+
}
|
|
46932
|
+
}
|
|
46933
|
+
static fromJS(data) {
|
|
46934
|
+
data = typeof data === 'object' ? data : {};
|
|
46935
|
+
let result = new AddDiscussionMessageRequest();
|
|
46936
|
+
result.init(data);
|
|
46937
|
+
return result;
|
|
46938
|
+
}
|
|
46939
|
+
toJSON(data) {
|
|
46940
|
+
data = typeof data === 'object' ? data : {};
|
|
46941
|
+
data["companyId"] = this.companyId;
|
|
46942
|
+
data["message"] = this.message;
|
|
46943
|
+
data["senderUpn"] = this.senderUpn;
|
|
46944
|
+
data["senderName"] = this.senderName;
|
|
46945
|
+
data["operationId"] = this.operationId;
|
|
46946
|
+
data["operationName"] = this.operationName;
|
|
46947
|
+
data["resourceId"] = this.resourceId;
|
|
46948
|
+
return data;
|
|
46949
|
+
}
|
|
46950
|
+
}
|
|
46951
|
+
export class WorkorderDiscussionReadStatusDto {
|
|
46952
|
+
constructor(data) {
|
|
46953
|
+
if (data) {
|
|
46954
|
+
for (var property in data) {
|
|
46955
|
+
if (data.hasOwnProperty(property))
|
|
46956
|
+
this[property] = data[property];
|
|
46957
|
+
}
|
|
46958
|
+
}
|
|
46959
|
+
}
|
|
46960
|
+
init(_data) {
|
|
46961
|
+
if (_data) {
|
|
46962
|
+
this.workorderId = _data["workorderId"];
|
|
46963
|
+
this.operationId = _data["operationId"];
|
|
46964
|
+
this.resourceId = _data["resourceId"];
|
|
46965
|
+
this.userUpn = _data["userUpn"];
|
|
46966
|
+
this.lastRead = _data["lastRead"] ? new Date(_data["lastRead"].toString()) : undefined;
|
|
46967
|
+
}
|
|
46968
|
+
}
|
|
46969
|
+
static fromJS(data) {
|
|
46970
|
+
data = typeof data === 'object' ? data : {};
|
|
46971
|
+
let result = new WorkorderDiscussionReadStatusDto();
|
|
46972
|
+
result.init(data);
|
|
46973
|
+
return result;
|
|
46974
|
+
}
|
|
46975
|
+
toJSON(data) {
|
|
46976
|
+
data = typeof data === 'object' ? data : {};
|
|
46977
|
+
data["workorderId"] = this.workorderId;
|
|
46978
|
+
data["operationId"] = this.operationId;
|
|
46979
|
+
data["resourceId"] = this.resourceId;
|
|
46980
|
+
data["userUpn"] = this.userUpn;
|
|
46981
|
+
data["lastRead"] = this.lastRead ? this.lastRead.toISOString() : undefined;
|
|
46982
|
+
return data;
|
|
46983
|
+
}
|
|
46984
|
+
}
|
|
46985
|
+
export class SetDiscussionLastRead {
|
|
46986
|
+
constructor(data) {
|
|
46987
|
+
if (data) {
|
|
46988
|
+
for (var property in data) {
|
|
46989
|
+
if (data.hasOwnProperty(property))
|
|
46990
|
+
this[property] = data[property];
|
|
46991
|
+
}
|
|
46992
|
+
}
|
|
46993
|
+
}
|
|
46994
|
+
init(_data) {
|
|
46995
|
+
if (_data) {
|
|
46996
|
+
this.workorderId = _data["workorderId"];
|
|
46997
|
+
this.operationId = _data["operationId"];
|
|
46998
|
+
this.resourceId = _data["resourceId"];
|
|
46999
|
+
this.userUpn = _data["userUpn"];
|
|
47000
|
+
}
|
|
47001
|
+
}
|
|
47002
|
+
static fromJS(data) {
|
|
47003
|
+
data = typeof data === 'object' ? data : {};
|
|
47004
|
+
let result = new SetDiscussionLastRead();
|
|
47005
|
+
result.init(data);
|
|
47006
|
+
return result;
|
|
47007
|
+
}
|
|
47008
|
+
toJSON(data) {
|
|
47009
|
+
data = typeof data === 'object' ? data : {};
|
|
47010
|
+
data["workorderId"] = this.workorderId;
|
|
47011
|
+
data["operationId"] = this.operationId;
|
|
47012
|
+
data["resourceId"] = this.resourceId;
|
|
47013
|
+
data["userUpn"] = this.userUpn;
|
|
47014
|
+
return data;
|
|
47015
|
+
}
|
|
47016
|
+
}
|
|
46698
47017
|
function formatDate(d) {
|
|
46699
47018
|
return d.getFullYear() + '-' +
|
|
46700
47019
|
(d.getMonth() < 9 ? ('0' + (d.getMonth() + 1)) : (d.getMonth() + 1)) + '-' +
|