seatsio 85.3.0 → 85.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.
- package/dist/src/Events/EventObjectInfo.d.ts +1 -0
- package/dist/src/Events/EventObjectInfo.js +1 -0
- package/dist/src/Events/Events.d.ts +3 -3
- package/dist/src/Events/Events.js +15 -9
- package/dist/src/Events/StatusChangeRequest.d.ts +2 -0
- package/dist/src/Events/StatusChangeRequest.js +5 -0
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@ var EventObjectInfo = /** @class */ (function () {
|
|
|
44
44
|
this.seasonStatusOverriddenQuantity = json.seasonStatusOverriddenQuantity;
|
|
45
45
|
this.zone = json.zone;
|
|
46
46
|
this.floor = json.floor ? new Floor_1.Floor(json.floor.name, json.floor.displayName) : undefined;
|
|
47
|
+
this.resaleListingId = json.resaleListingId;
|
|
47
48
|
}
|
|
48
49
|
EventObjectInfo.FREE = 'free';
|
|
49
50
|
EventObjectInfo.BOOKED = 'booked';
|
|
@@ -44,15 +44,15 @@ export declare class Events {
|
|
|
44
44
|
updateExtraDatas(eventKey: string, extraData: Dict<any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
45
45
|
retrieveObjectInfo(eventKey: string, label: string): Promise<EventObjectInfo>;
|
|
46
46
|
retrieveObjectInfos(eventKey: string, labels: string[]): Promise<Dict<EventObjectInfo>>;
|
|
47
|
-
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>;
|
|
47
|
+
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, resaleListingId?: string | null): Promise<ChangeObjectStatusResult>;
|
|
48
48
|
private doChangeStatus;
|
|
49
49
|
changeObjectStatusInBatch(statusChangeRequests: StatusChangeRequest[]): Promise<any>;
|
|
50
|
-
changeStatusToRequest(type: string, objectOrObjects: ObjectOrObjects, status: string | null, holdToken: string | null, orderId: string | null, keepExtraData: boolean | null, ignoreChannels: boolean | null, channelKeys?: string[] | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null): Dict<any>;
|
|
50
|
+
changeStatusToRequest(type: string, objectOrObjects: ObjectOrObjects, status: string | null, holdToken: string | null, orderId: string | null, keepExtraData: boolean | null, ignoreChannels: boolean | null, channelKeys?: string[] | null, allowedPreviousStatuses?: string[] | null, rejectedPreviousStatuses?: string[] | null, resaleListingId?: string | null): Dict<any>;
|
|
51
51
|
private releaseObjectsRequest;
|
|
52
52
|
private buildChangeObjectStatusRequest;
|
|
53
53
|
book(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
|
|
54
54
|
bookBestAvailable(eventKey: string, bestAvailableParams: BestAvailableParams, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<BestAvailableObjects>;
|
|
55
|
-
putUpForResale(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects): Promise<ChangeObjectStatusResult>;
|
|
55
|
+
putUpForResale(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, resaleListingId?: string | null): Promise<ChangeObjectStatusResult>;
|
|
56
56
|
release(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken?: string | null, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
|
|
57
57
|
hold(eventKeyOrKeys: string | string[], objectOrObjects: ObjectOrObjects, holdToken: string, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<ChangeObjectStatusResult>;
|
|
58
58
|
holdBestAvailable(eventKey: string, bestAvailableParams: BestAvailableParams, holdToken: string, orderId?: string | null, keepExtraData?: boolean | null, ignoreChannels?: boolean | null, channelKeys?: string[] | null): Promise<BestAvailableObjects>;
|
|
@@ -278,7 +278,7 @@ var Events = /** @class */ (function () {
|
|
|
278
278
|
return objectInfos;
|
|
279
279
|
});
|
|
280
280
|
};
|
|
281
|
-
Events.prototype.changeObjectStatus = function (eventKeyOrKeys, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
|
|
281
|
+
Events.prototype.changeObjectStatus = function (eventKeyOrKeys, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, resaleListingId) {
|
|
282
282
|
if (holdToken === void 0) { holdToken = null; }
|
|
283
283
|
if (orderId === void 0) { orderId = null; }
|
|
284
284
|
if (keepExtraData === void 0) { keepExtraData = null; }
|
|
@@ -286,7 +286,8 @@ var Events = /** @class */ (function () {
|
|
|
286
286
|
if (channelKeys === void 0) { channelKeys = null; }
|
|
287
287
|
if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
|
|
288
288
|
if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
|
|
289
|
-
|
|
289
|
+
if (resaleListingId === void 0) { resaleListingId = null; }
|
|
290
|
+
var request = this.changeStatusToRequest(StatusChangeRequest_1.StatusChangeRequest.TYPE_CHANGE_STATUS_TO, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, resaleListingId);
|
|
290
291
|
return this.doChangeStatus(request, eventKeyOrKeys);
|
|
291
292
|
};
|
|
292
293
|
Events.prototype.doChangeStatus = function (request, eventKeyOrKeys) {
|
|
@@ -297,7 +298,7 @@ var Events = /** @class */ (function () {
|
|
|
297
298
|
Events.prototype.changeObjectStatusInBatch = function (statusChangeRequests) {
|
|
298
299
|
var _this = this;
|
|
299
300
|
var requests = statusChangeRequests.map(function (r) {
|
|
300
|
-
var json = _this.changeStatusToRequest(r.type, r.objectOrObjects, r.status, r.holdToken, r.orderId, r.keepExtraData, r.ignoreChannels, r.channelKeys, r.allowedPreviousStatuses, r.rejectedPreviousStatuses);
|
|
301
|
+
var json = _this.changeStatusToRequest(r.type, r.objectOrObjects, r.status, r.holdToken, r.orderId, r.keepExtraData, r.ignoreChannels, r.channelKeys, r.allowedPreviousStatuses, r.rejectedPreviousStatuses, r.resaleListingId);
|
|
301
302
|
json.event = r.eventKey;
|
|
302
303
|
return json;
|
|
303
304
|
});
|
|
@@ -305,11 +306,12 @@ var Events = /** @class */ (function () {
|
|
|
305
306
|
return this.client.post('/events/actions/change-object-status?expand=objects', request)
|
|
306
307
|
.then(function (res) { return res.data.results.map(function (r) { return new ChangeObjectStatusResult_1.ChangeObjectStatusResult(r.objects); }); });
|
|
307
308
|
};
|
|
308
|
-
Events.prototype.changeStatusToRequest = function (type, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
|
|
309
|
+
Events.prototype.changeStatusToRequest = function (type, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, resaleListingId) {
|
|
309
310
|
if (channelKeys === void 0) { channelKeys = null; }
|
|
310
311
|
if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
|
|
311
312
|
if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
|
|
312
|
-
|
|
313
|
+
if (resaleListingId === void 0) { resaleListingId = null; }
|
|
314
|
+
var request = this.buildChangeObjectStatusRequest(objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, resaleListingId);
|
|
313
315
|
request.type = type;
|
|
314
316
|
return request;
|
|
315
317
|
};
|
|
@@ -317,11 +319,11 @@ var Events = /** @class */ (function () {
|
|
|
317
319
|
if (channelKeys === void 0) { channelKeys = null; }
|
|
318
320
|
if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
|
|
319
321
|
if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
|
|
320
|
-
var request = this.buildChangeObjectStatusRequest(objectOrObjects, null, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses);
|
|
322
|
+
var request = this.buildChangeObjectStatusRequest(objectOrObjects, null, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, null);
|
|
321
323
|
request.type = 'RELEASE';
|
|
322
324
|
return request;
|
|
323
325
|
};
|
|
324
|
-
Events.prototype.buildChangeObjectStatusRequest = function (objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
|
|
326
|
+
Events.prototype.buildChangeObjectStatusRequest = function (objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses, resaleListingId) {
|
|
325
327
|
var request = {};
|
|
326
328
|
request.objects = this.normalizeObjects(objectOrObjects);
|
|
327
329
|
if (status != null) {
|
|
@@ -348,6 +350,9 @@ var Events = /** @class */ (function () {
|
|
|
348
350
|
if (rejectedPreviousStatuses !== null) {
|
|
349
351
|
request.rejectedPreviousStatuses = rejectedPreviousStatuses;
|
|
350
352
|
}
|
|
353
|
+
if (resaleListingId !== null) {
|
|
354
|
+
request.resaleListingId = resaleListingId;
|
|
355
|
+
}
|
|
351
356
|
return request;
|
|
352
357
|
};
|
|
353
358
|
Events.prototype.book = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys) {
|
|
@@ -366,8 +371,9 @@ var Events = /** @class */ (function () {
|
|
|
366
371
|
if (channelKeys === void 0) { channelKeys = null; }
|
|
367
372
|
return this.changeBestAvailableObjectStatus(encodeURIComponent(eventKey), bestAvailableParams, EventObjectInfo_1.EventObjectInfo.BOOKED, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys);
|
|
368
373
|
};
|
|
369
|
-
Events.prototype.putUpForResale = function (eventKeyOrKeys, objectOrObjects) {
|
|
370
|
-
|
|
374
|
+
Events.prototype.putUpForResale = function (eventKeyOrKeys, objectOrObjects, resaleListingId) {
|
|
375
|
+
if (resaleListingId === void 0) { resaleListingId = null; }
|
|
376
|
+
return this.changeObjectStatus(eventKeyOrKeys, objectOrObjects, EventObjectInfo_1.EventObjectInfo.RESALE, null, null, null, null, null, null, null, resaleListingId);
|
|
371
377
|
};
|
|
372
378
|
Events.prototype.release = function (eventKeyOrKeys, objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys) {
|
|
373
379
|
if (holdToken === void 0) { holdToken = null; }
|
|
@@ -15,6 +15,7 @@ export declare class StatusChangeRequest {
|
|
|
15
15
|
channelKeys: string[] | null;
|
|
16
16
|
allowedPreviousStatuses: string[] | null;
|
|
17
17
|
rejectedPreviousStatuses: string[] | null;
|
|
18
|
+
resaleListingId: string | null;
|
|
18
19
|
withType(type: string): this;
|
|
19
20
|
withEventKey(eventKey: string): this;
|
|
20
21
|
withObjects(objectOrObjects: ObjectOrObjects): this;
|
|
@@ -26,4 +27,5 @@ export declare class StatusChangeRequest {
|
|
|
26
27
|
withChannelKeys(channelKeys: string[]): this;
|
|
27
28
|
withAllowedPreviousStatuses(allowedPreviousStatuses: string[]): this;
|
|
28
29
|
withRejectedPreviousStatuses(rejectedPreviousStatuses: string[]): this;
|
|
30
|
+
withResaleListingId(resaleListingId: string): this;
|
|
29
31
|
}
|
|
@@ -14,6 +14,7 @@ var StatusChangeRequest = /** @class */ (function () {
|
|
|
14
14
|
this.channelKeys = null;
|
|
15
15
|
this.allowedPreviousStatuses = null;
|
|
16
16
|
this.rejectedPreviousStatuses = null;
|
|
17
|
+
this.resaleListingId = null;
|
|
17
18
|
}
|
|
18
19
|
StatusChangeRequest.prototype.withType = function (type) {
|
|
19
20
|
this.type = type;
|
|
@@ -59,6 +60,10 @@ var StatusChangeRequest = /** @class */ (function () {
|
|
|
59
60
|
this.rejectedPreviousStatuses = rejectedPreviousStatuses;
|
|
60
61
|
return this;
|
|
61
62
|
};
|
|
63
|
+
StatusChangeRequest.prototype.withResaleListingId = function (resaleListingId) {
|
|
64
|
+
this.resaleListingId = resaleListingId;
|
|
65
|
+
return this;
|
|
66
|
+
};
|
|
62
67
|
StatusChangeRequest.TYPE_RELEASE = 'RELEASE';
|
|
63
68
|
StatusChangeRequest.TYPE_CHANGE_STATUS_TO = 'CHANGE_STATUS_TO';
|
|
64
69
|
StatusChangeRequest.TYPE_OVERRIDE_SEASON_STATUS = 'OVERRIDE_SEASON_STATUS';
|