seatsio 82.2.0 → 84.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.
@@ -47,7 +47,7 @@ export declare class Events {
47
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>;
48
48
  private doChangeStatus;
49
49
  changeObjectStatusInBatch(statusChangeRequests: StatusChangeRequest[]): Promise<any>;
50
- 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>;
50
+ changeStatusToRequest(type: 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): 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>;
@@ -45,6 +45,7 @@ var StatusChange_1 = require("./StatusChange");
45
45
  var EventDeserializer_1 = require("./EventDeserializer");
46
46
  var ChangeObjectStatusResult_1 = require("./ChangeObjectStatusResult");
47
47
  var BestAvailableObjects_1 = require("./BestAvailableObjects");
48
+ var StatusChangeRequest_1 = require("./StatusChangeRequest");
48
49
  var Events = /** @class */ (function () {
49
50
  function Events(client) {
50
51
  this.client = client;
@@ -134,9 +135,6 @@ var Events = /** @class */ (function () {
134
135
  };
135
136
  Events.prototype.update = function (eventKey, params) {
136
137
  var requestParameters = {};
137
- if (params.chartKey !== undefined) {
138
- requestParameters.chartKey = params.chartKey;
139
- }
140
138
  if (params.key !== undefined) {
141
139
  requestParameters.eventKey = params.key;
142
140
  }
@@ -288,7 +286,7 @@ var Events = /** @class */ (function () {
288
286
  if (channelKeys === void 0) { channelKeys = null; }
289
287
  if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
290
288
  if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
291
- var request = this.changeObjectStatusRequest(objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses);
289
+ var request = this.changeStatusToRequest(StatusChangeRequest_1.StatusChangeRequest.TYPE_CHANGE_STATUS_TO, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses);
292
290
  return this.doChangeStatus(request, eventKeyOrKeys);
293
291
  };
294
292
  Events.prototype.doChangeStatus = function (request, eventKeyOrKeys) {
@@ -299,7 +297,7 @@ var Events = /** @class */ (function () {
299
297
  Events.prototype.changeObjectStatusInBatch = function (statusChangeRequests) {
300
298
  var _this = this;
301
299
  var requests = statusChangeRequests.map(function (r) {
302
- var json = _this.changeObjectStatusRequest(r.objectOrObjects, r.status, r.holdToken, r.orderId, r.keepExtraData, r.ignoreChannels, r.channelKeys, r.allowedPreviousStatuses, r.rejectedPreviousStatuses);
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);
303
301
  json.event = r.eventKey;
304
302
  return json;
305
303
  });
@@ -307,13 +305,13 @@ var Events = /** @class */ (function () {
307
305
  return this.client.post('/events/actions/change-object-status?expand=objects', request)
308
306
  .then(function (res) { return res.data.results.map(function (r) { return new ChangeObjectStatusResult_1.ChangeObjectStatusResult(r.objects); }); });
309
307
  };
310
- Events.prototype.changeObjectStatusRequest = function (objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
308
+ Events.prototype.changeStatusToRequest = function (type, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
311
309
  if (channelKeys === void 0) { channelKeys = null; }
312
310
  if (allowedPreviousStatuses === void 0) { allowedPreviousStatuses = null; }
313
311
  if (rejectedPreviousStatuses === void 0) { rejectedPreviousStatuses = null; }
314
312
  var request = this.buildChangeObjectStatusRequest(objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses);
315
- request.type = 'CHANGE_STATUS_TO';
316
- request.status = status;
313
+ request.type = type;
314
+ request.status = type !== StatusChangeRequest_1.StatusChangeRequest.TYPE_RELEASE ? status : undefined;
317
315
  return request;
318
316
  };
319
317
  Events.prototype.releaseObjectsRequest = function (objectOrObjects, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
@@ -1,8 +1,11 @@
1
1
  import { ObjectOrObjects } from './Events';
2
2
  export declare class StatusChangeRequest {
3
- eventKey: string;
4
- objectOrObjects: ObjectOrObjects;
5
- status: string;
3
+ static TYPE_RELEASE: string;
4
+ static TYPE_CHANGE_STATUS_TO: string;
5
+ type: string;
6
+ eventKey: string | null;
7
+ objectOrObjects: ObjectOrObjects | null;
8
+ status: string | null;
6
9
  holdToken: string | null;
7
10
  orderId: string | null;
8
11
  keepExtraData: boolean | null;
@@ -10,5 +13,15 @@ export declare class StatusChangeRequest {
10
13
  channelKeys: string[] | null;
11
14
  allowedPreviousStatuses: string[] | null;
12
15
  rejectedPreviousStatuses: string[] | null;
13
- constructor(eventKey: 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);
16
+ withType(type: string): this;
17
+ withEventKey(eventKey: string): this;
18
+ withObjects(objectOrObjects: ObjectOrObjects): this;
19
+ withStatus(status: string): this;
20
+ withHoldToken(holdToken: string): this;
21
+ withOrderId(orderId: string): this;
22
+ withKeepExtraData(keepExtraData: boolean): this;
23
+ withIgnoreChannels(ignoreChannels: boolean): this;
24
+ withChannelKeys(channelKeys: string[]): this;
25
+ withAllowedPreviousStatuses(allowedPreviousStatuses: string[]): this;
26
+ withRejectedPreviousStatuses(rejectedPreviousStatuses: string[]): this;
14
27
  }
@@ -2,18 +2,65 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatusChangeRequest = void 0;
4
4
  var StatusChangeRequest = /** @class */ (function () {
5
- function StatusChangeRequest(eventKey, objectOrObjects, status, holdToken, orderId, keepExtraData, ignoreChannels, channelKeys, allowedPreviousStatuses, rejectedPreviousStatuses) {
5
+ function StatusChangeRequest() {
6
+ this.type = StatusChangeRequest.TYPE_CHANGE_STATUS_TO;
7
+ this.eventKey = null;
8
+ this.objectOrObjects = null;
9
+ this.status = null;
10
+ this.holdToken = null;
11
+ this.orderId = null;
12
+ this.keepExtraData = null;
13
+ this.ignoreChannels = null;
14
+ this.channelKeys = null;
15
+ this.allowedPreviousStatuses = null;
16
+ this.rejectedPreviousStatuses = null;
17
+ }
18
+ StatusChangeRequest.prototype.withType = function (type) {
19
+ this.type = type;
20
+ return this;
21
+ };
22
+ StatusChangeRequest.prototype.withEventKey = function (eventKey) {
6
23
  this.eventKey = eventKey;
24
+ return this;
25
+ };
26
+ StatusChangeRequest.prototype.withObjects = function (objectOrObjects) {
7
27
  this.objectOrObjects = objectOrObjects;
28
+ return this;
29
+ };
30
+ StatusChangeRequest.prototype.withStatus = function (status) {
8
31
  this.status = status;
32
+ return this;
33
+ };
34
+ StatusChangeRequest.prototype.withHoldToken = function (holdToken) {
9
35
  this.holdToken = holdToken;
36
+ return this;
37
+ };
38
+ StatusChangeRequest.prototype.withOrderId = function (orderId) {
10
39
  this.orderId = orderId;
40
+ return this;
41
+ };
42
+ StatusChangeRequest.prototype.withKeepExtraData = function (keepExtraData) {
11
43
  this.keepExtraData = keepExtraData;
44
+ return this;
45
+ };
46
+ StatusChangeRequest.prototype.withIgnoreChannels = function (ignoreChannels) {
12
47
  this.ignoreChannels = ignoreChannels;
48
+ return this;
49
+ };
50
+ StatusChangeRequest.prototype.withChannelKeys = function (channelKeys) {
13
51
  this.channelKeys = channelKeys;
52
+ return this;
53
+ };
54
+ StatusChangeRequest.prototype.withAllowedPreviousStatuses = function (allowedPreviousStatuses) {
14
55
  this.allowedPreviousStatuses = allowedPreviousStatuses;
56
+ return this;
57
+ };
58
+ StatusChangeRequest.prototype.withRejectedPreviousStatuses = function (rejectedPreviousStatuses) {
15
59
  this.rejectedPreviousStatuses = rejectedPreviousStatuses;
16
- }
60
+ return this;
61
+ };
62
+ StatusChangeRequest.TYPE_RELEASE = 'RELEASE';
63
+ StatusChangeRequest.TYPE_CHANGE_STATUS_TO = 'CHANGE_STATUS_TO';
17
64
  return StatusChangeRequest;
18
65
  }());
19
66
  exports.StatusChangeRequest = StatusChangeRequest;
@@ -1,7 +1,5 @@
1
1
  import { AbstractEventParams } from './AbstractEventParams';
2
2
  export declare class UpdateEventParams extends AbstractEventParams {
3
- chartKey?: string;
4
3
  isInThePast?: boolean;
5
- withChartKey(chartKey: string): this;
6
4
  withIsInThePast(isInThePast: boolean): this;
7
5
  }
@@ -22,10 +22,6 @@ var UpdateEventParams = /** @class */ (function (_super) {
22
22
  function UpdateEventParams() {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
- UpdateEventParams.prototype.withChartKey = function (chartKey) {
26
- this.chartKey = chartKey;
27
- return this;
28
- };
29
25
  UpdateEventParams.prototype.withIsInThePast = function (isInThePast) {
30
26
  this.isInThePast = isInThePast;
31
27
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seatsio",
3
- "version": "82.2.0",
3
+ "version": "84.0.0",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [
@@ -22,15 +22,15 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@jest/globals": "29.7.0",
25
- "@types/jest": "29.5.13",
26
- "@types/node": "22.7.4",
25
+ "@types/jest": "29.5.14",
26
+ "@types/node": "22.8.7",
27
27
  "@types/uuid": "10.0.0",
28
28
  "@typescript-eslint/eslint-plugin": "5.62.0",
29
29
  "@typescript-eslint/parser": "5.62.0",
30
- "ctix": "2.6.4",
30
+ "ctix": "2.7.0",
31
31
  "eslint": "8.57.1",
32
32
  "eslint-config-standard": "17.1.0",
33
- "eslint-plugin-import": "2.30.0",
33
+ "eslint-plugin-import": "2.31.0",
34
34
  "eslint-plugin-n": "16.6.2",
35
35
  "eslint-plugin-promise": "6.6.0",
36
36
  "jest": "29.7.0",
@@ -38,8 +38,8 @@
38
38
  "prettier": "3.3.3",
39
39
  "semver": "7.6.3",
40
40
  "ts-jest": "29.2.5",
41
- "typescript": "5.6.2",
42
- "uuid": "10.0.0",
43
- "zx": "8.1.8"
41
+ "typescript": "5.6.3",
42
+ "uuid": "11.0.2",
43
+ "zx": "8.2.0"
44
44
  }
45
45
  }