@ignos/api-client 20240603.0.9392 → 20240603.0.9394
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 +2 -2
- package/lib/ignosportal-api.js +5 -9
- package/package.json +1 -1
- package/src/ignosportal-api.ts +7 -10
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -586,7 +586,7 @@ export interface IMoveTrackingClient {
|
|
|
586
586
|
createTrackingEvents(trackingUpdates: TrackingUpdateDto[]): Promise<void>;
|
|
587
587
|
createTrackingHistory(trackingUpdates: TrackingHistoryUpdateDto[]): Promise<void>;
|
|
588
588
|
deleteTrackingHistory(trackingId: string): Promise<void>;
|
|
589
|
-
createLabel(
|
|
589
|
+
createLabel(trackingIds: string[]): Promise<FileResponse>;
|
|
590
590
|
}
|
|
591
591
|
export declare class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
|
|
592
592
|
private http;
|
|
@@ -607,7 +607,7 @@ export declare class MoveTrackingClient extends AuthorizedApiBase implements IMo
|
|
|
607
607
|
protected processCreateTrackingHistory(response: Response): Promise<void>;
|
|
608
608
|
deleteTrackingHistory(trackingId: string): Promise<void>;
|
|
609
609
|
protected processDeleteTrackingHistory(response: Response): Promise<void>;
|
|
610
|
-
createLabel(
|
|
610
|
+
createLabel(trackingIds: string[]): Promise<FileResponse>;
|
|
611
611
|
protected processCreateLabel(response: Response): Promise<FileResponse>;
|
|
612
612
|
}
|
|
613
613
|
export interface IMoveWorkOrdersClient {
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -4131,19 +4131,15 @@ export class MoveTrackingClient extends AuthorizedApiBase {
|
|
|
4131
4131
|
}
|
|
4132
4132
|
return Promise.resolve(null);
|
|
4133
4133
|
}
|
|
4134
|
-
createLabel(
|
|
4135
|
-
let url_ = this.baseUrl + "/move/tracking/
|
|
4136
|
-
if (workOrderId === undefined || workOrderId === null)
|
|
4137
|
-
throw new Error("The parameter 'workOrderId' must be defined.");
|
|
4138
|
-
url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
|
|
4139
|
-
if (palletCount === null)
|
|
4140
|
-
throw new Error("The parameter 'palletCount' cannot be null.");
|
|
4141
|
-
else if (palletCount !== undefined)
|
|
4142
|
-
url_ += "palletCount=" + encodeURIComponent("" + palletCount) + "&";
|
|
4134
|
+
createLabel(trackingIds) {
|
|
4135
|
+
let url_ = this.baseUrl + "/move/tracking/label";
|
|
4143
4136
|
url_ = url_.replace(/[?&]$/, "");
|
|
4137
|
+
const content_ = JSON.stringify(trackingIds);
|
|
4144
4138
|
let options_ = {
|
|
4139
|
+
body: content_,
|
|
4145
4140
|
method: "POST",
|
|
4146
4141
|
headers: {
|
|
4142
|
+
"Content-Type": "application/json",
|
|
4147
4143
|
"Accept": "application/octet-stream"
|
|
4148
4144
|
}
|
|
4149
4145
|
};
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -4226,7 +4226,7 @@ export interface IMoveTrackingClient {
|
|
|
4226
4226
|
|
|
4227
4227
|
deleteTrackingHistory(trackingId: string): Promise<void>;
|
|
4228
4228
|
|
|
4229
|
-
createLabel(
|
|
4229
|
+
createLabel(trackingIds: string[]): Promise<FileResponse>;
|
|
4230
4230
|
}
|
|
4231
4231
|
|
|
4232
4232
|
export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTrackingClient {
|
|
@@ -4469,20 +4469,17 @@ export class MoveTrackingClient extends AuthorizedApiBase implements IMoveTracki
|
|
|
4469
4469
|
return Promise.resolve<void>(null as any);
|
|
4470
4470
|
}
|
|
4471
4471
|
|
|
4472
|
-
createLabel(
|
|
4473
|
-
let url_ = this.baseUrl + "/move/tracking/
|
|
4474
|
-
if (workOrderId === undefined || workOrderId === null)
|
|
4475
|
-
throw new Error("The parameter 'workOrderId' must be defined.");
|
|
4476
|
-
url_ = url_.replace("{workOrderId}", encodeURIComponent("" + workOrderId));
|
|
4477
|
-
if (palletCount === null)
|
|
4478
|
-
throw new Error("The parameter 'palletCount' cannot be null.");
|
|
4479
|
-
else if (palletCount !== undefined)
|
|
4480
|
-
url_ += "palletCount=" + encodeURIComponent("" + palletCount) + "&";
|
|
4472
|
+
createLabel(trackingIds: string[]): Promise<FileResponse> {
|
|
4473
|
+
let url_ = this.baseUrl + "/move/tracking/label";
|
|
4481
4474
|
url_ = url_.replace(/[?&]$/, "");
|
|
4482
4475
|
|
|
4476
|
+
const content_ = JSON.stringify(trackingIds);
|
|
4477
|
+
|
|
4483
4478
|
let options_: RequestInit = {
|
|
4479
|
+
body: content_,
|
|
4484
4480
|
method: "POST",
|
|
4485
4481
|
headers: {
|
|
4482
|
+
"Content-Type": "application/json",
|
|
4486
4483
|
"Accept": "application/octet-stream"
|
|
4487
4484
|
}
|
|
4488
4485
|
};
|