btrz-api-client 5.137.0 → 5.139.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.
@@ -81,14 +81,16 @@ function vehiclesFactory(_ref) {
81
81
  token = _ref7.token,
82
82
  vehicleId = _ref7.vehicleId,
83
83
  seatmap = _ref7.seatmap,
84
- headers = _ref7.headers;
84
+ headers = _ref7.headers,
85
+ newdesign = _ref7.newdesign;
85
86
 
86
87
  return client({
87
88
  url: "/vehicles/" + vehicleId + "/seatmaps",
88
89
  method: "post",
89
90
  headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
90
91
  data: {
91
- seatmap: seatmap
92
+ seatmap: seatmap,
93
+ newdesign: newdesign || false
92
94
  }
93
95
  });
94
96
  },
@@ -97,12 +99,16 @@ function vehiclesFactory(_ref) {
97
99
  vehicleId = _ref8.vehicleId,
98
100
  seatMapId = _ref8.seatMapId,
99
101
  token = _ref8.token,
100
- headers = _ref8.headers;
102
+ headers = _ref8.headers,
103
+ newdesign = _ref8.newdesign;
101
104
 
102
105
  return client({
103
106
  url: "/vehicles/" + vehicleId + "/seatmaps/" + seatMapId,
104
107
  method: "delete",
105
- headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
108
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
109
+ data: {
110
+ newdesign: newdesign || false
111
+ }
106
112
  });
107
113
  }
108
114
  };
