seatsio 90.0.0 → 90.2.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.
|
@@ -3,7 +3,9 @@ import { CategoryKey } from '../Charts/Category.js';
|
|
|
3
3
|
import { EventObjectInfo } from '../Events/EventObjectInfo.js';
|
|
4
4
|
export declare class EventReports {
|
|
5
5
|
client: Axios;
|
|
6
|
-
|
|
6
|
+
private readonly seasonBookingsPropagated;
|
|
7
|
+
constructor(client: Axios, seasonBookingsPropagated?: boolean);
|
|
8
|
+
withSeasonBookingsNotPropagated(): EventReports;
|
|
7
9
|
flatList(eventKey: string): Promise<EventObjectInfo[]>;
|
|
8
10
|
flatListCsv(eventKey: string): Promise<string>;
|
|
9
11
|
byStatus(eventKey: string, status?: string | null): Promise<import("../Dict.js").Dict<EventObjectInfo[]>>;
|
|
@@ -35,6 +37,7 @@ export declare class EventReports {
|
|
|
35
37
|
byChannel(eventKey: string, channel?: string | null): Promise<import("../Dict.js").Dict<EventObjectInfo[]>>;
|
|
36
38
|
summaryByChannel(eventKey: string): Promise<any>;
|
|
37
39
|
deepSummaryByChannel(eventKey: string): Promise<any>;
|
|
40
|
+
private queryParams;
|
|
38
41
|
static reportUrl(reportType: string, eventKey: string, filter: string | number | null): string;
|
|
39
42
|
static summaryReportUrl(reportType: string, eventKey: string): string;
|
|
40
43
|
static deepSummaryReportUrl(reportType: string, eventKey: string): string;
|
|
@@ -2,133 +2,144 @@ import { Utilities } from '../utilities/reportUtility.js';
|
|
|
2
2
|
import { EventObjectInfo } from '../Events/EventObjectInfo.js';
|
|
3
3
|
export class EventReports {
|
|
4
4
|
client;
|
|
5
|
-
|
|
5
|
+
seasonBookingsPropagated;
|
|
6
|
+
constructor(client, seasonBookingsPropagated = true) {
|
|
6
7
|
this.client = client;
|
|
8
|
+
this.seasonBookingsPropagated = seasonBookingsPropagated;
|
|
9
|
+
}
|
|
10
|
+
withSeasonBookingsNotPropagated() {
|
|
11
|
+
return new EventReports(this.client, false);
|
|
7
12
|
}
|
|
8
13
|
flatList(eventKey) {
|
|
9
|
-
return this.client.get(`/reports/events/${encodeURIComponent(eventKey)}
|
|
14
|
+
return this.client.get(`/reports/events/${encodeURIComponent(eventKey)}`, { params: this.queryParams() })
|
|
10
15
|
.then(res => res.data.map(d => new EventObjectInfo(d)));
|
|
11
16
|
}
|
|
12
17
|
flatListCsv(eventKey) {
|
|
13
|
-
return this.client.get(`/reports/events/${encodeURIComponent(eventKey)}.csv
|
|
18
|
+
return this.client.get(`/reports/events/${encodeURIComponent(eventKey)}.csv`, { params: this.queryParams() })
|
|
14
19
|
.then(res => res.data);
|
|
15
20
|
}
|
|
16
21
|
byStatus(eventKey, status = null) {
|
|
17
|
-
return this.client.get(EventReports.reportUrl('byStatus', eventKey, status))
|
|
22
|
+
return this.client.get(EventReports.reportUrl('byStatus', eventKey, status), { params: this.queryParams() })
|
|
18
23
|
.then(res => Utilities.createEventReport(res.data));
|
|
19
24
|
}
|
|
20
25
|
summaryByStatus(eventKey) {
|
|
21
|
-
return this.client.get(EventReports.summaryReportUrl('byStatus', eventKey))
|
|
26
|
+
return this.client.get(EventReports.summaryReportUrl('byStatus', eventKey), { params: this.queryParams() })
|
|
22
27
|
.then(res => res.data);
|
|
23
28
|
}
|
|
24
29
|
deepSummaryByStatus(eventKey) {
|
|
25
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byStatus', eventKey))
|
|
30
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byStatus', eventKey), { params: this.queryParams() })
|
|
26
31
|
.then(res => res.data);
|
|
27
32
|
}
|
|
28
33
|
byObjectType(eventKey, objectType = null) {
|
|
29
|
-
return this.client.get(EventReports.reportUrl('byObjectType', eventKey, objectType))
|
|
34
|
+
return this.client.get(EventReports.reportUrl('byObjectType', eventKey, objectType), { params: this.queryParams() })
|
|
30
35
|
.then(res => Utilities.createEventReport(res.data));
|
|
31
36
|
}
|
|
32
37
|
summaryByObjectType(eventKey) {
|
|
33
|
-
return this.client.get(EventReports.summaryReportUrl('byObjectType', eventKey))
|
|
38
|
+
return this.client.get(EventReports.summaryReportUrl('byObjectType', eventKey), { params: this.queryParams() })
|
|
34
39
|
.then(res => res.data);
|
|
35
40
|
}
|
|
36
41
|
deepSummaryByObjectType(eventKey) {
|
|
37
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byObjectType', eventKey))
|
|
42
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byObjectType', eventKey), { params: this.queryParams() })
|
|
38
43
|
.then(res => res.data);
|
|
39
44
|
}
|
|
40
45
|
byCategoryLabel(eventKey, categoryLabel = null) {
|
|
41
|
-
return this.client.get(EventReports.reportUrl('byCategoryLabel', eventKey, categoryLabel))
|
|
46
|
+
return this.client.get(EventReports.reportUrl('byCategoryLabel', eventKey, categoryLabel), { params: this.queryParams() })
|
|
42
47
|
.then(res => Utilities.createEventReport(res.data));
|
|
43
48
|
}
|
|
44
49
|
summaryByCategoryLabel(eventKey) {
|
|
45
|
-
return this.client.get(EventReports.summaryReportUrl('byCategoryLabel', eventKey))
|
|
50
|
+
return this.client.get(EventReports.summaryReportUrl('byCategoryLabel', eventKey), { params: this.queryParams() })
|
|
46
51
|
.then(res => res.data);
|
|
47
52
|
}
|
|
48
53
|
deepSummaryByCategoryLabel(eventKey) {
|
|
49
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryLabel', eventKey))
|
|
54
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryLabel', eventKey), { params: this.queryParams() })
|
|
50
55
|
.then(res => res.data);
|
|
51
56
|
}
|
|
52
57
|
byCategoryKey(eventKey, categoryKey = null) {
|
|
53
|
-
return this.client.get(EventReports.reportUrl('byCategoryKey', eventKey, categoryKey))
|
|
58
|
+
return this.client.get(EventReports.reportUrl('byCategoryKey', eventKey, categoryKey), { params: this.queryParams() })
|
|
54
59
|
.then(res => Utilities.createEventReport(res.data));
|
|
55
60
|
}
|
|
56
61
|
summaryByCategoryKey(eventKey) {
|
|
57
|
-
return this.client.get(EventReports.summaryReportUrl('byCategoryKey', eventKey))
|
|
62
|
+
return this.client.get(EventReports.summaryReportUrl('byCategoryKey', eventKey), { params: this.queryParams() })
|
|
58
63
|
.then(res => res.data);
|
|
59
64
|
}
|
|
60
65
|
deepSummaryByCategoryKey(eventKey) {
|
|
61
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryKey', eventKey))
|
|
66
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byCategoryKey', eventKey), { params: this.queryParams() })
|
|
62
67
|
.then(res => res.data);
|
|
63
68
|
}
|
|
64
69
|
byLabel(eventKey, label = null) {
|
|
65
|
-
return this.client.get(EventReports.reportUrl('byLabel', eventKey, label))
|
|
70
|
+
return this.client.get(EventReports.reportUrl('byLabel', eventKey, label), { params: this.queryParams() })
|
|
66
71
|
.then(res => Utilities.createEventReport(res.data));
|
|
67
72
|
}
|
|
68
73
|
byOrderId(eventKey, orderId = null) {
|
|
69
|
-
return this.client.get(EventReports.reportUrl('byOrderId', eventKey, orderId))
|
|
74
|
+
return this.client.get(EventReports.reportUrl('byOrderId', eventKey, orderId), { params: this.queryParams() })
|
|
70
75
|
.then(res => Utilities.createEventReport(res.data));
|
|
71
76
|
}
|
|
72
77
|
bySection(eventKey, section = null) {
|
|
73
|
-
return this.client.get(EventReports.reportUrl('bySection', eventKey, section))
|
|
78
|
+
return this.client.get(EventReports.reportUrl('bySection', eventKey, section), { params: this.queryParams() })
|
|
74
79
|
.then(res => Utilities.createEventReport(res.data));
|
|
75
80
|
}
|
|
76
81
|
summaryBySection(eventKey) {
|
|
77
|
-
return this.client.get(EventReports.summaryReportUrl('bySection', eventKey))
|
|
82
|
+
return this.client.get(EventReports.summaryReportUrl('bySection', eventKey), { params: this.queryParams() })
|
|
78
83
|
.then(res => res.data);
|
|
79
84
|
}
|
|
80
85
|
deepSummaryBySection(eventKey) {
|
|
81
|
-
return this.client.get(EventReports.deepSummaryReportUrl('bySection', eventKey))
|
|
86
|
+
return this.client.get(EventReports.deepSummaryReportUrl('bySection', eventKey), { params: this.queryParams() })
|
|
82
87
|
.then(res => res.data);
|
|
83
88
|
}
|
|
84
89
|
byZone(eventKey, zone = null) {
|
|
85
|
-
return this.client.get(EventReports.reportUrl('byZone', eventKey, zone))
|
|
90
|
+
return this.client.get(EventReports.reportUrl('byZone', eventKey, zone), { params: this.queryParams() })
|
|
86
91
|
.then(res => Utilities.createEventReport(res.data));
|
|
87
92
|
}
|
|
88
93
|
summaryByZone(eventKey) {
|
|
89
|
-
return this.client.get(EventReports.summaryReportUrl('byZone', eventKey))
|
|
94
|
+
return this.client.get(EventReports.summaryReportUrl('byZone', eventKey), { params: this.queryParams() })
|
|
90
95
|
.then(res => res.data);
|
|
91
96
|
}
|
|
92
97
|
deepSummaryByZone(eventKey) {
|
|
93
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byZone', eventKey))
|
|
98
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byZone', eventKey), { params: this.queryParams() })
|
|
94
99
|
.then(res => res.data);
|
|
95
100
|
}
|
|
96
101
|
byAvailability(eventKey, availability = null) {
|
|
97
|
-
return this.client.get(EventReports.reportUrl('byAvailability', eventKey, availability))
|
|
102
|
+
return this.client.get(EventReports.reportUrl('byAvailability', eventKey, availability), { params: this.queryParams() })
|
|
98
103
|
.then(res => Utilities.createEventReport(res.data));
|
|
99
104
|
}
|
|
100
105
|
byAvailabilityReason(eventKey, availabilityReason = null) {
|
|
101
|
-
return this.client.get(EventReports.reportUrl('byAvailabilityReason', eventKey, availabilityReason))
|
|
106
|
+
return this.client.get(EventReports.reportUrl('byAvailabilityReason', eventKey, availabilityReason), { params: this.queryParams() })
|
|
102
107
|
.then(res => Utilities.createEventReport(res.data));
|
|
103
108
|
}
|
|
104
109
|
summaryByAvailability(eventKey) {
|
|
105
|
-
return this.client.get(EventReports.summaryReportUrl('byAvailability', eventKey))
|
|
110
|
+
return this.client.get(EventReports.summaryReportUrl('byAvailability', eventKey), { params: this.queryParams() })
|
|
106
111
|
.then(res => res.data);
|
|
107
112
|
}
|
|
108
113
|
summaryByAvailabilityReason(eventKey) {
|
|
109
|
-
return this.client.get(EventReports.summaryReportUrl('byAvailabilityReason', eventKey))
|
|
114
|
+
return this.client.get(EventReports.summaryReportUrl('byAvailabilityReason', eventKey), { params: this.queryParams() })
|
|
110
115
|
.then(res => res.data);
|
|
111
116
|
}
|
|
112
117
|
deepSummaryByAvailability(eventKey) {
|
|
113
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byAvailability', eventKey))
|
|
118
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byAvailability', eventKey), { params: this.queryParams() })
|
|
114
119
|
.then(res => res.data);
|
|
115
120
|
}
|
|
116
121
|
deepSummaryByAvailabilityReason(eventKey) {
|
|
117
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byAvailabilityReason', eventKey))
|
|
122
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byAvailabilityReason', eventKey), { params: this.queryParams() })
|
|
118
123
|
.then(res => res.data);
|
|
119
124
|
}
|
|
120
125
|
byChannel(eventKey, channel = null) {
|
|
121
|
-
return this.client.get(EventReports.reportUrl('byChannel', eventKey, channel))
|
|
126
|
+
return this.client.get(EventReports.reportUrl('byChannel', eventKey, channel), { params: this.queryParams() })
|
|
122
127
|
.then(res => Utilities.createEventReport(res.data));
|
|
123
128
|
}
|
|
124
129
|
summaryByChannel(eventKey) {
|
|
125
|
-
return this.client.get(EventReports.summaryReportUrl('byChannel', eventKey))
|
|
130
|
+
return this.client.get(EventReports.summaryReportUrl('byChannel', eventKey), { params: this.queryParams() })
|
|
126
131
|
.then(res => res.data);
|
|
127
132
|
}
|
|
128
133
|
deepSummaryByChannel(eventKey) {
|
|
129
|
-
return this.client.get(EventReports.deepSummaryReportUrl('byChannel', eventKey))
|
|
134
|
+
return this.client.get(EventReports.deepSummaryReportUrl('byChannel', eventKey), { params: this.queryParams() })
|
|
130
135
|
.then(res => res.data);
|
|
131
136
|
}
|
|
137
|
+
queryParams() {
|
|
138
|
+
if (this.seasonBookingsPropagated) {
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
return { seasonBookingsPropagated: false };
|
|
142
|
+
}
|
|
132
143
|
static reportUrl(reportType, eventKey, filter) {
|
|
133
144
|
if (filter === null || typeof filter === 'undefined') {
|
|
134
145
|
return `/reports/events/${encodeURIComponent(eventKey)}/${reportType}`;
|
|
@@ -7,6 +7,9 @@ export function errorResponseHandler(e) {
|
|
|
7
7
|
else if (typeof e.response.statusText !== 'undefined' && e.response.statusText) {
|
|
8
8
|
reject(`${e.config.method} ${e.config.url} resulted in ${e.response.status} ${e.response.statusText} error`); // eslint-disable-line
|
|
9
9
|
}
|
|
10
|
+
else {
|
|
11
|
+
reject(`${e.config.method} ${e.config.url} resulted in ${e.response.status} error`); // eslint-disable-line
|
|
12
|
+
}
|
|
10
13
|
}
|
|
11
14
|
else {
|
|
12
15
|
reject(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seatsio",
|
|
3
|
-
"version": "90.
|
|
3
|
+
"version": "90.2.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"url": "https://github.com/seatsio/seatsio-js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"axios": "1.
|
|
22
|
+
"axios": "1.20.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/node": "26.
|
|
25
|
+
"@types/node": "26.4.0",
|
|
26
26
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
27
27
|
"@typescript-eslint/parser": "5.62.0",
|
|
28
|
+
"@vitest/browser": "3.2.7",
|
|
28
29
|
"ctix": "2.8.2",
|
|
29
30
|
"eslint": "8.57.1",
|
|
30
31
|
"eslint-config-standard": "17.1.0",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"eslint-plugin-import": "2.32.0",
|
|
33
34
|
"eslint-plugin-n": "16.6.2",
|
|
34
35
|
"eslint-plugin-promise": "6.6.0",
|
|
35
|
-
"
|
|
36
|
+
"playwright": "1.62.1",
|
|
36
37
|
"prettier": "3.9.6",
|
|
37
38
|
"semver": "7.8.5",
|
|
38
39
|
"typescript": "6.0.3",
|