@ignos/api-client 20240528.0.9355 → 20240531.0.9386

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.
@@ -3745,24 +3745,26 @@ export class TraceClient extends AuthorizedApiBase implements ITraceClient {
3745
3745
  }
3746
3746
  }
3747
3747
 
3748
- export interface IBookingClient {
3748
+ export interface IMoveBookingClient {
3749
3749
 
3750
- listBookings(request: BookingRequestListDto): Promise<BookingResponseListDto>;
3750
+ listBookings(request: BookingRequestListDto): Promise<BookingListDto>;
3751
3751
 
3752
- getBooking(bookingId: string): Promise<BookingResponseDto>;
3752
+ getBooking(bookingId: string): Promise<BookingDto>;
3753
3753
 
3754
- updateBooking(bookingId: string, bookingRequest: BookingRequestDto): Promise<void>;
3754
+ updateBooking(bookingId: string, bookingRequest: BookingRequestDto): Promise<BookingDto>;
3755
3755
 
3756
- createBooking(bookingRequest: BookingRequestDto): Promise<void>;
3756
+ getWorkOrderBooking(workOrderId: string): Promise<BookingDto[]>;
3757
3757
 
3758
- cancelBooking(bookingUpdate: BookingUpdateDto): Promise<void>;
3758
+ createBooking(bookingRequest: BookingRequestDto): Promise<BookingDto>;
3759
3759
 
3760
- startDelivery(bookingUpdate: BookingUpdateDto): Promise<void>;
3760
+ cancelBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
3761
3761
 
3762
- finishDelivery(bookingUpdate: BookingDeliveryUpdateDto): Promise<void>;
3762
+ startDelivery(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
3763
+
3764
+ finishDelivery(bookingUpdate: BookingDeliveryUpdateDto): Promise<BookingDto>;
3763
3765
  }
3764
3766
 
3765
- export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3767
+ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBookingClient {
3766
3768
  private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
3767
3769
  private baseUrl: string;
3768
3770
  protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
@@ -3773,7 +3775,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3773
3775
  this.baseUrl = baseUrl ?? "";
3774
3776
  }
3775
3777
 
3776
- listBookings(request: BookingRequestListDto): Promise<BookingResponseListDto> {
3778
+ listBookings(request: BookingRequestListDto): Promise<BookingListDto> {
3777
3779
  let url_ = this.baseUrl + "/move/booking/list";
3778
3780
  url_ = url_.replace(/[?&]$/, "");
3779
3781
 
@@ -3795,14 +3797,14 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3795
3797
  });
3796
3798
  }
3797
3799
 
3798
- protected processListBookings(response: Response): Promise<BookingResponseListDto> {
3800
+ protected processListBookings(response: Response): Promise<BookingListDto> {
3799
3801
  const status = response.status;
3800
3802
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3801
3803
  if (status === 200) {
3802
3804
  return response.text().then((_responseText) => {
3803
3805
  let result200: any = null;
3804
3806
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3805
- result200 = BookingResponseListDto.fromJS(resultData200);
3807
+ result200 = BookingListDto.fromJS(resultData200);
3806
3808
  return result200;
3807
3809
  });
3808
3810
  } else if (status !== 200 && status !== 204) {
@@ -3810,10 +3812,10 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3810
3812
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3811
3813
  });
3812
3814
  }
3813
- return Promise.resolve<BookingResponseListDto>(null as any);
3815
+ return Promise.resolve<BookingListDto>(null as any);
3814
3816
  }
3815
3817
 
3816
- getBooking(bookingId: string): Promise<BookingResponseDto> {
3818
+ getBooking(bookingId: string): Promise<BookingDto> {
3817
3819
  let url_ = this.baseUrl + "/move/booking/{bookingId}";
3818
3820
  if (bookingId === undefined || bookingId === null)
3819
3821
  throw new Error("The parameter 'bookingId' must be defined.");
@@ -3834,14 +3836,14 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3834
3836
  });
3835
3837
  }
3836
3838
 
3837
- protected processGetBooking(response: Response): Promise<BookingResponseDto> {
3839
+ protected processGetBooking(response: Response): Promise<BookingDto> {
3838
3840
  const status = response.status;
3839
3841
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3840
3842
  if (status === 200) {
3841
3843
  return response.text().then((_responseText) => {
3842
3844
  let result200: any = null;
3843
3845
  let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3844
- result200 = BookingResponseDto.fromJS(resultData200);
3846
+ result200 = BookingDto.fromJS(resultData200);
3845
3847
  return result200;
3846
3848
  });
3847
3849
  } else if (status !== 200 && status !== 204) {
@@ -3849,10 +3851,10 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3849
3851
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3850
3852
  });
3851
3853
  }
3852
- return Promise.resolve<BookingResponseDto>(null as any);
3854
+ return Promise.resolve<BookingDto>(null as any);
3853
3855
  }
3854
3856
 
3855
- updateBooking(bookingId: string, bookingRequest: BookingRequestDto): Promise<void> {
3857
+ updateBooking(bookingId: string, bookingRequest: BookingRequestDto): Promise<BookingDto> {
3856
3858
  let url_ = this.baseUrl + "/move/booking/{bookingId}";
3857
3859
  if (bookingId === undefined || bookingId === null)
3858
3860
  throw new Error("The parameter 'bookingId' must be defined.");
@@ -3866,6 +3868,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3866
3868
  method: "PUT",
3867
3869
  headers: {
3868
3870
  "Content-Type": "application/json",
3871
+ "Accept": "application/json"
3869
3872
  }
3870
3873
  };
3871
3874
 
@@ -3876,22 +3879,68 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3876
3879
  });
