seatsio 76.2.0 → 77.0.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,5 +1,4 @@
1
1
  import { ChartValidation } from './ChartValidation';
2
- import { SocialDistancingRuleset, SocialDistancingRulesetJson } from './SocialDistancingRuleset';
3
2
  import { Event } from '../Events/Event';
4
3
  import { Dict } from '../Dict';
5
4
  export type ChartJson = Dict<any>;
@@ -11,10 +10,8 @@ export declare class Chart {
11
10
  key: string;
12
11
  name: string;
13
12
  publishedVersionThumbnailUrl: string;
14
- socialDistancingRulesets?: Dict<SocialDistancingRuleset>;
15
13
  status: string;
16
14
  tags: string[];
17
15
  validation?: ChartValidation;
18
16
  constructor(chart: ChartJson);
19
- static socialDistancingRulesetsFromJson(json: SocialDistancingRulesetJson): Dict<SocialDistancingRuleset> | undefined;
20
17
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Chart = void 0;
4
4
  var EventDeserializer_1 = require("../Events/EventDeserializer");
5
5
  var ChartValidation_1 = require("./ChartValidation");
6
- var SocialDistancingRuleset_1 = require("./SocialDistancingRuleset");
7
6
  var Chart = /** @class */ (function () {
8
7
  function Chart(chart) {
9
8
  this.name = chart.name;
@@ -17,18 +16,7 @@ var Chart = /** @class */ (function () {
17
16
  this.archived = chart.archived;
18
17
  if (chart.validation)
19
18
  this.validation = new ChartValidation_1.ChartValidation(chart.validation);
20
- this.socialDistancingRulesets = Chart.socialDistancingRulesetsFromJson(chart.socialDistancingRulesets);
21
19
  }
22
- Chart.socialDistancingRulesetsFromJson = function (json) {
23
- if (json === undefined) {
24
- return undefined;
25
- }
26
- var result = {};
27
- for (var key in json) {
28
- result[key] = SocialDistancingRuleset_1.SocialDistancingRuleset.fromJson(json[key]);
29
- }
30
- return result;
31
- };
32
20
  return Chart;
33
21
  }());
34
22
  exports.Chart = Chart;
@@ -27,7 +27,6 @@ export declare class Charts {
27
27
  copyDraftVersion(key: string): Promise<Chart>;
28
28
  copyToSubaccount(key: string, subaccountId: number): Promise<Chart>;
29
29
  copyToWorkspace(key: string, workspaceKey: string): Promise<Chart>;
30
- saveSocialDistancingRulesets(key: string, socialDistancingRulesets: object): Promise<import("axios").AxiosResponse<any, any>>;
31
30
  retrievePublishedVersionThumbnail(key: string): Promise<any>;
32
31
  retrieveDraftVersionThumbnail(key: string): Promise<any>;
33
32
  listAllTags(): Promise<any>;
@@ -103,9 +103,6 @@ var Charts = /** @class */ (function () {
103
103
  return this.client.post("charts/".concat(key, "/version/published/actions/copy-to-workspace/").concat(workspaceKey))
104
104
  .then(function (res) { return new Chart_1.Chart(res.data); });
105
105
  };
106
- Charts.prototype.saveSocialDistancingRulesets = function (key, socialDistancingRulesets) {
107
- return this.client.post("/charts/".concat(key, "/social-distancing-rulesets"), { socialDistancingRulesets: socialDistancingRulesets });
108
- };
109
106
  Charts.prototype.retrievePublishedVersionThumbnail = function (key) {
110
107
  return this.client.get("/charts/".concat(key, "/version/published/thumbnail"), { responseType: 'arraybuffer' })
111
108
  .then(function (res) { return res.data; });
@@ -0,0 +1,17 @@
1
+ import { TableBookingConfig } from './TableBookingConfig';
2
+ import { Category } from '../Charts/Category';
3
+ import { LocalDate } from '../LocalDate';
4
+ export declare abstract class AbstractEventParams {
5
+ key?: string;
6
+ tableBookingConfig?: TableBookingConfig;
7
+ objectCategories?: object;
8
+ categories?: Category[];
9
+ name?: string;
10
+ date?: LocalDate;
11
+ withKey(key: string): this;
12
+ withTableBookingConfig(tableBookingConfig: TableBookingConfig): this;
13
+ withObjectCategories(objectCategories: object): this;
14
+ withCategories(categories: Category[]): this;
15
+ withName(name: string): this;
16
+ withDate(date: LocalDate): this;
17
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AbstractEventParams = void 0;
4
+ var AbstractEventParams = /** @class */ (function () {
5
+ function AbstractEventParams() {
6
+ }
7
+ AbstractEventParams.prototype.withKey = function (key) {
8
+ this.key = key;
9
+ return this;
10
+ };
11
+ AbstractEventParams.prototype.withTableBookingConfig = function (tableBookingConfig) {
12
+ this.tableBookingConfig = tableBookingConfig;
13
+ return this;
14
+ };
15
+ AbstractEventParams.prototype.withObjectCategories = function (objectCategories) {
16
+ this.objectCategories = objectCategories;
17
+ return this;
18
+ };
19
+ AbstractEventParams.prototype.withCategories = function (categories) {
20
+ this.categories = categories;
21
+ return this;
22
+ };
23
+ AbstractEventParams.prototype.withName = function (name) {
24
+ this.name = name;
25
+ return this;
26
+ };
27
+ AbstractEventParams.prototype.withDate = function (date) {
28
+ this.date = date;
29
+ return this;
30
+ };
31
+ return AbstractEventParams;
32
+ }());
33
+ exports.AbstractEventParams = AbstractEventParams;
@@ -0,0 +1,3 @@
1
+ import { AbstractEventParams } from './AbstractEventParams';
2
+ export declare class CreateEventParams extends AbstractEventParams {
3
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CreateEventParams = void 0;
19
+ var AbstractEventParams_1 = require("./AbstractEventParams");
20
+ var CreateEventParams = /** @class */ (function (_super) {
21
+ __extends(CreateEventParams, _super);
22
+ function CreateEventParams() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ return CreateEventParams;
26
+ }(AbstractEventParams_1.AbstractEventParams));
27
+ exports.CreateEventParams = CreateEventParams;
@@ -17,7 +17,6 @@ export declare class Event {
17
17
  isTopLevelSeason: boolean;
18
18
  key: string;
19
19
  objectCategories?: Map<string, any>;
20
- socialDistancingRulesetKey?: string;
21
20
  supportsBestAvailable: boolean;
22
21
  tableBookingConfig: TableBookingConfig;
23
22
  topLevelSeasonKey?: string;
@@ -16,7 +16,6 @@ var Event = /** @class */ (function () {
16
16
  this.createdOn = json.createdOn ? new Date(json.createdOn) : null;
17
17
  this.updatedOn = json.updatedOn ? new Date(json.updatedOn) : null;
18
18
  this.channels = json.channels ? json.channels.map(function (c) { return new Channel_1.Channel(c); }) : null;
19
- this.socialDistancingRulesetKey = json.socialDistancingRulesetKey;
20
19
  this.topLevelSeasonKey = json.topLevelSeasonKey;
21
20
  this.isTopLevelSeason = json.isTopLevelSeason;
22
21
  this.isPartialSeason = json.isPartialSeason;
@@ -24,7 +24,6 @@ export declare class EventObjectInfo {
24
24
  isAccessible?: boolean;
25
25
  isAvailable: boolean;
26
26
  isCompanionSeat?: boolean;
27
- isDisabledBySocialDistancing: boolean;
28
27
  label: string;
29
28
  labels: Labels;
30
29
  leftNeighbour?: string;
@@ -32,7 +32,6 @@ var EventObjectInfo = exports.EventObjectInfo = /** @class */ (function () {
32
32
  this.rightNeighbour = json.rightNeighbour;
33
33
  this.isAvailable = json.isAvailable;
34
34
  this.availabilityReason = json.availabilityReason;
35
- this.isDisabledBySocialDistancing = json.isDisabledBySocialDistancing;
36
35
  this.channel = json.channel;
37
36
  this.distanceToFocalPoint = json.distanceToFocalPoint;
38
37
  this.holds = json.holds;
@@ -5,13 +5,12 @@ import { Channels } from './Channels';
5
5
  import { StatusChange, StatusChangeJson } from './StatusChange';
6
6
  import { ChangeObjectStatusResult } from './ChangeObjectStatusResult';
7
7
  import { BestAvailableObjects } from './BestAvailableObjects';
8
- import { TableBookingConfig } from './TableBookingConfig';
9
8
  import { Event, EventJson } from './Event';
10
9
  import { Axios } from 'axios';
11
- import { Category } from '../Charts/Category';
12
10
  import { Dict } from '../Dict';
13
11
  import { StatusChangeRequest } from './StatusChangeRequest';
14
- import { LocalDate } from '../LocalDate';
12
+ import { CreateEventParams } from './CreateEventParams';
13
+ import { UpdateEventParams } from './UpdateEventParams';
15
14
  export interface ObjectIdAndTicketType {
16
15
  objectId: string;
17
16
  ticketType?: string;
@@ -22,11 +21,10 @@ export declare class Events {
22
21
  channels: Channels;
23
22
  client: Axios;
24
23
  constructor(client: Axios);
25
- create(chartKey: string, eventKey?: string | null, tableBookingConfig?: TableBookingConfig | null, socialDistancingRulesetKey?: string | null, objectCategories?: object | null, categories?: Category[] | null, name?: string | null, date?: LocalDate | null): Promise<Event>;
26
- static eventCreationParams(eventKey?: string | null, tableBookingConfig?: TableBookingConfig | null, socialDistancingRulesetKey?: string | null, objectCategories?: object | null, categories?: Category[] | null, name?: string | null, date?: LocalDate | null): Dict<any>;
27
- createMultiple(chartKey: string, events?: any[]): Promise<Event[]>;
24
+ create(chartKey: string, params?: CreateEventParams): Promise<Event>;
25
+ createMultiple(chartKey: string, events?: CreateEventParams[]): Promise<Event[]>;
28
26
  retrieve(eventKey: string): Promise<Event>;
29
- update(eventKey: string, chartKey?: string | null, newEventKey?: string | null, tableBookingConfig?: TableBookingConfig | null, socialDistancingRulesetKey?: string | null, objectCategories?: object | null, categories?: Category[] | null, name?: string | null, date?: LocalDate | null): Promise<import("axios").AxiosResponse<any, any>>;
27
+ update(eventKey: string, params: UpdateEventParams): Promise<import("axios").AxiosResponse<any, any>>;
30
28
  delete(eventKey: string): Promise<import("axios").AxiosResponse<any, any>>;
31
29
  listAll(requestParameters?: {}): import("../AsyncIterator").AsyncIterator<Event>;
32
30
  listFirstPage(pageSize?: number | null): Promise<Page<Event>>;
@@ -42,13 +40,13 @@ export declare class Events {
42
40
  updateExtraDatas(eventKey: string, extraData: Dict<any>): Promise<import("axios").AxiosResponse<any, any>>;
43
41
  retrieveObjectInfo(eventKey: string, label: string): Promise<EventObjectInfo>;
44
42
  retrieveObjectInfos(eventKey: string, labels: string[]): Promise<Dict<EventObjectInfo>>;
45
- changeObjectStatus(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, status: string, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, ignoreSocialDistancing?: boolean | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null): Promise<ChangeObjectStatusResult>;
43
+ changeObjectStatus(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, status: string, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null): Promise<ChangeObjectStatusResult>;
46
44
  changeObjectStatusInBatch(statusChangeRequests: StatusChangeRequest[]): Promise<any>;
47
- changeObjectStatusRequest(objectOrObjects: ObjectOrObjects, status: string, holdToken: string | null, orderId: string | null, keepExtraData: boolean | null, ignoreChannels: boolean | null, channelKeys?: string[] | null, ignoreSocialDistancing?: boolean | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null): Dict<any>;
48
- book(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, ignoreSocialDistancing?: boolean | null): Promise<ChangeObjectStatusResult>;
45
+ changeObjectStatusRequest(objectOrObjects: ObjectOrObjects, status: string, holdToken: string | null, orderId: string | null, keepExtraData: boolean | null, ignoreChannels: boolean | null, channelKeys?: string[] | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null): Dict<any>;
46
+ book(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
49
47
  bookBestAvailable(eventKey: string, number: number, categories?: string[] | null, holdToken?: string | null, extraData?: Dict<any> | null, ticketTypes?: string[] | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, tryToPreventOrphanSeats?: boolean | null): Promise<BestAvailableObjects>;
50
48
  release(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
51
- hold(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken: string, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, ignoreSocialDistancing?: boolean | null): Promise<ChangeObjectStatusResult>;
49
+ hold(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken: string, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
52
50
  holdBestAvailable(eventKey: string, number: number, holdToken: string, categories?: string[] | null, extraData?: Dict<any> | null, ticketTypes?: string[] | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, tryToPreventOrphanSeats?: boolean | null): Promise<BestAvailableObjects>;
53
51
  changeBestAvailableObjectStatus(eventKey: string, number: number, status: string, categories?: string[] | null, holdToken?: string | null, extraData?: Dict<any> | null, ticketTypes?: string[] | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null, tryToPreventOrphanSeats?: boolean | null): Promise<BestAvailableObjects>;
54
52
  normalizeObjects(objectOrObjects: ObjectOrObjects): ObjectIdAndTicketType[];
@@ -50,87 +50,59 @@ var Events = /** @class */ (function () {
50
50
  this.client = client;
51
51
  this.channels = new Channels_1.Channels(this.client);
52
52
  }
53
- Events.prototype.create = function (chartKey, eventKey, tableBookingConfig, socialDistancingRulesetKey, objectCategories, categories, name, date) {
54
- if (eventKey === void 0) { eventKey = null; }
55
- if (tableBookingConfig === void 0) { tableBookingConfig = null; }
56
- if (socialDistancingRulesetKey === void 0) { socialDistancingRulesetKey = null; }
57
- if (objectCategories === void 0) { objectCategories = null; }
58
- if (categories === void 0) { categories = null; }
59
- if (name === void 0) { name = null; }
60
- if (date === void 0) { date = null; }
53
+ Events.prototype.create = function (chartKey, params) {
61
54
  var requestParameters = {};
62
55
  requestParameters.chartKey = chartKey;
63
- if (eventKey !== null) {
64
- requestParameters.eventKey = eventKey;
65
- }
66
- if (tableBookingConfig !== null) {
67
- requestParameters.tableBookingConfig = tableBookingConfig;
68
- }
69
- if (socialDistancingRulesetKey !== null) {
70
- requestParameters.socialDistancingRulesetKey = socialDistancingRulesetKey;
71
- }
72
- if (objectCategories !== null) {
73
- requestParameters.objectCategories = objectCategories;
74
- }
75
- if (categories != null) {
76
- requestParameters.categories = categories;
77
- }
78
- if (name != null) {
79
- requestParameters.name = name;
80
- }
81
- if (date != null) {
82
- requestParameters.date = date.toString();
56
+ if (params !== undefined) {
57
+ if (params.key !== undefined) {
58
+ requestParameters.eventKey = params.key;
59
+ }
60
+ if (params.tableBookingConfig !== undefined) {
61
+ requestParameters.tableBookingConfig = params.tableBookingConfig;
62
+ }
63
+ if (params.objectCategories !== undefined) {
64
+ requestParameters.objectCategories = params.objectCategories;
65
+ }
66
+ if (params.categories !== undefined) {
67
+ requestParameters.categories = params.categories;
68
+ }
69
+ if (params.name !== undefined) {
70
+ requestParameters.name = params.name;
71
+ }
72
+ if (params.date !== undefined) {
73
+ requestParameters.date = params.date.toString();
74
+ }
83
75
  }
84
76
  return this.client.post('/events', requestParameters)
85
77
  .then(function (res) { return new EventDeserializer_1.EventDeserializer().fromJson(res.data); });
86
78
  };
87
- Events.eventCreationParams = function (eventKey, tableBookingConfig, socialDistancingRulesetKey, objectCategories, categories, name, date) {
88
- if (eventKey === void 0) { eventKey = null; }
89
- if (tableBookingConfig === void 0) { tableBookingConfig = null; }
90
- if (socialDistancingRulesetKey === void 0) { socialDistancingRulesetKey = null; }
91
- if (objectCategories === void 0) { objectCategories = null; }
92
- if (categories === void 0) { categories = null; }
93
- if (name === void 0) { name = null; }
94
- if (date === void 0) { date = null; }
95
- var eventDefinition = {};
96
- eventDefinition.eventKey = eventKey;
97
- eventDefinition.tableBookingConfig = tableBookingConfig;
98
- eventDefinition.socialDistancingRulesetKey = socialDistancingRulesetKey;
99
- eventDefinition.objectCategories = objectCategories;
100
- eventDefinition.categories = categories;
101
- eventDefinition.name = name;
102
- eventDefinition.date = date;
103
- return eventDefinition;
104
- };
105
79
  Events.prototype.createMultiple = function (chartKey, events) {
106
80
  var requestParameters = {};
107
81
  requestParameters.chartKey = chartKey;
108
82
  requestParameters.events = [];
109
83
  if (events) {
110
84
  for (var i = 0; i < events.length; i++) {
111
- var event_1 = {};
112
- if (events[i].eventKey !== null) {
113
- event_1.eventKey = events[i].eventKey;
85
+ var eventRequest = {};
86
+ var eventParams = events[i];
87
+ if (eventParams.key !== undefined) {
88
+ eventRequest.eventKey = eventParams.key;
114
89
  }
115
- if (events[i].tableBookingConfig !== null) {
116
- event_1.tableBookingConfig = events[i].tableBookingConfig;
90
+ if (eventParams.tableBookingConfig !== undefined) {
91
+ eventRequest.tableBookingConfig = eventParams.tableBookingConfig;
117
92
  }
118
- if (events[i].socialDistancingRulesetKey !== null) {
119
- event_1.socialDistancingRulesetKey = events[i].socialDistancingRulesetKey;
93
+ if (eventParams.objectCategories !== undefined) {
94
+ eventRequest.objectCategories = eventParams.objectCategories;
120
95
  }
121
- if (events[i].objectCategories !== null) {
122
- event_1.objectCategories = events[i].objectCategories;
96
+ if (eventParams.categories !== undefined) {
97
+ eventRequest.categories = eventParams.categories;
123
98
  }
124
- if (events[i].categories != null) {
125
- event_1.categories = events[i].categories;
99
+ if (eventParams.name !== undefined) {
100
+ eventRequest.name = eventParams.name;
126
101
  }
127
- if (events[i].name != null) {
128
- event_1.name = events[i].name;
102
+ if (eventParams.date !== undefined) {
103
+ eventRequest.date = eventParams.date.toString();
129
104
  }
130
- if (events[i].date != null) {
131
- event_1.date = events[i].date.toString();
132
- }
133
- requestParameters.events.push(event_1);
105
+ requestParameters.events.push(eventRequest);
134
106
  }
135
107
  }
136
108
  return this.client.post('/events/actions/create-multiple', requestParameters)
@@ -138,8 +110,8 @@ var Events = /** @class */ (function () {
138
110
  var result = [];
139
111
  var deserializer = new EventDeserializer_1.EventDeserializer();
140
112
  for (var _i = 0, _a = res.data.events; _i < _a.length; _i++) {
141
- var event_2 = _a[_i];
142
- result.push(deserializer.fromJson(event_2));
113
+ var event_1 = _a[_i];
114
+ result.push(deserializer.fromJson(event_1));
143
115
  }
144
116
  return result;
145
117
  });
@@ -148,39 +120,28 @@ var Events = /** @class */ (function () {
148
120
  return this.client.get("/events/".concat(encodeURIComponent(eventKey)))
149
121
  .then(function (res) { return new EventDeserializer_1.EventDeserializer().fromJson(res.data); });
150
122
  };
151
- Events.prototype.update = function (eventKey, chartKey, newEventKey, tableBookingConfig, socialDistancingRulesetKey, objectCategories, categories, name, date) {
152
- if (chartKey === void 0) { chartKey = null; }
153
- if (newEventKey === void 0) { newEventKey = null; }
154
- if (tableBookingConfig === void 0) { tableBookingConfig = null; }
155
- if (socialDistancingRulesetKey === void 0) { socialDistancingRulesetKey = null; }
156
- if (objectCategories === void 0) { objectCategories = null; }
157
- if (categories === void 0) { categories = null; }
158
- if (name === void 0) { name = null; }
159
- if (date === void 0) { date = null; }
123
+ Events.prototype.update = function (eventKey, params) {
160
124
  var requestParameters = {};
161
- if (chartKey !== null) {
162
- requestParameters.chartKey = chartKey;
125
+ if (params.chartKey !== undefined) {
126
+ requestParameters.chartKey = params.chartKey;
163
127
  }
164
- if (newEventKey !== null) {
165
- requestParameters.eventKey = newEventKey;
128
+ if (params.key !== undefined) {
129
+ requestParameters.eventKey = params.key;
166
130
  }
167
- if (tableBookingConfig !== null) {
168
- requestParameters.tableBookingConfig = tableBookingConfig;
131
+ if (params.tableBookingConfig !== undefined) {
132
+ requestParameters.tableBookingConfig = params.tableBookingConfig;
169
133
  }
170
- if (socialDistancingRulesetKey !== null) {
171
- requestParameters.socialDistancingRulesetKey = socialDistancingRulesetKey;
134
+ if (params.objectCategories !== undefined) {
135
+ requestParameters.objectCategories = params.objectCategories;
172
136
  }
173
- if (objectCategories !== null) {
174
- requestParameters.objectCategories = objectCategories;
137
+ if (params.categories !== undefined) {
138
+ requestParameters.categories = params.categories;
175
139
  }
176
- if (categories != null) {
177
- requestParameters.categories = categories;
140
+ if (params.name !== undefined) {
141
+ requestParameters.name = params.name;
178
142
  }
179
- if (name != null) {
180
- requestParameters.name = name;
181
- }
182
- if (date != null) {
183
- requestParameters.date = date.toString();
143
+ if (params.date !== undefined) {
144
+ requestParameters.date = params.date.toString();
184
145
  }
185
146
  return this.client.post("events/".concat(encodeURIComponent(eventKey)), requestParameters);
186
147
  };
@@ -294,16 +255,15 @@ var Events = /** @class */ (function () {
294
255
  return objectInfos;
295
256
  });
296
257
  };
297
- Events.prototype.changeObjectStatus = function (eventKeyOrKeys, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing, allowedPreviousStatuses, rejectedPreviousStatuses) {
258
+ Events.prototype.changeObjectStatus = function (eventKeyOrKeys, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
298
259
  if (holdToken === void 0) { holdToken = null; }
299
260
  if (orderId === void 0) { orderId = null; }
300
261
  if (keepExtraData === void 0) { keepExtraData = null; }
301
262
  if (ignoreChannels === void 0) { ignoreChannels = null; }
302
263
  if (channelKeys === void 0) { channelKeys = null; }
303
- if (ignoreSocialDistancing === void 0) { ignoreSocialDistancing = null; }
304
264
  if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
305
265
  if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
306
- var request = this.changeObjectStatusRequest(objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing, allowedPreviousStatuses, rejectedPreviousStatuses);
266
+ var request = this.changeObjectStatusRequest(objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses);
307
267
  request.events = Array.isArray(eventKeyOrKeys) ? eventKeyOrKeys : [eventKeyOrKeys];
308
268
  return this.client.post('/events/groups/actions/change-object-status?expand=objects', request)
309
269
  .then(function (res) { return new ChangeObjectStatusResult_1.ChangeObjectStatusResult(res.data.objects); });
@@ -311,7 +271,7 @@ var Events = /** @class */ (function () {
311
271
  Events.prototype.changeObjectStatusInBatch = function (statusChangeRequests) {
312
272
  var _this = this;
313
273
  var requests = statusChangeRequests.map(function (r) {
314
- var json = _this.changeObjectStatusRequest(r.objectOrObjects, r.status, r.holdToken, r.orderId, r.keepExtraData, r.ignoreChannels, r.channelKeys, null, r.allowedPreviousStatuses, r.rejectedPreviousStatuses);
274
+ var json = _this.changeObjectStatusRequest(r.objectOrObjects, r.status, r.holdToken, r.orderId, r.keepExtraData, r.ignoreChannels, r.channelKeys, r.allowedPreviousStatuses, r.rejectedPreviousStatuses);
315
275
  json.event = r.eventKey;
316
276
  return json;
317
277
  });
@@ -319,9 +279,8 @@ var Events = /** @class */ (function () {
319
279
  return this.client.post('/events/actions/change-object-status?expand=objects', request)
320
280
  .then(function (res) { return res.data.results.map(function (r) { return new ChangeObjectStatusResult_1.ChangeObjectStatusResult(r.objects); }); });
321
281
  };
322
- Events.prototype.changeObjectStatusRequest = function (objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing, allowedPreviousStatuses, rejectedPreviousStatuses) {
282
+ Events.prototype.changeObjectStatusRequest = function (objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
323
283
  if (channelKeys === void 0) { channelKeys = null; }
324
- if (ignoreSocialDistancing === void 0) { ignoreSocialDistancing = null; }
325
284
  if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
326
285
  if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
327
286
  var request = {};
@@ -342,9 +301,6 @@ var Events = /** @class */ (function () {
342
301
  if (channelKeys !== null) {
343
302
  request.channelKeys = channelKeys;
344
303
  }
345
- if (ignoreSocialDistancing !== null) {
346
- request.ignoreSocialDistancing = ignoreSocialDistancing;
347
- }
348
304
  if (allowedPreviousStatuses !== null) {
349
305
  request.allowedPreviousStatuses = allowedPreviousStatuses;
350
306
  }
@@ -353,14 +309,13 @@ var Events = /** @class */ (function () {
353
309
  }
354
310
  return request;
355
311
  };
356
- Events.prototype.book = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing) {
312
+ Events.prototype.book = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys) {
357
313
  if (holdToken === void 0) { holdToken = null; }
358
314
  if (orderId === void 0) { orderId = null; }
359
315
  if (keepExtraData === void 0) { keepExtraData = null; }
360
316
  if (ignoreChannels === void 0) { ignoreChannels = null; }
361
317
  if (channelKeys === void 0) { channelKeys = null; }
362
- if (ignoreSocialDistancing === void 0) { ignoreSocialDistancing = null; }
363
- return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.BOOKED, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing);
318
+ return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.BOOKED, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys);
364
319
  };
365
320
  Events.prototype.bookBestAvailable = function (eventKey, number, categories, holdToken, extraData, ticketTypes, orderId, keepExtraData, ignoreChannels, channelKeys, tryToPreventOrphanSeats) {
366
321
  if (categories === void 0) { categories = null; }
@@ -382,13 +337,12 @@ var Events = /** @class */ (function () {
382
337
  if (channelKeys === void 0) { channelKeys = null; }
383
338
  return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.FREE, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys);
384
339
  };
385
- Events.prototype.hold = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing) {
340
+ Events.prototype.hold = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys) {
386
341
  if (orderId === void 0) { orderId = null; }
387
342
  if (keepExtraData === void 0) { keepExtraData = null; }
388
343
  if (ignoreChannels === void 0) { ignoreChannels = null; }
389
344
  if (channelKeys === void 0) { channelKeys = null; }
390
- if (ignoreSocialDistancing === void 0) { ignoreSocialDistancing = null; }
391
- return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.HELD, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, ignoreSocialDistancing);
345
+ return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.HELD, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys);
392
346
  };
393
347
  Events.prototype.holdBestAvailable = function (eventKey, number, holdToken, categories, extraData, ticketTypes, orderId, keepExtraData, ignoreChannels, channelKeys, tryToPreventOrphanSeats) {
394
348
  if (categories === void 0) { categories = null; }
@@ -0,0 +1,5 @@
1
+ import { AbstractEventParams } from './AbstractEventParams';
2
+ export declare class UpdateEventParams extends AbstractEventParams {
3
+ chartKey?: string;
4
+ withChartKey(chartKey: string): this;
5
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.UpdateEventParams = void 0;
19
+ var AbstractEventParams_1 = require("./AbstractEventParams");
20
+ var UpdateEventParams = /** @class */ (function (_super) {
21
+ __extends(UpdateEventParams, _super);
22
+ function UpdateEventParams() {
23
+ return _super !== null && _super.apply(this, arguments) || this;
24
+ }
25
+ UpdateEventParams.prototype.withChartKey = function (chartKey) {
26
+ this.chartKey = chartKey;
27
+ return this;
28
+ };
29
+ return UpdateEventParams;
30
+ }(AbstractEventParams_1.AbstractEventParams));
31
+ exports.UpdateEventParams = UpdateEventParams;
@@ -3,11 +3,9 @@ export declare class SeasonParams {
3
3
  _eventKeys?: string[];
4
4
  _key?: string;
5
5
  _numberOfEvents?: number;
6
- _socialDistancingRulesetKey?: string;
7
6
  _tableBookingConfig?: TableBookingConfig;
8
7
  key(key: string): this;
9
8
  numberOfEvents(numberOfEvents: number): this;
10
9
  eventKeys(eventKeys: string[]): this;
11
10
  tableBookingConfig(tableBookingConfig: TableBookingConfig): this;
12
- socialDistancingRulesetKey(socialDistancingRulesetKey: string): this;
13
11
  }
@@ -20,10 +20,6 @@ var SeasonParams = /** @class */ (function () {
20
20
  this._tableBookingConfig = tableBookingConfig;
21
21
  return this;
22
22
  };
23
- SeasonParams.prototype.socialDistancingRulesetKey = function (socialDistancingRulesetKey) {
24
- this._socialDistancingRulesetKey = socialDistancingRulesetKey;
25
- return this;
26
- };
27
23
  return SeasonParams;
28
24
  }());
29
25
  exports.SeasonParams = SeasonParams;
@@ -61,9 +61,6 @@ var Seasons = /** @class */ (function () {
61
61
  if (seasonParams._tableBookingConfig !== null) {
62
62
  requestParameters.tableBookingConfig = seasonParams._tableBookingConfig;
63
63
  }
64
- if (seasonParams._socialDistancingRulesetKey !== null) {
65
- requestParameters.socialDistancingRulesetKey = seasonParams._socialDistancingRulesetKey;
66
- }
67
64
  }
68
65
  return this.client.post('/seasons', requestParameters)
69
66
  .then(function (res) { return new Season_1.Season(res.data); });
@@ -14,7 +14,6 @@ export { Chart } from './Charts/Chart';
14
14
  export { ChartListParams } from './Charts/ChartListParams';
15
15
  export { ChartObjectInfo } from './Charts/ChartObjectInfo';
16
16
  export { ChartValidation } from './Charts/ChartValidation';
17
- export { SocialDistancingRuleset } from './Charts/SocialDistancingRuleset';
18
17
  export { IDs } from './Common/IDs';
19
18
  export { LabelAndType } from './Common/LabelAndType';
20
19
  export { Labels } from './Common/Labels';
package/dist/src/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Workspaces = exports.Workspace = exports.Users = exports.User = exports.Subaccounts = exports.Subaccount = exports.Seasons = exports.SeasonParams = exports.Season = exports.UsageReports = exports.EventReports = exports.ChartReports = exports.Invitations = exports.Invitation = exports.HoldTokens = exports.HoldToken = exports.TableBookingConfig = exports.StatusChangesParams = exports.StatusChangeRequest = exports.StatusChangeOrigin = exports.StatusChange = exports.ObjectProperties = exports.ForSaleConfig = exports.Events = exports.EventObjectInfo = exports.Event = exports.Channels = exports.Channel = exports.ChangeObjectStatusResult = exports.BestAvailableObjects = exports.Labels = exports.LabelAndType = exports.IDs = exports.SocialDistancingRuleset = exports.ChartValidation = exports.ChartObjectInfo = exports.ChartListParams = exports.Chart = exports.Category = exports.DefaultRendererSettings = exports.ChartValidationSettings = exports.AccountSettings = exports.Accounts = exports.Account = exports.SeatsioClient = exports.Region = exports.PageFetcher = exports.Page = exports.Lister = void 0;
3
+ exports.Workspaces = exports.Workspace = exports.Users = exports.User = exports.Subaccounts = exports.Subaccount = exports.Seasons = exports.SeasonParams = exports.Season = exports.UsageReports = exports.EventReports = exports.ChartReports = exports.Invitations = exports.Invitation = exports.HoldTokens = exports.HoldToken = exports.TableBookingConfig = exports.StatusChangesParams = exports.StatusChangeRequest = exports.StatusChangeOrigin = exports.StatusChange = exports.ObjectProperties = exports.ForSaleConfig = exports.Events = exports.EventObjectInfo = exports.Event = exports.Channels = exports.Channel = exports.ChangeObjectStatusResult = exports.BestAvailableObjects = exports.Labels = exports.LabelAndType = exports.IDs = exports.ChartValidation = exports.ChartObjectInfo = exports.ChartListParams = exports.Chart = exports.Category = exports.DefaultRendererSettings = exports.ChartValidationSettings = exports.AccountSettings = exports.Accounts = exports.Account = exports.SeatsioClient = exports.Region = exports.PageFetcher = exports.Page = exports.Lister = void 0;
4
4
  var Lister_1 = require("./Lister");
5
5
  Object.defineProperty(exports, "Lister", { enumerable: true, get: function () { return Lister_1.Lister; } });
6
6
  var Page_1 = require("./Page");
@@ -31,8 +31,6 @@ var ChartObjectInfo_1 = require("./Charts/ChartObjectInfo");
31
31
  Object.defineProperty(exports, "ChartObjectInfo", { enumerable: true, get: function () { return ChartObjectInfo_1.ChartObjectInfo; } });
32
32
  var ChartValidation_1 = require("./Charts/ChartValidation");
33
33
  Object.defineProperty(exports, "ChartValidation", { enumerable: true, get: function () { return ChartValidation_1.ChartValidation; } });
34
- var SocialDistancingRuleset_1 = require("./Charts/SocialDistancingRuleset");
35
- Object.defineProperty(exports, "SocialDistancingRuleset", { enumerable: true, get: function () { return SocialDistancingRuleset_1.SocialDistancingRuleset; } });
36
34
  var IDs_1 = require("./Common/IDs");
37
35
  Object.defineProperty(exports, "IDs", { enumerable: true, get: function () { return IDs_1.IDs; } });
38
36
  var LabelAndType_1 = require("./Common/LabelAndType");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seatsio",
3
- "version": "76.2.0",
3
+ "version": "77.0.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [
@@ -23,19 +23,19 @@
23
23
  "devDependencies": {
24
24
  "@jest/globals": "29.5.0",
25
25
  "@types/jest": "29.5.2",
26
- "@types/node": "20.2.5",
27
- "@types/uuid": "9.0.1",
28
- "@typescript-eslint/eslint-plugin": "5.59.8",
29
- "@typescript-eslint/parser": "5.59.8",
30
- "eslint": "8.41.0",
26
+ "@types/node": "20.3.3",
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",
31
31
  "eslint-config-standard": "17.1.0",
32
32
  "eslint-plugin-import": "2.27.5",
33
- "eslint-plugin-n": "16.0.0",
33
+ "eslint-plugin-n": "16.0.1",
34
34
  "eslint-plugin-promise": "6.1.1",
35
35
  "jest": "29.5.0",
36
36
  "jest-cli": "29.5.0",
37
- "ts-jest": "29.1.0",
38
- "typescript": "5.1.3",
37
+ "ts-jest": "29.1.1",
38
+ "typescript": "5.1.6",
39
39
  "uuid": "9.0.0"
40
40
  }
41
41
  }
@@ -1,58 +0,0 @@
1
- import { Dict } from '../Dict';
2
- export type SocialDistancingRulesetJson = Dict<any>;
3
- export declare class SocialDistancingRuleset {
4
- index: number;
5
- name: string;
6
- numberOfDisabledSeatsToTheSides: number;
7
- disableSeatsInFrontAndBehind: boolean;
8
- disableDiagonalSeatsInFrontAndBehind: boolean;
9
- numberOfDisabledAisleSeats: number;
10
- maxGroupSize: number;
11
- maxOccupancyAbsolute: number;
12
- maxOccupancyPercentage: number;
13
- oneGroupPerTable: boolean;
14
- fixedGroupLayout: boolean;
15
- disabledSeats: string[];
16
- enabledSeats: string[];
17
- constructor(index: number, name: string, numberOfDisabledSeatsToTheSides: number, disableSeatsInFrontAndBehind: boolean, disableDiagonalSeatsInFrontAndBehind: boolean, numberOfDisabledAisleSeats: number, maxGroupSize: number, maxOccupancyAbsolute: number, maxOccupancyPercentage: number, oneGroupPerTable: boolean, fixedGroupLayout: boolean, disabledSeats: string[], enabledSeats: string[]);
18
- static fixed(name: string): FixedSocialDistancingRulesetBuilder;
19
- static ruleBased(name: string): RuleBasedSocialDistancingRulesetBuilder;
20
- static fromJson(json: Dict<any>): SocialDistancingRuleset;
21
- }
22
- declare class FixedSocialDistancingRulesetBuilder {
23
- disabledSeats: string[];
24
- index: number;
25
- name: string;
26
- constructor(name: string);
27
- build(): SocialDistancingRuleset;
28
- setIndex(index: number): this;
29
- setDisabledSeats(disabledSeats: string[]): this;
30
- }
31
- declare class RuleBasedSocialDistancingRulesetBuilder {
32
- disableDiagonalSeatsInFrontAndBehind: boolean;
33
- disableSeatsInFrontAndBehind: boolean;
34
- disabledSeats: string[];
35
- enabledSeats: string[];
36
- index: number;
37
- maxGroupSize: number;
38
- maxOccupancyAbsolute: number;
39
- maxOccupancyPercentage: number;
40
- name: string;
41
- numberOfDisabledAisleSeats: number;
42
- numberOfDisabledSeatsToTheSides: number;
43
- oneGroupPerTable: boolean;
44
- constructor(name: string);
45
- build(): SocialDistancingRuleset;
46
- setIndex(index: number): this;
47
- setNumberOfDisabledSeatsToTheSides(numberOfDisabledSeatsToTheSides: number): this;
48
- setDisableSeatsInFrontAndBehind(disableSeatsInFrontAndBehind: boolean): this;
49
- setDisableDiagonalSeatsInFrontAndBehind(disableDiagonalSeatsInFrontAndBehind: boolean): this;
50
- setNumberOfDisabledAisleSeats(numberOfDisabledAisleSeats: number): this;
51
- setMaxGroupSize(maxGroupSize: number): this;
52
- setMaxOccupancyAbsolute(maxOccupancyAbsolute: number): this;
53
- setMaxOccupancyPercentage(maxOccupancyPercentage: number): this;
54
- setOneGroupPerTable(oneGroupPerTable: boolean): this;
55
- setDisabledSeats(disabledSeats: string[]): this;
56
- setEnabledSeats(enabledSeats: string[]): this;
57
- }
58
- export {};
@@ -1,115 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SocialDistancingRuleset = void 0;
4
- var SocialDistancingRuleset = /** @class */ (function () {
5
- function SocialDistancingRuleset(index, name, numberOfDisabledSeatsToTheSides, disableSeatsInFrontAndBehind, disableDiagonalSeatsInFrontAndBehind, numberOfDisabledAisleSeats, maxGroupSize, maxOccupancyAbsolute, maxOccupancyPercentage, oneGroupPerTable, fixedGroupLayout, disabledSeats, enabledSeats) {
6
- this.index = index;
7
- this.name = name;
8
- this.numberOfDisabledSeatsToTheSides = numberOfDisabledSeatsToTheSides;
9
- this.disableSeatsInFrontAndBehind = disableSeatsInFrontAndBehind;
10
- this.disableDiagonalSeatsInFrontAndBehind = disableDiagonalSeatsInFrontAndBehind;
11
- this.numberOfDisabledAisleSeats = numberOfDisabledAisleSeats;
12
- this.maxGroupSize = maxGroupSize;
13
- this.maxOccupancyAbsolute = maxOccupancyAbsolute;
14
- this.maxOccupancyPercentage = maxOccupancyPercentage;
15
- this.oneGroupPerTable = oneGroupPerTable;
16
- this.fixedGroupLayout = fixedGroupLayout;
17
- this.disabledSeats = disabledSeats;
18
- this.enabledSeats = enabledSeats;
19
- }
20
- SocialDistancingRuleset.fixed = function (name) {
21
- return new FixedSocialDistancingRulesetBuilder(name);
22
- };
23
- SocialDistancingRuleset.ruleBased = function (name) {
24
- return new RuleBasedSocialDistancingRulesetBuilder(name);
25
- };
26
- SocialDistancingRuleset.fromJson = function (json) {
27
- return new SocialDistancingRuleset(json.index, json.name, json.numberOfDisabledSeatsToTheSides, json.disableSeatsInFrontAndBehind, json.disableDiagonalSeatsInFrontAndBehind, json.numberOfDisabledAisleSeats, json.maxGroupSize, json.maxOccupancyAbsolute, json.maxOccupancyPercentage, json.oneGroupPerTable, json.fixedGroupLayout, json.disabledSeats, json.enabledSeats);
28
- };
29
- return SocialDistancingRuleset;
30
- }());
31
- exports.SocialDistancingRuleset = SocialDistancingRuleset;
32
- var FixedSocialDistancingRulesetBuilder = /** @class */ (function () {
33
- function FixedSocialDistancingRulesetBuilder(name) {
34
- this.disabledSeats = [];
35
- this.index = 0;
36
- this.name = 'a name';
37
- this.name = name;
38
- }
39
- FixedSocialDistancingRulesetBuilder.prototype.build = function () {
40
- return new SocialDistancingRuleset(this.index, this.name, 0, false, false, 0, 0, 0, 0, false, true, this.disabledSeats, []);
41
- };
42
- FixedSocialDistancingRulesetBuilder.prototype.setIndex = function (index) {
43
- this.index = index;
44
- return this;
45
- };
46
- FixedSocialDistancingRulesetBuilder.prototype.setDisabledSeats = function (disabledSeats) {
47
- this.disabledSeats = disabledSeats;
48
- return this;
49
- };
50
- return FixedSocialDistancingRulesetBuilder;
51
- }());
52
- var RuleBasedSocialDistancingRulesetBuilder = /** @class */ (function () {
53
- function RuleBasedSocialDistancingRulesetBuilder(name) {
54
- this.disableDiagonalSeatsInFrontAndBehind = false;
55
- this.disableSeatsInFrontAndBehind = false;
56
- this.disabledSeats = [];
57
- this.enabledSeats = [];
58
- this.index = 0;
59
- this.maxGroupSize = 0;
60
- this.maxOccupancyAbsolute = 0;
61
- this.maxOccupancyPercentage = 0;
62
- this.numberOfDisabledAisleSeats = 0;
63
- this.numberOfDisabledSeatsToTheSides = 0;
64
- this.oneGroupPerTable = false;
65
- this.name = name;
66
- }
67
- RuleBasedSocialDistancingRulesetBuilder.prototype.build = function () {
68
- return new SocialDistancingRuleset(this.index, this.name, this.numberOfDisabledSeatsToTheSides, this.disableSeatsInFrontAndBehind, this.disableDiagonalSeatsInFrontAndBehind, this.numberOfDisabledAisleSeats, this.maxGroupSize, this.maxOccupancyAbsolute, this.maxOccupancyPercentage, this.oneGroupPerTable, false, this.disabledSeats, this.enabledSeats);
69
- };
70
- RuleBasedSocialDistancingRulesetBuilder.prototype.setIndex = function (index) {
71
- this.index = index;
72
- return this;
73
- };
74
- RuleBasedSocialDistancingRulesetBuilder.prototype.setNumberOfDisabledSeatsToTheSides = function (numberOfDisabledSeatsToTheSides) {
75
- this.numberOfDisabledSeatsToTheSides = numberOfDisabledSeatsToTheSides;
76
- return this;
77
- };
78
- RuleBasedSocialDistancingRulesetBuilder.prototype.setDisableSeatsInFrontAndBehind = function (disableSeatsInFrontAndBehind) {
79
- this.disableSeatsInFrontAndBehind = disableSeatsInFrontAndBehind;
80
- return this;
81
- };
82
- RuleBasedSocialDistancingRulesetBuilder.prototype.setDisableDiagonalSeatsInFrontAndBehind = function (disableDiagonalSeatsInFrontAndBehind) {
83
- this.disableDiagonalSeatsInFrontAndBehind = disableDiagonalSeatsInFrontAndBehind;
84
- return this;
85
- };
86
- RuleBasedSocialDistancingRulesetBuilder.prototype.setNumberOfDisabledAisleSeats = function (numberOfDisabledAisleSeats) {
87
- this.numberOfDisabledAisleSeats = numberOfDisabledAisleSeats;
88
- return this;
89
- };
90
- RuleBasedSocialDistancingRulesetBuilder.prototype.setMaxGroupSize = function (maxGroupSize) {
91
- this.maxGroupSize = maxGroupSize;
92
- return this;
93
- };
94
- RuleBasedSocialDistancingRulesetBuilder.prototype.setMaxOccupancyAbsolute = function (maxOccupancyAbsolute) {
95
- this.maxOccupancyAbsolute = maxOccupancyAbsolute;
96
- return this;
97
- };
98
- RuleBasedSocialDistancingRulesetBuilder.prototype.setMaxOccupancyPercentage = function (maxOccupancyPercentage) {
99
- this.maxOccupancyPercentage = maxOccupancyPercentage;
100
- return this;
101
- };
102
- RuleBasedSocialDistancingRulesetBuilder.prototype.setOneGroupPerTable = function (oneGroupPerTable) {
103
- this.oneGroupPerTable = oneGroupPerTable;
104
- return this;
105
- };
106
- RuleBasedSocialDistancingRulesetBuilder.prototype.setDisabledSeats = function (disabledSeats) {
107
- this.disabledSeats = disabledSeats;
108
- return this;
109
- };
110
- RuleBasedSocialDistancingRulesetBuilder.prototype.setEnabledSeats = function (enabledSeats) {
111
- this.enabledSeats = enabledSeats;
112
- return this;
113
- };
114
- return RuleBasedSocialDistancingRulesetBuilder;
115
- }());