@ignos/api-client 20240614.0.9562 → 20240618.0.9588
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ignosportal-api.d.ts +48 -22
- package/lib/ignosportal-api.js +92 -14
- package/package.json +1 -1
- package/src/ignosportal-api.ts +137 -33
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -532,9 +532,10 @@ export declare class TraceClient extends AuthorizedApiBase implements ITraceClie
|
|
|
532
532
|
export interface IMoveBookingClient {
|
|
533
533
|
listBookings(request: BookingRequestListDto): Promise<BookingListDto>;
|
|
534
534
|
getBooking(bookingId: string): Promise<BookingDto>;
|
|
535
|
-
updateBooking(bookingId: string, bookingRequest:
|
|
535
|
+
updateBooking(bookingId: string, bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
536
536
|
getWorkOrderBooking(workOrderId: string): Promise<BookingDto[]>;
|
|
537
|
-
|
|
537
|
+
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
538
|
+
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto>;
|
|
538
539
|
cancelBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
539
540
|
revertBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
540
541
|
startDelivery(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
@@ -551,12 +552,14 @@ export declare class MoveBookingClient extends AuthorizedApiBase implements IMov
|
|
|
551
552
|
protected processListBookings(response: Response): Promise<BookingListDto>;
|
|
552
553
|
getBooking(bookingId: string): Promise<BookingDto>;
|
|
553
554
|
protected processGetBooking(response: Response): Promise<BookingDto>;
|
|
554
|
-
updateBooking(bookingId: string, bookingRequest:
|
|
555
|
+
updateBooking(bookingId: string, bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
555
556
|
protected processUpdateBooking(response: Response): Promise<BookingDto>;
|
|
556
557
|
getWorkOrderBooking(workOrderId: string): Promise<BookingDto[]>;
|
|
557
558
|
protected processGetWorkOrderBooking(response: Response): Promise<BookingDto[]>;
|
|
558
|
-
|
|
559
|
-
protected
|
|
559
|
+
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
560
|
+
protected processCreateBookingTransport(response: Response): Promise<BookingDto>;
|
|
561
|
+
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto>;
|
|
562
|
+
protected processCreateBookingGeneral(response: Response): Promise<BookingDto>;
|
|
560
563
|
cancelBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
561
564
|
protected processCancelBooking(response: Response): Promise<BookingDto>;
|
|
562
565
|
revertBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
@@ -4098,7 +4101,8 @@ export interface IBookingListDto {
|
|
|
4098
4101
|
}
|
|
4099
4102
|
export declare class BookingDto implements IBookingDto {
|
|
4100
4103
|
bookingId: string;
|
|
4101
|
-
|
|
4104
|
+
bookingKind: BookingKindDto;
|
|
4105
|
+
transportKind: TransportKindDto;
|
|
4102
4106
|
status: BookingStatusDto;
|
|
4103
4107
|
items: BookingItemDto[];
|
|
4104
4108
|
fromLocation: LocationDto;
|
|
@@ -4115,7 +4119,8 @@ export declare class BookingDto implements IBookingDto {
|
|
|
4115
4119
|
}
|
|
4116
4120
|
export interface IBookingDto {
|
|
4117
4121
|
bookingId: string;
|
|
4118
|
-
|
|
4122
|
+
bookingKind: BookingKindDto;
|
|
4123
|
+
transportKind: TransportKindDto;
|
|
4119
4124
|
status: BookingStatusDto;
|
|
4120
4125
|
items: BookingItemDto[];
|
|
4121
4126
|
fromLocation: LocationDto;
|
|
@@ -4126,12 +4131,14 @@ export interface IBookingDto {
|
|
|
4126
4131
|
updatedBy?: string | null;
|
|
4127
4132
|
updatedById?: string | null;
|
|
4128
4133
|
}
|
|
4129
|
-
export type
|
|
4134
|
+
export type BookingKindDto = "Forklift" | "General" | "ChipDisposal" | "Garbage";
|
|
4135
|
+
export type TransportKindDto = "NormalForklift" | "LargeForklift" | "SideLoadingForklift";
|
|
4130
4136
|
export type BookingStatusDto = "Pending" | "Cancelled" | "InProgress" | "Delivered";
|
|
4131
4137
|
export declare class BookingItemDto implements IBookingItemDto {
|
|
4132
4138
|
trackingId: string;
|
|
4133
|
-
workOrderId
|
|
4139
|
+
workOrderId?: string | null;
|
|
4134
4140
|
material?: string | null;
|
|
4141
|
+
comment?: string | null;
|
|
4135
4142
|
constructor(data?: IBookingItemDto);
|
|
4136
4143
|
init(_data?: any): void;
|
|
4137
4144
|
static fromJS(data: any): BookingItemDto;
|
|
@@ -4139,8 +4146,9 @@ export declare class BookingItemDto implements IBookingItemDto {
|
|
|
4139
4146
|
}
|
|
4140
4147
|
export interface IBookingItemDto {
|
|
4141
4148
|
trackingId: string;
|
|
4142
|
-
workOrderId
|
|
4149
|
+
workOrderId?: string | null;
|
|
4143
4150
|
material?: string | null;
|
|
4151
|
+
comment?: string | null;
|
|
4144
4152
|
}
|
|
4145
4153
|
export declare class LocationDto implements ILocationDto {
|
|
4146
4154
|
locationId: string;
|
|
@@ -4176,18 +4184,20 @@ export interface IBookingRequestListDto {
|
|
|
4176
4184
|
continuationToken?: string | null;
|
|
4177
4185
|
}
|
|
4178
4186
|
export type BookingOrderDto = "Ascending" | "Descending";
|
|
4179
|
-
export declare class
|
|
4180
|
-
|
|
4187
|
+
export declare class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
4188
|
+
transportKind: TransportKindDto;
|
|
4189
|
+
bookingKind: BookingKindDto;
|
|
4181
4190
|
items: BookingItemRequestDto[];
|
|
4182
4191
|
fromLocationId: string;
|
|
4183
4192
|
toLocationId: string;
|
|
4184
|
-
constructor(data?:
|
|
4193
|
+
constructor(data?: IBookingTransportRequestDto);
|
|
4185
4194
|
init(_data?: any): void;
|
|
4186
|
-
static fromJS(data: any):
|
|
4195
|
+
static fromJS(data: any): BookingTransportRequestDto;
|
|
4187
4196
|
toJSON(data?: any): any;
|
|
4188
4197
|
}
|
|
4189
|
-
export interface
|
|
4190
|
-
|
|
4198
|
+
export interface IBookingTransportRequestDto {
|
|
4199
|
+
transportKind: TransportKindDto;
|
|
4200
|
+
bookingKind: BookingKindDto;
|
|
4191
4201
|
items: BookingItemRequestDto[];
|
|
4192
4202
|
fromLocationId: string;
|
|
4193
4203
|
toLocationId: string;
|
|
@@ -4204,9 +4214,28 @@ export interface IBookingItemRequestDto {
|
|
|
4204
4214
|
trackingId: string;
|
|
4205
4215
|
comment?: string | null;
|
|
4206
4216
|
}
|
|
4217
|
+
export declare class BookingGeneralRequestDto implements IBookingGeneralRequestDto {
|
|
4218
|
+
bookingKind: BookingKindDto;
|
|
4219
|
+
transportKind: TransportKindDto;
|
|
4220
|
+
fromLocationId: string;
|
|
4221
|
+
toLocationId: string;
|
|
4222
|
+
material?: string | null;
|
|
4223
|
+
comment?: string | null;
|
|
4224
|
+
constructor(data?: IBookingGeneralRequestDto);
|
|
4225
|
+
init(_data?: any): void;
|
|
4226
|
+
static fromJS(data: any): BookingGeneralRequestDto;
|
|
4227
|
+
toJSON(data?: any): any;
|
|
4228
|
+
}
|
|
4229
|
+
export interface IBookingGeneralRequestDto {
|
|
4230
|
+
bookingKind: BookingKindDto;
|
|
4231
|
+
transportKind: TransportKindDto;
|
|
4232
|
+
fromLocationId: string;
|
|
4233
|
+
toLocationId: string;
|
|
4234
|
+
material?: string | null;
|
|
4235
|
+
comment?: string | null;
|
|
4236
|
+
}
|
|
4207
4237
|
export declare class BookingUpdateDto implements IBookingUpdateDto {
|
|
4208
4238
|
bookingId: string;
|
|
4209
|
-
comment?: string | null;
|
|
4210
4239
|
constructor(data?: IBookingUpdateDto);
|
|
4211
4240
|
init(_data?: any): void;
|
|
4212
4241
|
static fromJS(data: any): BookingUpdateDto;
|
|
@@ -4214,11 +4243,9 @@ export declare class BookingUpdateDto implements IBookingUpdateDto {
|
|
|
4214
4243
|
}
|
|
4215
4244
|
export interface IBookingUpdateDto {
|
|
4216
4245
|
bookingId: string;
|
|
4217
|
-
comment?: string | null;
|
|
4218
4246
|
}
|
|
4219
4247
|
export declare class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateDto {
|
|
4220
4248
|
bookingId: string;
|
|
4221
|
-
comment?: string | null;
|
|
4222
4249
|
deliveryExceptions?: BookingDeliveryExceptionDto[] | null;
|
|
4223
4250
|
constructor(data?: IBookingDeliveryUpdateDto);
|
|
4224
4251
|
init(_data?: any): void;
|
|
@@ -4227,7 +4254,6 @@ export declare class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateD
|
|
|
4227
4254
|
}
|
|
4228
4255
|
export interface IBookingDeliveryUpdateDto {
|
|
4229
4256
|
bookingId: string;
|
|
4230
|
-
comment?: string | null;
|
|
4231
4257
|
deliveryExceptions?: BookingDeliveryExceptionDto[] | null;
|
|
4232
4258
|
}
|
|
4233
4259
|
export declare class BookingDeliveryExceptionDto implements IBookingDeliveryExceptionDto {
|
|
@@ -4247,7 +4273,7 @@ export interface IBookingDeliveryExceptionDto {
|
|
|
4247
4273
|
export declare class TrackingHistoryDto implements ITrackingHistoryDto {
|
|
4248
4274
|
trackingId: string;
|
|
4249
4275
|
palletNumber: number;
|
|
4250
|
-
workOrderId
|
|
4276
|
+
workOrderId?: string | null;
|
|
4251
4277
|
trackingEvents: TrackingEventDto[];
|
|
4252
4278
|
constructor(data?: ITrackingHistoryDto);
|
|
4253
4279
|
init(_data?: any): void;
|
|
@@ -4257,7 +4283,7 @@ export declare class TrackingHistoryDto implements ITrackingHistoryDto {
|
|
|
4257
4283
|
export interface ITrackingHistoryDto {
|
|
4258
4284
|
trackingId: string;
|
|
4259
4285
|
palletNumber: number;
|
|
4260
|
-
workOrderId
|
|
4286
|
+
workOrderId?: string | null;
|
|
4261
4287
|
trackingEvents: TrackingEventDto[];
|
|
4262
4288
|
}
|
|
4263
4289
|
export declare class TrackingEventDto implements ITrackingEventDto {
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -3630,8 +3630,8 @@ export class MoveBookingClient extends AuthorizedApiBase {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
return Promise.resolve(null);
|
|
3632
3632
|
}
|
|
3633
|
-
|
|
3634
|
-
let url_ = this.baseUrl + "/move/booking/book";
|
|
3633
|
+
createBookingTransport(bookingRequest) {
|
|
3634
|
+
let url_ = this.baseUrl + "/move/booking/book/transport";
|
|
3635
3635
|
url_ = url_.replace(/[?&]$/, "");
|
|
3636
3636
|
const content_ = JSON.stringify(bookingRequest);
|
|
3637
3637
|
let options_ = {
|
|
@@ -3645,10 +3645,50 @@ export class MoveBookingClient extends AuthorizedApiBase {
|
|
|
3645
3645
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3646
3646
|
return this.http.fetch(url_, transformedOptions_);
|
|
3647
3647
|
}).then((_response) => {
|
|
3648
|
-
return this.
|
|
3648
|
+
return this.processCreateBookingTransport(_response);
|
|
3649
3649
|
});
|
|
3650
3650
|
}
|
|
3651
|
-
|
|
3651
|
+
processCreateBookingTransport(response) {
|
|
3652
|
+
const status = response.status;
|
|
3653
|
+
let _headers = {};
|
|
3654
|
+
if (response.headers && response.headers.forEach) {
|
|
3655
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
3656
|
+
}
|
|
3657
|
+
;
|
|
3658
|
+
if (status === 200) {
|
|
3659
|
+
return response.text().then((_responseText) => {
|
|
3660
|
+
let result200 = null;
|
|
3661
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3662
|
+
result200 = BookingDto.fromJS(resultData200);
|
|
3663
|
+
return result200;
|
|
3664
|
+
});
|
|
3665
|
+
}
|
|
3666
|
+
else if (status !== 200 && status !== 204) {
|
|
3667
|
+
return response.text().then((_responseText) => {
|
|
3668
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3669
|
+
});
|
|
3670
|
+
}
|
|
3671
|
+
return Promise.resolve(null);
|
|
3672
|
+
}
|
|
3673
|
+
createBookingGeneral(bookingRequest) {
|
|
3674
|
+
let url_ = this.baseUrl + "/move/booking/book/general";
|
|
3675
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3676
|
+
const content_ = JSON.stringify(bookingRequest);
|
|
3677
|
+
let options_ = {
|
|
3678
|
+
body: content_,
|
|
3679
|
+
method: "POST",
|
|
3680
|
+
headers: {
|
|
3681
|
+
"Content-Type": "application/json",
|
|
3682
|
+
"Accept": "application/json"
|
|
3683
|
+
}
|
|
3684
|
+
};
|
|
3685
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3686
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
3687
|
+
}).then((_response) => {
|
|
3688
|
+
return this.processCreateBookingGeneral(_response);
|
|
3689
|
+
});
|
|
3690
|
+
}
|
|
3691
|
+
processCreateBookingGeneral(response) {
|
|
3652
3692
|
const status = response.status;
|
|
3653
3693
|
let _headers = {};
|
|
3654
3694
|
if (response.headers && response.headers.forEach) {
|
|
@@ -22384,7 +22424,8 @@ export class BookingDto {
|
|
|
22384
22424
|
init(_data) {
|
|
22385
22425
|
if (_data) {
|
|
22386
22426
|
this.bookingId = _data["bookingId"];
|
|
22387
|
-
this.
|
|
22427
|
+
this.bookingKind = _data["bookingKind"];
|
|
22428
|
+
this.transportKind = _data["transportKind"];
|
|
22388
22429
|
this.status = _data["status"];
|
|
22389
22430
|
if (Array.isArray(_data["items"])) {
|
|
22390
22431
|
this.items = [];
|
|
@@ -22409,7 +22450,8 @@ export class BookingDto {
|
|
|
22409
22450
|
toJSON(data) {
|
|
22410
22451
|
data = typeof data === 'object' ? data : {};
|
|
22411
22452
|
data["bookingId"] = this.bookingId;
|
|
22412
|
-
data["
|
|
22453
|
+
data["bookingKind"] = this.bookingKind;
|
|
22454
|
+
data["transportKind"] = this.transportKind;
|
|
22413
22455
|
data["status"] = this.status;
|
|
22414
22456
|
if (Array.isArray(this.items)) {
|
|
22415
22457
|
data["items"] = [];
|
|
@@ -22440,6 +22482,7 @@ export class BookingItemDto {
|
|
|
22440
22482
|
this.trackingId = _data["trackingId"];
|
|
22441
22483
|
this.workOrderId = _data["workOrderId"];
|
|
22442
22484
|
this.material = _data["material"];
|
|
22485
|
+
this.comment = _data["comment"];
|
|
22443
22486
|
}
|
|
22444
22487
|
}
|
|
22445
22488
|
static fromJS(data) {
|
|
@@ -22453,6 +22496,7 @@ export class BookingItemDto {
|
|
|
22453
22496
|
data["trackingId"] = this.trackingId;
|
|
22454
22497
|
data["workOrderId"] = this.workOrderId;
|
|
22455
22498
|
data["material"] = this.material;
|
|
22499
|
+
data["comment"] = this.comment;
|
|
22456
22500
|
return data;
|
|
22457
22501
|
}
|
|
22458
22502
|
}
|
|
@@ -22528,7 +22572,7 @@ export class BookingRequestListDto {
|
|
|
22528
22572
|
return data;
|
|
22529
22573
|
}
|
|
22530
22574
|
}
|
|
22531
|
-
export class
|
|
22575
|
+
export class BookingTransportRequestDto {
|
|
22532
22576
|
constructor(data) {
|
|
22533
22577
|
if (data) {
|
|
22534
22578
|
for (var property in data) {
|
|
@@ -22542,7 +22586,8 @@ export class BookingRequestDto {
|
|
|
22542
22586
|
}
|
|
22543
22587
|
init(_data) {
|
|
22544
22588
|
if (_data) {
|
|
22545
|
-
this.
|
|
22589
|
+
this.transportKind = _data["transportKind"];
|
|
22590
|
+
this.bookingKind = _data["bookingKind"];
|
|
22546
22591
|
if (Array.isArray(_data["items"])) {
|
|
22547
22592
|
this.items = [];
|
|
22548
22593
|
for (let item of _data["items"])
|
|
@@ -22554,13 +22599,14 @@ export class BookingRequestDto {
|
|
|
22554
22599
|
}
|
|
22555
22600
|
static fromJS(data) {
|
|
22556
22601
|
data = typeof data === 'object' ? data : {};
|
|
22557
|
-
let result = new
|
|
22602
|
+
let result = new BookingTransportRequestDto();
|
|
22558
22603
|
result.init(data);
|
|
22559
22604
|
return result;
|
|
22560
22605
|
}
|
|
22561
22606
|
toJSON(data) {
|
|
22562
22607
|
data = typeof data === 'object' ? data : {};
|
|
22563
|
-
data["
|
|
22608
|
+
data["transportKind"] = this.transportKind;
|
|
22609
|
+
data["bookingKind"] = this.bookingKind;
|
|
22564
22610
|
if (Array.isArray(this.items)) {
|
|
22565
22611
|
data["items"] = [];
|
|
22566
22612
|
for (let item of this.items)
|
|
@@ -22599,6 +22645,42 @@ export class BookingItemRequestDto {
|
|
|
22599
22645
|
return data;
|
|
22600
22646
|
}
|
|
22601
22647
|
}
|
|
22648
|
+
export class BookingGeneralRequestDto {
|
|
22649
|
+
constructor(data) {
|
|
22650
|
+
if (data) {
|
|
22651
|
+
for (var property in data) {
|
|
22652
|
+
if (data.hasOwnProperty(property))
|
|
22653
|
+
this[property] = data[property];
|
|
22654
|
+
}
|
|
22655
|
+
}
|
|
22656
|
+
}
|
|
22657
|
+
init(_data) {
|
|
22658
|
+
if (_data) {
|
|
22659
|
+
this.bookingKind = _data["bookingKind"];
|
|
22660
|
+
this.transportKind = _data["transportKind"];
|
|
22661
|
+
this.fromLocationId = _data["fromLocationId"];
|
|
22662
|
+
this.toLocationId = _data["toLocationId"];
|
|
22663
|
+
this.material = _data["material"];
|
|
22664
|
+
this.comment = _data["comment"];
|
|
22665
|
+
}
|
|
22666
|
+
}
|
|
22667
|
+
static fromJS(data) {
|
|
22668
|
+
data = typeof data === 'object' ? data : {};
|
|
22669
|
+
let result = new BookingGeneralRequestDto();
|
|
22670
|
+
result.init(data);
|
|
22671
|
+
return result;
|
|
22672
|
+
}
|
|
22673
|
+
toJSON(data) {
|
|
22674
|
+
data = typeof data === 'object' ? data : {};
|
|
22675
|
+
data["bookingKind"] = this.bookingKind;
|
|
22676
|
+
data["transportKind"] = this.transportKind;
|
|
22677
|
+
data["fromLocationId"] = this.fromLocationId;
|
|
22678
|
+
data["toLocationId"] = this.toLocationId;
|
|
22679
|
+
data["material"] = this.material;
|
|
22680
|
+
data["comment"] = this.comment;
|
|
22681
|
+
return data;
|
|
22682
|
+
}
|
|
22683
|
+
}
|
|
22602
22684
|
export class BookingUpdateDto {
|
|
22603
22685
|
constructor(data) {
|
|
22604
22686
|
if (data) {
|
|
@@ -22611,7 +22693,6 @@ export class BookingUpdateDto {
|
|
|
22611
22693
|
init(_data) {
|
|
22612
22694
|
if (_data) {
|
|
22613
22695
|
this.bookingId = _data["bookingId"];
|
|
22614
|
-
this.comment = _data["comment"];
|
|
22615
22696
|
}
|
|
22616
22697
|
}
|
|
22617
22698
|
static fromJS(data) {
|
|
@@ -22623,7 +22704,6 @@ export class BookingUpdateDto {
|
|
|
22623
22704
|
toJSON(data) {
|
|
22624
22705
|
data = typeof data === 'object' ? data : {};
|
|
22625
22706
|
data["bookingId"] = this.bookingId;
|
|
22626
|
-
data["comment"] = this.comment;
|
|
22627
22707
|
return data;
|
|
22628
22708
|
}
|
|
22629
22709
|
}
|
|
@@ -22639,7 +22719,6 @@ export class BookingDeliveryUpdateDto {
|
|
|
22639
22719
|
init(_data) {
|
|
22640
22720
|
if (_data) {
|
|
22641
22721
|
this.bookingId = _data["bookingId"];
|
|
22642
|
-
this.comment = _data["comment"];
|
|
22643
22722
|
if (Array.isArray(_data["deliveryExceptions"])) {
|
|
22644
22723
|
this.deliveryExceptions = [];
|
|
22645
22724
|
for (let item of _data["deliveryExceptions"])
|
|
@@ -22656,7 +22735,6 @@ export class BookingDeliveryUpdateDto {
|
|
|
22656
22735
|
toJSON(data) {
|
|
22657
22736
|
data = typeof data === 'object' ? data : {};
|
|
22658
22737
|
data["bookingId"] = this.bookingId;
|
|
22659
|
-
data["comment"] = this.comment;
|
|
22660
22738
|
if (Array.isArray(this.deliveryExceptions)) {
|
|
22661
22739
|
data["deliveryExceptions"] = [];
|
|
22662
22740
|
for (let item of this.deliveryExceptions)
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -3751,11 +3751,13 @@ export interface IMoveBookingClient {
|
|
|
3751
3751
|
|
|
3752
3752
|
getBooking(bookingId: string): Promise<BookingDto>;
|
|
3753
3753
|
|
|
3754
|
-
updateBooking(bookingId: string, bookingRequest:
|
|
3754
|
+
updateBooking(bookingId: string, bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
3755
3755
|
|
|
3756
3756
|
getWorkOrderBooking(workOrderId: string): Promise<BookingDto[]>;
|
|
3757
3757
|
|
|
3758
|
-
|
|
3758
|
+
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto>;
|
|
3759
|
+
|
|
3760
|
+
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto>;
|
|
3759
3761
|
|
|
3760
3762
|
cancelBooking(bookingUpdate: BookingUpdateDto): Promise<BookingDto>;
|
|
3761
3763
|
|
|
@@ -3856,7 +3858,7 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
|
|
|
3856
3858
|
return Promise.resolve<BookingDto>(null as any);
|
|
3857
3859
|
}
|
|
3858
3860
|
|
|
3859
|
-
updateBooking(bookingId: string, bookingRequest:
|
|
3861
|
+
updateBooking(bookingId: string, bookingRequest: BookingTransportRequestDto): Promise<BookingDto> {
|
|
3860
3862
|
let url_ = this.baseUrl + "/move/booking/{bookingId}";
|
|
3861
3863
|
if (bookingId === undefined || bookingId === null)
|
|
3862
3864
|
throw new Error("The parameter 'bookingId' must be defined.");
|
|
@@ -3942,8 +3944,8 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
|
|
|
3942
3944
|
return Promise.resolve<BookingDto[]>(null as any);
|
|
3943
3945
|
}
|
|
3944
3946
|
|
|
3945
|
-
|
|
3946
|
-
let url_ = this.baseUrl + "/move/booking/book";
|
|
3947
|
+
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto> {
|
|
3948
|
+
let url_ = this.baseUrl + "/move/booking/book/transport";
|
|
3947
3949
|
url_ = url_.replace(/[?&]$/, "");
|
|
3948
3950
|
|
|
3949
3951
|
const content_ = JSON.stringify(bookingRequest);
|
|
@@ -3960,11 +3962,51 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
|
|
|
3960
3962
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
3961
3963
|
return this.http.fetch(url_, transformedOptions_);
|
|
3962
3964
|
}).then((_response: Response) => {
|
|
3963
|
-
return this.
|
|
3965
|
+
return this.processCreateBookingTransport(_response);
|
|
3964
3966
|
});
|
|
3965
3967
|
}
|
|
3966
3968
|
|
|
3967
|
-
protected
|
|
3969
|
+
protected processCreateBookingTransport(response: Response): Promise<BookingDto> {
|
|
3970
|
+
const status = response.status;
|
|
3971
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
3972
|
+
if (status === 200) {
|
|
3973
|
+
return response.text().then((_responseText) => {
|
|
3974
|
+
let result200: any = null;
|
|
3975
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
3976
|
+
result200 = BookingDto.fromJS(resultData200);
|
|
3977
|
+
return result200;
|
|
3978
|
+
});
|
|
3979
|
+
} else if (status !== 200 && status !== 204) {
|
|
3980
|
+
return response.text().then((_responseText) => {
|
|
3981
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
3982
|
+
});
|
|
3983
|
+
}
|
|
3984
|
+
return Promise.resolve<BookingDto>(null as any);
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto> {
|
|
3988
|
+
let url_ = this.baseUrl + "/move/booking/book/general";
|
|
3989
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
3990
|
+
|
|
3991
|
+
const content_ = JSON.stringify(bookingRequest);
|
|
3992
|
+
|
|
3993
|
+
let options_: RequestInit = {
|
|
3994
|
+
body: content_,
|
|
3995
|
+
method: "POST",
|
|
3996
|
+
headers: {
|
|
3997
|
+
"Content-Type": "application/json",
|
|
3998
|
+
"Accept": "application/json"
|
|
3999
|
+
}
|
|
4000
|
+
};
|
|
4001
|
+
|
|
4002
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
4003
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
4004
|
+
}).then((_response: Response) => {
|
|
4005
|
+
return this.processCreateBookingGeneral(_response);
|
|
4006
|
+
});
|
|
4007
|
+
}
|
|
4008
|
+
|
|
4009
|
+
protected processCreateBookingGeneral(response: Response): Promise<BookingDto> {
|
|
3968
4010
|
const status = response.status;
|
|
3969
4011
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
3970
4012
|
if (status === 200) {
|
|
@@ -25501,7 +25543,8 @@ export interface IBookingListDto {
|
|
|
25501
25543
|
|
|
25502
25544
|
export class BookingDto implements IBookingDto {
|
|
25503
25545
|
bookingId!: string;
|
|
25504
|
-
|
|
25546
|
+
bookingKind!: BookingKindDto;
|
|
25547
|
+
transportKind!: TransportKindDto;
|
|
25505
25548
|
status!: BookingStatusDto;
|
|
25506
25549
|
items!: BookingItemDto[];
|
|
25507
25550
|
fromLocation!: LocationDto;
|
|
@@ -25529,7 +25572,8 @@ export class BookingDto implements IBookingDto {
|
|
|
25529
25572
|
init(_data?: any) {
|
|
25530
25573
|
if (_data) {
|
|
25531
25574
|
this.bookingId = _data["bookingId"];
|
|
25532
|
-
this.
|
|
25575
|
+
this.bookingKind = _data["bookingKind"];
|
|
25576
|
+
this.transportKind = _data["transportKind"];
|
|
25533
25577
|
this.status = _data["status"];
|
|
25534
25578
|
if (Array.isArray(_data["items"])) {
|
|
25535
25579
|
this.items = [] as any;
|
|
@@ -25556,7 +25600,8 @@ export class BookingDto implements IBookingDto {
|
|
|
25556
25600
|
toJSON(data?: any) {
|
|
25557
25601
|
data = typeof data === 'object' ? data : {};
|
|
25558
25602
|
data["bookingId"] = this.bookingId;
|
|
25559
|
-
data["
|
|
25603
|
+
data["bookingKind"] = this.bookingKind;
|
|
25604
|
+
data["transportKind"] = this.transportKind;
|
|
25560
25605
|
data["status"] = this.status;
|
|
25561
25606
|
if (Array.isArray(this.items)) {
|
|
25562
25607
|
data["items"] = [];
|
|
@@ -25576,7 +25621,8 @@ export class BookingDto implements IBookingDto {
|
|
|
25576
25621
|
|
|
25577
25622
|
export interface IBookingDto {
|
|
25578
25623
|
bookingId: string;
|
|
25579
|
-
|
|
25624
|
+
bookingKind: BookingKindDto;
|
|
25625
|
+
transportKind: TransportKindDto;
|
|
25580
25626
|
status: BookingStatusDto;
|
|
25581
25627
|
items: BookingItemDto[];
|
|
25582
25628
|
fromLocation: LocationDto;
|
|
@@ -25588,14 +25634,17 @@ export interface IBookingDto {
|
|
|
25588
25634
|
updatedById?: string | null;
|
|
25589
25635
|
}
|
|
25590
25636
|
|
|
25591
|
-
export type
|
|
25637
|
+
export type BookingKindDto = "Forklift" | "General" | "ChipDisposal" | "Garbage";
|
|
25638
|
+
|
|
25639
|
+
export type TransportKindDto = "NormalForklift" | "LargeForklift" | "SideLoadingForklift";
|
|
25592
25640
|
|
|
25593
25641
|
export type BookingStatusDto = "Pending" | "Cancelled" | "InProgress" | "Delivered";
|
|
25594
25642
|
|
|
25595
25643
|
export class BookingItemDto implements IBookingItemDto {
|
|
25596
25644
|
trackingId!: string;
|
|
25597
|
-
workOrderId
|
|
25645
|
+
workOrderId?: string | null;
|
|
25598
25646
|
material?: string | null;
|
|
25647
|
+
comment?: string | null;
|
|
25599
25648
|
|
|
25600
25649
|
constructor(data?: IBookingItemDto) {
|
|
25601
25650
|
if (data) {
|
|
@@ -25611,6 +25660,7 @@ export class BookingItemDto implements IBookingItemDto {
|
|
|
25611
25660
|
this.trackingId = _data["trackingId"];
|
|
25612
25661
|
this.workOrderId = _data["workOrderId"];
|
|
25613
25662
|
this.material = _data["material"];
|
|
25663
|
+
this.comment = _data["comment"];
|
|
25614
25664
|
}
|
|
25615
25665
|
}
|
|
25616
25666
|
|
|
@@ -25626,14 +25676,16 @@ export class BookingItemDto implements IBookingItemDto {
|
|
|
25626
25676
|
data["trackingId"] = this.trackingId;
|
|
25627
25677
|
data["workOrderId"] = this.workOrderId;
|
|
25628
25678
|
data["material"] = this.material;
|
|
25679
|
+
data["comment"] = this.comment;
|
|
25629
25680
|
return data;
|
|
25630
25681
|
}
|
|
25631
25682
|
}
|
|
25632
25683
|
|
|
25633
25684
|
export interface IBookingItemDto {
|
|
25634
25685
|
trackingId: string;
|
|
25635
|
-
workOrderId
|
|
25686
|
+
workOrderId?: string | null;
|
|
25636
25687
|
material?: string | null;
|
|
25688
|
+
comment?: string | null;
|
|
25637
25689
|
}
|
|
25638
25690
|
|
|
25639
25691
|
export class LocationDto implements ILocationDto {
|
|
@@ -25744,13 +25796,14 @@ export interface IBookingRequestListDto {
|
|
|
25744
25796
|
|
|
25745
25797
|
export type BookingOrderDto = "Ascending" | "Descending";
|
|
25746
25798
|
|
|
25747
|
-
export class
|
|
25748
|
-
|
|
25799
|
+
export class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
25800
|
+
transportKind!: TransportKindDto;
|
|
25801
|
+
bookingKind!: BookingKindDto;
|
|
25749
25802
|
items!: BookingItemRequestDto[];
|
|
25750
25803
|
fromLocationId!: string;
|
|
25751
25804
|
toLocationId!: string;
|
|
25752
25805
|
|
|
25753
|
-
constructor(data?:
|
|
25806
|
+
constructor(data?: IBookingTransportRequestDto) {
|
|
25754
25807
|
if (data) {
|
|
25755
25808
|
for (var property in data) {
|
|
25756
25809
|
if (data.hasOwnProperty(property))
|
|
@@ -25764,7 +25817,8 @@ export class BookingRequestDto implements IBookingRequestDto {
|
|
|
25764
25817
|
|
|
25765
25818
|
init(_data?: any) {
|
|
25766
25819
|
if (_data) {
|
|
25767
|
-
this.
|
|
25820
|
+
this.transportKind = _data["transportKind"];
|
|
25821
|
+
this.bookingKind = _data["bookingKind"];
|
|
25768
25822
|
if (Array.isArray(_data["items"])) {
|
|
25769
25823
|
this.items = [] as any;
|
|
25770
25824
|
for (let item of _data["items"])
|
|
@@ -25775,16 +25829,17 @@ export class BookingRequestDto implements IBookingRequestDto {
|
|
|
25775
25829
|
}
|
|
25776
25830
|
}
|
|
25777
25831
|
|
|
25778
|
-
static fromJS(data: any):
|
|
25832
|
+
static fromJS(data: any): BookingTransportRequestDto {
|
|
25779
25833
|
data = typeof data === 'object' ? data : {};
|
|
25780
|
-
let result = new
|
|
25834
|
+
let result = new BookingTransportRequestDto();
|
|
25781
25835
|
result.init(data);
|
|
25782
25836
|
return result;
|
|
25783
25837
|
}
|
|
25784
25838
|
|
|
25785
25839
|
toJSON(data?: any) {
|
|
25786
25840
|
data = typeof data === 'object' ? data : {};
|
|
25787
|
-
data["
|
|
25841
|
+
data["transportKind"] = this.transportKind;
|
|
25842
|
+
data["bookingKind"] = this.bookingKind;
|
|
25788
25843
|
if (Array.isArray(this.items)) {
|
|
25789
25844
|
data["items"] = [];
|
|
25790
25845
|
for (let item of this.items)
|
|
@@ -25796,8 +25851,9 @@ export class BookingRequestDto implements IBookingRequestDto {
|
|
|
25796
25851
|
}
|
|
25797
25852
|
}
|
|
25798
25853
|
|
|
25799
|
-
export interface
|
|
25800
|
-
|
|
25854
|
+
export interface IBookingTransportRequestDto {
|
|
25855
|
+
transportKind: TransportKindDto;
|
|
25856
|
+
bookingKind: BookingKindDto;
|
|
25801
25857
|
items: BookingItemRequestDto[];
|
|
25802
25858
|
fromLocationId: string;
|
|
25803
25859
|
toLocationId: string;
|
|
@@ -25843,9 +25899,64 @@ export interface IBookingItemRequestDto {
|
|
|
25843
25899
|
comment?: string | null;
|
|
25844
25900
|
}
|
|
25845
25901
|
|
|
25902
|
+
export class BookingGeneralRequestDto implements IBookingGeneralRequestDto {
|
|
25903
|
+
bookingKind!: BookingKindDto;
|
|
25904
|
+
transportKind!: TransportKindDto;
|
|
25905
|
+
fromLocationId!: string;
|
|
25906
|
+
toLocationId!: string;
|
|
25907
|
+
material?: string | null;
|
|
25908
|
+
comment?: string | null;
|
|
25909
|
+
|
|
25910
|
+
constructor(data?: IBookingGeneralRequestDto) {
|
|
25911
|
+
if (data) {
|
|
25912
|
+
for (var property in data) {
|
|
25913
|
+
if (data.hasOwnProperty(property))
|
|
25914
|
+
(<any>this)[property] = (<any>data)[property];
|
|
25915
|
+
}
|
|
25916
|
+
}
|
|
25917
|
+
}
|
|
25918
|
+
|
|
25919
|
+
init(_data?: any) {
|
|
25920
|
+
if (_data) {
|
|
25921
|
+
this.bookingKind = _data["bookingKind"];
|
|
25922
|
+
this.transportKind = _data["transportKind"];
|
|
25923
|
+
this.fromLocationId = _data["fromLocationId"];
|
|
25924
|
+
this.toLocationId = _data["toLocationId"];
|
|
25925
|
+
this.material = _data["material"];
|
|
25926
|
+
this.comment = _data["comment"];
|
|
25927
|
+
}
|
|
25928
|
+
}
|
|
25929
|
+
|
|
25930
|
+
static fromJS(data: any): BookingGeneralRequestDto {
|
|
25931
|
+
data = typeof data === 'object' ? data : {};
|
|
25932
|
+
let result = new BookingGeneralRequestDto();
|
|
25933
|
+
result.init(data);
|
|
25934
|
+
return result;
|
|
25935
|
+
}
|
|
25936
|
+
|
|
25937
|
+
toJSON(data?: any) {
|
|
25938
|
+
data = typeof data === 'object' ? data : {};
|
|
25939
|
+
data["bookingKind"] = this.bookingKind;
|
|
25940
|
+
data["transportKind"] = this.transportKind;
|
|
25941
|
+
data["fromLocationId"] = this.fromLocationId;
|
|
25942
|
+
data["toLocationId"] = this.toLocationId;
|
|
25943
|
+
data["material"] = this.material;
|
|
25944
|
+
data["comment"] = this.comment;
|
|
25945
|
+
return data;
|
|
25946
|
+
}
|
|
25947
|
+
}
|
|
25948
|
+
|
|
25949
|
+
export interface IBookingGeneralRequestDto {
|
|
25950
|
+
bookingKind: BookingKindDto;
|
|
25951
|
+
transportKind: TransportKindDto;
|
|
25952
|
+
fromLocationId: string;
|
|
25953
|
+
toLocationId: string;
|
|
25954
|
+
material?: string | null;
|
|
25955
|
+
comment?: string | null;
|
|
25956
|
+
}
|
|
25957
|
+
|
|
25846
25958
|
export class BookingUpdateDto implements IBookingUpdateDto {
|
|
25847
25959
|
bookingId!: string;
|
|
25848
|
-
comment?: string | null;
|
|
25849
25960
|
|
|
25850
25961
|
constructor(data?: IBookingUpdateDto) {
|
|
25851
25962
|
if (data) {
|
|
@@ -25859,7 +25970,6 @@ export class BookingUpdateDto implements IBookingUpdateDto {
|
|
|
25859
25970
|
init(_data?: any) {
|
|
25860
25971
|
if (_data) {
|
|
25861
25972
|
this.bookingId = _data["bookingId"];
|
|
25862
|
-
this.comment = _data["comment"];
|
|
25863
25973
|
}
|
|
25864
25974
|
}
|
|
25865
25975
|
|
|
@@ -25873,19 +25983,16 @@ export class BookingUpdateDto implements IBookingUpdateDto {
|
|
|
25873
25983
|
toJSON(data?: any) {
|
|
25874
25984
|
data = typeof data === 'object' ? data : {};
|
|
25875
25985
|
data["bookingId"] = this.bookingId;
|
|
25876
|
-
data["comment"] = this.comment;
|
|
25877
25986
|
return data;
|
|
25878
25987
|
}
|
|
25879
25988
|
}
|
|
25880
25989
|
|
|
25881
25990
|
export interface IBookingUpdateDto {
|
|
25882
25991
|
bookingId: string;
|
|
25883
|
-
comment?: string | null;
|
|
25884
25992
|
}
|
|
25885
25993
|
|
|
25886
25994
|
export class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateDto {
|
|
25887
25995
|
bookingId!: string;
|
|
25888
|
-
comment?: string | null;
|
|
25889
25996
|
deliveryExceptions?: BookingDeliveryExceptionDto[] | null;
|
|
25890
25997
|
|
|
25891
25998
|
constructor(data?: IBookingDeliveryUpdateDto) {
|
|
@@ -25900,7 +26007,6 @@ export class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateDto {
|
|
|
25900
26007
|
init(_data?: any) {
|
|
25901
26008
|
if (_data) {
|
|
25902
26009
|
this.bookingId = _data["bookingId"];
|
|
25903
|
-
this.comment = _data["comment"];
|
|
25904
26010
|
if (Array.isArray(_data["deliveryExceptions"])) {
|
|
25905
26011
|
this.deliveryExceptions = [] as any;
|
|
25906
26012
|
for (let item of _data["deliveryExceptions"])
|
|
@@ -25919,7 +26025,6 @@ export class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateDto {
|
|
|
25919
26025
|
toJSON(data?: any) {
|
|
25920
26026
|
data = typeof data === 'object' ? data : {};
|
|
25921
26027
|
data["bookingId"] = this.bookingId;
|
|
25922
|
-
data["comment"] = this.comment;
|
|
25923
26028
|
if (Array.isArray(this.deliveryExceptions)) {
|
|
25924
26029
|
data["deliveryExceptions"] = [];
|
|
25925
26030
|
for (let item of this.deliveryExceptions)
|
|
@@ -25931,7 +26036,6 @@ export class BookingDeliveryUpdateDto implements IBookingDeliveryUpdateDto {
|
|
|
25931
26036
|
|
|
25932
26037
|
export interface IBookingDeliveryUpdateDto {
|
|
25933
26038
|
bookingId: string;
|
|
25934
|
-
comment?: string | null;
|
|
25935
26039
|
deliveryExceptions?: BookingDeliveryExceptionDto[] | null;
|
|
25936
26040
|
}
|
|
25937
26041
|
|
|
@@ -25982,7 +26086,7 @@ export interface IBookingDeliveryExceptionDto {
|
|
|
25982
26086
|
export class TrackingHistoryDto implements ITrackingHistoryDto {
|
|
25983
26087
|
trackingId!: string;
|
|
25984
26088
|
palletNumber!: number;
|
|
25985
|
-
workOrderId
|
|
26089
|
+
workOrderId?: string | null;
|
|
25986
26090
|
trackingEvents!: TrackingEventDto[];
|
|
25987
26091
|
|
|
25988
26092
|
constructor(data?: ITrackingHistoryDto) {
|
|
@@ -26034,7 +26138,7 @@ export class TrackingHistoryDto implements ITrackingHistoryDto {
|
|
|
26034
26138
|
export interface ITrackingHistoryDto {
|
|
26035
26139
|
trackingId: string;
|
|
26036
26140
|
palletNumber: number;
|
|
26037
|
-
workOrderId
|
|
26141
|
+
workOrderId?: string | null;
|
|
26038
26142
|
trackingEvents: TrackingEventDto[];
|
|
26039
26143
|
}
|
|
26040
26144
|
|