3877
3880
  }
3878
3881
 
3879
- protected processUpdateBooking(response: Response): Promise<void> {
3882
+ protected processUpdateBooking(response: Response): Promise<BookingDto> {
3880
3883
  const status = response.status;
3881
3884
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3882
- if (status === 204) {
3885
+ if (status === 200) {
3883
3886
  return response.text().then((_responseText) => {
3884
- return;
3887
+ let result200: any = null;
3888
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3889
+ result200 = BookingDto.fromJS(resultData200);
3890
+ return result200;
3885
3891
  });
3886
3892
  } else if (status !== 200 && status !== 204) {
3887
3893
  return response.text().then((_responseText) => {
3888
3894
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3889
3895
  });
3890
3896
  }
3891
- return Promise.resolve<void>(null as any);
3897
+ return Promise.resolve<BookingDto>(null as any);
3898
+ }
3899
+
3900
+ getWorkOrderBooking(workOrderId: string): Promise<BookingDto[]> {
3901
+ let url_ = this.baseUrl + "/move/booking/workorder/{workOrderId}";
3902
+ if (workOrderId === undefined || workOrderId === null)
3903
+ throw new Error("The parameter 'workOrderId' must be defined.");
3904
+ url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
3905
+ url_ = url_.replace(/[?&]$/, "");
3906
+
3907
+ let options_: RequestInit = {
3908
+ method: "GET",
3909
+ headers: {
3910
+ "Accept": "application/json"
3911
+ }
3912
+ };
3913
+
3914
+ return this.transformOptions(options_).then(transformedOptions_ => {
3915
+ return this.http.fetch(url_, transformedOptions_);
3916
+ }).then((_response: Response) => {
3917
+ return this.processGetWorkOrderBooking(_response);
3918
+ });
3892
3919
  }
3893
3920
 
3894
- createBooking(bookingRequest: BookingRequestDto): Promise<void> {
3921
+ protected processGetWorkOrderBooking(response: Response): Promise<BookingDto[]> {
3922
+ const status = response.status;
3923
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3924
+ if (status === 200) {
3925
+ return response.text().then((_responseText) => {
3926
+ let result200: any = null;
3927
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3928
+ if (Array.isArray(resultData200)) {
3929
+ result200 = [] as any;
3930
+ for (let item of resultData200)
3931
+ result200!.push(BookingDto.fromJS(item));
3932
+ }
3933
+ return result200;
3934
+ });
3935
+ } else if (status !== 200 && status !== 204) {
3936
+ return response.text().then((_responseText) => {
3937
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3938
+ });
3939
+ }
3940
+ return Promise.resolve<BookingDto[]>(null as any);
3941
+ }
3942
+
3943
+ createBooking(bookingRequest: BookingRequestDto): Promise<BookingDto> {
3895
3944
  let url_ = this.baseUrl + "/move/booking/book";
3896
3945
  url_ = url_.replace(/[?&]$/, "");
3897
3946
 
@@ -3902,6 +3951,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3902
3951
  method: "POST",
3903
3952
  headers: {
3904
3953
  "Content-Type": "application/json",
3954
+ "Accept": "application/json"
3905
3955
  }
3906
3956
  };
3907
3957
 
@@ -3912,22 +3962,25 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3912
3962
  });
3913
3963
  }
3914
3964
 
3915
- protected processCreateBooking(response: Response): Promise<void> {
3965
+ protected processCreateBooking(response: Response): Promise<BookingDto> {
3916
3966
  const status = response.status;
3917
3967
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3918
- if (status === 204) {
3968
+ if (status === 200) {
3919
3969
  return response.text().then((_responseText) => {
3920
- return;
3970
+ let result200: any = null;
3971
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
3972
+ result200 = BookingDto.fromJS(resultData200);
3973
+ return result200;
3921
3974
  });
3922
3975
  } else if (status !== 200 && status !== 204) {
3923
3976
  return response.text().then((_responseText) => {
3924
3977
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3925
3978
  });
3926
3979
  }
3927
- return Promise.resolve<void>(null as any);
3980
+ return Promise.resolve<BookingDto>(null as any);
3928
3981
  }
3929
3982
 
3930
- cancelBooking(bookingUpdate: BookingUpdateDto): Promise<void> {
3983
+ cancelBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto> {
3931
3984
  let url_ = this.baseUrl + "/move/booking/cancel";
3932
3985
  url_ = url_.replace(/[?&]$/, "");
3933
3986
 
@@ -3938,6 +3991,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3938
3991
  method: "POST",
3939
3992
  headers: {
3940
3993
  "Content-Type": "application/json",
3994
+ "Accept": "application/json"
3941
3995
  }
3942
3996
  };
3943
3997
 
@@ -3948,22 +4002,25 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3948
4002
  });
3949
4003
  }
3950
4004
 