@@ -88,6 +88,9 @@ function pdfDataFactory(_ref) {
88
88
  if (query.type === "shiftLocationClosure") {
89
89
  url = "/pdf-shift-location-closures/" + itemId;
90
90
  }
91
+ if (query.type === "bankDepositSlip") {
92
+ url = "/pdf-bank-deposit-slips/" + itemId;
93
+ }
91
94
 
92
95
  return client.get(url, {
93
96
  params: query,
@@ -93,6 +93,9 @@ function pdfFactory(_ref) {
93
93
  if (query.type === "shiftLocationClosure") {
94
94
  url = "/pdf-shift-location-closures/" + itemId;
95
95
  }
96
+ if (query.type === "bankDepositSlip") {
97
+ url = "/pdf-bank-deposit-slips/" + itemId;
98
+ }
96
99
 
97
100
  return client.get(url, {
98
101
  params: query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "5.137.0",
3
+ "version": "5.139.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -51,21 +51,25 @@ function vehiclesFactory({client, internalAuthTokenProvider}) {
51
51
  }
52
52
 
53
53
  const seatmaps = {
54
- create({jwtToken, token, vehicleId, seatmap, headers}) {
54
+ create({jwtToken, token, vehicleId, seatmap, headers, newdesign}) {
55
55
  return client({
56
56
  url: `/vehicles/${vehicleId}/seatmaps`,
57
57
  method: "post",
58
58
  headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
59
59
  data: {
60
- seatmap
60
+ seatmap,
61
+ newdesign: newdesign || false
61
62
  }
62
63
  });
63
64
  },
64
- remove({jwtToken, vehicleId, seatMapId, token, headers}) {
65
+ remove({jwtToken, vehicleId, seatMapId, token, headers, newdesign}) {
65
66
  return client({
66
67
  url: `/vehicles/${vehicleId}/seatmaps/${seatMapId}`,
67
68
  method: "delete",
68
- headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
69
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
70
+ data: {
71
+ newdesign: newdesign || false
72
+ }
69
73
  });
70
74
  }
71
75
  };
@@ -86,6 +86,9 @@ function pdfDataFactory({
86
86
  if (query.type === "shiftLocationClosure") {
87
87
  url = `/pdf-shift-location-closures/${itemId}`;
88
88
  }
89
+ if (query.type === "bankDepositSlip") {
90
+ url = `/pdf-bank-deposit-slips/${itemId}`;
91
+ }
89
92
 
90
93
  return client.get(url, {
91
94
  params: query,
@@ -91,6 +91,9 @@ function pdfFactory({
91
91
  if (query.type === "shiftLocationClosure") {
92
92
  url = `/pdf-shift-location-closures/${itemId}`;
93
93
  }
94
+ if (query.type === "bankDepositSlip") {
95
+ url = `/pdf-bank-deposit-slips/${itemId}`;
96
+ }
94
97
 
95
98
  return client.get(url, {
96
99
  params: query,
@@ -314,4 +314,17 @@ describe("notifications/pdf-data", () => {
314
314
  token, query, itemId
315
315
  });
316
316
  });
317
+ it("should return the proper data for a bankDepositSlip", () => {
318
+ const itemId = "12345";
319
+ const query = {
320
+ type: "bankDepositSlip"
321
+ };
322
+ axiosMock.onGet(`/pdf-bank-deposit-slips/${itemId}`)
323
+ .reply(expectRequest({
324
+ statusCode: 200, token
325
+ }));
326
+ return api.notifications.pdfData.get({
327
+ token, query, itemId
328
+ });
329
+ });
317
330
  });
@@ -302,4 +302,18 @@ describe("notifications/pdfs", () => {
302
302
  token, query, itemId
303
303
  });
304
304
  });
305
+
306
+ it("should return the proper data for a bankDepositSlip", () => {
307
+ const itemId = "12345";
308
+ const query = {
309
+ type: "bankDepositSlip"
310
+ };
311
+ axiosMock.onGet(`/pdf-bank-deposit-slips/${itemId}`)
312
+ .reply(expectRequest({
313
+ statusCode: 200, token
314
+ }));
315
+ return api.notifications.pdfs.get({
316
+ token, query, itemId
317
+ });
318
+ });
305
319
  });
package/types/client.d.ts CHANGED
@@ -1399,19 +1399,21 @@ export function createApiClient(options: {
1399
1399
  headers: any;
1400
1400
  }) => any;
1401
1401
  seatmaps: {
1402
- create({ jwtToken, token, vehicleId, seatmap, headers }: {
1402
+ create({ jwtToken, token, vehicleId, seatmap, headers, newdesign }: {
1403
1403
  jwtToken: any;
1404
1404
  token: any;
1405
1405
  vehicleId: any;
1406
1406
  seatmap: any;
1407
1407
  headers: any;
1408
+ newdesign: any;
1408
1409
  }): any;
1409
- remove({ jwtToken, vehicleId, seatMapId, token, headers }: {
1410
+ remove({ jwtToken, vehicleId, seatMapId, token, headers, newdesign }: {
1410
1411
  jwtToken: any;
1411
1412
  vehicleId: any;
1412
1413
  seatMapId: any;
1413
1414
  token: any;
1414
1415
  headers: any;
1416
+ newdesign: any;
1415
1417
  }): any;
1416
1418
  };
1417
1419
  };
@@ -1 +1 @@
1
- export const INTERNAL_AUTH_TOKEN_SYMBOL: string;
1
+ export let INTERNAL_AUTH_TOKEN_SYMBOL: string;
@@ -33,19 +33,21 @@ declare function vehiclesFactory({ client, internalAuthTokenProvider }: {
33
33
  headers: any;
34
34
  }) => any;
35
35
  seatmaps: {
36
- create({ jwtToken, token, vehicleId, seatmap, headers }: {
36
+ create({ jwtToken, token, vehicleId, seatmap, headers, newdesign }: {
37
37
  jwtToken: any;
38
38
  token: any;
39
39
  vehicleId: any;
40
40
  seatmap: any;
41
41
  headers: any;
42
+ newdesign: any;
42
43
  }): any;
43
- remove({ jwtToken, vehicleId, seatMapId, token, headers }: {
44
+ remove({ jwtToken, vehicleId, seatMapId, token, headers, newdesign }: {
44
45
  jwtToken: any;
45
46
  vehicleId: any;
46
47
  seatMapId: any;
47
48
  token: any;
48
49
  headers: any;
50
+ newdesign: any;
49
51
  }): any;
50
52
  };
51
53
  };
@@ -1353,19 +1353,21 @@ declare const _exports: {
1353
1353
  headers: any;
1354
1354
  }) => any;
1355
1355
  seatmaps: {
1356
- create({ jwtToken, token, vehicleId, seatmap, headers }: {
1356
+ create({ jwtToken, token, vehicleId, seatmap, headers, newdesign }: {
1357
1357
  jwtToken: any;
1358
1358
  token: any;
1359
1359
  vehicleId: any;
1360
1360
  seatmap: any;
1361
1361
  headers: any;
1362
+ newdesign: any;
1362
1363
  }): any;
1363
- remove({ jwtToken, vehicleId, seatMapId, token, headers }: {
1364
+ remove({ jwtToken, vehicleId, seatMapId, token, headers, newdesign }: {
1364
1365
  jwtToken: any;
1365
1366
  vehicleId: any;
1366
1367
  seatMapId: any;
1367
1368
  token: any;
1368
1369
  headers: any;
1370
+ newdesign: any;
1369
1371
  }): any;
1370
1372
  };
1371
1373
  };
@@ -1,5 +1,5 @@
1
- export const baseURL: string;
2
- export const timeout: number;
1
+ export let baseURL: string;
2
+ export let timeout: number;
3
3
  export namespace baseURLOverride {
4
4
  function inventory(url: any): string;
5
5
  function trips(url: any): string;