@ignos/api-client 20240702.0.9720 → 20240704.0.9748

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.
@@ -639,7 +639,7 @@ export declare class MeasuringToolsClient extends AuthorizedApiBase implements I
639
639
  protected processGetMeasuringToolSettings(response: Response): Promise<MeasuringToolSettingsDto>;
640
640
  }
641
641
  export interface IMachinesClient {
642
- listMachines(): Promise<MachineDto[]>;
642
+ listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]>;
643
643
  listMachineGroups(): Promise<MachineGroupDto[]>;
644
644
  createMachineGroup(request: CreateMachineGroup): Promise<CreateMachineGroupResponse>;
645
645
  updateMachineGroup(id: string, request: UpdateMachineGroup): Promise<void>;
@@ -662,7 +662,7 @@ export declare class MachinesClient extends AuthorizedApiBase implements IMachin
662
662
  constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
663
663
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
664
664
  });
665
- listMachines(): Promise<MachineDto[]>;
665
+ listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]>;
666
666
  protected processListMachines(response: Response): Promise<MachineDto[]>;
667
667
  listMachineGroups(): Promise<MachineGroupDto[]>;
668
668
  protected processListMachineGroups(response: Response): Promise<MachineGroupDto[]>;
@@ -1579,7 +1579,7 @@ export interface IMoveTrackingClient {
1579
1579
  createTrackingEvents(trackingUpdates: TrackingUpdateDto[]): Promise<TrackingHistoryDto[]>;
1580
1580
  createTrackingHistory(trackingUpdates: TrackingHistoryUpdateDto[]): Promise<TrackingHistoryDto[]>;
1581
1581
  deleteTrackingHistory(trackingId: string): Promise<void>;
1582
- createLabel(trackingIds: string[]): Promise<FileResponse>;
1582
+ createLabel(trackingIds: string[]): Promise<DownloadDto>;
1583
1583
  }
1584
1584
  export declare class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
1585
1585
  private http;
@@ -1602,8 +1602,8 @@ export declare class MoveTrackingClient extends AuthorizedApiBase implements IMo
1602
1602
  protected processCreateTrackingHistory(response: Response): Promise<TrackingHistoryDto[]>;
1603
1603
  deleteTrackingHistory(trackingId: string): Promise<void>;
1604
1604
  protected processDeleteTrackingHistory(response: Response): Promise<void>;
1605
- createLabel(trackingIds: string[]): Promise<FileResponse>;
1606
- protected processCreateLabel(response: Response): Promise<FileResponse>;
1605
+ createLabel(trackingIds: string[]): Promise<DownloadDto>;
1606
+ protected processCreateLabel(response: Response): Promise<DownloadDto>;
1607
1607
  }