3951
- protected processCancelBooking(response: Response): Promise<void> {
4005
+ protected processCancelBooking(response: Response): Promise<BookingDto> {
3952
4006
  const status = response.status;
3953
4007
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3954
- if (status === 204) {
4008
+ if (status === 200) {
3955
4009
  return response.text().then((_responseText) => {
3956
- return;
4010
+ let result200: any = null;
4011
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4012
+ result200 = BookingDto.fromJS(resultData200);
4013
+ return result200;
3957
4014
  });
3958
4015
  } else if (status !== 200 && status !== 204) {
3959
4016
  return response.text().then((_responseText) => {
3960
4017
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3961
4018
  });
3962
4019
  }
3963
- return Promise.resolve<void>(null as any);
4020
+ return Promise.resolve<BookingDto>(null as any);
3964
4021
  }
3965
4022
 
3966
- startDelivery(bookingUpdate: BookingUpdateDto): Promise<void> {
4023
+ startDelivery(bookingUpdate: BookingUpdateDto): Promise<BookingDto> {
3967
4024
  let url_ = this.baseUrl + "/move/booking/startdelivery";
3968
4025
  url_ = url_.replace(/[?&]$/, "");
3969
4026
 
@@ -3974,6 +4031,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3974
4031
  method: "POST",
3975
4032
  headers: {
3976
4033
  "Content-Type": "application/json",
4034
+ "Accept": "application/json"
3977
4035
  }
3978
4036
  };
3979
4037
 
@@ -3984,22 +4042,25 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
3984
4042
  });
3985
4043
  }
3986
4044
 
