@ignos/api-client 20240521.0.9296 → 20240524.0.9327

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.
@@ -738,9 +738,11 @@ export declare class LocateLocationsClient extends AuthorizedApiBase implements
738
738
  protected processSuggestionsLocations(response: Response): Promise<LocationDto[]>;
739
739
  }
740
740
  export interface ILocateTrackingClient {
741
- listTrackingHistory(workOrderId: string): Promise<TrackingHistoryDto>;
742
- createTrackingEvent(workOrderId: string, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
743
- updateTrackingEvent(workOrderId: string, trackingEventId: number, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
741
+ listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
742
+ listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto>;
743
+ createTrackingEvents(locateTrackingUpdates: TrackingUpdateDto[]): Promise<void>;
744
+ createTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
745
+ deleteTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
744
746
  createLabel(workOrderId: string, palletCount: number | undefined): Promise<FileResponse>;
745
747
  }
746
748
  export declare class LocateTrackingClient extends AuthorizedApiBase implements ILocateTrackingClient {
@@ -750,12 +752,16 @@ export declare class LocateTrackingClient extends AuthorizedApiBase implements I
750
752
  constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
751
753
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
752
754
  });
753
- listTrackingHistory(workOrderId: string): Promise<TrackingHistoryDto>;
755
+ listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
754
756
  protected processListTrackingHistory(response: Response): Promise<TrackingHistoryDto>;
755
- createTrackingEvent(workOrderId: string, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
756
- protected processCreateTrackingEvent(response: Response): Promise<TrackingHistoryDto>;
757
- updateTrackingEvent(workOrderId: string, trackingEventId: number, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
758
- protected processUpdateTrackingEvent(response: Response): Promise<TrackingHistoryDto>;
757
+ listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto>;
758
+ protected processListWorkOrderTrackingHistory(response: Response): Promise<TrackingWorkOrderDto>;
759
+ createTrackingEvents(locateTrackingUpdates: TrackingUpdateDto[]): Promise<void>;
760
+ protected processCreateTrackingEvents(response: Response): Promise<void>;
761
+ createTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
762
+ protected processCreateTrackingHistory(response: Response): Promise<void>;
763
+ deleteTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
764
+ protected processDeleteTrackingHistory(response: Response): Promise<void>;
759
765
  createLabel(workOrderId: string, palletCount: number | undefined): Promise<FileResponse>;
760
766
  protected processCreateLabel(response: Response): Promise<FileResponse>;
761
767
  }
@@ -5253,29 +5259,29 @@ export interface ILocationDto {
5253
5259
  }
5254
5260
  export type LocationKindDto = "Warehouse" | "Zone" | "Location";
5255
5261
  export declare class TrackingHistoryDto implements ITrackingHistoryDto {
5262
+ trackingId: string;
5263
+ palletNumber: number;
5256
5264
  workOrderId: string;
5257
5265
  trackingEvents: TrackingEventDto[];
5258
- part: PartDto;
5259
5266
  constructor(data?: ITrackingHistoryDto);
5260
5267
  init(_data?: any): void;
5261
5268
  static fromJS(data: any): TrackingHistoryDto;
5262
5269
  toJSON(data?: any): any;
5263
5270
  }
5264
5271
  export interface ITrackingHistoryDto {
5272
+ trackingId: string;
5273
+ palletNumber: number;
5265
5274
  workOrderId: string;
5266
5275
  trackingEvents: TrackingEventDto[];
5267
- part: PartDto;
5268
5276
  }
5269
5277
  export declare class TrackingEventDto implements ITrackingEventDto {
5270
5278
  id: number;
5271
5279
  created: Date;
5272
5280
  createdBy: string;
5273
- updated: Date;
5274
- updatedBy: string;
5275
5281
  location: LocationDto;
5276
- active: boolean;
5277
- comments?: string | null;
5278
- pallets?: number | null;
5282
+ status: TrackingStatusDto;
5283
+ bookingId?: string | null;
5284
+ comment?: string | null;
5279
5285
  constructor(data?: ITrackingEventDto);
5280
5286
  init(_data?: any): void;
5281
5287
  static fromJS(data: any): TrackingEventDto;
@@ -5285,26 +5291,53 @@ export interface ITrackingEventDto {
5285
5291
  id: number;
5286
5292
  created: Date;
5287
5293
  createdBy: string;
5288
- updated: Date;
5289
- updatedBy: string;
5290
5294
  location: LocationDto;
5291
- active: boolean;
5292
- comments?: string | null;
5293
- pallets?: number | null;
5295
+ status: TrackingStatusDto;
5296
+ bookingId?: string | null;
5297
+ comment?: string | null;
5298
+ }
5299
+ export type TrackingStatusDto = "Manual" | "BookingPending" | "BookingCancelled" | "BookingInProgress" | "BookingComplete";
5300
+ export declare class TrackingWorkOrderDto implements ITrackingWorkOrderDto {
5301
+ workOrderId: string;
5302
+ part: PartDto;
5303
+ trackingHistory: TrackingHistoryDto[];
5304
+ constructor(data?: ITrackingWorkOrderDto);
5305
+ init(_data?: any): void;
5306
+ static fromJS(data: any): TrackingWorkOrderDto;
5307
+ toJSON(data?: any): any;
5308
+ }
5309
+ export interface ITrackingWorkOrderDto {
5310
+ workOrderId: string;
5311
+ part: PartDto;
5312
+ trackingHistory: TrackingHistoryDto[];
5294
5313
  }
5295
5314
  export declare class TrackingUpdateDto implements ITrackingUpdateDto {
5315
+ trackingId: string;
5296
5316
  locationId: string;
5297
- comments?: string | null;
5298
- pallets?: number | null;
5317
+ comment?: string | null;
5299
5318
  constructor(data?: ITrackingUpdateDto);
5300
5319
  init(_data?: any): void;
5301
5320
  static fromJS(data: any): TrackingUpdateDto;
5302
5321
  toJSON(data?: any): any;
5303
5322
  }
5304
5323
  export interface ITrackingUpdateDto {
5324
+ trackingId: string;
5305
5325
  locationId: string;
5306
- comments?: string | null;
5307
- pallets?: number | null;
5326
+ comment?: string | null;
5327
+ }
5328
+ export declare class TrackingHistoryUpdateDto implements ITrackingHistoryUpdateDto {
5329
+ workOrderId: string;
5330
+ locationId: string;
5331
+ comment?: string | null;
5332
+ constructor(data?: ITrackingHistoryUpdateDto);
5333
+ init(_data?: any): void;
5334
+ static fromJS(data: any): TrackingHistoryUpdateDto;
5335
+ toJSON(data?: any): any;
5336
+ }
5337
+ export interface ITrackingHistoryUpdateDto {
5338
+ workOrderId: string;
5339
+ locationId: string;
5340
+ comment?: string | null;
5308
5341
  }
5309
5342
  export declare class SearchWorkOrderDto implements ISearchWorkOrderDto {
5310
5343
  workOrderId: string;
@@ -5798,11 +5798,11 @@ export class LocateTrackingClient extends AuthorizedApiBase {
5798
5798
  this.http = http ? http : window;
5799
5799
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
5800
5800
  }
5801
- listTrackingHistory(workOrderId) {
5802
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}";
5803
- if (workOrderId === undefined || workOrderId === null)
5804
- throw new Error("The parameter 'workOrderId' must be defined.");
5805
- url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
5801
+ listTrackingHistory(trackingId) {
5802
+ let url_ = this.baseUrl + "/locate/tracking/{trackingId}";
5803
+ if (trackingId === undefined || trackingId === null)
5804
+ throw new Error("The parameter 'trackingId' must be defined.");
5805
+ url_ = url_.replace("{trackingId}", encodeURIComponent("" + trackingId));
5806
5806
  url_ = url_.replace(/[?&]$/, "");
5807
5807
  let options_ = {
5808
5808
  method: "GET",
@@ -5838,28 +5838,25 @@ export class LocateTrackingClient extends AuthorizedApiBase {
5838
5838
  }
5839
5839
  return Promise.resolve(null);
5840
5840
  }
5841
- createTrackingEvent(workOrderId, locateTrackingUpdate) {
5842
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}";
5841
+ listWorkOrderTrackingHistory(workOrderId) {
5842
+ let url_ = this.baseUrl + "/locate/tracking/workorder/{workOrderId}";
5843
5843
  if (workOrderId === undefined || workOrderId === null)
5844
5844
  throw new Error("The parameter 'workOrderId' must be defined.");
5845
5845
  url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
5846
5846
  url_ = url_.replace(/[?&]$/, "");
5847
- const content_ = JSON.stringify(locateTrackingUpdate);
5848
5847
  let options_ = {
5849
- body: content_,
5850
- method: "POST",
5848
+ method: "GET",
5851
5849
  headers: {
5852
- "Content-Type": "application/json",
5853
5850
  "Accept": "application/json"
5854
5851
  }
5855
5852
  };
5856
5853
  return this.transformOptions(options_).then(transformedOptions_ => {
5857
5854
  return this.http.fetch(url_, transformedOptions_);
5858
5855
  }).then((_response) => {
5859
- return this.processCreateTrackingEvent(_response);
5856
+ return this.processListWorkOrderTrackingHistory(_response);
5860
5857
  });
5861
5858
  }
5862
- processCreateTrackingEvent(response) {
5859
+ processListWorkOrderTrackingHistory(response) {
5863
5860
  const status = response.status;
5864
5861
  let _headers = {};
5865
5862
  if (response.headers && response.headers.forEach) {
@@ -5870,7 +5867,7 @@ export class LocateTrackingClient extends AuthorizedApiBase {
5870
5867
  return response.text().then((_responseText) => {
5871
5868
  let result200 = null;
5872
5869
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5873
- result200 = TrackingHistoryDto.fromJS(resultData200);
5870
+ result200 = TrackingWorkOrderDto.fromJS(resultData200);
5874
5871
  return result200;
5875
5872
  });
5876
5873
  }
@@ -5881,43 +5878,105 @@ export class LocateTrackingClient extends AuthorizedApiBase {
5881
5878
  }
5882
5879
  return Promise.resolve(null);
5883
5880
  }
5884
- updateTrackingEvent(workOrderId, trackingEventId, locateTrackingUpdate) {
5885
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}/{trackingEventId}";
5886
- if (workOrderId === undefined || workOrderId === null)
5887
- throw new Error("The parameter 'workOrderId' must be defined.");
5888
- url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
5889
- if (trackingEventId === undefined || trackingEventId === null)
5890
- throw new Error("The parameter 'trackingEventId' must be defined.");
5891
- url_ = url_.replace("{trackingEventId}", encodeURIComponent("" + trackingEventId));
5881
+ createTrackingEvents(locateTrackingUpdates) {
5882
+ let url_ = this.baseUrl + "/locate/tracking/event";
5892
5883
  url_ = url_.replace(/[?&]$/, "");
5893
- const content_ = JSON.stringify(locateTrackingUpdate);
5884
+ const content_ = JSON.stringify(locateTrackingUpdates);
5894
5885
  let options_ = {
5895
5886
  body: content_,
5896
- method: "PUT",
5887
+ method: "POST",
5897
5888
  headers: {
5898
5889
  "Content-Type": "application/json",
5899
- "Accept": "application/json"
5900
5890
  }
5901
5891
  };
5902
5892
  return this.transformOptions(options_).then(transformedOptions_ => {
5903
5893
  return this.http.fetch(url_, transformedOptions_);
5904
5894
  }).then((_response) => {
5905
- return this.processUpdateTrackingEvent(_response);
5895
+ return this.processCreateTrackingEvents(_response);
5906
5896
  });
5907
5897
  }
5908
- processUpdateTrackingEvent(response) {
5898
+ processCreateTrackingEvents(response) {
5909
5899
  const status = response.status;
5910
5900
  let _headers = {};
5911
5901
  if (response.headers && response.headers.forEach) {
5912
5902
  response.headers.forEach((v, k) => _headers[k] = v);
5913
5903
  }
5914
5904
  ;
5915
- if (status === 200) {
5905
+ if (status === 204) {
5916
5906
  return response.text().then((_responseText) => {
5917
- let result200 = null;
5918
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
5919
- result200 = TrackingHistoryDto.fromJS(resultData200);
5920
- return result200;
5907
+ return;
5908
+ });
5909
+ }
5910
+ else if (status !== 200 && status !== 204) {
5911
+ return response.text().then((_responseText) => {
5912
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5913
+ });
5914
+ }
5915
+ return Promise.resolve(null);
5916
+ }
5917
+ createTrackingHistory(locateTrackingUpdates) {
5918
+ let url_ = this.baseUrl + "/locate/tracking/history";
5919
+ url_ = url_.replace(/[?&]$/, "");
5920
+ const content_ = JSON.stringify(locateTrackingUpdates);
5921
+ let options_ = {
5922
+ body: content_,
5923
+ method: "POST",
5924
+ headers: {
5925
+ "Content-Type": "application/json",
5926
+ }
5927
+ };
5928
+ return this.transformOptions(options_).then(transformedOptions_ => {
5929
+ return this.http.fetch(url_, transformedOptions_);
5930
+ }).then((_response) => {
5931
+ return this.processCreateTrackingHistory(_response);
5932
+ });
5933
+ }
5934
+ processCreateTrackingHistory(response) {
5935
+ const status = response.status;
5936
+ let _headers = {};
5937
+ if (response.headers && response.headers.forEach) {
5938
+ response.headers.forEach((v, k) => _headers[k] = v);
5939
+ }
5940
+ ;
5941
+ if (status === 204) {
5942
+ return response.text().then((_responseText) => {
5943
+ return;
5944
+ });
5945
+ }
5946
+ else if (status !== 200 && status !== 204) {
5947
+ return response.text().then((_responseText) => {
5948
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5949
+ });
5950
+ }
5951
+ return Promise.resolve(null);
5952
+ }
5953
+ deleteTrackingHistory(locateTrackingUpdates) {
5954
+ let url_ = this.baseUrl + "/locate/tracking/history";
5955
+ url_ = url_.replace(/[?&]$/, "");
5956
+ const content_ = JSON.stringify(locateTrackingUpdates);
5957
+ let options_ = {
5958
+ body: content_,
5959
+ method: "DELETE",
5960
+ headers: {
5961
+ "Content-Type": "application/json",
5962
+ }
5963
+ };
5964
+ return this.transformOptions(options_).then(transformedOptions_ => {
5965
+ return this.http.fetch(url_, transformedOptions_);
5966
+ }).then((_response) => {
5967
+ return this.processDeleteTrackingHistory(_response);
5968
+ });
5969
+ }
5970
+ processDeleteTrackingHistory(response) {
5971
+ const status = response.status;
5972
+ let _headers = {};
5973
+ if (response.headers && response.headers.forEach) {
5974
+ response.headers.forEach((v, k) => _headers[k] = v);
5975
+ }
5976
+ ;
5977
+ if (status === 204) {
5978
+ return response.text().then((_responseText) => {
5979
+ return;
5921
5980
  });
5922
5981
  }
5923
5982
  else if (status !== 200 && status !== 204) {
@@ -24436,18 +24495,18 @@ export class TrackingHistoryDto {
24436
24495
  }
24437
24496
  if (!data) {
24438
24497
  this.trackingEvents = [];
24439
- this.part = new PartDto();
24440
24498
  }
24441
24499
  }
24442
24500
  init(_data) {
24443
24501
  if (_data) {
24502
+ this.trackingId = _data["trackingId"];
24503
+ this.palletNumber = _data["palletNumber"];
24444
24504
  this.workOrderId = _data["workOrderId"];
24445
24505
  if (Array.isArray(_data["trackingEvents"])) {
24446
24506
  this.trackingEvents = [];
24447
24507
  for (let item of _data["trackingEvents"])
24448
24508
  this.trackingEvents.push(TrackingEventDto.fromJS(item));
24449
24509
  }
24450
- this.part = _data["part"] ? PartDto.fromJS(_data["part"]) : new PartDto();
24451
24510
  }
24452
24511
  }
24453
24512
  static fromJS(data) {
@@ -24458,13 +24517,14 @@ export class TrackingHistoryDto {
24458
24517
  }
24459
24518
  toJSON(data) {
24460
24519
  data = typeof data === 'object' ? data : {};
24520
+ data["trackingId"] = this.trackingId;
24521
+ data["palletNumber"] = this.palletNumber;
24461
24522
  data["workOrderId"] = this.workOrderId;
24462
24523
  if (Array.isArray(this.trackingEvents)) {
24463
24524
  data["trackingEvents"] = [];
24464
24525
  for (let item of this.trackingEvents)
24465
24526
  data["trackingEvents"].push(item.toJSON());
24466
24527
  }
24467
- data["part"] = this.part ? this.part.toJSON() : undefined;
24468
24528
  return data;
24469
24529
  }
24470
24530
  }
@@ -24485,12 +24545,10 @@ export class TrackingEventDto {
24485
24545
  this.id = _data["id"];
24486
24546
  this.created = _data["created"] ? new Date(_data["created"].toString()) : undefined;
24487
24547
  this.createdBy = _data["createdBy"];
24488
- this.updated = _data["updated"] ? new Date(_data["updated"].toString()) : undefined;
24489
- this.updatedBy = _data["updatedBy"];
24490
24548
  this.location = _data["location"] ? LocationDto.fromJS(_data["location"]) : new LocationDto();
24491
- this.active = _data["active"];
24492
- this.comments = _data["comments"];
24493
- this.pallets = _data["pallets"];
24549
+ this.status = _data["status"];
24550
+ this.bookingId = _data["bookingId"];
24551
+ this.comment = _data["comment"];
24494
24552
  }
24495
24553
  }
24496
24554
  static fromJS(data) {
@@ -24504,12 +24562,52 @@ export class TrackingEventDto {
24504
24562
  data["id"] = this.id;
24505
24563
  data["created"] = this.created ? this.created.toISOString() : undefined;
24506
24564
  data["createdBy"] = this.createdBy;
24507
- data["updated"] = this.updated ? this.updated.toISOString() : undefined;
24508
- data["updatedBy"] = this.updatedBy;
24509
24565
  data["location"] = this.location ? this.location.toJSON() : undefined;
24510
- data["active"] = this.active;
24511
- data["comments"] = this.comments;
24512
- data["pallets"] = this.pallets;
24566
+ data["status"] = this.status;
24567
+ data["bookingId"] = this.bookingId;
24568
+ data["comment"] = this.comment;
24569
+ return data;
24570
+ }
24571
+ }
24572
+ export class TrackingWorkOrderDto {
24573
+ constructor(data) {
24574
+ if (data) {
24575
+ for (var property in data) {
24576
+ if (data.hasOwnProperty(property))
24577
+ this[property] = data[property];
24578
+ }
24579
+ }
24580
+ if (!data) {
24581
+ this.part = new PartDto();
24582
+ this.trackingHistory = [];
24583
+ }
24584
+ }
24585
+ init(_data) {
24586
+ if (_data) {
24587
+ this.workOrderId = _data["workOrderId"];
24588
+ this.part = _data["part"] ? PartDto.fromJS(_data["part"]) : new PartDto();
24589
+ if (Array.isArray(_data["trackingHistory"])) {
24590
+ this.trackingHistory = [];
24591
+ for (let item of _data["trackingHistory"])
24592
+ this.trackingHistory.push(TrackingHistoryDto.fromJS(item));
24593
+ }
24594
+ }
24595
+ }
24596
+ static fromJS(data) {
24597
+ data = typeof data === 'object' ? data : {};
24598
+ let result = new TrackingWorkOrderDto();
24599
+ result.init(data);
24600
+ return result;
24601
+ }
24602
+ toJSON(data) {
24603
+ data = typeof data === 'object' ? data : {};
24604
+ data["workOrderId"] = this.workOrderId;
24605
+ data["part"] = this.part ? this.part.toJSON() : undefined;
24606
+ if (Array.isArray(this.trackingHistory)) {
24607
+ data["trackingHistory"] = [];
24608
+ for (let item of this.trackingHistory)
24609
+ data["trackingHistory"].push(item.toJSON());
24610
+ }
24513
24611
  return data;
24514
24612
  }
24515
24613
  }
@@ -24524,9 +24622,9 @@ export class TrackingUpdateDto {
24524
24622
  }
24525
24623
  init(_data) {
24526
24624
  if (_data) {
24625
+ this.trackingId = _data["trackingId"];
24527
24626
  this.locationId = _data["locationId"];
24528
- this.comments = _data["comments"];
24529
- this.pallets = _data["pallets"];
24627
+ this.comment = _data["comment"];
24530
24628
  }
24531
24629
  }
24532
24630
  static fromJS(data) {
@@ -24537,9 +24635,39 @@ export class TrackingUpdateDto {
24537
24635
  }
24538
24636
  toJSON(data) {
24539
24637
  data = typeof data === 'object' ? data : {};
24638
+ data["trackingId"] = this.trackingId;
24540
24639
  data["locationId"] = this.locationId;
24541
- data["comments"] = this.comments;
24542
- data["pallets"] = this.pallets;
24640
+ data["comment"] = this.comment;
24641
+ return data;
24642
+ }
24643
+ }
24644
+ export class TrackingHistoryUpdateDto {
24645
+ constructor(data) {
24646
+ if (data) {
24647
+ for (var property in data) {
24648
+ if (data.hasOwnProperty(property))
24649
+ this[property] = data[property];
24650
+ }
24651
+ }
24652
+ }
24653
+ init(_data) {
24654
+ if (_data) {
24655
+ this.workOrderId = _data["workOrderId"];
24656
+ this.locationId = _data["locationId"];
24657
+ this.comment = _data["comment"];
24658
+ }
24659
+ }
24660
+ static fromJS(data) {
24661
+ data = typeof data === 'object' ? data : {};
24662
+ let result = new TrackingHistoryUpdateDto();
24663
+ result.init(data);
24664
+ return result;
24665
+ }
24666
+ toJSON(data) {
24667
+ data = typeof data === 'object' ? data : {};
24668
+ data["workOrderId"] = this.workOrderId;
24669
+ data["locationId"] = this.locationId;
24670
+ data["comment"] = this.comment;
24543
24671
  return data;
24544
24672
  }
24545
24673
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20240521.0.9296",
3
+ "version": "20240524.0.9327",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -6195,11 +6195,15 @@ export class LocateLocationsClient extends AuthorizedApiBase implements ILocateL
6195
6195
 
6196
6196
  export interface ILocateTrackingClient {
6197
6197
 
6198
- listTrackingHistory(workOrderId: string): Promise<TrackingHistoryDto>;
6198
+ listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
6199
6199
 
6200
- createTrackingEvent(workOrderId: string, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
6200
+ listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto>;
6201
6201
 
6202
- updateTrackingEvent(workOrderId: string, trackingEventId: number, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto>;
6202
+ createTrackingEvents(locateTrackingUpdates: TrackingUpdateDto[]): Promise<void>;
6203
+
6204
+ createTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
6205
+
6206
+ deleteTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
6203
6207
 
6204
6208
  createLabel(workOrderId: string, palletCount: number | undefined): Promise<FileResponse>;
6205
6209
  }
@@ -6215,11 +6219,11 @@ export class LocateTrackingClient extends AuthorizedApiBase implements ILocateTr
6215
6219
  this.baseUrl = baseUrl ?? "";
6216
6220
  }
6217
6221
 
6218
- listTrackingHistory(workOrderId: string): Promise<TrackingHistoryDto> {
6219
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}";
6220
- if (workOrderId === undefined || workOrderId === null)
6221
- throw new Error("The parameter 'workOrderId' must be defined.");
6222
- url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
6222
+ listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto> {
6223
+ let url_ = this.baseUrl + "/locate/tracking/{trackingId}";
6224
+ if (trackingId === undefined || trackingId === null)
6225
+ throw new Error("The parameter 'trackingId' must be defined.");
6226
+ url_ = url_.replace("{trackingId}", encodeURIComponent("" + trackingId));
6223
6227
  url_ = url_.replace(/[?&]$/, "");
6224
6228
 
6225
6229
  let options_: RequestInit = {
@@ -6254,20 +6258,16 @@ export class LocateTrackingClient extends AuthorizedApiBase implements ILocateTr
6254
6258
  return Promise.resolve<TrackingHistoryDto>(null as any);
6255
6259
  }
6256
6260
 
6257
- createTrackingEvent(workOrderId: string, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto> {
6258
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}";
6261
+ listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto> {
6262
+ let url_ = this.baseUrl + "/locate/tracking/workorder/{workOrderId}";
6259
6263
  if (workOrderId === undefined || workOrderId === null)
6260
6264
  throw new Error("The parameter 'workOrderId' must be defined.");
6261
6265
  url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
6262
6266
  url_ = url_.replace(/[?&]$/, "");
6263
6267
 
6264
- const content_ = JSON.stringify(locateTrackingUpdate);
6265
-
6266
6268
  let options_: RequestInit = {
6267
- body: content_,
6268
- method: "POST",
6269
+ method: "GET",
6269
6270
  headers: {
6270
- "Content-Type": "application/json",
6271
6271
  "Accept": "application/json"
6272
6272
  }
6273
6273
  };
@@ -6275,18 +6275,18 @@ export class LocateTrackingClient extends AuthorizedApiBase implements ILocateTr
6275
6275
  return this.transformOptions(options_).then(transformedOptions_ => {
6276
6276
  return this.http.fetch(url_, transformedOptions_);
6277
6277
  }).then((_response: Response) => {
6278
- return this.processCreateTrackingEvent(_response);
6278
+ return this.processListWorkOrderTrackingHistory(_response);
6279
6279
  });
6280
6280
  }
6281
6281
 
6282
- protected processCreateTrackingEvent(response: Response): Promise<TrackingHistoryDto> {
6282
+ protected processListWorkOrderTrackingHistory(response: Response): Promise<TrackingWorkOrderDto> {
6283
6283
  const status = response.status;
6284
6284
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6285
6285
  if (status === 200) {
6286
6286
  return response.text().then((_responseText) => {
6287
6287
  let result200: any = null;
6288
6288
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6289
- result200 = TrackingHistoryDto.fromJS(resultData200);
6289
+ result200 = TrackingWorkOrderDto.fromJS(resultData200);
6290
6290
  return result200;
6291
6291
  });
6292
6292
  } else if (status !== 200 && status !== 204) {
@@ -6294,53 +6294,115 @@ export class LocateTrackingClient extends AuthorizedApiBase implements ILocateTr
6294
6294
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6295
6295
  });
6296
6296
  }
6297
- return Promise.resolve<TrackingHistoryDto>(null as any);
6297
+ return Promise.resolve<TrackingWorkOrderDto>(null as any);
6298
6298
  }
6299
6299
 
6300
- updateTrackingEvent(workOrderId: string, trackingEventId: number, locateTrackingUpdate: TrackingUpdateDto): Promise<TrackingHistoryDto> {
6301
- let url_ = this.baseUrl + "/locate/tracking/{workOrderId}/{trackingEventId}";
6302
- if (workOrderId === undefined || workOrderId === null)
6303
- throw new Error("The parameter 'workOrderId' must be defined.");
6304
- url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
6305
- if (trackingEventId === undefined || trackingEventId === null)
6306
- throw new Error("The parameter 'trackingEventId' must be defined.");
6307
- url_ = url_.replace("{trackingEventId}", encodeURIComponent("" + trackingEventId));
6300
+ createTrackingEvents(locateTrackingUpdates: TrackingUpdateDto[]): Promise<void> {
6301
+ let url_ = this.baseUrl + "/locate/tracking/event";
6308
6302
  url_ = url_.replace(/[?&]$/, "");
6309
6303
 
6310
- const content_ = JSON.stringify(locateTrackingUpdate);
6304
+ const content_ = JSON.stringify(locateTrackingUpdates);
6311
6305
 
6312
6306
  let options_: RequestInit = {
6313
6307
  body: content_,
6314
- method: "PUT",
6308
+ method: "POST",
6315
6309
  headers: {
6316
6310
  "Content-Type": "application/json",
6317
- "Accept": "application/json"
6318
6311
  }
6319
6312
  };
6320
6313
 
6321
6314
  return this.transformOptions(options_).then(transformedOptions_ => {
6322
6315
  return this.http.fetch(url_, transformedOptions_);
6323
6316
  }).then((_response: Response) => {
6324
- return this.processUpdateTrackingEvent(_response);
6317
+ return this.processCreateTrackingEvents(_response);
6325
6318
  });
6326
6319
  }
6327
6320
 
6328
- protected processUpdateTrackingEvent(response: Response): Promise<TrackingHistoryDto> {
6321
+ protected processCreateTrackingEvents(response: Response): Promise<void> {
6329
6322
  const status = response.status;
6330
6323
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6331
- if (status === 200) {
6324
+ if (status === 204) {
6332
6325
  return response.text().then((_responseText) => {
6333
- let result200: any = null;
6334
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
6335
- result200 = TrackingHistoryDto.fromJS(resultData200);
6336
- return result200;
6326
+ return;
6337
6327
  });
6338
6328
  } else if (status !== 200 && status !== 204) {
6339
6329
  return response.text().then((_responseText) => {
6340
6330
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6341
6331
  });
6342
6332
  }
6343
- return Promise.resolve<TrackingHistoryDto>(null as any);
6333
+ return Promise.resolve<void>(null as any);
6334
+ }
6335
+
6336
+ createTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void> {
6337
+ let url_ = this.baseUrl + "/locate/tracking/history";
6338
+ url_ = url_.replace(/[?&]$/, "");
6339
+
6340
+ const content_ = JSON.stringify(locateTrackingUpdates);
6341
+
6342
+ let options_: RequestInit = {
6343
+ body: content_,
6344
+ method: "POST",
6345
+ headers: {
6346
+ "Content-Type": "application/json",
6347
+ }
6348
+ };
6349
+
6350
+ return this.transformOptions(options_).then(transformedOptions_ => {
6351
+ return this.http.fetch(url_, transformedOptions_);
6352
+ }).then((_response: Response) => {
6353
+ return this.processCreateTrackingHistory(_response);
6354
+ });
6355
+ }
6356
+
6357
+ protected processCreateTrackingHistory(response: Response): Promise<void> {
6358
+ const status = response.status;
6359
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6360
+ if (status === 204) {
6361
+ return response.text().then((_responseText) => {
6362
+ return;
6363
+ });
6364
+ } else if (status !== 200 && status !== 204) {
6365
+ return response.text().then((_responseText) => {
6366
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6367
+ });
6368
+ }
6369
+ return Promise.resolve<void>(null as any);
6370
+ }
6371
+
6372
+ deleteTrackingHistory(locateTrackingUpdates: TrackingHistoryUpdateDto[]): Promise<void> {
6373
+ let url_ = this.baseUrl + "/locate/tracking/history";
6374
+ url_ = url_.replace(/[?&]$/, "");
6375
+
6376
+ const content_ = JSON.stringify(locateTrackingUpdates);
6377
+
6378
+ let options_: RequestInit = {
6379
+ body: content_,
6380
+ method: "DELETE",
6381
+ headers: {
6382
+ "Content-Type": "application/json",
6383
+ }
6384
+ };
6385
+
6386
+ return this.transformOptions(options_).then(transformedOptions_ => {
6387
+ return this.http.fetch(url_, transformedOptions_);
6388
+ }).then((_response: Response) => {
6389
+ return this.processDeleteTrackingHistory(_response);
6390
+ });
6391
+ }
6392
+
6393
+ protected processDeleteTrackingHistory(response: Response): Promise<void> {
6394
+ const status = response.status;
6395
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
6396
+ if (status === 204) {
6397
+ return response.text().then((_responseText) => {
6398
+ return;
6399
+ });
6400
+ } else if (status !== 200 && status !== 204) {
6401
+ return response.text().then((_responseText) => {
6402
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
6403
+ });
6404
+ }
6405
+ return Promise.resolve<void>(null as any);
6344
6406
  }
6345
6407
 
6346
6408
  createLabel(workOrderId: string, palletCount: number | undefined): Promise<FileResponse> {
@@ -28728,9 +28790,10 @@ export interface ILocationDto {
28728
28790
  export type LocationKindDto = "Warehouse" | "Zone" | "Location";
28729
28791
 
28730
28792
  export class TrackingHistoryDto implements ITrackingHistoryDto {
28793
+ trackingId!: string;
28794
+ palletNumber!: number;
28731
28795
  workOrderId!: string;
28732
28796
  trackingEvents!: TrackingEventDto[];
28733
- part!: PartDto;
28734
28797
 
28735
28798
  constructor(data?: ITrackingHistoryDto) {
28736
28799
  if (data) {
@@ -28741,19 +28804,19 @@ export class TrackingHistoryDto implements ITrackingHistoryDto {
28741
28804
  }
28742
28805
  if (!data) {
28743
28806
  this.trackingEvents = [];
28744
- this.part = new PartDto();
28745
28807
  }
28746
28808
  }
28747
28809
 
28748
28810
  init(_data?: any) {
28749
28811
  if (_data) {
28812
+ this.trackingId = _data["trackingId"];
28813
+ this.palletNumber = _data["palletNumber"];
28750
28814
  this.workOrderId = _data["workOrderId"];
28751
28815
  if (Array.isArray(_data["trackingEvents"])) {
28752
28816
  this.trackingEvents = [] as any;
28753
28817
  for (let item of _data["trackingEvents"])
28754
28818
  this.trackingEvents!.push(TrackingEventDto.fromJS(item));
28755
28819
  }
28756
- this.part = _data["part"] ? PartDto.fromJS(_data["part"]) : new PartDto();
28757
28820
  }
28758
28821
  }
28759
28822
 
@@ -28766,33 +28829,33 @@ export class TrackingHistoryDto implements ITrackingHistoryDto {
28766
28829
 
28767
28830
  toJSON(data?: any) {
28768
28831
  data = typeof data === 'object' ? data : {};
28832
+ data["trackingId"] = this.trackingId;
28833
+ data["palletNumber"] = this.palletNumber;
28769
28834
  data["workOrderId"] = this.workOrderId;
28770
28835
  if (Array.isArray(this.trackingEvents)) {
28771
28836
  data["trackingEvents"] = [];
28772
28837
  for (let item of this.trackingEvents)
28773
28838
  data["trackingEvents"].push(item.toJSON());
28774
28839
  }
28775
- data["part"] = this.part ? this.part.toJSON() : <any>undefined;
28776
28840
  return data;
28777
28841
  }
28778
28842
  }
28779
28843
 
28780
28844
  export interface ITrackingHistoryDto {
28845
+ trackingId: string;
28846
+ palletNumber: number;
28781
28847
  workOrderId: string;
28782
28848
  trackingEvents: TrackingEventDto[];
28783
- part: PartDto;
28784
28849
  }
28785
28850
 
28786
28851
  export class TrackingEventDto implements ITrackingEventDto {
28787
28852
  id!: number;
28788
28853
  created!: Date;
28789
28854
  createdBy!: string;
28790
- updated!: Date;
28791
- updatedBy!: string;
28792
28855
  location!: LocationDto;
28793
- active!: boolean;
28794
- comments?: string | null;
28795
- pallets?: number | null;
28856
+ status!: TrackingStatusDto;
28857
+ bookingId?: string | null;
28858
+ comment?: string | null;
28796
28859
 
28797
28860
  constructor(data?: ITrackingEventDto) {
28798
28861
  if (data) {
@@ -28811,12 +28874,10 @@ export class TrackingEventDto implements ITrackingEventDto {
28811
28874
  this.id = _data["id"];
28812
28875
  this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
28813
28876
  this.createdBy = _data["createdBy"];
28814
- this.updated = _data["updated"] ? new Date(_data["updated"].toString()) : <any>undefined;
28815
- this.updatedBy = _data["updatedBy"];
28816
28877
  this.location = _data["location"] ? LocationDto.fromJS(_data["location"]) : new LocationDto();
28817
- this.active = _data["active"];
28818
- this.comments = _data["comments"];
28819
- this.pallets = _data["pallets"];
28878
+ this.status = _data["status"];
28879
+ this.bookingId = _data["bookingId"];
28880
+ this.comment = _data["comment"];
28820
28881
  }
28821
28882
  }
28822
28883
 
@@ -28832,12 +28893,10 @@ export class TrackingEventDto implements ITrackingEventDto {
28832
28893
  data["id"] = this.id;
28833
28894
  data["created"] = this.created ? this.created.toISOString() : <any>undefined;
28834
28895
  data["createdBy"] = this.createdBy;
28835
- data["updated"] = this.updated ? this.updated.toISOString() : <any>undefined;
28836
- data["updatedBy"] = this.updatedBy;
28837
28896
  data["location"] = this.location ? this.location.toJSON() : <any>undefined;
28838
- data["active"] = this.active;
28839
- data["comments"] = this.comments;
28840
- data["pallets"] = this.pallets;
28897
+ data["status"] = this.status;
28898
+ data["bookingId"] = this.bookingId;
28899
+ data["comment"] = this.comment;
28841
28900
  return data;
28842
28901
  }
28843
28902
  }
@@ -28846,18 +28905,74 @@ export interface ITrackingEventDto {
28846
28905
  id: number;
28847
28906
  created: Date;
28848
28907
  createdBy: string;
28849
- updated: Date;
28850
- updatedBy: string;
28851
28908
  location: LocationDto;
28852
- active: boolean;
28853
- comments?: string | null;
28854
- pallets?: number | null;
28909
+ status: TrackingStatusDto;
28910
+ bookingId?: string | null;
28911
+ comment?: string | null;
28912
+ }
28913
+
28914
+ export type TrackingStatusDto = "Manual" | "BookingPending" | "BookingCancelled" | "BookingInProgress" | "BookingComplete";
28915
+
28916
+ export class TrackingWorkOrderDto implements ITrackingWorkOrderDto {
28917
+ workOrderId!: string;
28918
+ part!: PartDto;
28919
+ trackingHistory!: TrackingHistoryDto[];
28920
+
28921
+ constructor(data?: ITrackingWorkOrderDto) {
28922
+ if (data) {
28923
+ for (var property in data) {
28924
+ if (data.hasOwnProperty(property))
28925
+ (<any>this)[property] = (<any>data)[property];
28926
+ }
28927
+ }
28928
+ if (!data) {
28929
+ this.part = new PartDto();
28930
+ this.trackingHistory = [];
28931
+ }
28932
+ }
28933
+
28934
+ init(_data?: any) {
28935
+ if (_data) {
28936
+ this.workOrderId = _data["workOrderId"];
28937
+ this.part = _data["part"] ? PartDto.fromJS(_data["part"]) : new PartDto();
28938
+ if (Array.isArray(_data["trackingHistory"])) {
28939
+ this.trackingHistory = [] as any;
28940
+ for (let item of _data["trackingHistory"])
28941
+ this.trackingHistory!.push(TrackingHistoryDto.fromJS(item));
28942
+ }
28943
+ }
28944
+ }
28945
+
28946
+ static fromJS(data: any): TrackingWorkOrderDto {
28947
+ data = typeof data === 'object' ? data : {};
28948
+ let result = new TrackingWorkOrderDto();
28949
+ result.init(data);
28950
+ return result;
28951
+ }
28952
+
28953
+ toJSON(data?: any) {
28954
+ data = typeof data === 'object' ? data : {};
28955
+ data["workOrderId"] = this.workOrderId;
28956
+ data["part"] = this.part ? this.part.toJSON() : <any>undefined;
28957
+ if (Array.isArray(this.trackingHistory)) {
28958
+ data["trackingHistory"] = [];
28959
+ for (let item of this.trackingHistory)
28960
+ data["trackingHistory"].push(item.toJSON());
28961
+ }
28962
+ return data;
28963
+ }
28964
+ }
28965
+
28966
+ export interface ITrackingWorkOrderDto {
28967
+ workOrderId: string;
28968
+ part: PartDto;
28969
+ trackingHistory: TrackingHistoryDto[];
28855
28970
  }
28856
28971
 
28857
28972
  export class TrackingUpdateDto implements ITrackingUpdateDto {
28973
+ trackingId!: string;
28858
28974
  locationId!: string;
28859
- comments?: string | null;
28860
- pallets?: number | null;
28975
+ comment?: string | null;
28861
28976
 
28862
28977
  constructor(data?: ITrackingUpdateDto) {
28863
28978
  if (data) {
@@ -28870,9 +28985,9 @@ export class TrackingUpdateDto implements ITrackingUpdateDto {
28870
28985
 
28871
28986
  init(_data?: any) {
28872
28987
  if (_data) {
28988
+ this.trackingId = _data["trackingId"];
28873
28989
  this.locationId = _data["locationId"];
28874
- this.comments = _data["comments"];
28875
- this.pallets = _data["pallets"];
28990
+ this.comment = _data["comment"];
28876
28991
  }
28877
28992
  }
28878
28993
 
@@ -28885,17 +29000,61 @@ export class TrackingUpdateDto implements ITrackingUpdateDto {
28885
29000
 
28886
29001
  toJSON(data?: any) {
28887
29002
  data = typeof data === 'object' ? data : {};
29003
+ data["trackingId"] = this.trackingId;
28888
29004
  data["locationId"] = this.locationId;
28889
- data["comments"] = this.comments;
28890
- data["pallets"] = this.pallets;
29005
+ data["comment"] = this.comment;
28891
29006
  return data;
28892
29007
  }
28893
29008
  }
28894
29009
 
28895
29010
  export interface ITrackingUpdateDto {
29011
+ trackingId: string;
28896
29012
  locationId: string;
28897
- comments?: string | null;
28898
- pallets?: number | null;
29013
+ comment?: string | null;
29014
+ }
29015
+
29016
+ export class TrackingHistoryUpdateDto implements ITrackingHistoryUpdateDto {
29017
+ workOrderId!: string;
29018
+ locationId!: string;
29019
+ comment?: string | null;
29020
+
29021
+ constructor(data?: ITrackingHistoryUpdateDto) {
29022
+ if (data) {
29023
+ for (var property in data) {
29024
+ if (data.hasOwnProperty(property))
29025
+ (<any>this)[property] = (<any>data)[property];
29026
+ }
29027
+ }
29028
+ }
29029
+
29030
+ init(_data?: any) {
29031
+ if (_data) {
29032
+ this.workOrderId = _data["workOrderId"];
29033
+ this.locationId = _data["locationId"];
29034
+ this.comment = _data["comment"];
29035
+ }
29036
+ }
29037
+
29038
+ static fromJS(data: any): TrackingHistoryUpdateDto {
29039
+ data = typeof data === 'object' ? data : {};
29040
+ let result = new TrackingHistoryUpdateDto();
29041
+ result.init(data);
29042
+ return result;
29043
+ }
29044
+
29045
+ toJSON(data?: any) {
29046
+ data = typeof data === 'object' ? data : {};
29047
+ data["workOrderId"] = this.workOrderId;
29048
+ data["locationId"] = this.locationId;
29049
+ data["comment"] = this.comment;
29050
+ return data;
29051
+ }
29052
+ }
29053
+
29054
+ export interface ITrackingHistoryUpdateDto {
29055
+ workOrderId: string;
29056
+ locationId: string;
29057
+ comment?: string | null;
28899
29058
  }
28900
29059
 
28901
29060
  export class SearchWorkOrderDto implements ISearchWorkOrderDto {