@ignos/api-client 20251023.0.12959 → 20251023.0.12963

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.
@@ -1692,7 +1692,7 @@ export interface IMoveBookingClient {
1692
1692
  createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
1693
1693
  preBookGeneral(req: PreBookingGeneralRequestDto): Promise<PreBookingResultItemDto[]>;
1694
1694
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
1695
- exportBookings(includeTracking: boolean | undefined): Promise<DownloadDto>;
1695
+ exportBookings(includeTracking: boolean | undefined): Promise<FileResponse>;
1696
1696
  }
1697
1697
  export declare class MoveBookingClient extends AuthorizedApiBase implements IMoveBookingClient {
1698
1698
  private http;
@@ -1719,8 +1719,8 @@ export declare class MoveBookingClient extends AuthorizedApiBase implements IMov
1719
1719
  protected processPreBookGeneral(response: Response): Promise<PreBookingResultItemDto[]>;
1720
1720
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
1721
1721
  protected processUpdateBookingStatus(response: Response): Promise<BookingDto>;
1722
- exportBookings(includeTracking: boolean | undefined): Promise<DownloadDto>;
1723
- protected processExportBookings(response: Response): Promise<DownloadDto>;
1722
+ exportBookings(includeTracking: boolean | undefined): Promise<FileResponse>;
1723
+ protected processExportBookings(response: Response): Promise<FileResponse>;
1724
1724
  }
1725
1725
  export interface IMoveLocationsClient {
1726
1726
  listLocations(): Promise<LocationZoneGroupDto[]>;
@@ -1813,7 +1813,7 @@ export interface IMoveTrackingClient {
1813
1813
  createTrackingEvents(trackingUpdates: TrackingUpdateDto[]): Promise<TrackingHistoryDto[]>;
1814
1814
  createTrackingHistory(trackingUpdates: TrackingHistoryUpdateDto[]): Promise<TrackingHistoryDto[]>;
1815
1815
  deleteTrackingHistory(trackingId: string): Promise<void>;
1816
- exportParcels(): Promise<DownloadDto>;
1816
+ exportParcels(): Promise<FileResponse>;
1817
1817
  }
1818
1818
  export declare class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
1819
1819
  private http;
@@ -1838,8 +1838,8 @@ export declare class MoveTrackingClient extends AuthorizedApiBase implements IMo
1838
1838
  protected processCreateTrackingHistory(response: Response): Promise<TrackingHistoryDto[]>;
1839
1839
  deleteTrackingHistory(trackingId: string): Promise<void>;
1840
1840
  protected processDeleteTrackingHistory(response: Response): Promise<void>;
1841
- exportParcels(): Promise<DownloadDto>;
1842
- protected processExportParcels(response: Response): Promise<DownloadDto>;
1841
+ exportParcels(): Promise<FileResponse>;
1842
+ protected processExportParcels(response: Response): Promise<FileResponse>;
1843
1843
  }
