@monaco-protocol/client-v2 0.0.2-dev.0 → 0.0.2-dev.10
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/README.md +32 -26
- package/dist/apis/{MonacoAPIAPIKeyManagementApi.d.ts → APIKeyManagementApi.d.ts} +4 -4
- package/dist/apis/{MonacoAPIAPIKeyManagementApi.js → APIKeyManagementApi.js} +8 -8
- package/dist/apis/{MonacoAPIAppManagementApi.d.ts → AppManagementApi.d.ts} +7 -7
- package/dist/apis/{MonacoAPIAppManagementApi.js → AppManagementApi.js} +12 -12
- package/dist/apis/{MonacoAPICurrenciesApi.d.ts → CurrenciesApi.d.ts} +5 -5
- package/dist/apis/{MonacoAPICurrenciesApi.js → CurrenciesApi.js} +8 -8
- package/dist/apis/EventCategoriesApi.d.ts +53 -0
- package/dist/apis/{MonacoAPIEventCategoriesApi.js → EventCategoriesApi.js} +17 -17
- package/dist/apis/EventGroupsApi.d.ts +54 -0
- package/dist/apis/{MonacoAPIEventGroupsApi.js → EventGroupsApi.js} +19 -19
- package/dist/apis/EventSubcategoriesApi.d.ts +105 -0
- package/dist/apis/EventSubcategoriesApi.js +287 -0
- package/dist/apis/EventsApi.d.ts +175 -0
- package/dist/apis/EventsApi.js +477 -0
- package/dist/apis/HeartbeatManagementApi.d.ts +52 -0
- package/dist/apis/{MonacoAPIEventSubcategoriesApi.js → HeartbeatManagementApi.js} +35 -41
- package/dist/apis/MarketPricesApi.d.ts +41 -0
- package/dist/apis/MarketPricesApi.js +101 -0
- package/dist/apis/{MonacoAPIMarketTypesApi.d.ts → MarketTypesApi.d.ts} +1 -1
- package/dist/apis/{MonacoAPIMarketTypesApi.js → MarketTypesApi.js} +3 -3
- package/dist/apis/{MonacoAPIMarketsApi.d.ts → MarketsApi.d.ts} +79 -25
- package/dist/apis/{MonacoAPIMarketsApi.js → MarketsApi.js} +158 -16
- package/dist/apis/{MonacoAPIOrdersApi.d.ts → OrdersApi.d.ts} +53 -19
- package/dist/apis/{MonacoAPIOrdersApi.js → OrdersApi.js} +110 -11
- package/dist/apis/SessionManagementApi.d.ts +40 -0
- package/dist/apis/{MonacoAPISessionManagementApi.js → SessionManagementApi.js} +15 -15
- package/dist/apis/{MonacoAPIAPIStatusApi.d.ts → StatusApi.d.ts} +1 -1
- package/dist/apis/{MonacoAPIAPIStatusApi.js → StatusApi.js} +3 -3
- package/dist/apis/{MonacoAPITradesApi.d.ts → TradesApi.d.ts} +9 -6
- package/dist/apis/{MonacoAPITradesApi.js → TradesApi.js} +15 -3
- package/dist/apis/{MonacoAPIWalletsApi.d.ts → WalletsApi.d.ts} +24 -5
- package/dist/apis/{MonacoAPIWalletsApi.js → WalletsApi.js} +57 -3
- package/dist/apis/index.d.ts +16 -14
- package/dist/apis/index.js +16 -14
- 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 +67 -0
- package/dist/models/ChunkOrderResponse.js +63 -0
- package/dist/models/CommissionRate.d.ts +2 -2
- package/dist/models/CreateEventRequest.d.ts +5 -5
- package/dist/models/CreateEventRequest.js +16 -6
- package/dist/models/CreateMarketRequest.d.ts +2 -2
- package/dist/models/CreateOrderRequest.d.ts +13 -4
- 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/CreateWalletRequest.d.ts +0 -16
- package/dist/models/CreateWalletRequest.js +0 -12
- package/dist/models/Currency.d.ts +2 -2
- package/dist/models/DocumentReference.js +4 -4
- package/dist/models/Event.d.ts +8 -2
- 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/EventSummary.d.ts +2 -2
- package/dist/models/EventUpdateResponse.d.ts +40 -0
- package/dist/models/EventUpdateResponse.js +52 -0
- package/dist/models/Heartbeat.d.ts +50 -0
- package/dist/models/Heartbeat.js +54 -0
- package/dist/models/HeartbeatResponse.d.ts +40 -0
- package/dist/models/HeartbeatResponse.js +52 -0
- package/dist/models/Market.d.ts +21 -12
- package/dist/models/Market.js +13 -5
- package/dist/models/MarketLiquidities.d.ts +39 -0
- package/dist/models/MarketLiquidities.js +51 -0
- package/dist/models/MarketLiquiditiesResponse.d.ts +40 -0
- package/dist/models/MarketLiquiditiesResponse.js +52 -0
- 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 +9 -3
- package/dist/models/MarketOutcomeSummary.js +4 -2
- package/dist/models/MarketPosition.d.ts +4 -2
- package/dist/models/MarketPriceLadder.d.ts +32 -0
- package/dist/models/MarketPriceLadder.js +48 -0
- package/dist/models/MarketPriceLadderResponse.d.ts +40 -0
- package/dist/models/MarketPriceLadderResponse.js +52 -0
- package/dist/models/MarketResultRequest.d.ts +3 -3
- package/dist/models/MarketResultRequest.js +3 -3
- package/dist/models/MarketSummary.d.ts +32 -4
- package/dist/models/MarketSummary.js +18 -3
- package/dist/models/MarketUpdateResponse.d.ts +40 -0
- package/dist/models/MarketUpdateResponse.js +52 -0
- package/dist/models/Meta.d.ts +36 -1
- package/dist/models/Meta.js +31 -0
- package/dist/models/ModifyParticipantsRequest.d.ts +32 -0
- package/dist/models/ModifyParticipantsRequest.js +48 -0
- package/dist/models/Order.d.ts +35 -6
- package/dist/models/Order.js +17 -3
- package/dist/models/OrderResponse.d.ts +7 -0
- package/dist/models/OrderResponse.js +3 -0
- package/dist/models/OrderSummary.d.ts +33 -4
- package/dist/models/OrderSummary.js +17 -3
- package/dist/models/OutcomeResult.d.ts +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/ToggleActionRequest.d.ts +1 -1
- package/dist/models/Trade.d.ts +4 -4
- 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/Transaction.d.ts +3 -2
- package/dist/models/Transaction.js +2 -1
- package/dist/models/UpdateDateRequest.d.ts +32 -0
- package/dist/models/UpdateDateRequest.js +50 -0
- package/dist/models/UpdateHeartbeatRequest.d.ts +38 -0
- package/dist/models/UpdateHeartbeatRequest.js +52 -0
- package/dist/models/UpdateNameRequest.d.ts +32 -0
- package/dist/models/UpdateNameRequest.js +50 -0
- package/dist/models/WalletBalance.d.ts +2 -2
- package/dist/models/index.d.ts +22 -2
- package/dist/models/index.js +22 -2
- package/package.json +6 -2
- package/dist/apis/MonacoAPIEventCategoriesApi.d.ts +0 -53
- package/dist/apis/MonacoAPIEventGroupsApi.d.ts +0 -54
- package/dist/apis/MonacoAPIEventSubcategoriesApi.d.ts +0 -54
- package/dist/apis/MonacoAPIEventsApi.d.ts +0 -68
- package/dist/apis/MonacoAPIEventsApi.js +0 -158
- package/dist/apis/MonacoAPISessionManagementApi.d.ts +0 -40
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { AddParticipantsRequest, CreateSubcategoryRequest, ModifyParticipantsRequest, ParticipantsResponse, Subcategory, SubcategoryResponse } from '../models/index';
|
|
14
|
+
export interface ActivateParticipantsRequest {
|
|
15
|
+
authorization: string;
|
|
16
|
+
id: string;
|
|
17
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
18
|
+
}
|
|
19
|
+
export interface AddParticipantsOperationRequest {
|
|
20
|
+
authorization: string;
|
|
21
|
+
id: string;
|
|
22
|
+
addParticipantsRequest: AddParticipantsRequest;
|
|
23
|
+
}
|
|
24
|
+
export interface CreateSubcategoryOperationRequest {
|
|
25
|
+
authorization: string;
|
|
26
|
+
createSubcategoryRequest: CreateSubcategoryRequest;
|
|
27
|
+
}
|
|
28
|
+
export interface DeactivateParticipantsRequest {
|
|
29
|
+
authorization: string;
|
|
30
|
+
id: string;
|
|
31
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
32
|
+
}
|
|
33
|
+
export interface GetAllSubcategoriesRequest {
|
|
34
|
+
authorization: string;
|
|
35
|
+
categoryIds?: Set<string>;
|
|
36
|
+
}
|
|
37
|
+
export interface GetParticipantsRequest {
|
|
38
|
+
authorization: string;
|
|
39
|
+
id: string;
|
|
40
|
+
}
|
|
41
|
+
export interface GetSubcategoryByIdRequest {
|
|
42
|
+
authorization: string;
|
|
43
|
+
id: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export declare class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
49
|
+
/**
|
|
50
|
+
* Activate participants in a given subcategory
|
|
51
|
+
*/
|
|
52
|
+
activateParticipantsRaw(requestParameters: ActivateParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParticipantsResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* Activate participants in a given subcategory
|
|
55
|
+
*/
|
|
56
|
+
activateParticipants(requestParameters: ActivateParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParticipantsResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Add participants to the given subcategory. They are added to the current list of participants in the order given
|
|
59
|
+
*/
|
|
60
|
+
addParticipantsRaw(requestParameters: AddParticipantsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
61
|
+
/**
|
|
62
|
+
* Add participants to the given subcategory. They are added to the current list of participants in the order given
|
|
63
|
+
*/
|
|
64
|
+
addParticipants(requestParameters: AddParticipantsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Create subcategory
|
|
67
|
+
*/
|
|
68
|
+
createSubcategoryRaw(requestParameters: CreateSubcategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Subcategory>>;
|
|
69
|
+
/**
|
|
70
|
+
* Create subcategory
|
|
71
|
+
*/
|
|
72
|
+
createSubcategory(requestParameters: CreateSubcategoryOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Subcategory>;
|
|
73
|
+
/**
|
|
74
|
+
* Deactivate participants in a given subcategory. They can be later re-activated
|
|
75
|
+
*/
|
|
76
|
+
deactivateParticipantsRaw(requestParameters: DeactivateParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParticipantsResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* Deactivate participants in a given subcategory. They can be later re-activated
|
|
79
|
+
*/
|
|
80
|
+
deactivateParticipants(requestParameters: DeactivateParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParticipantsResponse>;
|
|
81
|
+
/**
|
|
82
|
+
* Fetch subcategories by categories
|
|
83
|
+
*/
|
|
84
|
+
getAllSubcategoriesRaw(requestParameters: GetAllSubcategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubcategoryResponse>>;
|
|
85
|
+
/**
|
|
86
|
+
* Fetch subcategories by categories
|
|
87
|
+
*/
|
|
88
|
+
getAllSubcategories(requestParameters: GetAllSubcategoriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubcategoryResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* Fetch events participants for a given subcategory id
|
|
91
|
+
*/
|
|
92
|
+
getParticipantsRaw(requestParameters: GetParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ParticipantsResponse>>;
|
|
93
|
+
/**
|
|
94
|
+
* Fetch events participants for a given subcategory id
|
|
95
|
+
*/
|
|
96
|
+
getParticipants(requestParameters: GetParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ParticipantsResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Fetch subcategory by id
|
|
99
|
+
*/
|
|
100
|
+
getSubcategoryByIdRaw(requestParameters: GetSubcategoryByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubcategoryResponse>>;
|
|
101
|
+
/**
|
|
102
|
+
* Fetch subcategory by id
|
|
103
|
+
*/
|
|
104
|
+
getSubcategoryById(requestParameters: GetSubcategoryByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubcategoryResponse>;
|
|
105
|
+
}
|
|
@@ -0,0 +1,287 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.EventSubcategoriesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class EventSubcategoriesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Activate participants in a given subcategory
|
|
34
|
+
*/
|
|
35
|
+
activateParticipantsRaw(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 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().');
|
|
116
|
+
}
|
|
117
|
+
if (requestParameters['createSubcategoryRequest'] == null) {
|
|
118
|
+
throw new runtime.RequiredError('createSubcategoryRequest', 'Required parameter "createSubcategoryRequest" was null or undefined when calling createSubcategory().');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
123
|
+
if (requestParameters['authorization'] != null) {
|
|
124
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
125
|
+
}
|
|
126
|
+
const response = yield this.request({
|
|
127
|
+
path: `/subcategories`,
|
|
128
|
+
method: 'POST',
|
|
129
|
+
headers: headerParameters,
|
|
130
|
+
query: queryParameters,
|
|
131
|
+
body: (0, index_1.CreateSubcategoryRequestToJSON)(requestParameters['createSubcategoryRequest']),
|
|
132
|
+
}, initOverrides);
|
|
133
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubcategoryFromJSON)(jsonValue));
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Create subcategory
|
|
138
|
+
*/
|
|
139
|
+
createSubcategory(requestParameters, initOverrides) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
const response = yield this.createSubcategoryRaw(requestParameters, initOverrides);
|
|
142
|
+
return yield response.value();
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Deactivate participants in a given subcategory. They can be later re-activated
|
|
147
|
+
*/
|
|
148
|
+
deactivateParticipantsRaw(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (requestParameters['authorization'] == null) {
|
|
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().');
|
|
191
|
+
}
|
|
192
|
+
const queryParameters = {};
|
|
193
|
+
if (requestParameters['categoryIds'] != null) {
|
|
194
|
+
queryParameters['categoryIds'] = requestParameters['categoryIds'];
|
|
195
|
+
}
|
|
196
|
+
const headerParameters = {};
|
|
197
|
+
if (requestParameters['authorization'] != null) {
|
|
198
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
199
|
+
}
|
|
200
|
+
const response = yield this.request({
|
|
201
|
+
path: `/subcategories`,
|
|
202
|
+
method: 'GET',
|
|
203
|
+
headers: headerParameters,
|
|
204
|
+
query: queryParameters,
|
|
205
|
+
}, initOverrides);
|
|
206
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubcategoryResponseFromJSON)(jsonValue));
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
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
|
|
245
|
+
*/
|
|
246
|
+
getParticipants(requestParameters, initOverrides) {
|
|
247
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
+
const response = yield this.getParticipantsRaw(requestParameters, initOverrides);
|
|
249
|
+
return yield response.value();
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Fetch subcategory by id
|
|
254
|
+
*/
|
|
255
|
+
getSubcategoryByIdRaw(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
if (requestParameters['authorization'] == null) {
|
|
258
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getSubcategoryById().');
|
|
259
|
+
}
|
|
260
|
+
if (requestParameters['id'] == null) {
|
|
261
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getSubcategoryById().');
|
|
262
|
+
}
|
|
263
|
+
const queryParameters = {};
|
|
264
|
+
const headerParameters = {};
|
|
265
|
+
if (requestParameters['authorization'] != null) {
|
|
266
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
267
|
+
}
|
|
268
|
+
const response = yield this.request({
|
|
269
|
+
path: `/subcategories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
270
|
+
method: 'GET',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
}, initOverrides);
|
|
274
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubcategoryResponseFromJSON)(jsonValue));
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Fetch subcategory by id
|
|
279
|
+
*/
|
|
280
|
+
getSubcategoryById(requestParameters, initOverrides) {
|
|
281
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
282
|
+
const response = yield this.getSubcategoryByIdRaw(requestParameters, initOverrides);
|
|
283
|
+
return yield response.value();
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
exports.EventSubcategoriesApi = EventSubcategoriesApi;
|
|
@@ -0,0 +1,175 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { CreateEventRequest, EventParticipantsResponse, EventResponse, EventUpdateResponse, ModifyParticipantsRequest, PagedEventResponse, ToggleActionRequest, UpdateDateRequest, UpdateNameRequest } from '../models/index';
|
|
14
|
+
export interface AddEventParticipantsRequest {
|
|
15
|
+
authorization: string;
|
|
16
|
+
id: string;
|
|
17
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateEventOperationRequest {
|
|
20
|
+
authorization: string;
|
|
21
|
+
createEventRequest: CreateEventRequest;
|
|
22
|
+
}
|
|
23
|
+
export interface GetEventRequest {
|
|
24
|
+
authorization: string;
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetEventParticipantsRequest {
|
|
28
|
+
authorization: string;
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetEventsRequest {
|
|
32
|
+
authorization: string;
|
|
33
|
+
ids?: Set<string>;
|
|
34
|
+
ownerAppIds?: Set<string>;
|
|
35
|
+
starting?: GetEventsStartingEnum;
|
|
36
|
+
fromDateTime?: Date;
|
|
37
|
+
toDateTime?: Date;
|
|
38
|
+
active?: boolean;
|
|
39
|
+
page?: number;
|
|
40
|
+
size?: number;
|
|
41
|
+
sort?: Array<string>;
|
|
42
|
+
}
|
|
43
|
+
export interface RemoveEventParticipantsRequest {
|
|
44
|
+
authorization: string;
|
|
45
|
+
id: string;
|
|
46
|
+
modifyParticipantsRequest: ModifyParticipantsRequest;
|
|
47
|
+
}
|
|
48
|
+
export interface UpdateEventActiveToggleRequest {
|
|
49
|
+
authorization: string;
|
|
50
|
+
id: string;
|
|
51
|
+
toggleActionRequest: ToggleActionRequest;
|
|
52
|
+
}
|
|
53
|
+
export interface UpdateEventActualEndTimeRequest {
|
|
54
|
+
authorization: string;
|
|
55
|
+
id: string;
|
|
56
|
+
updateDateRequest: UpdateDateRequest;
|
|
57
|
+
}
|
|
58
|
+
export interface UpdateEventActualStartTimeRequest {
|
|
59
|
+
authorization: string;
|
|
60
|
+
id: string;
|
|
61
|
+
updateDateRequest: UpdateDateRequest;
|
|
62
|
+
}
|
|
63
|
+
export interface UpdateEventExpectedStartTimeRequest {
|
|
64
|
+
authorization: string;
|
|
65
|
+
id: string;
|
|
66
|
+
updateDateRequest: UpdateDateRequest;
|
|
67
|
+
}
|
|
68
|
+
export interface UpdateEventNameRequest {
|
|
69
|
+
authorization: string;
|
|
70
|
+
id: string;
|
|
71
|
+
updateNameRequest: UpdateNameRequest;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
export declare class EventsApi extends runtime.BaseAPI {
|
|
77
|
+
/**
|
|
78
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
79
|
+
*/
|
|
80
|
+
addEventParticipantsRaw(requestParameters: AddEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
81
|
+
/**
|
|
82
|
+
* Add participants to the given event. They are added to the current list of participants in the order given
|
|
83
|
+
*/
|
|
84
|
+
addEventParticipants(requestParameters: AddEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Create event
|
|
87
|
+
*/
|
|
88
|
+
createEventRaw(requestParameters: CreateEventOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventResponse>>;
|
|
89
|
+
/**
|
|
90
|
+
* Create event
|
|
91
|
+
*/
|
|
92
|
+
createEvent(requestParameters: CreateEventOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* Fetch event by id
|
|
95
|
+
*/
|
|
96
|
+
getEventRaw(requestParameters: GetEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventResponse>>;
|
|
97
|
+
/**
|
|
98
|
+
* Fetch event by id
|
|
99
|
+
*/
|
|
100
|
+
getEvent(requestParameters: GetEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
|
|
101
|
+
/**
|
|
102
|
+
* Fetch events participants for a given event id
|
|
103
|
+
*/
|
|
104
|
+
getEventParticipantsRaw(requestParameters: GetEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
105
|
+
/**
|
|
106
|
+
* Fetch events participants for a given event id
|
|
107
|
+
*/
|
|
108
|
+
getEventParticipants(requestParameters: GetEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* Fetch events by ids, categories, sub-categories, event groups and/or from/yo dates
|
|
111
|
+
*/
|
|
112
|
+
getEventsRaw(requestParameters: GetEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PagedEventResponse>>;
|
|
113
|
+
/**
|
|
114
|
+
* Fetch events by ids, categories, sub-categories, event groups and/or from/yo dates
|
|
115
|
+
*/
|
|
116
|
+
getEvents(requestParameters: GetEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PagedEventResponse>;
|
|
117
|
+
/**
|
|
118
|
+
* Remove participants from a given event
|
|
119
|
+
*/
|
|
120
|
+
removeEventParticipantsRaw(requestParameters: RemoveEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventParticipantsResponse>>;
|
|
121
|
+
/**
|
|
122
|
+
* Remove participants from a given event
|
|
123
|
+
*/
|
|
124
|
+
removeEventParticipants(requestParameters: RemoveEventParticipantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventParticipantsResponse>;
|
|
125
|
+
/**
|
|
126
|
+
* Update event active toggle
|
|
127
|
+
*/
|
|
128
|
+
updateEventActiveToggleRaw(requestParameters: UpdateEventActiveToggleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventUpdateResponse>>;
|
|
129
|
+
/**
|
|
130
|
+
* Update event active toggle
|
|
131
|
+
*/
|
|
132
|
+
updateEventActiveToggle(requestParameters: UpdateEventActiveToggleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventUpdateResponse>;
|
|
133
|
+
/**
|
|
134
|
+
* Update event actual end time
|
|
135
|
+
*/
|
|
136
|
+
updateEventActualEndTimeRaw(requestParameters: UpdateEventActualEndTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventUpdateResponse>>;
|
|
137
|
+
/**
|
|
138
|
+
* Update event actual end time
|
|
139
|
+
*/
|
|
140
|
+
updateEventActualEndTime(requestParameters: UpdateEventActualEndTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventUpdateResponse>;
|
|
141
|
+
/**
|
|
142
|
+
* Update event actual start time
|
|
143
|
+
*/
|
|
144
|
+
updateEventActualStartTimeRaw(requestParameters: UpdateEventActualStartTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventUpdateResponse>>;
|
|
145
|
+
/**
|
|
146
|
+
* Update event actual start time
|
|
147
|
+
*/
|
|
148
|
+
updateEventActualStartTime(requestParameters: UpdateEventActualStartTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventUpdateResponse>;
|
|
149
|
+
/**
|
|
150
|
+
* Update event expected start time
|
|
151
|
+
*/
|
|
152
|
+
updateEventExpectedStartTimeRaw(requestParameters: UpdateEventExpectedStartTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventUpdateResponse>>;
|
|
153
|
+
/**
|
|
154
|
+
* Update event expected start time
|
|
155
|
+
*/
|
|
156
|
+
updateEventExpectedStartTime(requestParameters: UpdateEventExpectedStartTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventUpdateResponse>;
|
|
157
|
+
/**
|
|
158
|
+
* Update event name
|
|
159
|
+
*/
|
|
160
|
+
updateEventNameRaw(requestParameters: UpdateEventNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventUpdateResponse>>;
|
|
161
|
+
/**
|
|
162
|
+
* Update event name
|
|
163
|
+
*/
|
|
164
|
+
updateEventName(requestParameters: UpdateEventNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventUpdateResponse>;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @export
|
|
168
|
+
*/
|
|
169
|
+
export declare const GetEventsStartingEnum: {
|
|
170
|
+
readonly Live: "Live";
|
|
171
|
+
readonly Today: "Today";
|
|
172
|
+
readonly Later: "Later";
|
|
173
|
+
readonly Range: "Range";
|
|
174
|
+
};
|
|
175
|
+
export type GetEventsStartingEnum = typeof GetEventsStartingEnum[keyof typeof GetEventsStartingEnum];
|