btrz-api-client 7.3.0 → 7.4.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.
@@ -395,11 +395,31 @@ function shiftsFactory(_ref) {
395
395
  }
396
396
  };
397
397
 
398
+ var requiresAgencyShiftClosure = {
399
+ put: function put(_ref30) {
400
+ var token = _ref30.token,
401
+ jwtToken = _ref30.jwtToken,
402
+ shiftId = _ref30.shiftId,
403
+ headers = _ref30.headers,
404
+ shiftData = _ref30.shiftData;
405
+
406
+ return client({
407
+ url: "/shifts/" + shiftId + "/requires-agency-shift-closure",
408
+ method: "put",
409
+ headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
410
+ data: {
411
+ shiftData: shiftData
412
+ }
413
+ });
414
+ }
415
+ };
416
+
398
417
  return {
399
418
  all: all,
400
419
  get: get,
401
420
  create: create,
402
421
  update: update,
422
+ requiresAgencyShiftClosure: requiresAgencyShiftClosure,
403
423
  payments: payments,
404
424
  transactions: transactions,
405
425
  tickets: tickets,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btrz-api-client",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "Api client for Betterez endpoints",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -240,11 +240,25 @@ function shiftsFactory({client, internalAuthTokenProvider}) {
240
240
  }
241
241
  };
242
242
 
243
+ const requiresAgencyShiftClosure = {
244
+ put({token, jwtToken, shiftId, headers, shiftData}) {
245
+ return client({
246
+ url: `/shifts/${shiftId}/requires-agency-shift-closure`,
247
+ method: "put",
248
+ headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
249
+ data: {
250
+ shiftData
251
+ }
252
+ });
253
+ }
254
+ };
255
+
243
256
  return {
244
257
  all,
245
258
  get,
246
259
  create,
247
260
  update,
261
+ requiresAgencyShiftClosure,
248
262
  payments,
249
263
  transactions,
250
264
  tickets,
@@ -217,4 +217,14 @@ describe("accounts/shifts", () => {
217
217
  axiosMock.onGet(`/shifts/${shiftId}/commissions`).reply(expectRequest({statusCode: 200, token}));
218
218
  return api.accounts.shifts.commissions.get({token, jwtToken, shiftId});
219
219
  });
220
+
221
+ it("should set the requiresAgencyShiftLocation property", () => {
222
+ const shiftId = "shiftId1";
223
+ const shiftData = {
224
+ requiresAgencyShiftLocation: true
225
+ };
226
+ axiosMock.onPut(`/shifts/${shiftId}/requires-agency-shift-closure`)
227
+ .reply(expectRequest({statusCode: 200, token, jwtToken, body: {shiftData}}));
228
+ return api.accounts.shifts.requiresAgencyShiftClosure.put({token, jwtToken, shiftId, shiftData});
229
+ });
220
230
  });
package/types/client.d.ts CHANGED
@@ -2541,6 +2541,15 @@ export function createApiClient(options: {
2541
2541
  headers: any;
2542
2542
  query: any;
2543
2543
  }) => any;
2544
+ requiresAgencyShiftClosure: {
2545
+ put({ token, jwtToken, shiftId, headers, shiftData }: {
2546
+ token: any;
2547
+ jwtToken: any;
2548
+ shiftId: any;
2549
+ headers: any;
2550
+ shiftData: any;
2551
+ }): any;
2552
+ };
2544
2553
  payments: {
2545
2554
  get({ token, jwtToken, shiftId, headers }: {
2546
2555
  token: any;
@@ -28,6 +28,15 @@ declare function shiftsFactory({ client, internalAuthTokenProvider }: {
28
28
  headers: any;
29
29
  query: any;
30
30
  }) => any;
31
+ requiresAgencyShiftClosure: {
32
+ put({ token, jwtToken, shiftId, headers, shiftData }: {
33
+ token: any;
34
+ jwtToken: any;
35
+ shiftId: any;
36
+ headers: any;
37
+ shiftData: any;
38
+ }): any;
39
+ };
31
40
  payments: {
32
41
  get({ token, jwtToken, shiftId, headers }: {
33
42
  token: any;
@@ -2495,6 +2495,15 @@ declare const _exports: {
2495
2495
  headers: any;
2496
2496
  query: any;
2497
2497
  }) => any;
2498
+ requiresAgencyShiftClosure: {
2499
+ put({ token, jwtToken, shiftId, headers, shiftData }: {
2500
+ token: any;
2501
+ jwtToken: any;
2502
+ shiftId: any;
2503
+ headers: any;
2504
+ shiftData: any;
2505
+ }): any;
2506
+ };
2498
2507
  payments: {
2499
2508
  get({ token, jwtToken, shiftId, headers }: {
2500
2509
  token: any;