btrz-api-client 8.6.0 → 8.7.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 +21 -0
- package/package.json +1 -1
- package/src/endpoints/operations/manifest.js +13 -0
- package/test/endpoints/operations/manifest.test.js +20 -0
- package/types/client.d.ts +10 -0
- package/types/endpoints/operations/manifest.d.ts +10 -0
- package/types/initializedClient.d.ts +10 -0
|
@@ -502,6 +502,26 @@ function manifestFactory(_ref) {
|
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
|
|
505
|
+
var manifestsExceptions = {
|
|
506
|
+
update: function update(_ref29) {
|
|
507
|
+
var token = _ref29.token,
|
|
508
|
+
jwtToken = _ref29.jwtToken,
|
|
509
|
+
manifestKey = _ref29.manifestKey,
|
|
510
|
+
manifestException = _ref29.manifestException,
|
|
511
|
+
headers = _ref29.headers,
|
|
512
|
+
_ref29$query = _ref29.query,
|
|
513
|
+
query = _ref29$query === undefined ? {} : _ref29$query;
|
|
514
|
+
|
|
515
|
+
return client({
|
|
516
|
+
url: "/manifests/" + manifestKey + "/manifests-exceptions",
|
|
517
|
+
method: "put",
|
|
518
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
519
|
+
params: query,
|
|
520
|
+
data: { manifestException: manifestException }
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
};
|
|
524
|
+
|
|
505
525
|
return {
|
|
506
526
|
get: get,
|
|
507
527
|
getAll: getAll,
|
|
@@ -519,6 +539,7 @@ function manifestFactory(_ref) {
|
|
|
519
539
|
updateDispatchReporting: updateDispatchReporting,
|
|
520
540
|
createDispatchReporting: createDispatchReporting,
|
|
521
541
|
statusBulkUpdate: statusBulkUpdate,
|
|
542
|
+
manifestsExceptions: manifestsExceptions,
|
|
522
543
|
checkIn: checkIn,
|
|
523
544
|
legs: legs,
|
|
524
545
|
reports: reports,
|
package/package.json
CHANGED
|
@@ -326,6 +326,18 @@ function manifestFactory({
|
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
328
|
|
|
329
|
+
const manifestsExceptions = {
|
|
330
|
+
update({token, jwtToken, manifestKey, manifestException, headers, query = {}}) {
|
|
331
|
+
return client({
|
|
332
|
+
url: `/manifests/${manifestKey}/manifests-exceptions`,
|
|
333
|
+
method: "put",
|
|
334
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
335
|
+
params: query,
|
|
336
|
+
data: {manifestException}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
|
|
329
341
|
return {
|
|
330
342
|
get,
|
|
331
343
|
getAll,
|
|
@@ -343,6 +355,7 @@ function manifestFactory({
|
|
|
343
355
|
updateDispatchReporting,
|
|
344
356
|
createDispatchReporting,
|
|
345
357
|
statusBulkUpdate,
|
|
358
|
+
manifestsExceptions,
|
|
346
359
|
checkIn,
|
|
347
360
|
legs,
|
|
348
361
|
reports,
|
|
@@ -384,3 +384,23 @@ describe("operations/manifests/:manifestId/driver-relays", () => {
|
|
|
384
384
|
return api.operations.manifest.driverRelays.update({token, jwtToken, manifestId, data, query});
|
|
385
385
|
});
|
|
386
386
|
});
|
|
387
|
+
|
|
388
|
+
describe("operations/manifests/:manifestKey/manifests-exceptions", () => {
|
|
389
|
+
const token = "I owe you a token";
|
|
390
|
+
const jwtToken = "I owe you a JWT token";
|
|
391
|
+
|
|
392
|
+
afterEach(() => {
|
|
393
|
+
axiosMock.reset();
|
|
394
|
+
});
|
|
395
|
+
it("should update a manifest exception", async () => {
|
|
396
|
+
const manifestKey = "manifestKey";
|
|
397
|
+
const manifestException = {
|
|
398
|
+
legs: []
|
|
399
|
+
};
|
|
400
|
+
axiosMock.onPut(`/manifests/${manifestKey}/manifests-exceptions`).reply(expectRequest({
|
|
401
|
+
statusCode: 200, token, jwtToken
|
|
402
|
+
}));
|
|
403
|
+
|
|
404
|
+
return api.operations.manifest.manifestsExceptions.update({token, jwtToken, manifestKey, manifestException});
|
|
405
|
+
});
|
|
406
|
+
});
|
package/types/client.d.ts
CHANGED
|
@@ -3720,6 +3720,16 @@ export function createApiClient(options: {
|
|
|
3720
3720
|
data: any;
|
|
3721
3721
|
headers: any;
|
|
3722
3722
|
}) => any;
|
|
3723
|
+
manifestsExceptions: {
|
|
3724
|
+
update({ token, jwtToken, manifestKey, manifestException, headers, query }: {
|
|
3725
|
+
token: any;
|
|
3726
|
+
jwtToken: any;
|
|
3727
|
+
manifestKey: any;
|
|
3728
|
+
manifestException: any;
|
|
3729
|
+
headers: any;
|
|
3730
|
+
query?: {};
|
|
3731
|
+
}): any;
|
|
3732
|
+
};
|
|
3723
3733
|
checkIn: {
|
|
3724
3734
|
create({ token, jwtToken, query, headers, data, manifestId, legFromId }: {
|
|
3725
3735
|
token: any;
|
|
@@ -116,6 +116,16 @@ declare function manifestFactory({ client, internalAuthTokenProvider }: {
|
|
|
116
116
|
data: any;
|
|
117
117
|
headers: any;
|
|
118
118
|
}) => any;
|
|
119
|
+
manifestsExceptions: {
|
|
120
|
+
update({ token, jwtToken, manifestKey, manifestException, headers, query }: {
|
|
121
|
+
token: any;
|
|
122
|
+
jwtToken: any;
|
|
123
|
+
manifestKey: any;
|
|
124
|
+
manifestException: any;
|
|
125
|
+
headers: any;
|
|
126
|
+
query?: {};
|
|
127
|
+
}): any;
|
|
128
|
+
};
|
|
119
129
|
checkIn: {
|
|
120
130
|
create({ token, jwtToken, query, headers, data, manifestId, legFromId }: {
|
|
121
131
|
token: any;
|
|
@@ -3674,6 +3674,16 @@ declare const _exports: {
|
|
|
3674
3674
|
data: any;
|
|
3675
3675
|
headers: any;
|
|
3676
3676
|
}) => any;
|
|
3677
|
+
manifestsExceptions: {
|
|
3678
|
+
update({ token, jwtToken, manifestKey, manifestException, headers, query }: {
|
|
3679
|
+
token: any;
|
|
3680
|
+
jwtToken: any;
|
|
3681
|
+
manifestKey: any;
|
|
3682
|
+
manifestException: any;
|
|
3683
|
+
headers: any;
|
|
3684
|
+
query?: {};
|
|
3685
|
+
}): any;
|
|
3686
|
+
};
|
|
3677
3687
|
checkIn: {
|
|
3678
3688
|
create({ token, jwtToken, query, headers, data, manifestId, legFromId }: {
|
|
3679
3689
|
token: any;
|