seatsio 87.7.0 → 87.8.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.
Files changed (71) hide show
  1. package/dist/src/Accounts/Account.js +12 -10
  2. package/dist/src/Accounts/AccountSettings.js +12 -12
  3. package/dist/src/Accounts/Accounts.js +28 -32
  4. package/dist/src/Accounts/ChartValidationSettings.js +9 -8
  5. package/dist/src/Accounts/DefaultRendererSettings.js +6 -8
  6. package/dist/src/AsyncIterator.js +39 -97
  7. package/dist/src/Charts/Category.js +17 -18
  8. package/dist/src/Charts/CategoryUpdateParams.js +13 -17
  9. package/dist/src/Charts/Chart.js +21 -14
  10. package/dist/src/Charts/ChartListParams.js +30 -34
  11. package/dist/src/Charts/ChartObjectInfo.js +33 -14
  12. package/dist/src/Charts/ChartValidation.js +5 -8
  13. package/dist/src/Charts/Charts.js +114 -129
  14. package/dist/src/Charts/Zone.js +11 -14
  15. package/dist/src/Common/Floor.js +9 -12
  16. package/dist/src/Common/IDs.js +6 -10
  17. package/dist/src/Common/LabelAndType.js +5 -8
  18. package/dist/src/Common/Labels.js +10 -12
  19. package/dist/src/Dict.js +1 -2
  20. package/dist/src/EventLog/EventLog.js +21 -27
  21. package/dist/src/EventLog/EventLogItem.js +7 -8
  22. package/dist/src/Events/AbstractEventParams.js +17 -19
  23. package/dist/src/Events/BestAvailableObjects.js +8 -10
  24. package/dist/src/Events/BestAvailableParams.js +26 -25
  25. package/dist/src/Events/ChangeObjectStatusResult.js +6 -10
  26. package/dist/src/Events/Channel.d.ts +9 -0
  27. package/dist/src/Events/Channel.js +10 -8
  28. package/dist/src/Events/Channels.d.ts +7 -6
  29. package/dist/src/Events/Channels.js +35 -36
  30. package/dist/src/Events/CreateEventParams.js +12 -33
  31. package/dist/src/Events/EditForSaleConfigResult.js +10 -13
  32. package/dist/src/Events/Event.js +33 -18
  33. package/dist/src/Events/EventDeserializer.js +8 -15
  34. package/dist/src/Events/EventObjectInfo.js +58 -18
  35. package/dist/src/Events/Events.js +178 -310
  36. package/dist/src/Events/ForSaleConfig.js +9 -10
  37. package/dist/src/Events/ForSaleConfigParams.js +8 -13
  38. package/dist/src/Events/ForSaleRateLimitInfo.js +7 -10
  39. package/dist/src/Events/ObjectProperties.js +13 -14
  40. package/dist/src/Events/StatusChange.js +16 -8
  41. package/dist/src/Events/StatusChangeOrigin.js +5 -8
  42. package/dist/src/Events/StatusChangeRequest.js +45 -52
  43. package/dist/src/Events/StatusChangesParams.js +23 -26
  44. package/dist/src/Events/TableBookingConfig.js +13 -16
  45. package/dist/src/Events/UpdateEventParams.js +9 -31
  46. package/dist/src/HoldTokens/HoldToken.js +7 -8
  47. package/dist/src/HoldTokens/HoldTokens.js +16 -21
  48. package/dist/src/Lister.js +21 -30
  49. package/dist/src/LocalDate.js +13 -15
  50. package/dist/src/Page.js +12 -16
  51. package/dist/src/PageFetcher.js +21 -69
  52. package/dist/src/Region.js +16 -20
  53. package/dist/src/Reports/ChartReports.js +39 -47
  54. package/dist/src/Reports/EventReports.js +102 -117
  55. package/dist/src/Reports/UsageReports.js +19 -23
  56. package/dist/src/Seasons/CreateSeasonParams.js +32 -29
  57. package/dist/src/Seasons/Season.js +11 -31
  58. package/dist/src/Seasons/Seasons.d.ts +1 -1
  59. package/dist/src/Seasons/Seasons.js +54 -108
  60. package/dist/src/Seasons/UpdateSeasonParams.js +6 -29
  61. package/dist/src/SeatsioClient.js +72 -77
  62. package/dist/src/TicketBuyers/AddTicketBuyerIdsResponse.js +5 -8
  63. package/dist/src/TicketBuyers/RemoveTicketBuyerIdsResponse.js +5 -8
  64. package/dist/src/TicketBuyers/TicketBuyers.js +27 -76
  65. package/dist/src/Workspaces/Workspace.js +11 -8
  66. package/dist/src/Workspaces/Workspaces.js +86 -112
  67. package/dist/src/errorInterceptor.js +2 -5
  68. package/dist/src/index.js +63 -79
  69. package/dist/src/utilities/helperFunctions.js +9 -16
  70. package/dist/src/utilities/reportUtility.js +19 -28
  71. package/package.json +5 -5
