seatsio 86.3.0 → 86.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/Accounts/Accounts.d.ts +5 -5
- package/dist/src/AsyncIterator.d.ts +3 -18
- package/dist/src/AsyncIterator.js +14 -128
- package/dist/src/Charts/Charts.d.ts +11 -11
- package/dist/src/Charts/Charts.js +2 -2
- package/dist/src/EventLog/EventLog.d.ts +1 -1
- package/dist/src/EventLog/EventLog.js +1 -1
- package/dist/src/Events/Channels.d.ts +7 -7
- package/dist/src/Events/Events.d.ts +10 -10
- package/dist/src/Events/Events.js +3 -3
- package/dist/src/Lister.d.ts +2 -3
- package/dist/src/Lister.js +2 -3
- package/dist/src/TicketBuyers/TicketBuyers.d.ts +1 -1
- package/dist/src/TicketBuyers/TicketBuyers.js +1 -1
- package/dist/src/Users/Users.d.ts +3 -3
- package/dist/src/Users/Users.js +1 -1
- package/dist/src/Workspaces/Workspaces.d.ts +8 -8
- package/dist/src/Workspaces/Workspaces.js +3 -3
- package/package.json +2 -2
|
@@ -6,9 +6,9 @@ export declare class Accounts {
|
|
|
6
6
|
retrieveMyAccount(): Promise<Account>;
|
|
7
7
|
regenerateSecretKey(): Promise<any>;
|
|
8
8
|
regenerateDesignerKey(): Promise<any>;
|
|
9
|
-
enableDraftChartDrawings(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
disableDraftChartDrawings(): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
changePassword(password: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
changeHoldPeriod(holdPeriodInMinutes: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
updateSetting(key: string, value: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
+
enableDraftChartDrawings(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
disableDraftChartDrawings(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
changePassword(password: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
changeHoldPeriod(holdPeriodInMinutes: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
|
+
updateSetting(key: string, value: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
14
14
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { SeasonJson } from './Seasons/Season';
|
|
2
|
-
import { ChartJson } from './Charts/Chart';
|
|
3
1
|
import { Page } from './Page';
|
|
4
|
-
import { StatusChangeJson } from './Events/StatusChange';
|
|
5
|
-
import { WorkspaceJson } from './Workspaces/Workspace';
|
|
6
|
-
import { UserJson } from './Users/User';
|
|
7
|
-
import { EventJson } from './Events/Event';
|
|
8
2
|
import { Axios } from 'axios';
|
|
9
|
-
import { EventLogItemJson } from './EventLog/EventLogItem';
|
|
10
3
|
export interface PaginatedJson<T> {
|
|
11
4
|
items: T[];
|
|
12
5
|
next_page_starts_after?: number;
|
|
@@ -16,25 +9,17 @@ interface PaginationParams {
|
|
|
16
9
|
start_after_id?: number;
|
|
17
10
|
end_before_id?: number;
|
|
18
11
|
}
|
|
19
|
-
export declare class AsyncIterator<T> {
|
|
12
|
+
export declare class AsyncIterator<T, Y> {
|
|
20
13
|
client: Axios;
|
|
21
14
|
index: number;
|
|
22
15
|
items: T[];
|
|
23
16
|
nextPageMustBeFetched: boolean;
|
|
24
17
|
nextPageStartsAfter?: number;
|
|
25
|
-
|
|
18
|
+
pageCreator: (data: PaginatedJson<Y>) => Page<T>;
|
|
26
19
|
pages: Page<T>[];
|
|
27
20
|
params: PaginationParams;
|
|
28
21
|
url: string;
|
|
29
|
-
constructor(url: string, client: Axios,
|
|
30
|
-
charts(json: PaginatedJson<ChartJson>): void;
|
|
31
|
-
events(data: PaginatedJson<EventJson>): void;
|
|
32
|
-
seasons(data: PaginatedJson<SeasonJson>): void;
|
|
33
|
-
statusChanges(data: PaginatedJson<StatusChangeJson>): void;
|
|
34
|
-
workspaces(data: PaginatedJson<WorkspaceJson>): void;
|
|
35
|
-
eventLogItems(data: PaginatedJson<EventLogItemJson>): void;
|
|
36
|
-
ticketBuyerIds(data: PaginatedJson<string>): void;
|
|
37
|
-
users(data: PaginatedJson<UserJson>): void;
|
|
22
|
+
constructor(url: string, client: Axios, pageCreator: (data: PaginatedJson<Y>) => Page<T>, params?: {});
|
|
38
23
|
fetch(fetchParams?: {}): Promise<void>;
|
|
39
24
|
[Symbol.asyncIterator](): {
|
|
40
25
|
next(): Promise<any>;
|
|
@@ -35,118 +35,29 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
+
if (ar || !(i in from)) {
|
|
41
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
+
ar[i] = from[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
+
};
|
|
38
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
48
|
exports.AsyncIterator = void 0;
|
|
40
|
-
var Season_1 = require("./Seasons/Season");
|
|
41
|
-
var Chart_1 = require("./Charts/Chart");
|
|
42
|
-
var Page_1 = require("./Page");
|
|
43
|
-
var EventDeserializer_1 = require("./Events/EventDeserializer");
|
|
44
|
-
var StatusChange_1 = require("./Events/StatusChange");
|
|
45
|
-
var Workspace_1 = require("./Workspaces/Workspace");
|
|
46
|
-
var User_1 = require("./Users/User");
|
|
47
|
-
var EventLogItem_1 = require("./EventLog/EventLogItem");
|
|
48
49
|
var AsyncIterator = /** @class */ (function () {
|
|
49
|
-
function AsyncIterator(url, client,
|
|
50
|
+
function AsyncIterator(url, client, pageCreator, params) {
|
|
50
51
|
if (params === void 0) { params = {}; }
|
|
51
52
|
this.url = url;
|
|
52
53
|
this.client = client;
|
|
53
|
-
this.
|
|
54
|
+
this.pageCreator = pageCreator;
|
|
54
55
|
this.params = params;
|
|
55
56
|
this.items = [];
|
|
56
57
|
this.pages = [];
|
|
57
58
|
this.index = 0;
|
|
58
59
|
this.nextPageMustBeFetched = true;
|
|
59
60
|
}
|
|
60
|
-
AsyncIterator.prototype.charts = function (json) {
|
|
61
|
-
var _this_1 = this;
|
|
62
|
-
var charts = [];
|
|
63
|
-
json.items.forEach(function (chartData) {
|
|
64
|
-
var chart = new Chart_1.Chart(chartData);
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
_this_1.items.push(chart);
|
|
67
|
-
charts.push(chart);
|
|
68
|
-
});
|
|
69
|
-
// @ts-ignore
|
|
70
|
-
this.pages.push(new Page_1.Page(charts, json.next_page_starts_after, json.previous_page_ends_before));
|
|
71
|
-
};
|
|
72
|
-
AsyncIterator.prototype.events = function (data) {
|
|
73
|
-
var _this_1 = this;
|
|
74
|
-
var events = [];
|
|
75
|
-
data.items.forEach(function (eventData) {
|
|
76
|
-
var event = new EventDeserializer_1.EventDeserializer().fromJson(eventData);
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
_this_1.items.push(event);
|
|
79
|
-
events.push(event);
|
|
80
|
-
});
|
|
81
|
-
// @ts-ignore
|
|
82
|
-
this.pages.push(new Page_1.Page(events, data.next_page_starts_after, data.previous_page_ends_before));
|
|
83
|
-
};
|
|
84
|
-
AsyncIterator.prototype.seasons = function (data) {
|
|
85
|
-
var _this_1 = this;
|
|
86
|
-
var seasons = [];
|
|
87
|
-
data.items.forEach(function (seasonData) {
|
|
88
|
-
var season = new Season_1.Season(seasonData);
|
|
89
|
-
// @ts-ignore
|
|
90
|
-
_this_1.items.push(season);
|
|
91
|
-
seasons.push(season);
|
|
92
|
-
});
|
|
93
|
-
// @ts-ignore
|
|
94
|
-
this.pages.push(new Page_1.Page(seasons, data.next_page_starts_after, data.previous_page_ends_before));
|
|
95
|
-
};
|
|
96
|
-
AsyncIterator.prototype.statusChanges = function (data) {
|
|
97
|
-
var _this_1 = this;
|
|
98
|
-
var statusChanges = [];
|
|
99
|
-
data.items.forEach(function (statusData) {
|
|
100
|
-
var statusChange = new StatusChange_1.StatusChange(statusData);
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
_this_1.items.push(statusChange);
|
|
103
|
-
statusChanges.push(statusChange);
|
|
104
|
-
});
|
|
105
|
-
// @ts-ignore
|
|
106
|
-
this.pages.push(new Page_1.Page(statusChanges, data.next_page_starts_after, data.previous_page_ends_before));
|
|
107
|
-
};
|
|
108
|
-
AsyncIterator.prototype.workspaces = function (data) {
|
|
109
|
-
var _this_1 = this;
|
|
110
|
-
var workspaces = [];
|
|
111
|
-
data.items.forEach(function (json) {
|
|
112
|
-
var workspace = new Workspace_1.Workspace(json);
|
|
113
|
-
// @ts-ignore
|
|
114
|
-
_this_1.items.push(workspace);
|
|
115
|
-
workspaces.push(workspace);
|
|
116
|
-
});
|
|
117
|
-
// @ts-ignore
|
|
118
|
-
this.pages.push(new Page_1.Page(workspaces, data.next_page_starts_after, data.previous_page_ends_before));
|
|
119
|
-
};
|
|
120
|
-
AsyncIterator.prototype.eventLogItems = function (data) {
|
|
121
|
-
var _this_1 = this;
|
|
122
|
-
var eventLogItems = [];
|
|
123
|
-
data.items.forEach(function (json) {
|
|
124
|
-
var eventLogItem = new EventLogItem_1.EventLogItem(json);
|
|
125
|
-
// @ts-ignore
|
|
126
|
-
_this_1.items.push(eventLogItem);
|
|
127
|
-
eventLogItems.push(eventLogItem);
|
|
128
|
-
});
|
|
129
|
-
// @ts-ignore
|
|
130
|
-
this.pages.push(new Page_1.Page(eventLogItems, data.next_page_starts_after, data.previous_page_ends_before));
|
|
131
|
-
};
|
|
132
|
-
AsyncIterator.prototype.ticketBuyerIds = function (data) {
|
|
133
|
-
// @ts-ignore
|
|
134
|
-
this.items = data.items;
|
|
135
|
-
// @ts-ignore
|
|
136
|
-
this.pages.push(new Page_1.Page(data.items, data.next_page_starts_after, data.previous_page_ends_before));
|
|
137
|
-
};
|
|
138
|
-
AsyncIterator.prototype.users = function (data) {
|
|
139
|
-
var _this_1 = this;
|
|
140
|
-
var users = [];
|
|
141
|
-
data.items.forEach(function (userData) {
|
|
142
|
-
var user = new User_1.User(userData);
|
|
143
|
-
// @ts-ignore
|
|
144
|
-
_this_1.items.push(user);
|
|
145
|
-
users.push(user);
|
|
146
|
-
});
|
|
147
|
-
// @ts-ignore
|
|
148
|
-
this.pages.push(new Page_1.Page(users, data.next_page_starts_after, data.previous_page_ends_before));
|
|
149
|
-
};
|
|
150
61
|
AsyncIterator.prototype.fetch = function (fetchParams) {
|
|
151
62
|
var _this_1 = this;
|
|
152
63
|
if (fetchParams === void 0) { fetchParams = {}; }
|
|
@@ -159,34 +70,9 @@ var AsyncIterator = /** @class */ (function () {
|
|
|
159
70
|
else {
|
|
160
71
|
_this_1.nextPageMustBeFetched = false;
|
|
161
72
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
break;
|
|
166
|
-
case 'events':
|
|
167
|
-
_this_1.events(res.data);
|
|
168
|
-
break;
|
|
169
|
-
case 'seasons':
|
|
170
|
-
_this_1.seasons(res.data);
|
|
171
|
-
break;
|
|
172
|
-
case 'statusChanges':
|
|
173
|
-
_this_1.statusChanges(res.data);
|
|
174
|
-
break;
|
|
175
|
-
case 'users':
|
|
176
|
-
_this_1.users(res.data);
|
|
177
|
-
break;
|
|
178
|
-
case 'workspaces':
|
|
179
|
-
_this_1.workspaces(res.data);
|
|
180
|
-
break;
|
|
181
|
-
case 'eventLogItems':
|
|
182
|
-
_this_1.eventLogItems(res.data);
|
|
183
|
-
break;
|
|
184
|
-
case 'ticketBuyerIds':
|
|
185
|
-
_this_1.ticketBuyerIds(res.data);
|
|
186
|
-
break;
|
|
187
|
-
default:
|
|
188
|
-
throw new Error("Unknown object type '".concat(_this_1.objType, "'"));
|
|
189
|
-
}
|
|
73
|
+
var page = _this_1.pageCreator(res.data);
|
|
74
|
+
_this_1.items = __spreadArray(__spreadArray([], _this_1.items, true), page.items, true);
|
|
75
|
+
_this_1.pages.push(page);
|
|
190
76
|
});
|
|
191
77
|
};
|
|
192
78
|
AsyncIterator.prototype[Symbol.asyncIterator] = function () {
|
|
@@ -10,21 +10,21 @@ export declare class Charts {
|
|
|
10
10
|
client: Axios;
|
|
11
11
|
constructor(client: Axios);
|
|
12
12
|
create(name?: string | null, venueType?: Venue | null, categories?: CategoryJson[] | null): Promise<Chart>;
|
|
13
|
-
update(key: string, name?: string | null, categories?: CategoryJson[] | null): Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
-
addCategory(key: string, category: CategoryJson): Promise<import("axios").AxiosResponse<any, any>>;
|
|
15
|
-
removeCategory(chartKey: string, categoryKey: CategoryKey): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
+
update(key: string, name?: string | null, categories?: CategoryJson[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
14
|
+
addCategory(key: string, category: CategoryJson): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
15
|
+
removeCategory(chartKey: string, categoryKey: CategoryKey): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
16
16
|
listCategories(key: string): Promise<any>;
|
|
17
|
-
updateCategory(chartKey: string, categoryKey: CategoryKey, params: CategoryUpdateParams): Promise<import("axios").AxiosResponse<any, any>>;
|
|
17
|
+
updateCategory(chartKey: string, categoryKey: CategoryKey, params: CategoryUpdateParams): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
18
18
|
validatePublishedVersion(key: string): Promise<any>;
|
|
19
19
|
validateDraftVersion(key: string): Promise<any>;
|
|
20
20
|
retrieve(key: string): Promise<Chart>;
|
|
21
21
|
retrieveWithEvents(key: string): Promise<Chart>;
|
|
22
22
|
retrievePublishedVersion(key: string): Promise<any>;
|
|
23
23
|
retrieveDraftVersion(key: string): Promise<any>;
|
|
24
|
-
publishDraftVersion(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
|
-
discardDraftVersion(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
26
|
-
moveToArchive(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
27
|
-
moveOutOfArchive(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
|
+
publishDraftVersion(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
25
|
+
discardDraftVersion(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
26
|
+
moveToArchive(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
27
|
+
moveOutOfArchive(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
28
28
|
copy(key: string): Promise<Chart>;
|
|
29
29
|
copyDraftVersion(key: string): Promise<Chart>;
|
|
30
30
|
copyToWorkspace(key: string, workspaceKey: string): Promise<Chart>;
|
|
@@ -32,9 +32,9 @@ export declare class Charts {
|
|
|
32
32
|
retrievePublishedVersionThumbnail(key: string): Promise<any>;
|
|
33
33
|
retrieveDraftVersionThumbnail(key: string): Promise<any>;
|
|
34
34
|
listAllTags(): Promise<any>;
|
|
35
|
-
addTag(key: string, tag: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
36
|
-
removeTag(key: string, tag: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
37
|
-
listAll(chartListParams?: ChartListParams | null): import("..").AsyncIterator<Chart>;
|
|
35
|
+
addTag(key: string, tag: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
36
|
+
removeTag(key: string, tag: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
37
|
+
listAll(chartListParams?: ChartListParams | null): import("..").AsyncIterator<Chart, ChartJson>;
|
|
38
38
|
listFirstPage(chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
|
|
39
39
|
listPageAfter(afterId: number, chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
|
|
40
40
|
listPageBefore(beforeId: number, chartListParams?: ChartListParams | null, pageSize?: number | null): Promise<Page<Chart>>;
|
|
@@ -7,7 +7,7 @@ var Chart_1 = require("./Chart");
|
|
|
7
7
|
var Charts = /** @class */ (function () {
|
|
8
8
|
function Charts(client) {
|
|
9
9
|
this.client = client;
|
|
10
|
-
this.archive = new Lister_1.Lister('/charts/archive', this.client,
|
|
10
|
+
this.archive = new Lister_1.Lister('/charts/archive', this.client, function (data) {
|
|
11
11
|
var charts = data.items.map(function (chartData) { return new Chart_1.Chart(chartData); });
|
|
12
12
|
return new Page_1.Page(charts, data.next_page_starts_after, data.previous_page_ends_before);
|
|
13
13
|
});
|
|
@@ -146,7 +146,7 @@ var Charts = /** @class */ (function () {
|
|
|
146
146
|
return this.iterator().pageBefore(beforeId, chartListParams, pageSize);
|
|
147
147
|
};
|
|
148
148
|
Charts.prototype.iterator = function () {
|
|
149
|
-
return new Lister_1.Lister('/charts', this.client,
|
|
149
|
+
return new Lister_1.Lister('/charts', this.client, function (data) {
|
|
150
150
|
var charts = data.items.map(function (chartData) { return new Chart_1.Chart(chartData); });
|
|
151
151
|
return new Page_1.Page(charts, data.next_page_starts_after, data.previous_page_ends_before);
|
|
152
152
|
});
|
|
@@ -7,7 +7,7 @@ export declare class EventLog {
|
|
|
7
7
|
client: Axios;
|
|
8
8
|
seatsioClient: SeatsioClient;
|
|
9
9
|
constructor(client: Axios, seatsioClient: SeatsioClient);
|
|
10
|
-
listAll(): import("..").AsyncIterator<EventLogItem>;
|
|
10
|
+
listAll(): import("..").AsyncIterator<EventLogItem, EventLogItemJson>;
|
|
11
11
|
listFirstPage(pageSize?: number | null): Promise<Page<EventLogItem>>;
|
|
12
12
|
listPageAfter(afterId: number, pageSize?: number | null): Promise<Page<EventLogItem>>;
|
|
13
13
|
listPageBefore(beforeId: number, pageSize?: number | null): Promise<Page<EventLogItem>>;
|
|
@@ -25,7 +25,7 @@ var EventLog = /** @class */ (function () {
|
|
|
25
25
|
return this.iterator().pageBefore(beforeId, null, pageSize);
|
|
26
26
|
};
|
|
27
27
|
EventLog.prototype.iterator = function () {
|
|
28
|
-
return new Lister_1.Lister('/event-log', this.client,
|
|
28
|
+
return new Lister_1.Lister('/event-log', this.client, function (data) {
|
|
29
29
|
var eventLogItems = data.items.map(function (json) { return new EventLogItem_1.EventLogItem(json); });
|
|
30
30
|
return new Page_1.Page(eventLogItems, data.next_page_starts_after, data.previous_page_ends_before);
|
|
31
31
|
});
|
|
@@ -3,11 +3,11 @@ import { Channel } from './Channel';
|
|
|
3
3
|
export declare class Channels {
|
|
4
4
|
client: Axios;
|
|
5
5
|
constructor(client: Axios);
|
|
6
|
-
add(eventKey: string, channelKey: string, name: string, color: string | undefined, index: number | undefined, objects: string[] | undefined): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
-
addMultiple(eventKey: string, channelCreationParams: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
remove(eventKey: string, channelKey: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
update(eventKey: string, channelKey: string, newChannelName: any, newColor: any, newObjects: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
addObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
removeObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
replace(eventKey: string, channels: Channel[]): Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
+
add(eventKey: string, channelKey: string, name: string, color: string | undefined, index: number | undefined, objects: string[] | undefined): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
addMultiple(eventKey: string, channelCreationParams: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
remove(eventKey: string, channelKey: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
update(eventKey: string, channelKey: string, newChannelName: any, newColor: any, newObjects: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
addObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
removeObjects(eventKey: string, channelKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
replace(eventKey: string, channels: Channel[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
13
|
}
|
|
@@ -25,23 +25,23 @@ export declare class Events {
|
|
|
25
25
|
create(chartKey: string, params?: CreateEventParams): Promise<Event>;
|
|
26
26
|
createMultiple(chartKey: string, events?: CreateEventParams[]): Promise<Event[]>;
|
|
27
27
|
retrieve(eventKey: string): Promise<Event>;
|
|
28
|
-
update(eventKey: string, params: UpdateEventParams): Promise<import("axios").AxiosResponse<any, any>>;
|
|
29
|
-
delete(eventKey: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
28
|
+
update(eventKey: string, params: UpdateEventParams): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
29
|
+
delete(eventKey: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
30
30
|
moveEventToChartCopy(eventKey: string): Promise<Event>;
|
|
31
|
-
listAll(requestParameters?: {}): import("..").AsyncIterator<Event>;
|
|
31
|
+
listAll(requestParameters?: {}): import("..").AsyncIterator<Event, EventJson>;
|
|
32
32
|
listFirstPage(pageSize?: number | null): Promise<Page<Event>>;
|
|
33
33
|
listPageAfter(afterId: number, pageSize?: number | null): Promise<Page<Event>>;
|
|
34
34
|
listPageBefore(beforeId: number, pageSize?: number | null): Promise<Page<Event>>;
|
|
35
35
|
iterator(): Lister<Event, EventJson>;
|
|
36
36
|
statusChanges(eventKey: string): Lister<StatusChange, StatusChangeJson>;
|
|
37
37
|
statusChangesForObject(eventKey: string, objectId: string): Lister<StatusChange, StatusChangeJson>;
|
|
38
|
-
markAsForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any>>;
|
|
39
|
-
markAsNotForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any>>;
|
|
40
|
-
markEverythingAsForSale(eventKey: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
41
|
-
overrideSeasonObjectStatus(eventKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
|
|
42
|
-
useSeasonObjectStatus(eventKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any>>;
|
|
43
|
-
updateExtraData(eventKey: string, obj: string, extraData: object): Promise<import("axios").AxiosResponse<any, any>>;
|
|
44
|
-
updateExtraDatas(eventKey: string, extraData: Dict<any>): Promise<import("axios").AxiosResponse<any, any>>;
|
|
38
|
+
markAsForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
39
|
+
markAsNotForSale(eventKey: string, objects?: string[] | null, areaPlaces?: object | null, categories?: string[] | null): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
40
|
+
markEverythingAsForSale(eventKey: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
41
|
+
overrideSeasonObjectStatus(eventKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
42
|
+
useSeasonObjectStatus(eventKey: string, objects: string[]): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
43
|
+
updateExtraData(eventKey: string, obj: string, extraData: object): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
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
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>;
|
|
@@ -182,19 +182,19 @@ var Events = /** @class */ (function () {
|
|
|
182
182
|
return this.iterator().pageBefore(beforeId, null, pageSize);
|
|
183
183
|
};
|
|
184
184
|
Events.prototype.iterator = function () {
|
|
185
|
-
return new Lister_1.Lister('/events', this.client,
|
|
185
|
+
return new Lister_1.Lister('/events', this.client, function (data) {
|
|
186
186
|
var events = data.items.map(function (eventData) { return new EventDeserializer_1.EventDeserializer().fromJson(eventData); });
|
|
187
187
|
return new Page_1.Page(events, data.next_page_starts_after, data.previous_page_ends_before);
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
Events.prototype.statusChanges = function (eventKey) {
|
|
191
|
-
return new Lister_1.Lister("/events/".concat(encodeURIComponent(eventKey), "/status-changes"), this.client,
|
|
191
|
+
return new Lister_1.Lister("/events/".concat(encodeURIComponent(eventKey), "/status-changes"), this.client, function (data) {
|
|
192
192
|
var statusChanges = data.items.map(function (statusChangesData) { return new StatusChange_1.StatusChange(statusChangesData); });
|
|
193
193
|
return new Page_1.Page(statusChanges, data.next_page_starts_after, data.previous_page_ends_before);
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
196
|
Events.prototype.statusChangesForObject = function (eventKey, objectId) {
|
|
197
|
-
return new Lister_1.Lister("/events/".concat(encodeURIComponent(eventKey), "/objects/").concat(encodeURIComponent(objectId), "/status-changes"), this.client,
|
|
197
|
+
return new Lister_1.Lister("/events/".concat(encodeURIComponent(eventKey), "/objects/").concat(encodeURIComponent(objectId), "/status-changes"), this.client, function (data) {
|
|
198
198
|
var statusChanges = data.items.map(function (statusChangesData) { return new StatusChange_1.StatusChange(statusChangesData); });
|
|
199
199
|
return new Page_1.Page(statusChanges, data.next_page_starts_after, data.previous_page_ends_before);
|
|
200
200
|
});
|
package/dist/src/Lister.d.ts
CHANGED
|
@@ -5,10 +5,9 @@ import { Page } from './Page';
|
|
|
5
5
|
export declare class Lister<T, Y> {
|
|
6
6
|
client: Axios;
|
|
7
7
|
pageFetcher: PageFetcher<T, Y>;
|
|
8
|
-
type: string;
|
|
9
8
|
url: string;
|
|
10
|
-
constructor(url: string, client: Axios,
|
|
11
|
-
all(queryParams?: object | null): AsyncIterator<T>;
|
|
9
|
+
constructor(url: string, client: Axios, pageCreatorFunction: (data: PaginatedJson<Y>) => Page<T>);
|
|
10
|
+
all(queryParams?: object | null): AsyncIterator<T, Y>;
|
|
12
11
|
firstPage(queryParams?: object | null, pageSize?: number | null): Promise<Page<T>>;
|
|
13
12
|
pageAfter(afterId: number, queryParams?: object | null, pageSize?: number | null): Promise<Page<T>>;
|
|
14
13
|
pageBefore(beforeId: number, queryParams?: object | null, pageSize?: number | null): Promise<Page<T>>;
|
package/dist/src/Lister.js
CHANGED
|
@@ -4,15 +4,14 @@ exports.Lister = void 0;
|
|
|
4
4
|
var PageFetcher_1 = require("./PageFetcher");
|
|
5
5
|
var AsyncIterator_1 = require("./AsyncIterator");
|
|
6
6
|
var Lister = /** @class */ (function () {
|
|
7
|
-
function Lister(url, client,
|
|
7
|
+
function Lister(url, client, pageCreatorFunction) {
|
|
8
8
|
this.pageFetcher = new PageFetcher_1.PageFetcher(url, client, pageCreatorFunction);
|
|
9
9
|
this.url = url;
|
|
10
10
|
this.client = client;
|
|
11
|
-
this.type = type;
|
|
12
11
|
}
|
|
13
12
|
Lister.prototype.all = function (queryParams) {
|
|
14
13
|
if (queryParams === void 0) { queryParams = null; }
|
|
15
|
-
return new AsyncIterator_1.AsyncIterator(this.url, this.client, this.
|
|
14
|
+
return new AsyncIterator_1.AsyncIterator(this.url, this.client, this.pageFetcher.pageCreator, Lister.serialize(queryParams) || {});
|
|
16
15
|
};
|
|
17
16
|
Lister.prototype.firstPage = function (queryParams, pageSize) {
|
|
18
17
|
if (queryParams === void 0) { queryParams = null; }
|
|
@@ -9,6 +9,6 @@ export declare class TicketBuyers {
|
|
|
9
9
|
constructor(client: Axios, seatsioClient: SeatsioClient);
|
|
10
10
|
add(ids: string[]): Promise<AddTicketBuyerIdsResponse>;
|
|
11
11
|
remove(ids: string[]): Promise<RemoveTicketBuyerIdsResponse>;
|
|
12
|
-
listAll(): import("..").AsyncIterator<string>;
|
|
12
|
+
listAll(): import("..").AsyncIterator<string, string>;
|
|
13
13
|
iterator(): Lister<string, string>;
|
|
14
14
|
}
|
|
@@ -72,7 +72,7 @@ var TicketBuyers = /** @class */ (function () {
|
|
|
72
72
|
return this.iterator().all();
|
|
73
73
|
};
|
|
74
74
|
TicketBuyers.prototype.iterator = function () {
|
|
75
|
-
return new Lister_1.Lister('/ticket-buyers', this.client,
|
|
75
|
+
return new Lister_1.Lister('/ticket-buyers', this.client, function (data) {
|
|
76
76
|
return new Page_1.Page(data.items, data.next_page_starts_after, data.previous_page_ends_before);
|
|
77
77
|
});
|
|
78
78
|
};
|
|
@@ -8,9 +8,9 @@ export declare class Users {
|
|
|
8
8
|
constructor(client: Axios);
|
|
9
9
|
invite(email: string, role: string, workspaces?: string[]): Promise<Invitation>;
|
|
10
10
|
retrieve(id: number): Promise<User>;
|
|
11
|
-
activate(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
-
deactivate(id: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
listAll(role?: string | null): import("..").AsyncIterator<User>;
|
|
11
|
+
activate(id: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
deactivate(id: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
|
+
listAll(role?: string | null): import("..").AsyncIterator<User, UserJson>;
|
|
14
14
|
listFirstPage(role?: string | null, pageSize?: number | null): Promise<Page<User>>;
|
|
15
15
|
listPageAfter(afterId: number, role?: string | null, pageSize?: number | null): Promise<Page<User>>;
|
|
16
16
|
listPageBefore(beforeId: number, role?: string | null, pageSize?: number | null): Promise<Page<User>>;
|
package/dist/src/Users/Users.js
CHANGED
|
@@ -47,7 +47,7 @@ var Users = /** @class */ (function () {
|
|
|
47
47
|
return this.iterator().pageBefore(beforeId, requestParameters, pageSize);
|
|
48
48
|
};
|
|
49
49
|
Users.prototype.iterator = function () {
|
|
50
|
-
return new Lister_1.Lister('/users', this.client,
|
|
50
|
+
return new Lister_1.Lister('/users', this.client, function (data) {
|
|
51
51
|
var users = data.items.map(function (usersData) { return new User_1.User(usersData); });
|
|
52
52
|
return new Page_1.Page(users, data.next_page_starts_after, data.previous_page_ends_before);
|
|
53
53
|
});
|
|
@@ -6,22 +6,22 @@ export declare class Workspaces {
|
|
|
6
6
|
client: Axios;
|
|
7
7
|
constructor(client: Axios);
|
|
8
8
|
create(name: string, isTest?: boolean): Promise<Workspace>;
|
|
9
|
-
update(key: string, name: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
setDefault(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
+
update(key: string, name: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
setDefault(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
11
|
regenerateSecretKey(key: string): Promise<any>;
|
|
12
|
-
activate(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
13
|
-
deactivate(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
14
|
-
delete(key: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
12
|
+
activate(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
13
|
+
deactivate(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
14
|
+
delete(key: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
15
15
|
retrieve(key: string): Promise<Workspace>;
|
|
16
|
-
listAll(filter?: string | null): import("..").AsyncIterator<Workspace>;
|
|
16
|
+
listAll(filter?: string | null): import("..").AsyncIterator<Workspace, WorkspaceJson>;
|
|
17
17
|
listFirstPage(filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
18
18
|
listPageAfter(afterId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
19
19
|
listPageBefore(beforeId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
20
|
-
listActive(filter?: string | null): import("..").AsyncIterator<Workspace>;
|
|
20
|
+
listActive(filter?: string | null): import("..").AsyncIterator<Workspace, WorkspaceJson>;
|
|
21
21
|
listActiveFirstPage(filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
22
22
|
listActivePageAfter(afterId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
23
23
|
listActivePageBefore(beforeId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
24
|
-
listInactive(filter?: string | null): import("..").AsyncIterator<Workspace>;
|
|
24
|
+
listInactive(filter?: string | null): import("..").AsyncIterator<Workspace, WorkspaceJson>;
|
|
25
25
|
listInactiveFirstPage(filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
26
26
|
listInactivePageAfter(afterId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
27
27
|
listInactivePageBefore(beforeId: number, filter?: string | null, pageSize?: number | null): Promise<Page<Workspace>>;
|
|
@@ -108,19 +108,19 @@ var Workspaces = /** @class */ (function () {
|
|
|
108
108
|
return this.inactiveWorkspacesIterator().pageBefore(beforeId, requestParameters, pageSize);
|
|
109
109
|
};
|
|
110
110
|
Workspaces.prototype.iterator = function () {
|
|
111
|
-
return new Lister_1.Lister('/workspaces', this.client,
|
|
111
|
+
return new Lister_1.Lister('/workspaces', this.client, function (data) {
|
|
112
112
|
var workspaces = data.items.map(function (json) { return new Workspace_1.Workspace(json); });
|
|
113
113
|
return new Page_1.Page(workspaces, data.next_page_starts_after, data.previous_page_ends_before);
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
116
|
Workspaces.prototype.activeWorkspacesIterator = function () {
|
|
117
|
-
return new Lister_1.Lister('/workspaces/active', this.client,
|
|
117
|
+
return new Lister_1.Lister('/workspaces/active', this.client, function (data) {
|
|
118
118
|
var workspaces = data.items.map(function (json) { return new Workspace_1.Workspace(json); });
|
|
119
119
|
return new Page_1.Page(workspaces, data.next_page_starts_after, data.previous_page_ends_before);
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
122
|
Workspaces.prototype.inactiveWorkspacesIterator = function () {
|
|
123
|
-
return new Lister_1.Lister('/workspaces/inactive', this.client,
|
|
123
|
+
return new Lister_1.Lister('/workspaces/inactive', this.client, function (data) {
|
|
124
124
|
var workspaces = data.items.map(function (json) { return new Workspace_1.Workspace(json); });
|
|
125
125
|
return new Page_1.Page(workspaces, data.next_page_starts_after, data.previous_page_ends_before);
|
|
126
126
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seatsio",
|
|
3
|
-
"version": "86.
|
|
3
|
+
"version": "86.4.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"url": "https://github.com/seatsio/seatsio-js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"axios": "1.
|
|
21
|
+
"axios": "1.12.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jest/globals": "30.1.2",
|