seatsio 77.2.0 → 77.4.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.
@@ -1,4 +1,5 @@
1
1
  import { Axios } from 'axios';
2
+ import { Channel } from './Channel';
2
3
  export declare class Channels {
3
4
  client: Axios;
4
5
  constructor(client: Axios);
@@ -8,5 +9,5 @@ export declare class Channels {
8
9
  update(eventKey: string, channelKey: string, newChannelName: any, newColor: any, newObjects: any): Promise<import("axios").AxiosResponse<any, any>>;
9
10
  addObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
10
11
  removeObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
11
- replace(eventKey: string, channels: any): Promise<import("axios").AxiosResponse<any, any>>;
12
+ replace(eventKey: string, channels: Channel[]): Promise<import("axios").AxiosResponse<any, any>>;
12
13
  }
@@ -1,3 +1,6 @@
1
1
  import { AbstractEventParams } from './AbstractEventParams';
2
+ import { Channel } from './Channel';
2
3
  export declare class CreateEventParams extends AbstractEventParams {
4
+ channels?: Channel[];
5
+ withChannels(channels: Channel[]): this;
3
6
  }
@@ -22,6 +22,10 @@ var CreateEventParams = /** @class */ (function (_super) {
22
22
  function CreateEventParams() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
+ CreateEventParams.prototype.withChannels = function (channels) {
26
+ this.channels = channels;
27
+ return this;
28
+ };
25
29
  return CreateEventParams;
26
30
  }(AbstractEventParams_1.AbstractEventParams));
27
31
  exports.CreateEventParams = CreateEventParams;
@@ -37,5 +37,8 @@ export declare class EventObjectInfo {
37
37
  section?: string;
38
38
  status: string;
39
39
  ticketType?: string;
40
+ variableOccupancy?: boolean;
41
+ minOccupancy?: number;
42
+ maxOccupancy?: number;
40
43
  constructor(json: EventObjectInfoJson);
41
44
  }
@@ -36,6 +36,9 @@ var EventObjectInfo = exports.EventObjectInfo = /** @class */ (function () {
36
36
  this.distanceToFocalPoint = json.distanceToFocalPoint;
37
37
  this.holds = json.holds;
38
38
  this.numSeats = json.numSeats;
39
+ this.variableOccupancy = json.variableOccupancy;
40
+ this.minOccupancy = json.minOccupancy;
41
+ this.maxOccupancy = json.maxOccupancy;
39
42
  }
40
43
  EventObjectInfo.FREE = 'free';
41
44
  EventObjectInfo.BOOKED = 'booked';
@@ -72,6 +72,9 @@ var Events = /** @class */ (function () {
72
72
  if (params.date !== undefined) {
73
73
  requestParameters.date = params.date.toString();
74
74
  }
75
+ if (params.channels !== undefined) {
76
+ requestParameters.channels = params.channels;
77
+ }
75
78
  }
76
79
  return this.client.post('/events', requestParameters)
77
80
  .then(function (res) { return new EventDeserializer_1.EventDeserializer().fromJson(res.data); });
@@ -102,6 +105,9 @@ var Events = /** @class */ (function () {
102
105
  if (eventParams.date !== undefined) {
103
106
  eventRequest.date = eventParams.date.toString();
104
107
  }
108
+ if (eventParams.channels !== undefined) {
109
+ eventRequest.channels = eventParams.channels;
110
+ }
105
111
  requestParameters.events.push(eventRequest);
106
112
  }
107
113
  }
@@ -1,11 +1,14 @@
1
1
  import { TableBookingConfig } from '../Events/TableBookingConfig';
2
+ import { Channel } from '../Events/Channel';
2
3
  export declare class SeasonParams {
3
4
  _eventKeys?: string[];
4
5
  _key?: string;
5
6
  _numberOfEvents?: number;
6
7
  _tableBookingConfig?: TableBookingConfig;
8
+ _channels?: Channel[];
7
9
  key(key: string): this;
8
10
  numberOfEvents(numberOfEvents: number): this;
9
11
  eventKeys(eventKeys: string[]): this;
10
12
  tableBookingConfig(tableBookingConfig: TableBookingConfig): this;
13
+ channels(channels: Channel[]): this;
11
14
  }
@@ -20,6 +20,10 @@ var SeasonParams = /** @class */ (function () {
20
20
  this._tableBookingConfig = tableBookingConfig;
21
21
  return this;
22
22
  };
23
+ SeasonParams.prototype.channels = function (channels) {
24
+ this._channels = channels;
25
+ return this;
26
+ };
23
27
  return SeasonParams;
24
28
  }());
25
29
  exports.SeasonParams = SeasonParams;
@@ -49,18 +49,21 @@ var Seasons = /** @class */ (function () {
49
49
  var requestParameters = {};
50
50
  requestParameters.chartKey = chartKey;
51
51
  if (seasonParams !== null) {
52
- if (seasonParams._key !== null) {
52
+ if (seasonParams._key !== undefined) {
53
53
  requestParameters.key = seasonParams._key;
54
54
  }
55
- if (seasonParams._numberOfEvents !== null) {
55
+ if (seasonParams._numberOfEvents !== undefined) {
56
56
  requestParameters.numberOfEvents = seasonParams._numberOfEvents;
57
57
  }
58
- if (seasonParams._eventKeys !== null) {
58
+ if (seasonParams._eventKeys !== undefined) {
59
59
  requestParameters.eventKeys = seasonParams._eventKeys;
60
60
  }
61
- if (seasonParams._tableBookingConfig !== null) {
61
+ if (seasonParams._tableBookingConfig !== undefined) {
62
62
  requestParameters.tableBookingConfig = seasonParams._tableBookingConfig;
63
63
  }
64
+ if (seasonParams._channels !== undefined) {
65
+ requestParameters.channels = seasonParams._channels;
66
+ }
64
67
  }
65
68
  return this.client.post('/seasons', requestParameters)
66
69
  .then(function (res) { return new Season_1.Season(res.data); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seatsio",
3
- "version": "77.2.0",
3
+ "version": "77.4.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [
@@ -21,19 +21,19 @@
21
21
  "axios": "1.4.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@jest/globals": "29.5.0",
25
- "@types/jest": "29.5.2",
26
- "@types/node": "20.3.3",
24
+ "@jest/globals": "29.6.2",
25
+ "@types/jest": "29.5.3",
26
+ "@types/node": "20.4.8",
27
27
  "@types/uuid": "9.0.2",
28
- "@typescript-eslint/eslint-plugin": "5.60.1",
29
- "@typescript-eslint/parser": "5.60.1",
30
- "eslint": "8.44.0",
28
+ "@typescript-eslint/eslint-plugin": "5.62.0",
29
+ "@typescript-eslint/parser": "5.62.0",
30
+ "eslint": "8.46.0",
31
31
  "eslint-config-standard": "17.1.0",
32
- "eslint-plugin-import": "2.27.5",
32
+ "eslint-plugin-import": "2.28.0",
33
33
  "eslint-plugin-n": "16.0.1",
34
34
  "eslint-plugin-promise": "6.1.1",
35
- "jest": "29.5.0",
36
- "jest-cli": "29.5.0",
35
+ "jest": "29.6.2",
36
+ "jest-cli": "29.6.2",
37
37
  "ts-jest": "29.1.1",
38
38
  "typescript": "5.1.6",
39
39
  "ctix": "1.8.2",