seatsio 74.0.0 → 75.1.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.d.ts +10 -0
- package/dist/src/Accounts/Account.js +17 -0
- package/dist/src/Accounts/AccountSettings.d.ts +8 -0
- package/dist/src/Accounts/AccountSettings.js +16 -0
- package/dist/src/Accounts/Accounts.d.ts +12 -0
- package/dist/src/Accounts/Accounts.js +36 -0
- package/dist/src/Accounts/ChartValidationSettings.d.ts +9 -0
- package/dist/src/Accounts/ChartValidationSettings.js +15 -0
- package/dist/src/Accounts/DefaultRendererSettings.d.ts +5 -0
- package/dist/src/Accounts/DefaultRendererSettings.js +11 -0
- package/dist/src/AsyncIterator.d.ts +25 -0
- package/dist/src/AsyncIterator.js +207 -0
- package/dist/src/Charts/Category.d.ts +12 -0
- package/dist/src/Charts/Category.js +33 -0
- package/dist/src/Charts/Chart.d.ts +15 -0
- package/dist/src/Charts/Chart.js +35 -0
- package/dist/src/Charts/ChartListParams.d.ts +20 -0
- package/dist/src/Charts/ChartListParams.js +52 -0
- package/dist/src/Charts/ChartObjectInfo.d.ts +17 -0
- package/dist/src/Charts/ChartObjectInfo.js +25 -0
- package/dist/src/Charts/ChartValidation.d.ts +5 -0
- package/dist/src/Charts/ChartValidation.js +11 -0
- package/dist/src/Charts/Charts.d.ts +36 -0
- package/dist/src/Charts/Charts.js +161 -0
- package/dist/src/Charts/SocialDistancingRuleset.d.ts +42 -0
- package/dist/src/Charts/SocialDistancingRuleset.js +151 -0
- package/dist/src/Common/IDs.d.ts +6 -0
- package/dist/src/Common/IDs.js +14 -0
- package/dist/src/Common/Labels.d.ts +13 -0
- package/dist/src/Common/Labels.js +26 -0
- package/dist/src/Events/BestAvailableObjects.d.ts +6 -0
- package/dist/src/Events/BestAvailableObjects.js +13 -0
- package/dist/src/Events/ChangeObjectStatusResult.d.ts +4 -0
- package/dist/src/Events/ChangeObjectStatusResult.js +11 -0
- package/dist/src/Events/Channel.d.ts +8 -0
- package/dist/src/Events/Channel.js +14 -0
- package/dist/src/Events/Channels.d.ts +11 -0
- package/dist/src/Events/Channels.js +45 -0
- package/dist/src/Events/Event.d.ts +20 -0
- package/dist/src/Events/Event.js +31 -0
- package/dist/src/Events/EventDeserializer.d.ts +4 -0
- package/dist/src/Events/EventDeserializer.js +17 -0
- package/dist/src/Events/EventObjectInfo.d.ts +38 -0
- package/dist/src/Events/EventObjectInfo.js +45 -0
- package/dist/src/Events/Events.d.ts +36 -0
- package/dist/src/Events/Events.js +497 -0
- package/dist/src/Events/ForSaleConfig.d.ts +7 -0
- package/dist/src/Events/ForSaleConfig.js +13 -0
- package/dist/src/Events/ObjectProperties.d.ts +10 -0
- package/dist/src/Events/ObjectProperties.js +22 -0
- package/dist/src/Events/StatusChange.d.ts +16 -0
- package/dist/src/Events/StatusChange.js +22 -0
- package/dist/src/Events/StatusChangeRequest.d.ts +13 -0
- package/dist/src/Events/StatusChangeRequest.js +19 -0
- package/dist/src/Events/StatusChangesParams.d.ts +18 -0
- package/dist/src/Events/StatusChangesParams.js +58 -0
- package/dist/src/Events/TableBookingConfig.d.ts +9 -0
- package/dist/src/Events/TableBookingConfig.js +26 -0
- package/dist/src/HoldTokens/HoldToken.d.ts +7 -0
- package/dist/src/HoldTokens/HoldToken.js +13 -0
- package/dist/src/HoldTokens/HoldTokens.d.ts +7 -0
- package/dist/src/HoldTokens/HoldTokens.js +29 -0
- package/dist/src/Invitations/Invitation.d.ts +7 -0
- package/dist/src/Invitations/Invitation.js +13 -0
- package/dist/src/Invitations/Invitations.d.ts +5 -0
- package/dist/src/Invitations/Invitations.js +15 -0
- package/dist/src/Lister.d.ts +12 -0
- package/dist/src/Lister.js +39 -0
- package/dist/src/Page.d.ts +15 -0
- package/dist/src/Page.js +30 -0
- package/dist/src/PageFetcher.d.ts +9 -0
- package/dist/src/PageFetcher.js +80 -0
- package/dist/src/Region.d.ts +9 -0
- package/dist/src/Region.js +25 -0
- package/dist/src/Reports/ChartReports.d.ts +15 -0
- package/dist/src/Reports/ChartReports.js +55 -0
- package/dist/src/Reports/EventReports.d.ts +33 -0
- package/dist/src/Reports/EventReports.js +137 -0
- package/dist/src/Reports/UsageReports.d.ts +9 -0
- package/dist/src/Reports/UsageReports.js +30 -0
- package/dist/src/Seasons/Season.d.ts +7 -0
- package/dist/src/Seasons/Season.js +33 -0
- package/dist/src/Seasons/SeasonParams.d.ts +12 -0
- package/dist/src/Seasons/SeasonParams.js +29 -0
- package/dist/src/Seasons/Seasons.d.ts +11 -0
- package/dist/src/Seasons/Seasons.js +130 -0
- package/dist/src/SeatsioClient.d.ts +31 -0
- package/dist/src/SeatsioClient.js +115 -0
- package/dist/src/Subaccounts/Subaccount.d.ts +9 -0
- package/dist/src/Subaccounts/Subaccount.js +15 -0
- package/dist/src/Subaccounts/Subaccounts.d.ts +21 -0
- package/dist/src/Subaccounts/Subaccounts.js +93 -0
- package/dist/src/Users/User.d.ts +13 -0
- package/dist/src/Users/User.js +19 -0
- package/dist/src/Users/Users.d.ts +14 -0
- package/dist/src/Users/Users.js +58 -0
- package/dist/src/Workspaces/Workspace.d.ts +11 -0
- package/dist/src/Workspaces/Workspace.js +17 -0
- package/dist/src/Workspaces/Workspaces.d.ts +27 -0
- package/dist/src/Workspaces/Workspaces.js +127 -0
- package/dist/src/errorInterceptor.d.ts +1 -0
- package/dist/src/errorInterceptor.js +19 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.js +17 -0
- package/dist/src/utilities/helperFunctions.d.ts +4 -0
- package/dist/src/utilities/helperFunctions.js +23 -0
- package/dist/src/utilities/reportUtility.d.ts +5 -0
- package/dist/src/utilities/reportUtility.js +37 -0
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
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(account) {
|
|
7
|
+
this.secretKey = account.secretKey;
|
|
8
|
+
this.designerKey = account.designerKey;
|
|
9
|
+
this.publicKey = account.publicKey;
|
|
10
|
+
this.settings = new AccountSettings_1.AccountSettings(account.settings);
|
|
11
|
+
this.company = account.company;
|
|
12
|
+
this.email = account.email;
|
|
13
|
+
this.role = account.role;
|
|
14
|
+
}
|
|
15
|
+
return Account;
|
|
16
|
+
}());
|
|
17
|
+
exports.Account = Account;
|
|
@@ -0,0 +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) {
|
|
8
|
+
this.draftChartDrawingsEnabled = settings.draftChartDrawingsEnabled;
|
|
9
|
+
this.holdOnSelectForGAs = settings.holdOnSelectForGAs;
|
|
10
|
+
this.holdPeriodInMinutes = settings.holdPeriodInMinutes;
|
|
11
|
+
this.chartValidation = new ChartValidationSettings_1.ChartValidationSettings(settings.chartValidation);
|
|
12
|
+
this.defaultRendererSettings = new DefaultRendererSettings_1.DefaultRendererSettings(settings.defaultRendererSettings);
|
|
13
|
+
}
|
|
14
|
+
return AccountSettings;
|
|
15
|
+
}());
|
|
16
|
+
exports.AccountSettings = AccountSettings;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Accounts {
|
|
2
|
+
private client;
|
|
3
|
+
constructor(client: any);
|
|
4
|
+
retrieveMyAccount(): any;
|
|
5
|
+
regenerateSecretKey(): any;
|
|
6
|
+
regenerateDesignerKey(): any;
|
|
7
|
+
enableDraftChartDrawings(): any;
|
|
8
|
+
disableDraftChartDrawings(): any;
|
|
9
|
+
changePassword(password: any): any;
|
|
10
|
+
changeHoldPeriod(holdPeriodInMinutes: any): any;
|
|
11
|
+
updateSetting(key: any, value: any): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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) {
|
|
8
|
+
this.client = client;
|
|
9
|
+
}
|
|
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 () {
|
|
20
|
+
return this.client.post(baseUrl + '/draft-chart-drawings/actions/enable');
|
|
21
|
+
};
|
|
22
|
+
Accounts.prototype.disableDraftChartDrawings = function () {
|
|
23
|
+
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class ChartValidationSettings {
|
|
2
|
+
VALIDATE_DUPLICATE_LABELS: any;
|
|
3
|
+
VALIDATE_EMPTY_FLOOR: any;
|
|
4
|
+
VALIDATE_FOCAL_POINT: any;
|
|
5
|
+
VALIDATE_OBJECTS_WITHOUT_CATEGORIES: any;
|
|
6
|
+
VALIDATE_OBJECT_TYPES_PER_CATEGORY: any;
|
|
7
|
+
VALIDATE_UNLABELED_OBJECTS: any;
|
|
8
|
+
constructor(chartValidations: any);
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartValidationSettings = void 0;
|
|
4
|
+
var ChartValidationSettings = /** @class */ (function () {
|
|
5
|
+
function ChartValidationSettings(chartValidations) {
|
|
6
|
+
this.VALIDATE_DUPLICATE_LABELS = chartValidations.VALIDATE_DUPLICATE_LABELS;
|
|
7
|
+
this.VALIDATE_OBJECTS_WITHOUT_CATEGORIES = chartValidations.VALIDATE_OBJECTS_WITHOUT_CATEGORIES;
|
|
8
|
+
this.VALIDATE_UNLABELED_OBJECTS = chartValidations.VALIDATE_UNLABELED_OBJECTS;
|
|
9
|
+
this.VALIDATE_FOCAL_POINT = chartValidations.VALIDATE_FOCAL_POINT;
|
|
10
|
+
this.VALIDATE_OBJECT_TYPES_PER_CATEGORY = chartValidations.VALIDATE_OBJECT_TYPES_PER_CATEGORY;
|
|
11
|
+
this.VALIDATE_EMPTY_FLOOR = chartValidations.VALIDATE_EMPTY_FLOOR;
|
|
12
|
+
}
|
|
13
|
+
return ChartValidationSettings;
|
|
14
|
+
}());
|
|
15
|
+
exports.ChartValidationSettings = ChartValidationSettings;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DefaultRendererSettings = void 0;
|
|
4
|
+
var DefaultRendererSettings = /** @class */ (function () {
|
|
5
|
+
function DefaultRendererSettings(defaultRendererSettings) {
|
|
6
|
+
this.showFullScreenButton = defaultRendererSettings.showFullScreenButton;
|
|
7
|
+
this.multiSelectEnabled = defaultRendererSettings.multiSelectEnabled;
|
|
8
|
+
}
|
|
9
|
+
return DefaultRendererSettings;
|
|
10
|
+
}());
|
|
11
|
+
exports.DefaultRendererSettings = DefaultRendererSettings;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare class AsyncIterator {
|
|
2
|
+
client: any;
|
|
3
|
+
index: any;
|
|
4
|
+
items: any;
|
|
5
|
+
nextPageMustBeFetched: any;
|
|
6
|
+
nextPageStartsAfter: any;
|
|
7
|
+
objType: any;
|
|
8
|
+
pages: any;
|
|
9
|
+
params: any;
|
|
10
|
+
url: any;
|
|
11
|
+
constructor(url: any, client: any, objType: any, params?: {});
|
|
12
|
+
charts(data: any): void;
|
|
13
|
+
events(data: any): void;
|
|
14
|
+
seasons(data: any): void;
|
|
15
|
+
statusChanges(data: any): void;
|
|
16
|
+
subaccounts(data: any): void;
|
|
17
|
+
workspaces(data: any): void;
|
|
18
|
+
users(data: any): void;
|
|
19
|
+
fetch(fetchParams?: {}): any;
|
|
20
|
+
[Symbol.asyncIterator](): {
|
|
21
|
+
next(): Promise<{
|
|
22
|
+
done: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
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;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.AsyncIterator = void 0;
|
|
40
|
+
var Season_1 = require("./Seasons/Season");
|
|
41
|
+
var Chart_1 = require("./Charts/Chart");
|
|
42
|
+
var Page_1 = require("./Page");
|
|
43
|
+
var EventDeserializer_1 = require("./Events/EventDeserializer");
|
|
44
|
+
var StatusChange_1 = require("./Events/StatusChange");
|
|
45
|
+
var Subaccount_1 = require("./Subaccounts/Subaccount");
|
|
46
|
+
var Workspace_1 = require("./Workspaces/Workspace");
|
|
47
|
+
var User_1 = require("./Users/User");
|
|
48
|
+
var AsyncIterator = /** @class */ (function () {
|
|
49
|
+
function AsyncIterator(url, client, objType, params) {
|
|
50
|
+
if (params === void 0) { params = {}; }
|
|
51
|
+
this.url = url;
|
|
52
|
+
this.client = client;
|
|
53
|
+
this.objType = objType;
|
|
54
|
+
this.params = params;
|
|
55
|
+
this.items = [];
|
|
56
|
+
this.pages = [];
|
|
57
|
+
this.index = 0;
|
|
58
|
+
this.nextPageMustBeFetched = true;
|
|
59
|
+
}
|
|
60
|
+
AsyncIterator.prototype.charts = function (data) {
|
|
61
|
+
var _this_1 = this;
|
|
62
|
+
var charts = [];
|
|
63
|
+
data.items.forEach(function (chartData) {
|
|
64
|
+
var chart = new Chart_1.Chart(chartData);
|
|
65
|
+
_this_1.items.push(chart);
|
|
66
|
+
charts.push(chart);
|
|
67
|
+
});
|
|
68
|
+
this.pages.push(new Page_1.Page(charts, data.next_page_starts_after, data.previous_page_ends_before));
|
|
69
|
+
};
|
|
70
|
+
AsyncIterator.prototype.events = function (data) {
|
|
71
|
+
var _this_1 = this;
|
|
72
|
+
var events = [];
|
|
73
|
+
data.items.forEach(function (eventData) {
|
|
74
|
+
var event = new EventDeserializer_1.EventDeserializer().fromJson(eventData);
|
|
75
|
+
_this_1.items.push(event);
|
|
76
|
+
events.push(event);
|
|
77
|
+
});
|
|
78
|
+
this.pages.push(new Page_1.Page(events, data.next_page_starts_after, data.previous_page_ends_before));
|
|
79
|
+
};
|
|
80
|
+
AsyncIterator.prototype.seasons = function (data) {
|
|
81
|
+
var _this_1 = this;
|
|
82
|
+
var seasons = [];
|
|
83
|
+
data.items.forEach(function (seasonData) {
|
|
84
|
+
var season = new Season_1.Season(seasonData);
|
|
85
|
+
_this_1.items.push(season);
|
|
86
|
+
seasons.push(season);
|
|
87
|
+
});
|
|
88
|
+
this.pages.push(new Page_1.Page(seasons, data.next_page_starts_after, data.previous_page_ends_before));
|
|
89
|
+
};
|
|
90
|
+
AsyncIterator.prototype.statusChanges = function (data) {
|
|
91
|
+
var _this_1 = this;
|
|
92
|
+
var statusChanges = [];
|
|
93
|
+
data.items.forEach(function (statusData) {
|
|
94
|
+
var status = new StatusChange_1.StatusChange(statusData);
|
|
95
|
+
_this_1.items.push(status);
|
|
96
|
+
statusChanges.push(status);
|
|
97
|
+
});
|
|
98
|
+
this.pages.push(new Page_1.Page(statusChanges, data.next_page_starts_after, data.previous_page_ends_before));
|
|
99
|
+
};
|
|
100
|
+
AsyncIterator.prototype.subaccounts = function (data) {
|
|
101
|
+
var _this_1 = this;
|
|
102
|
+
var subaccounts = [];
|
|
103
|
+
data.items.forEach(function (subaccountData) {
|
|
104
|
+
var subaccount = new Subaccount_1.Subaccount(subaccountData);
|
|
105
|
+
_this_1.items.push(subaccount);
|
|
106
|
+
subaccounts.push(subaccount);
|
|
107
|
+
});
|
|
108
|
+
this.pages.push(new Page_1.Page(subaccounts, data.next_page_starts_after, data.previous_page_ends_before));
|
|
109
|
+
};
|
|
110
|
+
AsyncIterator.prototype.workspaces = function (data) {
|
|
111
|
+
var _this_1 = this;
|
|
112
|
+
var workspaces = [];
|
|
113
|
+
data.items.forEach(function (json) {
|
|
114
|
+
var workspace = new Workspace_1.Workspace(json);
|
|
115
|
+
_this_1.items.push(workspace);
|
|
116
|
+
workspaces.push(workspace);
|
|
117
|
+
});
|
|
118
|
+
this.pages.push(new Page_1.Page(workspaces, data.next_page_starts_after, data.previous_page_ends_before));
|
|
119
|
+
};
|
|
120
|
+
AsyncIterator.prototype.users = function (data) {
|
|
121
|
+
var _this_1 = this;
|
|
122
|
+
var users = [];
|
|
123
|
+
data.items.forEach(function (userData) {
|
|
124
|
+
var user = new User_1.User(userData);
|
|
125
|
+
_this_1.items.push(user);
|
|
126
|
+
users.push(user);
|
|
127
|
+
});
|
|
128
|
+
this.pages.push(new Page_1.Page(users, data.next_page_starts_after, data.previous_page_ends_before));
|
|
129
|
+
};
|
|
130
|
+
AsyncIterator.prototype.fetch = function (fetchParams) {
|
|
131
|
+
var _this_1 = this;
|
|
132
|
+
if (fetchParams === void 0) { fetchParams = {}; }
|
|
133
|
+
return this.client.get(this.url, { params: fetchParams })
|
|
134
|
+
.then(function (res) {
|
|
135
|
+
if (res.data.next_page_starts_after) {
|
|
136
|
+
_this_1.nextPageStartsAfter = res.data.next_page_starts_after;
|
|
137
|
+
_this_1.nextPageMustBeFetched = true;
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
_this_1.nextPageMustBeFetched = false;
|
|
141
|
+
}
|
|
142
|
+
switch (_this_1.objType) {
|
|
143
|
+
case 'charts':
|
|
144
|
+
_this_1.charts(res.data);
|
|
145
|
+
break;
|
|
146
|
+
case 'events':
|
|
147
|
+
_this_1.events(res.data);
|
|
148
|
+
break;
|
|
149
|
+
case 'seasons':
|
|
150
|
+
_this_1.seasons(res.data);
|
|
151
|
+
break;
|
|
152
|
+
case 'statusChanges':
|
|
153
|
+
_this_1.statusChanges(res.data);
|
|
154
|
+
break;
|
|
155
|
+
case 'subaccounts':
|
|
156
|
+
_this_1.subaccounts(res.data);
|
|
157
|
+
break;
|
|
158
|
+
case 'users':
|
|
159
|
+
_this_1.users(res.data);
|
|
160
|
+
break;
|
|
161
|
+
case 'workspaces':
|
|
162
|
+
_this_1.workspaces(res.data);
|
|
163
|
+
break;
|
|
164
|
+
default:
|
|
165
|
+
throw new Error("Unknown object type '".concat(_this_1.objType, "'"));
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
AsyncIterator.prototype[Symbol.asyncIterator] = function () {
|
|
170
|
+
var _this = this;
|
|
171
|
+
return {
|
|
172
|
+
next: function () {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
+
return __generator(this, function (_a) {
|
|
175
|
+
switch (_a.label) {
|
|
176
|
+
case 0:
|
|
177
|
+
if (!(_this.nextPageMustBeFetched && _this.items.length === 0)) return [3 /*break*/, 2];
|
|
178
|
+
return [4 /*yield*/, _this.fetch(_this.params)];
|
|
179
|
+
case 1:
|
|
180
|
+
_a.sent();
|
|
181
|
+
return [3 /*break*/, 4];
|
|
182
|
+
case 2:
|
|
183
|
+
if (!(_this.nextPageMustBeFetched && !_this.items[_this.index])) return [3 /*break*/, 4];
|
|
184
|
+
_this.params.start_after_id = _this.nextPageStartsAfter;
|
|
185
|
+
return [4 /*yield*/, _this.fetch(_this.params)];
|
|
186
|
+
case 3:
|
|
187
|
+
_a.sent();
|
|
188
|
+
_a.label = 4;
|
|
189
|
+
case 4:
|
|
190
|
+
if (!_this.items[_this.index]) {
|
|
191
|
+
return [2 /*return*/, Promise.resolve({
|
|
192
|
+
done: true
|
|
193
|
+
})];
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
return [2 /*return*/, Promise.resolve({ value: _this.items[_this.index++], done: false })];
|
|
197
|
+
}
|
|
198
|
+
return [2 /*return*/];
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
return AsyncIterator;
|
|
206
|
+
}());
|
|
207
|
+
exports.AsyncIterator = AsyncIterator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Category {
|
|
2
|
+
accessible: any;
|
|
3
|
+
color: any;
|
|
4
|
+
key: any;
|
|
5
|
+
label: any;
|
|
6
|
+
constructor(key: any, label: any, color: any, accessible?: boolean);
|
|
7
|
+
setKey(key: any): this;
|
|
8
|
+
setLabel(label: any): this;
|
|
9
|
+
setColor(color: any): this;
|
|
10
|
+
setAccessible(accessible: any): this;
|
|
11
|
+
static fromJson(json: any): Category;
|
|
12
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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) {
|
|
6
|
+
if (accessible === void 0) { accessible = false; }
|
|
7
|
+
this.key = key;
|
|
8
|
+
this.label = label;
|
|
9
|
+
this.color = color;
|
|
10
|
+
this.accessible = accessible;
|
|
11
|
+
}
|
|
12
|
+
Category.prototype.setKey = function (key) {
|
|
13
|
+
this.key = key;
|
|
14
|
+
return this;
|
|
15
|
+
};
|
|
16
|
+
Category.prototype.setLabel = function (label) {
|
|
17
|
+
this.label = label;
|
|
18
|
+
return this;
|
|
19
|
+
};
|
|
20
|
+
Category.prototype.setColor = function (color) {
|
|
21
|
+
this.color = color;
|
|
22
|
+
return this;
|
|
23
|
+
};
|
|
24
|
+
Category.prototype.setAccessible = function (accessible) {
|
|
25
|
+
this.accessible = accessible;
|
|
26
|
+
return this;
|
|
27
|
+
};
|
|
28
|
+
Category.fromJson = function (json) {
|
|
29
|
+
return new Category(json.key, json.label, json.color, json.accessible);
|
|
30
|
+
};
|
|
31
|
+
return Category;
|
|
32
|
+
}());
|
|
33
|
+
exports.Category = Category;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class Chart {
|
|
2
|
+
archived: any;
|
|
3
|
+
draftVersionThumbnailUrl: any;
|
|
4
|
+
events: any;
|
|
5
|
+
id: any;
|
|
6
|
+
key: any;
|
|
7
|
+
name: any;
|
|
8
|
+
publishedVersionThumbnailUrl: any;
|
|
9
|
+
socialDistancingRulesets: any;
|
|
10
|
+
status: any;
|
|
11
|
+
tags: any;
|
|
12
|
+
validation: any;
|
|
13
|
+
constructor(chart: any);
|
|
14
|
+
static socialDistancingRulesetsFromJson(json: any): {} | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 SocialDistancingRuleset_1 = require("./SocialDistancingRuleset");
|
|
7
|
+
var Chart = /** @class */ (function () {
|
|
8
|
+
function Chart(chart) {
|
|
9
|
+
this.name = chart.name;
|
|
10
|
+
this.id = chart.id;
|
|
11
|
+
this.key = chart.key;
|
|
12
|
+
this.status = chart.status;
|
|
13
|
+
this.tags = chart.tags;
|
|
14
|
+
this.publishedVersionThumbnailUrl = chart.publishedVersionThumbnailUrl;
|
|
15
|
+
this.draftVersionThumbnailUrl = chart.draftVersionThumbnailUrl || null;
|
|
16
|
+
this.events = chart.events ? chart.events.map(function (event) { return new EventDeserializer_1.EventDeserializer().fromJson(event); }) : [];
|
|
17
|
+
this.archived = chart.archived;
|
|
18
|
+
if (chart.validation)
|
|
19
|
+
this.validation = new ChartValidation_1.ChartValidation(chart.validation);
|
|
20
|
+
this.socialDistancingRulesets = Chart.socialDistancingRulesetsFromJson(chart.socialDistancingRulesets);
|
|
21
|
+
}
|
|
22
|
+
Chart.socialDistancingRulesetsFromJson = function (json) {
|
|
23
|
+
if (json === undefined) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
var result = {};
|
|
27
|
+
for (var key in json) {
|
|
28
|
+
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
|
|
29
|
+
result[key] = SocialDistancingRuleset_1.SocialDistancingRuleset.fromJson(json[key]);
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
return Chart;
|
|
34
|
+
}());
|
|
35
|
+
exports.Chart = Chart;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class ChartListParams {
|
|
2
|
+
eventsLimit: any;
|
|
3
|
+
expand: any;
|
|
4
|
+
filter: any;
|
|
5
|
+
tag: any;
|
|
6
|
+
validation: any;
|
|
7
|
+
constructor(filter?: null, tag?: null, expandEvents?: null, withValidation?: boolean, eventsLimit?: null);
|
|
8
|
+
withFilter(filter: any): this;
|
|
9
|
+
withTag(tag: any): this;
|
|
10
|
+
withExpandEvents(expandEvents: any): this;
|
|
11
|
+
withEventsLimit(eventsLimit: any): this;
|
|
12
|
+
withValidation(validation: any): this;
|
|
13
|
+
serialize(): {
|
|
14
|
+
tag: any;
|
|
15
|
+
expand: any;
|
|
16
|
+
filter: any;
|
|
17
|
+
validation: any;
|
|
18
|
+
eventsLimit: any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartListParams = void 0;
|
|
4
|
+
var ChartListParams = /** @class */ (function () {
|
|
5
|
+
function ChartListParams(filter, tag, expandEvents, withValidation, eventsLimit) {
|
|
6
|
+
if (filter === void 0) { filter = null; }
|
|
7
|
+
if (tag === void 0) { tag = null; }
|
|
8
|
+
if (expandEvents === void 0) { expandEvents = null; }
|
|
9
|
+
if (withValidation === void 0) { withValidation = false; }
|
|
10
|
+
if (eventsLimit === void 0) { eventsLimit = null; }
|
|
11
|
+
this.filter = filter;
|
|
12
|
+
this.tag = tag;
|
|
13
|
+
this.validation = withValidation;
|
|
14
|
+
this.eventsLimit = eventsLimit;
|
|
15
|
+
if (expandEvents === true) {
|
|
16
|
+
this.expand = 'events';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
ChartListParams.prototype.withFilter = function (filter) {
|
|
20
|
+
this.filter = filter;
|
|
21
|
+
return this;
|
|
22
|
+
};
|
|
23
|
+
ChartListParams.prototype.withTag = function (tag) {
|
|
24
|
+
this.tag = tag;
|
|
25
|
+
return this;
|
|
26
|
+
};
|
|
27
|
+
ChartListParams.prototype.withExpandEvents = function (expandEvents) {
|
|
28
|
+
if (expandEvents === true) {
|
|
29
|
+
this.expand = 'events';
|
|
30
|
+
}
|
|
31
|
+
return this;
|
|
32
|
+
};
|
|
33
|
+
ChartListParams.prototype.withEventsLimit = function (eventsLimit) {
|
|
34
|
+
this.eventsLimit = eventsLimit;
|
|
35
|
+
return this;
|
|
36
|
+
};
|
|
37
|
+
ChartListParams.prototype.withValidation = function (validation) {
|
|
38
|
+
this.validation = validation;
|
|
39
|
+
return this;
|
|
40
|
+
};
|
|
41
|
+
ChartListParams.prototype.serialize = function () {
|
|
42
|
+
return {
|
|
43
|
+
tag: this.tag,
|
|
44
|
+
expand: this.expand,
|
|
45
|
+
filter: this.filter,
|
|
46
|
+
validation: this.validation,
|
|
47
|
+
eventsLimit: this.eventsLimit
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
return ChartListParams;
|
|
51
|
+
}());
|
|
52
|
+
exports.ChartListParams = ChartListParams;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class ChartObjectInfo {
|
|
2
|
+
bookAsAWhole: any;
|
|
3
|
+
capacity: any;
|
|
4
|
+
categoryKey: any;
|
|
5
|
+
categoryLabel: any;
|
|
6
|
+
distanceToFocalPoint: any;
|
|
7
|
+
entrance: any;
|
|
8
|
+
ids: any;
|
|
9
|
+
label: any;
|
|
10
|
+
labels: any;
|
|
11
|
+
leftNeighbour: any;
|
|
12
|
+
numSeats: any;
|
|
13
|
+
objectType: any;
|
|
14
|
+
rightNeighbour: any;
|
|
15
|
+
section: any;
|
|
16
|
+
constructor(chartReport: any);
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 ChartObjectInfo = /** @class */ (function () {
|
|
7
|
+
function ChartObjectInfo(chartReport) {
|
|
8
|
+
this.label = chartReport.label;
|
|
9
|
+
this.labels = helperFunctions_1.HelperFunctions.labelCreator(chartReport);
|
|
10
|
+
this.ids = new IDs_1.IDs(chartReport.ids.own, chartReport.ids.parent, chartReport.ids.section);
|
|
11
|
+
this.categoryLabel = chartReport.categoryLabel;
|
|
12
|
+
this.categoryKey = chartReport.categoryKey;
|
|
13
|
+
this.entrance = chartReport.entrance;
|
|
14
|
+
this.objectType = chartReport.objectType;
|
|
15
|
+
this.section = chartReport.section;
|
|
16
|
+
this.capacity = chartReport.capacity;
|
|
17
|
+
this.bookAsAWhole = chartReport.bookAsAWhole;
|
|
18
|
+
this.leftNeighbour = chartReport.leftNeighbour;
|
|
19
|
+
this.rightNeighbour = chartReport.rightNeighbour;
|
|
20
|
+
this.distanceToFocalPoint = chartReport.distanceToFocalPoint;
|
|
21
|
+
this.numSeats = chartReport.numSeats;
|
|
22
|
+
}
|
|
23
|
+
return ChartObjectInfo;
|
|
24
|
+
}());
|
|
25
|
+
exports.ChartObjectInfo = ChartObjectInfo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChartValidation = void 0;
|
|
4
|
+
var ChartValidation = /** @class */ (function () {
|
|
5
|
+
function ChartValidation(validation) {
|
|
6
|
+
this.errors = validation.errors;
|
|
7
|
+
this.warnings = validation.warnings;
|
|
8
|
+
}
|
|
9
|
+
return ChartValidation;
|
|
10
|
+
}());
|
|
11
|
+
exports.ChartValidation = ChartValidation;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Lister } from '../Lister';
|
|
2
|
+
export declare class Charts {
|
|
3
|
+
archive: any;
|
|
4
|
+
client: any;
|
|
5
|
+
constructor(client: any);
|
|
6
|
+
create(name?: null, venueType?: null, categories?: null): any;
|
|
7
|
+
update(key: any, name?: null, categories?: null): any;
|
|
8
|
+
addCategory(key: any, category: any): any;
|
|
9
|
+
removeCategory(chartKey: any, categoryKey: any): any;
|
|
10
|
+
listCategories(key: any): any;
|
|
11
|
+
validatePublishedVersion(key: any): any;
|
|
12
|
+
validateDraftVersion(key: any): any;
|
|
13
|
+
retrieve(key: any): any;
|
|
14
|
+
retrieveWithEvents(key: any): any;
|
|
15
|
+
retrievePublishedVersion(key: any): any;
|
|
16
|
+
retrieveDraftVersion(key: any): any;
|
|
17
|
+
publishDraftVersion(key: any): any;
|
|
18
|
+
discardDraftVersion(key: any): any;
|
|
19
|
+
moveToArchive(key: any): any;
|
|
20
|
+
moveOutOfArchive(key: any): any;
|
|
21
|
+
copy(key: any): any;
|
|
22
|
+
copyDraftVersion(key: any): any;
|
|
23
|
+
copyToSubaccount(key: any, subaccountId: any): any;
|
|
24
|
+
copyToWorkspace(key: any, workspaceKey: any): any;
|
|
25
|
+
saveSocialDistancingRulesets(key: any, socialDistancingRulesets: any): any;
|
|
26
|
+
retrievePublishedVersionThumbnail(key: any): any;
|
|
27
|
+
retrieveDraftVersionThumbnail(key: any): any;
|
|
28
|
+
listAllTags(): any;
|
|
29
|
+
addTag(key: any, tag: any): any;
|
|
30
|
+
removeTag(key: any, tag: any): any;
|
|
31
|
+
listAll(requestParameters?: {}): import("../AsyncIterator").AsyncIterator;
|
|
32
|
+
listFirstPage(chartListParams?: null, pageSize?: null): any;
|
|
33
|
+
listPageAfter(afterId: any, chartListParameters?: null, pageSize?: null): any;
|
|
34
|
+
listPageBefore(beforeId: any, chartListParameters?: null, pageSize?: null): any;
|
|
35
|
+
iterator(): Lister;
|
|
36
|
+
}
|