@ignos/api-client 20250519.0.11780 → 20250521.0.11797

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.
@@ -1602,6 +1602,7 @@ export interface IMoveBookingClient {
1602
1602
  updateBooking(bookingRequest: BookingUpdateDto): Promise<BookingDto>;
1603
1603
  createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto[]>;
1604
1604
  createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
1605
+ preBookGeneral(req: PreBookingGeneralRequestDto): Promise<PreBookingResultItemDto[]>;
1605
1606
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
1606
1607
  }
1607
1608
  export declare class MoveBookingClient extends AuthorizedApiBase implements IMoveBookingClient {
@@ -1625,6 +1626,8 @@ export declare class MoveBookingClient extends AuthorizedApiBase implements IMov
1625
1626
  protected processCreateBookingTransport(response: Response): Promise<BookingDto[]>;
1626
1627
  createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
1627
1628
  protected processCreateBookingGeneral(response: Response): Promise<BookingDto[]>;
1629
+ preBookGeneral(req: PreBookingGeneralRequestDto): Promise<PreBookingResultItemDto[]>;
1630
+ protected processPreBookGeneral(response: Response): Promise<PreBookingResultItemDto[]>;
1628
1631
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
1629
1632
  protected processUpdateBookingStatus(response: Response): Promise<BookingDto>;
1630
1633
  }
@@ -9382,6 +9385,36 @@ export interface IBookingGeneralRequestDto {
9382
9385
  comment?: string | null;
9383
9386
  itemCount: number;
9384
9387
  }
9388
+ export declare class PreBookingResultItemDto implements IPreBookingResultItemDto {
9389
+ parcelId?: string;
9390
+ trackingId?: string;
9391
+ comment?: string | null;
9392
+ constructor(data?: IPreBookingResultItemDto);
9393
+ init(_data?: any): void;
9394
+ static fromJS(data: any): PreBookingResultItemDto;
9395
+ toJSON(data?: any): any;
9396
+ }
9397
+ export interface IPreBookingResultItemDto {
9398
+ parcelId?: string;
9399
+ trackingId?: string;
9400
+ comment?: string | null;
9401
+ }
9402
+ export declare class PreBookingGeneralRequestDto implements IPreBookingGeneralRequestDto {
9403
+ parcelKind?: ParcelKindDto;
9404
+ transportKind?: TransportKindDto;
9405
+ itemCount?: number;
9406
+ comment?: string | null;
9407
+ constructor(data?: IPreBookingGeneralRequestDto);
9408
+ init(_data?: any): void;
9409
+ static fromJS(data: any): PreBookingGeneralRequestDto;
9410
+ toJSON(data?: any): any;
9411
+ }
9412
+ export interface IPreBookingGeneralRequestDto {
9413
+ parcelKind?: ParcelKindDto;
9414
+ transportKind?: TransportKindDto;
9415
+ itemCount?: number;
9416
+ comment?: string | null;
9417
+ }
9385
9418
  export declare class BookingStatusUpdateDto implements IBookingStatusUpdateDto {
9386
9419
  bookingId: string;
9387
9420
  status: BookingStatusDto;
@@ -13428,6 +13428,50 @@ export class MoveBookingClient extends AuthorizedApiBase {
13428
13428
  }
13429
13429
  return Promise.resolve(null);
13430
13430
  }
13431
+ preBookGeneral(req) {
13432
+ let url_ = this.baseUrl + "/move/booking/prebooking";
13433
+ url_ = url_.replace(/[?&]$/, "");
13434
+ const content_ = JSON.stringify(req);
13435
+ let options_ = {
13436
+ body: content_,
13437
+ method: "POST",
13438
+ headers: {
13439
+ "Content-Type": "application/json",
13440
+ "Accept": "application/json"
13441
+ }
13442
+ };
13443
+ return this.transformOptions(options_).then(transformedOptions_ => {
13444
+ return this.http.fetch(url_, transformedOptions_);
13445
+ }).then((_response) => {
13446
+ return this.processPreBookGeneral(_response);
13447
+ });
13448
+ }
13449
+ processPreBookGeneral(response) {
13450
+ const status = response.status;
13451
+ let _headers = {};
13452
+ if (response.headers && response.headers.forEach) {
13453
+ response.headers.forEach((v, k) => _headers[k] = v);
13454
+ }
13455
+ ;
13456
+ if (status === 201) {
13457
+ return response.text().then((_responseText) => {
13458
+ let result201 = null;
13459
+ let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
13460
+ if (Array.isArray(resultData201)) {
13461
+ result201 = [];
13462
+ for (let item of resultData201)
13463
+ result201.push(PreBookingResultItemDto.fromJS(item));
13464
+ }
13465
+ return result201;
13466
+ });
13467
+ }
13468
+ else if (status !== 200 && status !== 204) {
13469
+ return response.text().then((_responseText) => {
13470
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
13471
+ });
13472
+ }
13473
+ return Promise.resolve(null);
13474
+ }
13431
13475
  updateBookingStatus(bookingUpdate) {
13432
13476
  let url_ = this.baseUrl + "/move/booking/updatestatus";
13433
13477
  url_ = url_.replace(/[?&]$/, "");
@@ -35503,6 +35547,68 @@ export class BookingGeneralRequestDto {
35503
35547
  return data;
35504
35548
  }
35505
35549
  }