1844
1844
  export interface IParcelCategoryClient {
1845
1845
  getSettings(): Promise<ParcelCategorySettingsDto>;
@@ -14613,7 +14613,7 @@ export class MoveBookingClient extends AuthorizedApiBase {
14613
14613
  let options_ = {
14614
14614
  method: "POST",
14615
14615
  headers: {
14616
- "Accept": "application/json"
14616
+ "Accept": "application/octet-stream"
14617
14617
  }
14618
14618
  };
14619
14619
  return this.transformOptions(options_).then(transformedOptions_ => {
@@ -14629,13 +14629,18 @@ export class MoveBookingClient extends AuthorizedApiBase {
14629
14629
  response.headers.forEach((v, k) => _headers[k] = v);
14630
14630
  }
14631
14631
  ;
14632
- if (status === 200) {
14633
- return response.text().then((_responseText) => {
14634
- let result200 = null;
14635
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
14636
- result200 = DownloadDto.fromJS(resultData200);
14637
- return result200;
14638
- });
14632
+ if (status === 200 || status === 206) {
14633
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
14634
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
14635
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
14636
+ if (fileName) {
14637
+ fileName = decodeURIComponent(fileName);
14638
+ }
14639
+ else {
14640
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
14641
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
14642
+ }
14643
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
14639
14644
  }
14640
14645
  else if (status !== 200 && status !== 204) {
14641
14646
  return response.text().then((_responseText) => {
@@ -15606,7 +15611,7 @@ export class MoveTrackingClient extends AuthorizedApiBase {
15606
15611
  let options_ = {
15607
15612
  method: "POST",
15608
15613
  headers: {
15609
- "Accept": "application/json"
15614
+ "Accept": "application/octet-stream"
15610
15615
  }
15611
15616
  };
15612
15617
  return this.transformOptions(options_).then(transformedOptions_ => {
@@ -15622,13 +15627,18 @@ export class MoveTrackingClient extends AuthorizedApiBase {
15622
15627
  response.headers.forEach((v, k) => _headers[k] = v);
15623
15628
  }
15624
15629
  ;
15625
- if (status === 200) {
15626
- return response.text().then((_responseText) => {
15627
- let result200 = null;
15628
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
15629
- result200 = DownloadDto.fromJS(resultData200);
15630
- return result200;
15631
- });
15630
+ if (status === 200 || status === 206) {
15631
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
15632
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
15633
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
15634
+ if (fileName) {
15635
+ fileName = decodeURIComponent(fileName);
15636
+ }
15637
+ else {
15638
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
15639
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
15640
+ }
15641
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
15632
15642
  }
15633
15643
  else if (status !== 200 && status !== 204) {
15634
15644
  return response.text().then((_responseText) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20251023.0.12959",
3
+ "version": "20251023.0.12963",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -15180,7 +15180,7 @@ export interface IMoveBookingClient {
15180
15180
 
15181
15181
  updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
15182
15182
 
15183
- exportBookings(includeTracking: boolean | undefined): Promise<DownloadDto>;
15183
+ exportBookings(includeTracking: boolean | undefined): Promise<FileResponse>;
15184
15184
  }
15185
15185
 
15186
15186
  export class MoveBookingClient extends AuthorizedApiBase implements IMoveBookingClient {
@@ -15568,7 +15568,7 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
15568
15568
  return Promise.resolve<BookingDto>(null as any);
15569
15569
  }
15570
15570
 
15571
- exportBookings(includeTracking: boolean | undefined): Promise<DownloadDto> {
15571
+ exportBookings(includeTracking: boolean | undefined): Promise<FileResponse> {
15572
15572
  let url_ = this.baseUrl + "/move/booking/export?";
15573
15573
  if (includeTracking === null)
15574
15574
  throw new globalThis.Error("The parameter 'includeTracking' cannot be null.");
@@ -15579,7 +15579,7 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
15579
15579
  let options_: RequestInit = {
15580
15580
  method: "POST",
15581
15581
  headers: {
15582
- "Accept": "application/json"
15582
+ "Accept": "application/octet-stream"
15583
15583
  }
15584
15584
  };
15585
15585
 
@@ -15590,22 +15590,26 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
15590
15590
  });
15591
15591
  }
15592
15592
 
15593
- protected processExportBookings(response: Response): Promise<DownloadDto> {
15593
+ protected processExportBookings(response: Response): Promise<FileResponse> {
15594
15594
  const status = response.status;
15595
15595
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
15596
- if (status === 200) {
15597
- return response.text().then((_responseText) => {
15598
- let result200: any = null;
15599
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
15600
- result200 = DownloadDto.fromJS(resultData200);
15601
- return result200;
15602
- });
15596
+ if (status === 200 || status === 206) {
15597
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
15598
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
15599
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
15600
+ if (fileName) {
15601
+ fileName = decodeURIComponent(fileName);
15602
+ } else {
15603
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
15604
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
15605
+ }
15606
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
15603
15607
  } else if (status !== 200 && status !== 204) {
15604
15608
  return response.text().then((_responseText) => {
15605
15609
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
15606
15610
  });
15607
15611
  }
15608
- return Promise.resolve<DownloadDto>(null as any);
15612
+ return Promise.resolve<FileResponse>(null as any);
15609
15613
  }
15610
15614
  }
15611
15615
 
@@ -16288,7 +16292,7 @@ export interface IMoveTrackingClient {
16288
16292
 
16289
16293
  deleteTrackingHistory(trackingId: string): Promise<void>;
16290
16294
 
16291
- exportParcels(): Promise<DownloadDto>;
16295
+ exportParcels(): Promise<FileResponse>;
16292
16296
  }
16293
16297
 
16294
16298
  export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
@@ -16635,14 +16639,14 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
16635
16639
  return Promise.resolve<void>(null as any);
16636
16640
  }
16637
16641
 
16638
- exportParcels(): Promise<DownloadDto> {
16642
+ exportParcels(): Promise<FileResponse> {
16639
16643
  let url_ = this.baseUrl + "/move/tracking/export";
16640
16644
  url_ = url_.replace(/[?&]$/, "");
16641
16645
 
16642
16646
  let options_: RequestInit = {
16643
16647
  method: "POST",
16644
16648
  headers: {
16645
- "Accept": "application/json"
16649
+ "Accept": "application/octet-stream"
16646
16650
  }
16647
16651
  };
16648
16652
 
@@ -16653,22 +16657,26 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
16653
16657
  });
16654
16658
  }
16655
16659
 
16656
- protected processExportParcels(response: Response): Promise<DownloadDto> {
16660
+ protected processExportParcels(response: Response): Promise<FileResponse> {
16657
16661
  const status = response.status;
16658
16662
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
16659
- if (status === 200) {
16660
- return response.text().then((_responseText) => {
16661
- let result200: any = null;
16662
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
16663
- result200 = DownloadDto.fromJS(resultData200);
16664
- return result200;
16665
- });
16663
+ if (status === 200 || status === 206) {
16664
+ const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
16665
+ let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
16666
+ let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
16667
+ if (fileName) {
16668
+ fileName = decodeURIComponent(fileName);
16669
+ } else {
16670
+ fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
16671
+ fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
16672
+ }
16673
+ return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
16666
16674
  } else if (status !== 200 && status !== 204) {
16667
16675
  return response.text().then((_responseText) => {
16668
16676
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
16669
16677
  });
16670
16678
  }
16671
- return Promise.resolve<DownloadDto>(null as any);
16679
+ return Promise.resolve<FileResponse>(null as any);
16672
16680
  }
16673
16681
  }
16674
16682