seatsio 86.6.0 → 87.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.
- package/dist/src/Events/AbstractEventParams.d.ts +0 -3
- package/dist/src/Events/AbstractEventParams.js +0 -4
- package/dist/src/Events/CreateEventParams.d.ts +3 -0
- package/dist/src/Events/CreateEventParams.js +4 -0
- package/dist/src/Events/EditForSaleConfigResult.d.ts +8 -0
- package/dist/src/Events/EditForSaleConfigResult.js +16 -0
- package/dist/src/Events/Event.d.ts +1 -0
- package/dist/src/Events/Event.js +1 -0
- package/dist/src/Events/Events.d.ts +9 -0
- package/dist/src/Events/Events.js +56 -13
- package/dist/src/Events/ForSaleConfig.d.ts +1 -0
- package/dist/src/Events/ForSaleConfig.js +3 -0
- package/dist/src/Events/ForSaleConfigParams.d.ts +7 -0
- package/dist/src/Events/ForSaleConfigParams.js +17 -0
- package/dist/src/Events/ForSaleRateLimitInfo.d.ts +6 -0
- package/dist/src/Events/ForSaleRateLimitInfo.js +14 -0
- package/dist/src/Events/UpdateEventParams.d.ts +3 -0
- package/dist/src/Events/UpdateEventParams.js +4 -0
- package/dist/src/Seasons/{SeasonParams.d.ts → CreateSeasonParams.d.ts} +8 -1
- package/dist/src/Seasons/CreateSeasonParams.js +49 -0
- package/dist/src/Seasons/Seasons.d.ts +4 -2
- package/dist/src/Seasons/Seasons.js +36 -0
- package/dist/src/Seasons/UpdateSeasonParams.d.ts +5 -0
- package/dist/src/Seasons/UpdateSeasonParams.js +31 -0
- package/dist/src/index.d.ts +5 -1
- package/dist/src/index.js +5 -1
- package/package.json +6 -6
- package/dist/src/Seasons/SeasonParams.js +0 -37
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { TableBookingConfig } from './TableBookingConfig';
|
|
2
2
|
import { Category } from '../Charts/Category';
|
|
3
|
-
import { LocalDate } from '../LocalDate';
|
|
4
3
|
export declare abstract class AbstractEventParams {
|
|
5
4
|
key?: string;
|
|
6
5
|
tableBookingConfig?: TableBookingConfig;
|
|
7
6
|
objectCategories?: object;
|
|
8
7
|
categories?: Category[];
|
|
9
8
|
name?: string;
|
|
10
|
-
date?: LocalDate;
|
|
11
9
|
withKey(key: string): this;
|
|
12
10
|
withTableBookingConfig(tableBookingConfig: TableBookingConfig): this;
|
|
13
11
|
withObjectCategories(objectCategories: object): this;
|
|
14
12
|
withCategories(categories: Category[]): this;
|
|
15
13
|
withName(name: string): this;
|
|
16
|
-
withDate(date: LocalDate): this;
|
|
17
14
|
}
|
|
@@ -24,10 +24,6 @@ var AbstractEventParams = /** @class */ (function () {
|
|
|
24
24
|
this.name = name;
|
|
25
25
|
return this;
|
|
26
26
|
};
|
|
27
|
-
AbstractEventParams.prototype.withDate = function (date) {
|
|
28
|
-
this.date = date;
|
|
29
|
-
return this;
|
|
30
|
-
};
|
|
31
27
|
return AbstractEventParams;
|
|
32
28
|
}());
|
|
33
29
|
exports.AbstractEventParams = AbstractEventParams;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { AbstractEventParams } from './AbstractEventParams';
|
|
2
2
|
import { Channel } from './Channel';
|
|
3
3
|
import { ForSaleConfig } from './ForSaleConfig';
|
|
4
|
+
import { LocalDate } from '../LocalDate';
|
|
4
5
|
export declare class CreateEventParams extends AbstractEventParams {
|
|
5
6
|
channels?: Channel[];
|
|
6
7
|
forSaleConfig?: ForSaleConfig;
|
|
8
|
+
date?: LocalDate;
|
|
7
9
|
withChannels(channels: Channel[]): this;
|
|
8
10
|
withForSaleConfig(forSaleConfig: ForSaleConfig): this;
|
|
11
|
+
withDate(date: LocalDate): this;
|
|
9
12
|
}
|
|
@@ -30,6 +30,10 @@ var CreateEventParams = /** @class */ (function (_super) {
|
|
|
30
30
|
this.forSaleConfig = forSaleConfig;
|
|
31
31
|
return this;
|
|
32
32
|
};
|
|
33
|
+
CreateEventParams.prototype.withDate = function (date) {
|
|
34
|
+
this.date = date;
|
|
35
|
+
return this;
|
|
36
|
+
};
|
|
33
37
|
return CreateEventParams;
|
|
34
38
|
}(AbstractEventParams_1.AbstractEventParams));
|
|
35
39
|
exports.CreateEventParams = CreateEventParams;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ForSaleConfig } from './ForSaleConfig';
|
|
2
|
+
import { ForSaleRateLimitInfo } from './ForSaleRateLimitInfo';
|
|
3
|
+
export declare class EditForSaleConfigResult {
|
|
4
|
+
forSaleConfig: ForSaleConfig;
|
|
5
|
+
rateLimitInfo: ForSaleRateLimitInfo;
|
|
6
|
+
constructor(forSaleConfig: ForSaleConfig, rateLimitInfo: ForSaleRateLimitInfo);
|
|
7
|
+
static fromJson(json: any): EditForSaleConfigResult;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditForSaleConfigResult = void 0;
|
|
4
|
+
var ForSaleConfig_1 = require("./ForSaleConfig");
|
|
5
|
+
var ForSaleRateLimitInfo_1 = require("./ForSaleRateLimitInfo");
|
|
6
|
+
var EditForSaleConfigResult = /** @class */ (function () {
|
|
7
|
+
function EditForSaleConfigResult(forSaleConfig, rateLimitInfo) {
|
|
8
|
+
this.forSaleConfig = forSaleConfig;
|
|
9
|
+
this.rateLimitInfo = rateLimitInfo;
|
|
10
|
+
}
|
|
11
|
+
EditForSaleConfigResult.fromJson = function (json) {
|
|
12
|
+
return new EditForSaleConfigResult(ForSaleConfig_1.ForSaleConfig.fromJson(json.forSaleConfig), ForSaleRateLimitInfo_1.ForSaleRateLimitInfo.fromJson(json.rateLimitInfo));
|
|
13
|
+
};
|
|
14
|
+
return EditForSaleConfigResult;
|
|
15
|
+
}());
|
|
16
|
+
exports.EditForSaleConfigResult = EditForSaleConfigResult;
|
package/dist/src/Events/Event.js
CHANGED
|
@@ -12,6 +12,7 @@ var Event = /** @class */ (function () {
|
|
|
12
12
|
this.tableBookingConfig = json.tableBookingConfig;
|
|
13
13
|
this.supportsBestAvailable = json.supportsBestAvailable;
|
|
14
14
|
this.forSaleConfig = json.forSaleConfig ? new ForSaleConfig_1.ForSaleConfig(json.forSaleConfig.forSale, json.forSaleConfig.objects, json.forSaleConfig.areaPlaces, json.forSaleConfig.categories) : null;
|
|
15
|
+
this.forSalePropagated = json.forSalePropagated === undefined ? null : json.forSalePropagated;
|
|
15
16
|
this.chartKey = json.chartKey;
|
|
16
17
|
this.createdOn = json.createdOn ? new Date(json.createdOn) : null;
|
|
17
18
|
this.updatedOn = json.updatedOn ? new Date(json.updatedOn) : null;
|
|
@@ -12,6 +12,12 @@ import { StatusChangeRequest } from './StatusChangeRequest';
|
|
|
12
12
|
import { CreateEventParams } from './CreateEventParams';
|
|
13
13
|
import { UpdateEventParams } from './UpdateEventParams';
|
|
14
14
|
import { BestAvailableParams } from './BestAvailableParams';
|
|
15
|
+
import { ForSaleConfigParams } from './ForSaleConfigParams';
|
|
16
|
+
import { EditForSaleConfigResult } from './EditForSaleConfigResult';
|
|
17
|
+
export interface ObjectAndQuantity {
|
|
18
|
+
object: string;
|
|
19
|
+
quantity?: number;
|
|
20
|
+
}
|
|
15
21
|
export interface ObjectIdAndTicketType {
|
|
16
22
|
objectId: string;
|
|
17
23
|
ticketType?: string;
|
|
@@ -35,6 +41,9 @@ export declare class Events {
|
|
|
35
41
|
iterator(): Lister<Event, EventJson>;
|
|
36
42
|
statusChanges(eventKey: string): Lister<StatusChange, StatusChangeJson>;
|
|
37
43
|
statusChangesForObject(eventKey: string, objectId: string): Lister<StatusChange, StatusChangeJson>;
|
|
44
|
+
editForSaleConfig(eventKey: string, forSale?: ObjectAndQuantity[] | null, notForSale?: ObjectAndQuantity[] | null): Promise<EditForSaleConfigResult>;
|
|
45
|
+
editForSaleConfigForEvents(events: Dict<ForSaleConfigParams>): Promise<Dict<EditForSaleConfigResult>>;
|
|
46
|
+
replaceForSaleConfig(eventKey: string, forSale: boolean, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
38
47
|
markAsForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
39
48
|
markAsNotForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
40
49
|
markEverythingAsForSale(eventKey: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
@@ -46,6 +46,7 @@ var EventDeserializer_1 = require("./EventDeserializer");
|
|
|
46
46
|
var ChangeObjectStatusResult_1 = require("./ChangeObjectStatusResult");
|
|
47
47
|
var BestAvailableObjects_1 = require("./BestAvailableObjects");
|
|
48
48
|
var StatusChangeRequest_1 = require("./StatusChangeRequest");
|
|
49
|
+
var EditForSaleConfigResult_1 = require("./EditForSaleConfigResult");
|
|
49
50
|
var Events = /** @class */ (function () {
|
|
50
51
|
function Events(client) {
|
|
51
52
|
this.client = client;
|
|
@@ -199,10 +200,54 @@ var Events = /** @class */ (function () {
|
|
|
199
200
|
return new Page_1.Page(statusChanges, data.next_page_starts_after, data.previous_page_ends_before);
|
|
200
201
|
});
|
|
201
202
|
};
|
|
202
|
-
Events.prototype.
|
|
203
|
+
Events.prototype.editForSaleConfig = function (eventKey_1) {
|
|
204
|
+
return __awaiter(this, arguments, void 0, function (eventKey, forSale, notForSale) {
|
|
205
|
+
var requestParameters, res, json;
|
|
206
|
+
if (forSale === void 0) { forSale = null; }
|
|
207
|
+
if (notForSale === void 0) { notForSale = null; }
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
210
|
+
case 0:
|
|
211
|
+
requestParameters = {};
|
|
212
|
+
if (forSale !== null) {
|
|
213
|
+
requestParameters.forSale = forSale;
|
|
214
|
+
}
|
|
215
|
+
if (notForSale !== null) {
|
|
216
|
+
requestParameters.notForSale = notForSale;
|
|
217
|
+
}
|
|
218
|
+
return [4 /*yield*/, this.client.post("events/".concat(encodeURIComponent(eventKey), "/actions/edit-for-sale-config"), requestParameters)];
|
|
219
|
+
case 1:
|
|
220
|
+
res = _a.sent();
|
|
221
|
+
json = res.data;
|
|
222
|
+
return [2 /*return*/, EditForSaleConfigResult_1.EditForSaleConfigResult.fromJson(json)];
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
};
|
|
227
|
+
Events.prototype.editForSaleConfigForEvents = function (events) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
229
|
+
var res, json, result, _i, _a, eventKey;
|
|
230
|
+
return __generator(this, function (_b) {
|
|
231
|
+
switch (_b.label) {
|
|
232
|
+
case 0: return [4 /*yield*/, this.client.post('events/actions/edit-for-sale-config', { events: events })];
|
|
233
|
+
case 1:
|
|
234
|
+
res = _b.sent();
|
|
235
|
+
json = res.data;
|
|
236
|
+
result = {};
|
|
237
|
+
for (_i = 0, _a = Object.keys(json); _i < _a.length; _i++) {
|
|
238
|
+
eventKey = _a[_i];
|
|
239
|
+
result[eventKey] = EditForSaleConfigResult_1.EditForSaleConfigResult.fromJson(json[eventKey]);
|
|
240
|
+
}
|
|
241
|
+
return [2 /*return*/, result];
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
Events.prototype.replaceForSaleConfig = function (eventKey, forSale, objects, areaPlaces, categories) {
|
|
203
247
|
if (objects === void 0) { objects = null; }
|
|
204
248
|
if (areaPlaces === void 0) { areaPlaces = null; }
|
|
205
249
|
if (categories === void 0) { categories = null; }
|
|
250
|
+
var action = forSale ? 'mark-as-for-sale' : 'mark-as-not-for-sale';
|
|
206
251
|
var requestParameters = {};
|
|
207
252
|
if (objects !== null) {
|
|
208
253
|
requestParameters.objects = objects;
|
|
@@ -213,23 +258,21 @@ var Events = /** @class */ (function () {
|
|
|
213
258
|
if (categories !== null) {
|
|
214
259
|
requestParameters.categories = categories;
|
|
215
260
|
}
|
|
216
|
-
return this.client.post("events/".concat(encodeURIComponent(eventKey), "/actions/
|
|
261
|
+
return this.client.post("events/".concat(encodeURIComponent(eventKey), "/actions/") + action, requestParameters);
|
|
217
262
|
};
|
|
263
|
+
// @deprecated
|
|
264
|
+
Events.prototype.markAsForSale = function (eventKey, objects, areaPlaces, categories) {
|
|
265
|
+
if (objects === void 0) { objects = null; }
|
|
266
|
+
if (areaPlaces === void 0) { areaPlaces = null; }
|
|
267
|
+
if (categories === void 0) { categories = null; }
|
|
268
|
+
return this.replaceForSaleConfig(eventKey, true, objects, areaPlaces, categories);
|
|
269
|
+
};
|
|
270
|
+
// @deprecated
|
|
218
271
|
Events.prototype.markAsNotForSale = function (eventKey, objects, areaPlaces, categories) {
|
|
219
272
|
if (objects === void 0) { objects = null; }
|
|
220
273
|
if (areaPlaces === void 0) { areaPlaces = null; }
|
|
221
274
|
if (categories === void 0) { categories = null; }
|
|
222
|
-
|
|
223
|
-
if (objects !== null) {
|
|
224
|
-
requestParameters.objects = objects;
|
|
225
|
-
}
|
|
226
|
-
if (areaPlaces !== null) {
|
|
227
|
-
requestParameters.areaPlaces = areaPlaces;
|
|
228
|
-
}
|
|
229
|
-
if (categories !== null) {
|
|
230
|
-
requestParameters.categories = categories;
|
|
231
|
-
}
|
|
232
|
-
return this.client.post("events/".concat(encodeURIComponent(eventKey), "/actions/mark-as-not-for-sale"), requestParameters);
|
|
275
|
+
return this.replaceForSaleConfig(eventKey, false, objects, areaPlaces, categories);
|
|
233
276
|
};
|
|
234
277
|
Events.prototype.markEverythingAsForSale = function (eventKey) {
|
|
235
278
|
return this.client.post("events/".concat(encodeURIComponent(eventKey), "/actions/mark-everything-as-for-sale"));
|
|
@@ -8,6 +8,9 @@ var ForSaleConfig = /** @class */ (function () {
|
|
|
8
8
|
this.objects = objects;
|
|
9
9
|
this.categories = categories;
|
|
10
10
|
}
|
|
11
|
+
ForSaleConfig.fromJson = function (json) {
|
|
12
|
+
return new ForSaleConfig(json.forSale, json.objects, json.areaPlaces, json.categories);
|
|
13
|
+
};
|
|
11
14
|
return ForSaleConfig;
|
|
12
15
|
}());
|
|
13
16
|
exports.ForSaleConfig = ForSaleConfig;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ObjectAndQuantity } from './Events';
|
|
2
|
+
export declare class ForSaleConfigParams {
|
|
3
|
+
forSale?: ObjectAndQuantity[];
|
|
4
|
+
notForSale?: ObjectAndQuantity[];
|
|
5
|
+
withForSale(forSale: ObjectAndQuantity[]): this;
|
|
6
|
+
withNotForSale(notForSale: ObjectAndQuantity[]): this;
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForSaleConfigParams = void 0;
|
|
4
|
+
var ForSaleConfigParams = /** @class */ (function () {
|
|
5
|
+
function ForSaleConfigParams() {
|
|
6
|
+
}
|
|
7
|
+
ForSaleConfigParams.prototype.withForSale = function (forSale) {
|
|
8
|
+
this.forSale = forSale;
|
|
9
|
+
return this;
|
|
10
|
+
};
|
|
11
|
+
ForSaleConfigParams.prototype.withNotForSale = function (notForSale) {
|
|
12
|
+
this.notForSale = notForSale;
|
|
13
|
+
return this;
|
|
14
|
+
};
|
|
15
|
+
return ForSaleConfigParams;
|
|
16
|
+
}());
|
|
17
|
+
exports.ForSaleConfigParams = ForSaleConfigParams;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForSaleRateLimitInfo = void 0;
|
|
4
|
+
var ForSaleRateLimitInfo = /** @class */ (function () {
|
|
5
|
+
function ForSaleRateLimitInfo(rateLimitRemainingCalls, rateLimitResetDate) {
|
|
6
|
+
this.rateLimitRemainingCalls = rateLimitRemainingCalls;
|
|
7
|
+
this.rateLimitResetDate = rateLimitResetDate;
|
|
8
|
+
}
|
|
9
|
+
ForSaleRateLimitInfo.fromJson = function (json) {
|
|
10
|
+
return new ForSaleRateLimitInfo(json.rateLimitRemainingCalls, new Date(json.rateLimitResetDate));
|
|
11
|
+
};
|
|
12
|
+
return ForSaleRateLimitInfo;
|
|
13
|
+
}());
|
|
14
|
+
exports.ForSaleRateLimitInfo = ForSaleRateLimitInfo;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { AbstractEventParams } from './AbstractEventParams';
|
|
2
|
+
import { LocalDate } from '../LocalDate';
|
|
2
3
|
export declare class UpdateEventParams extends AbstractEventParams {
|
|
3
4
|
isInThePast?: boolean;
|
|
5
|
+
date?: LocalDate;
|
|
4
6
|
withIsInThePast(isInThePast: boolean): this;
|
|
7
|
+
withDate(date: LocalDate): this;
|
|
5
8
|
}
|
|
@@ -26,6 +26,10 @@ var UpdateEventParams = /** @class */ (function (_super) {
|
|
|
26
26
|
this.isInThePast = isInThePast;
|
|
27
27
|
return this;
|
|
28
28
|
};
|
|
29
|
+
UpdateEventParams.prototype.withDate = function (date) {
|
|
30
|
+
this.date = date;
|
|
31
|
+
return this;
|
|
32
|
+
};
|
|
29
33
|
return UpdateEventParams;
|
|
30
34
|
}(AbstractEventParams_1.AbstractEventParams));
|
|
31
35
|
exports.UpdateEventParams = UpdateEventParams;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { TableBookingConfig } from '../Events/TableBookingConfig';
|
|
2
2
|
import { Channel } from '../Events/Channel';
|
|
3
3
|
import { ForSaleConfig } from '../Events/ForSaleConfig';
|
|
4
|
-
|
|
4
|
+
import { Category } from '../Charts/Category';
|
|
5
|
+
export declare class CreateSeasonParams {
|
|
5
6
|
_eventKeys?: string[];
|
|
6
7
|
_key?: string;
|
|
7
8
|
_name?: string;
|
|
8
9
|
_numberOfEvents?: number;
|
|
9
10
|
_tableBookingConfig?: TableBookingConfig;
|
|
11
|
+
_objectCategories?: object;
|
|
12
|
+
_categories?: Category[];
|
|
10
13
|
_channels?: Channel[];
|
|
11
14
|
_forSaleConfig?: ForSaleConfig;
|
|
15
|
+
_forSalePropagated?: boolean;
|
|
12
16
|
key(key: string): this;
|
|
13
17
|
name(name: string): this;
|
|
14
18
|
numberOfEvents(numberOfEvents: number): this;
|
|
@@ -16,4 +20,7 @@ export declare class SeasonParams {
|
|
|
16
20
|
tableBookingConfig(tableBookingConfig: TableBookingConfig): this;
|
|
17
21
|
channels(channels: Channel[]): this;
|
|
18
22
|
forSaleConfig(forSaleConfig: ForSaleConfig): this;
|
|
23
|
+
forSalePropagated(forSalePropagated: boolean): this;
|
|
24
|
+
objectCategories(objectCategories: object): this;
|
|
25
|
+
categories(categories: Category[]): this;
|
|
19
26
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSeasonParams = void 0;
|
|
4
|
+
var CreateSeasonParams = /** @class */ (function () {
|
|
5
|
+
function CreateSeasonParams() {
|
|
6
|
+
}
|
|
7
|
+
CreateSeasonParams.prototype.key = function (key) {
|
|
8
|
+
this._key = key;
|
|
9
|
+
return this;
|
|
10
|
+
};
|
|
11
|
+
CreateSeasonParams.prototype.name = function (name) {
|
|
12
|
+
this._name = name;
|
|
13
|
+
return this;
|
|
14
|
+
};
|
|
15
|
+
CreateSeasonParams.prototype.numberOfEvents = function (numberOfEvents) {
|
|
16
|
+
this._numberOfEvents = numberOfEvents;
|
|
17
|
+
return this;
|
|
18
|
+
};
|
|
19
|
+
CreateSeasonParams.prototype.eventKeys = function (eventKeys) {
|
|
20
|
+
this._eventKeys = eventKeys;
|
|
21
|
+
return this;
|
|
22
|
+
};
|
|
23
|
+
CreateSeasonParams.prototype.tableBookingConfig = function (tableBookingConfig) {
|
|
24
|
+
this._tableBookingConfig = tableBookingConfig;
|
|
25
|
+
return this;
|
|
26
|
+
};
|
|
27
|
+
CreateSeasonParams.prototype.channels = function (channels) {
|
|
28
|
+
this._channels = channels;
|
|
29
|
+
return this;
|
|
30
|
+
};
|
|
31
|
+
CreateSeasonParams.prototype.forSaleConfig = function (forSaleConfig) {
|
|
32
|
+
this._forSaleConfig = forSaleConfig;
|
|
33
|
+
return this;
|
|
34
|
+
};
|
|
35
|
+
CreateSeasonParams.prototype.forSalePropagated = function (forSalePropagated) {
|
|
36
|
+
this._forSalePropagated = forSalePropagated;
|
|
37
|
+
return this;
|
|
38
|
+
};
|
|
39
|
+
CreateSeasonParams.prototype.objectCategories = function (objectCategories) {
|
|
40
|
+
this._objectCategories = objectCategories;
|
|
41
|
+
return this;
|
|
42
|
+
};
|
|
43
|
+
CreateSeasonParams.prototype.categories = function (categories) {
|
|
44
|
+
this._categories = categories;
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
return CreateSeasonParams;
|
|
48
|
+
}());
|
|
49
|
+
exports.CreateSeasonParams = CreateSeasonParams;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { Season } from './Season';
|
|
2
2
|
import { Axios } from 'axios';
|
|
3
3
|
import { SeatsioClient } from '../SeatsioClient';
|
|
4
|
-
import {
|
|
4
|
+
import { CreateSeasonParams } from './CreateSeasonParams';
|
|
5
|
+
import { UpdateSeasonParams } from './UpdateSeasonParams';
|
|
5
6
|
export declare class Seasons {
|
|
6
7
|
client: Axios;
|
|
7
8
|
seatsioClient: SeatsioClient;
|
|
8
9
|
constructor(client: Axios, seatsioClient: SeatsioClient);
|
|
9
|
-
create(chartKey: string, seasonParams?:
|
|
10
|
+
create(chartKey: string, seasonParams?: CreateSeasonParams | null): Promise<Season>;
|
|
11
|
+
update(seasonKey: string, params: UpdateSeasonParams): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
12
|
createPartialSeason(topLevelSeasonKey: string, partialSeasonKey?: string | null, name?: string | null, eventKeys?: string[] | null): Promise<Season>;
|
|
11
13
|
createEvents(key: string, numberOfEvents?: number | null, eventKeys?: string[] | null): Promise<any>;
|
|
12
14
|
addEventsToPartialSeason(topLevelSeasonKey: string, partialSeasonKey: string, eventKeys: string[]): Promise<Season>;
|
|
@@ -61,6 +61,12 @@ var Seasons = /** @class */ (function () {
|
|
|
61
61
|
if (seasonParams._eventKeys !== undefined) {
|
|
62
62
|
requestParameters.eventKeys = seasonParams._eventKeys;
|
|
63
63
|
}
|
|
64
|
+
if (seasonParams._objectCategories !== undefined) {
|
|
65
|
+
requestParameters.objectCategories = seasonParams._objectCategories;
|
|
66
|
+
}
|
|
67
|
+
if (seasonParams._categories !== undefined) {
|
|
68
|
+
requestParameters.categories = seasonParams._categories;
|
|
69
|
+
}
|
|
64
70
|
if (seasonParams._tableBookingConfig !== undefined) {
|
|
65
71
|
requestParameters.tableBookingConfig = seasonParams._tableBookingConfig;
|
|
66
72
|
}
|
|
@@ -70,10 +76,40 @@ var Seasons = /** @class */ (function () {
|
|
|
70
76
|
if (seasonParams._forSaleConfig !== undefined) {
|
|
71
77
|
requestParameters.forSaleConfig = seasonParams._forSaleConfig;
|
|
72
78
|
}
|
|
79
|
+
if (seasonParams._forSalePropagated !== undefined) {
|
|
80
|
+
requestParameters.forSalePropagated = seasonParams._forSalePropagated;
|
|
81
|
+
}
|
|
73
82
|
}
|
|
74
83
|
return this.client.post('/seasons', requestParameters)
|
|
75
84
|
.then(function (res) { return new Season_1.Season(res.data); });
|
|
76
85
|
};
|
|
86
|
+
Seasons.prototype.update = function (seasonKey, params) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
+
var requestParameters;
|
|
89
|
+
return __generator(this, function (_a) {
|
|
90
|
+
requestParameters = {};
|
|
91
|
+
if (params.key !== undefined) {
|
|
92
|
+
requestParameters.eventKey = params.key;
|
|
93
|
+
}
|
|
94
|
+
if (params.tableBookingConfig !== undefined) {
|
|
95
|
+
requestParameters.tableBookingConfig = params.tableBookingConfig;
|
|
96
|
+
}
|
|
97
|
+
if (params.objectCategories !== undefined) {
|
|
98
|
+
requestParameters.objectCategories = params.objectCategories;
|
|
99
|
+
}
|
|
100
|
+
if (params.categories !== undefined) {
|
|
101
|
+
requestParameters.categories = params.categories;
|
|
102
|
+
}
|
|
103
|
+
if (params.name !== undefined) {
|
|
104
|
+
requestParameters.name = params.name;
|
|
105
|
+
}
|
|
106
|
+
if (params.forSalePropagated !== undefined) {
|
|
107
|
+
requestParameters.forSalePropagated = params.forSalePropagated;
|
|
108
|
+
}
|
|
109
|
+
return [2 /*return*/, this.client.post("events/".concat(encodeURIComponent(seasonKey)), requestParameters)];
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
};
|
|
77
113
|
Seasons.prototype.createPartialSeason = function (topLevelSeasonKey, partialSeasonKey, name, eventKeys) {
|
|
78
114
|
if (partialSeasonKey === void 0) { partialSeasonKey = null; }
|
|
79
115
|
if (name === void 0) { name = null; }
|
|
@@ -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.UpdateSeasonParams = void 0;
|
|
19
|
+
var AbstractEventParams_1 = require("../Events/AbstractEventParams");
|
|
20
|
+
var UpdateSeasonParams = /** @class */ (function (_super) {
|
|
21
|
+
__extends(UpdateSeasonParams, _super);
|
|
22
|
+
function UpdateSeasonParams() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
UpdateSeasonParams.prototype.withForSalePropagated = function (forSalePropagated) {
|
|
26
|
+
this.forSalePropagated = forSalePropagated;
|
|
27
|
+
return this;
|
|
28
|
+
};
|
|
29
|
+
return UpdateSeasonParams;
|
|
30
|
+
}(AbstractEventParams_1.AbstractEventParams));
|
|
31
|
+
exports.UpdateSeasonParams = UpdateSeasonParams;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -32,11 +32,14 @@ export * from './Events/ChangeObjectStatusResult';
|
|
|
32
32
|
export * from './Events/Channel';
|
|
33
33
|
export * from './Events/Channels';
|
|
34
34
|
export * from './Events/CreateEventParams';
|
|
35
|
+
export * from './Events/EditForSaleConfigResult';
|
|
35
36
|
export * from './Events/Event';
|
|
36
37
|
export * from './Events/EventDeserializer';
|
|
37
38
|
export * from './Events/EventObjectInfo';
|
|
38
39
|
export * from './Events/Events';
|
|
39
40
|
export * from './Events/ForSaleConfig';
|
|
41
|
+
export * from './Events/ForSaleConfigParams';
|
|
42
|
+
export * from './Events/ForSaleRateLimitInfo';
|
|
40
43
|
export * from './Events/ObjectProperties';
|
|
41
44
|
export * from './Events/StatusChange';
|
|
42
45
|
export * from './Events/StatusChangeOrigin';
|
|
@@ -49,9 +52,10 @@ export * from './HoldTokens/HoldTokens';
|
|
|
49
52
|
export * from './Reports/ChartReports';
|
|
50
53
|
export * from './Reports/EventReports';
|
|
51
54
|
export * from './Reports/UsageReports';
|
|
55
|
+
export * from './Seasons/CreateSeasonParams';
|
|
52
56
|
export * from './Seasons/Season';
|
|
53
|
-
export * from './Seasons/SeasonParams';
|
|
54
57
|
export * from './Seasons/Seasons';
|
|
58
|
+
export * from './Seasons/UpdateSeasonParams';
|
|
55
59
|
export * from './TicketBuyers/AddTicketBuyerIdsResponse';
|
|
56
60
|
export * from './TicketBuyers/RemoveTicketBuyerIdsResponse';
|
|
57
61
|
export * from './TicketBuyers/TicketBuyers';
|
package/dist/src/index.js
CHANGED
|
@@ -48,11 +48,14 @@ __exportStar(require("./Events/ChangeObjectStatusResult"), exports);
|
|
|
48
48
|
__exportStar(require("./Events/Channel"), exports);
|
|
49
49
|
__exportStar(require("./Events/Channels"), exports);
|
|
50
50
|
__exportStar(require("./Events/CreateEventParams"), exports);
|
|
51
|
+
__exportStar(require("./Events/EditForSaleConfigResult"), exports);
|
|
51
52
|
__exportStar(require("./Events/Event"), exports);
|
|
52
53
|
__exportStar(require("./Events/EventDeserializer"), exports);
|
|
53
54
|
__exportStar(require("./Events/EventObjectInfo"), exports);
|
|
54
55
|
__exportStar(require("./Events/Events"), exports);
|
|
55
56
|
__exportStar(require("./Events/ForSaleConfig"), exports);
|
|
57
|
+
__exportStar(require("./Events/ForSaleConfigParams"), exports);
|
|
58
|
+
__exportStar(require("./Events/ForSaleRateLimitInfo"), exports);
|
|
56
59
|
__exportStar(require("./Events/ObjectProperties"), exports);
|
|
57
60
|
__exportStar(require("./Events/StatusChange"), exports);
|
|
58
61
|
__exportStar(require("./Events/StatusChangeOrigin"), exports);
|
|
@@ -65,9 +68,10 @@ __exportStar(require("./HoldTokens/HoldTokens"), exports);
|
|
|
65
68
|
__exportStar(require("./Reports/ChartReports"), exports);
|
|
66
69
|
__exportStar(require("./Reports/EventReports"), exports);
|
|
67
70
|
__exportStar(require("./Reports/UsageReports"), exports);
|
|
71
|
+
__exportStar(require("./Seasons/CreateSeasonParams"), exports);
|
|
68
72
|
__exportStar(require("./Seasons/Season"), exports);
|
|
69
|
-
__exportStar(require("./Seasons/SeasonParams"), exports);
|
|
70
73
|
__exportStar(require("./Seasons/Seasons"), exports);
|
|
74
|
+
__exportStar(require("./Seasons/UpdateSeasonParams"), exports);
|
|
71
75
|
__exportStar(require("./TicketBuyers/AddTicketBuyerIdsResponse"), exports);
|
|
72
76
|
__exportStar(require("./TicketBuyers/RemoveTicketBuyerIdsResponse"), exports);
|
|
73
77
|
__exportStar(require("./TicketBuyers/TicketBuyers"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seatsio",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "87.0.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"url": "https://github.com/seatsio/seatsio-js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"axios": "1.
|
|
21
|
+
"axios": "1.13.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jest/globals": "30.2.0",
|
|
25
25
|
"@types/jest": "30.0.0",
|
|
26
|
-
"@types/node": "24.
|
|
26
|
+
"@types/node": "24.9.2",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
28
28
|
"@typescript-eslint/parser": "5.62.0",
|
|
29
29
|
"ctix": "2.7.1",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"jest": "30.2.0",
|
|
36
36
|
"jest-cli": "30.2.0",
|
|
37
37
|
"prettier": "3.6.2",
|
|
38
|
-
"semver": "7.7.
|
|
39
|
-
"ts-jest": "29.4.
|
|
38
|
+
"semver": "7.7.3",
|
|
39
|
+
"ts-jest": "29.4.5",
|
|
40
40
|
"typescript": "5.9.3",
|
|
41
|
-
"zx": "8.8.
|
|
41
|
+
"zx": "8.8.5"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SeasonParams = void 0;
|
|
4
|
-
var SeasonParams = /** @class */ (function () {
|
|
5
|
-
function SeasonParams() {
|
|
6
|
-
}
|
|
7
|
-
SeasonParams.prototype.key = function (key) {
|
|
8
|
-
this._key = key;
|
|
9
|
-
return this;
|
|
10
|
-
};
|
|
11
|
-
SeasonParams.prototype.name = function (name) {
|
|
12
|
-
this._name = name;
|
|
13
|
-
return this;
|
|
14
|
-
};
|
|
15
|
-
SeasonParams.prototype.numberOfEvents = function (numberOfEvents) {
|
|
16
|
-
this._numberOfEvents = numberOfEvents;
|
|
17
|
-
return this;
|
|
18
|
-
};
|
|
19
|
-
SeasonParams.prototype.eventKeys = function (eventKeys) {
|
|
20
|
-
this._eventKeys = eventKeys;
|
|
21
|
-
return this;
|
|
22
|
-
};
|
|
23
|
-
SeasonParams.prototype.tableBookingConfig = function (tableBookingConfig) {
|
|
24
|
-
this._tableBookingConfig = tableBookingConfig;
|
|
25
|
-
return this;
|
|
26
|
-
};
|
|
27
|
-
SeasonParams.prototype.channels = function (channels) {
|
|
28
|
-
this._channels = channels;
|
|
29
|
-
return this;
|
|
30
|
-
};
|
|
31
|
-
SeasonParams.prototype.forSaleConfig = function (forSaleConfig) {
|
|
32
|
-
this._forSaleConfig = forSaleConfig;
|
|
33
|
-
return this;
|
|
34
|
-
};
|
|
35
|
-
return SeasonParams;
|
|
36
|
-
}());
|
|
37
|
-
exports.SeasonParams = SeasonParams;
|