@monaco-protocol/client-v2 0.0.2-dev.4 → 0.0.2-dev.7

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.
Files changed (40) hide show
  1. package/dist/apis/MarketsApi.d.ts +15 -6
  2. package/dist/apis/MarketsApi.js +18 -10
  3. package/dist/apis/OrdersApi.d.ts +12 -0
  4. package/dist/apis/OrdersApi.js +34 -0
  5. package/dist/apis/WalletsApi.d.ts +13 -1
  6. package/dist/apis/WalletsApi.js +41 -0
  7. package/dist/models/AddMarketOutcomeRequest.d.ts +1 -1
  8. package/dist/models/AddMarketOutcomeRequest.js +2 -2
  9. package/dist/models/CreateOrderRequest.d.ts +2 -2
  10. package/dist/models/CreateOrderRequest.js +2 -2
  11. package/dist/models/Event.d.ts +6 -0
  12. package/dist/models/Event.js +2 -0
  13. package/dist/models/EventResponse.d.ts +7 -0
  14. package/dist/models/EventResponse.js +3 -0
  15. package/dist/models/Market.d.ts +17 -8
  16. package/dist/models/Market.js +13 -5
  17. package/dist/models/MarketLiquidity.d.ts +2 -2
  18. package/dist/models/MarketLiquidity.js +2 -2
  19. package/dist/models/MarketOutcomeResult.d.ts +38 -0
  20. package/dist/models/MarketOutcomeResult.js +50 -0
  21. package/dist/models/MarketOutcomeSummary.d.ts +7 -1
  22. package/dist/models/MarketOutcomeSummary.js +4 -2
  23. package/dist/models/MarketPosition.d.ts +4 -2
  24. package/dist/models/MarketResultRequest.d.ts +3 -3
  25. package/dist/models/MarketResultRequest.js +3 -3
  26. package/dist/models/MarketSummary.d.ts +23 -2
  27. package/dist/models/MarketSummary.js +15 -3
  28. package/dist/models/Order.d.ts +2 -2
  29. package/dist/models/Order.js +2 -2
  30. package/dist/models/OrderSummary.d.ts +2 -2
  31. package/dist/models/OrderSummary.js +2 -2
  32. package/dist/models/Pageable.d.ts +44 -0
  33. package/dist/models/Pageable.js +52 -0
  34. package/dist/models/PagedEventResponse.d.ts +7 -0
  35. package/dist/models/PagedEventResponse.js +3 -0
  36. package/dist/models/Trade.d.ts +2 -2
  37. package/dist/models/Trade.js +2 -2
  38. package/dist/models/index.d.ts +2 -1
  39. package/dist/models/index.js +2 -1
  40. package/package.json +1 -1
@@ -32,7 +32,7 @@ export interface GetMarketOrdersRequest {
32
32
  size?: number;
33
33
  sort?: Array<string>;
34
34
  }