3987
- protected processStartDelivery(response: Response): Promise<void> {
4045
+ protected processStartDelivery(response: Response): Promise<BookingDto> {
3988
4046
  const status = response.status;
3989
4047
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
3990
- if (status === 204) {
4048
+ if (status === 200) {
3991
4049
  return response.text().then((_responseText) => {
3992
- return;
4050
+ let result200: any = null;
4051
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4052
+ result200 = BookingDto.fromJS(resultData200);
4053
+ return result200;
3993
4054
  });
3994
4055
  } else if (status !== 200 && status !== 204) {
3995
4056
  return response.text().then((_responseText) => {
3996
4057
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
3997
4058
  });
3998
4059
  }
3999
- return Promise.resolve<void>(null as any);
4060
+ return Promise.resolve<BookingDto>(null as any);
4000
4061
  }
4001
4062
 
4002
- finishDelivery(bookingUpdate: BookingDeliveryUpdateDto): Promise<void> {
4063
+ finishDelivery(bookingUpdate: BookingDeliveryUpdateDto): Promise<BookingDto> {
4003
4064
  let url_ = this.baseUrl + "/move/booking/finishdelivery";
4004
4065
  url_ = url_.replace(/[?&]$/, "");
4005
4066
 
@@ -4010,6 +4071,7 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
4010
4071
  method: "POST",
4011
4072
  headers: {
4012
4073
  "Content-Type": "application/json",
4074
+ "Accept": "application/json"
4013
4075
  }
4014
4076
  };
4015
4077
 
@@ -4020,30 +4082,33 @@ export class BookingClient extends AuthorizedApiBase implements IBookingClient {
4020
4082
  });
4021
4083
  }
4022
4084
 
4023
- protected processFinishDelivery(response: Response): Promise<void> {
4085
+ protected processFinishDelivery(response: Response): Promise<BookingDto> {
4024
4086
  const status = response.status;
4025
4087
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
4026
- if (status === 204) {
4088
+ if (status === 200) {
4027
4089
  return response.text().then((_responseText) => {
4028
- return;
4090
+ let result200: any = null;
4091
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4092
+ result200 = BookingDto.fromJS(resultData200);
4093
+ return result200;
4029
4094
  });
4030
4095
  } else if (status !== 200 && status !== 204) {
4031
4096
  return response.text().then((_responseText) => {
4032
4097
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4033
4098
  });
4034
4099
  }
4035
- return Promise.resolve<void>(null as any);
4100
+ return Promise.resolve<BookingDto>(null as any);
4036
4101
  }
4037
4102
  }
4038
4103
 
4039
- export interface ILocationsClient {
4104
+ export interface IMoveLocationsClient {
4040
4105
 
4041
4106
  searchLocations(input: string | null | undefined, locationKinds: LocationKindDto[] | undefined): Promise<LocationDto[]>;
4042
4107
 
4043
4108
  suggestionsLocations(workOrderId: string | null | undefined, locationKinds: LocationKindDto[] | undefined): Promise<LocationDto[]>;
4044
4109
  }
4045
4110
 
4046
- export class LocationsClient extends AuthorizedApiBase implements ILocationsClient {
4111
+ export class MoveLocationsClient extends AuthorizedApiBase implements IMoveLocationsClient {
4047
4112
  private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
4048
4113
  private baseUrl: string;
4049
4114
  protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
@@ -4147,11 +4212,13 @@ export class LocationsClient extends AuthorizedApiBase implements ILocationsClie
4147
4212
  }
4148
4213
  }
4149
4214
 
4150
- export interface ITrackingClient {
4215
+ export interface IMoveTrackingClient {
4216
+
4217
+ getTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
4151
4218
 
4152
- listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto>;
4219
+ getWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto>;
4153
4220
 
4154
- listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto>;
4221
+ listWorkOrderTrackingHistory(workOrderIds: string[]): Promise<TrackingWorkOrderDto[]>;
4155
4222
 
4156
4223
  createTrackingEvents(trackingUpdates: TrackingUpdateDto[]): Promise<void>;
4157
4224
 
@@ -4162,7 +4229,7 @@ export interface ITrackingClient {
4162
4229
  createLabel(workOrderId: string, palletCount: number | undefined): Promise<FileResponse>;
4163
4230
  }
4164
4231
 
4165
- export class TrackingClient extends AuthorizedApiBase implements ITrackingClient {
4232
+ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
4166
4233
  private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
4167
4234
  private baseUrl: string;
4168
4235
  protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
@@ -4173,7 +4240,7 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4173
4240
  this.baseUrl = baseUrl ?? "";
4174
4241
  }
4175
4242
 
4176
- listTrackingHistory(trackingId: string): Promise<TrackingHistoryDto> {
4243
+ getTrackingHistory(trackingId: string): Promise<TrackingHistoryDto> {
4177
4244
  let url_ = this.baseUrl + "/move/tracking/{trackingId}";
4178
4245
  if (trackingId === undefined || trackingId === null)
4179
4246
  throw new Error("The parameter 'trackingId' must be defined.");
@@ -4190,11 +4257,11 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4190
4257
  return this.transformOptions(options_).then(transformedOptions_ => {
4191
4258
  return this.http.fetch(url_, transformedOptions_);
4192
4259
  }).then((_response: Response) => {
4193
- return this.processListTrackingHistory(_response);
4260
+ return this.processGetTrackingHistory(_response);
4194
4261
  });
4195
4262
  }
4196
4263
 
4197
- protected processListTrackingHistory(response: Response): Promise<TrackingHistoryDto> {
4264
+ protected processGetTrackingHistory(response: Response): Promise<TrackingHistoryDto> {
4198
4265
  const status = response.status;
4199
4266
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
4200
4267
  if (status === 200) {
@@ -4212,7 +4279,7 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4212
4279
  return Promise.resolve<TrackingHistoryDto>(null as any);
4213
4280
  }
4214
4281
 
4215
- listWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto> {
4282
+ getWorkOrderTrackingHistory(workOrderId: string): Promise<TrackingWorkOrderDto> {
4216
4283
  let url_ = this.baseUrl + "/move/tracking/workorder/{workOrderId}";
4217
4284
  if (workOrderId === undefined || workOrderId === null)
4218
4285
  throw new Error("The parameter 'workOrderId' must be defined.");
@@ -4229,11 +4296,11 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4229
4296
  return this.transformOptions(options_).then(transformedOptions_ => {
4230
4297
  return this.http.fetch(url_, transformedOptions_);
4231
4298
  }).then((_response: Response) => {
4232
- return this.processListWorkOrderTrackingHistory(_response);
4299
+ return this.processGetWorkOrderTrackingHistory(_response);
4233
4300
  });
4234
4301
  }
4235
4302
 
4236
- protected processListWorkOrderTrackingHistory(response: Response): Promise<TrackingWorkOrderDto> {
4303
+ protected processGetWorkOrderTrackingHistory(response: Response): Promise<TrackingWorkOrderDto> {
4237
4304
  const status = response.status;
4238
4305
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
4239
4306
  if (status === 200) {
@@ -4251,6 +4318,50 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4251
4318
  return Promise.resolve<TrackingWorkOrderDto>(null as any);
4252
4319
  }
4253
4320
 
4321
+ listWorkOrderTrackingHistory(workOrderIds: string[]): Promise<TrackingWorkOrderDto[]> {
4322
+ let url_ = this.baseUrl + "/move/tracking/workorder/list";
4323
+ url_ = url_.replace(/[?&]$/, "");
4324
+
4325
+ const content_ = JSON.stringify(workOrderIds);
4326
+
4327
+ let options_: RequestInit = {
4328
+ body: content_,
4329
+ method: "POST",
4330
+ headers: {
4331
+ "Content-Type": "application/json",
4332
+ "Accept": "application/json"
4333
+ }
4334
+ };
4335
+
4336
+ return this.transformOptions(options_).then(transformedOptions_ => {
4337
+ return this.http.fetch(url_, transformedOptions_);
4338
+ }).then((_response: Response) => {
4339
+ return this.processListWorkOrderTrackingHistory(_response);
4340
+ });
4341
+ }
4342
+
4343
+ protected processListWorkOrderTrackingHistory(response: Response): Promise<TrackingWorkOrderDto[]> {
4344
+ const status = response.status;
4345
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
4346
+ if (status === 200) {
4347
+ return response.text().then((_responseText) => {
4348
+ let result200: any = null;
4349
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4350
+ if (Array.isArray(resultData200)) {
4351
+ result200 = [] as any;
4352
+ for (let item of resultData200)
4353
+ result200!.push(TrackingWorkOrderDto.fromJS(item));
4354
+ }
4355
+ return result200;
4356
+ });
4357
+ } else if (status !== 200 && status !== 204) {
4358
+ return response.text().then((_responseText) => {
4359
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4360
+ });
4361
+ }
4362
+ return Promise.resolve<TrackingWorkOrderDto[]>(null as any);
4363
+ }
4364
+
4254
4365
  createTrackingEvents(trackingUpdates: TrackingUpdateDto[]): Promise<void> {
4255
4366
  let url_ = this.baseUrl + "/move/tracking/event";
4256
4367
  url_ = url_.replace(/[?&]$/, "");
@@ -4407,12 +4518,12 @@ export class TrackingClient extends AuthorizedApiBase implements ITrackingClient
4407
4518
  }
4408
4519
  }
4409
4520
 
4410
- export interface IWorkOrdersClient {
4521
+ export interface IMoveWorkOrdersClient {
4411
4522
 
4412
4523
  searchWorkOrders(input: string | null | undefined): Promise<SearchWorkOrderDto[]>;
4413
4524
  }
4414
4525
 
4415
- export class WorkOrdersClient extends AuthorizedApiBase implements IWorkOrdersClient {
4526
+ export class MoveWorkOrdersClient extends AuthorizedApiBase implements IMoveWorkOrdersClient {
4416
4527
  private http: { fetch(url: RequestInfo, init?: RequestInit): Promise<Response> };
4417
4528
  private baseUrl: string;
4418
4529
  protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
@@ -25250,11 +25361,11 @@ export interface IListTraceWorkordersRequest {
25250
25361
  continuationToken?: string | null;
25251
25362
  }
25252
25363
 
25253
- export class BookingResponseListDto implements IBookingResponseListDto {
25254
- results!: BookingResponseDto[];
25364
+ export class BookingListDto implements IBookingListDto {
25365
+ results!: BookingDto[];
25255
25366
  continuationToken?: string | null;
25256
25367
 
25257
- constructor(data?: IBookingResponseListDto) {
25368
+ constructor(data?: IBookingListDto) {
25258
25369
  if (data) {
25259
25370
  for (var property in data) {
25260
25371
  if (data.hasOwnProperty(property))
@@ -25271,15 +25382,15 @@ export class BookingResponseListDto implements IBookingResponseListDto {
25271
25382
  if (Array.isArray(_data["results"])) {
25272
25383
  this.results = [] as any;
25273
25384
  for (let item of _data["results"])
25274
- this.results!.push(BookingResponseDto.fromJS(item));
25385
+ this.results!.push(BookingDto.fromJS(item));
25275
25386
  }
25276
25387
  this.continuationToken = _data["continuationToken"];
25277
25388
  }
25278
25389
  }
25279
25390
 
25280
- static fromJS(data: any): BookingResponseListDto {
25391
+ static fromJS(data: any): BookingListDto {
25281
25392
  data = typeof data === 'object' ? data : {};
25282
- let result = new BookingResponseListDto();
25393
+ let result = new BookingListDto();
25283
25394
  result.init(data);
25284
25395
  return result;
25285
25396
  }
@@ -25296,19 +25407,25 @@ export class BookingResponseListDto implements IBookingResponseListDto {
25296
25407
  }
25297
25408
  }
25298
25409
 
25299
- export interface IBookingResponseListDto {
25300
- results: BookingResponseDto[];
25410
+ export interface IBookingListDto {
25411
+ results: BookingDto[];
25301
25412
  continuationToken?: string | null;
25302
25413
  }
25303
25414
 
25304
- export class BookingResponseDto implements IBookingResponseDto {
25415
+ export class BookingDto implements IBookingDto {
25305
25416
  bookingId!: string;
25306
25417
  bookingType!: BookingTypeDto;
25307
- items!: BookingItemResponseDto[];
25418
+ status!: BookingStatusDto;
25419
+ items!: BookingItemDto[];
25308
25420
  fromLocation!: LocationDto;
25309
25421
  toLocation!: LocationDto;
25422
+ created!: Date;
25423
+ createdBy!: string;
25424
+ createdById!: string;
25425
+ updatedBy?: string | null;
25426
+ updatedById?: string | null;
25310
25427
 
25311
- constructor(data?: IBookingResponseDto) {
25428
+ constructor(data?: IBookingDto) {
25312
25429
  if (data) {
25313
25430
  for (var property in data) {
25314
25431
  if (data.hasOwnProperty(property))
@@ -25326,19 +25443,25 @@ export class BookingResponseDto implements IBookingResponseDto {
25326
25443
  if (_data) {
25327
25444
  this.bookingId = _data["bookingId"];
25328
25445
  this.bookingType = _data["bookingType"];
25446
+ this.status = _data["status"];
25329
25447
  if (Array.isArray(_data["items"])) {
25330
25448
  this.items = [] as any;
25331
25449
  for (let item of _data["items"])
25332
- this.items!.push(BookingItemResponseDto.fromJS(item));
25450
+ this.items!.push(BookingItemDto.fromJS(item));
25333
25451
  }
25334
25452
  this.fromLocation = _data["fromLocation"] ? LocationDto.fromJS(_data["fromLocation"]) : new LocationDto();
25335
25453
  this.toLocation = _data["toLocation"] ? LocationDto.fromJS(_data["toLocation"]) : new LocationDto();
25454
+ this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
25455
+ this.createdBy = _data["createdBy"];
25456
+ this.createdById = _data["createdById"];
25457
+ this.updatedBy = _data["updatedBy"];
25458
+ this.updatedById = _data["updatedById"];
25336
25459
  }
25337
25460
  }
25338
25461
 
25339
- static fromJS(data: any): BookingResponseDto {
25462
+ static fromJS(data: any): BookingDto {
25340
25463
  data = typeof data === 'object' ? data : {};
25341
- let result = new BookingResponseDto();
25464
+ let result = new BookingDto();
25342
25465
  result.init(data);
25343
25466
  return result;
25344
25467
  }
@@ -25347,6 +25470,7 @@ export class BookingResponseDto implements IBookingResponseDto {
25347
25470
  data = typeof data === 'object' ? data : {};
25348
25471
  data["bookingId"] = this.bookingId;
25349
25472
  data["bookingType"] = this.bookingType;
25473
+ data["status"] = this.status;
25350
25474
  if (Array.isArray(this.items)) {
25351
25475
  data["items"] = [];
25352
25476
  for (let item of this.items)
@@ -25354,24 +25478,39 @@ export class BookingResponseDto implements IBookingResponseDto {
25354
25478
  }
25355
25479
  data["fromLocation"] = this.fromLocation ? this.fromLocation.toJSON() : <any>undefined;
25356
25480
  data["toLocation"] = this.toLocation ? this.toLocation.toJSON() : <any>undefined;
25481
+ data["created"] = this.created ? this.created.toISOString() : <any>undefined;
25482
+ data["createdBy"] = this.createdBy;
25483
+ data["createdById"] = this.createdById;
25484
+ data["updatedBy"] = this.updatedBy;
25485
+ data["updatedById"] = this.updatedById;
25357
25486
  return data;
25358
25487
  }
25359
25488
  }
25360
25489
 
25361
- export interface IBookingResponseDto {
25490
+ export interface IBookingDto {
25362
25491
  bookingId: string;
25363
25492
  bookingType: BookingTypeDto;
25364
- items: BookingItemResponseDto[];
25493
+ status: BookingStatusDto;
25494
+ items: BookingItemDto[];
25365
25495
  fromLocation: LocationDto;
25366
25496
  toLocation: LocationDto;
25497
+ created: Date;
25498
+ createdBy: string;
25499
+ createdById: string;
25500
+ updatedBy?: string | null;
25501
+ updatedById?: string | null;
25367
25502
  }
25368
25503
 
25369
25504
  export type BookingTypeDto = "NormalTruck" | "LargeTruck" | "SideLoadingTruck";
25370
25505
 
25371
- export class BookingItemResponseDto implements IBookingItemResponseDto {
25506
+ export type BookingStatusDto = "Pending" | "Cancelled" | "InProgress" | "Delivered";
25507
+
25508
+ export class BookingItemDto implements IBookingItemDto {
25372
25509
  trackingId!: string;
25510
+ workOrderId!: string;
25511
+ material?: string | null;
25373
25512
 
25374
- constructor(data?: IBookingItemResponseDto) {
25513
+ constructor(data?: IBookingItemDto) {
25375
25514
  if (data) {
25376
25515
  for (var property in data) {
25377
25516
  if (data.hasOwnProperty(property))
@@ -25383,12 +25522,14 @@ export class BookingItemResponseDto implements IBookingItemResponseDto {
25383
25522
  init(_data?: any) {
25384
25523
  if (_data) {
25385
25524
  this.trackingId = _data["trackingId"];
25525
+ this.workOrderId = _data["workOrderId"];
25526
+ this.material = _data["material"];
25386
25527
  }
25387
25528
  }
25388
25529
 
25389
- static fromJS(data: any): BookingItemResponseDto {
25530
+ static fromJS(data: any): BookingItemDto {
25390
25531
  data = typeof data === 'object' ? data : {};
25391
- let result = new BookingItemResponseDto();
25532
+ let result = new BookingItemDto();
25392
25533
  result.init(data);
25393
25534
  return result;
25394
25535
  }
@@ -25396,12 +25537,16 @@ export class BookingItemResponseDto implements IBookingItemResponseDto {
25396
25537
  toJSON(data?: any) {
25397
25538
  data = typeof data === 'object' ? data : {};
25398
25539
  data["trackingId"] = this.trackingId;
25540
+ data["workOrderId"] = this.workOrderId;
25541
+ data["material"] = this.material;
25399
25542
  return data;
25400
25543
  }
25401
25544
  }
25402
25545
 
25403
- export interface IBookingItemResponseDto {
25546
+ export interface IBookingItemDto {
25404
25547
  trackingId: string;
25548
+ workOrderId: string;
25549
+ material?: string | null;
25405
25550
  }
25406
25551
 
25407
25552
  export class LocationDto implements ILocationDto {
@@ -25784,7 +25929,8 @@ export class TrackingEventDto implements ITrackingEventDto {
25784
25929
  id!: number;
25785
25930
  created!: Date;
25786
25931
  createdBy!: string;
25787
- location!: LocationDto;
25932
+ createdById!: string;
25933
+ location?: LocationDto | null;
25788
25934
  status!: TrackingStatusDto;
25789
25935
  bookingId?: string | null;
25790
25936
  comment?: string | null;
@@ -25796,9 +25942,6 @@ export class TrackingEventDto implements ITrackingEventDto {
25796
25942
  (<any>this)[property] = (<any>data)[property];
25797
25943
  }
25798
25944
  }
25799
- if (!data) {
25800
- this.location = new LocationDto();
25801
- }
25802
25945
  }
25803
25946
 
25804
25947
  init(_data?: any) {
@@ -25806,7 +25949,8 @@ export class TrackingEventDto implements ITrackingEventDto {
25806
25949
  this.id = _data["id"];
25807
25950
  this.created = _data["created"] ? new Date(_data["created"].toString()) : <any>undefined;
25808
25951
  this.createdBy = _data["createdBy"];
25809
- this.location = _data["location"] ? LocationDto.fromJS(_data["location"]) : new LocationDto();
25952
+ this.createdById = _data["createdById"];
25953
+ this.location = _data["location"] ? LocationDto.fromJS(_data["location"]) : <any>undefined;
25810
25954
  this.status = _data["status"];
25811
25955
  this.bookingId = _data["bookingId"];
25812
25956
  this.comment = _data["comment"];
@@ -25825,6 +25969,7 @@ export class TrackingEventDto implements ITrackingEventDto {
25825
25969
  data["id"] = this.id;
25826
25970
  data["created"] = this.created ? this.created.toISOString() : <any>undefined;
25827
25971
  data["createdBy"] = this.createdBy;
25972
+ data["createdById"] = this.createdById;
25828
25973
  data["location"] = this.location ? this.location.toJSON() : <any>undefined;
25829
25974
  data["status"] = this.status;
25830
25975
  data["bookingId"] = this.bookingId;
@@ -25837,7 +25982,8 @@ export interface ITrackingEventDto {
25837
25982
  id: number;
25838
25983
  created: Date;
25839
25984
  createdBy: string;
25840
- location: LocationDto;
25985
+ createdById: string;
25986
+ location?: LocationDto | null;
25841
25987
  status: TrackingStatusDto;
25842
25988
  bookingId?: string | null;
25843
25989
  comment?: string | null;
@@ -25947,8 +26093,6 @@ export interface ITrackingUpdateDto {
25947
26093
 
25948
26094
  export class TrackingHistoryUpdateDto implements ITrackingHistoryUpdateDto {
25949
26095
  workOrderId!: string;
25950
- locationId!: string;
25951
- comment?: string | null;
25952
26096
 
25953
26097
  constructor(data?: ITrackingHistoryUpdateDto) {
25954
26098
  if (data) {
@@ -25962,8 +26106,6 @@ export class TrackingHistoryUpdateDto implements ITrackingHistoryUpdateDto {
25962
26106
  init(_data?: any) {
25963
26107
  if (_data) {
25964
26108
  this.workOrderId = _data["workOrderId"];
25965
- this.locationId = _data["locationId"];
25966
- this.comment = _data["comment"];
25967
26109
  }
25968
26110
  }
25969
26111
 
@@ -25977,20 +26119,17 @@ export class TrackingHistoryUpdateDto implements ITrackingHistoryUpdateDto {
25977
26119
  toJSON(data?: any) {
25978
26120
  data = typeof data === 'object' ? data : {};
25979
26121
  data["workOrderId"] = this.workOrderId;
25980
- data["locationId"] = this.locationId;
25981
- data["comment"] = this.comment;
25982
26122
  return data;
25983
26123
  }
25984
26124
  }
25985
26125
 
25986
26126
  export interface ITrackingHistoryUpdateDto {
25987
26127
  workOrderId: string;
25988
- locationId: string;
25989
- comment?: string | null;
25990
26128
  }
25991
26129
 
25992
26130
  export class SearchWorkOrderDto implements ISearchWorkOrderDto {
25993
26131
  workOrderId!: string;
26132
+ trackingIds!: string[];
25994
26133
  partName?: string | null;
25995
26134
  partNumber?: string | null;
25996
26135
 
@@ -26001,11 +26140,19 @@ export class SearchWorkOrderDto implements ISearchWorkOrderDto {
26001
26140
  (<any>this)[property] = (<any>data)[property];
26002
26141
  }
26003
26142
  }
26143
+ if (!data) {
26144
+ this.trackingIds = [];
26145
+ }
26004
26146
  }
26005
26147
 
26006
26148
  init(_data?: any) {
26007
26149
  if (_data) {
26008
26150
  this.workOrderId = _data["workOrderId"];
26151
+ if (Array.isArray(_data["trackingIds"])) {
26152
+ this.trackingIds = [] as any;
26153
+ for (let item of _data["trackingIds"])
26154
+ this.trackingIds!.push(item);
26155
+ }
26009
26156
  this.partName = _data["partName"];
26010
26157
  this.partNumber = _data["partNumber"];
26011
26158
  }
@@ -26021,6 +26168,11 @@ export class SearchWorkOrderDto implements ISearchWorkOrderDto {
26021
26168
  toJSON(data?: any) {
26022
26169
  data = typeof data === 'object' ? data : {};
26023
26170
  data["workOrderId"] = this.workOrderId;
26171
+ if (Array.isArray(this.trackingIds)) {
26172
+ data["trackingIds"] = [];
26173
+ for (let item of this.trackingIds)
26174
+ data["trackingIds"].push(item);
26175
+ }
26024
26176
  data["partName"] = this.partName;
26025
26177
  data["partNumber"] = this.partNumber;
26026
26178
  return data;
@@ -26029,6 +26181,7 @@ export class SearchWorkOrderDto implements ISearchWorkOrderDto {
26029
26181
 
26030
26182
  export interface ISearchWorkOrderDto {
26031
26183
  workOrderId: string;
26184
+ trackingIds: string[];
26032
26185
  partName?: string | null;
26033
26186
  partNumber?: string | null;
26034
26187
  }
@@ -28672,6 +28825,7 @@ export interface IFactoryUtilizationDto {
28672
28825
  export class UtilizationDto implements IUtilizationDto {
28673
28826
  powerOn!: PowerOnUtilizationV2Dto;
28674
28827
  uptimeDowntimes!: UptimeDowntimesDto;
28828
+ twentyFourSeven!: TwentyFourSevenUtilizationDto;
28675
28829
 
28676
28830
  constructor(data?: IUtilizationDto) {
28677
28831
  if (data) {
@@ -28683,6 +28837,7 @@ export class UtilizationDto implements IUtilizationDto {
28683
28837
  if (!data) {
28684
28838
  this.powerOn = new PowerOnUtilizationV2Dto();
28685
28839
  this.uptimeDowntimes = new UptimeDowntimesDto();
28840
+ this.twentyFourSeven = new TwentyFourSevenUtilizationDto();
28686
28841
  }
28687
28842
  }
28688
28843
 
@@ -28690,6 +28845,7 @@ export class UtilizationDto implements IUtilizationDto {
28690
28845
  if (_data) {
28691
28846
  this.powerOn = _data["powerOn"] ? PowerOnUtilizationV2Dto.fromJS(_data["powerOn"]) : new PowerOnUtilizationV2Dto();
28692
28847
  this.uptimeDowntimes = _data["uptimeDowntimes"] ? UptimeDowntimesDto.fromJS(_data["uptimeDowntimes"]) : new UptimeDowntimesDto();
28848
+ this.twentyFourSeven = _data["twentyFourSeven"] ? TwentyFourSevenUtilizationDto.fromJS(_data["twentyFourSeven"]) : new TwentyFourSevenUtilizationDto();
28693
28849
  }
28694
28850
  }
28695
28851
 
@@ -28704,6 +28860,7 @@ export class UtilizationDto implements IUtilizationDto {
28704
28860
  data = typeof data === 'object' ? data : {};
28705
28861
  data["powerOn"] = this.powerOn ? this.powerOn.toJSON() : <any>undefined;
28706
28862
  data["uptimeDowntimes"] = this.uptimeDowntimes ? this.uptimeDowntimes.toJSON() : <any>undefined;
28863
+ data["twentyFourSeven"] = this.twentyFourSeven ? this.twentyFourSeven.toJSON() : <any>undefined;
28707
28864
  return data;
28708
28865
  }
28709
28866
  }
@@ -28711,6 +28868,7 @@ export class UtilizationDto implements IUtilizationDto {
28711
28868
  export interface IUtilizationDto {
28712
28869
  powerOn: PowerOnUtilizationV2Dto;
28713
28870
  uptimeDowntimes: UptimeDowntimesDto;
28871
+ twentyFourSeven: TwentyFourSevenUtilizationDto;
28714
28872
  }
28715
28873
 
28716
28874
  export class PowerOnUtilizationV2Dto implements IPowerOnUtilizationV2Dto {
@@ -28825,6 +28983,7 @@ export class UptimeDowntimeDto implements IUptimeDowntimeDto {
28825
28983
  uptimeInSeconds?: number | null;
28826
28984
  downtimeInSeconds?: number | null;
28827
28985
  powerOnTimeInSeconds?: number | null;
28986
+ twentyFourSevenTimeInSeconds?: number | null;
28828
28987
 
28829
28988
  constructor(data?: IUptimeDowntimeDto) {
28830
28989
  if (data) {
@@ -28840,6 +28999,7 @@ export class UptimeDowntimeDto implements IUptimeDowntimeDto {
28840
28999
  this.uptimeInSeconds = _data["uptimeInSeconds"];
28841
29000
  this.downtimeInSeconds = _data["downtimeInSeconds"];
28842
29001
  this.powerOnTimeInSeconds = _data["powerOnTimeInSeconds"];
29002
+ this.twentyFourSevenTimeInSeconds = _data["twentyFourSevenTimeInSeconds"];
28843
29003
  }
28844
29004
  }
28845
29005
 
@@ -28855,6 +29015,7 @@ export class UptimeDowntimeDto implements IUptimeDowntimeDto {
28855
29015
  data["uptimeInSeconds"] = this.uptimeInSeconds;
28856
29016
  data["downtimeInSeconds"] = this.downtimeInSeconds;
28857
29017
  data["powerOnTimeInSeconds"] = this.powerOnTimeInSeconds;
29018
+ data["twentyFourSevenTimeInSeconds"] = this.twentyFourSevenTimeInSeconds;
28858
29019
  return data;
28859
29020
  }
28860
29021
  }
@@ -28863,6 +29024,55 @@ export interface IUptimeDowntimeDto {
28863
29024
  uptimeInSeconds?: number | null;
28864
29025
  downtimeInSeconds?: number | null;
28865
29026
  powerOnTimeInSeconds?: number | null;
29027
+ twentyFourSevenTimeInSeconds?: number | null;
29028
+ }
29029
+
29030
+ export class TwentyFourSevenUtilizationDto implements ITwentyFourSevenUtilizationDto {
29031
+ sevenDays?: number | null;
29032
+ thirtyDays?: number | null;
29033
+ ninetyDays?: number | null;
29034
+ yearToDate?: number | null;
29035
+
29036
+ constructor(data?: ITwentyFourSevenUtilizationDto) {
29037
+ if (data) {
29038
+ for (var property in data) {
29039
+ if (data.hasOwnProperty(property))
29040
+ (<any>this)[property] = (<any>data)[property];
29041
+ }
29042
+ }
29043
+ }
29044
+
29045
+ init(_data?: any) {
29046
+ if (_data) {
29047
+ this.sevenDays = _data["sevenDays"];
29048
+ this.thirtyDays = _data["thirtyDays"];
29049
+ this.ninetyDays = _data["ninetyDays"];
29050
+ this.yearToDate = _data["yearToDate"];
29051
+ }
29052
+ }
29053
+
29054
+ static fromJS(data: any): TwentyFourSevenUtilizationDto {
29055
+ data = typeof data === 'object' ? data : {};
29056
+ let result = new TwentyFourSevenUtilizationDto();
29057
+ result.init(data);
29058
+ return result;
29059
+ }
29060
+
29061
+ toJSON(data?: any) {
29062
+ data = typeof data === 'object' ? data : {};
29063
+ data["sevenDays"] = this.sevenDays;
29064
+ data["thirtyDays"] = this.thirtyDays;
29065
+ data["ninetyDays"] = this.ninetyDays;
29066
+ data["yearToDate"] = this.yearToDate;
29067
+ return data;
29068
+ }
29069
+ }
29070
+
29071
+ export interface ITwentyFourSevenUtilizationDto {
29072
+ sevenDays?: number | null;
29073
+ thirtyDays?: number | null;
29074
+ ninetyDays?: number | null;
29075
+ yearToDate?: number | null;
28866
29076
  }
28867
29077
 
28868
29078
  export class MachineGroupUtilizationDto implements IMachineGroupUtilizationDto {