btrz-api-client 5.168.0 → 5.169.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/inventory/seatmaps.js +16 -1
- package/package.json +1 -1
- package/src/endpoints/inventory/seatmaps.js +9 -1
- package/test/endpoints/inventory/seatmaps.test.js +13 -0
- package/types/client.d.ts +7 -0
- package/types/endpoints/inventory/seatmaps.d.ts +7 -0
- package/types/initializedClient.d.ts +7 -0
|
@@ -94,13 +94,28 @@ function seatmapsFactory(_ref) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function getOccupiedSeats(_ref8) {
|
|
98
|
+
var token = _ref8.token,
|
|
99
|
+
jwtToken = _ref8.jwtToken,
|
|
100
|
+
seatmapId = _ref8.seatmapId,
|
|
101
|
+
_ref8$query = _ref8.query,
|
|
102
|
+
query = _ref8$query === undefined ? {} : _ref8$query,
|
|
103
|
+
headers = _ref8.headers;
|
|
104
|
+
|
|
105
|
+
return client.get("/seatmaps/" + seatmapId + "/occupied-seats", {
|
|
106
|
+
params: query,
|
|
107
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
97
111
|
return {
|
|
98
112
|
all: all,
|
|
99
113
|
get: get,
|
|
100
114
|
getById: getById,
|
|
101
115
|
create: create,
|
|
102
116
|
remove: remove,
|
|
103
|
-
update: update
|
|
117
|
+
update: update,
|
|
118
|
+
getOccupiedSeats: getOccupiedSeats
|
|
104
119
|
};
|
|
105
120
|
}
|
|
106
121
|
|
package/package.json
CHANGED
|
@@ -51,13 +51,21 @@ function seatmapsFactory({client, internalAuthTokenProvider}) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
function getOccupiedSeats({token, jwtToken, seatmapId, query = {}, headers}) {
|
|
55
|
+
return client.get(`/seatmaps/${seatmapId}/occupied-seats`, {
|
|
56
|
+
params: query,
|
|
57
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
return {
|
|
55
62
|
all,
|
|
56
63
|
get,
|
|
57
64
|
getById,
|
|
58
65
|
create,
|
|
59
66
|
remove,
|
|
60
|
-
update
|
|
67
|
+
update,
|
|
68
|
+
getOccupiedSeats
|
|
61
69
|
};
|
|
62
70
|
}
|
|
63
71
|
|
|
@@ -53,4 +53,17 @@ describe("inventory/seatmaps", () => {
|
|
|
53
53
|
expect(httpResponse.data).eql(response);
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
|
+
|
|
57
|
+
it("should get a seatmap occupied seats", () => {
|
|
58
|
+
const seatmapId = "1234";
|
|
59
|
+
axiosMock.onGet(`/seatmaps/${seatmapId}/occupied-seats`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
60
|
+
return api.inventory.seatmaps.getOccupiedSeats({
|
|
61
|
+
jwtToken,
|
|
62
|
+
token,
|
|
63
|
+
seatmapId,
|
|
64
|
+
query: {
|
|
65
|
+
newdesign: true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
56
69
|
});
|
package/types/client.d.ts
CHANGED
|
@@ -461,6 +461,13 @@ export function createApiClient(options: {
|
|
|
461
461
|
seatmap: any;
|
|
462
462
|
headers: any;
|
|
463
463
|
}) => any;
|
|
464
|
+
getOccupiedSeats: ({ token, jwtToken, seatmapId, query, headers }: {
|
|
465
|
+
token: any;
|
|
466
|
+
jwtToken: any;
|
|
467
|
+
seatmapId: any;
|
|
468
|
+
query?: {};
|
|
469
|
+
headers: any;
|
|
470
|
+
}) => any;
|
|
464
471
|
};
|
|
465
472
|
fees: {
|
|
466
473
|
all: ({ token, query, headers }: {
|
|
@@ -43,4 +43,11 @@ declare function seatmapsFactory({ client, internalAuthTokenProvider }: {
|
|
|
43
43
|
seatmap: any;
|
|
44
44
|
headers: any;
|
|
45
45
|
}) => any;
|
|
46
|
+
getOccupiedSeats: ({ token, jwtToken, seatmapId, query, headers }: {
|
|
47
|
+
token: any;
|
|
48
|
+
jwtToken: any;
|
|
49
|
+
seatmapId: any;
|
|
50
|
+
query?: {};
|
|
51
|
+
headers: any;
|
|
52
|
+
}) => any;
|
|
46
53
|
};
|
|
@@ -415,6 +415,13 @@ declare const _exports: {
|
|
|
415
415
|
seatmap: any;
|
|
416
416
|
headers: any;
|
|
417
417
|
}) => any;
|
|
418
|
+
getOccupiedSeats: ({ token, jwtToken, seatmapId, query, headers }: {
|
|
419
|
+
token: any;
|
|
420
|
+
jwtToken: any;
|
|
421
|
+
seatmapId: any;
|
|
422
|
+
query?: {};
|
|
423
|
+
headers: any;
|
|
424
|
+
}) => any;
|
|
418
425
|
};
|
|
419
426
|
fees: {
|
|
420
427
|
all: ({ token, query, headers }: {
|