btrz-api-client
Advanced tools
Comparing version 5.125.0 to 5.126.0
@@ -374,2 +374,21 @@ "use strict"; | ||
var vehicles = { | ||
createOrUpdate: function createOrUpdate(_ref21) { | ||
var token = _ref21.token, | ||
jwtToken = _ref21.jwtToken, | ||
headers = _ref21.headers, | ||
manifestId = _ref21.manifestId, | ||
parcelManifestVehicle = _ref21.parcelManifestVehicle; | ||
return client({ | ||
url: "/manifests/" + manifestId + "/vehicles", | ||
method: "post", | ||
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }), | ||
data: { | ||
parcelManifestVehicle: parcelManifestVehicle | ||
} | ||
}); | ||
} | ||
}; | ||
return { | ||
@@ -390,3 +409,4 @@ get: get, | ||
legs: legs, | ||
reports: reports | ||
reports: reports, | ||
vehicles: vehicles | ||
}; | ||
@@ -393,0 +413,0 @@ } |
{ | ||
"name": "btrz-api-client", | ||
"version": "5.125.0", | ||
"version": "5.126.0", | ||
"description": "Api client for Betterez endpoints", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -248,2 +248,15 @@ const { | ||
const vehicles = { | ||
createOrUpdate({token, jwtToken, headers, manifestId, parcelManifestVehicle}) { | ||
return client({ | ||
url: `/manifests/${manifestId}/vehicles`, | ||
method: "post", | ||
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}), | ||
data: { | ||
parcelManifestVehicle | ||
} | ||
}); | ||
} | ||
}; | ||
return { | ||
@@ -264,3 +277,4 @@ get, | ||
legs, | ||
reports | ||
reports, | ||
vehicles | ||
}; | ||
@@ -267,0 +281,0 @@ } |
@@ -55,2 +55,11 @@ const {expect} = require("chai"); | ||
it("should change the bus on the manifest", () => { | ||
const parcelManifestVehicle = { | ||
vehicleId: "vehicleId" | ||
}; | ||
const manifestId = "manifestId"; | ||
axiosMock.onPost(`/manifests/${manifestId}/vehicles`).reply(expectRequest({statusCode: 200, token, jwtToken})); | ||
return api.operations.manifest.vehicles.createOrUpdate({token, jwtToken, manifestId, parcelManifestVehicle}); | ||
}); | ||
it("should get outlook manifests", () => { | ||
@@ -57,0 +66,0 @@ const query = { |
@@ -1,1 +0,1 @@ | ||
export let INTERNAL_AUTH_TOKEN_SYMBOL: string; | ||
export const INTERNAL_AUTH_TOKEN_SYMBOL: string; |
@@ -161,2 +161,11 @@ export = manifestFactory; | ||
}; | ||
vehicles: { | ||
createOrUpdate({ token, jwtToken, headers, manifestId, parcelManifestVehicle }: { | ||
token: any; | ||
jwtToken: any; | ||
headers: any; | ||
manifestId: any; | ||
parcelManifestVehicle: any; | ||
}): any; | ||
}; | ||
}; |
@@ -1,3 +0,3 @@ | ||
export let baseURL: string; | ||
export let timeout: number; | ||
export const baseURL: string; | ||
export const timeout: number; | ||
export namespace baseURLOverride { | ||
@@ -4,0 +4,0 @@ function inventory(url: any): string; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1428781
37409