seatsio 90.7.0 → 90.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.
@@ -5,6 +5,7 @@ import { CategoryJson, CategoryKey } from './Category.js';
5
5
  import { CategoryUpdateParams } from './CategoryUpdateParams.js';
6
6
  import { Chart, ChartJson, Venue } from './Chart.js';
7
7
  import { ChartListParams } from './ChartListParams.js';
8
+ import { Event, EventJson } from '../Events/Event.js';
8
9
  export declare class Charts {
9
10
  archive: Lister<Chart, ChartJson>;
10
11
  client: Axios;
@@ -38,5 +39,6 @@ export declare class Charts {
38
39
  listFirstPage(chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
39
40
  listPageAfter(afterId: number, chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
40
41
  listPageBefore(beforeId: number, chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
42
+ events(chartKey: string): Lister<Event, EventJson>;
41
43
  iterator(): Lister<Chart, ChartJson>;
42
44
  }
@@ -1,6 +1,7 @@
1
1
  import { Lister } from '../Lister.js';
2
2
  import { Page } from '../Page.js';
3
3
  import { Chart } from './Chart.js';
4
+ import { EventDeserializer } from '../Events/EventDeserializer.js';
4
5
  export class Charts {
5
6
  archive;
6
7
  client;
@@ -132,6 +133,12 @@ export class Charts {
132
133
  listPageBefore(beforeId, chartListParams = null, pageSize = null) {
133
134
  return this.iterator().pageBefore(beforeId, chartListParams, pageSize);
134
135
  }
136
+ events(chartKey) {
137
+ return new Lister(`/charts/${encodeURIComponent(chartKey)}/events`, this.client, data => {
138
+ const events = data.items.map(eventData => new EventDeserializer().fromJson(eventData));
139
+ return new Page(events, data.next_page_starts_after, data.previous_page_ends_before);
140
+ });
141
+ }
135
142
  iterator() {
136
143
  return new Lister('/charts', this.client, data => {
137
144
  const charts = data.items.map(chartData => new Chart(chartData));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seatsio",
3
- "version": "90.7.0",
3
+ "version": "90.9.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "type": "module",
@@ -19,10 +19,10 @@
19
19
  "url": "https://github.com/seatsio/seatsio-js"
20
20
  },
21
21
  "dependencies": {
22
- "axios": "1.20.0"
22
+ "axios": "1.21.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "26.6.3",
25
+ "@types/node": "26.6.6",
26
26
  "@typescript-eslint/eslint-plugin": "5.62.0",
27
27
  "@typescript-eslint/parser": "5.62.0",
28
28
  "@vitest/browser": "4.1.11",
@@ -34,8 +34,8 @@
34
34
  "eslint-plugin-import": "2.32.0",
35
35
  "eslint-plugin-n": "16.6.2",
36
36
  "eslint-plugin-promise": "6.6.0",
37
- "playwright": "1.63.0",
38
- "prettier": "3.9.9",
37
+ "playwright": "1.64.1",
38
+ "prettier": "3.9.10",
39
39
  "semver": "7.8.5",
40
40
  "typescript": "6.0.3",
41
41
  "vitest": "4.1.11",