@ignos/api-client 20250805.0.12277-alpha → 20250806.0.12288

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.
@@ -6890,6 +6890,8 @@ export interface IMachinesClient {
6890
6890
 
6891
6891
  getMachineErpData(id: number): Promise<MachineErpDataDto>;
6892
6892
 
6893
+ getWorkOrderTimeline(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<WorkOrderDatapoint[]>;
6894
+
6893
6895
  getMachineUtilizationSummary(): Promise<UtilizationSummaryDto>;
6894
6896
 
6895
6897
  getCrossCompanyUtilizationSummary(): Promise<CrossCompanyUtilizationSummaryDto>;
@@ -7407,6 +7409,53 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
7407
7409
  return Promise.resolve<MachineErpDataDto>(null as any);
7408
7410
  }
7409
7411
 
7412
+ getWorkOrderTimeline(id: number, startTime: Date | null | undefined, endTime: Date | null | undefined): Promise<WorkOrderDatapoint[]> {
7413
+ let url_ = this.baseUrl + "/machines/{id}/workorder/timeline?";
7414
+ if (id === undefined || id === null)
7415
+ throw new Error("The parameter 'id' must be defined.");
7416
+ url_ = url_.replace("{id}", encodeURIComponent("" + id));
7417
+ if (startTime !== undefined && startTime !== null)
7418
+ url_ += "startTime=" + encodeURIComponent(startTime ? "" + startTime.toISOString() : "") + "&";
7419
+ if (endTime !== undefined && endTime !== null)
7420
+ url_ += "endTime=" + encodeURIComponent(endTime ? "" + endTime.toISOString() : "") + "&";
7421
+ url_ = url_.replace(/[?&]$/, "");
7422
+
7423
+ let options_: RequestInit = {
7424
+ method: "GET",
7425
+ headers: {
7426
+ "Accept": "application/json"
7427
+ }
7428
+ };
7429
+
7430
+ return this.transformOptions(options_).then(transformedOptions_ => {
7431
+ return this.http.fetch(url_, transformedOptions_);
7432
+ }).then((_response: Response) => {
7433
+ return this.processGetWorkOrderTimeline(_response);
7434
+ });
7435
+ }
7436
+
7437
+ protected processGetWorkOrderTimeline(response: Response): Promise<WorkOrderDatapoint[]> {
7438
+ const status = response.status;
7439
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
7440
+ if (status === 200) {
7441
+ return response.text().then((_responseText) => {
7442
+ let result200: any = null;
7443
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
7444
+ if (Array.isArray(resultData200)) {
7445
+ result200 = [] as any;
7446
+ for (let item of resultData200)
7447
+ result200!.push(WorkOrderDatapoint.fromJS(item));
7448
+ }
7449
+ return result200;
7450
+ });
7451
+ } else if (status !== 200 && status !== 204) {
7452
+ return response.text().then((_responseText) => {
7453
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
7454
+ });
7455
+ }
7456
+ return Promise.resolve<WorkOrderDatapoint[]>(null as any);
7457
+ }
7458
+
7410
7459
  getMachineUtilizationSummary(): Promise<UtilizationSummaryDto> {
7411
7460
  let url_ = this.baseUrl + "/machines/utilization/summary";
7412
7461
  url_ = url_.replace(/[?&]$/, "");
@@ -23183,18 +23232,6 @@ export interface IWorkordersClient {
23183
23232
  * Deleteds existing work order mappings.
23184
23233
  */
23185
23234
  deleteWorkOrderMappings(): Promise<void>;
23186
-
23187
- getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessageDto[]>;
23188
-
23189
- addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessageDto>;
23190
-
23191
- updateMessage(id: string, messageId: string, content: string): Promise<FileResponse>;
23192
-
23193
- deleteMessage(id: string, messageId: string): Promise<FileResponse>;
23194
-
23195
- getLastRead(id: string, operationId: string | null | undefined, resourceId: string | null | undefined, userUpn: string | null | undefined): Promise<WorkorderDiscussionReadStatusDto>;
23196
-
23197
- setLastRead(id: string, request: SetDiscussionLastRead): Promise<void>;
23198
23235
  }
23199
23236
 
23200
23237
  export class WorkordersClient extends AuthorizedApiBase implements IWorkordersClient {
@@ -24274,272 +24311,6 @@ export class WorkordersClient extends AuthorizedApiBase implements IWorkordersCl
24274
24311
  }
24275
24312
  return Promise.resolve<void>(null as any);
24276
24313
  }
24277
-
24278
- getDiscussionMessages(id: string): Promise<WorkorderDiscussionMessageDto[]> {
24279
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
24280
- if (id === undefined || id === null)
24281
- throw new Error("The parameter 'id' must be defined.");
24282
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24283
- url_ = url_.replace(/[?&]$/, "");
24284
-
24285
- let options_: RequestInit = {
24286
- method: "GET",
24287
- headers: {
24288
- "Accept": "application/json"
24289
- }
24290
- };
24291
-
24292
- return this.transformOptions(options_).then(transformedOptions_ => {
24293
- return this.http.fetch(url_, transformedOptions_);
24294
- }).then((_response: Response) => {
24295
- return this.processGetDiscussionMessages(_response);
24296
- });
24297
- }
24298
-
24299
- protected processGetDiscussionMessages(response: Response): Promise<WorkorderDiscussionMessageDto[]> {
24300
- const status = response.status;
24301
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24302
- if (status === 200) {
24303
- return response.text().then((_responseText) => {
24304
- let result200: any = null;
24305
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
24306
- if (Array.isArray(resultData200)) {
24307
- result200 = [] as any;
24308
- for (let item of resultData200)
24309
- result200!.push(WorkorderDiscussionMessageDto.fromJS(item));
24310
- }
24311
- return result200;
24312
- });
24313
- } else if (status !== 200 && status !== 204) {
24314
- return response.text().then((_responseText) => {
24315
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24316
- });
24317
- }
24318
- return Promise.resolve<WorkorderDiscussionMessageDto[]>(null as any);
24319
- }
24320
-
24321
- addDiscussionMessage(id: string, request: AddDiscussionMessageRequest): Promise<WorkorderDiscussionMessageDto> {
24322
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion";
24323
- if (id === undefined || id === null)
24324
- throw new Error("The parameter 'id' must be defined.");
24325
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24326
- url_ = url_.replace(/[?&]$/, "");
24327
-
24328
- const content_ = JSON.stringify(request);
24329
-
24330
- let options_: RequestInit = {
24331
- body: content_,
24332
- method: "POST",
24333
- headers: {
24334
- "Content-Type": "application/json",
24335
- "Accept": "application/json"
24336
- }
24337
- };
24338
-
24339
- return this.transformOptions(options_).then(transformedOptions_ => {
24340
- return this.http.fetch(url_, transformedOptions_);
24341
- }).then((_response: Response) => {
24342
- return this.processAddDiscussionMessage(_response);
24343
- });
24344
- }
24345
-
24346
- protected processAddDiscussionMessage(response: Response): Promise<WorkorderDiscussionMessageDto> {
24347
- const status = response.status;
24348
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24349
- if (status === 201) {
24350
- return response.text().then((_responseText) => {
24351
- let result201: any = null;
24352
- let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
24353
- result201 = WorkorderDiscussionMessageDto.fromJS(resultData201);
24354
- return result201;
24355
- });
24356
- } else if (status !== 200 && status !== 204) {
24357
- return response.text().then((_responseText) => {
24358
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24359
- });
24360
- }
24361
- return Promise.resolve<WorkorderDiscussionMessageDto>(null as any);
24362
- }
24363
-
24364
- updateMessage(id: string, messageId: string, content: string): Promise<FileResponse> {
24365
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
24366
- if (id === undefined || id === null)
24367
- throw new Error("The parameter 'id' must be defined.");
24368
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24369
- if (messageId === undefined || messageId === null)
24370
- throw new Error("The parameter 'messageId' must be defined.");
24371
- url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
24372
- url_ = url_.replace(/[?&]$/, "");
24373
-
24374
- const content_ = JSON.stringify(content);
24375
-
24376
- let options_: RequestInit = {
24377
- body: content_,
24378
- method: "PUT",
24379
- headers: {
24380
- "Content-Type": "application/json",
24381
- "Accept": "application/octet-stream"
24382
- }
24383
- };
24384
-
24385
- return this.transformOptions(options_).then(transformedOptions_ => {
24386
- return this.http.fetch(url_, transformedOptions_);
24387
- }).then((_response: Response) => {
24388
- return this.processUpdateMessage(_response);
24389
- });
24390
- }
24391
-
24392
- protected processUpdateMessage(response: Response): Promise<FileResponse> {
24393
- const status = response.status;
24394
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24395
- if (status === 200 || status === 206) {
24396
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
24397
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
24398
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
24399
- if (fileName) {
24400
- fileName = decodeURIComponent(fileName);
24401
- } else {
24402
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
24403
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
24404
- }
24405
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
24406
- } else if (status !== 200 && status !== 204) {
24407
- return response.text().then((_responseText) => {
24408
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24409
- });
24410
- }
24411
- return Promise.resolve<FileResponse>(null as any);
24412
- }
24413
-
24414
- deleteMessage(id: string, messageId: string): Promise<FileResponse> {
24415
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/{messageId}";
24416
- if (id === undefined || id === null)
24417
- throw new Error("The parameter 'id' must be defined.");
24418
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24419
- if (messageId === undefined || messageId === null)
24420
- throw new Error("The parameter 'messageId' must be defined.");
24421
- url_ = url_.replace("{messageId}", encodeURIComponent("" + messageId));
24422
- url_ = url_.replace(/[?&]$/, "");
24423
-
24424
- let options_: RequestInit = {
24425
- method: "DELETE",
24426
- headers: {
24427
- "Accept": "application/octet-stream"
24428
- }
24429
- };
24430
-
24431
- return this.transformOptions(options_).then(transformedOptions_ => {
24432
- return this.http.fetch(url_, transformedOptions_);
24433
- }).then((_response: Response) => {
24434
- return this.processDeleteMessage(_response);
24435
- });
24436
- }
24437
-
24438
- protected processDeleteMessage(response: Response): Promise<FileResponse> {
24439
- const status = response.status;
24440
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24441
- if (status === 200 || status === 206) {
24442
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
24443
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
24444
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
24445
- if (fileName) {
24446
- fileName = decodeURIComponent(fileName);
24447
- } else {
24448
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
24449
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
24450
- }
24451
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
24452
- } else if (status !== 200 && status !== 204) {
24453
- return response.text().then((_responseText) => {
24454
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24455
- });
24456
- }
24457
- return Promise.resolve<FileResponse>(null as any);
24458
- }
24459
-
24460
- getLastRead(id: string, operationId: string | null | undefined, resourceId: string | null | undefined, userUpn: string | null | undefined): Promise<WorkorderDiscussionReadStatusDto> {
24461
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read?";
24462
- if (id === undefined || id === null)
24463
- throw new Error("The parameter 'id' must be defined.");
24464
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24465
- if (operationId !== undefined && operationId !== null)
24466
- url_ += "operationId=" + encodeURIComponent("" + operationId) + "&";
24467
- if (resourceId !== undefined && resourceId !== null)
24468
- url_ += "resourceId=" + encodeURIComponent("" + resourceId) + "&";
24469
- if (userUpn !== undefined && userUpn !== null)
24470
- url_ += "userUpn=" + encodeURIComponent("" + userUpn) + "&";
24471
- url_ = url_.replace(/[?&]$/, "");
24472
-
24473
- let options_: RequestInit = {
24474
- method: "GET",
24475
- headers: {
24476
- "Accept": "application/json"
24477
- }
24478
- };
24479
-
24480
- return this.transformOptions(options_).then(transformedOptions_ => {
24481
- return this.http.fetch(url_, transformedOptions_);
24482
- }).then((_response: Response) => {
24483
- return this.processGetLastRead(_response);
24484
- });
24485
- }
24486
-
24487
- protected processGetLastRead(response: Response): Promise<WorkorderDiscussionReadStatusDto> {
24488
- const status = response.status;
24489
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24490
- if (status === 200) {
24491
- return response.text().then((_responseText) => {
24492
- let result200: any = null;
24493
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
24494
- result200 = WorkorderDiscussionReadStatusDto.fromJS(resultData200);
24495
- return result200;
24496
- });
24497
- } else if (status !== 200 && status !== 204) {
24498
- return response.text().then((_responseText) => {
24499
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24500
- });
24501
- }
24502
- return Promise.resolve<WorkorderDiscussionReadStatusDto>(null as any);
24503
- }
24504
-
24505
- setLastRead(id: string, request: SetDiscussionLastRead): Promise<void> {
24506
- let url_ = this.baseUrl + "/erp/workorders/{id}/discussion/last-read";
24507
- if (id === undefined || id === null)
24508
- throw new Error("The parameter 'id' must be defined.");
24509
- url_ = url_.replace("{id}", encodeURIComponent("" + id));
24510
- url_ = url_.replace(/[?&]$/, "");
24511
-
24512
- const content_ = JSON.stringify(request);
24513
-
24514
- let options_: RequestInit = {
24515
- body: content_,
24516
- method: "POST",
24517
- headers: {
24518
- "Content-Type": "application/json",
24519
- }
24520
- };
24521
-
24522
- return this.transformOptions(options_).then(transformedOptions_ => {
24523
- return this.http.fetch(url_, transformedOptions_);
24524
- }).then((_response: Response) => {
24525
- return this.processSetLastRead(_response);
24526
- });
24527
- }
24528
-
24529
- protected processSetLastRead(response: Response): Promise<void> {
24530
- const status = response.status;
24531
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
24532
- if (status === 204) {
24533
- return response.text().then((_responseText) => {
24534
- return;
24535
- });
24536
- } else if (status !== 200 && status !== 204) {
24537
- return response.text().then((_responseText) => {
24538
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
24539
- });
24540
- }
24541
- return Promise.resolve<void>(null as any);
24542
- }
24543
24314
  }
