seatsio 87.7.0 → 87.9.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/dist/src/Accounts/Account.js +12 -10
- package/dist/src/Accounts/AccountSettings.js +12 -12
- package/dist/src/Accounts/Accounts.js +28 -32
- package/dist/src/Accounts/ChartValidationSettings.js +9 -8
- package/dist/src/Accounts/DefaultRendererSettings.js +6 -8
- package/dist/src/AsyncIterator.js +39 -97
- package/dist/src/Charts/Category.js +17 -18
- package/dist/src/Charts/CategoryUpdateParams.js +13 -17
- package/dist/src/Charts/Chart.js +21 -14
- package/dist/src/Charts/ChartListParams.js +30 -34
- package/dist/src/Charts/ChartObjectInfo.js +33 -14
- package/dist/src/Charts/ChartValidation.js +5 -8
- package/dist/src/Charts/Charts.js +114 -129
- package/dist/src/Charts/Zone.js +11 -14
- package/dist/src/Common/Floor.js +9 -12
- package/dist/src/Common/IDs.js +6 -10
- package/dist/src/Common/LabelAndType.js +5 -8
- package/dist/src/Common/Labels.js +10 -12
- package/dist/src/Dict.js +1 -2
- package/dist/src/EventLog/EventLog.js +21 -27
- package/dist/src/EventLog/EventLogItem.js +7 -8
- package/dist/src/Events/AbstractEventParams.js +17 -19
- package/dist/src/Events/BestAvailableObjects.js +8 -10
- package/dist/src/Events/BestAvailableParams.js +26 -25
- package/dist/src/Events/ChangeObjectStatusResult.js +6 -10
- package/dist/src/Events/Channel.d.ts +11 -0
- package/dist/src/Events/Channel.js +15 -8
- package/dist/src/Events/Channels.d.ts +8 -7
- package/dist/src/Events/Channels.js +35 -36
- package/dist/src/Events/CreateEventParams.d.ts +3 -3
- package/dist/src/Events/CreateEventParams.js +12 -33
- package/dist/src/Events/EditForSaleConfigResult.js +10 -13
- package/dist/src/Events/Event.js +33 -18
- package/dist/src/Events/EventDeserializer.js +8 -15
- package/dist/src/Events/EventObjectInfo.js +58 -18
- package/dist/src/Events/Events.js +178 -310
- package/dist/src/Events/ForSaleConfig.js +9 -10
- package/dist/src/Events/ForSaleConfigParams.js +8 -13
- package/dist/src/Events/ForSaleRateLimitInfo.js +7 -10
- package/dist/src/Events/ObjectProperties.js +13 -14
- package/dist/src/Events/StatusChange.js +16 -8
- package/dist/src/Events/StatusChangeOrigin.js +5 -8
- package/dist/src/Events/StatusChangeRequest.js +45 -52
- package/dist/src/Events/StatusChangesParams.js +23 -26
- package/dist/src/Events/TableBookingConfig.js +13 -16
- package/dist/src/Events/UpdateEventParams.js +9 -31
- package/dist/src/HoldTokens/HoldToken.js +7 -8
- package/dist/src/HoldTokens/HoldTokens.js +16 -21
- package/dist/src/Lister.js +21 -30
- package/dist/src/LocalDate.js +13 -15
- package/dist/src/Page.js +12 -16
- package/dist/src/PageFetcher.js +21 -69
- package/dist/src/Region.js +16 -20
- package/dist/src/Reports/ChartReports.js +39 -47
- package/dist/src/Reports/EventReports.js +102 -117
- package/dist/src/Reports/UsageReports.js +19 -23
- package/dist/src/Seasons/CreateSeasonParams.d.ts +3 -3
- package/dist/src/Seasons/CreateSeasonParams.js +32 -29
- package/dist/src/Seasons/Season.js +11 -31
- package/dist/src/Seasons/Seasons.d.ts +1 -1
- package/dist/src/Seasons/Seasons.js +54 -108
- package/dist/src/Seasons/UpdateSeasonParams.js +6 -29
- package/dist/src/SeatsioClient.js +72 -77
- package/dist/src/TicketBuyers/AddTicketBuyerIdsResponse.js +5 -8
- package/dist/src/TicketBuyers/RemoveTicketBuyerIdsResponse.js +5 -8
- package/dist/src/TicketBuyers/TicketBuyers.js +27 -76
- package/dist/src/Workspaces/Workspace.js +11 -8
- package/dist/src/Workspaces/Workspaces.js +86 -112
- package/dist/src/errorInterceptor.js +2 -5
- package/dist/src/index.js +63 -79
- package/dist/src/utilities/helperFunctions.js +9 -16
- package/dist/src/utilities/reportUtility.js +19 -28
- package/package.json +5 -5
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { AccountSettings } from './AccountSettings';
|
|
2
|
+
export class Account {
|
|
3
|
+
company;
|
|
4
|
+
designerKey;
|
|
5
|
+
email;
|
|
6
|
+
publicKey;
|
|
7
|
+
role;
|
|
8
|
+
secretKey;
|
|
9
|
+
settings;
|
|
10
|
+
constructor(json) {
|
|
7
11
|
this.secretKey = json.secretKey;
|
|
8
12
|
this.designerKey = json.designerKey;
|
|
9
13
|
this.publicKey = json.publicKey;
|
|
10
|
-
this.settings = new
|
|
14
|
+
this.settings = new AccountSettings(json.settings);
|
|
11
15
|
this.company = json.company;
|
|
12
16
|
this.email = json.email;
|
|
13
17
|
this.role = json.role;
|
|
14
18
|
}
|
|
15
|
-
|
|
16
|
-
}());
|
|
17
|
-
exports.Account = Account;
|
|
19
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ChartValidationSettings } from './ChartValidationSettings';
|
|
2
|
+
import { DefaultRendererSettings } from './DefaultRendererSettings';
|
|
3
|
+
export class AccountSettings {
|
|
4
|
+
chartValidation;
|
|
5
|
+
defaultRendererSettings;
|
|
6
|
+
draftChartDrawingsEnabled;
|
|
7
|
+
holdOnSelectForGAs;
|
|
8
|
+
holdPeriodInMinutes;
|
|
9
|
+
constructor(settings) {
|
|
8
10
|
this.draftChartDrawingsEnabled = settings.draftChartDrawingsEnabled;
|
|
9
11
|
this.holdOnSelectForGAs = settings.holdOnSelectForGAs;
|
|
10
12
|
this.holdPeriodInMinutes = settings.holdPeriodInMinutes;
|
|
11
|
-
this.chartValidation = new
|
|
12
|
-
this.defaultRendererSettings = new
|
|
13
|
+
this.chartValidation = new ChartValidationSettings(settings.chartValidation);
|
|
14
|
+
this.defaultRendererSettings = new DefaultRendererSettings(settings.defaultRendererSettings);
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
}());
|
|
16
|
-
exports.AccountSettings = AccountSettings;
|
|
16
|
+
}
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var Accounts = /** @class */ (function () {
|
|
7
|
-
function Accounts(client) {
|
|
1
|
+
import { Account } from './Account';
|
|
2
|
+
const baseUrl = '/accounts/me';
|
|
3
|
+
export class Accounts {
|
|
4
|
+
client;
|
|
5
|
+
constructor(client) {
|
|
8
6
|
this.client = client;
|
|
9
7
|
}
|
|
10
|
-
|
|
11
|
-
return this.client.get(baseUrl).then(
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return this.client.post(baseUrl + '/secret-key/actions/regenerate').then(
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return this.client.post(baseUrl + '/designer-key/actions/regenerate').then(
|
|
18
|
-
}
|
|
19
|
-
|
|
8
|
+
retrieveMyAccount() {
|
|
9
|
+
return this.client.get(baseUrl).then(res => new Account(res.data));
|
|
10
|
+
}
|
|
11
|
+
regenerateSecretKey() {
|
|
12
|
+
return this.client.post(baseUrl + '/secret-key/actions/regenerate').then(res => res.data.secretKey);
|
|
13
|
+
}
|
|
14
|
+
regenerateDesignerKey() {
|
|
15
|
+
return this.client.post(baseUrl + '/designer-key/actions/regenerate').then(res => res.data.designerKey);
|
|
16
|
+
}
|
|
17
|
+
enableDraftChartDrawings() {
|
|
20
18
|
return this.client.post(baseUrl + '/draft-chart-drawings/actions/enable');
|
|
21
|
-
}
|
|
22
|
-
|
|
19
|
+
}
|
|
20
|
+
disableDraftChartDrawings() {
|
|
23
21
|
return this.client.post(baseUrl + '/draft-chart-drawings/actions/disable');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return this.client.post(baseUrl + '/actions/change-password', { password
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return this.client.post(baseUrl + '/actions/change-hold-period', { holdPeriodInMinutes
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return this.client.post(baseUrl + '/settings', { key
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}());
|
|
36
|
-
exports.Accounts = Accounts;
|
|
22
|
+
}
|
|
23
|
+
changePassword(password) {
|
|
24
|
+
return this.client.post(baseUrl + '/actions/change-password', { password });
|
|
25
|
+
}
|
|
26
|
+
changeHoldPeriod(holdPeriodInMinutes) {
|
|
27
|
+
return this.client.post(baseUrl + '/actions/change-hold-period', { holdPeriodInMinutes });
|
|
28
|
+
}
|
|
29
|
+
updateSetting(key, value) {
|
|
30
|
+
return this.client.post(baseUrl + '/settings', { key, value });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class ChartValidationSettings {
|
|
2
|
+
VALIDATE_DUPLICATE_LABELS;
|
|
3
|
+
VALIDATE_EMPTY_FLOOR;
|
|
4
|
+
VALIDATE_FOCAL_POINT;
|
|
5
|
+
VALIDATE_OBJECTS_WITHOUT_CATEGORIES;
|
|
6
|
+
VALIDATE_OBJECT_TYPES_PER_CATEGORY;
|
|
7
|
+
VALIDATE_UNLABELED_OBJECTS;
|
|
8
|
+
constructor(json) {
|
|
6
9
|
this.VALIDATE_DUPLICATE_LABELS = json.VALIDATE_DUPLICATE_LABELS;
|
|
7
10
|
this.VALIDATE_OBJECTS_WITHOUT_CATEGORIES = json.VALIDATE_OBJECTS_WITHOUT_CATEGORIES;
|
|
8
11
|
this.VALIDATE_UNLABELED_OBJECTS = json.VALIDATE_UNLABELED_OBJECTS;
|
|
@@ -10,6 +13,4 @@ var ChartValidationSettings = /** @class */ (function () {
|
|
|
10
13
|
this.VALIDATE_OBJECT_TYPES_PER_CATEGORY = json.VALIDATE_OBJECT_TYPES_PER_CATEGORY;
|
|
11
14
|
this.VALIDATE_EMPTY_FLOOR = json.VALIDATE_EMPTY_FLOOR;
|
|
12
15
|
}
|
|
13
|
-
|
|
14
|
-
}());
|
|
15
|
-
exports.ChartValidationSettings = ChartValidationSettings;
|
|
16
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class DefaultRendererSettings {
|
|
2
|
+
multiSelectEnabled;
|
|
3
|
+
showFullScreenButton;
|
|
4
|
+
companionSeatValidationEnabled;
|
|
5
|
+
constructor(json) {
|
|
6
6
|
this.showFullScreenButton = json.showFullScreenButton;
|
|
7
7
|
this.multiSelectEnabled = json.multiSelectEnabled;
|
|
8
8
|
this.companionSeatValidationEnabled = json.companionSeatValidationEnabled;
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
}());
|
|
12
|
-
exports.DefaultRendererSettings = DefaultRendererSettings;
|
|
10
|
+
}
|
|
@@ -1,54 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
-
if (ar || !(i in from)) {
|
|
41
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
-
ar[i] = from[i];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.AsyncIterator = void 0;
|
|
49
|
-
var AsyncIterator = /** @class */ (function () {
|
|
50
|
-
function AsyncIterator(url, client, pageCreator, params) {
|
|
51
|
-
if (params === void 0) { params = {}; }
|
|
1
|
+
export class AsyncIterator {
|
|
2
|
+
client;
|
|
3
|
+
index;
|
|
4
|
+
items;
|
|
5
|
+
nextPageMustBeFetched;
|
|
6
|
+
nextPageStartsAfter;
|
|
7
|
+
pageCreator;
|
|
8
|
+
pages;
|
|
9
|
+
params;
|
|
10
|
+
url;
|
|
11
|
+
constructor(url, client, pageCreator, params = {}) {
|
|
52
12
|
this.url = url;
|
|
53
13
|
this.client = client;
|
|
54
14
|
this.pageCreator = pageCreator;
|
|
@@ -58,59 +18,41 @@ var AsyncIterator = /** @class */ (function () {
|
|
|
58
18
|
this.index = 0;
|
|
59
19
|
this.nextPageMustBeFetched = true;
|
|
60
20
|
}
|
|
61
|
-
|
|
62
|
-
var _this_1 = this;
|
|
63
|
-
if (fetchParams === void 0) { fetchParams = {}; }
|
|
21
|
+
fetch(fetchParams = {}) {
|
|
64
22
|
return this.client.get(this.url, { params: fetchParams })
|
|
65
|
-
.then(
|
|
23
|
+
.then(res => {
|
|
66
24
|
if (res.data.next_page_starts_after) {
|
|
67
|
-
|
|
68
|
-
|
|
25
|
+
this.nextPageStartsAfter = res.data.next_page_starts_after;
|
|
26
|
+
this.nextPageMustBeFetched = true;
|
|
69
27
|
}
|
|
70
28
|
else {
|
|
71
|
-
|
|
29
|
+
this.nextPageMustBeFetched = false;
|
|
72
30
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
31
|
+
const page = this.pageCreator(res.data);
|
|
32
|
+
this.items = [...this.items, ...page.items];
|
|
33
|
+
this.pages.push(page);
|
|
76
34
|
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
35
|
+
}
|
|
36
|
+
[Symbol.asyncIterator]() {
|
|
37
|
+
const _this = this;
|
|
80
38
|
return {
|
|
81
|
-
next
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (!(_this.nextPageMustBeFetched && !_this.items[_this.index])) return [3 /*break*/, 4];
|
|
93
|
-
_this.params.start_after_id = _this.nextPageStartsAfter;
|
|
94
|
-
return [4 /*yield*/, _this.fetch(_this.params)];
|
|
95
|
-
case 3:
|
|
96
|
-
_a.sent();
|
|
97
|
-
_a.label = 4;
|
|
98
|
-
case 4:
|
|
99
|
-
if (!_this.items[_this.index]) {
|
|
100
|
-
return [2 /*return*/, Promise.resolve({
|
|
101
|
-
done: true
|
|
102
|
-
})];
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
return [2 /*return*/, Promise.resolve({ value: _this.items[_this.index++], done: false })];
|
|
106
|
-
}
|
|
107
|
-
return [2 /*return*/];
|
|
108
|
-
}
|
|
39
|
+
async next() {
|
|
40
|
+
if (_this.nextPageMustBeFetched && _this.items.length === 0) {
|
|
41
|
+
await _this.fetch(_this.params);
|
|
42
|
+
}
|
|
43
|
+
else if (_this.nextPageMustBeFetched && !_this.items[_this.index]) {
|
|
44
|
+
_this.params.start_after_id = _this.nextPageStartsAfter;
|
|
45
|
+
await _this.fetch(_this.params);
|
|
46
|
+
}
|
|
47
|
+
if (!_this.items[_this.index]) {
|
|
48
|
+
return Promise.resolve({
|
|
49
|
+
done: true
|
|
109
50
|
});
|
|
110
|
-
}
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return Promise.resolve({ value: _this.items[_this.index++], done: false });
|
|
54
|
+
}
|
|
111
55
|
}
|
|
112
56
|
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
}());
|
|
116
|
-
exports.AsyncIterator = AsyncIterator;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class Category {
|
|
2
|
+
accessible;
|
|
3
|
+
color;
|
|
4
|
+
key;
|
|
5
|
+
label;
|
|
6
|
+
constructor(key, label, color, accessible) {
|
|
6
7
|
this.key = key;
|
|
7
8
|
this.label = label;
|
|
8
9
|
this.color = color;
|
|
9
10
|
this.accessible = accessible;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
setKey(key) {
|
|
12
13
|
this.key = key;
|
|
13
14
|
return this;
|
|
14
|
-
}
|
|
15
|
-
|
|
15
|
+
}
|
|
16
|
+
setLabel(label) {
|
|
16
17
|
this.label = label;
|
|
17
18
|
return this;
|
|
18
|
-
}
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
setColor(color) {
|
|
20
21
|
this.color = color;
|
|
21
22
|
return this;
|
|
22
|
-
}
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
setAccessible(accessible) {
|
|
24
25
|
this.accessible = accessible;
|
|
25
26
|
return this;
|
|
26
|
-
}
|
|
27
|
-
|
|
27
|
+
}
|
|
28
|
+
static fromJson(json) {
|
|
28
29
|
return new Category(json.key, json.label, json.color, json.accessible);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}());
|
|
32
|
-
exports.Category = Category;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
CategoryUpdateParams.prototype.withLabel = function (label) {
|
|
1
|
+
export class CategoryUpdateParams {
|
|
2
|
+
label;
|
|
3
|
+
color;
|
|
4
|
+
accessible;
|
|
5
|
+
withLabel(label) {
|
|
8
6
|
this.label = label;
|
|
9
7
|
return this;
|
|
10
|
-
}
|
|
11
|
-
|
|
8
|
+
}
|
|
9
|
+
withColor(color) {
|
|
12
10
|
this.color = color;
|
|
13
11
|
return this;
|
|
14
|
-
}
|
|
15
|
-
|
|
12
|
+
}
|
|
13
|
+
withAccessible(accessible) {
|
|
16
14
|
this.accessible = accessible;
|
|
17
15
|
return this;
|
|
18
|
-
}
|
|
19
|
-
|
|
16
|
+
}
|
|
17
|
+
serialize() {
|
|
20
18
|
return {
|
|
21
19
|
label: this.label,
|
|
22
20
|
color: this.color,
|
|
23
21
|
accessible: this.accessible
|
|
24
22
|
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}());
|
|
28
|
-
exports.CategoryUpdateParams = CategoryUpdateParams;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/dist/src/Charts/Chart.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { EventDeserializer } from '../Events/EventDeserializer';
|
|
2
|
+
import { ChartValidation } from './ChartValidation';
|
|
3
|
+
import { Zone } from './Zone';
|
|
4
|
+
export class Chart {
|
|
5
|
+
archived;
|
|
6
|
+
draftVersionThumbnailUrl;
|
|
7
|
+
events;
|
|
8
|
+
id;
|
|
9
|
+
key;
|
|
10
|
+
name;
|
|
11
|
+
publishedVersionThumbnailUrl;
|
|
12
|
+
status;
|
|
13
|
+
tags;
|
|
14
|
+
validation;
|
|
15
|
+
venueType;
|
|
16
|
+
zones;
|
|
17
|
+
constructor(chart) {
|
|
9
18
|
this.name = chart.name;
|
|
10
19
|
this.id = chart.id;
|
|
11
20
|
this.key = chart.key;
|
|
@@ -13,13 +22,11 @@ var Chart = /** @class */ (function () {
|
|
|
13
22
|
this.tags = chart.tags;
|
|
14
23
|
this.publishedVersionThumbnailUrl = chart.publishedVersionThumbnailUrl;
|
|
15
24
|
this.draftVersionThumbnailUrl = chart.draftVersionThumbnailUrl || null;
|
|
16
|
-
this.events = chart.events ? chart.events.map(
|
|
25
|
+
this.events = chart.events ? chart.events.map((event) => new EventDeserializer().fromJson(event)) : [];
|
|
17
26
|
this.archived = chart.archived;
|
|
18
27
|
if (chart.validation)
|
|
19
|
-
this.validation = new
|
|
28
|
+
this.validation = new ChartValidation(chart.validation);
|
|
20
29
|
this.venueType = chart.venueType;
|
|
21
|
-
this.zones = chart.zones ? chart.zones.map(
|
|
30
|
+
this.zones = chart.zones ? chart.zones.map((zone) => Zone.fromJson(zone)) : [];
|
|
22
31
|
}
|
|
23
|
-
|
|
24
|
-
}());
|
|
25
|
-
exports.Chart = Chart;
|
|
32
|
+
}
|
|
@@ -1,55 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
ChartListParams.prototype.withFilter = function (filter) {
|
|
1
|
+
export class ChartListParams {
|
|
2
|
+
eventsLimit;
|
|
3
|
+
filter;
|
|
4
|
+
tag;
|
|
5
|
+
expandEvents = false;
|
|
6
|
+
expandValidation = false;
|
|
7
|
+
expandVenueType = false;
|
|
8
|
+
expandZones = false;
|
|
9
|
+
withFilter(filter) {
|
|
12
10
|
this.filter = filter;
|
|
13
11
|
return this;
|
|
14
|
-
}
|
|
15
|
-
|
|
12
|
+
}
|
|
13
|
+
withTag(tag) {
|
|
16
14
|
this.tag = tag;
|
|
17
15
|
return this;
|
|
18
|
-
}
|
|
19
|
-
|
|
16
|
+
}
|
|
17
|
+
withExpandEvents(expandEvents) {
|
|
20
18
|
this.expandEvents = expandEvents;
|
|
21
19
|
return this;
|
|
22
|
-
}
|
|
23
|
-
|
|
20
|
+
}
|
|
21
|
+
withEventsLimit(eventsLimit) {
|
|
24
22
|
this.eventsLimit = eventsLimit;
|
|
25
23
|
return this;
|
|
26
|
-
}
|
|
24
|
+
}
|
|
27
25
|
// @deprecated use withExpandValidation instead
|
|
28
|
-
|
|
26
|
+
withValidation(validation) {
|
|
29
27
|
return this.withExpandValidation(validation);
|
|
30
|
-
}
|
|
31
|
-
|
|
28
|
+
}
|
|
29
|
+
withExpandValidation(expandValidation) {
|
|
32
30
|
this.expandValidation = expandValidation;
|
|
33
31
|
return this;
|
|
34
|
-
}
|
|
35
|
-
|
|
32
|
+
}
|
|
33
|
+
withExpandVenueType(expandVenueType) {
|
|
36
34
|
this.expandVenueType = expandVenueType;
|
|
37
35
|
return this;
|
|
38
|
-
}
|
|
39
|
-
|
|
36
|
+
}
|
|
37
|
+
withExpandZones(expandZones) {
|
|
40
38
|
this.expandZones = expandZones;
|
|
41
39
|
return this;
|
|
42
|
-
}
|
|
43
|
-
|
|
40
|
+
}
|
|
41
|
+
serialize() {
|
|
44
42
|
return {
|
|
45
43
|
tag: this.tag,
|
|
46
44
|
expand: this.expandParams(),
|
|
47
45
|
filter: this.filter,
|
|
48
46
|
eventsLimit: this.eventsLimit
|
|
49
47
|
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
}
|
|
49
|
+
expandParams() {
|
|
50
|
+
const expandParams = [];
|
|
53
51
|
if (this.expandEvents) {
|
|
54
52
|
expandParams.push('events');
|
|
55
53
|
}
|
|
@@ -63,7 +61,5 @@ var ChartListParams = /** @class */ (function () {
|
|
|
63
61
|
expandParams.push('zones');
|
|
64
62
|
}
|
|
65
63
|
return expandParams;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
}());
|
|
69
|
-
exports.ChartListParams = ChartListParams;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -1,14 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { HelperFunctions } from '../utilities/helperFunctions';
|
|
2
|
+
import { IDs } from '../Common/IDs';
|
|
3
|
+
import { Floor } from '../Common/Floor';
|
|
4
|
+
export class ChartObjectInfo {
|
|
5
|
+
bookAsAWhole;
|
|
6
|
+
capacity;
|
|
7
|
+
categoryKey;
|
|
8
|
+
categoryLabel;
|
|
9
|
+
distanceToFocalPoint;
|
|
10
|
+
entrance;
|
|
11
|
+
ids;
|
|
12
|
+
label;
|
|
13
|
+
labels;
|
|
14
|
+
leftNeighbour;
|
|
15
|
+
numSeats;
|
|
16
|
+
objectType;
|
|
17
|
+
rightNeighbour;
|
|
18
|
+
section;
|
|
19
|
+
isAccessible;
|
|
20
|
+
isCompanionSeat;
|
|
21
|
+
hasLiftUpArmrests;
|
|
22
|
+
isHearingImpaired;
|
|
23
|
+
isSemiAmbulatorySeat;
|
|
24
|
+
hasSignLanguageInterpretation;
|
|
25
|
+
isPlusSize;
|
|
26
|
+
hasRestrictedView;
|
|
27
|
+
zone;
|
|
28
|
+
floor;
|
|
29
|
+
constructor(json) {
|
|
9
30
|
this.label = json.label;
|
|
10
|
-
this.labels =
|
|
11
|
-
this.ids = new
|
|
31
|
+
this.labels = HelperFunctions.labelCreator(json);
|
|
32
|
+
this.ids = new IDs(json.ids.own, json.ids.parent, json.ids.section);
|
|
12
33
|
this.categoryLabel = json.categoryLabel;
|
|
13
34
|
this.categoryKey = json.categoryKey;
|
|
14
35
|
this.entrance = json.entrance;
|
|
@@ -29,8 +50,6 @@ var ChartObjectInfo = /** @class */ (function () {
|
|
|
29
50
|
this.isPlusSize = json.isPlusSize;
|
|
30
51
|
this.hasRestrictedView = json.hasRestrictedView;
|
|
31
52
|
this.zone = json.zone;
|
|
32
|
-
this.floor = json.floor ? new
|
|
53
|
+
this.floor = json.floor ? new Floor(json.floor.name, json.floor.displayName) : undefined;
|
|
33
54
|
}
|
|
34
|
-
|
|
35
|
-
}());
|
|
36
|
-
exports.ChartObjectInfo = ChartObjectInfo;
|
|
55
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function ChartValidation(json) {
|
|
1
|
+
export class ChartValidation {
|
|
2
|
+
errors;
|
|
3
|
+
warnings;
|
|
4
|
+
constructor(json) {
|
|
6
5
|
this.errors = json.errors;
|
|
7
6
|
this.warnings = json.warnings;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
}());
|
|
11
|
-
exports.ChartValidation = ChartValidation;
|
|
8
|
+
}
|