@monaco-protocol/client-v2 0.0.2-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/apis/MonacoAPIAPIKeyManagementApi.d.ts +54 -0
- package/dist/apis/MonacoAPIAPIKeyManagementApi.js +141 -0
- package/dist/apis/MonacoAPIAPIStatusApi.d.ts +26 -0
- package/dist/apis/MonacoAPIAPIStatusApi.js +58 -0
- package/dist/apis/MonacoAPIAppManagementApi.d.ts +66 -0
- package/dist/apis/MonacoAPIAppManagementApi.js +170 -0
- package/dist/apis/MonacoAPICurrenciesApi.d.ts +45 -0
- package/dist/apis/MonacoAPICurrenciesApi.js +102 -0
- package/dist/apis/MonacoAPIEventCategoriesApi.d.ts +53 -0
- package/dist/apis/MonacoAPIEventCategoriesApi.js +134 -0
- package/dist/apis/MonacoAPIEventGroupsApi.d.ts +54 -0
- package/dist/apis/MonacoAPIEventGroupsApi.js +137 -0
- package/dist/apis/MonacoAPIEventSubcategoriesApi.d.ts +54 -0
- package/dist/apis/MonacoAPIEventSubcategoriesApi.js +137 -0
- package/dist/apis/MonacoAPIEventsApi.d.ts +68 -0
- package/dist/apis/MonacoAPIEventsApi.js +158 -0
- package/dist/apis/MonacoAPIMarketTypesApi.d.ts +53 -0
- package/dist/apis/MonacoAPIMarketTypesApi.js +134 -0
- package/dist/apis/MonacoAPIMarketsApi.d.ts +214 -0
- package/dist/apis/MonacoAPIMarketsApi.js +566 -0
- package/dist/apis/MonacoAPIOrdersApi.d.ts +112 -0
- package/dist/apis/MonacoAPIOrdersApi.js +283 -0
- package/dist/apis/MonacoAPISessionManagementApi.d.ts +40 -0
- package/dist/apis/MonacoAPISessionManagementApi.js +93 -0
- package/dist/apis/MonacoAPITradesApi.d.ts +44 -0
- package/dist/apis/MonacoAPITradesApi.js +104 -0
- package/dist/apis/MonacoAPIWalletsApi.d.ts +103 -0
- package/dist/apis/MonacoAPIWalletsApi.js +262 -0
- package/dist/apis/index.d.ts +14 -0
- package/dist/apis/index.js +32 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/APIKey.d.ts +62 -0
- package/dist/models/APIKey.js +58 -0
- package/dist/models/APIKeyResponse.d.ts +40 -0
- package/dist/models/APIKeyResponse.js +52 -0
- package/dist/models/AddMarketOutcomeRequest.d.ts +32 -0
- package/dist/models/AddMarketOutcomeRequest.js +48 -0
- package/dist/models/App.d.ts +69 -0
- package/dist/models/App.js +61 -0
- package/dist/models/AppResponse.d.ts +47 -0
- package/dist/models/AppResponse.js +55 -0
- package/dist/models/AppStatus.d.ts +44 -0
- package/dist/models/AppStatus.js +52 -0
- package/dist/models/AppStatusResponse.d.ts +40 -0
- package/dist/models/AppStatusResponse.js +52 -0
- package/dist/models/Category.d.ts +50 -0
- package/dist/models/Category.js +54 -0
- package/dist/models/CategoryResponse.d.ts +40 -0
- package/dist/models/CategoryResponse.js +52 -0
- package/dist/models/CategorySummary.d.ts +38 -0
- package/dist/models/CategorySummary.js +50 -0
- package/dist/models/CommissionRate.d.ts +44 -0
- package/dist/models/CommissionRate.js +52 -0
- package/dist/models/CommissionRateResponse.d.ts +40 -0
- package/dist/models/CommissionRateResponse.js +52 -0
- package/dist/models/CreateAPIKeyRequest.d.ts +32 -0
- package/dist/models/CreateAPIKeyRequest.js +48 -0
- package/dist/models/CreateAppRequest.d.ts +38 -0
- package/dist/models/CreateAppRequest.js +50 -0
- package/dist/models/CreateCategoryRequest.d.ts +38 -0
- package/dist/models/CreateCategoryRequest.js +50 -0
- package/dist/models/CreateEventGroupRequest.d.ts +44 -0
- package/dist/models/CreateEventGroupRequest.js +52 -0
- package/dist/models/CreateEventRequest.d.ts +56 -0
- package/dist/models/CreateEventRequest.js +56 -0
- package/dist/models/CreateMarketRequest.d.ts +114 -0
- package/dist/models/CreateMarketRequest.js +85 -0
- package/dist/models/CreateMarketTypeRequest.d.ts +45 -0
- package/dist/models/CreateMarketTypeRequest.js +53 -0
- package/dist/models/CreateOrderRequest.d.ts +96 -0
- package/dist/models/CreateOrderRequest.js +79 -0
- package/dist/models/CreateSessionRequest.d.ts +38 -0
- package/dist/models/CreateSessionRequest.js +50 -0
- package/dist/models/CreateSubcategoryRequest.d.ts +44 -0
- package/dist/models/CreateSubcategoryRequest.js +52 -0
- package/dist/models/CreateWalletRequest.d.ts +54 -0
- package/dist/models/CreateWalletRequest.js +62 -0
- package/dist/models/Currency.d.ts +70 -0
- package/dist/models/Currency.js +66 -0
- package/dist/models/CurrencyResponse.d.ts +40 -0
- package/dist/models/CurrencyResponse.js +52 -0
- package/dist/models/DeactivateAPIKeyRequest.d.ts +38 -0
- package/dist/models/DeactivateAPIKeyRequest.js +50 -0
- package/dist/models/DocumentReference.d.ts +38 -0
- package/dist/models/DocumentReference.js +50 -0
- package/dist/models/Event.d.ts +93 -0
- package/dist/models/Event.js +69 -0
- package/dist/models/EventGroup.d.ts +57 -0
- package/dist/models/EventGroup.js +57 -0
- package/dist/models/EventGroupResponse.d.ts +54 -0
- package/dist/models/EventGroupResponse.js +58 -0
- package/dist/models/EventGroupSummary.d.ts +45 -0
- package/dist/models/EventGroupSummary.js +53 -0
- package/dist/models/EventResponse.d.ts +61 -0
- package/dist/models/EventResponse.js +61 -0
- package/dist/models/EventSummary.d.ts +57 -0
- package/dist/models/EventSummary.js +57 -0
- package/dist/models/Market.d.ts +177 -0
- package/dist/models/Market.js +115 -0
- package/dist/models/MarketLiquidity.d.ts +64 -0
- package/dist/models/MarketLiquidity.js +64 -0
- package/dist/models/MarketLiquidityResponse.d.ts +40 -0
- package/dist/models/MarketLiquidityResponse.js +52 -0
- package/dist/models/MarketOutcomeSummary.d.ts +44 -0
- package/dist/models/MarketOutcomeSummary.js +52 -0
- package/dist/models/MarketPosition.d.ts +45 -0
- package/dist/models/MarketPosition.js +53 -0
- package/dist/models/MarketResponse.d.ts +82 -0
- package/dist/models/MarketResponse.js +70 -0
- package/dist/models/MarketResultRequest.d.ts +33 -0
- package/dist/models/MarketResultRequest.js +49 -0
- package/dist/models/MarketSummary.d.ts +76 -0
- package/dist/models/MarketSummary.js +72 -0
- package/dist/models/MarketType.d.ts +57 -0
- package/dist/models/MarketType.js +57 -0
- package/dist/models/MarketTypeResponse.d.ts +40 -0
- package/dist/models/MarketTypeResponse.js +52 -0
- package/dist/models/MarketTypeSummary.d.ts +45 -0
- package/dist/models/MarketTypeSummary.js +53 -0
- package/dist/models/Meta.d.ts +38 -0
- package/dist/models/Meta.js +50 -0
- package/dist/models/Order.d.ts +125 -0
- package/dist/models/Order.js +85 -0
- package/dist/models/OrderResponse.d.ts +54 -0
- package/dist/models/OrderResponse.js +58 -0
- package/dist/models/OrderSummary.d.ts +89 -0
- package/dist/models/OrderSummary.js +73 -0
- package/dist/models/OutcomeResult.d.ts +38 -0
- package/dist/models/OutcomeResult.js +50 -0
- package/dist/models/PageRequest.d.ts +50 -0
- package/dist/models/PageRequest.js +54 -0
- package/dist/models/PagedEventResponse.d.ts +85 -0
- package/dist/models/PagedEventResponse.js +69 -0
- package/dist/models/PagedMarketPositionResponse.d.ts +71 -0
- package/dist/models/PagedMarketPositionResponse.js +63 -0
- package/dist/models/PagedOrderResponse.d.ts +78 -0
- package/dist/models/PagedOrderResponse.js +66 -0
- package/dist/models/PagedTradeResponse.d.ts +85 -0
- package/dist/models/PagedTradeResponse.js +69 -0
- package/dist/models/PagedTransactionResponse.d.ts +64 -0
- package/dist/models/PagedTransactionResponse.js +60 -0
- package/dist/models/Range.d.ts +38 -0
- package/dist/models/Range.js +50 -0
- package/dist/models/RefreshSessionRequest.d.ts +32 -0
- package/dist/models/RefreshSessionRequest.js +48 -0
- package/dist/models/RenameAPIKeyRequest.d.ts +44 -0
- package/dist/models/RenameAPIKeyRequest.js +52 -0
- package/dist/models/Session.d.ts +50 -0
- package/dist/models/Session.js +54 -0
- package/dist/models/SessionResponse.d.ts +40 -0
- package/dist/models/SessionResponse.js +52 -0
- package/dist/models/Subcategory.d.ts +57 -0
- package/dist/models/Subcategory.js +57 -0
- package/dist/models/SubcategoryResponse.d.ts +47 -0
- package/dist/models/SubcategoryResponse.js +55 -0
- package/dist/models/SubcategorySummary.d.ts +45 -0
- package/dist/models/SubcategorySummary.js +53 -0
- package/dist/models/ToggleActionRequest.d.ts +32 -0
- package/dist/models/ToggleActionRequest.js +48 -0
- package/dist/models/Trade.d.ts +95 -0
- package/dist/models/Trade.js +75 -0
- package/dist/models/TradeResponse.d.ts +61 -0
- package/dist/models/TradeResponse.js +61 -0
- package/dist/models/Transaction.d.ts +81 -0
- package/dist/models/Transaction.js +73 -0
- package/dist/models/TransferResponse.d.ts +46 -0
- package/dist/models/TransferResponse.js +54 -0
- package/dist/models/UpdateAppCommissionRateRequest.d.ts +32 -0
- package/dist/models/UpdateAppCommissionRateRequest.js +48 -0
- package/dist/models/Wallet.d.ts +75 -0
- package/dist/models/Wallet.js +70 -0
- package/dist/models/WalletBalance.d.ts +44 -0
- package/dist/models/WalletBalance.js +52 -0
- package/dist/models/WalletResponse.d.ts +40 -0
- package/dist/models/WalletResponse.js +52 -0
- package/dist/models/index.d.ts +72 -0
- package/dist/models/index.js +90 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +346 -0
- package/package.json +28 -0
|
@@ -0,0 +1,262 @@
|
|
|
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.MonacoAPIWalletsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class MonacoAPIWalletsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates a wallet that can be used to create orders and receive winnings
|
|
34
|
+
* Create a wallet
|
|
35
|
+
*/
|
|
36
|
+
createWalletRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['authorization'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling createWallet().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['createWalletRequest'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('createWalletRequest', 'Required parameter "createWalletRequest" was null or undefined when calling createWallet().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
47
|
+
if (requestParameters['authorization'] != null) {
|
|
48
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
49
|
+
}
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: `/wallets`,
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
body: (0, index_1.CreateWalletRequestToJSON)(requestParameters['createWalletRequest']),
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WalletResponseFromJSON)(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates a wallet that can be used to create orders and receive winnings
|
|
62
|
+
* Create a wallet
|
|
63
|
+
*/
|
|
64
|
+
createWallet(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.createWalletRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Credit wallet with 1000 units of a given currency
|
|
72
|
+
*/
|
|
73
|
+
creditWalletRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['authorization'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling creditWallet().');
|
|
77
|
+
}
|
|
78
|
+
if (requestParameters['walletId'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('walletId', 'Required parameter "walletId" was null or undefined when calling creditWallet().');
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters['currencyId'] == null) {
|
|
82
|
+
throw new runtime.RequiredError('currencyId', 'Required parameter "currencyId" was null or undefined when calling creditWallet().');
|
|
83
|
+
}
|
|
84
|
+
const queryParameters = {};
|
|
85
|
+
if (requestParameters['walletId'] != null) {
|
|
86
|
+
queryParameters['walletId'] = requestParameters['walletId'];
|
|
87
|
+
}
|
|
88
|
+
if (requestParameters['currencyId'] != null) {
|
|
89
|
+
queryParameters['currencyId'] = requestParameters['currencyId'];
|
|
90
|
+
}
|
|
91
|
+
const headerParameters = {};
|
|
92
|
+
if (requestParameters['authorization'] != null) {
|
|
93
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
94
|
+
}
|
|
95
|
+
const response = yield this.request({
|
|
96
|
+
path: `/faucet`,
|
|
97
|
+
method: 'GET',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TransferResponseFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Credit wallet with 1000 units of a given currency
|
|
106
|
+
*/
|
|
107
|
+
creditWallet(requestParameters, initOverrides) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const response = yield this.creditWalletRaw(requestParameters, initOverrides);
|
|
110
|
+
return yield response.value();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Fetch a list of wallets for the current user, filtered by the provided walletFilter param
|
|
115
|
+
* Fetch a list of wallets
|
|
116
|
+
*/
|
|
117
|
+
fetchWalletsRaw(requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
if (requestParameters['authorization'] == null) {
|
|
120
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling fetchWallets().');
|
|
121
|
+
}
|
|
122
|
+
const queryParameters = {};
|
|
123
|
+
if (requestParameters['walletFilter'] != null) {
|
|
124
|
+
queryParameters['walletFilter'] = requestParameters['walletFilter'];
|
|
125
|
+
}
|
|
126
|
+
if (requestParameters['page'] != null) {
|
|
127
|
+
queryParameters['page'] = requestParameters['page'];
|
|
128
|
+
}
|
|
129
|
+
const headerParameters = {};
|
|
130
|
+
if (requestParameters['authorization'] != null) {
|
|
131
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
132
|
+
}
|
|
133
|
+
const response = yield this.request({
|
|
134
|
+
path: `/wallets`,
|
|
135
|
+
method: 'GET',
|
|
136
|
+
headers: headerParameters,
|
|
137
|
+
query: queryParameters,
|
|
138
|
+
}, initOverrides);
|
|
139
|
+
return new runtime.VoidApiResponse(response);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Fetch a list of wallets for the current user, filtered by the provided walletFilter param
|
|
144
|
+
* Fetch a list of wallets
|
|
145
|
+
*/
|
|
146
|
+
fetchWallets(requestParameters, initOverrides) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
yield this.fetchWalletsRaw(requestParameters, initOverrides);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Fetch a wallet by id
|
|
153
|
+
* Fetch a wallet by id
|
|
154
|
+
*/
|
|
155
|
+
getWalletRaw(requestParameters, initOverrides) {
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
if (requestParameters['authorization'] == null) {
|
|
158
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getWallet().');
|
|
159
|
+
}
|
|
160
|
+
if (requestParameters['id'] == null) {
|
|
161
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getWallet().');
|
|
162
|
+
}
|
|
163
|
+
const queryParameters = {};
|
|
164
|
+
const headerParameters = {};
|
|
165
|
+
if (requestParameters['authorization'] != null) {
|
|
166
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
167
|
+
}
|
|
168
|
+
const response = yield this.request({
|
|
169
|
+
path: `/wallets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
170
|
+
method: 'GET',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
}, initOverrides);
|
|
174
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WalletResponseFromJSON)(jsonValue));
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Fetch a wallet by id
|
|
179
|
+
* Fetch a wallet by id
|
|
180
|
+
*/
|
|
181
|
+
getWallet(requestParameters, initOverrides) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
const response = yield this.getWalletRaw(requestParameters, initOverrides);
|
|
184
|
+
return yield response.value();
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Fetch a list of transactions for the current user, filtered by the provided walletFilter param
|
|
189
|
+
* Fetch a list of transactions
|
|
190
|
+
*/
|
|
191
|
+
getWalletTransactionsRaw(requestParameters, initOverrides) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
if (requestParameters['authorization'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling getWalletTransactions().');
|
|
195
|
+
}
|
|
196
|
+
if (requestParameters['id'] == null) {
|
|
197
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getWalletTransactions().');
|
|
198
|
+
}
|
|
199
|
+
const queryParameters = {};
|
|
200
|
+
if (requestParameters['page'] != null) {
|
|
201
|
+
queryParameters['page'] = requestParameters['page'];
|
|
202
|
+
}
|
|
203
|
+
const headerParameters = {};
|
|
204
|
+
if (requestParameters['authorization'] != null) {
|
|
205
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
206
|
+
}
|
|
207
|
+
const response = yield this.request({
|
|
208
|
+
path: `/wallets/{id}/transactions`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
209
|
+
method: 'GET',
|
|
210
|
+
headers: headerParameters,
|
|
211
|
+
query: queryParameters,
|
|
212
|
+
}, initOverrides);
|
|
213
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PagedTransactionResponseFromJSON)(jsonValue));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Fetch a list of transactions for the current user, filtered by the provided walletFilter param
|
|
218
|
+
* Fetch a list of transactions
|
|
219
|
+
*/
|
|
220
|
+
getWalletTransactions(requestParameters, initOverrides) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
const response = yield this.getWalletTransactionsRaw(requestParameters, initOverrides);
|
|
223
|
+
return yield response.value();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Withdraw Funds for the current user\'s wallet
|
|
228
|
+
* Withdraw Funds
|
|
229
|
+
*/
|
|
230
|
+
walletWithdrawRaw(requestParameters, initOverrides) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
if (requestParameters['authorization'] == null) {
|
|
233
|
+
throw new runtime.RequiredError('authorization', 'Required parameter "authorization" was null or undefined when calling walletWithdraw().');
|
|
234
|
+
}
|
|
235
|
+
if (requestParameters['id'] == null) {
|
|
236
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling walletWithdraw().');
|
|
237
|
+
}
|
|
238
|
+
const queryParameters = {};
|
|
239
|
+
const headerParameters = {};
|
|
240
|
+
if (requestParameters['authorization'] != null) {
|
|
241
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
242
|
+
}
|
|
243
|
+
const response = yield this.request({
|
|
244
|
+
path: `/wallets/{id}/withdraw`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
245
|
+
method: 'POST',
|
|
246
|
+
headers: headerParameters,
|
|
247
|
+
query: queryParameters,
|
|
248
|
+
}, initOverrides);
|
|
249
|
+
return new runtime.VoidApiResponse(response);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Withdraw Funds for the current user\'s wallet
|
|
254
|
+
* Withdraw Funds
|
|
255
|
+
*/
|
|
256
|
+
walletWithdraw(requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
yield this.walletWithdrawRaw(requestParameters, initOverrides);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
exports.MonacoAPIWalletsApi = MonacoAPIWalletsApi;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './MonacoAPIAPIKeyManagementApi';
|
|
2
|
+
export * from './MonacoAPIAPIStatusApi';
|
|
3
|
+
export * from './MonacoAPIAppManagementApi';
|
|
4
|
+
export * from './MonacoAPICurrenciesApi';
|
|
5
|
+
export * from './MonacoAPIEventCategoriesApi';
|
|
6
|
+
export * from './MonacoAPIEventGroupsApi';
|
|
7
|
+
export * from './MonacoAPIEventSubcategoriesApi';
|
|
8
|
+
export * from './MonacoAPIEventsApi';
|
|
9
|
+
export * from './MonacoAPIMarketTypesApi';
|
|
10
|
+
export * from './MonacoAPIMarketsApi';
|
|
11
|
+
export * from './MonacoAPIOrdersApi';
|
|
12
|
+
export * from './MonacoAPISessionManagementApi';
|
|
13
|
+
export * from './MonacoAPITradesApi';
|
|
14
|
+
export * from './MonacoAPIWalletsApi';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./MonacoAPIAPIKeyManagementApi"), exports);
|
|
20
|
+
__exportStar(require("./MonacoAPIAPIStatusApi"), exports);
|
|
21
|
+
__exportStar(require("./MonacoAPIAppManagementApi"), exports);
|
|
22
|
+
__exportStar(require("./MonacoAPICurrenciesApi"), exports);
|
|
23
|
+
__exportStar(require("./MonacoAPIEventCategoriesApi"), exports);
|
|
24
|
+
__exportStar(require("./MonacoAPIEventGroupsApi"), exports);
|
|
25
|
+
__exportStar(require("./MonacoAPIEventSubcategoriesApi"), exports);
|
|
26
|
+
__exportStar(require("./MonacoAPIEventsApi"), exports);
|
|
27
|
+
__exportStar(require("./MonacoAPIMarketTypesApi"), exports);
|
|
28
|
+
__exportStar(require("./MonacoAPIMarketsApi"), exports);
|
|
29
|
+
__exportStar(require("./MonacoAPIOrdersApi"), exports);
|
|
30
|
+
__exportStar(require("./MonacoAPISessionManagementApi"), exports);
|
|
31
|
+
__exportStar(require("./MonacoAPITradesApi"), exports);
|
|
32
|
+
__exportStar(require("./MonacoAPIWalletsApi"), exports);
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./runtime"), exports);
|
|
20
|
+
__exportStar(require("./apis/index"), exports);
|
|
21
|
+
__exportStar(require("./models/index"), exports);
|
|
@@ -0,0 +1,62 @@
|
|
|
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 APIKey
|
|
16
|
+
*/
|
|
17
|
+
export interface APIKey {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof APIKey
|
|
22
|
+
*/
|
|
23
|
+
appId?: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof APIKey
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof APIKey
|
|
34
|
+
*/
|
|
35
|
+
active?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof APIKey
|
|
40
|
+
*/
|
|
41
|
+
secret?: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {Date}
|
|
45
|
+
* @memberof APIKey
|
|
46
|
+
*/
|
|
47
|
+
createdAt?: Date;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof APIKey
|
|
52
|
+
*/
|
|
53
|
+
modifiedAt?: Date;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the APIKey interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfAPIKey(value: object): value is APIKey;
|
|
59
|
+
export declare function APIKeyFromJSON(json: any): APIKey;
|
|
60
|
+
export declare function APIKeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKey;
|
|
61
|
+
export declare function APIKeyToJSON(json: any): APIKey;
|
|
62
|
+
export declare function APIKeyToJSONTyped(value?: APIKey | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.instanceOfAPIKey = instanceOfAPIKey;
|
|
17
|
+
exports.APIKeyFromJSON = APIKeyFromJSON;
|
|
18
|
+
exports.APIKeyFromJSONTyped = APIKeyFromJSONTyped;
|
|
19
|
+
exports.APIKeyToJSON = APIKeyToJSON;
|
|
20
|
+
exports.APIKeyToJSONTyped = APIKeyToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the APIKey interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAPIKey(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function APIKeyFromJSON(json) {
|
|
28
|
+
return APIKeyFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function APIKeyFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'appId': json['appId'] == null ? undefined : json['appId'],
|
|
36
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
37
|
+
'active': json['active'] == null ? undefined : json['active'],
|
|
38
|
+
'secret': json['secret'] == null ? undefined : json['secret'],
|
|
39
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
40
|
+
'modifiedAt': json['modifiedAt'] == null ? undefined : (new Date(json['modifiedAt'])),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function APIKeyToJSON(json) {
|
|
44
|
+
return APIKeyToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function APIKeyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'appId': value['appId'],
|
|
52
|
+
'name': value['name'],
|
|
53
|
+
'active': value['active'],
|
|
54
|
+
'secret': value['secret'],
|
|
55
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
56
|
+
'modifiedAt': value['modifiedAt'] == null ? undefined : ((value['modifiedAt']).toISOString()),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 type { APIKey } from './APIKey';
|
|
13
|
+
import type { Meta } from './Meta';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface APIKeyResponse
|
|
18
|
+
*/
|
|
19
|
+
export interface APIKeyResponse {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {Meta}
|
|
23
|
+
* @memberof APIKeyResponse
|
|
24
|
+
*/
|
|
25
|
+
meta?: Meta;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Array<APIKey>}
|
|
29
|
+
* @memberof APIKeyResponse
|
|
30
|
+
*/
|
|
31
|
+
apiKeys?: Array<APIKey>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the APIKeyResponse interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfAPIKeyResponse(value: object): value is APIKeyResponse;
|
|
37
|
+
export declare function APIKeyResponseFromJSON(json: any): APIKeyResponse;
|
|
38
|
+
export declare function APIKeyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): APIKeyResponse;
|
|
39
|
+
export declare function APIKeyResponseToJSON(json: any): APIKeyResponse;
|
|
40
|
+
export declare function APIKeyResponseToJSONTyped(value?: APIKeyResponse | 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.instanceOfAPIKeyResponse = instanceOfAPIKeyResponse;
|
|
17
|
+
exports.APIKeyResponseFromJSON = APIKeyResponseFromJSON;
|
|
18
|
+
exports.APIKeyResponseFromJSONTyped = APIKeyResponseFromJSONTyped;
|
|
19
|
+
exports.APIKeyResponseToJSON = APIKeyResponseToJSON;
|
|
20
|
+
exports.APIKeyResponseToJSONTyped = APIKeyResponseToJSONTyped;
|
|
21
|
+
const APIKey_1 = require("./APIKey");
|
|
22
|
+
const Meta_1 = require("./Meta");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the APIKeyResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfAPIKeyResponse(value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function APIKeyResponseFromJSON(json) {
|
|
30
|
+
return APIKeyResponseFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function APIKeyResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'meta': json['_meta'] == null ? undefined : (0, Meta_1.MetaFromJSON)(json['_meta']),
|
|
38
|
+
'apiKeys': json['apiKeys'] == null ? undefined : (json['apiKeys'].map(APIKey_1.APIKeyFromJSON)),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function APIKeyResponseToJSON(json) {
|
|
42
|
+
return APIKeyResponseToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function APIKeyResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'_meta': (0, Meta_1.MetaToJSON)(value['meta']),
|
|
50
|
+
'apiKeys': value['apiKeys'] == null ? undefined : (value['apiKeys'].map(APIKey_1.APIKeyToJSON)),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 AddMarketOutcomeRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AddMarketOutcomeRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AddMarketOutcomeRequest
|
|
22
|
+
*/
|
|
23
|
+
name?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AddMarketOutcomeRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAddMarketOutcomeRequest(value: object): value is AddMarketOutcomeRequest;
|
|
29
|
+
export declare function AddMarketOutcomeRequestFromJSON(json: any): AddMarketOutcomeRequest;
|
|
30
|
+
export declare function AddMarketOutcomeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddMarketOutcomeRequest;
|
|
31
|
+
export declare function AddMarketOutcomeRequestToJSON(json: any): AddMarketOutcomeRequest;
|
|
32
|
+
export declare function AddMarketOutcomeRequestToJSONTyped(value?: AddMarketOutcomeRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.instanceOfAddMarketOutcomeRequest = instanceOfAddMarketOutcomeRequest;
|
|
17
|
+
exports.AddMarketOutcomeRequestFromJSON = AddMarketOutcomeRequestFromJSON;
|
|
18
|
+
exports.AddMarketOutcomeRequestFromJSONTyped = AddMarketOutcomeRequestFromJSONTyped;
|
|
19
|
+
exports.AddMarketOutcomeRequestToJSON = AddMarketOutcomeRequestToJSON;
|
|
20
|
+
exports.AddMarketOutcomeRequestToJSONTyped = AddMarketOutcomeRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AddMarketOutcomeRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAddMarketOutcomeRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function AddMarketOutcomeRequestFromJSON(json) {
|
|
28
|
+
return AddMarketOutcomeRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function AddMarketOutcomeRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function AddMarketOutcomeRequestToJSON(json) {
|
|
39
|
+
return AddMarketOutcomeRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function AddMarketOutcomeRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'name': value['name'],
|
|
47
|
+
};
|
|
48
|
+
}
|