1608
1608
  export interface IMoveWorkOrdersClient {
1609
1609
  searchWorkOrders(input: string | null | undefined, pageSize: number | null | undefined): Promise<SearchWorkOrderDto[]>;
@@ -4838,8 +4838,12 @@ export class MachinesClient extends AuthorizedApiBase {
4838
4838
  this.http = http ? http : window;
4839
4839
  this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
4840
4840
  }
4841
- listMachines() {
4842
- let url_ = this.baseUrl + "/machines";
4841
+ listMachines(onlyConnectedMachines) {
4842
+ let url_ = this.baseUrl + "/machines?";
4843
+ if (onlyConnectedMachines === null)
4844
+ throw new Error("The parameter 'onlyConnectedMachines' cannot be null.");
4845
+ else if (onlyConnectedMachines !== undefined)
4846
+ url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
4843
4847
  url_ = url_.replace(/[?&]$/, "");
4844
4848
  let options_ = {
4845
4849
  method: "GET",
@@ -13267,7 +13271,7 @@ export class MoveTrackingClient extends AuthorizedApiBase {
13267
13271
  method: "POST",
13268
13272
  headers: {
13269
13273
  "Content-Type": "application/json",
13270
- "Accept": "application/octet-stream"
13274
+ "Accept": "application/json"
13271
13275
  }
13272
13276
  };
13273
13277
  return this.transformOptions(options_).then(transformedOptions_ => {
@@ -13283,18 +13287,13 @@ export class MoveTrackingClient extends AuthorizedApiBase {
13283
13287
  response.headers.forEach((v, k) => _headers[k] = v);
13284
13288
  }
13285
13289
  ;
13286
- if (status === 200 || status === 206) {
13287
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
13288
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
13289
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
13290
- if (fileName) {
13291
- fileName = decodeURIComponent(fileName);
13292
- }
13293
- else {
13294
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
13295
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
13296
- }
13297
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
13290
+ if (status === 200) {
13291
+ return response.text().then((_responseText) => {
13292
+ let result200 = null;
13293
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
13294
+ result200 = DownloadDto.fromJS(resultData200);
13295
+ return result200;
13296
+ });
13298
13297
  }
13299
13298
  else if (status !== 200 && status !== 204) {
13300
13299
  return response.text().then((_responseText) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20240702.0.9720",
3
+ "version": "20240704.0.9748",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -5183,7 +5183,7 @@ export class MeasuringToolsClient extends AuthorizedApiBase implements IMeasurin
5183
5183
 
5184
5184
  export interface IMachinesClient {
5185
5185
 
5186
- listMachines(): Promise<MachineDto[]>;
5186
+ listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]>;
5187
5187
 
5188
5188
  listMachineGroups(): Promise<MachineGroupDto[]>;
5189
5189
 
@@ -5225,8 +5225,12 @@ export class MachinesClient extends AuthorizedApiBase implements IMachinesClient
5225
5225
  this.baseUrl = baseUrl ?? "";
5226
5226
  }
5227
5227
 
5228
- listMachines(): Promise<MachineDto[]> {
5229
- let url_ = this.baseUrl + "/machines";
5228
+ listMachines(onlyConnectedMachines: boolean | undefined): Promise<MachineDto[]> {
5229
+ let url_ = this.baseUrl + "/machines?";
5230
+ if (onlyConnectedMachines === null)
5231
+ throw new Error("The parameter 'onlyConnectedMachines' cannot be null.");
5232
+ else if (onlyConnectedMachines !== undefined)
5233
+ url_ += "onlyConnectedMachines=" + encodeURIComponent("" + onlyConnectedMachines) + "&";
5230
5234
  url_ = url_.replace(/[?&]$/, "");
5231
5235
 
5232
5236
  let options_: RequestInit = {
@@ -13866,7 +13870,7 @@ export interface IMoveTrackingClient {
13866
13870
 
13867
13871
  deleteTrackingHistory(trackingId: string): Promise<void>;
13868
13872
 
13869
- createLabel(trackingIds: string[]): Promise<FileResponse>;
13873
+ createLabel(trackingIds: string[]): Promise<DownloadDto>;
13870
13874
  }
13871
13875
 
13872
13876
  export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
@@ -14165,7 +14169,7 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
14165
14169
  return Promise.resolve<void>(null as any);
14166
14170
  }
14167
14171
 
14168
- createLabel(trackingIds: string[]): Promise<FileResponse> {
14172
+ createLabel(trackingIds: string[]): Promise<DownloadDto> {
14169
14173
  let url_ = this.baseUrl + "/move/tracking/label";
14170
14174
  url_ = url_.replace(/[?&]$/, "");
14171
14175
 
@@ -14176,7 +14180,7 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
14176
14180
  method: "POST",
14177
14181
  headers: {
14178
14182
  "Content-Type": "application/json",
14179
- "Accept": "application/octet-stream"
14183
+ "Accept": "application/json"
14180
14184
  }
14181
14185
  };
14182
14186
 
@@ -14187,26 +14191,22 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
14187
14191
  });
14188
14192
  }
14189
14193
 
14190
- protected processCreateLabel(response: Response): Promise<FileResponse> {
14194
+ protected processCreateLabel(response: Response): Promise<DownloadDto> {
14191
14195
  const status = response.status;
14192
14196
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
14193
- if (status === 200 || status === 206) {
14194
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
14195
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
14196
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
14197
- if (fileName) {
14198
- fileName = decodeURIComponent(fileName);
14199
- } else {
14200
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
14201
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
14202
- }
14203
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
14197
+ if (status === 200) {
14198
+ return response.text().then((_responseText) => {
14199
+ let result200: any = null;
14200
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
14201
+ result200 = DownloadDto.fromJS(resultData200);
14202
+ return result200;
14203
+ });
14204
14204
  } else if (status !== 200 && status !== 204) {
14205
14205
  return response.text().then((_responseText) => {
14206
14206
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
14207
14207
  });
14208
14208
  }
14209
- return Promise.resolve<FileResponse>(null as any);
14209
+ return Promise.resolve<DownloadDto>(null as any);
14210
14210
  }
14211
14211
  }
14212
14212