@ignos/api-client 20240906.0.10273 → 20240909.0.10285
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 +35 -10
- package/lib/ignosportal-api.js +101 -29
- package/package.json +1 -1
- package/src/ignosportal-api.ts +133 -38
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -245,9 +245,9 @@ export declare class UsersClient extends AuthorizedApiBase implements IUsersClie
|
|
|
245
245
|
}
|
|
246
246
|
export interface IUserAppSettingsClient {
|
|
247
247
|
getEngageUserSettings(): Promise<EngageAppSettings>;
|
|
248
|
-
setEngageUserSettings(settings: EngageAppSettings): Promise<
|
|
248
|
+
setEngageUserSettings(settings: EngageAppSettings): Promise<void>;
|
|
249
249
|
getMoveUserSettings(): Promise<MoveAppSettings>;
|
|
250
|
-
setMoveUserSettings(settings: MoveAppSettings): Promise<
|
|
250
|
+
setMoveUserSettings(settings: MoveAppSettings): Promise<void>;
|
|
251
251
|
}
|
|
252
252
|
export declare class UserAppSettingsClient extends AuthorizedApiBase implements IUserAppSettingsClient {
|
|
253
253
|
private http;
|
|
@@ -258,12 +258,12 @@ export declare class UserAppSettingsClient extends AuthorizedApiBase implements
|
|
|
258
258
|
});
|
|
259
259
|
getEngageUserSettings(): Promise<EngageAppSettings>;
|
|
260
260
|
protected processGetEngageUserSettings(response: Response): Promise<EngageAppSettings>;
|
|
261
|
-
setEngageUserSettings(settings: EngageAppSettings): Promise<
|
|
262
|
-
protected processSetEngageUserSettings(response: Response): Promise<
|
|
261
|
+
setEngageUserSettings(settings: EngageAppSettings): Promise<void>;
|
|
262
|
+
protected processSetEngageUserSettings(response: Response): Promise<void>;
|
|
263
263
|
getMoveUserSettings(): Promise<MoveAppSettings>;
|
|
264
264
|
protected processGetMoveUserSettings(response: Response): Promise<MoveAppSettings>;
|
|
265
|
-
setMoveUserSettings(settings: MoveAppSettings): Promise<
|
|
266
|
-
protected processSetMoveUserSettings(response: Response): Promise<
|
|
265
|
+
setMoveUserSettings(settings: MoveAppSettings): Promise<void>;
|
|
266
|
+
protected processSetMoveUserSettings(response: Response): Promise<void>;
|
|
267
267
|
}
|
|
268
268
|
export interface IUploadClient {
|
|
269
269
|
createUploadInfo(): Promise<UploadInfoDto>;
|
|
@@ -1444,6 +1444,10 @@ export interface IMoveBookingClient {
|
|
|
1444
1444
|
getBooking(bookingId: string): Promise<BookingDto>;
|
|
1445
1445
|
getParcelBooking(parcelId: string): Promise<BookingDto[]>;
|
|
1446
1446
|
updateBooking(bookingRequest: BookingUpdateDto): Promise<BookingDto>;
|
|
1447
|
+
/**
|
|
1448
|
+
* @deprecated
|
|
1449
|
+
*/
|
|
1450
|
+
createBookingTransportOld(bookingRequest: BookingTransportRequestOldDto): Promise<BookingDto[]>;
|
|
1447
1451
|
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto[]>;
|
|
1448
1452
|
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
|
|
1449
1453
|
updateBookingStatus(bookingUpdate: BookingStatusUpdateDto): Promise<BookingDto>;
|
|
@@ -1463,6 +1467,11 @@ export declare class MoveBookingClient extends AuthorizedApiBase implements IMov
|
|
|
1463
1467
|
protected processGetParcelBooking(response: Response): Promise<BookingDto[]>;
|
|
1464
1468
|
updateBooking(bookingRequest: BookingUpdateDto): Promise<BookingDto>;
|
|
1465
1469
|
protected processUpdateBooking(response: Response): Promise<BookingDto>;
|
|
1470
|
+
/**
|
|
1471
|
+
* @deprecated
|
|
1472
|
+
*/
|
|
1473
|
+
createBookingTransportOld(bookingRequest: BookingTransportRequestOldDto): Promise<BookingDto[]>;
|
|
1474
|
+
protected processCreateBookingTransportOld(response: Response): Promise<BookingDto[]>;
|
|
1466
1475
|
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto[]>;
|
|
1467
1476
|
protected processCreateBookingTransport(response: Response): Promise<BookingDto[]>;
|
|
1468
1477
|
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
|
|
@@ -8104,17 +8113,17 @@ export interface IBookingUpdateDto {
|
|
|
8104
8113
|
fromLocationId: string;
|
|
8105
8114
|
toLocationId: string;
|
|
8106
8115
|
}
|
|
8107
|
-
export declare class
|
|
8116
|
+
export declare class BookingTransportRequestOldDto implements IBookingTransportRequestOldDto {
|
|
8108
8117
|
transportKind: TransportKindDto;
|
|
8109
8118
|
items: BookingItemRequestDto[];
|
|
8110
8119
|
fromLocationId: string;
|
|
8111
8120
|
toLocationId: string;
|
|
8112
|
-
constructor(data?:
|
|
8121
|
+
constructor(data?: IBookingTransportRequestOldDto);
|
|
8113
8122
|
init(_data?: any): void;
|
|
8114
|
-
static fromJS(data: any):
|
|
8123
|
+
static fromJS(data: any): BookingTransportRequestOldDto;
|
|
8115
8124
|
toJSON(data?: any): any;
|
|
8116
8125
|
}
|
|
8117
|
-
export interface
|
|
8126
|
+
export interface IBookingTransportRequestOldDto {
|
|
8118
8127
|
transportKind: TransportKindDto;
|
|
8119
8128
|
items: BookingItemRequestDto[];
|
|
8120
8129
|
fromLocationId: string;
|
|
@@ -8123,6 +8132,8 @@ export interface IBookingTransportRequestDto {
|
|
|
8123
8132
|
export declare class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
8124
8133
|
parcelId: string;
|
|
8125
8134
|
trackingId: string;
|
|
8135
|
+
fromLocationId: string;
|
|
8136
|
+
toLocationId: string;
|
|
8126
8137
|
comment?: string | null;
|
|
8127
8138
|
constructor(data?: IBookingItemRequestDto);
|
|
8128
8139
|
init(_data?: any): void;
|
|
@@ -8132,8 +8143,22 @@ export declare class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
|
8132
8143
|
export interface IBookingItemRequestDto {
|
|
8133
8144
|
parcelId: string;
|
|
8134
8145
|
trackingId: string;
|
|
8146
|
+
fromLocationId: string;
|
|
8147
|
+
toLocationId: string;
|
|
8135
8148
|
comment?: string | null;
|
|
8136
8149
|
}
|
|
8150
|
+
export declare class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
8151
|
+
transportKind: TransportKindDto;
|
|
8152
|
+
items: BookingItemRequestDto[];
|
|
8153
|
+
constructor(data?: IBookingTransportRequestDto);
|
|
8154
|
+
init(_data?: any): void;
|
|
8155
|
+
static fromJS(data: any): BookingTransportRequestDto;
|
|
8156
|
+
toJSON(data?: any): any;
|
|
8157
|
+
}
|
|
8158
|
+
export interface IBookingTransportRequestDto {
|
|
8159
|
+
transportKind: TransportKindDto;
|
|
8160
|
+
items: BookingItemRequestDto[];
|
|
8161
|
+
}
|
|
8137
8162
|
export declare class BookingGeneralRequestDto implements IBookingGeneralRequestDto {
|
|
8138
8163
|
parcelKind: ParcelKindDto;
|
|
8139
8164
|
transportKind: TransportKindDto;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -1226,7 +1226,6 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
1226
1226
|
method: "PUT",
|
|
1227
1227
|
headers: {
|
|
1228
1228
|
"Content-Type": "application/json",
|
|
1229
|
-
"Accept": "application/octet-stream"
|
|
1230
1229
|
}
|
|
1231
1230
|
};
|
|
1232
1231
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -1242,18 +1241,10 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
1242
1241
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
1243
1242
|
}
|
|
1244
1243
|
;
|
|
1245
|
-
if (status ===
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
if (fileName) {
|
|
1250
|
-
fileName = decodeURIComponent(fileName);
|
|
1251
|
-
}
|
|
1252
|
-
else {
|
|
1253
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1254
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1255
|
-
}
|
|
1256
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
1244
|
+
if (status === 204) {
|
|
1245
|
+
return response.text().then((_responseText) => {
|
|
1246
|
+
return;
|
|
1247
|
+
});
|
|
1257
1248
|
}
|
|
1258
1249
|
else if (status !== 200 && status !== 204) {
|
|
1259
1250
|
return response.text().then((_responseText) => {
|
|
@@ -1308,7 +1299,6 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
1308
1299
|
method: "PUT",
|
|
1309
1300
|
headers: {
|
|
1310
1301
|
"Content-Type": "application/json",
|
|
1311
|
-
"Accept": "application/octet-stream"
|
|
1312
1302
|
}
|
|
1313
1303
|
};
|
|
1314
1304
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
@@ -1324,18 +1314,10 @@ export class UserAppSettingsClient extends AuthorizedApiBase {
|
|
|
1324
1314
|
response.headers.forEach((v, k) => _headers[k] = v);
|
|
1325
1315
|
}
|
|
1326
1316
|
;
|
|
1327
|
-
if (status ===
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
if (fileName) {
|
|
1332
|
-
fileName = decodeURIComponent(fileName);
|
|
1333
|
-
}
|
|
1334
|
-
else {
|
|
1335
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1336
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1337
|
-
}
|
|
1338
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
1317
|
+
if (status === 204) {
|
|
1318
|
+
return response.text().then((_responseText) => {
|
|
1319
|
+
return;
|
|
1320
|
+
});
|
|
1339
1321
|
}
|
|
1340
1322
|
else if (status !== 200 && status !== 204) {
|
|
1341
1323
|
return response.text().then((_responseText) => {
|
|
@@ -12019,7 +12001,10 @@ export class MoveBookingClient extends AuthorizedApiBase {
|
|
|
12019
12001
|
}
|
|
12020
12002
|
return Promise.resolve(null);
|
|
12021
12003
|
}
|
|
12022
|
-
|
|
12004
|
+
/**
|
|
12005
|
+
* @deprecated
|
|
12006
|
+
*/
|
|
12007
|
+
createBookingTransportOld(bookingRequest) {
|
|
12023
12008
|
let url_ = this.baseUrl + "/move/booking/transport";
|
|
12024
12009
|
url_ = url_.replace(/[?&]$/, "");
|
|
12025
12010
|
const content_ = JSON.stringify(bookingRequest);
|
|
@@ -12031,6 +12016,50 @@ export class MoveBookingClient extends AuthorizedApiBase {
|
|
|
12031
12016
|
"Accept": "application/json"
|
|
12032
12017
|
}
|
|
12033
12018
|
};
|
|
12019
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12020
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12021
|
+
}).then((_response) => {
|
|
12022
|
+
return this.processCreateBookingTransportOld(_response);
|
|
12023
|
+
});
|
|
12024
|
+
}
|
|
12025
|
+
processCreateBookingTransportOld(response) {
|
|
12026
|
+
const status = response.status;
|
|
12027
|
+
let _headers = {};
|
|
12028
|
+
if (response.headers && response.headers.forEach) {
|
|
12029
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
12030
|
+
}
|
|
12031
|
+
;
|
|
12032
|
+
if (status === 200) {
|
|
12033
|
+
return response.text().then((_responseText) => {
|
|
12034
|
+
let result200 = null;
|
|
12035
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12036
|
+
if (Array.isArray(resultData200)) {
|
|
12037
|
+
result200 = [];
|
|
12038
|
+
for (let item of resultData200)
|
|
12039
|
+
result200.push(BookingDto.fromJS(item));
|
|
12040
|
+
}
|
|
12041
|
+
return result200;
|
|
12042
|
+
});
|
|
12043
|
+
}
|
|
12044
|
+
else if (status !== 200 && status !== 204) {
|
|
12045
|
+
return response.text().then((_responseText) => {
|
|
12046
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12047
|
+
});
|
|
12048
|
+
}
|
|
12049
|
+
return Promise.resolve(null);
|
|
12050
|
+
}
|
|
12051
|
+
createBookingTransport(bookingRequest) {
|
|
12052
|
+
let url_ = this.baseUrl + "/move/booking/transport2";
|
|
12053
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12054
|
+
const content_ = JSON.stringify(bookingRequest);
|
|
12055
|
+
let options_ = {
|
|
12056
|
+
body: content_,
|
|
12057
|
+
method: "POST",
|
|
12058
|
+
headers: {
|
|
12059
|
+
"Content-Type": "application/json",
|
|
12060
|
+
"Accept": "application/json"
|
|
12061
|
+
}
|
|
12062
|
+
};
|
|
12034
12063
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12035
12064
|
return this.http.fetch(url_, transformedOptions_);
|
|
12036
12065
|
}).then((_response) => {
|
|
@@ -31184,7 +31213,7 @@ export class BookingUpdateDto {
|
|
|
31184
31213
|
return data;
|
|
31185
31214
|
}
|
|
31186
31215
|
}
|
|
31187
|
-
export class
|
|
31216
|
+
export class BookingTransportRequestOldDto {
|
|
31188
31217
|
constructor(data) {
|
|
31189
31218
|
if (data) {
|
|
31190
31219
|
for (var property in data) {
|
|
@@ -31210,7 +31239,7 @@ export class BookingTransportRequestDto {
|
|
|
31210
31239
|
}
|
|
31211
31240
|
static fromJS(data) {
|
|
31212
31241
|
data = typeof data === 'object' ? data : {};
|
|
31213
|
-
let result = new
|
|
31242
|
+
let result = new BookingTransportRequestOldDto();
|
|
31214
31243
|
result.init(data);
|
|
31215
31244
|
return result;
|
|
31216
31245
|
}
|
|
@@ -31240,6 +31269,8 @@ export class BookingItemRequestDto {
|
|
|
31240
31269
|
if (_data) {
|
|
31241
31270
|
this.parcelId = _data["parcelId"];
|
|
31242
31271
|
this.trackingId = _data["trackingId"];
|
|
31272
|
+
this.fromLocationId = _data["fromLocationId"];
|
|
31273
|
+
this.toLocationId = _data["toLocationId"];
|
|
31243
31274
|
this.comment = _data["comment"];
|
|
31244
31275
|
}
|
|
31245
31276
|
}
|
|
@@ -31253,10 +31284,51 @@ export class BookingItemRequestDto {
|
|
|
31253
31284
|
data = typeof data === 'object' ? data : {};
|
|
31254
31285
|
data["parcelId"] = this.parcelId;
|
|
31255
31286
|
data["trackingId"] = this.trackingId;
|
|
31287
|
+
data["fromLocationId"] = this.fromLocationId;
|
|
31288
|
+
data["toLocationId"] = this.toLocationId;
|
|
31256
31289
|
data["comment"] = this.comment;
|
|
31257
31290
|
return data;
|
|
31258
31291
|
}
|
|
31259
31292
|
}
|
|
31293
|
+
export class BookingTransportRequestDto {
|
|
31294
|
+
constructor(data) {
|
|
31295
|
+
if (data) {
|
|
31296
|
+
for (var property in data) {
|
|
31297
|
+
if (data.hasOwnProperty(property))
|
|
31298
|
+
this[property] = data[property];
|
|
31299
|
+
}
|
|
31300
|
+
}
|
|
31301
|
+
if (!data) {
|
|
31302
|
+
this.items = [];
|
|
31303
|
+
}
|
|
31304
|
+
}
|
|
31305
|
+
init(_data) {
|
|
31306
|
+
if (_data) {
|
|
31307
|
+
this.transportKind = _data["transportKind"];
|
|
31308
|
+
if (Array.isArray(_data["items"])) {
|
|
31309
|
+
this.items = [];
|
|
31310
|
+
for (let item of _data["items"])
|
|
31311
|
+
this.items.push(BookingItemRequestDto.fromJS(item));
|
|
31312
|
+
}
|
|
31313
|
+
}
|
|
31314
|
+
}
|
|
31315
|
+
static fromJS(data) {
|
|
31316
|
+
data = typeof data === 'object' ? data : {};
|
|
31317
|
+
let result = new BookingTransportRequestDto();
|
|
31318
|
+
result.init(data);
|
|
31319
|
+
return result;
|
|
31320
|
+
}
|
|
31321
|
+
toJSON(data) {
|
|
31322
|
+
data = typeof data === 'object' ? data : {};
|
|
31323
|
+
data["transportKind"] = this.transportKind;
|
|
31324
|
+
if (Array.isArray(this.items)) {
|
|
31325
|
+
data["items"] = [];
|
|
31326
|
+
for (let item of this.items)
|
|
31327
|
+
data["items"].push(item.toJSON());
|
|
31328
|
+
}
|
|
31329
|
+
return data;
|
|
31330
|
+
}
|
|
31331
|
+
}
|
|
31260
31332
|
export class BookingGeneralRequestDto {
|
|
31261
31333
|
constructor(data) {
|
|
31262
31334
|
if (data) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -1314,11 +1314,11 @@ export interface IUserAppSettingsClient {
|
|
|
1314
1314
|
|
|
1315
1315
|
getEngageUserSettings(): Promise<EngageAppSettings>;
|
|
1316
1316
|
|
|
1317
|
-
setEngageUserSettings(settings: EngageAppSettings): Promise<
|
|
1317
|
+
setEngageUserSettings(settings: EngageAppSettings): Promise<void>;
|
|
1318
1318
|
|
|
1319
1319
|
getMoveUserSettings(): Promise<MoveAppSettings>;
|
|
1320
1320
|
|
|
1321
|
-
setMoveUserSettings(settings: MoveAppSettings): Promise<
|
|
1321
|
+
setMoveUserSettings(settings: MoveAppSettings): Promise<void>;
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
1324
|
export class UserAppSettingsClient extends AuthorizedApiBase implements IUserAppSettingsClient {
|
|
@@ -1368,7 +1368,7 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1368
1368
|
return Promise.resolve<EngageAppSettings>(null as any);
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
|
-
setEngageUserSettings(settings: EngageAppSettings): Promise<
|
|
1371
|
+
setEngageUserSettings(settings: EngageAppSettings): Promise<void> {
|
|
1372
1372
|
let url_ = this.baseUrl + "/userappsettings/engage";
|
|
1373
1373
|
url_ = url_.replace(/[?&]$/, "");
|
|
1374
1374
|
|
|
@@ -1379,7 +1379,6 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1379
1379
|
method: "PUT",
|
|
1380
1380
|
headers: {
|
|
1381
1381
|
"Content-Type": "application/json",
|
|
1382
|
-
"Accept": "application/octet-stream"
|
|
1383
1382
|
}
|
|
1384
1383
|
};
|
|
1385
1384
|
|
|
@@ -1390,26 +1389,19 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1390
1389
|
});
|
|
1391
1390
|
}
|
|
1392
1391
|
|
|
1393
|
-
protected processSetEngageUserSettings(response: Response): Promise<
|
|
1392
|
+
protected processSetEngageUserSettings(response: Response): Promise<void> {
|
|
1394
1393
|
const status = response.status;
|
|
1395
1394
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
1396
|
-
if (status ===
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
if (fileName) {
|
|
1401
|
-
fileName = decodeURIComponent(fileName);
|
|
1402
|
-
} else {
|
|
1403
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1404
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1405
|
-
}
|
|
1406
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
1395
|
+
if (status === 204) {
|
|
1396
|
+
return response.text().then((_responseText) => {
|
|
1397
|
+
return;
|
|
1398
|
+
});
|
|
1407
1399
|
} else if (status !== 200 && status !== 204) {
|
|
1408
1400
|
return response.text().then((_responseText) => {
|
|
1409
1401
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1410
1402
|
});
|
|
1411
1403
|
}
|
|
1412
|
-
return Promise.resolve<
|
|
1404
|
+
return Promise.resolve<void>(null as any);
|
|
1413
1405
|
}
|
|
1414
1406
|
|
|
1415
1407
|
getMoveUserSettings(): Promise<MoveAppSettings> {
|
|
@@ -1448,7 +1440,7 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1448
1440
|
return Promise.resolve<MoveAppSettings>(null as any);
|
|
1449
1441
|
}
|
|
1450
1442
|
|
|
1451
|
-
setMoveUserSettings(settings: MoveAppSettings): Promise<
|
|
1443
|
+
setMoveUserSettings(settings: MoveAppSettings): Promise<void> {
|
|
1452
1444
|
let url_ = this.baseUrl + "/userappsettings/move";
|
|
1453
1445
|
url_ = url_.replace(/[?&]$/, "");
|
|
1454
1446
|
|
|
@@ -1459,7 +1451,6 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1459
1451
|
method: "PUT",
|
|
1460
1452
|
headers: {
|
|
1461
1453
|
"Content-Type": "application/json",
|
|
1462
|
-
"Accept": "application/octet-stream"
|
|
1463
1454
|
}
|
|
1464
1455
|
};
|
|
1465
1456
|
|
|
@@ -1470,26 +1461,19 @@ export class UserAppSettingsClient extends AuthorizedApiBase implements IUserApp
|
|
|
1470
1461
|
});
|
|
1471
1462
|
}
|
|
1472
1463
|
|
|
1473
|
-
protected processSetMoveUserSettings(response: Response): Promise<
|
|
1464
|
+
protected processSetMoveUserSettings(response: Response): Promise<void> {
|
|
1474
1465
|
const status = response.status;
|
|
1475
1466
|
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
1476
|
-
if (status ===
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
if (fileName) {
|
|
1481
|
-
fileName = decodeURIComponent(fileName);
|
|
1482
|
-
} else {
|
|
1483
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1484
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1485
|
-
}
|
|
1486
|
-
return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
|
|
1467
|
+
if (status === 204) {
|
|
1468
|
+
return response.text().then((_responseText) => {
|
|
1469
|
+
return;
|
|
1470
|
+
});
|
|
1487
1471
|
} else if (status !== 200 && status !== 204) {
|
|
1488
1472
|
return response.text().then((_responseText) => {
|
|
1489
1473
|
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1490
1474
|
});
|
|
1491
1475
|
}
|
|
1492
|
-
return Promise.resolve<
|
|
1476
|
+
return Promise.resolve<void>(null as any);
|
|
1493
1477
|
}
|
|
1494
1478
|
}
|
|
1495
1479
|
|
|
@@ -12662,6 +12646,11 @@ export interface IMoveBookingClient {
|
|
|
12662
12646
|
|
|
12663
12647
|
updateBooking(bookingRequest: BookingUpdateDto): Promise<BookingDto>;
|
|
12664
12648
|
|
|
12649
|
+
/**
|
|
12650
|
+
* @deprecated
|
|
12651
|
+
*/
|
|
12652
|
+
createBookingTransportOld(bookingRequest: BookingTransportRequestOldDto): Promise<BookingDto[]>;
|
|
12653
|
+
|
|
12665
12654
|
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto[]>;
|
|
12666
12655
|
|
|
12667
12656
|
createBookingGeneral(bookingRequest: BookingGeneralRequestDto): Promise<BookingDto[]>;
|
|
@@ -12842,7 +12831,10 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
|
|
|
12842
12831
|
return Promise.resolve<BookingDto>(null as any);
|
|
12843
12832
|
}
|
|
12844
12833
|
|
|
12845
|
-
|
|
12834
|
+
/**
|
|
12835
|
+
* @deprecated
|
|
12836
|
+
*/
|
|
12837
|
+
createBookingTransportOld(bookingRequest: BookingTransportRequestOldDto): Promise<BookingDto[]> {
|
|
12846
12838
|
let url_ = this.baseUrl + "/move/booking/transport";
|
|
12847
12839
|
url_ = url_.replace(/[?&]$/, "");
|
|
12848
12840
|
|
|
@@ -12857,6 +12849,50 @@ export class MoveBookingClient extends AuthorizedApiBase implements IMoveBooking
|
|
|
12857
12849
|
}
|
|
12858
12850
|
};
|
|
12859
12851
|
|
|
12852
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12853
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
12854
|
+
}).then((_response: Response) => {
|
|
12855
|
+
return this.processCreateBookingTransportOld(_response);
|
|
12856
|
+
});
|
|
12857
|
+
}
|
|
12858
|
+
|
|
12859
|
+
protected processCreateBookingTransportOld(response: Response): Promise<BookingDto[]> {
|
|
12860
|
+
const status = response.status;
|
|
12861
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
12862
|
+
if (status === 200) {
|
|
12863
|
+
return response.text().then((_responseText) => {
|
|
12864
|
+
let result200: any = null;
|
|
12865
|
+
let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
12866
|
+
if (Array.isArray(resultData200)) {
|
|
12867
|
+
result200 = [] as any;
|
|
12868
|
+
for (let item of resultData200)
|
|
12869
|
+
result200!.push(BookingDto.fromJS(item));
|
|
12870
|
+
}
|
|
12871
|
+
return result200;
|
|
12872
|
+
});
|
|
12873
|
+
} else if (status !== 200 && status !== 204) {
|
|
12874
|
+
return response.text().then((_responseText) => {
|
|
12875
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
12876
|
+
});
|
|
12877
|
+
}
|
|
12878
|
+
return Promise.resolve<BookingDto[]>(null as any);
|
|
12879
|
+
}
|
|
12880
|
+
|
|
12881
|
+
createBookingTransport(bookingRequest: BookingTransportRequestDto): Promise<BookingDto[]> {
|
|
12882
|
+
let url_ = this.baseUrl + "/move/booking/transport2";
|
|
12883
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
12884
|
+
|
|
12885
|
+
const content_ = JSON.stringify(bookingRequest);
|
|
12886
|
+
|
|
12887
|
+
let options_: RequestInit = {
|
|
12888
|
+
body: content_,
|
|
12889
|
+
method: "POST",
|
|
12890
|
+
headers: {
|
|
12891
|
+
"Content-Type": "application/json",
|
|
12892
|
+
"Accept": "application/json"
|
|
12893
|
+
}
|
|
12894
|
+
};
|
|
12895
|
+
|
|
12860
12896
|
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
12861
12897
|
return this.http.fetch(url_, transformedOptions_);
|
|
12862
12898
|
}).then((_response: Response) => {
|
|
@@ -38273,13 +38309,13 @@ export interface IBookingUpdateDto {
|
|
|
38273
38309
|
toLocationId: string;
|
|
38274
38310
|
}
|
|
38275
38311
|
|
|
38276
|
-
export class
|
|
38312
|
+
export class BookingTransportRequestOldDto implements IBookingTransportRequestOldDto {
|
|
38277
38313
|
transportKind!: TransportKindDto;
|
|
38278
38314
|
items!: BookingItemRequestDto[];
|
|
38279
38315
|
fromLocationId!: string;
|
|
38280
38316
|
toLocationId!: string;
|
|
38281
38317
|
|
|
38282
|
-
constructor(data?:
|
|
38318
|
+
constructor(data?: IBookingTransportRequestOldDto) {
|
|
38283
38319
|
if (data) {
|
|
38284
38320
|
for (var property in data) {
|
|
38285
38321
|
if (data.hasOwnProperty(property))
|
|
@@ -38304,9 +38340,9 @@ export class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
|
38304
38340
|
}
|
|
38305
38341
|
}
|
|
38306
38342
|
|
|
38307
|
-
static fromJS(data: any):
|
|
38343
|
+
static fromJS(data: any): BookingTransportRequestOldDto {
|
|
38308
38344
|
data = typeof data === 'object' ? data : {};
|
|
38309
|
-
let result = new
|
|
38345
|
+
let result = new BookingTransportRequestOldDto();
|
|
38310
38346
|
result.init(data);
|
|
38311
38347
|
return result;
|
|
38312
38348
|
}
|
|
@@ -38325,7 +38361,7 @@ export class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
|
38325
38361
|
}
|
|
38326
38362
|
}
|
|
38327
38363
|
|
|
38328
|
-
export interface
|
|
38364
|
+
export interface IBookingTransportRequestOldDto {
|
|
38329
38365
|
transportKind: TransportKindDto;
|
|
38330
38366
|
items: BookingItemRequestDto[];
|
|
38331
38367
|
fromLocationId: string;
|
|
@@ -38335,6 +38371,8 @@ export interface IBookingTransportRequestDto {
|
|
|
38335
38371
|
export class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
38336
38372
|
parcelId!: string;
|
|
38337
38373
|
trackingId!: string;
|
|
38374
|
+
fromLocationId!: string;
|
|
38375
|
+
toLocationId!: string;
|
|
38338
38376
|
comment?: string | null;
|
|
38339
38377
|
|
|
38340
38378
|
constructor(data?: IBookingItemRequestDto) {
|
|
@@ -38350,6 +38388,8 @@ export class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
|
38350
38388
|
if (_data) {
|
|
38351
38389
|
this.parcelId = _data["parcelId"];
|
|
38352
38390
|
this.trackingId = _data["trackingId"];
|
|
38391
|
+
this.fromLocationId = _data["fromLocationId"];
|
|
38392
|
+
this.toLocationId = _data["toLocationId"];
|
|
38353
38393
|
this.comment = _data["comment"];
|
|
38354
38394
|
}
|
|
38355
38395
|
}
|
|
@@ -38365,6 +38405,8 @@ export class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
|
38365
38405
|
data = typeof data === 'object' ? data : {};
|
|
38366
38406
|
data["parcelId"] = this.parcelId;
|
|
38367
38407
|
data["trackingId"] = this.trackingId;
|
|
38408
|
+
data["fromLocationId"] = this.fromLocationId;
|
|
38409
|
+
data["toLocationId"] = this.toLocationId;
|
|
38368
38410
|
data["comment"] = this.comment;
|
|
38369
38411
|
return data;
|
|
38370
38412
|
}
|
|
@@ -38373,9 +38415,62 @@ export class BookingItemRequestDto implements IBookingItemRequestDto {
|
|
|
38373
38415
|
export interface IBookingItemRequestDto {
|
|
38374
38416
|
parcelId: string;
|
|
38375
38417
|
trackingId: string;
|
|
38418
|
+
fromLocationId: string;
|
|
38419
|
+
toLocationId: string;
|
|
38376
38420
|
comment?: string | null;
|
|
38377
38421
|
}
|
|
38378
38422
|
|
|
38423
|
+
export class BookingTransportRequestDto implements IBookingTransportRequestDto {
|
|
38424
|
+
transportKind!: TransportKindDto;
|
|
38425
|
+
items!: BookingItemRequestDto[];
|
|
38426
|
+
|
|
38427
|
+
constructor(data?: IBookingTransportRequestDto) {
|
|
38428
|
+
if (data) {
|
|
38429
|
+
for (var property in data) {
|
|
38430
|
+
if (data.hasOwnProperty(property))
|
|
38431
|
+
(<any>this)[property] = (<any>data)[property];
|
|
38432
|
+
}
|
|
38433
|
+
}
|
|
38434
|
+
if (!data) {
|
|
38435
|
+
this.items = [];
|
|
38436
|
+
}
|
|
38437
|
+
}
|
|
38438
|
+
|
|
38439
|
+
init(_data?: any) {
|
|
38440
|
+
if (_data) {
|
|
38441
|
+
this.transportKind = _data["transportKind"];
|
|
38442
|
+
if (Array.isArray(_data["items"])) {
|
|
38443
|
+
this.items = [] as any;
|
|
38444
|
+
for (let item of _data["items"])
|
|
38445
|
+
this.items!.push(BookingItemRequestDto.fromJS(item));
|
|
38446
|
+
}
|
|
38447
|
+
}
|
|
38448
|
+
}
|
|
38449
|
+
|
|
38450
|
+
static fromJS(data: any): BookingTransportRequestDto {
|
|
38451
|
+
data = typeof data === 'object' ? data : {};
|
|
38452
|
+
let result = new BookingTransportRequestDto();
|
|
38453
|
+
result.init(data);
|
|
38454
|
+
return result;
|
|
38455
|
+
}
|
|
38456
|
+
|
|
38457
|
+
toJSON(data?: any) {
|
|
38458
|
+
data = typeof data === 'object' ? data : {};
|
|
38459
|
+
data["transportKind"] = this.transportKind;
|
|
38460
|
+
if (Array.isArray(this.items)) {
|
|
38461
|
+
data["items"] = [];
|
|
38462
|
+
for (let item of this.items)
|
|
38463
|
+
data["items"].push(item.toJSON());
|
|
38464
|
+
}
|
|
38465
|
+
return data;
|
|
38466
|
+
}
|
|
38467
|
+
}
|
|
38468
|
+
|
|
38469
|
+
export interface IBookingTransportRequestDto {
|
|
38470
|
+
transportKind: TransportKindDto;
|
|
38471
|
+
items: BookingItemRequestDto[];
|
|
38472
|
+
}
|
|
38473
|
+
|
|
38379
38474
|
export class BookingGeneralRequestDto implements IBookingGeneralRequestDto {
|
|
38380
38475
|
parcelKind!: ParcelKindDto;
|
|
38381
38476
|
transportKind!: TransportKindDto;
|