@monaco-protocol/client-v2 0.0.2-dev.3 → 0.0.2-dev.5
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/apis/APIKeyManagementApi.d.ts +3 -3
- package/dist/apis/APIKeyManagementApi.js +5 -5
- package/dist/apis/AppManagementApi.d.ts +6 -6
- package/dist/apis/AppManagementApi.js +9 -9
- package/dist/apis/CurrenciesApi.d.ts +3 -3
- package/dist/apis/CurrenciesApi.js +5 -5
- package/dist/apis/EventCategoriesApi.d.ts +9 -9
- package/dist/apis/EventCategoriesApi.js +14 -14
- package/dist/apis/EventGroupsApi.d.ts +11 -11
- package/dist/apis/EventGroupsApi.js +16 -16
- package/dist/apis/EventSubcategoriesApi.d.ts +67 -16
- package/dist/apis/EventSubcategoriesApi.js +170 -20
- package/dist/apis/EventsApi.d.ts +42 -2
- package/dist/apis/EventsApi.js +118 -0
- package/dist/apis/MarketPricesApi.d.ts +3 -3
- package/dist/apis/MarketPricesApi.js +5 -5
- package/dist/apis/MarketsApi.d.ts +22 -9
- package/dist/apis/MarketsApi.js +32 -12
- package/dist/apis/OrdersApi.d.ts +9 -5
- package/dist/apis/OrdersApi.js +14 -2
- package/dist/apis/SessionManagementApi.d.ts +10 -10
- package/dist/apis/SessionManagementApi.js +12 -12
- package/dist/apis/TradesApi.d.ts +4 -2
- package/dist/apis/TradesApi.js +6 -0
- package/dist/apis/WalletsApi.d.ts +19 -3
- package/dist/apis/WalletsApi.js +53 -0
- package/dist/models/AddMarketOutcomeRequest.d.ts +1 -1
- package/dist/models/AddMarketOutcomeRequest.js +2 -2
- package/dist/models/AddParticipantRequest.d.ts +52 -0
- package/dist/models/AddParticipantRequest.js +60 -0
- package/dist/models/AddParticipantsRequest.d.ts +33 -0
- package/dist/models/AddParticipantsRequest.js +49 -0
- package/dist/models/ChunkOrderResponse.d.ts +8 -1
- package/dist/models/ChunkOrderResponse.js +5 -2
- package/dist/models/CreateEventRequest.d.ts +5 -5
- package/dist/models/CreateEventRequest.js +16 -6
- package/dist/models/CreateOrderRequest.d.ts +11 -2
- package/dist/models/CreateOrderRequest.js +4 -2
- package/dist/models/CreateSessionRequest.d.ts +2 -2
- package/dist/models/CreateSessionRequest.js +6 -2
- package/dist/models/DocumentReference.js +4 -4
- package/dist/models/Event.d.ts +6 -0
- package/dist/models/Event.js +2 -0
- package/dist/models/EventParticipant.d.ts +52 -0
- package/dist/models/EventParticipant.js +60 -0
- package/dist/models/EventParticipantsResponse.d.ts +40 -0
- package/dist/models/EventParticipantsResponse.js +52 -0
- package/dist/models/EventResponse.d.ts +7 -0
- package/dist/models/EventResponse.js +3 -0
- package/dist/models/Market.d.ts +11 -8
- package/dist/models/Market.js +11 -5
- package/dist/models/MarketLiquidity.d.ts +2 -2
- package/dist/models/MarketLiquidity.js +2 -2
- package/dist/models/MarketOutcomeResult.d.ts +38 -0
- package/dist/models/MarketOutcomeResult.js +50 -0
- package/dist/models/MarketOutcomeSummary.d.ts +7 -1
- package/dist/models/MarketOutcomeSummary.js +4 -2
- package/dist/models/MarketResultRequest.d.ts +3 -3
- package/dist/models/MarketResultRequest.js +3 -3
- package/dist/models/MarketSummary.d.ts +11 -2
- package/dist/models/MarketSummary.js +11 -3
- package/dist/models/Meta.d.ts +34 -1
- package/dist/models/Meta.js +29 -0
- package/dist/models/ModifyParticipantsRequest.d.ts +32 -0
- package/dist/models/ModifyParticipantsRequest.js +48 -0
- package/dist/models/Order.d.ts +2 -2
- package/dist/models/Order.js +2 -2
- package/dist/models/OrderResponse.d.ts +7 -0
- package/dist/models/OrderResponse.js +3 -0
- package/dist/models/OrderSummary.d.ts +2 -2
- package/dist/models/OrderSummary.js +2 -2
- package/dist/models/PageMeta.d.ts +50 -0
- package/dist/models/PageMeta.js +54 -0
- package/dist/models/Pageable.d.ts +44 -0
- package/dist/models/Pageable.js +52 -0
- package/dist/models/PagedEventResponse.d.ts +3 -20
- package/dist/models/PagedEventResponse.js +3 -8
- package/dist/models/PagedMarketPositionResponse.d.ts +0 -24
- package/dist/models/PagedMarketPositionResponse.js +0 -8
- package/dist/models/PagedOrderResponse.d.ts +3 -20
- package/dist/models/PagedOrderResponse.js +3 -8
- package/dist/models/PagedTradeResponse.d.ts +0 -24
- package/dist/models/PagedTradeResponse.js +0 -8
- package/dist/models/PagedTransactionResponse.d.ts +0 -24
- package/dist/models/PagedTransactionResponse.js +0 -8
- package/dist/models/Participant.d.ts +58 -0
- package/dist/models/Participant.js +62 -0
- package/dist/models/ParticipantsResponse.d.ts +40 -0
- package/dist/models/ParticipantsResponse.js +52 -0
- package/dist/models/Trade.d.ts +2 -2
- package/dist/models/Trade.js +2 -2
- package/dist/models/TradeSummary.d.ts +44 -0
- package/dist/models/TradeSummary.js +52 -0
- package/dist/models/index.d.ts +11 -2
- package/dist/models/index.js +11 -2
- package/package.json +1 -1
|
@@ -30,15 +30,92 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Activate participants in a given subcategory
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
activateParticipantsRaw(requestParameters, initOverrides) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
if (requestParameters['authorization'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling
|
|
38
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling activateParticipants().');
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['id'] == null) {
|
|
41
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling activateParticipants().');
|
|
42
|
+
}
|
|
43
|
+
if (requestParameters['modifyParticipantsRequest'] == null) {
|
|
44
|
+
throw new runtime.RequiredError('modifyParticipantsRequest', 'Required parameter "modifyParticipantsRequest" was null or undefined when calling activateParticipants().');
|
|
45
|
+
}
|
|
46
|
+
const queryParameters = {};
|
|
47
|
+
const headerParameters = {};
|
|
48
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
49
|
+
if (requestParameters['authorization'] != null) {
|
|
50
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
51
|
+
}
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: `/subcategories/{id}/participants/activate`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
body: (0, index_1.ModifyParticipantsRequestToJSON)(requestParameters['modifyParticipantsRequest']),
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ParticipantsResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Activate participants in a given subcategory
|
|
64
|
+
*/
|
|
65
|
+
activateParticipants(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.activateParticipantsRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Add participants to the given subcategory. They are added to the current list of participants in the order given
|
|
73
|
+
*/
|
|
74
|
+
addParticipantsRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['authorization'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling addParticipants().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['id'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addParticipants().');
|
|
81
|
+
}
|
|
82
|
+
if (requestParameters['addParticipantsRequest'] == null) {
|
|
83
|
+
throw new runtime.RequiredError('addParticipantsRequest', 'Required parameter "addParticipantsRequest" was null or undefined when calling addParticipants().');
|
|
84
|
+
}
|
|
85
|
+
const queryParameters = {};
|
|
86
|
+
const headerParameters = {};
|
|
87
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
88
|
+
if (requestParameters['authorization'] != null) {
|
|
89
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
90
|
+
}
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: `/subcategories/{id}/participants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
body: (0, index_1.AddParticipantsRequestToJSON)(requestParameters['addParticipantsRequest']),
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.VoidApiResponse(response);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Add participants to the given subcategory. They are added to the current list of participants in the order given
|
|
103
|
+
*/
|
|
104
|
+
addParticipants(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
yield this.addParticipantsRaw(requestParameters, initOverrides);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create subcategory
|
|
111
|
+
*/
|
|
112
|
+
createSubcategoryRaw(requestParameters, initOverrides) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
if (requestParameters['authorization'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling createSubcategory().');
|
|
39
116
|
}
|
|
40
117
|
if (requestParameters['createSubcategoryRequest'] == null) {
|
|
41
|
-
throw new runtime.RequiredError('createSubcategoryRequest', 'Required parameter "createSubcategoryRequest" was null or undefined when calling
|
|
118
|
+
throw new runtime.RequiredError('createSubcategoryRequest', 'Required parameter "createSubcategoryRequest" was null or undefined when calling createSubcategory().');
|
|
42
119
|
}
|
|
43
120
|
const queryParameters = {};
|
|
44
121
|
const headerParameters = {};
|
|
@@ -57,21 +134,60 @@ class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
|
57
134
|
});
|
|
58
135
|
}
|
|
59
136
|
/**
|
|
60
|
-
* Create
|
|
137
|
+
* Create subcategory
|
|
61
138
|
*/
|
|
62
|
-
|
|
139
|
+
createSubcategory(requestParameters, initOverrides) {
|
|
63
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const response = yield this.
|
|
141
|
+
const response = yield this.createSubcategoryRaw(requestParameters, initOverrides);
|
|
65
142
|
return yield response.value();
|
|
66
143
|
});
|
|
67
144
|
}
|
|
68
145
|
/**
|
|
69
|
-
*
|
|
146
|
+
* Deactivate participants in a given subcategory. They can be later re-activated
|
|
70
147
|
*/
|
|
71
|
-
|
|
148
|
+
deactivateParticipantsRaw(requestParameters, initOverrides) {
|
|
72
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
150
|
if (requestParameters['authorization'] == null) {
|
|
74
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling
|
|
151
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling deactivateParticipants().');
|
|
152
|
+
}
|
|
153
|
+
if (requestParameters['id'] == null) {
|
|
154
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deactivateParticipants().');
|
|
155
|
+
}
|
|
156
|
+
if (requestParameters['modifyParticipantsRequest'] == null) {
|
|
157
|
+
throw new runtime.RequiredError('modifyParticipantsRequest', 'Required parameter "modifyParticipantsRequest" was null or undefined when calling deactivateParticipants().');
|
|
158
|
+
}
|
|
159
|
+
const queryParameters = {};
|
|
160
|
+
const headerParameters = {};
|
|
161
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
162
|
+
if (requestParameters['authorization'] != null) {
|
|
163
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
164
|
+
}
|
|
165
|
+
const response = yield this.request({
|
|
166
|
+
path: `/subcategories/{id}/participants/deactivate`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
167
|
+
method: 'POST',
|
|
168
|
+
headers: headerParameters,
|
|
169
|
+
query: queryParameters,
|
|
170
|
+
body: (0, index_1.ModifyParticipantsRequestToJSON)(requestParameters['modifyParticipantsRequest']),
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ParticipantsResponseFromJSON)(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Deactivate participants in a given subcategory. They can be later re-activated
|
|
177
|
+
*/
|
|
178
|
+
deactivateParticipants(requestParameters, initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const response = yield this.deactivateParticipantsRaw(requestParameters, initOverrides);
|
|
181
|
+
return yield response.value();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Fetch subcategories by categories
|
|
186
|
+
*/
|
|
187
|
+
getAllSubcategoriesRaw(requestParameters, initOverrides) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
if (requestParameters['authorization'] == null) {
|
|
190
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getAllSubcategories().');
|
|
75
191
|
}
|
|
76
192
|
const queryParameters = {};
|
|
77
193
|
if (requestParameters['categoryIds'] != null) {
|
|
@@ -91,24 +207,58 @@ class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
|
91
207
|
});
|
|
92
208
|
}
|
|
93
209
|
/**
|
|
94
|
-
* Fetch
|
|
210
|
+
* Fetch subcategories by categories
|
|
211
|
+
*/
|
|
212
|
+
getAllSubcategories(requestParameters, initOverrides) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
const response = yield this.getAllSubcategoriesRaw(requestParameters, initOverrides);
|
|
215
|
+
return yield response.value();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Fetch events participants for a given subcategory id
|
|
220
|
+
*/
|
|
221
|
+
getParticipantsRaw(requestParameters, initOverrides) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
if (requestParameters['authorization'] == null) {
|
|
224
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getParticipants().');
|
|
225
|
+
}
|
|
226
|
+
if (requestParameters['id'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getParticipants().');
|
|
228
|
+
}
|
|
229
|
+
const queryParameters = {};
|
|
230
|
+
const headerParameters = {};
|
|
231
|
+
if (requestParameters['authorization'] != null) {
|
|
232
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
233
|
+
}
|
|
234
|
+
const response = yield this.request({
|
|
235
|
+
path: `/subcategories/{id}/participants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
236
|
+
method: 'GET',
|
|
237
|
+
headers: headerParameters,
|
|
238
|
+
query: queryParameters,
|
|
239
|
+
}, initOverrides);
|
|
240
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ParticipantsResponseFromJSON)(jsonValue));
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Fetch events participants for a given subcategory id
|
|
95
245
|
*/
|
|
96
|
-
|
|
246
|
+
getParticipants(requestParameters, initOverrides) {
|
|
97
247
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
-
const response = yield this.
|
|
248
|
+
const response = yield this.getParticipantsRaw(requestParameters, initOverrides);
|
|
99
249
|
return yield response.value();
|
|
100
250
|
});
|
|
101
251
|
}
|
|
102
252
|
/**
|
|
103
|
-
* Fetch
|
|
253
|
+
* Fetch subcategory by id
|
|
104
254
|
*/
|
|
105
|
-
|
|
255
|
+
getSubcategoryByIdRaw(requestParameters, initOverrides) {
|
|
106
256
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
257
|
if (requestParameters['authorization'] == null) {
|
|
108
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling
|
|
258
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getSubcategoryById().');
|
|
109
259
|
}
|
|
110
260
|
if (requestParameters['id'] == null) {
|
|
111
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling
|
|
261
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSubcategoryById().');
|
|
112
262
|
}
|
|
113
263
|
const queryParameters = {};
|
|
114
264
|
const headerParameters = {};
|
|
@@ -125,11 +275,11 @@ class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
|
125
275
|
});
|
|
126
276
|
}
|
|
127
277
|
/**
|
|
128
|
-
* Fetch
|
|
278
|
+
* Fetch subcategory by id
|
|
129
279
|
*/
|
|
130
|
-
|
|
280
|
+
getSubcategoryById(requestParameters, initOverrides) {
|
|
131
281
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
const response = yield this.
|
|
282
|
+
const response = yield this.getSubcategoryByIdRaw(requestParameters, initOverrides);
|
|
133
283
|
return yield response.value();
|
|
134
284
|
});
|
|
135
285
|
}
|
package/dist/apis/EventsApi.d.ts
CHANGED
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateEventRequest, EventResponse,
|
|
13
|
+
import type { CreateEventRequest, EventParticipantsResponse, EventResponse, ModifyParticipantsRequest, PagedEventResponse } from '../models/index';
|
|
14
|
+
export interface AddEventParticipantsRequest {
|
|
15
|
+
authorization: string;
|
|
16
|
+
id: string;
|
|
17
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
18
|
+
}
|
|
14
19
|
export interface CreateEventOperationRequest {
|
|
15
20
|
authorization: string;
|
|
16
21
|
createEventRequest: CreateEventRequest;
|
|
@@ -19,6 +24,10 @@ export interface GetEventRequest {
|
|
|
19
24
|
authorization: string;
|
|
20
25
|
id: string;
|
|
21
26
|
}
|
|
27
|
+
export interface GetEventParticipantsRequest {
|
|
28
|
+
authorization: string;
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
22
31
|
export interface GetEventsRequest {
|
|
23
32
|
authorization: string;
|
|
24
33
|
ids?: Set<string>;
|
|
@@ -27,12 +36,27 @@ export interface GetEventsRequest {
|
|
|
27
36
|
fromDateTime?: Date;
|
|
28
37
|
toDateTime?: Date;
|
|
29
38
|
active?: boolean;
|
|
30
|
-
page?:
|
|
39
|
+
page?: number;
|
|
40
|
+
size?: number;
|
|
41
|
+
sort?: Array<string>;
|
|
42
|
+
}
|
|
43
|
+
export interface RemoveEventParticipantsRequest {
|
|
44
|
+
authorization: string;
|
|
45
|
+
id: string;
|
|
46
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
31
47
|
}
|
|
32
48
|
/**
|
|
33
49
|
*
|
|
34
50
|
*/
|
|
35
51
|
export declare class EventsApi extends runtime.BaseAPI {
|
|
52
|
+
/**
|
|
53
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
54
|
+
*/
|
|
55
|
+
addEventParticipantsRaw(requestParameters: AddEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
56
|
+
/**
|
|
57
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
58
|
+
*/
|
|
59
|
+
addEventParticipants(requestParameters: AddEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
36
60
|
/**
|
|
37
61
|
* Create event
|
|
38
62
|
*/
|
|
@@ -49,6 +73,14 @@ export declare class EventsApi extends runtime.BaseAPI {
|
|
|
49
73
|
* Fetch event by id
|
|
50
74
|
*/
|
|
51
75
|
getEvent(requestParameters: GetEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Fetch events participants for a given event id
|
|
78
|
+
*/
|
|
79
|
+
getEventParticipantsRaw(requestParameters: GetEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
80
|
+
/**
|
|
81
|
+
* Fetch events participants for a given event id
|
|
82
|
+
*/
|
|
83
|
+
getEventParticipants(requestParameters: GetEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
52
84
|
/**
|
|
53
85
|
* Fetch events by ids, categories, sub-categories, event groups and/or from/yo dates
|
|
54
86
|
*/
|
|
@@ -57,6 +89,14 @@ export declare class EventsApi extends runtime.BaseAPI {
|
|
|
57
89
|
* Fetch events by ids, categories, sub-categories, event groups and/or from/yo dates
|
|
58
90
|
*/
|
|
59
91
|
getEvents(requestParameters: GetEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedEventResponse>;
|
|
92
|
+
/**
|
|
93
|
+
* Remove participants from a given event
|
|
94
|
+
*/
|
|
95
|
+
removeEventParticipantsRaw(requestParameters: RemoveEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
96
|
+
/**
|
|
97
|
+
* Remove participants from a given event
|
|
98
|
+
*/
|
|
99
|
+
removeEventParticipants(requestParameters: RemoveEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
60
100
|
}
|
|
61
101
|
/**
|
|
62
102
|
* @export
|
package/dist/apis/EventsApi.js
CHANGED
|
@@ -29,6 +29,45 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class EventsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
34
|
+
*/
|
|
35
|
+
addEventParticipantsRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['authorization'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling addEventParticipants().');
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['id'] == null) {
|
|
41
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling addEventParticipants().');
|
|
42
|
+
}
|
|
43
|
+
if (requestParameters['modifyParticipantsRequest'] == null) {
|
|
44
|
+
throw new runtime.RequiredError('modifyParticipantsRequest', 'Required parameter "modifyParticipantsRequest" was null or undefined when calling addEventParticipants().');
|
|
45
|
+
}
|
|
46
|
+
const queryParameters = {};
|
|
47
|
+
const headerParameters = {};
|
|
48
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
49
|
+
if (requestParameters['authorization'] != null) {
|
|
50
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
51
|
+
}
|
|
52
|
+
const response = yield this.request({
|
|
53
|
+
path: `/events/{id}/participants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
body: (0, index_1.ModifyParticipantsRequestToJSON)(requestParameters['modifyParticipantsRequest']),
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EventParticipantsResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
64
|
+
*/
|
|
65
|
+
addEventParticipants(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.addEventParticipantsRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
32
71
|
/**
|
|
33
72
|
* Create event
|
|
34
73
|
*/
|
|
@@ -99,6 +138,40 @@ class EventsApi extends runtime.BaseAPI {
|
|
|
99
138
|
return yield response.value();
|
|
100
139
|
});
|
|
101
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Fetch events participants for a given event id
|
|
143
|
+
*/
|
|
144
|
+
getEventParticipantsRaw(requestParameters, initOverrides) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
if (requestParameters['authorization'] == null) {
|
|
147
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getEventParticipants().');
|
|
148
|
+
}
|
|
149
|
+
if (requestParameters['id'] == null) {
|
|
150
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getEventParticipants().');
|
|
151
|
+
}
|
|
152
|
+
const queryParameters = {};
|
|
153
|
+
const headerParameters = {};
|
|
154
|
+
if (requestParameters['authorization'] != null) {
|
|
155
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
156
|
+
}
|
|
157
|
+
const response = yield this.request({
|
|
158
|
+
path: `/events/{id}/participants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
159
|
+
method: 'GET',
|
|
160
|
+
headers: headerParameters,
|
|
161
|
+
query: queryParameters,
|
|
162
|
+
}, initOverrides);
|
|
163
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EventParticipantsResponseFromJSON)(jsonValue));
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Fetch events participants for a given event id
|
|
168
|
+
*/
|
|
169
|
+
getEventParticipants(requestParameters, initOverrides) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const response = yield this.getEventParticipantsRaw(requestParameters, initOverrides);
|
|
172
|
+
return yield response.value();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
102
175
|
/**
|
|
103
176
|
* Fetch events by ids, categories, sub-categories, event groups and/or from/yo dates
|
|
104
177
|
*/
|
|
@@ -129,6 +202,12 @@ class EventsApi extends runtime.BaseAPI {
|
|
|
129
202
|
if (requestParameters['page'] != null) {
|
|
130
203
|
queryParameters['page'] = requestParameters['page'];
|
|
131
204
|
}
|
|
205
|
+
if (requestParameters['size'] != null) {
|
|
206
|
+
queryParameters['size'] = requestParameters['size'];
|
|
207
|
+
}
|
|
208
|
+
if (requestParameters['sort'] != null) {
|
|
209
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
210
|
+
}
|
|
132
211
|
const headerParameters = {};
|
|
133
212
|
if (requestParameters['authorization'] != null) {
|
|
134
213
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
@@ -151,6 +230,45 @@ class EventsApi extends runtime.BaseAPI {
|
|
|
151
230
|
return yield response.value();
|
|
152
231
|
});
|
|
153
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* Remove participants from a given event
|
|
235
|
+
*/
|
|
236
|
+
removeEventParticipantsRaw(requestParameters, initOverrides) {
|
|
237
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
if (requestParameters['authorization'] == null) {
|
|
239
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling removeEventParticipants().');
|
|
240
|
+
}
|
|
241
|
+
if (requestParameters['id'] == null) {
|
|
242
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling removeEventParticipants().');
|
|
243
|
+
}
|
|
244
|
+
if (requestParameters['modifyParticipantsRequest'] == null) {
|
|
245
|
+
throw new runtime.RequiredError('modifyParticipantsRequest', 'Required parameter "modifyParticipantsRequest" was null or undefined when calling removeEventParticipants().');
|
|
246
|
+
}
|
|
247
|
+
const queryParameters = {};
|
|
248
|
+
const headerParameters = {};
|
|
249
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
250
|
+
if (requestParameters['authorization'] != null) {
|
|
251
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
252
|
+
}
|
|
253
|
+
const response = yield this.request({
|
|
254
|
+
path: `/events/{id}/participants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
255
|
+
method: 'DELETE',
|
|
256
|
+
headers: headerParameters,
|
|
257
|
+
query: queryParameters,
|
|
258
|
+
body: (0, index_1.ModifyParticipantsRequestToJSON)(requestParameters['modifyParticipantsRequest']),
|
|
259
|
+
}, initOverrides);
|
|
260
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.EventParticipantsResponseFromJSON)(jsonValue));
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Remove participants from a given event
|
|
265
|
+
*/
|
|
266
|
+
removeEventParticipants(requestParameters, initOverrides) {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
const response = yield this.removeEventParticipantsRaw(requestParameters, initOverrides);
|
|
269
|
+
return yield response.value();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
154
272
|
}
|
|
155
273
|
exports.EventsApi = EventsApi;
|
|
156
274
|
/**
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { MarketLiquiditiesResponse } from '../models/index';
|
|
14
|
-
export interface
|
|
14
|
+
export interface GetMarketsPricesRequest {
|
|
15
15
|
authorization: string;
|
|
16
16
|
marketIds: Array<string>;
|
|
17
17
|
}
|
|
@@ -22,9 +22,9 @@ export declare class MarketPricesApi extends runtime.BaseAPI {
|
|
|
22
22
|
/**
|
|
23
23
|
* Fetch market prices
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
getMarketsPricesRaw(requestParameters: GetMarketsPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarketLiquiditiesResponse>>;
|
|
26
26
|
/**
|
|
27
27
|
* Fetch market prices
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
getMarketsPrices(requestParameters: GetMarketsPricesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarketLiquiditiesResponse>;
|
|
30
30
|
}
|
|
@@ -32,13 +32,13 @@ class MarketPricesApi extends runtime.BaseAPI {
|
|
|
32
32
|
/**
|
|
33
33
|
* Fetch market prices
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
getMarketsPricesRaw(requestParameters, initOverrides) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
if (requestParameters['authorization'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling
|
|
38
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getMarketsPrices().');
|
|
39
39
|
}
|
|
40
40
|
if (requestParameters['marketIds'] == null) {
|
|
41
|
-
throw new runtime.RequiredError('marketIds', 'Required parameter "marketIds" was null or undefined when calling
|
|
41
|
+
throw new runtime.RequiredError('marketIds', 'Required parameter "marketIds" was null or undefined when calling getMarketsPrices().');
|
|
42
42
|
}
|
|
43
43
|
const queryParameters = {};
|
|
44
44
|
if (requestParameters['marketIds'] != null) {
|
|
@@ -60,9 +60,9 @@ class MarketPricesApi extends runtime.BaseAPI {
|
|
|
60
60
|
/**
|
|
61
61
|
* Fetch market prices
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
getMarketsPrices(requestParameters, initOverrides) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
const response = yield this.
|
|
65
|
+
const response = yield this.getMarketsPricesRaw(requestParameters, initOverrides);
|
|
66
66
|
return yield response.value();
|
|
67
67
|
});
|
|
68
68
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AddMarketOutcomeRequest, CreateMarketRequest, MarketLiquidityResponse, MarketResponse, MarketResultRequest,
|
|
13
|
+
import type { AddMarketOutcomeRequest, CreateMarketRequest, MarketLiquidityResponse, MarketResponse, MarketResultRequest, PagedMarketPositionResponse, PagedOrderResponse, ToggleActionRequest } from '../models/index';
|
|
14
14
|
export interface AddMarketOutcomeOperationRequest {
|
|
15
15
|
authorization: string;
|
|
16
16
|
id: string;
|
|
@@ -28,13 +28,17 @@ export interface GetMarketOrdersRequest {
|
|
|
28
28
|
authorization: string;
|
|
29
29
|
id: string;
|
|
30
30
|
walletIds?: Array<string>;
|
|
31
|
-
|
|
31
|
+
page?: number;
|
|
32
|
+
size?: number;
|
|
33
|
+
sort?: Array<string>;
|
|
32
34
|
}
|
|
33
|
-
export interface
|
|
35
|
+
export interface GetMarketPositions1Request {
|
|
34
36
|
authorization: string;
|
|
35
37
|
id: string;
|
|
36
38
|
walletIds?: Array<string>;
|
|
37
|
-
page?:
|
|
39
|
+
page?: number;
|
|
40
|
+
size?: number;
|
|
41
|
+
sort?: Array<string>;
|
|
38
42
|
}
|
|
39
43
|
export interface GetMarketPricesRequest {
|
|
40
44
|
authorization: string;
|
|
@@ -47,7 +51,7 @@ export interface GetMarketsRequest {
|
|
|
47
51
|
eventIds?: Set<string>;
|
|
48
52
|
marketTypeIds?: Set<string>;
|
|
49
53
|
statuses?: Set<GetMarketsStatusesEnum>;
|
|
50
|
-
|
|
54
|
+
inPlayStatuses?: Set<GetMarketsInPlayStatusesEnum>;
|
|
51
55
|
fromDateTime?: Date;
|
|
52
56
|
toDateTime?: Date;
|
|
53
57
|
published?: boolean;
|
|
@@ -93,11 +97,11 @@ export interface VoidMarketRequest {
|
|
|
93
97
|
*/
|
|
94
98
|
export declare class MarketsApi extends runtime.BaseAPI {
|
|
95
99
|
/**
|
|
96
|
-
*
|
|
100
|
+
* Add a new market outcome to a market
|
|
97
101
|
*/
|
|
98
102
|
addMarketOutcomeRaw(requestParameters: AddMarketOutcomeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
99
103
|
/**
|
|
100
|
-
*
|
|
104
|
+
* Add a new market outcome to a market
|
|
101
105
|
*/
|
|
102
106
|
addMarketOutcome(requestParameters: AddMarketOutcomeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
103
107
|
/**
|
|
@@ -127,11 +131,11 @@ export declare class MarketsApi extends runtime.BaseAPI {
|
|
|
127
131
|
/**
|
|
128
132
|
* Fetch market positions by wallets
|
|
129
133
|
*/
|
|
130
|
-
|
|
134
|
+
getMarketPositions1Raw(requestParameters: GetMarketPositions1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketPositionResponse>>;
|
|
131
135
|
/**
|
|
132
136
|
* Fetch market positions by wallets
|
|
133
137
|
*/
|
|
134
|
-
|
|
138
|
+
getMarketPositions1(requestParameters: GetMarketPositions1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketPositionResponse>;
|
|
135
139
|
/**
|
|
136
140
|
* Fetch market prices
|
|
137
141
|
*/
|
|
@@ -227,3 +231,12 @@ export declare const GetMarketsStatusesEnum: {
|
|
|
227
231
|
readonly Closed: "Closed";
|
|
228
232
|
};
|
|
229
233
|
export type GetMarketsStatusesEnum = typeof GetMarketsStatusesEnum[keyof typeof GetMarketsStatusesEnum];
|
|
234
|
+
/**
|
|
235
|
+
* @export
|
|
236
|
+
*/
|
|
237
|
+
export declare const GetMarketsInPlayStatusesEnum: {
|
|
238
|
+
readonly NotApplicable: "NotApplicable";
|
|
239
|
+
readonly PrePlay: "PrePlay";
|
|
240
|
+
readonly InPlay: "InPlay";
|
|
241
|
+
};
|
|
242
|
+
export type GetMarketsInPlayStatusesEnum = typeof GetMarketsInPlayStatusesEnum[keyof typeof GetMarketsInPlayStatusesEnum];
|