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
package/dist/src/PageFetcher.js
CHANGED
|
@@ -1,83 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.PageFetcher = void 0;
|
|
40
|
-
var PageFetcher = /** @class */ (function () {
|
|
41
|
-
function PageFetcher(url, client, pageCreator) {
|
|
1
|
+
export class PageFetcher {
|
|
2
|
+
client;
|
|
3
|
+
pageCreator;
|
|
4
|
+
url;
|
|
5
|
+
constructor(url, client, pageCreator) {
|
|
42
6
|
this.url = url;
|
|
43
7
|
this.client = client;
|
|
44
8
|
this.pageCreator = pageCreator;
|
|
45
9
|
}
|
|
46
|
-
|
|
47
|
-
|
|
10
|
+
fetchAfter(afterId, queryParameters, pageSize) {
|
|
11
|
+
const parameters = queryParameters || {};
|
|
48
12
|
if (afterId !== null) {
|
|
49
13
|
// @ts-ignore
|
|
50
14
|
parameters.start_after_id = afterId;
|
|
51
15
|
}
|
|
52
16
|
return this.fetch(parameters, pageSize);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
17
|
+
}
|
|
18
|
+
fetchBefore(beforeId, queryParameters, pageSize) {
|
|
19
|
+
const parameters = queryParameters || {};
|
|
56
20
|
if (beforeId) {
|
|
57
21
|
// @ts-ignore
|
|
58
22
|
parameters.end_before_id = beforeId;
|
|
59
23
|
}
|
|
60
24
|
return this.fetch(parameters, pageSize);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
return [4 /*yield*/, this.client.get(this.url, { params: parameters }).then(function (res) { return res.data; })];
|
|
74
|
-
case 1:
|
|
75
|
-
res = _a.sent();
|
|
76
|
-
return [2 /*return*/, this.pageCreator(res)];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
return PageFetcher;
|
|
82
|
-
}());
|
|
83
|
-
exports.PageFetcher = PageFetcher;
|
|
25
|
+
}
|
|
26
|
+
async fetch(queryParameters, pageSize) {
|
|
27
|
+
const parameters = queryParameters || {};
|
|
28
|
+
if (pageSize) {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
parameters.limit = pageSize;
|
|
31
|
+
}
|
|
32
|
+
const res = await this.client.get(this.url, { params: parameters }).then(res => res.data);
|
|
33
|
+
return this.pageCreator(res);
|
|
34
|
+
}
|
|
35
|
+
}
|
package/dist/src/Region.js
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var Region = /** @class */ (function () {
|
|
5
|
-
function Region(url) {
|
|
6
|
-
this.url = url;
|
|
7
|
-
}
|
|
8
|
-
Region.EU = function () {
|
|
1
|
+
export class Region {
|
|
2
|
+
url;
|
|
3
|
+
static EU() {
|
|
9
4
|
return new Region(Region.urlForId('eu'));
|
|
10
|
-
}
|
|
11
|
-
|
|
5
|
+
}
|
|
6
|
+
static NA() {
|
|
12
7
|
return new Region(Region.urlForId('na'));
|
|
13
|
-
}
|
|
14
|
-
|
|
8
|
+
}
|
|
9
|
+
static SA() {
|
|
15
10
|
return new Region(Region.urlForId('sa'));
|
|
16
|
-
}
|
|
17
|
-
|
|
11
|
+
}
|
|
12
|
+
static OC() {
|
|
18
13
|
return new Region(Region.urlForId('oc'));
|
|
19
|
-
}
|
|
20
|
-
|
|
14
|
+
}
|
|
15
|
+
constructor(url) {
|
|
16
|
+
this.url = url;
|
|
17
|
+
}
|
|
18
|
+
static urlForId(id) {
|
|
21
19
|
return 'https://api-{region}.seatsio.net'.replace('{region}', id);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}());
|
|
25
|
-
exports.Region = Region;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,60 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Versions.draftVersion = 'draft';
|
|
10
|
-
return Versions;
|
|
11
|
-
}());
|
|
12
|
-
exports.Versions = Versions;
|
|
13
|
-
var ChartReports = /** @class */ (function () {
|
|
14
|
-
function ChartReports(client) {
|
|
1
|
+
import { Utilities } from '../utilities/reportUtility';
|
|
2
|
+
export class Versions {
|
|
3
|
+
static publishedVersion = 'published';
|
|
4
|
+
static draftVersion = 'draft';
|
|
5
|
+
}
|
|
6
|
+
export class ChartReports {
|
|
7
|
+
client;
|
|
8
|
+
constructor(client) {
|
|
15
9
|
this.client = client;
|
|
16
10
|
}
|
|
17
|
-
|
|
11
|
+
byLabel(chartKey, bookWholeTables, version) {
|
|
18
12
|
return this.fetchReport('byLabel', chartKey, bookWholeTables, version);
|
|
19
|
-
}
|
|
20
|
-
|
|
13
|
+
}
|
|
14
|
+
byObjectType(chartKey, bookWholeTables, version) {
|
|
21
15
|
return this.fetchReport('byObjectType', chartKey, bookWholeTables, version);
|
|
22
|
-
}
|
|
23
|
-
|
|
16
|
+
}
|
|
17
|
+
summaryByObjectType(chartKey, bookWholeTables, version) {
|
|
24
18
|
return this.fetchSummaryReport('byObjectType', chartKey, bookWholeTables, version);
|
|
25
|
-
}
|
|
26
|
-
|
|
19
|
+
}
|
|
20
|
+
byCategoryLabel(chartKey, bookWholeTables, version) {
|
|
27
21
|
return this.fetchReport('byCategoryLabel', chartKey, bookWholeTables, version);
|
|
28
|
-
}
|
|
29
|
-
|
|
22
|
+
}
|
|
23
|
+
summaryByCategoryLabel(chartKey, bookWholeTables, version) {
|
|
30
24
|
return this.fetchSummaryReport('byCategoryLabel', chartKey, bookWholeTables, version);
|
|
31
|
-
}
|
|
32
|
-
|
|
25
|
+
}
|
|
26
|
+
byCategoryKey(chartKey, bookWholeTables, version) {
|
|
33
27
|
return this.fetchReport('byCategoryKey', chartKey, bookWholeTables, version);
|
|
34
|
-
}
|
|
35
|
-
|
|
28
|
+
}
|
|
29
|
+
summaryByCategoryKey(chartKey, bookWholeTables, version) {
|
|
36
30
|
return this.fetchSummaryReport('byCategoryKey', chartKey, bookWholeTables, version);
|
|
37
|
-
}
|
|
38
|
-
|
|
31
|
+
}
|
|
32
|
+
bySection(chartKey, bookWholeTables, version) {
|
|
39
33
|
return this.fetchReport('bySection', chartKey, bookWholeTables, version);
|
|
40
|
-
}
|
|
41
|
-
|
|
34
|
+
}
|
|
35
|
+
byZone(chartKey, bookWholeTables, version) {
|
|
42
36
|
return this.fetchReport('byZone', chartKey, bookWholeTables, version);
|
|
43
|
-
}
|
|
44
|
-
|
|
37
|
+
}
|
|
38
|
+
summaryBySection(chartKey, bookWholeTables, version) {
|
|
45
39
|
return this.fetchSummaryReport('bySection', chartKey, bookWholeTables, version);
|
|
46
|
-
}
|
|
47
|
-
|
|
40
|
+
}
|
|
41
|
+
summaryByZone(chartKey, bookWholeTables, version) {
|
|
48
42
|
return this.fetchSummaryReport('byZone', chartKey, bookWholeTables, version);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return this.client.get(
|
|
52
|
-
.then(
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return this.client.get(
|
|
56
|
-
.then(
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
}());
|
|
60
|
-
exports.ChartReports = ChartReports;
|
|
43
|
+
}
|
|
44
|
+
fetchReport(reportType, chartKey, bookWholeTables, version) {
|
|
45
|
+
return this.client.get(`/reports/charts/${encodeURIComponent(chartKey)}/${reportType}`, { params: { bookWholeTables, version } })
|
|
46
|
+
.then(res => Utilities.createChartReport(res.data));
|
|
47
|
+
}
|
|
48
|
+
fetchSummaryReport(reportType, chartKey, bookWholeTables, version) {
|
|
49
|
+
return this.client.get(`/reports/charts/${encodeURIComponent(chartKey)}/${reportType}/summary`, { params: { bookWholeTables, version } })
|
|
50
|
+
.then(res => res.data);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,150 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var EventReports = /** @class */ (function () {
|
|
6
|
-
function EventReports(client) {
|
|
1
|
+
import { Utilities } from '../utilities/reportUtility';
|
|
2
|
+
export class EventReports {
|
|
3
|
+
client;
|
|
4
|
+
constructor(client) {
|
|
7
5
|
this.client = client;
|
|
8
6
|
}
|
|
9
|
-
|
|
10
|
-
if (status === void 0) { status = null; }
|
|
7
|
+
byStatus(eventKey, status = null) {
|
|
11
8
|
return this.client.get(EventReports.reportUrl('byStatus', eventKey, status))
|
|
12
|
-
.then(
|
|
13
|
-
}
|
|
14
|
-
|
|
9
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
10
|
+
}
|
|
11
|
+
summaryByStatus(eventKey) {
|
|
15
12
|
return this.client.get(EventReports.summaryReportUrl('byStatus', eventKey))
|
|
16
|
-
.then(
|
|
17
|
-
}
|
|
18
|
-
|
|
13
|
+
.then(res => res.data);
|
|
14
|
+
}
|
|
15
|
+
deepSummaryByStatus(eventKey) {
|
|
19
16
|
return this.client.get(EventReports.deepSummaryReportUrl('byStatus', eventKey))
|
|
20
|
-
.then(
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (objectType === void 0) { objectType = null; }
|
|
17
|
+
.then(res => res.data);
|
|
18
|
+
}
|
|
19
|
+
byObjectType(eventKey, objectType = null) {
|
|
24
20
|
return this.client.get(EventReports.reportUrl('byObjectType', eventKey, objectType))
|
|
25
|
-
.then(
|
|
26
|
-
}
|
|
27
|
-
|
|
21
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
22
|
+
}
|
|
23
|
+
summaryByObjectType(eventKey) {
|
|
28
24
|
return this.client.get(EventReports.summaryReportUrl('byObjectType', eventKey))
|
|
29
|
-
.then(
|
|
30
|
-
}
|
|
31
|
-
|
|
25
|
+
.then(res => res.data);
|
|
26
|
+
}
|
|
27
|
+
deepSummaryByObjectType(eventKey) {
|
|
32
28
|
return this.client.get(EventReports.deepSummaryReportUrl('byObjectType', eventKey))
|
|
33
|
-
.then(
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (categoryLabel === void 0) { categoryLabel = null; }
|
|
29
|
+
.then(res => res.data);
|
|
30
|
+
}
|
|
31
|
+
byCategoryLabel(eventKey, categoryLabel = null) {
|
|
37
32
|
return this.client.get(EventReports.reportUrl('byCategoryLabel', eventKey, categoryLabel))
|
|
38
|
-
.then(
|
|
39
|
-
}
|
|
40
|
-
|
|
33
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
34
|
+
}
|
|
35
|
+
summaryByCategoryLabel(eventKey) {
|
|
41
36
|
return this.client.get(EventReports.summaryReportUrl('byCategoryLabel', eventKey))
|
|
42
|
-
.then(
|
|
43
|
-
}
|
|
44
|
-
|
|
37
|
+
.then(res => res.data);
|
|
38
|
+
}
|
|
39
|
+
deepSummaryByCategoryLabel(eventKey) {
|
|
45
40
|
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryLabel', eventKey))
|
|
46
|
-
.then(
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (categoryKey === void 0) { categoryKey = null; }
|
|
41
|
+
.then(res => res.data);
|
|
42
|
+
}
|
|
43
|
+
byCategoryKey(eventKey, categoryKey = null) {
|
|
50
44
|
return this.client.get(EventReports.reportUrl('byCategoryKey', eventKey, categoryKey))
|
|
51
|
-
.then(
|
|
52
|
-
}
|
|
53
|
-
|
|
45
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
46
|
+
}
|
|
47
|
+
summaryByCategoryKey(eventKey) {
|
|
54
48
|
return this.client.get(EventReports.summaryReportUrl('byCategoryKey', eventKey))
|
|
55
|
-
.then(
|
|
56
|
-
}
|
|
57
|
-
|
|
49
|
+
.then(res => res.data);
|
|
50
|
+
}
|
|
51
|
+
deepSummaryByCategoryKey(eventKey) {
|
|
58
52
|
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryKey', eventKey))
|
|
59
|
-
.then(
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (label === void 0) { label = null; }
|
|
53
|
+
.then(res => res.data);
|
|
54
|
+
}
|
|
55
|
+
byLabel(eventKey, label = null) {
|
|
63
56
|
return this.client.get(EventReports.reportUrl('byLabel', eventKey, label))
|
|
64
|
-
.then(
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (orderId === void 0) { orderId = null; }
|
|
57
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
58
|
+
}
|
|
59
|
+
byOrderId(eventKey, orderId = null) {
|
|
68
60
|
return this.client.get(EventReports.reportUrl('byOrderId', eventKey, orderId))
|
|
69
|
-
.then(
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (section === void 0) { section = null; }
|
|
61
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
62
|
+
}
|
|
63
|
+
bySection(eventKey, section = null) {
|
|
73
64
|
return this.client.get(EventReports.reportUrl('bySection', eventKey, section))
|
|
74
|
-
.then(
|
|
75
|
-
}
|
|
76
|
-
|
|
65
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
66
|
+
}
|
|
67
|
+
summaryBySection(eventKey) {
|
|
77
68
|
return this.client.get(EventReports.summaryReportUrl('bySection', eventKey))
|
|
78
|
-
.then(
|
|
79
|
-
}
|
|
80
|
-
|
|
69
|
+
.then(res => res.data);
|
|
70
|
+
}
|
|
71
|
+
deepSummaryBySection(eventKey) {
|
|
81
72
|
return this.client.get(EventReports.deepSummaryReportUrl('bySection', eventKey))
|
|
82
|
-
.then(
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (zone === void 0) { zone = null; }
|
|
73
|
+
.then(res => res.data);
|
|
74
|
+
}
|
|
75
|
+
byZone(eventKey, zone = null) {
|
|
86
76
|
return this.client.get(EventReports.reportUrl('byZone', eventKey, zone))
|
|
87
|
-
.then(
|
|
88
|
-
}
|
|
89
|
-
|
|
77
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
78
|
+
}
|
|
79
|
+
summaryByZone(eventKey) {
|
|
90
80
|
return this.client.get(EventReports.summaryReportUrl('byZone', eventKey))
|
|
91
|
-
.then(
|
|
92
|
-
}
|
|
93
|
-
|
|
81
|
+
.then(res => res.data);
|
|
82
|
+
}
|
|
83
|
+
deepSummaryByZone(eventKey) {
|
|
94
84
|
return this.client.get(EventReports.deepSummaryReportUrl('byZone', eventKey))
|
|
95
|
-
.then(
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (availability === void 0) { availability = null; }
|
|
85
|
+
.then(res => res.data);
|
|
86
|
+
}
|
|
87
|
+
byAvailability(eventKey, availability = null) {
|
|
99
88
|
return this.client.get(EventReports.reportUrl('byAvailability', eventKey, availability))
|
|
100
|
-
.then(
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (availabilityReason === void 0) { availabilityReason = null; }
|
|
89
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
90
|
+
}
|
|
91
|
+
byAvailabilityReason(eventKey, availabilityReason = null) {
|
|
104
92
|
return this.client.get(EventReports.reportUrl('byAvailabilityReason', eventKey, availabilityReason))
|
|
105
|
-
.then(
|
|
106
|
-
}
|
|
107
|
-
|
|
93
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
94
|
+
}
|
|
95
|
+
summaryByAvailability(eventKey) {
|
|
108
96
|
return this.client.get(EventReports.summaryReportUrl('byAvailability', eventKey))
|
|
109
|
-
.then(
|
|
110
|
-
}
|
|
111
|
-
|
|
97
|
+
.then(res => res.data);
|
|
98
|
+
}
|
|
99
|
+
summaryByAvailabilityReason(eventKey) {
|
|
112
100
|
return this.client.get(EventReports.summaryReportUrl('byAvailabilityReason', eventKey))
|
|
113
|
-
.then(
|
|
114
|
-
}
|
|
115
|
-
|
|
101
|
+
.then(res => res.data);
|
|
102
|
+
}
|
|
103
|
+
deepSummaryByAvailability(eventKey) {
|
|
116
104
|
return this.client.get(EventReports.deepSummaryReportUrl('byAvailability', eventKey))
|
|
117
|
-
.then(
|
|
118
|
-
}
|
|
119
|
-
|
|
105
|
+
.then(res => res.data);
|
|
106
|
+
}
|
|
107
|
+
deepSummaryByAvailabilityReason(eventKey) {
|
|
120
108
|
return this.client.get(EventReports.deepSummaryReportUrl('byAvailabilityReason', eventKey))
|
|
121
|
-
.then(
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (channel === void 0) { channel = null; }
|
|
109
|
+
.then(res => res.data);
|
|
110
|
+
}
|
|
111
|
+
byChannel(eventKey, channel = null) {
|
|
125
112
|
return this.client.get(EventReports.reportUrl('byChannel', eventKey, channel))
|
|
126
|
-
.then(
|
|
127
|
-
}
|
|
128
|
-
|
|
113
|
+
.then(res => Utilities.createEventReport(res.data));
|
|
114
|
+
}
|
|
115
|
+
summaryByChannel(eventKey) {
|
|
129
116
|
return this.client.get(EventReports.summaryReportUrl('byChannel', eventKey))
|
|
130
|
-
.then(
|
|
131
|
-
}
|
|
132
|
-
|
|
117
|
+
.then(res => res.data);
|
|
118
|
+
}
|
|
119
|
+
deepSummaryByChannel(eventKey) {
|
|
133
120
|
return this.client.get(EventReports.deepSummaryReportUrl('byChannel', eventKey))
|
|
134
|
-
.then(
|
|
135
|
-
}
|
|
136
|
-
|
|
121
|
+
.then(res => res.data);
|
|
122
|
+
}
|
|
123
|
+
static reportUrl(reportType, eventKey, filter) {
|
|
137
124
|
if (filter === null || typeof filter === 'undefined') {
|
|
138
|
-
return
|
|
125
|
+
return `/reports/events/${encodeURIComponent(eventKey)}/${reportType}`;
|
|
139
126
|
}
|
|
140
|
-
return
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
}());
|
|
150
|
-
exports.EventReports = EventReports;
|
|
127
|
+
return `/reports/events/${encodeURIComponent(eventKey)}/${reportType}/${encodeURIComponent(filter)}`;
|
|
128
|
+
}
|
|
129
|
+
static summaryReportUrl(reportType, eventKey) {
|
|
130
|
+
return `/reports/events/${encodeURIComponent(eventKey)}/${reportType}/summary`;
|
|
131
|
+
}
|
|
132
|
+
static deepSummaryReportUrl(reportType, eventKey) {
|
|
133
|
+
return `/reports/events/${encodeURIComponent(eventKey)}/${reportType}/summary/deep`;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var UsageReports = /** @class */ (function () {
|
|
5
|
-
function UsageReports(client) {
|
|
1
|
+
export class UsageReports {
|
|
2
|
+
client;
|
|
3
|
+
constructor(client) {
|
|
6
4
|
this.client = client;
|
|
7
5
|
}
|
|
8
|
-
|
|
6
|
+
summaryForAllMonths() {
|
|
9
7
|
return this.client.get('/reports/usage?version=2')
|
|
10
|
-
.then(
|
|
8
|
+
.then(res => ({
|
|
11
9
|
usageCutoffDate: new Date(res.data.usageCutoffDate),
|
|
12
10
|
usage: res.data.usage
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return this.client.get(
|
|
17
|
-
.then(
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return this.client.get(
|
|
21
|
-
.then(
|
|
22
|
-
}
|
|
23
|
-
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
13
|
+
detailsForMonth(month) {
|
|
14
|
+
return this.client.get(`/reports/usage/month/${month}`)
|
|
15
|
+
.then(res => res.data);
|
|
16
|
+
}
|
|
17
|
+
detailsForEventInMonth(eventId, month) {
|
|
18
|
+
return this.client.get(`/reports/usage/month/${month}/event/${eventId}`)
|
|
19
|
+
.then(res => res.data);
|
|
20
|
+
}
|
|
21
|
+
subscription() {
|
|
24
22
|
return this.client.get('/reports/subscription')
|
|
25
|
-
.then(
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
}());
|
|
29
|
-
exports.UsageReports = UsageReports;
|
|
23
|
+
.then(res => res.data);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableBookingConfig } from '../Events/TableBookingConfig';
|
|
2
|
-
import {
|
|
2
|
+
import { ChannelCreationParams } from '../Events/Channel';
|
|
3
3
|
import { ForSaleConfig } from '../Events/ForSaleConfig';
|
|
4
4
|
import { Category } from '../Charts/Category';
|
|
5
5
|
export declare class CreateSeasonParams {
|
|
@@ -10,7 +10,7 @@ export declare class CreateSeasonParams {
|
|
|
10
10
|
_tableBookingConfig?: TableBookingConfig;
|
|
11
11
|
_objectCategories?: object;
|
|
12
12
|
_categories?: Category[];
|
|
13
|
-
_channels?:
|
|
13
|
+
_channels?: ChannelCreationParams[];
|
|
14
14
|
_forSaleConfig?: ForSaleConfig;
|
|
15
15
|
_forSalePropagated?: boolean;
|
|
16
16
|
key(key: string): this;
|
|
@@ -18,7 +18,7 @@ export declare class CreateSeasonParams {
|
|
|
18
18
|
numberOfEvents(numberOfEvents: number): this;
|
|
19
19
|
eventKeys(eventKeys: string[]): this;
|
|
20
20
|
tableBookingConfig(tableBookingConfig: TableBookingConfig): this;
|
|
21
|
-
channels(channels:
|
|
21
|
+
channels(channels: ChannelCreationParams[]): this;
|
|
22
22
|
forSaleConfig(forSaleConfig: ForSaleConfig): this;
|
|
23
23
|
forSalePropagated(forSalePropagated: boolean): this;
|
|
24
24
|
objectCategories(objectCategories: object): this;
|