seatsio 87.7.0 → 87.9.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/Accounts/Account.js +12 -10
- package/dist/src/Accounts/AccountSettings.js +12 -12
- package/dist/src/Accounts/Accounts.js +28 -32
- package/dist/src/Accounts/ChartValidationSettings.js +9 -8
- package/dist/src/Accounts/DefaultRendererSettings.js +6 -8
- package/dist/src/AsyncIterator.js +39 -97
- package/dist/src/Charts/Category.js +17 -18
- package/dist/src/Charts/CategoryUpdateParams.js +13 -17
- package/dist/src/Charts/Chart.js +21 -14
- package/dist/src/Charts/ChartListParams.js +30 -34
- package/dist/src/Charts/ChartObjectInfo.js +33 -14
- package/dist/src/Charts/ChartValidation.js +5 -8
- package/dist/src/Charts/Charts.js +114 -129
- package/dist/src/Charts/Zone.js +11 -14
- package/dist/src/Common/Floor.js +9 -12
- package/dist/src/Common/IDs.js +6 -10
- package/dist/src/Common/LabelAndType.js +5 -8
- package/dist/src/Common/Labels.js +10 -12
- package/dist/src/Dict.js +1 -2
- package/dist/src/EventLog/EventLog.js +21 -27
- package/dist/src/EventLog/EventLogItem.js +7 -8
- package/dist/src/Events/AbstractEventParams.js +17 -19
- package/dist/src/Events/BestAvailableObjects.js +8 -10
- package/dist/src/Events/BestAvailableParams.js +26 -25
- package/dist/src/Events/ChangeObjectStatusResult.js +6 -10
- package/dist/src/Events/Channel.d.ts +11 -0
- package/dist/src/Events/Channel.js +15 -8
- package/dist/src/Events/Channels.d.ts +8 -7
- package/dist/src/Events/Channels.js +35 -36
- package/dist/src/Events/CreateEventParams.d.ts +3 -3
- package/dist/src/Events/CreateEventParams.js +12 -33
- package/dist/src/Events/EditForSaleConfigResult.js +10 -13
- package/dist/src/Events/Event.js +33 -18
- package/dist/src/Events/EventDeserializer.js +8 -15
- package/dist/src/Events/EventObjectInfo.js +58 -18
- package/dist/src/Events/Events.js +178 -310
- package/dist/src/Events/ForSaleConfig.js +9 -10
- package/dist/src/Events/ForSaleConfigParams.js +8 -13
- package/dist/src/Events/ForSaleRateLimitInfo.js +7 -10
- package/dist/src/Events/ObjectProperties.js +13 -14
- package/dist/src/Events/StatusChange.js +16 -8
- package/dist/src/Events/StatusChangeOrigin.js +5 -8
- package/dist/src/Events/StatusChangeRequest.js +45 -52
- package/dist/src/Events/StatusChangesParams.js +23 -26
- package/dist/src/Events/TableBookingConfig.js +13 -16
- package/dist/src/Events/UpdateEventParams.js +9 -31
- package/dist/src/HoldTokens/HoldToken.js +7 -8
- package/dist/src/HoldTokens/HoldTokens.js +16 -21
- package/dist/src/Lister.js +21 -30
- package/dist/src/LocalDate.js +13 -15
- package/dist/src/Page.js +12 -16
- package/dist/src/PageFetcher.js +21 -69
- package/dist/src/Region.js +16 -20
- package/dist/src/Reports/ChartReports.js +39 -47
- package/dist/src/Reports/EventReports.js +102 -117
- package/dist/src/Reports/UsageReports.js +19 -23
- package/dist/src/Seasons/CreateSeasonParams.d.ts +3 -3
- package/dist/src/Seasons/CreateSeasonParams.js +32 -29
- package/dist/src/Seasons/Season.js +11 -31
- package/dist/src/Seasons/Seasons.d.ts +1 -1
- package/dist/src/Seasons/Seasons.js +54 -108
- package/dist/src/Seasons/UpdateSeasonParams.js +6 -29
- package/dist/src/SeatsioClient.js +72 -77
- package/dist/src/TicketBuyers/AddTicketBuyerIdsResponse.js +5 -8
- package/dist/src/TicketBuyers/RemoveTicketBuyerIdsResponse.js +5 -8
- package/dist/src/TicketBuyers/TicketBuyers.js +27 -76
- package/dist/src/Workspaces/Workspace.js +11 -8
- package/dist/src/Workspaces/Workspaces.js +86 -112
- package/dist/src/errorInterceptor.js +2 -5
- package/dist/src/index.js +63 -79
- package/dist/src/utilities/helperFunctions.js +9 -16
- package/dist/src/utilities/reportUtility.js +19 -28
- package/package.json +5 -5
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function ForSaleConfigParams() {
|
|
6
|
-
}
|
|
7
|
-
ForSaleConfigParams.prototype.withForSale = function (forSale) {
|
|
1
|
+
export class ForSaleConfigParams {
|
|
2
|
+
forSale;
|
|
3
|
+
notForSale;
|
|
4
|
+
withForSale(forSale) {
|
|
8
5
|
this.forSale = forSale;
|
|
9
6
|
return this;
|
|
10
|
-
}
|
|
11
|
-
|
|
7
|
+
}
|
|
8
|
+
withNotForSale(notForSale) {
|
|
12
9
|
this.notForSale = notForSale;
|
|
13
10
|
return this;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}());
|
|
17
|
-
exports.ForSaleConfigParams = ForSaleConfigParams;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function ForSaleRateLimitInfo(rateLimitRemainingCalls, rateLimitResetDate) {
|
|
1
|
+
export class ForSaleRateLimitInfo {
|
|
2
|
+
rateLimitRemainingCalls;
|
|
3
|
+
rateLimitResetDate;
|
|
4
|
+
constructor(rateLimitRemainingCalls, rateLimitResetDate) {
|
|
6
5
|
this.rateLimitRemainingCalls = rateLimitRemainingCalls;
|
|
7
6
|
this.rateLimitResetDate = rateLimitResetDate;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
static fromJson(json) {
|
|
10
9
|
return new ForSaleRateLimitInfo(json.rateLimitRemainingCalls, new Date(json.rateLimitResetDate));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}());
|
|
14
|
-
exports.ForSaleRateLimitInfo = ForSaleRateLimitInfo;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class ObjectProperties {
|
|
2
|
+
extraData;
|
|
3
|
+
objectId;
|
|
4
|
+
quantity;
|
|
5
|
+
ticketType;
|
|
6
|
+
constructor(objectId) {
|
|
6
7
|
this.objectId = objectId;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
setTicketType(ticketType) {
|
|
9
10
|
this.ticketType = ticketType;
|
|
10
11
|
return this;
|
|
11
|
-
}
|
|
12
|
-
|
|
12
|
+
}
|
|
13
|
+
setQuantity(quantity) {
|
|
13
14
|
this.quantity = quantity;
|
|
14
15
|
return this;
|
|
15
|
-
}
|
|
16
|
-
|
|
16
|
+
}
|
|
17
|
+
setExtraData(extraData) {
|
|
17
18
|
this.extraData = extraData;
|
|
18
19
|
return this;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
}());
|
|
22
|
-
exports.ObjectProperties = ObjectProperties;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class StatusChange {
|
|
2
|
+
date;
|
|
3
|
+
displayedLabel;
|
|
4
|
+
eventId;
|
|
5
|
+
extraData;
|
|
6
|
+
holdToken;
|
|
7
|
+
id;
|
|
8
|
+
isPresentOnChart;
|
|
9
|
+
notPresentOnChartReason;
|
|
10
|
+
objectLabel;
|
|
11
|
+
orderId;
|
|
12
|
+
origin;
|
|
13
|
+
quantity;
|
|
14
|
+
status;
|
|
15
|
+
constructor(json) {
|
|
6
16
|
this.id = json.id;
|
|
7
17
|
this.eventId = json.eventId;
|
|
8
18
|
this.status = json.status;
|
|
@@ -17,6 +27,4 @@ var StatusChange = /** @class */ (function () {
|
|
|
17
27
|
this.notPresentOnChartReason = json.notPresentOnChartReason;
|
|
18
28
|
this.displayedLabel = json.displayedLabel ? json.displayedLabel : null;
|
|
19
29
|
}
|
|
20
|
-
|
|
21
|
-
}());
|
|
22
|
-
exports.StatusChange = StatusChange;
|
|
30
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function StatusChangeOrigin(json) {
|
|
1
|
+
export class StatusChangeOrigin {
|
|
2
|
+
type;
|
|
3
|
+
ip;
|
|
4
|
+
constructor(json) {
|
|
6
5
|
this.type = json.type;
|
|
7
6
|
this.ip = json.ip;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
}());
|
|
11
|
-
exports.StatusChangeOrigin = StatusChangeOrigin;
|
|
8
|
+
}
|
|
@@ -1,78 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
StatusChangeRequest.prototype.withType = function (type) {
|
|
1
|
+
export class StatusChangeRequest {
|
|
2
|
+
static TYPE_RELEASE = 'RELEASE';
|
|
3
|
+
static TYPE_CHANGE_STATUS_TO = 'CHANGE_STATUS_TO';
|
|
4
|
+
static TYPE_OVERRIDE_SEASON_STATUS = 'OVERRIDE_SEASON_STATUS';
|
|
5
|
+
static TYPE_USE_SEASON_STATUS = 'USE_SEASON_STATUS';
|
|
6
|
+
type = StatusChangeRequest.TYPE_CHANGE_STATUS_TO;
|
|
7
|
+
eventKey = null;
|
|
8
|
+
objectOrObjects = null;
|
|
9
|
+
status = null;
|
|
10
|
+
holdToken = null;
|
|
11
|
+
orderId = null;
|
|
12
|
+
keepExtraData = null;
|
|
13
|
+
ignoreChannels = null;
|
|
14
|
+
channelKeys = null;
|
|
15
|
+
allowedPreviousStatuses = null;
|
|
16
|
+
rejectedPreviousStatuses = null;
|
|
17
|
+
resaleListingId = null;
|
|
18
|
+
season = null;
|
|
19
|
+
withType(type) {
|
|
21
20
|
this.type = type;
|
|
22
21
|
return this;
|
|
23
|
-
}
|
|
24
|
-
|
|
22
|
+
}
|
|
23
|
+
withEventKey(eventKey) {
|
|
25
24
|
this.eventKey = eventKey;
|
|
26
25
|
return this;
|
|
27
|
-
}
|
|
28
|
-
|
|
26
|
+
}
|
|
27
|
+
withObjects(objectOrObjects) {
|
|
29
28
|
this.objectOrObjects = objectOrObjects;
|
|
30
29
|
return this;
|
|
31
|
-
}
|
|
32
|
-
|
|
30
|
+
}
|
|
31
|
+
withStatus(status) {
|
|
33
32
|
this.status = status;
|
|
34
33
|
return this;
|
|
35
|
-
}
|
|
36
|
-
|
|
34
|
+
}
|
|
35
|
+
withHoldToken(holdToken) {
|
|
37
36
|
this.holdToken = holdToken;
|
|
38
37
|
return this;
|
|
39
|
-
}
|
|
40
|
-
|
|
38
|
+
}
|
|
39
|
+
withOrderId(orderId) {
|
|
41
40
|
this.orderId = orderId;
|
|
42
41
|
return this;
|
|
43
|
-
}
|
|
44
|
-
|
|
42
|
+
}
|
|
43
|
+
withKeepExtraData(keepExtraData) {
|
|
45
44
|
this.keepExtraData = keepExtraData;
|
|
46
45
|
return this;
|
|
47
|
-
}
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
withIgnoreChannels(ignoreChannels) {
|
|
49
48
|
this.ignoreChannels = ignoreChannels;
|
|
50
49
|
return this;
|
|
51
|
-
}
|
|
52
|
-
|
|
50
|
+
}
|
|
51
|
+
withChannelKeys(channelKeys) {
|
|
53
52
|
this.channelKeys = channelKeys;
|
|
54
53
|
return this;
|
|
55
|
-
}
|
|
56
|
-
|
|
54
|
+
}
|
|
55
|
+
withAllowedPreviousStatuses(allowedPreviousStatuses) {
|
|
57
56
|
this.allowedPreviousStatuses = allowedPreviousStatuses;
|
|
58
57
|
return this;
|
|
59
|
-
}
|
|
60
|
-
|
|
58
|
+
}
|
|
59
|
+
withRejectedPreviousStatuses(rejectedPreviousStatuses) {
|
|
61
60
|
this.rejectedPreviousStatuses = rejectedPreviousStatuses;
|
|
62
61
|
return this;
|
|
63
|
-
}
|
|
64
|
-
|
|
62
|
+
}
|
|
63
|
+
withResaleListingId(resaleListingId) {
|
|
65
64
|
this.resaleListingId = resaleListingId;
|
|
66
65
|
return this;
|
|
67
|
-
}
|
|
68
|
-
|
|
66
|
+
}
|
|
67
|
+
withSeasonKey(seasonKey) {
|
|
69
68
|
this.season = seasonKey;
|
|
70
69
|
return this;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
StatusChangeRequest.TYPE_CHANGE_STATUS_TO = 'CHANGE_STATUS_TO';
|
|
74
|
-
StatusChangeRequest.TYPE_OVERRIDE_SEASON_STATUS = 'OVERRIDE_SEASON_STATUS';
|
|
75
|
-
StatusChangeRequest.TYPE_USE_SEASON_STATUS = 'USE_SEASON_STATUS';
|
|
76
|
-
return StatusChangeRequest;
|
|
77
|
-
}());
|
|
78
|
-
exports.StatusChangeRequest = StatusChangeRequest;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export class StatusChangesParams {
|
|
2
|
+
filter;
|
|
3
|
+
filterType;
|
|
4
|
+
sortDirection;
|
|
5
|
+
sortField;
|
|
6
|
+
constructor(filter, filterType = 'CONTAINS') {
|
|
7
7
|
this.filter = filter;
|
|
8
8
|
this.filterType = filterType;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
sortByObjectLabel() {
|
|
11
11
|
this.sortField = 'objectLabel';
|
|
12
12
|
return this;
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
sortByStatus() {
|
|
15
15
|
this.sortField = 'status';
|
|
16
16
|
return this;
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
sortByDate() {
|
|
19
19
|
this.sortField = 'date';
|
|
20
20
|
return this;
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
22
|
+
sortAscending() {
|
|
23
23
|
this.sortDirection = 'asc';
|
|
24
24
|
return this;
|
|
25
|
-
}
|
|
26
|
-
|
|
25
|
+
}
|
|
26
|
+
sortDescending() {
|
|
27
27
|
this.sortDirection = 'desc';
|
|
28
28
|
return this;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (filterType === void 0) { filterType = 'CONTAINS'; }
|
|
29
|
+
}
|
|
30
|
+
withFilter(filter, filterType = 'CONTAINS') {
|
|
32
31
|
this.filter = filter;
|
|
33
32
|
this.filterType = filterType;
|
|
34
33
|
return this;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
}
|
|
35
|
+
serialize() {
|
|
36
|
+
let sort = null;
|
|
38
37
|
if (this.sortField && this.sortDirection) {
|
|
39
38
|
sort = this.sortField + ':' + this.sortDirection;
|
|
40
39
|
}
|
|
@@ -47,9 +46,7 @@ var StatusChangesParams = /** @class */ (function () {
|
|
|
47
46
|
return {
|
|
48
47
|
filter: this.filter,
|
|
49
48
|
filterType: this.filterType,
|
|
50
|
-
sort
|
|
49
|
+
sort
|
|
51
50
|
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
}());
|
|
55
|
-
exports.StatusChangesParams = StatusChangesParams;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function TableBookingConfig(mode, tables) {
|
|
1
|
+
export class TableBookingConfig {
|
|
2
|
+
mode;
|
|
3
|
+
tables;
|
|
4
|
+
constructor(mode, tables) {
|
|
6
5
|
this.mode = mode;
|
|
7
6
|
this.tables = tables;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
static inherit() {
|
|
10
9
|
return new TableBookingConfig('INHERIT');
|
|
11
|
-
}
|
|
12
|
-
|
|
10
|
+
}
|
|
11
|
+
static allByTable() {
|
|
13
12
|
return new TableBookingConfig('ALL_BY_TABLE');
|
|
14
|
-
}
|
|
15
|
-
|
|
13
|
+
}
|
|
14
|
+
static allBySeat() {
|
|
16
15
|
return new TableBookingConfig('ALL_BY_SEAT');
|
|
17
|
-
}
|
|
18
|
-
|
|
16
|
+
}
|
|
17
|
+
static custom(tables) {
|
|
19
18
|
return new TableBookingConfig('CUSTOM', tables);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
}());
|
|
23
|
-
exports.TableBookingConfig = TableBookingConfig;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,35 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.withIsInThePast = function (isInThePast) {
|
|
1
|
+
import { AbstractEventParams } from './AbstractEventParams';
|
|
2
|
+
export class UpdateEventParams extends AbstractEventParams {
|
|
3
|
+
isInThePast;
|
|
4
|
+
date;
|
|
5
|
+
withIsInThePast(isInThePast) {
|
|
26
6
|
this.isInThePast = isInThePast;
|
|
27
7
|
return this;
|
|
28
|
-
}
|
|
29
|
-
|
|
8
|
+
}
|
|
9
|
+
withDate(date) {
|
|
30
10
|
this.date = date;
|
|
31
11
|
return this;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}(AbstractEventParams_1.AbstractEventParams));
|
|
35
|
-
exports.UpdateEventParams = UpdateEventParams;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class HoldToken {
|
|
2
|
+
expiresAt;
|
|
3
|
+
expiresInSeconds;
|
|
4
|
+
holdToken;
|
|
5
|
+
workspaceKey;
|
|
6
|
+
constructor(json) {
|
|
6
7
|
this.holdToken = json.holdToken;
|
|
7
8
|
this.expiresAt = new Date(json.expiresAt);
|
|
8
9
|
this.expiresInSeconds = json.expiresInSeconds;
|
|
9
10
|
this.workspaceKey = json.workspaceKey;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
}());
|
|
13
|
-
exports.HoldToken = HoldToken;
|
|
12
|
+
}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var HoldTokens = /** @class */ (function () {
|
|
6
|
-
function HoldTokens(client) {
|
|
1
|
+
import { HoldToken } from './HoldToken';
|
|
2
|
+
export class HoldTokens {
|
|
3
|
+
client;
|
|
4
|
+
constructor(client) {
|
|
7
5
|
this.client = client;
|
|
8
6
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var request = {};
|
|
7
|
+
create(expiresInMinutes = null) {
|
|
8
|
+
const request = {};
|
|
12
9
|
if (expiresInMinutes !== null) {
|
|
13
10
|
request.expiresInMinutes = expiresInMinutes;
|
|
14
11
|
}
|
|
15
|
-
return this.client.post('/hold-tokens', request).then(
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
return this.client.post('/hold-tokens', request).then(res => new HoldToken(res.data));
|
|
13
|
+
}
|
|
14
|
+
expiresInMinutes(holdToken, minutes) {
|
|
15
|
+
const request = {};
|
|
19
16
|
request.expiresInMinutes = minutes;
|
|
20
|
-
return this.client.post(
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return this.client.get(
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}());
|
|
27
|
-
exports.HoldTokens = HoldTokens;
|
|
17
|
+
return this.client.post(`/hold-tokens/${holdToken}`, request).then(res => new HoldToken(res.data));
|
|
18
|
+
}
|
|
19
|
+
retrieve(holdToken) {
|
|
20
|
+
return this.client.get(`/hold-tokens/${holdToken}`).then(res => new HoldToken(res.data));
|
|
21
|
+
}
|
|
22
|
+
}
|
package/dist/src/Lister.js
CHANGED
|
@@ -1,41 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
this.pageFetcher = new
|
|
1
|
+
import { PageFetcher } from './PageFetcher';
|
|
2
|
+
import { AsyncIterator } from './AsyncIterator';
|
|
3
|
+
export class Lister {
|
|
4
|
+
client;
|
|
5
|
+
pageFetcher;
|
|
6
|
+
url;
|
|
7
|
+
constructor(url, client, pageCreatorFunction) {
|
|
8
|
+
this.pageFetcher = new PageFetcher(url, client, pageCreatorFunction);
|
|
9
9
|
this.url = url;
|
|
10
10
|
this.client = client;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Lister.prototype.firstPage = function (queryParams, pageSize) {
|
|
17
|
-
if (queryParams === void 0) { queryParams = null; }
|
|
18
|
-
if (pageSize === void 0) { pageSize = null; }
|
|
12
|
+
all(queryParams = null) {
|
|
13
|
+
return new AsyncIterator(this.url, this.client, this.pageFetcher.pageCreator, Lister.serialize(queryParams) || {});
|
|
14
|
+
}
|
|
15
|
+
firstPage(queryParams = null, pageSize = null) {
|
|
19
16
|
return this.pageFetcher.fetchAfter(null, Lister.serialize(queryParams), pageSize);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (queryParams === void 0) { queryParams = null; }
|
|
23
|
-
if (pageSize === void 0) { pageSize = null; }
|
|
17
|
+
}
|
|
18
|
+
pageAfter(afterId, queryParams = null, pageSize = null) {
|
|
24
19
|
return this.pageFetcher.fetchAfter(afterId, Lister.serialize(queryParams), pageSize);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (queryParams === void 0) { queryParams = null; }
|
|
28
|
-
if (pageSize === void 0) { pageSize = null; }
|
|
20
|
+
}
|
|
21
|
+
pageBefore(beforeId, queryParams = null, pageSize = null) {
|
|
29
22
|
return this.pageFetcher.fetchBefore(beforeId, Lister.serialize(queryParams), pageSize);
|
|
30
|
-
}
|
|
31
|
-
|
|
23
|
+
}
|
|
24
|
+
static serialize(queryParams) {
|
|
32
25
|
// @ts-ignore
|
|
33
|
-
if (queryParams
|
|
26
|
+
if (queryParams?.serialize) {
|
|
34
27
|
// @ts-ignore
|
|
35
28
|
return queryParams.serialize();
|
|
36
29
|
}
|
|
37
30
|
return queryParams;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}());
|
|
41
|
-
exports.Lister = Lister;
|
|
31
|
+
}
|
|
32
|
+
}
|
package/dist/src/LocalDate.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export class LocalDate {
|
|
2
|
+
year;
|
|
3
|
+
month;
|
|
4
|
+
day;
|
|
5
|
+
constructor(year, month, day) {
|
|
6
6
|
this.year = year;
|
|
7
7
|
this.month = month;
|
|
8
8
|
this.day = day;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
toString() {
|
|
11
11
|
return this.year + '-' + String(this.month).padStart(2, '0') + '-' + String(this.day).padStart(2, '0');
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}
|
|
13
|
+
static parse(date) {
|
|
14
|
+
const year = parseInt(date.substring(0, 4));
|
|
15
|
+
const month = parseInt(date.substring(5, 7));
|
|
16
|
+
const day = parseInt(date.substring(8, 10));
|
|
17
17
|
return new LocalDate(year, month, day);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}());
|
|
21
|
-
exports.LocalDate = LocalDate;
|
|
18
|
+
}
|
|
19
|
+
}
|
package/dist/src/Page.js
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (afterId === void 0) { afterId = null; }
|
|
7
|
-
if (beforeId === void 0) { beforeId = null; }
|
|
1
|
+
export class Page {
|
|
2
|
+
items;
|
|
3
|
+
nextPageStartsAfter;
|
|
4
|
+
previousPageEndsBefore;
|
|
5
|
+
constructor(items, afterId = null, beforeId = null) {
|
|
8
6
|
this.items = items;
|
|
9
7
|
this.nextPageStartsAfter = afterId;
|
|
10
8
|
this.previousPageEndsBefore = beforeId;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
[Symbol.iterator]() {
|
|
11
|
+
let index = 0;
|
|
12
|
+
const charts = this.items;
|
|
15
13
|
return {
|
|
16
|
-
next
|
|
14
|
+
next() {
|
|
17
15
|
if (index < charts.length) {
|
|
18
|
-
|
|
16
|
+
const chart = charts[index];
|
|
19
17
|
index++;
|
|
20
18
|
return { value: chart, done: false };
|
|
21
19
|
}
|
|
@@ -24,7 +22,5 @@ var Page = /** @class */ (function () {
|
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}());
|
|
30
|
-
exports.Page = Page;
|
|
25
|
+
}
|
|
26
|
+
}
|