35550
+ export class PreBookingResultItemDto {
35551
+ constructor(data) {
35552
+ if (data) {
35553
+ for (var property in data) {
35554
+ if (data.hasOwnProperty(property))
35555
+ this[property] = data[property];
35556
+ }
35557
+ }
35558
+ }
35559
+ init(_data) {
35560
+ if (_data) {
35561
+ this.parcelId = _data["parcelId"];
35562
+ this.trackingId = _data["trackingId"];
35563
+ this.comment = _data["comment"];
35564
+ }
35565
+ }
35566
+ static fromJS(data) {
35567
+ data = typeof data === 'object' ? data : {};
35568
+ let result = new PreBookingResultItemDto();
35569
+ result.init(data);
35570
+ return result;
35571
+ }
35572
+ toJSON(data) {
35573
+ data = typeof data === 'object' ? data : {};
35574
+ data["parcelId"] = this.parcelId;
35575
+ data["trackingId"] = this.trackingId;
35576
+ data["comment"] = this.comment;
35577
+ return data;
35578
+ }
35579
+ }
35580
+ export class PreBookingGeneralRequestDto {
35581
+ constructor(data) {
35582
+ if (data) {
35583
+ for (var property in data) {
35584
+ if (data.hasOwnProperty(property))
35585
+ this[property] = data[property];
35586
+ }
35587
+ }
35588
+ }
35589
+ init(_data) {
35590
+ if (_data) {
35591
+ this.parcelKind = _data["parcelKind"];
35592
+ this.transportKind = _data["transportKind"];
35593
+ this.itemCount = _data["itemCount"];
35594
+ this.comment = _data["comment"];
35595
+ }
35596
+ }
35597
+ static fromJS(data) {
35598
+ data = typeof data === 'object' ? data : {};
35599
+ let result = new PreBookingGeneralRequestDto();
35600
+ result.init(data);
35601
+ return result;
35602
+ }
35603
+ toJSON(data) {
35604
+ data = typeof data === 'object' ? data : {};
35605
+ data["parcelKind"] = this.parcelKind;
35606
+ data["transportKind"] = this.transportKind;
35607
+ data["itemCount"] = this.itemCount;
35608
+ data["comment"] = this.comment;
35609
+ return data;
35610
+ }
35611
+ }
35506
35612
  export class BookingStatusUpdateDto {
35507
35613
  constructor(data) {
35508
35614
  if (data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20250519.0.11780",
3
+ "version": "20250521.0.11797",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -14040,6 +14040,8 @@ export interface IMoveBookingClient {
14040
14040
 
14041
14041
  createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
14042
14042
 
14043
+ preBookGeneral(req: PreBookingGeneralRequestDto): Promise<PreBookingResultItemDto[]>;
14044
+
14043
14045
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
14044
14046
  }
14045
14047
 
@@ -14344,6 +14346,50 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
14344
14346
  return Promise.resolve<BookingDto[]>(null as any);
14345
14347
  }
14346
14348
 
14349
+ preBookGeneral(req: PreBookingGeneralRequestDto): Promise<PreBookingResultItemDto[]> {
14350
+ let url_ = this.baseUrl + "/move/booking/prebooking";
14351
+ url_ = url_.replace(/[?&]$/, "");
14352
+
14353
+ const content_ = JSON.stringify(req);
14354
+
14355
+ let options_: RequestInit = {
14356
+ body: content_,
14357
+ method: "POST",
14358
+ headers: {
14359
+ "Content-Type": "application/json",
14360
+ "Accept": "application/json"
14361
+ }
14362
+ };
14363
+
14364
+ return this.transformOptions(options_).then(transformedOptions_ => {
14365
+ return this.http.fetch(url_, transformedOptions_);
14366
+ }).then((_response: Response) => {
14367
+ return this.processPreBookGeneral(_response);
14368
+ });
14369
+ }
14370
+
14371
+ protected processPreBookGeneral(response: Response): Promise<PreBookingResultItemDto[]> {
14372
+ const status = response.status;
14373
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
14374
+ if (status === 201) {
14375
+ return response.text().then((_responseText) => {
14376
+ let result201: any = null;
14377
+ let resultData201 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
14378
+ if (Array.isArray(resultData201)) {
14379
+ result201 = [] as any;
14380
+ for (let item of resultData201)
14381
+ result201!.push(PreBookingResultItemDto.fromJS(item));
14382
+ }
14383
+ return result201;
14384
+ });
14385
+ } else if (status !== 200 && status !== 204) {
14386
+ return response.text().then((_responseText) => {
14387
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
14388
+ });
14389
+ }
14390
+ return Promise.resolve<PreBookingResultItemDto[]>(null as any);
14391
+ }
14392
+
14347
14393
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto> {
14348
14394
  let url_ = this.baseUrl + "/move/booking/updatestatus";
14349
14395
  url_ = url_.replace(/[?&]$/, "");
@@ -43761,6 +43807,98 @@ export interface IBookingGeneralRequestDto {
43761
43807
  itemCount: number;
43762
43808
  }
43763
43809
 
43810
+ export class PreBookingResultItemDto implements IPreBookingResultItemDto {
43811
+ parcelId?: string;
43812
+ trackingId?: string;
43813
+ comment?: string | null;
43814
+
43815
+ constructor(data?: IPreBookingResultItemDto) {
43816
+ if (data) {
43817
+ for (var property in data) {
43818
+ if (data.hasOwnProperty(property))
43819
+ (<any>this)[property] = (<any>data)[property];
43820
+ }
43821
+ }
43822
+ }
43823
+
43824
+ init(_data?: any) {
43825
+ if (_data) {
43826
+ this.parcelId = _data["parcelId"];
43827
+ this.trackingId = _data["trackingId"];
43828
+ this.comment = _data["comment"];
43829
+ }
43830
+ }
43831
+
43832
+ static fromJS(data: any): PreBookingResultItemDto {
43833
+ data = typeof data === 'object' ? data : {};
43834
+ let result = new PreBookingResultItemDto();
43835
+ result.init(data);
43836
+ return result;
43837
+ }
43838
+
43839
+ toJSON(data?: any) {
43840
+ data = typeof data === 'object' ? data : {};
43841
+ data["parcelId"] = this.parcelId;
43842
+ data["trackingId"] = this.trackingId;
43843
+ data["comment"] = this.comment;
43844
+ return data;
43845
+ }
43846
+ }
43847
+
43848
+ export interface IPreBookingResultItemDto {
43849
+ parcelId?: string;
43850
+ trackingId?: string;
43851
+ comment?: string | null;
43852
+ }
43853
+
43854
+ export class PreBookingGeneralRequestDto implements IPreBookingGeneralRequestDto {
43855
+ parcelKind?: ParcelKindDto;
43856
+ transportKind?: TransportKindDto;
43857
+ itemCount?: number;
43858
+ comment?: string | null;
43859
+
43860
+ constructor(data?: IPreBookingGeneralRequestDto) {
43861
+ if (data) {
43862
+ for (var property in data) {
43863
+ if (data.hasOwnProperty(property))
43864
+ (<any>this)[property] = (<any>data)[property];
43865
+ }
43866
+ }
43867
+ }
43868
+
43869
+ init(_data?: any) {
43870
+ if (_data) {
43871
+ this.parcelKind = _data["parcelKind"];
43872
+ this.transportKind = _data["transportKind"];
43873
+ this.itemCount = _data["itemCount"];
43874
+ this.comment = _data["comment"];
43875
+ }
43876
+ }
43877
+
43878
+ static fromJS(data: any): PreBookingGeneralRequestDto {
43879
+ data = typeof data === 'object' ? data : {};
43880
+ let result = new PreBookingGeneralRequestDto();
43881
+ result.init(data);
43882
+ return result;
43883
+ }
43884
+
43885
+ toJSON(data?: any) {
43886
+ data = typeof data === 'object' ? data : {};
43887
+ data["parcelKind"] = this.parcelKind;
43888
+ data["transportKind"] = this.transportKind;
43889
+ data["itemCount"] = this.itemCount;
43890
+ data["comment"] = this.comment;
43891
+ return data;
43892
+ }
43893
+ }
43894
+
43895
+ export interface IPreBookingGeneralRequestDto {
43896
+ parcelKind?: ParcelKindDto;
43897
+ transportKind?: TransportKindDto;
43898
+ itemCount?: number;
43899
+ comment?: string | null;
43900
+ }
43901
+
43764
43902
  export class BookingStatusUpdateDto implements IBookingStatusUpdateDto {
43765
43903
  bookingId!: string;
43766
43904
  status!: BookingStatusDto;