btrz-api-client 5.126.0 → 5.128.0
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/client-standalone-min.js +3 -3
- package/lib/endpoints/operations/manifest.js +1 -21
- package/lib/endpoints/operations/parcels_manifests.js +24 -22
- package/lib/endpoints/sales/cart.js +15 -1
- package/package.json +1 -1
- package/src/endpoints/operations/manifest.js +1 -15
- package/src/endpoints/operations/parcels_manifests.js +16 -22
- package/src/endpoints/sales/cart.js +10 -1
- package/test/endpoints/operations/manifest.test.js +0 -9
- package/test/endpoints/operations/parcel_manifests.test.js +17 -0
- package/test/endpoints/sales/cart.test.js +6 -0
- package/types/client.d.ts +18 -9
- package/types/endpoints/operations/manifest.d.ts +0 -9
- package/types/endpoints/operations/parcels_manifests.d.ts +10 -0
- package/types/endpoints/sales/cart.d.ts +8 -0
- package/types/initializedClient.d.ts +18 -9
|
@@ -371,25 +371,6 @@ function manifestFactory(_ref) {
|
|
|
371
371
|
}
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
var vehicles = {
|
|
375
|
-
createOrUpdate: function createOrUpdate(_ref21) {
|
|
376
|
-
var token = _ref21.token,
|
|
377
|
-
jwtToken = _ref21.jwtToken,
|
|
378
|
-
headers = _ref21.headers,
|
|
379
|
-
manifestId = _ref21.manifestId,
|
|
380
|
-
parcelManifestVehicle = _ref21.parcelManifestVehicle;
|
|
381
|
-
|
|
382
|
-
return client({
|
|
383
|
-
url: "/manifests/" + manifestId + "/vehicles",
|
|
384
|
-
method: "post",
|
|
385
|
-
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
386
|
-
data: {
|
|
387
|
-
parcelManifestVehicle: parcelManifestVehicle
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
374
|
return {
|
|
394
375
|
get: get,
|
|
395
376
|
getAll: getAll,
|
|
@@ -405,8 +386,7 @@ function manifestFactory(_ref) {
|
|
|
405
386
|
removeCapacityException: removeCapacityException,
|
|
406
387
|
checkIn: checkIn,
|
|
407
388
|
legs: legs,
|
|
408
|
-
reports: reports
|
|
409
|
-
vehicles: vehicles
|
|
389
|
+
reports: reports
|
|
410
390
|
};
|
|
411
391
|
}
|
|
412
392
|
|
|
@@ -32,25 +32,6 @@ function parcelsManifestsFactory(_ref) {
|
|
|
32
32
|
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
// function update({token, jwtToken, id, data, headers, query}) {
|
|
37
|
-
// return client({
|
|
38
|
-
// url: `/passenger-check-in-info/${id}`,
|
|
39
|
-
// method: "put",
|
|
40
|
-
// params: query,
|
|
41
|
-
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
42
|
-
// data
|
|
43
|
-
// });
|
|
44
|
-
// }
|
|
45
|
-
|
|
46
|
-
// function remove({token, jwtToken, manifestId, parcelId, headers}) {
|
|
47
|
-
// return client({
|
|
48
|
-
// url: `/parcels-manifests/${manifestId}`,
|
|
49
|
-
// method: "delete",
|
|
50
|
-
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
51
|
-
// });
|
|
52
|
-
// }
|
|
53
|
-
|
|
54
35
|
function create(_ref4) {
|
|
55
36
|
var token = _ref4.token,
|
|
56
37
|
jwtToken = _ref4.jwtToken,
|
|
@@ -101,13 +82,34 @@ function parcelsManifestsFactory(_ref) {
|
|
|
101
82
|
}
|
|
102
83
|
};
|
|
103
84
|
|
|
85
|
+
var vehicles = {
|
|
86
|
+
createOrUpdate: function createOrUpdate(_ref7) {
|
|
87
|
+
var token = _ref7.token,
|
|
88
|
+
jwtToken = _ref7.jwtToken,
|
|
89
|
+
manifestId = _ref7.manifestId,
|
|
90
|
+
_ref7$query = _ref7.query,
|
|
91
|
+
query = _ref7$query === undefined ? {} : _ref7$query,
|
|
92
|
+
data = _ref7.data,
|
|
93
|
+
headers = _ref7.headers;
|
|
94
|
+
|
|
95
|
+
return client({
|
|
96
|
+
url: "/parcels-manifests/" + manifestId + "/vehicles",
|
|
97
|
+
method: "post",
|
|
98
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
99
|
+
params: query,
|
|
100
|
+
data: {
|
|
101
|
+
parcelManifestVehicle: data
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
104
107
|
return {
|
|
105
108
|
all: all,
|
|
106
109
|
get: get,
|
|
107
|
-
// update,
|
|
108
|
-
// remove,
|
|
109
110
|
create: create,
|
|
110
|
-
parcels: parcels
|
|
111
|
+
parcels: parcels,
|
|
112
|
+
vehicles: vehicles
|
|
111
113
|
};
|
|
112
114
|
}
|
|
113
115
|
|
|
@@ -102,13 +102,27 @@ function cartFactory(_ref) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
var partialDepositStatus = {
|
|
106
|
+
get: function get(_ref8) {
|
|
107
|
+
var token = _ref8.token,
|
|
108
|
+
jwtToken = _ref8.jwtToken,
|
|
109
|
+
shiftId = _ref8.shiftId,
|
|
110
|
+
headers = _ref8.headers;
|
|
111
|
+
|
|
112
|
+
return client.get("/cart/" + shiftId + "/partial-deposit-status", {
|
|
113
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
105
118
|
return {
|
|
106
119
|
get: get,
|
|
107
120
|
create: create,
|
|
108
121
|
add: add,
|
|
109
122
|
deleteItems: deleteItems,
|
|
110
123
|
loyaltyPointsAmount: loyaltyPointsAmount,
|
|
111
|
-
patch: patch
|
|
124
|
+
patch: patch,
|
|
125
|
+
partialDepositStatus: partialDepositStatus
|
|
112
126
|
};
|
|
113
127
|
}
|
|
114
128
|
|
package/package.json
CHANGED
|
@@ -245,19 +245,6 @@ function manifestFactory({
|
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
const vehicles = {
|
|
249
|
-
createOrUpdate({token, jwtToken, headers, manifestId, parcelManifestVehicle}) {
|
|
250
|
-
return client({
|
|
251
|
-
url: `/manifests/${manifestId}/vehicles`,
|
|
252
|
-
method: "post",
|
|
253
|
-
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
254
|
-
data: {
|
|
255
|
-
parcelManifestVehicle
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
|
|
261
248
|
return {
|
|
262
249
|
get,
|
|
263
250
|
getAll,
|
|
@@ -273,8 +260,7 @@ function manifestFactory({
|
|
|
273
260
|
removeCapacityException,
|
|
274
261
|
checkIn,
|
|
275
262
|
legs,
|
|
276
|
-
reports
|
|
277
|
-
vehicles
|
|
263
|
+
reports
|
|
278
264
|
};
|
|
279
265
|
}
|
|
280
266
|
|
|
@@ -16,25 +16,6 @@ function parcelsManifestsFactory({client, internalAuthTokenProvider}) {
|
|
|
16
16
|
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
// function update({token, jwtToken, id, data, headers, query}) {
|
|
21
|
-
// return client({
|
|
22
|
-
// url: `/passenger-check-in-info/${id}`,
|
|
23
|
-
// method: "put",
|
|
24
|
-
// params: query,
|
|
25
|
-
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
26
|
-
// data
|
|
27
|
-
// });
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// function remove({token, jwtToken, manifestId, parcelId, headers}) {
|
|
31
|
-
// return client({
|
|
32
|
-
// url: `/parcels-manifests/${manifestId}`,
|
|
33
|
-
// method: "delete",
|
|
34
|
-
// headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
35
|
-
// });
|
|
36
|
-
// }
|
|
37
|
-
|
|
38
19
|
function create({token, jwtToken, query = {}, data, headers}) {
|
|
39
20
|
return client({
|
|
40
21
|
url: "/parcels-manifests",
|
|
@@ -64,13 +45,26 @@ function parcelsManifestsFactory({client, internalAuthTokenProvider}) {
|
|
|
64
45
|
}
|
|
65
46
|
};
|
|
66
47
|
|
|
48
|
+
const vehicles = {
|
|
49
|
+
createOrUpdate({token, jwtToken, manifestId, query = {}, data, headers}) {
|
|
50
|
+
return client({
|
|
51
|
+
url: `/parcels-manifests/${manifestId}/vehicles`,
|
|
52
|
+
method: "post",
|
|
53
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
54
|
+
params: query,
|
|
55
|
+
data: {
|
|
56
|
+
parcelManifestVehicle: data
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
67
62
|
return {
|
|
68
63
|
all,
|
|
69
64
|
get,
|
|
70
|
-
// update,
|
|
71
|
-
// remove,
|
|
72
65
|
create,
|
|
73
|
-
parcels
|
|
66
|
+
parcels,
|
|
67
|
+
vehicles
|
|
74
68
|
};
|
|
75
69
|
}
|
|
76
70
|
|
|
@@ -62,13 +62,22 @@ function cartFactory({ client, internalAuthTokenProvider }) {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
const partialDepositStatus = {
|
|
66
|
+
get({token, jwtToken, shiftId, headers}) {
|
|
67
|
+
return client.get(`/cart/${shiftId}/partial-deposit-status`, {
|
|
68
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
65
73
|
return {
|
|
66
74
|
get,
|
|
67
75
|
create,
|
|
68
76
|
add,
|
|
69
77
|
deleteItems,
|
|
70
78
|
loyaltyPointsAmount,
|
|
71
|
-
patch
|
|
79
|
+
patch,
|
|
80
|
+
partialDepositStatus
|
|
72
81
|
};
|
|
73
82
|
}
|
|
74
83
|
|
|
@@ -52,15 +52,6 @@ describe("operations/manifest", () => {
|
|
|
52
52
|
return api.operations.manifest.getAll({token, jwtToken, providerId, data});
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
it("should change the bus on the manifest", () => {
|
|
56
|
-
const parcelManifestVehicle = {
|
|
57
|
-
vehicleId: "vehicleId"
|
|
58
|
-
};
|
|
59
|
-
const manifestId = "manifestId";
|
|
60
|
-
axiosMock.onPost(`/manifests/${manifestId}/vehicles`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
61
|
-
return api.operations.manifest.vehicles.createOrUpdate({token, jwtToken, manifestId, parcelManifestVehicle});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
55
|
it("should get outlook manifests", () => {
|
|
65
56
|
const query = {
|
|
66
57
|
providerId,
|
|
@@ -74,4 +74,21 @@ describe("operations/parcels-manifests", () => {
|
|
|
74
74
|
data
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
+
|
|
78
|
+
it("should add a vehicle to a parcel manifest", () => {
|
|
79
|
+
const manifestId = "123123123213";
|
|
80
|
+
const data = {
|
|
81
|
+
vehicleId: 1
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
axiosMock.onPost(`/parcels-manifests/${manifestId}/vehicles`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
85
|
+
return api.operations.parcelManifests.vehicles.createOrUpdate({
|
|
86
|
+
jwtToken,
|
|
87
|
+
token,
|
|
88
|
+
manifestId,
|
|
89
|
+
data
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
//parcels-manifests
|
|
77
94
|
});
|
|
@@ -57,4 +57,10 @@ describe('sales/cart', function() {
|
|
|
57
57
|
axiosMock.onPatch(`/cart/${cartId}`).reply(expectRequest({ statusCode: 200, token, jwtToken }));
|
|
58
58
|
return api.sales.cart.patch({ jwtToken, token, cartId, data: {providerId, operations: [{op}]} });
|
|
59
59
|
});
|
|
60
|
+
|
|
61
|
+
it("should get the shift partial deposit status", function() {
|
|
62
|
+
const shiftId = "shiftId1";
|
|
63
|
+
axiosMock.onGet(`/cart/${shiftId}/partial-deposit-status`).reply(expectRequest({statusCode: 200, token}));
|
|
64
|
+
return api.sales.cart.partialDepositStatus.get({token, jwtToken, shiftId});
|
|
65
|
+
});
|
|
60
66
|
});
|
package/types/client.d.ts
CHANGED
|
@@ -2316,6 +2316,14 @@ export function createApiClient(options: {
|
|
|
2316
2316
|
data: any;
|
|
2317
2317
|
headers: any;
|
|
2318
2318
|
}) => any;
|
|
2319
|
+
partialDepositStatus: {
|
|
2320
|
+
get({ token, jwtToken, shiftId, headers }: {
|
|
2321
|
+
token: any;
|
|
2322
|
+
jwtToken: any;
|
|
2323
|
+
shiftId: any;
|
|
2324
|
+
headers: any;
|
|
2325
|
+
}): any;
|
|
2326
|
+
};
|
|
2319
2327
|
};
|
|
2320
2328
|
giftCertificates: {
|
|
2321
2329
|
get: ({ token, GCNumber, query, headers }: {
|
|
@@ -2769,15 +2777,6 @@ export function createApiClient(options: {
|
|
|
2769
2777
|
headers: any;
|
|
2770
2778
|
}): any;
|
|
2771
2779
|
};
|
|
2772
|
-
vehicles: {
|
|
2773
|
-
createOrUpdate({ token, jwtToken, headers, manifestId, parcelManifestVehicle }: {
|
|
2774
|
-
token: any;
|
|
2775
|
-
jwtToken: any;
|
|
2776
|
-
headers: any;
|
|
2777
|
-
manifestId: any;
|
|
2778
|
-
parcelManifestVehicle: any;
|
|
2779
|
-
}): any;
|
|
2780
|
-
};
|
|
2781
2780
|
};
|
|
2782
2781
|
calendarEntries: {
|
|
2783
2782
|
all: ({ token, query, headers }: {
|
|
@@ -3011,6 +3010,16 @@ export function createApiClient(options: {
|
|
|
3011
3010
|
headers: any;
|
|
3012
3011
|
}): any;
|
|
3013
3012
|
};
|
|
3013
|
+
vehicles: {
|
|
3014
|
+
createOrUpdate({ token, jwtToken, manifestId, query, data, headers }: {
|
|
3015
|
+
token: any;
|
|
3016
|
+
jwtToken: any;
|
|
3017
|
+
manifestId: any;
|
|
3018
|
+
query?: {};
|
|
3019
|
+
data: any;
|
|
3020
|
+
headers: any;
|
|
3021
|
+
}): any;
|
|
3022
|
+
};
|
|
3014
3023
|
};
|
|
3015
3024
|
__test: {
|
|
3016
3025
|
client: axios.AxiosInstance;
|
|
@@ -158,13 +158,4 @@ declare function manifestFactory({ client, internalAuthTokenProvider }: {
|
|
|
158
158
|
headers: any;
|
|
159
159
|
}): any;
|
|
160
160
|
};
|
|
161
|
-
vehicles: {
|
|
162
|
-
createOrUpdate({ token, jwtToken, headers, manifestId, parcelManifestVehicle }: {
|
|
163
|
-
token: any;
|
|
164
|
-
jwtToken: any;
|
|
165
|
-
headers: any;
|
|
166
|
-
manifestId: any;
|
|
167
|
-
parcelManifestVehicle: any;
|
|
168
|
-
}): any;
|
|
169
|
-
};
|
|
170
161
|
};
|
|
@@ -39,4 +39,14 @@ declare function parcelsManifestsFactory({ client, internalAuthTokenProvider }:
|
|
|
39
39
|
headers: any;
|
|
40
40
|
}): any;
|
|
41
41
|
};
|
|
42
|
+
vehicles: {
|
|
43
|
+
createOrUpdate({ token, jwtToken, manifestId, query, data, headers }: {
|
|
44
|
+
token: any;
|
|
45
|
+
jwtToken: any;
|
|
46
|
+
manifestId: any;
|
|
47
|
+
query?: {};
|
|
48
|
+
data: any;
|
|
49
|
+
headers: any;
|
|
50
|
+
}): any;
|
|
51
|
+
};
|
|
42
52
|
};
|
|
@@ -45,4 +45,12 @@ declare function cartFactory({ client, internalAuthTokenProvider }: {
|
|
|
45
45
|
data: any;
|
|
46
46
|
headers: any;
|
|
47
47
|
}) => any;
|
|
48
|
+
partialDepositStatus: {
|
|
49
|
+
get({ token, jwtToken, shiftId, headers }: {
|
|
50
|
+
token: any;
|
|
51
|
+
jwtToken: any;
|
|
52
|
+
shiftId: any;
|
|
53
|
+
headers: any;
|
|
54
|
+
}): any;
|
|
55
|
+
};
|
|
48
56
|
};
|
|
@@ -2270,6 +2270,14 @@ declare const _exports: {
|
|
|
2270
2270
|
data: any;
|
|
2271
2271
|
headers: any;
|
|
2272
2272
|
}) => any;
|
|
2273
|
+
partialDepositStatus: {
|
|
2274
|
+
get({ token, jwtToken, shiftId, headers }: {
|
|
2275
|
+
token: any;
|
|
2276
|
+
jwtToken: any;
|
|
2277
|
+
shiftId: any;
|
|
2278
|
+
headers: any;
|
|
2279
|
+
}): any;
|
|
2280
|
+
};
|
|
2273
2281
|
};
|
|
2274
2282
|
giftCertificates: {
|
|
2275
2283
|
get: ({ token, GCNumber, query, headers }: {
|
|
@@ -2723,15 +2731,6 @@ declare const _exports: {
|
|
|
2723
2731
|
headers: any;
|
|
2724
2732
|
}): any;
|
|
2725
2733
|
};
|
|
2726
|
-
vehicles: {
|
|
2727
|
-
createOrUpdate({ token, jwtToken, headers, manifestId, parcelManifestVehicle }: {
|
|
2728
|
-
token: any;
|
|
2729
|
-
jwtToken: any;
|
|
2730
|
-
headers: any;
|
|
2731
|
-
manifestId: any;
|
|
2732
|
-
parcelManifestVehicle: any;
|
|
2733
|
-
}): any;
|
|
2734
|
-
};
|
|
2735
2734
|
};
|
|
2736
2735
|
calendarEntries: {
|
|
2737
2736
|
all: ({ token, query, headers }: {
|
|
@@ -2965,6 +2964,16 @@ declare const _exports: {
|
|
|
2965
2964
|
headers: any;
|
|
2966
2965
|
}): any;
|
|
2967
2966
|
};
|
|
2967
|
+
vehicles: {
|
|
2968
|
+
createOrUpdate({ token, jwtToken, manifestId, query, data, headers }: {
|
|
2969
|
+
token: any;
|
|
2970
|
+
jwtToken: any;
|
|
2971
|
+
manifestId: any;
|
|
2972
|
+
query?: {};
|
|
2973
|
+
data: any;
|
|
2974
|
+
headers: any;
|
|
2975
|
+
}): any;
|
|
2976
|
+
};
|
|
2968
2977
|
};
|
|
2969
2978
|
__test: {
|
|
2970
2979
|
client: import("axios").AxiosInstance;
|