35
- export interface GetMarketPositionsRequest {
35
+ export interface GetMarketPositions1Request {
36
36
  authorization: string;
37
37
  id: string;
38
38
  walletIds?: Array<string>;
@@ -51,7 +51,7 @@ export interface GetMarketsRequest {
51
51
  eventIds?: Set<string>;
52
52
  marketTypeIds?: Set<string>;
53
53
  statuses?: Set<GetMarketsStatusesEnum>;
54
- inPlay?: boolean;
54
+ inPlayStatuses?: Set<GetMarketsInPlayStatusesEnum>;
55
55
  fromDateTime?: Date;
56
56
  toDateTime?: Date;
57
57
  published?: boolean;
@@ -97,11 +97,11 @@ export interface VoidMarketRequest {
97
97
  */
98
98
  export declare class MarketsApi extends runtime.BaseAPI {
99
99
  /**
100
- * Create market outcome
100
+ * Add a new market outcome to a market
101
101
  */
102
102
  addMarketOutcomeRaw(requestParameters: AddMarketOutcomeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
103
103
  /**
104
- * Create market outcome
104
+ * Add a new market outcome to a market
105
105
  */
106
106
  addMarketOutcome(requestParameters: AddMarketOutcomeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
107
107
  /**
@@ -131,11 +131,11 @@ export declare class MarketsApi extends runtime.BaseAPI {
131
131
  /**
132
132
  * Fetch market positions by wallets
133
133
  */
134
- getMarketPositionsRaw(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketPositionResponse>>;
134
+ getMarketPositions1Raw(requestParameters: GetMarketPositions1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketPositionResponse>>;
135
135
  /**
136
136
  * Fetch market positions by wallets
137
137
  */
138
- getMarketPositions(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketPositionResponse>;
138
+ getMarketPositions1(requestParameters: GetMarketPositions1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketPositionResponse>;
139
139
  /**
140
140
  * Fetch market prices
141
141
  */
@@ -231,3 +231,12 @@ export declare const GetMarketsStatusesEnum: {
231
231
  readonly Closed: "Closed";
232
232
  };
233
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];
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.GetMarketsStatusesEnum = exports.MarketsApi = void 0;
25
+ exports.GetMarketsInPlayStatusesEnum = exports.GetMarketsStatusesEnum = exports.MarketsApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const index_1 = require("../models/index");
28
28
  /**
@@ -30,7 +30,7 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class MarketsApi extends runtime.BaseAPI {
32
32
  /**
33
- * Create market outcome
33
+ * Add a new market outcome to a market
34
34
  */
35
35
  addMarketOutcomeRaw(requestParameters, initOverrides) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
@@ -60,7 +60,7 @@ class MarketsApi extends runtime.BaseAPI {
60
60
  });
61
61
  }
62
62
  /**
63
- * Create market outcome
63
+ * Add a new market outcome to a market
64
64
  */
65
65
  addMarketOutcome(requestParameters, initOverrides) {
66
66
  return __awaiter(this, void 0, void 0, function* () {
@@ -186,13 +186,13 @@ class MarketsApi extends runtime.BaseAPI {
186
186
  /**
187
187
  * Fetch market positions by wallets
188
188
  */
189
- getMarketPositionsRaw(requestParameters, initOverrides) {
189
+ getMarketPositions1Raw(requestParameters, initOverrides) {
190
190
  return __awaiter(this, void 0, void 0, function* () {
191
191
  if (requestParameters['authorization'] == null) {
192
- throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getMarketPositions().');
192
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getMarketPositions1().');
193
193
  }
194
194
  if (requestParameters['id'] == null) {
195
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getMarketPositions().');
195
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getMarketPositions1().');
196
196
  }
197
197
  const queryParameters = {};
198
198
  if (requestParameters['walletIds'] != null) {
@@ -223,9 +223,9 @@ class MarketsApi extends runtime.BaseAPI {
223
223
  /**
224
224
  * Fetch market positions by wallets
225
225
  */
226
- getMarketPositions(requestParameters, initOverrides) {
226
+ getMarketPositions1(requestParameters, initOverrides) {
227
227
  return __awaiter(this, void 0, void 0, function* () {
228
- const response = yield this.getMarketPositionsRaw(requestParameters, initOverrides);
228
+ const response = yield this.getMarketPositions1Raw(requestParameters, initOverrides);
229
229
  return yield response.value();
230
230
  });
231
231
  }
@@ -287,8 +287,8 @@ class MarketsApi extends runtime.BaseAPI {
287
287
  if (requestParameters['statuses'] != null) {
288
288
  queryParameters['statuses'] = requestParameters['statuses'];
289
289
  }
290
- if (requestParameters['inPlay'] != null) {
291
- queryParameters['inPlay'] = requestParameters['inPlay'];
290
+ if (requestParameters['inPlayStatuses'] != null) {
291
+ queryParameters['inPlayStatuses'] = requestParameters['inPlayStatuses'];
292
292
  }
293
293
  if (requestParameters['fromDateTime'] != null) {
294
294
  queryParameters['fromDateTime'] = requestParameters['fromDateTime'].toISOString();
@@ -620,3 +620,11 @@ exports.GetMarketsStatusesEnum = {
620
620
  Voided: 'Voided',
621
621
  Closed: 'Closed'
622
622
  };
623
+ /**
624
+ * @export
625
+ */
626
+ exports.GetMarketsInPlayStatusesEnum = {
627
+ NotApplicable: 'NotApplicable',
628
+ PrePlay: 'PrePlay',
629
+ InPlay: 'InPlay'
630
+ };
@@ -29,6 +29,10 @@ export interface GetOrderRequest {
29
29
  authorization: string;
30
30
  id: string;
31
31
  }
32
+ export interface GetOrderByReferenceRequest {
33
+ authorization: string;
34
+ reference: string;
35
+ }
32
36
  export interface GetOrdersRequest {
33
37
  authorization: string;
34
38
  appIds?: Array<string>;
@@ -88,6 +92,14 @@ export declare class OrdersApi extends runtime.BaseAPI {
88
92
  * Fetch order by id
89
93
  */
90
94
  getOrder(requestParameters: GetOrderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
95
+ /**
96
+ * Fetch order by reference
97
+ */
98
+ getOrderByReferenceRaw(requestParameters: GetOrderByReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
99
+ /**
100
+ * Fetch order by reference
101
+ */
102
+ getOrderByReference(requestParameters: GetOrderByReferenceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
91
103
  /**
92
104
  * Fetch orders by filters
93
105
  */
@@ -173,6 +173,40 @@ class OrdersApi extends runtime.BaseAPI {
173
173
  return yield response.value();
174
174
  });
175
175
  }
176
+ /**
177
+ * Fetch order by reference
178
+ */
179
+ getOrderByReferenceRaw(requestParameters, initOverrides) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ if (requestParameters['authorization'] == null) {
182
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getOrderByReference().');
183
+ }
184
+ if (requestParameters['reference'] == null) {
185
+ throw new runtime.RequiredError('reference', 'Required parameter "reference" was null or undefined when calling getOrderByReference().');
186
+ }
187
+ const queryParameters = {};
188
+ const headerParameters = {};
189
+ if (requestParameters['authorization'] != null) {
190
+ headerParameters['authorization'] = String(requestParameters['authorization']);
191
+ }
192
+ const response = yield this.request({
193
+ path: `/orders/by-reference/{reference}`.replace(`{${"reference"}}`, encodeURIComponent(String(requestParameters['reference']))),
194
+ method: 'GET',
195
+ headers: headerParameters,
196
+ query: queryParameters,
197
+ }, initOverrides);
198
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrderResponseFromJSON)(jsonValue));
199
+ });
200
+ }
201
+ /**
202
+ * Fetch order by reference
203
+ */
204
+ getOrderByReference(requestParameters, initOverrides) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ const response = yield this.getOrderByReferenceRaw(requestParameters, initOverrides);
207
+ return yield response.value();
208
+ });
209
+ }
176
210
  /**
177
211
  * Fetch orders by filters
178
212
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateWalletRequest, PagedTransactionResponse, TransferResponse, WalletResponse } from '../models/index';
13
+ import type { CreateWalletRequest, Pageable, PagedMarketPositionResponse, PagedTransactionResponse, TransferResponse, WalletResponse } from '../models/index';
14
14
  export interface CreateWalletOperationRequest {
15
15
  authorization: string;
16
16
  createWalletRequest: CreateWalletRequest;
@@ -27,6 +27,12 @@ export interface FetchWalletsRequest {
27
27
  size?: number;
28
28
  sort?: Array<string>;
29
29
  }
30
+ export interface GetMarketPositionsRequest {
31
+ authorization: string;
32
+ id: string;
33
+ pageable: Pageable;
34
+ marketIds?: Array<string>;
35
+ }
30
36
  export interface GetWalletRequest {
31
37
  authorization: string;
32
38
  id: string;
@@ -74,6 +80,12 @@ export declare class WalletsApi extends runtime.BaseAPI {
74
80
  * Fetch a list of wallets
75
81
  */
76
82
  fetchWallets(requestParameters: FetchWalletsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
83
+ /**
84
+ */
85
+ getMarketPositionsRaw(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedMarketPositionResponse>>;
86
+ /**
87
+ */
88
+ getMarketPositions(requestParameters: GetMarketPositionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedMarketPositionResponse>;
77
89
  /**
78
90
  * Fetch a wallet by id
79
91
  * Fetch a wallet by id
@@ -154,6 +154,47 @@ class WalletsApi extends runtime.BaseAPI {
154
154
  yield this.fetchWalletsRaw(requestParameters, initOverrides);
155
155
  });
156
156
  }
157
+ /**
158
+ */
159
+ getMarketPositionsRaw(requestParameters, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ if (requestParameters['authorization'] == null) {
162
+ throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getMarketPositions().');
163
+ }
164
+ if (requestParameters['id'] == null) {
165
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getMarketPositions().');
166
+ }
167
+ if (requestParameters['pageable'] == null) {
168
+ throw new runtime.RequiredError('pageable', 'Required parameter "pageable" was null or undefined when calling getMarketPositions().');
169
+ }
170
+ const queryParameters = {};
171
+ if (requestParameters['marketIds'] != null) {
172
+ queryParameters['marketIds'] = requestParameters['marketIds'];
173
+ }
174
+ if (requestParameters['pageable'] != null) {
175
+ queryParameters['pageable'] = requestParameters['pageable'];
176
+ }
177
+ const headerParameters = {};
178
+ if (requestParameters['authorization'] != null) {
179
+ headerParameters['authorization'] = String(requestParameters['authorization']);
180
+ }
181
+ const response = yield this.request({
182
+ path: `/wallets/{id}/positions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
183
+ method: 'GET',
184
+ headers: headerParameters,
185
+ query: queryParameters,
186
+ }, initOverrides);
187
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PagedMarketPositionResponseFromJSON)(jsonValue));
188
+ });
189
+ }
190
+ /**
191
+ */
192
+ getMarketPositions(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const response = yield this.getMarketPositionsRaw(requestParameters, initOverrides);
195
+ return yield response.value();
196
+ });
197
+ }
157
198
  /**
158
199
  * Fetch a wallet by id
159
200
  * Fetch a wallet by id
@@ -20,7 +20,7 @@ export interface AddMarketOutcomeRequest {
20
20
  * @type {string}
21
21
  * @memberof AddMarketOutcomeRequest
22
22
  */
23
- name?: string;
23
+ title?: string;
24
24
  }
25
25
  /**
26
26
  * Check if a given object implements the AddMarketOutcomeRequest interface.
@@ -32,7 +32,7 @@ function AddMarketOutcomeRequestFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
- 'name': json['name'] == null ? undefined : json['name'],
35
+ 'title': json['title'] == null ? undefined : json['title'],
36
36
  };
37
37
  }
38
38
  function AddMarketOutcomeRequestToJSON(json) {
@@ -43,6 +43,6 @@ function AddMarketOutcomeRequestToJSONTyped(value, ignoreDiscriminator = false)
43
43
  return value;
44
44
  }
45
45
  return {
46
- 'name': value['name'],
46
+ 'title': value['title'],
47
47
  };
48
48
  }
@@ -35,10 +35,10 @@ export interface CreateOrderRequest {
35
35
  side?: CreateOrderRequestSideEnum;
36
36
  /**
37
37
  *
38
- * @type {number}
38
+ * @type {string}
39
39
  * @memberof CreateOrderRequest
40
40
  */
41
- outcome?: number;
41
+ outcomeId?: string;
42
42
  /**
43
43
  *
44
44
  * @type {number}
@@ -50,7 +50,7 @@ function CreateOrderRequestFromJSONTyped(json, ignoreDiscriminator) {
50
50
  'walletId': json['walletId'] == null ? undefined : json['walletId'],
51
51
  'marketId': json['marketId'] == null ? undefined : json['marketId'],
52
52
  'side': json['side'] == null ? undefined : json['side'],
53
- 'outcome': json['outcome'] == null ? undefined : json['outcome'],
53
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
54
54
  'price': json['price'] == null ? undefined : json['price'],
55
55
  'stake': json['stake'] == null ? undefined : json['stake'],
56
56
  'keepWhenInPlay': json['keepWhenInPlay'] == null ? undefined : json['keepWhenInPlay'],
@@ -70,7 +70,7 @@ function CreateOrderRequestToJSONTyped(value, ignoreDiscriminator = false) {
70
70
  'walletId': value['walletId'],
71
71
  'marketId': value['marketId'],
72
72
  'side': value['side'],
73
- 'outcome': value['outcome'],
73
+ 'outcomeId': value['outcomeId'],
74
74
  'price': value['price'],
75
75
  'stake': value['stake'],
76
76
  'keepWhenInPlay': value['keepWhenInPlay'],
@@ -82,6 +82,12 @@ export interface Event {
82
82
  * @memberof Event
83
83
  */
84
84
  modifiedAt?: Date;
85
+ /**
86
+ *
87
+ * @type {DocumentReference}
88
+ * @memberof Event
89
+ */
90
+ participants?: DocumentReference;
85
91
  }
86
92
  /**
87
93
  * Check if a given object implements the Event interface.
@@ -44,6 +44,7 @@ function EventFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'actualEndTime': json['actualEndTime'] == null ? undefined : (new Date(json['actualEndTime'])),
45
45
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
46
46
  'modifiedAt': json['modifiedAt'] == null ? undefined : (new Date(json['modifiedAt'])),
47
+ 'participants': json['participants'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['participants']),
47
48
  };
48
49
  }
49
50
  function EventToJSON(json) {
@@ -65,5 +66,6 @@ function EventToJSONTyped(value, ignoreDiscriminator = false) {
65
66
  'actualEndTime': value['actualEndTime'] == null ? undefined : ((value['actualEndTime']).toISOString()),
66
67
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
67
68
  'modifiedAt': value['modifiedAt'] == null ? undefined : ((value['modifiedAt']).toISOString()),
69
+ 'participants': (0, DocumentReference_1.DocumentReferenceToJSON)(value['participants']),
68
70
  };
69
71
  }
@@ -14,6 +14,7 @@ import type { Category } from './Category';
14
14
  import type { Subcategory } from './Subcategory';
15
15
  import type { Event } from './Event';
16
16
  import type { EventGroup } from './EventGroup';
17
+ import type { EventParticipant } from './EventParticipant';
17
18
  /**
18
19
  *
19
20
  * @export
@@ -50,6 +51,12 @@ export interface EventResponse {
50
51
  * @memberof EventResponse
51
52
  */
52
53
  categories?: Array<Category>;
54
+ /**
55
+ *
56
+ * @type {Array<EventParticipant>}
57
+ * @memberof EventResponse
58
+ */
59
+ participants?: Array<EventParticipant>;
53
60
  }
54
61
  /**
55
62
  * Check if a given object implements the EventResponse interface.
@@ -23,6 +23,7 @@ const Category_1 = require("./Category");
23
23
  const Subcategory_1 = require("./Subcategory");
24
24
  const Event_1 = require("./Event");
25
25
  const EventGroup_1 = require("./EventGroup");
26
+ const EventParticipant_1 = require("./EventParticipant");
26
27
  /**
27
28
  * Check if a given object implements the EventResponse interface.
28
29
  */
@@ -42,6 +43,7 @@ function EventResponseFromJSONTyped(json, ignoreDiscriminator) {
42
43
  'eventGroups': json['eventGroups'] == null ? undefined : (json['eventGroups'].map(EventGroup_1.EventGroupFromJSON)),
43
44
  'subcategories': json['subcategories'] == null ? undefined : (json['subcategories'].map(Subcategory_1.SubcategoryFromJSON)),
44
45
  'categories': json['categories'] == null ? undefined : (json['categories'].map(Category_1.CategoryFromJSON)),
46
+ 'participants': json['participants'] == null ? undefined : (json['participants'].map(EventParticipant_1.EventParticipantFromJSON)),
45
47
  };
46
48
  }
47
49
  function EventResponseToJSON(json) {
@@ -57,5 +59,6 @@ function EventResponseToJSONTyped(value, ignoreDiscriminator = false) {
57
59
  'eventGroups': value['eventGroups'] == null ? undefined : (value['eventGroups'].map(EventGroup_1.EventGroupToJSON)),
58
60
  'subcategories': value['subcategories'] == null ? undefined : (value['subcategories'].map(Subcategory_1.SubcategoryToJSON)),
59
61
  'categories': value['categories'] == null ? undefined : (value['categories'].map(Category_1.CategoryToJSON)),
62
+ 'participants': value['participants'] == null ? undefined : (value['participants'].map(EventParticipant_1.EventParticipantToJSON)),
60
63
  };
61
64
  }
@@ -66,16 +66,10 @@ export interface Market {
66
66
  currencyId?: string;
67
67
  /**
68
68
  *
69
- * @type {boolean}
70
- * @memberof Market
71
- */
72
- inPlayEnabled?: boolean;
73
- /**
74
- *
75
- * @type {boolean}
69
+ * @type {string}
76
70
  * @memberof Market
77
71
  */
78
- inPlay?: boolean;
72
+ inPlayStatus?: MarketInPlayStatusEnum;
79
73
  /**
80
74
  *
81
75
  * @type {number}
@@ -100,6 +94,12 @@ export interface Market {
100
94
  * @memberof Market
101
95
  */
102
96
  lockAt?: Date;
97
+ /**
98
+ *
99
+ * @type {Date}
100
+ * @memberof Market
101
+ */
102
+ settledAt?: Date;
103
103
  /**
104
104
  *
105
105
  * @type {string}
@@ -137,6 +137,15 @@ export interface Market {
137
137
  */
138
138
  modifiedAt?: Date;
139
139
  }
140
+ /**
141
+ * @export
142
+ */
143
+ export declare const MarketInPlayStatusEnum: {
144
+ readonly NotApplicable: "NotApplicable";
145
+ readonly PrePlay: "PrePlay";
146
+ readonly InPlay: "InPlay";
147
+ };
148
+ export type MarketInPlayStatusEnum = typeof MarketInPlayStatusEnum[keyof typeof MarketInPlayStatusEnum];
140
149
  /**
141
150
  * @export
142
151
  */
@@ -13,13 +13,21 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.MarketStatusEnum = exports.MarketEventStartActionEnum = exports.MarketMarketLockActionEnum = void 0;
16
+ exports.MarketStatusEnum = exports.MarketEventStartActionEnum = exports.MarketMarketLockActionEnum = exports.MarketInPlayStatusEnum = void 0;
17
17
  exports.instanceOfMarket = instanceOfMarket;
18
18
  exports.MarketFromJSON = MarketFromJSON;
19
19
  exports.MarketFromJSONTyped = MarketFromJSONTyped;
20
20
  exports.MarketToJSON = MarketToJSON;
21
21
  exports.MarketToJSONTyped = MarketToJSONTyped;
22
22
  const DocumentReference_1 = require("./DocumentReference");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.MarketInPlayStatusEnum = {
27
+ NotApplicable: 'NotApplicable',
28
+ PrePlay: 'PrePlay',
29
+ InPlay: 'InPlay'
30
+ };
23
31
  /**
24
32
  * @export
25
33
  */
@@ -69,12 +77,12 @@ function MarketFromJSONTyped(json, ignoreDiscriminator) {
69
77
  'marketValue': json['marketValue'] == null ? undefined : json['marketValue'],
70
78
  'marketDiscriminator': json['marketDiscriminator'] == null ? undefined : json['marketDiscriminator'],
71
79
  'currencyId': json['currencyId'] == null ? undefined : json['currencyId'],
72
- 'inPlayEnabled': json['inPlayEnabled'] == null ? undefined : json['inPlayEnabled'],
73
- 'inPlay': json['inPlay'] == null ? undefined : json['inPlay'],
80
+ 'inPlayStatus': json['inPlayStatus'] == null ? undefined : json['inPlayStatus'],
74
81
  'inPlayDelay': json['inPlayDelay'] == null ? undefined : json['inPlayDelay'],
75
82
  'published': json['published'] == null ? undefined : json['published'],
76
83
  'suspended': json['suspended'] == null ? undefined : json['suspended'],
77
84
  'lockAt': json['lockAt'] == null ? undefined : (new Date(json['lockAt'])),
85
+ 'settledAt': json['settledAt'] == null ? undefined : (new Date(json['settledAt'])),
78
86
  'marketLockAction': json['marketLockAction'] == null ? undefined : json['marketLockAction'],
79
87
  'eventStartAction': json['eventStartAction'] == null ? undefined : json['eventStartAction'],
80
88
  'status': json['status'] == null ? undefined : json['status'],
@@ -99,12 +107,12 @@ function MarketToJSONTyped(value, ignoreDiscriminator = false) {
99
107
  'marketValue': value['marketValue'],
100
108
  'marketDiscriminator': value['marketDiscriminator'],
101
109
  'currencyId': value['currencyId'],
102
- 'inPlayEnabled': value['inPlayEnabled'],
103
- 'inPlay': value['inPlay'],
110
+ 'inPlayStatus': value['inPlayStatus'],
104
111
  'inPlayDelay': value['inPlayDelay'],
105
112
  'published': value['published'],
106
113
  'suspended': value['suspended'],
107
114
  'lockAt': value['lockAt'] == null ? undefined : ((value['lockAt']).toISOString()),
115
+ 'settledAt': value['settledAt'] == null ? undefined : ((value['settledAt']).toISOString()),
108
116
  'marketLockAction': value['marketLockAction'],
109
117
  'eventStartAction': value['eventStartAction'],
110
118
  'status': value['status'],
@@ -23,10 +23,10 @@ export interface MarketLiquidity {
23
23
  side?: MarketLiquiditySideEnum;
24
24
  /**
25
25
  *
26
- * @type {number}
26
+ * @type {string}
27
27
  * @memberof MarketLiquidity
28
28
  */
29
- outcome?: number;
29
+ outcomeId?: string;
30
30
  /**
31
31
  *
32
32
  * @type {number}
@@ -41,7 +41,7 @@ function MarketLiquidityFromJSONTyped(json, ignoreDiscriminator) {
41
41
  }
42
42
  return {
43
43
  'side': json['side'] == null ? undefined : json['side'],
44
- 'outcome': json['outcome'] == null ? undefined : json['outcome'],
44
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
45
45
  'price': json['price'] == null ? undefined : json['price'],
46
46
  'amount': json['amount'] == null ? undefined : json['amount'],
47
47
  'matched': json['matched'] == null ? undefined : json['matched'],
@@ -56,7 +56,7 @@ function MarketLiquidityToJSONTyped(value, ignoreDiscriminator = false) {
56
56
  }
57
57
  return {
58
58
  'side': value['side'],
59
- 'outcome': value['outcome'],
59
+ 'outcomeId': value['outcomeId'],
60
60
  'price': value['price'],
61
61
  'amount': value['amount'],
62
62
  'matched': value['matched'],
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Monaco API
3
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
4
+ *
5
+ * The version of the OpenAPI document: 0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface MarketOutcomeResult
16
+ */
17
+ export interface MarketOutcomeResult {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof MarketOutcomeResult
22
+ */
23
+ outcomeId?: string;
24
+ /**
25
+ *
26
+ * @type {boolean}
27
+ * @memberof MarketOutcomeResult
28
+ */
29
+ winner?: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the MarketOutcomeResult interface.
33
+ */
34
+ export declare function instanceOfMarketOutcomeResult(value: object): value is MarketOutcomeResult;
35
+ export declare function MarketOutcomeResultFromJSON(json: any): MarketOutcomeResult;
36
+ export declare function MarketOutcomeResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): MarketOutcomeResult;
37
+ export declare function MarketOutcomeResultToJSON(json: any): MarketOutcomeResult;
38
+ export declare function MarketOutcomeResultToJSONTyped(value?: MarketOutcomeResult | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Monaco API
6
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
7
+ *
8
+ * The version of the OpenAPI document: 0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfMarketOutcomeResult = instanceOfMarketOutcomeResult;
17
+ exports.MarketOutcomeResultFromJSON = MarketOutcomeResultFromJSON;
18
+ exports.MarketOutcomeResultFromJSONTyped = MarketOutcomeResultFromJSONTyped;
19
+ exports.MarketOutcomeResultToJSON = MarketOutcomeResultToJSON;
20
+ exports.MarketOutcomeResultToJSONTyped = MarketOutcomeResultToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the MarketOutcomeResult interface.
23
+ */
24
+ function instanceOfMarketOutcomeResult(value) {
25
+ return true;
26
+ }
27
+ function MarketOutcomeResultFromJSON(json) {
28
+ return MarketOutcomeResultFromJSONTyped(json, false);
29
+ }
30
+ function MarketOutcomeResultFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
36
+ 'winner': json['winner'] == null ? undefined : json['winner'],
37
+ };
38
+ }
39
+ function MarketOutcomeResultToJSON(json) {
40
+ return MarketOutcomeResultToJSONTyped(json, false);
41
+ }
42
+ function MarketOutcomeResultToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'outcomeId': value['outcomeId'],
48
+ 'winner': value['winner'],
49
+ };
50
+ }
@@ -26,7 +26,13 @@ export interface MarketOutcomeSummary {
26
26
  * @type {string}
27
27
  * @memberof MarketOutcomeSummary
28
28
  */
29
- name?: string;
29
+ title?: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof MarketOutcomeSummary
34
+ */
35
+ ordering?: number;
30
36
  /**
31
37
  *
32
38
  * @type {boolean}
@@ -33,7 +33,8 @@ function MarketOutcomeSummaryFromJSONTyped(json, ignoreDiscriminator) {
33
33
  }
34
34
  return {
35
35
  'id': json['id'] == null ? undefined : json['id'],
36
- 'name': json['name'] == null ? undefined : json['name'],
36
+ 'title': json['title'] == null ? undefined : json['title'],
37
+ 'ordering': json['ordering'] == null ? undefined : json['ordering'],
37
38
  'winner': json['winner'] == null ? undefined : json['winner'],
38
39
  };
39
40
  }
@@ -46,7 +47,8 @@ function MarketOutcomeSummaryToJSONTyped(value, ignoreDiscriminator = false) {
46
47
  }
47
48
  return {
48
49
  'id': value['id'],
49
- 'name': value['name'],
50
+ 'title': value['title'],
51
+ 'ordering': value['ordering'],
50
52
  'winner': value['winner'],
51
53
  };
52
54
  }
@@ -30,10 +30,12 @@ export interface MarketPosition {
30
30
  walletId?: string;
31
31
  /**
32
32
  *
33
- * @type {Array<number>}
33
+ * @type {{ [key: string]: number; }}
34
34
  * @memberof MarketPosition
35
35
  */
36
- exposures?: Array<number>;
36
+ exposures?: {
37
+ [key: string]: number;
38
+ };
37
39
  }
38
40
  /**
39
41
  * Check if a given object implements the MarketPosition interface.
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { OutcomeResult } from './OutcomeResult';
12
+ import type { MarketOutcomeResult } from './MarketOutcomeResult';
13
13
  /**
14
14
  *
15
15
  * @export
@@ -18,10 +18,10 @@ import type { OutcomeResult } from './OutcomeResult';
18
18
  export interface MarketResultRequest {
19
19
  /**
20
20
  *
21
- * @type {Array<OutcomeResult>}
21
+ * @type {Array<MarketOutcomeResult>}
22
22
  * @memberof MarketResultRequest
23
23
  */
24
- results?: Array<OutcomeResult>;
24
+ results?: Array<MarketOutcomeResult>;
25
25
  }
26
26
  /**
27
27
  * Check if a given object implements the MarketResultRequest interface.
@@ -18,7 +18,7 @@ exports.MarketResultRequestFromJSON = MarketResultRequestFromJSON;
18
18
  exports.MarketResultRequestFromJSONTyped = MarketResultRequestFromJSONTyped;
19
19
  exports.MarketResultRequestToJSON = MarketResultRequestToJSON;
20
20
  exports.MarketResultRequestToJSONTyped = MarketResultRequestToJSONTyped;
21
- const OutcomeResult_1 = require("./OutcomeResult");
21
+ const MarketOutcomeResult_1 = require("./MarketOutcomeResult");
22
22
  /**
23
23
  * Check if a given object implements the MarketResultRequest interface.
24
24
  */
@@ -33,7 +33,7 @@ function MarketResultRequestFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return json;
34
34
  }
35
35
  return {
36
- 'results': json['results'] == null ? undefined : (json['results'].map(OutcomeResult_1.OutcomeResultFromJSON)),
36
+ 'results': json['results'] == null ? undefined : (json['results'].map(MarketOutcomeResult_1.MarketOutcomeResultFromJSON)),
37
37
  };
38
38
  }
39
39
  function MarketResultRequestToJSON(json) {
@@ -44,6 +44,6 @@ function MarketResultRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
44
  return value;
45
45
  }
46
46
  return {
47
- 'results': value['results'] == null ? undefined : (value['results'].map(OutcomeResult_1.OutcomeResultToJSON)),
47
+ 'results': value['results'] == null ? undefined : (value['results'].map(MarketOutcomeResult_1.MarketOutcomeResultToJSON)),
48
48
  };
49
49
  }
@@ -29,10 +29,10 @@ export interface MarketSummary {
29
29
  name?: string;
30
30
  /**
31
31
  *
32
- * @type {boolean}
32
+ * @type {string}
33
33
  * @memberof MarketSummary
34
34
  */
35
- inPlay?: boolean;
35
+ inPlayStatus?: MarketSummaryInPlayStatusEnum;
36
36
  /**
37
37
  *
38
38
  * @type {boolean}
@@ -51,7 +51,28 @@ export interface MarketSummary {
51
51
  * @memberof MarketSummary
52
52
  */
53
53
  status?: MarketSummaryStatusEnum;
54
+ /**
55
+ *
56
+ * @type {Date}
57
+ * @memberof MarketSummary
58
+ */
59
+ lockAt?: Date;
60
+ /**
61
+ *
62
+ * @type {Date}
63
+ * @memberof MarketSummary
64
+ */
65
+ settledAt?: Date;
54
66
  }
67
+ /**
68
+ * @export
69
+ */
70
+ export declare const MarketSummaryInPlayStatusEnum: {
71
+ readonly NotApplicable: "NotApplicable";
72
+ readonly PrePlay: "PrePlay";
73
+ readonly InPlay: "InPlay";
74
+ };
75
+ export type MarketSummaryInPlayStatusEnum = typeof MarketSummaryInPlayStatusEnum[keyof typeof MarketSummaryInPlayStatusEnum];
55
76
  /**
56
77
  * @export
57
78
  */
@@ -13,12 +13,20 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.MarketSummaryStatusEnum = void 0;
16
+ exports.MarketSummaryStatusEnum = exports.MarketSummaryInPlayStatusEnum = void 0;
17
17
  exports.instanceOfMarketSummary = instanceOfMarketSummary;
18
18
  exports.MarketSummaryFromJSON = MarketSummaryFromJSON;
19
19
  exports.MarketSummaryFromJSONTyped = MarketSummaryFromJSONTyped;
20
20
  exports.MarketSummaryToJSON = MarketSummaryToJSON;
21
21
  exports.MarketSummaryToJSONTyped = MarketSummaryToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.MarketSummaryInPlayStatusEnum = {
26
+ NotApplicable: 'NotApplicable',
27
+ PrePlay: 'PrePlay',
28
+ InPlay: 'InPlay'
29
+ };
22
30
  /**
23
31
  * @export
24
32
  */
@@ -48,10 +56,12 @@ function MarketSummaryFromJSONTyped(json, ignoreDiscriminator) {
48
56
  return {
49
57
  'id': json['id'] == null ? undefined : json['id'],
50
58
  'name': json['name'] == null ? undefined : json['name'],
51
- 'inPlay': json['inPlay'] == null ? undefined : json['inPlay'],
59
+ 'inPlayStatus': json['inPlayStatus'] == null ? undefined : json['inPlayStatus'],
52
60
  'published': json['published'] == null ? undefined : json['published'],
53
61
  'suspended': json['suspended'] == null ? undefined : json['suspended'],
54
62
  'status': json['status'] == null ? undefined : json['status'],
63
+ 'lockAt': json['lockAt'] == null ? undefined : (new Date(json['lockAt'])),
64
+ 'settledAt': json['settledAt'] == null ? undefined : (new Date(json['settledAt'])),
55
65
  };
56
66
  }
57
67
  function MarketSummaryToJSON(json) {
@@ -64,9 +74,11 @@ function MarketSummaryToJSONTyped(value, ignoreDiscriminator = false) {
64
74
  return {
65
75
  'id': value['id'],
66
76
  'name': value['name'],
67
- 'inPlay': value['inPlay'],
77
+ 'inPlayStatus': value['inPlayStatus'],
68
78
  'published': value['published'],
69
79
  'suspended': value['suspended'],
70
80
  'status': value['status'],
81
+ 'lockAt': value['lockAt'] == null ? undefined : ((value['lockAt']).toISOString()),
82
+ 'settledAt': value['settledAt'] == null ? undefined : ((value['settledAt']).toISOString()),
71
83
  };
72
84
  }
@@ -48,10 +48,10 @@ export interface Order {
48
48
  side?: OrderSideEnum;
49
49
  /**
50
50
  *
51
- * @type {number}
51
+ * @type {string}
52
52
  * @memberof Order
53
53
  */
54
- outcome?: number;
54
+ outcomeId?: string;
55
55
  /**
56
56
  *
57
57
  * @type {number}
@@ -55,7 +55,7 @@ function OrderFromJSONTyped(json, ignoreDiscriminator) {
55
55
  'market': json['market'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['market']),
56
56
  'walletId': json['walletId'] == null ? undefined : json['walletId'],
57
57
  'side': json['side'] == null ? undefined : json['side'],
58
- 'outcome': json['outcome'] == null ? undefined : json['outcome'],
58
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
59
59
  'price': json['price'] == null ? undefined : json['price'],
60
60
  'stake': json['stake'] == null ? undefined : json['stake'],
61
61
  'stakeUnmatched': json['stakeUnmatched'] == null ? undefined : json['stakeUnmatched'],
@@ -81,7 +81,7 @@ function OrderToJSONTyped(value, ignoreDiscriminator = false) {
81
81
  'market': (0, DocumentReference_1.DocumentReferenceToJSON)(value['market']),
82
82
  'walletId': value['walletId'],
83
83
  'side': value['side'],
84
- 'outcome': value['outcome'],
84
+ 'outcomeId': value['outcomeId'],
85
85
  'price': value['price'],
86
86
  'stake': value['stake'],
87
87
  'stakeUnmatched': value['stakeUnmatched'],
@@ -36,10 +36,10 @@ export interface OrderSummary {
36
36
  side?: OrderSummarySideEnum;
37
37
  /**
38
38
  *
39
- * @type {number}
39
+ * @type {string}
40
40
  * @memberof OrderSummary
41
41
  */
42
- outcome?: number;
42
+ outcomeId?: string;
43
43
  /**
44
44
  *
45
45
  * @type {number}
@@ -44,7 +44,7 @@ function OrderSummaryFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'id': json['id'] == null ? undefined : json['id'],
45
45
  'market': json['market'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['market']),
46
46
  'side': json['side'] == null ? undefined : json['side'],
47
- 'outcome': json['outcome'] == null ? undefined : json['outcome'],
47
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
48
48
  'price': json['price'] == null ? undefined : json['price'],
49
49
  'stake': json['stake'] == null ? undefined : json['stake'],
50
50
  'stakeUnmatched': json['stakeUnmatched'] == null ? undefined : json['stakeUnmatched'],
@@ -63,7 +63,7 @@ function OrderSummaryToJSONTyped(value, ignoreDiscriminator = false) {
63
63
  'id': value['id'],
64
64
  'market': (0, DocumentReference_1.DocumentReferenceToJSON)(value['market']),
65
65
  'side': value['side'],
66
- 'outcome': value['outcome'],
66
+ 'outcomeId': value['outcomeId'],
67
67
  'price': value['price'],
68
68
  'stake': value['stake'],
69
69
  'stakeUnmatched': value['stakeUnmatched'],
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Monaco API
3
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
4
+ *
5
+ * The version of the OpenAPI document: 0.1
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Pageable
16
+ */
17
+ export interface Pageable {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof Pageable
22
+ */
23
+ page?: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof Pageable
28
+ */
29
+ size?: number;
30
+ /**
31
+ *
32
+ * @type {Array<string>}
33
+ * @memberof Pageable
34
+ */
35
+ sort?: Array<string>;
36
+ }
37
+ /**
38
+ * Check if a given object implements the Pageable interface.
39
+ */
40
+ export declare function instanceOfPageable(value: object): value is Pageable;
41
+ export declare function PageableFromJSON(json: any): Pageable;
42
+ export declare function PageableFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pageable;
43
+ export declare function PageableToJSON(json: any): Pageable;
44
+ export declare function PageableToJSONTyped(value?: Pageable | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Monaco API
6
+ * A RESTful API that allows you to interact with the Monaco Exchange. Provides endpoints for managing Events, Markets, Sessions, Wallets and Orders. To interact with the API, a client must have an App Id and an API Key to authenticate and create a session.
7
+ *
8
+ * The version of the OpenAPI document: 0.1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfPageable = instanceOfPageable;
17
+ exports.PageableFromJSON = PageableFromJSON;
18
+ exports.PageableFromJSONTyped = PageableFromJSONTyped;
19
+ exports.PageableToJSON = PageableToJSON;
20
+ exports.PageableToJSONTyped = PageableToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the Pageable interface.
23
+ */
24
+ function instanceOfPageable(value) {
25
+ return true;
26
+ }
27
+ function PageableFromJSON(json) {
28
+ return PageableFromJSONTyped(json, false);
29
+ }
30
+ function PageableFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'page': json['page'] == null ? undefined : json['page'],
36
+ 'size': json['size'] == null ? undefined : json['size'],
37
+ 'sort': json['sort'] == null ? undefined : json['sort'],
38
+ };
39
+ }
40
+ function PageableToJSON(json) {
41
+ return PageableToJSONTyped(json, false);
42
+ }
43
+ function PageableToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'page': value['page'],
49
+ 'size': value['size'],
50
+ 'sort': value['sort'],
51
+ };
52
+ }
@@ -14,6 +14,7 @@ import type { Category } from './Category';
14
14
  import type { Subcategory } from './Subcategory';
15
15
  import type { Event } from './Event';
16
16
  import type { EventGroup } from './EventGroup';
17
+ import type { EventParticipant } from './EventParticipant';
17
18
  /**
18
19
  *
19
20
  * @export
@@ -50,6 +51,12 @@ export interface PagedEventResponse {
50
51
  * @memberof PagedEventResponse
51
52
  */
52
53
  categories?: Array<Category>;
54
+ /**
55
+ *
56
+ * @type {Array<EventParticipant>}
57
+ * @memberof PagedEventResponse
58
+ */
59
+ participants?: Array<EventParticipant>;
53
60
  }
54
61
  /**
55
62
  * Check if a given object implements the PagedEventResponse interface.
@@ -23,6 +23,7 @@ const Category_1 = require("./Category");
23
23
  const Subcategory_1 = require("./Subcategory");
24
24
  const Event_1 = require("./Event");
25
25
  const EventGroup_1 = require("./EventGroup");
26
+ const EventParticipant_1 = require("./EventParticipant");
26
27
  /**
27
28
  * Check if a given object implements the PagedEventResponse interface.
28
29
  */
@@ -42,6 +43,7 @@ function PagedEventResponseFromJSONTyped(json, ignoreDiscriminator) {
42
43
  'eventGroups': json['eventGroups'] == null ? undefined : (json['eventGroups'].map(EventGroup_1.EventGroupFromJSON)),
43
44
  'subcategories': json['subcategories'] == null ? undefined : (json['subcategories'].map(Subcategory_1.SubcategoryFromJSON)),
44
45
  'categories': json['categories'] == null ? undefined : (json['categories'].map(Category_1.CategoryFromJSON)),
46
+ 'participants': json['participants'] == null ? undefined : (json['participants'].map(EventParticipant_1.EventParticipantFromJSON)),
45
47
  };
46
48
  }
47
49
  function PagedEventResponseToJSON(json) {
@@ -57,5 +59,6 @@ function PagedEventResponseToJSONTyped(value, ignoreDiscriminator = false) {
57
59
  'eventGroups': value['eventGroups'] == null ? undefined : (value['eventGroups'].map(EventGroup_1.EventGroupToJSON)),
58
60
  'subcategories': value['subcategories'] == null ? undefined : (value['subcategories'].map(Subcategory_1.SubcategoryToJSON)),
59
61
  'categories': value['categories'] == null ? undefined : (value['categories'].map(Category_1.CategoryToJSON)),
62
+ 'participants': value['participants'] == null ? undefined : (value['participants'].map(EventParticipant_1.EventParticipantToJSON)),
60
63
  };
61
64
  }
@@ -48,10 +48,10 @@ export interface Trade {
48
48
  side?: TradeSideEnum;
49
49
  /**
50
50
  *
51
- * @type {number}
51
+ * @type {string}
52
52
  * @memberof Trade
53
53
  */
54
- outcome?: number;
54
+ outcomeId?: string;
55
55
  /**
56
56
  *
57
57
  * @type {number}
@@ -46,7 +46,7 @@ function TradeFromJSONTyped(json, ignoreDiscriminator) {
46
46
  'market': json['market'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['market']),
47
47
  'order': json['order'] == null ? undefined : (0, DocumentReference_1.DocumentReferenceFromJSON)(json['order']),
48
48
  'side': json['side'] == null ? undefined : json['side'],
49
- 'outcome': json['outcome'] == null ? undefined : json['outcome'],
49
+ 'outcomeId': json['outcomeId'] == null ? undefined : json['outcomeId'],
50
50
  'price': json['price'] == null ? undefined : json['price'],
51
51
  'stake': json['stake'] == null ? undefined : json['stake'],
52
52
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
@@ -66,7 +66,7 @@ function TradeToJSONTyped(value, ignoreDiscriminator = false) {
66
66
  'market': (0, DocumentReference_1.DocumentReferenceToJSON)(value['market']),
67
67
  'order': (0, DocumentReference_1.DocumentReferenceToJSON)(value['order']),
68
68
  'side': value['side'],
69
- 'outcome': value['outcome'],
69
+ 'outcomeId': value['outcomeId'],
70
70
  'price': value['price'],
71
71
  'stake': value['stake'],
72
72
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
@@ -41,6 +41,7 @@ export * from './MarketLiquidities';
41
41
  export * from './MarketLiquiditiesResponse';
42
42
  export * from './MarketLiquidity';
43
43
  export * from './MarketLiquidityResponse';
44
+ export * from './MarketOutcomeResult';
44
45
  export * from './MarketOutcomeSummary';
45
46
  export * from './MarketPosition';
46
47
  export * from './MarketResponse';
@@ -54,8 +55,8 @@ export * from './ModifyParticipantsRequest';
54
55
  export * from './Order';
55
56
  export * from './OrderResponse';
56
57
  export * from './OrderSummary';
57
- export * from './OutcomeResult';
58
58
  export * from './PageMeta';
59
+ export * from './Pageable';
59
60
  export * from './PagedEventResponse';
60
61
  export * from './PagedMarketPositionResponse';
61
62
  export * from './PagedOrderResponse';
@@ -59,6 +59,7 @@ __exportStar(require("./MarketLiquidities"), exports);
59
59
  __exportStar(require("./MarketLiquiditiesResponse"), exports);
60
60
  __exportStar(require("./MarketLiquidity"), exports);
61
61
  __exportStar(require("./MarketLiquidityResponse"), exports);
62
+ __exportStar(require("./MarketOutcomeResult"), exports);
62
63
  __exportStar(require("./MarketOutcomeSummary"), exports);
63
64
  __exportStar(require("./MarketPosition"), exports);
64
65
  __exportStar(require("./MarketResponse"), exports);
@@ -72,8 +73,8 @@ __exportStar(require("./ModifyParticipantsRequest"), exports);
72
73
  __exportStar(require("./Order"), exports);
73
74
  __exportStar(require("./OrderResponse"), exports);
74
75
  __exportStar(require("./OrderSummary"), exports);
75
- __exportStar(require("./OutcomeResult"), exports);
76
76
  __exportStar(require("./PageMeta"), exports);
77
+ __exportStar(require("./Pageable"), exports);
77
78
  __exportStar(require("./PagedEventResponse"), exports);
78
79
  __exportStar(require("./PagedMarketPositionResponse"), exports);
79
80
  __exportStar(require("./PagedOrderResponse"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monaco-protocol/client-v2",
3
- "version": "0.0.2-dev.4",
3
+ "version": "0.0.2-dev.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [