btrz-api-client 5.198.0 → 5.199.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 +1 -5
- package/lib/endpoints/operations/manifest.js +22 -1
- package/package.json +1 -1
- package/src/endpoints/operations/manifest.js +14 -1
- package/test/endpoints/operations/manifest.test.js +21 -0
- package/types/client.d.ts +12 -0
- package/types/endpoints/operations/manifest.d.ts +12 -0
- package/types/initializedClient.d.ts +12 -0
|
@@ -450,6 +450,26 @@ function manifestFactory(_ref) {
|
|
|
450
450
|
}
|
|
451
451
|
};
|
|
452
452
|
|
|
453
|
+
var driverRelays = {
|
|
454
|
+
update: function update(_ref26) {
|
|
455
|
+
var token = _ref26.token,
|
|
456
|
+
jwtToken = _ref26.jwtToken,
|
|
457
|
+
manifestId = _ref26.manifestId,
|
|
458
|
+
_ref26$query = _ref26.query,
|
|
459
|
+
query = _ref26$query === undefined ? { bypassValidation: false } : _ref26$query,
|
|
460
|
+
headers = _ref26.headers,
|
|
461
|
+
data = _ref26.data;
|
|
462
|
+
|
|
463
|
+
return client({
|
|
464
|
+
url: "/manifests/" + manifestId + "/driver-relays",
|
|
465
|
+
method: "put",
|
|
466
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
467
|
+
params: query,
|
|
468
|
+
data: data
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
|
|
453
473
|
return {
|
|
454
474
|
get: get,
|
|
455
475
|
getAll: getAll,
|
|
@@ -469,7 +489,8 @@ function manifestFactory(_ref) {
|
|
|
469
489
|
checkIn: checkIn,
|
|
470
490
|
legs: legs,
|
|
471
491
|
reports: reports,
|
|
472
|
-
labels: labels
|
|
492
|
+
labels: labels,
|
|
493
|
+
driverRelays: driverRelays
|
|
473
494
|
};
|
|
474
495
|
}
|
|
475
496
|
|
package/package.json
CHANGED
|
@@ -292,6 +292,18 @@ function manifestFactory({
|
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
+
const driverRelays = {
|
|
296
|
+
update({token, jwtToken, manifestId, query = {bypassValidation: false}, headers, data}) {
|
|
297
|
+
return client({
|
|
298
|
+
url: `/manifests/${manifestId}/driver-relays`,
|
|
299
|
+
method: "put",
|
|
300
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
301
|
+
params: query,
|
|
302
|
+
data
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
|
|
295
307
|
return {
|
|
296
308
|
get,
|
|
297
309
|
getAll,
|
|
@@ -311,7 +323,8 @@ function manifestFactory({
|
|
|
311
323
|
checkIn,
|
|
312
324
|
legs,
|
|
313
325
|
reports,
|
|
314
|
-
labels
|
|
326
|
+
labels,
|
|
327
|
+
driverRelays
|
|
315
328
|
};
|
|
316
329
|
}
|
|
317
330
|
|
|
@@ -321,3 +321,24 @@ describe("operations/manifest/:manifestId/labels", () => {
|
|
|
321
321
|
return api.operations.manifest.labels.remove({token, jwtToken, manifestId, labelId});
|
|
322
322
|
});
|
|
323
323
|
});
|
|
324
|
+
|
|
325
|
+
describe("operations/manifests/:manifestId/driver-relays", () => {
|
|
326
|
+
const token = "I owe you a token";
|
|
327
|
+
const jwtToken = "I owe you a JWT token";
|
|
328
|
+
|
|
329
|
+
afterEach(() => {
|
|
330
|
+
axiosMock.reset();
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
it("should call driver-relays endpoint", () => {
|
|
334
|
+
const manifestId = "manifestId";
|
|
335
|
+
const data = {
|
|
336
|
+
driverRelays: []
|
|
337
|
+
};
|
|
338
|
+
const query = {bypassValidations: false};
|
|
339
|
+
axiosMock.onPut(`/manifests/${manifestId}/driver-relays`).reply(expectRequest({
|
|
340
|
+
statusCode: 200, token, jwtToken
|
|
341
|
+
}));
|
|
342
|
+
return api.operations.manifest.driverRelays.update({token, jwtToken, manifestId, data, query});
|
|
343
|
+
});
|
|
344
|
+
});
|
package/types/client.d.ts
CHANGED
|
@@ -3224,6 +3224,18 @@ export function createApiClient(options: {
|
|
|
3224
3224
|
headers: any;
|
|
3225
3225
|
}): any;
|
|
3226
3226
|
};
|
|
3227
|
+
driverRelays: {
|
|
3228
|
+
update({ token, jwtToken, manifestId, query, headers, data }: {
|
|
3229
|
+
token: any;
|
|
3230
|
+
jwtToken: any;
|
|
3231
|
+
manifestId: any;
|
|
3232
|
+
query?: {
|
|
3233
|
+
bypassValidation: boolean;
|
|
3234
|
+
};
|
|
3235
|
+
headers: any;
|
|
3236
|
+
data: any;
|
|
3237
|
+
}): any;
|
|
3238
|
+
};
|
|
3227
3239
|
};
|
|
3228
3240
|
manifestLegForTickets: {
|
|
3229
3241
|
get: ({ token, jwtToken, ticketId, params, headers }: {
|
|
@@ -196,4 +196,16 @@ declare function manifestFactory({ client, internalAuthTokenProvider }: {
|
|
|
196
196
|
headers: any;
|
|
197
197
|
}): any;
|
|
198
198
|
};
|
|
199
|
+
driverRelays: {
|
|
200
|
+
update({ token, jwtToken, manifestId, query, headers, data }: {
|
|
201
|
+
token: any;
|
|
202
|
+
jwtToken: any;
|
|
203
|
+
manifestId: any;
|
|
204
|
+
query?: {
|
|
205
|
+
bypassValidation: boolean;
|
|
206
|
+
};
|
|
207
|
+
headers: any;
|
|
208
|
+
data: any;
|
|
209
|
+
}): any;
|
|
210
|
+
};
|
|
199
211
|
};
|
|
@@ -3178,6 +3178,18 @@ declare const _exports: {
|
|
|
3178
3178
|
headers: any;
|
|
3179
3179
|
}): any;
|
|
3180
3180
|
};
|
|
3181
|
+
driverRelays: {
|
|
3182
|
+
update({ token, jwtToken, manifestId, query, headers, data }: {
|
|
3183
|
+
token: any;
|
|
3184
|
+
jwtToken: any;
|
|
3185
|
+
manifestId: any;
|
|
3186
|
+
query?: {
|
|
3187
|
+
bypassValidation: boolean;
|
|
3188
|
+
};
|
|
3189
|
+
headers: any;
|
|
3190
|
+
data: any;
|
|
3191
|
+
}): any;
|
|
3192
|
+
};
|
|
3181
3193
|
};
|
|
3182
3194
|
manifestLegForTickets: {
|
|
3183
3195
|
get: ({ token, jwtToken, ticketId, params, headers }: {
|