@@ -1,17 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Account = void 0;
4
- var AccountSettings_1 = require("./AccountSettings");
5
- var Account = /** @class */ (function () {
6
- function Account(json) {
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 AccountSettings_1.AccountSettings(json.settings);
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
- return Account;
16
- }());
17
- exports.Account = Account;
19
+ }
@@ -1,16 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountSettings = void 0;
4
- var ChartValidationSettings_1 = require("./ChartValidationSettings");
5
- var DefaultRendererSettings_1 = require("./DefaultRendererSettings");
6
- var AccountSettings = /** @class */ (function () {
7
- function AccountSettings(settings) {
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 ChartValidationSettings_1.ChartValidationSettings(settings.chartValidation);
12
- this.defaultRendererSettings = new DefaultRendererSettings_1.DefaultRendererSettings(settings.defaultRendererSettings);
13
+ this.chartValidation = new ChartValidationSettings(settings.chartValidation);
14
+ this.defaultRendererSettings = new DefaultRendererSettings(settings.defaultRendererSettings);
13
15
  }
14
- return AccountSettings;
15
- }());
16
- exports.AccountSettings = AccountSettings;
16
+ }
@@ -1,36 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Accounts = void 0;
4
- var Account_1 = require("./Account");
5
- var baseUrl = '/accounts/me';
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
- Accounts.prototype.retrieveMyAccount = function () {
11
- return this.client.get(baseUrl).then(function (res) { return new Account_1.Account(res.data); });
12
- };
13
- Accounts.prototype.regenerateSecretKey = function () {
14
- return this.client.post(baseUrl + '/secret-key/actions/regenerate').then(function (res) { return res.data.secretKey; });
15
- };
16
- Accounts.prototype.regenerateDesignerKey = function () {
17
- return this.client.post(baseUrl + '/designer-key/actions/regenerate').then(function (res) { return res.data.designerKey; });
18
- };
19
- Accounts.prototype.enableDraftChartDrawings = function () {
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
- Accounts.prototype.disableDraftChartDrawings = function () {
19
+ }
20
+ disableDraftChartDrawings() {
23
21
  return this.client.post(baseUrl + '/draft-chart-drawings/actions/disable');
24
- };
25
- Accounts.prototype.changePassword = function (password) {
26
- return this.client.post(baseUrl + '/actions/change-password', { password: password });
27
- };
28
- Accounts.prototype.changeHoldPeriod = function (holdPeriodInMinutes) {
29
- return this.client.post(baseUrl + '/actions/change-hold-period', { holdPeriodInMinutes: holdPeriodInMinutes });
30
- };
31
- Accounts.prototype.updateSetting = function (key, value) {
32
- return this.client.post(baseUrl + '/settings', { key: key, value: value });
33
- };
34
- return Accounts;
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
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartValidationSettings = void 0;
4
- var ChartValidationSettings = /** @class */ (function () {
5
- function ChartValidationSettings(json) {
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
- return ChartValidationSettings;
14
- }());
15
- exports.ChartValidationSettings = ChartValidationSettings;
16
+ }
@@ -1,12 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultRendererSettings = void 0;
4
- var DefaultRendererSettings = /** @class */ (function () {
5
- function DefaultRendererSettings(json) {
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
- return DefaultRendererSettings;
11
- }());
12
- exports.DefaultRendererSettings = DefaultRendererSettings;
10
+ }
@@ -1,54 +1,14 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
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
- AsyncIterator.prototype.fetch = function (fetchParams) {
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(function (res) {
23
+ .then(res => {
66
24
  if (res.data.next_page_starts_after) {
67
- _this_1.nextPageStartsAfter = res.data.next_page_starts_after;
68
- _this_1.nextPageMustBeFetched = true;
25
+ this.nextPageStartsAfter = res.data.next_page_starts_after;
26
+ this.nextPageMustBeFetched = true;
69
27
  }
70
28
  else {
71
- _this_1.nextPageMustBeFetched = false;
29
+ this.nextPageMustBeFetched = false;
72
30
  }
73
- var page = _this_1.pageCreator(res.data);
74
- _this_1.items = __spreadArray(__spreadArray([], _this_1.items, true), page.items, true);
75
- _this_1.pages.push(page);
31
+ const page = this.pageCreator(res.data);
32
+ this.items = [...this.items, ...page.items];
33
+ this.pages.push(page);
76
34
  });
77
- };
78
- AsyncIterator.prototype[Symbol.asyncIterator] = function () {
79
- var _this = this;
35
+ }
36
+ [Symbol.asyncIterator]() {
37
+ const _this = this;
80
38
  return {
81
- next: function () {
82
- return __awaiter(this, void 0, void 0, function () {
83
- return __generator(this, function (_a) {
84
- switch (_a.label) {
85
- case 0:
86
- if (!(_this.nextPageMustBeFetched && _this.items.length === 0)) return [3 /*break*/, 2];
87
- return [4 /*yield*/, _this.fetch(_this.params)];
88
- case 1:
89
- _a.sent();
90
- return [3 /*break*/, 4];
91
- case 2:
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
- return AsyncIterator;
115
- }());
116
- exports.AsyncIterator = AsyncIterator;
57
+ }
58
+ }
@@ -1,32 +1,31 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Category = void 0;
4
- var Category = /** @class */ (function () {
5
- function Category(key, label, color, accessible) {
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
- Category.prototype.setKey = function (key) {
12
+ setKey(key) {
12
13
  this.key = key;
13
14
  return this;
14
- };
15
- Category.prototype.setLabel = function (label) {
15
+ }
16
+ setLabel(label) {
16
17
  this.label = label;
17
18
  return this;
18
- };
19
- Category.prototype.setColor = function (color) {
19
+ }
20
+ setColor(color) {
20
21
  this.color = color;
21
22
  return this;
22
- };
23
- Category.prototype.setAccessible = function (accessible) {
23
+ }
24
+ setAccessible(accessible) {
24
25
  this.accessible = accessible;
25
26
  return this;
26
- };
27
- Category.fromJson = function (json) {
27
+ }
28
+ static fromJson(json) {
28
29
  return new Category(json.key, json.label, json.color, json.accessible);
29
- };
30
- return Category;
31
- }());
32
- exports.Category = Category;
30
+ }
31
+ }
@@ -1,28 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CategoryUpdateParams = void 0;
4
- var CategoryUpdateParams = /** @class */ (function () {
5
- function CategoryUpdateParams() {
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
- CategoryUpdateParams.prototype.withColor = function (color) {
8
+ }
9
+ withColor(color) {
12
10
  this.color = color;
13
11
  return this;
14
- };
15
- CategoryUpdateParams.prototype.withAccessible = function (accessible) {
12
+ }
13
+ withAccessible(accessible) {
16
14
  this.accessible = accessible;
17
15
  return this;
18
- };
19
- CategoryUpdateParams.prototype.serialize = function () {
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
- return CategoryUpdateParams;
27
- }());
28
- exports.CategoryUpdateParams = CategoryUpdateParams;
23
+ }
24
+ }
@@ -1,11 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Chart = void 0;
4
- var EventDeserializer_1 = require("../Events/EventDeserializer");
5
- var ChartValidation_1 = require("./ChartValidation");
6
- var Zone_1 = require("./Zone");
7
- var Chart = /** @class */ (function () {
8
- function Chart(chart) {
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(function (event) { return new EventDeserializer_1.EventDeserializer().fromJson(event); }) : [];
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 ChartValidation_1.ChartValidation(chart.validation);
28
+ this.validation = new ChartValidation(chart.validation);
20
29
  this.venueType = chart.venueType;
21
- this.zones = chart.zones ? chart.zones.map(function (zone) { return Zone_1.Zone.fromJson(zone); }) : [];
30
+ this.zones = chart.zones ? chart.zones.map((zone) => Zone.fromJson(zone)) : [];
22
31
  }
23
- return Chart;
24
- }());
25
- exports.Chart = Chart;
32
+ }
@@ -1,55 +1,53 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartListParams = void 0;
4
- var ChartListParams = /** @class */ (function () {
5
- function ChartListParams() {
6
- this.expandEvents = false;
7
- this.expandValidation = false;
8
- this.expandVenueType = false;
9
- this.expandZones = false;
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
- ChartListParams.prototype.withTag = function (tag) {
12
+ }
13
+ withTag(tag) {
16
14
  this.tag = tag;
17
15
  return this;
18
- };
19
- ChartListParams.prototype.withExpandEvents = function (expandEvents) {
16
+ }
17
+ withExpandEvents(expandEvents) {
20
18
  this.expandEvents = expandEvents;
21
19
  return this;
22
- };
23
- ChartListParams.prototype.withEventsLimit = function (eventsLimit) {
20
+ }
21
+ withEventsLimit(eventsLimit) {
24
22
  this.eventsLimit = eventsLimit;
25
23
  return this;
26
- };
24
+ }
27
25
  // @deprecated use withExpandValidation instead
28
- ChartListParams.prototype.withValidation = function (validation) {
26
+ withValidation(validation) {
29
27
  return this.withExpandValidation(validation);
30
- };
31
- ChartListParams.prototype.withExpandValidation = function (expandValidation) {
28
+ }
29
+ withExpandValidation(expandValidation) {
32
30
  this.expandValidation = expandValidation;
33
31
  return this;
34
- };
35
- ChartListParams.prototype.withExpandVenueType = function (expandVenueType) {
32
+ }
33
+ withExpandVenueType(expandVenueType) {
36
34
  this.expandVenueType = expandVenueType;
37
35
  return this;
38
- };
39
- ChartListParams.prototype.withExpandZones = function (expandZones) {
36
+ }
37
+ withExpandZones(expandZones) {
40
38
  this.expandZones = expandZones;
41
39
  return this;
42
- };
43
- ChartListParams.prototype.serialize = function () {
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
- ChartListParams.prototype.expandParams = function () {
52
- var expandParams = [];
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
- return ChartListParams;
68
- }());
69
- exports.ChartListParams = ChartListParams;
64
+ }
65
+ }
@@ -1,14 +1,35 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartObjectInfo = void 0;
4
- var helperFunctions_1 = require("../utilities/helperFunctions");
5
- var IDs_1 = require("../Common/IDs");
6
- var Floor_1 = require("../Common/Floor");
7
- var ChartObjectInfo = /** @class */ (function () {
8
- function ChartObjectInfo(json) {
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 = helperFunctions_1.HelperFunctions.labelCreator(json);
11
- this.ids = new IDs_1.IDs(json.ids.own, json.ids.parent, json.ids.section);
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 Floor_1.Floor(json.floor.name, json.floor.displayName) : undefined;
53
+ this.floor = json.floor ? new Floor(json.floor.name, json.floor.displayName) : undefined;
33
54
  }
34
- return ChartObjectInfo;
35
- }());
36
- exports.ChartObjectInfo = ChartObjectInfo;
55
+ }
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChartValidation = void 0;
4
- var ChartValidation = /** @class */ (function () {
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
- return ChartValidation;
10
- }());
11
- exports.ChartValidation = ChartValidation;
8
+ }