24544
24315
 
24545
24316
  export class AzureRegionDto implements IAzureRegionDto {
@@ -35710,6 +35481,78 @@ export interface IWorkOrderProjectDto {
35710
35481
  projectManager?: string | null;
35711
35482
  }
35712
35483
 
35484
+ export class WorkOrderDatapoint implements IWorkOrderDatapoint {
35485
+ workOrder!: string;
35486
+ id!: number;
35487
+ externalId!: string;
35488
+ subType?: string | null;
35489
+ startTime!: number;
35490
+ endTime?: number | null;
35491
+ metaData?: { [key: string]: string; } | null;
35492
+
35493
+ constructor(data?: IWorkOrderDatapoint) {
35494
+ if (data) {
35495
+ for (var property in data) {
35496
+ if (data.hasOwnProperty(property))
35497
+ (<any>this)[property] = (<any>data)[property];
35498
+ }
35499
+ }
35500
+ }
35501
+
35502
+ init(_data?: any) {
35503
+ if (_data) {
35504
+ this.workOrder = _data["workOrder"];
35505
+ this.id = _data["id"];
35506
+ this.externalId = _data["externalId"];
35507
+ this.subType = _data["subType"];
35508
+ this.startTime = _data["startTime"];
35509
+ this.endTime = _data["endTime"];
35510
+ if (_data["metaData"]) {
35511
+ this.metaData = {} as any;
35512
+ for (let key in _data["metaData"]) {
35513
+ if (_data["metaData"].hasOwnProperty(key))
35514
+ (<any>this.metaData)![key] = _data["metaData"][key];
35515
+ }
35516
+ }
35517
+ }
35518
+ }
35519
+
35520
+ static fromJS(data: any): WorkOrderDatapoint {
35521
+ data = typeof data === 'object' ? data : {};
35522
+ let result = new WorkOrderDatapoint();
35523
+ result.init(data);
35524
+ return result;
35525
+ }
35526
+
35527
+ toJSON(data?: any) {
35528
+ data = typeof data === 'object' ? data : {};
35529
+ data["workOrder"] = this.workOrder;
35530
+ data["id"] = this.id;
35531
+ data["externalId"] = this.externalId;
35532
+ data["subType"] = this.subType;
35533
+ data["startTime"] = this.startTime;
35534
+ data["endTime"] = this.endTime;
35535
+ if (this.metaData) {
35536
+ data["metaData"] = {};
35537
+ for (let key in this.metaData) {
35538
+ if (this.metaData.hasOwnProperty(key))
35539
+ (<any>data["metaData"])[key] = (<any>this.metaData)[key];
35540
+ }
35541
+ }
35542
+ return data;
35543
+ }
35544
+ }
35545
+
35546
+ export interface IWorkOrderDatapoint {
35547
+ workOrder: string;
35548
+ id: number;
35549
+ externalId: string;
35550
+ subType?: string | null;
35551
+ startTime: number;
35552
+ endTime?: number | null;
35553
+ metaData?: { [key: string]: string; } | null;
35554
+ }
35555
+
35713
35556
  export class UtilizationSummaryDto implements IUtilizationSummaryDto {
35714
35557
  factory!: FactoryUtilizationDto;
35715
35558
  groups!: MachineGroupUtilizationDto[];
@@ -60124,238 +59967,6 @@ export interface ICreateWorkOrderMapping {
60124
59967
  newWorkOrderId: string;
60125
59968
  }
60126
59969
 
60127
- export class WorkorderDiscussionMessageDto implements IWorkorderDiscussionMessageDto {
60128
- id?: string;
60129
- workorderId?: string;
60130
- companyId?: string;
60131
- content?: string;
60132
- senderUpn?: string;
60133
- senderName?: string;
60134
- operationId?: string | null;
60135
- operationName?: string | null;
60136
- resourceId?: string | null;
60137
- created?: Date;
60138
-
60139
- constructor(data?: IWorkorderDiscussionMessageDto) {
60140
- if (data) {
60141
- for (var property in data) {
60142
- if (data.hasOwnProperty(property))
60143
- (<any>this)[property] = (<any>data)[property];
60144
- }
60145
- }
60146
- }
60147
-
60148
- init(_data?: any) {
60149
- if (_data) {
60150
- this.id = _data["id"];
60151
- this.workorderId = _data["workorderId"];
60152
- this.companyId = _data["companyId"];
60153
- this.content = _data["content"];
60154
- this.senderUpn = _data["senderUpn"];
60155
- this.senderName = _data["senderName"];
60156
- this.operationId = _data["operationId"];
60157
- this.operationName = _data["operationName"];
60158
- this.resourceId = _data["resourceId"];
60159
- this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
60160
- }
60161
- }
60162
-
60163
- static fromJS(data: any): WorkorderDiscussionMessageDto {
60164
- data = typeof data === 'object' ? data : {};
60165
- let result = new WorkorderDiscussionMessageDto();
60166
- result.init(data);
60167
- return result;
60168
- }
60169
-
60170
- toJSON(data?: any) {
60171
- data = typeof data === 'object' ? data : {};
60172
- data["id"] = this.id;
60173
- data["workorderId"] = this.workorderId;
60174
- data["companyId"] = this.companyId;
60175
- data["content"] = this.content;
60176
- data["senderUpn"] = this.senderUpn;
60177
- data["senderName"] = this.senderName;
60178
- data["operationId"] = this.operationId;
60179
- data["operationName"] = this.operationName;
60180
- data["resourceId"] = this.resourceId;
60181
- data["created"] = this.created ? this.created.toISOString() : <any>undefined;
60182
- return data;
60183
- }
60184
- }
60185
-
60186
- export interface IWorkorderDiscussionMessageDto {
60187
- id?: string;
60188
- workorderId?: string;
60189
- companyId?: string;
60190
- content?: string;
60191
- senderUpn?: string;
60192
- senderName?: string;
60193
- operationId?: string | null;
60194
- operationName?: string | null;
60195
- resourceId?: string | null;
60196
- created?: Date;
60197
- }
60198
-
60199
- export class AddDiscussionMessageRequest implements IAddDiscussionMessageRequest {
60200
- companyId?: string;
60201
- message?: string;
60202
- senderUpn?: string;
60203
- senderName?: string;
60204
- operationId?: string | null;
60205
- operationName?: string | null;
60206
- resourceId?: string | null;
60207
-
60208
- constructor(data?: IAddDiscussionMessageRequest) {
60209
- if (data) {
60210
- for (var property in data) {
60211
- if (data.hasOwnProperty(property))
60212
- (<any>this)[property] = (<any>data)[property];
60213
- }
60214
- }
60215
- }
60216
-
60217
- init(_data?: any) {
60218
- if (_data) {
60219
- this.companyId = _data["companyId"];
60220
- this.message = _data["message"];
60221
- this.senderUpn = _data["senderUpn"];
60222
- this.senderName = _data["senderName"];
60223
- this.operationId = _data["operationId"];
60224
- this.operationName = _data["operationName"];
60225
- this.resourceId = _data["resourceId"];
60226
- }
60227
- }
60228
-
60229
- static fromJS(data: any): AddDiscussionMessageRequest {
60230
- data = typeof data === 'object' ? data : {};
60231
- let result = new AddDiscussionMessageRequest();
60232
- result.init(data);
60233
- return result;
60234
- }
60235
-
60236
- toJSON(data?: any) {
60237
- data = typeof data === 'object' ? data : {};
60238
- data["companyId"] = this.companyId;
60239
- data["message"] = this.message;
60240
- data["senderUpn"] = this.senderUpn;
60241
- data["senderName"] = this.senderName;
60242
- data["operationId"] = this.operationId;
60243
- data["operationName"] = this.operationName;
60244
- data["resourceId"] = this.resourceId;
60245
- return data;
60246
- }
60247
- }
60248
-
60249
- export interface IAddDiscussionMessageRequest {
60250
- companyId?: string;
60251
- message?: string;
60252
- senderUpn?: string;
60253
- senderName?: string;
60254
- operationId?: string | null;
60255
- operationName?: string | null;
60256
- resourceId?: string | null;
60257
- }
60258
-
60259
- export class WorkorderDiscussionReadStatusDto implements IWorkorderDiscussionReadStatusDto {
60260
- workorderId?: string;
60261
- operationId?: string | null;
60262
- resourceId?: string | null;
60263
- userUpn?: string;
60264
- lastRead?: Date;
60265
-
60266
- constructor(data?: IWorkorderDiscussionReadStatusDto) {
60267
- if (data) {
60268
- for (var property in data) {
60269
- if (data.hasOwnProperty(property))
60270
- (<any>this)[property] = (<any>data)[property];
60271
- }
60272
- }
60273
- }
60274
-
60275
- init(_data?: any) {
60276
- if (_data) {
60277
- this.workorderId = _data["workorderId"];
60278
- this.operationId = _data["operationId"];
60279
- this.resourceId = _data["resourceId"];
60280
- this.userUpn = _data["userUpn"];
60281
- this.lastRead = _data["lastRead"] ? new Date(_data["lastRead"].toString()) : <any>undefined;
60282
- }
60283
- }
60284
-
60285
- static fromJS(data: any): WorkorderDiscussionReadStatusDto {
60286
- data = typeof data === 'object' ? data : {};
60287
- let result = new WorkorderDiscussionReadStatusDto();
60288
- result.init(data);
60289
- return result;
60290
- }
60291
-
60292
- toJSON(data?: any) {
60293
- data = typeof data === 'object' ? data : {};
60294
- data["workorderId"] = this.workorderId;
60295
- data["operationId"] = this.operationId;
60296
- data["resourceId"] = this.resourceId;
60297
- data["userUpn"] = this.userUpn;
60298
- data["lastRead"] = this.lastRead ? this.lastRead.toISOString() : <any>undefined;
60299
- return data;
60300
- }
60301
- }
60302
-
60303
- export interface IWorkorderDiscussionReadStatusDto {
60304
- workorderId?: string;
60305
- operationId?: string | null;
60306
- resourceId?: string | null;
60307
- userUpn?: string;
60308
- lastRead?: Date;
60309
- }
60310
-
60311
- export class SetDiscussionLastRead implements ISetDiscussionLastRead {
60312
- workorderId?: string;
60313
- operationId?: string | null;
60314
- resourceId?: string | null;
60315
- userUpn?: string;
60316
-
60317
- constructor(data?: ISetDiscussionLastRead) {
60318
- if (data) {
60319
- for (var property in data) {
60320
- if (data.hasOwnProperty(property))
60321
- (<any>this)[property] = (<any>data)[property];
60322
- }
60323
- }
60324
- }
60325
-
60326
- init(_data?: any) {
60327
- if (_data) {
60328
- this.workorderId = _data["workorderId"];
60329
- this.operationId = _data["operationId"];
60330
- this.resourceId = _data["resourceId"];
60331
- this.userUpn = _data["userUpn"];
60332
- }
60333
- }
60334
-
60335
- static fromJS(data: any): SetDiscussionLastRead {
60336
- data = typeof data === 'object' ? data : {};
60337
- let result = new SetDiscussionLastRead();
60338
- result.init(data);
60339
- return result;
60340
- }
60341
-
60342
- toJSON(data?: any) {
60343
- data = typeof data === 'object' ? data : {};
60344
- data["workorderId"] = this.workorderId;
60345
- data["operationId"] = this.operationId;
60346
- data["resourceId"] = this.resourceId;
60347
- data["userUpn"] = this.userUpn;
60348
- return data;
60349
- }
60350
- }
60351
-
60352
- export interface ISetDiscussionLastRead {
60353
- workorderId?: string;
60354
- operationId?: string | null;
60355
- resourceId?: string | null;
60356
- userUpn?: string;
60357
- }
60358
-
60359
59970
  function formatDate(d: Date) {
60360
59971
  return d.getFullYear() + '-' +
60361
59972
  (d.getMonth() < 9 ? ('0' + (d.getMonth()+1)) : (d.getMonth()+1)) + '-' +