@winible/winible-typed 2.79.0 → 2.79.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/opticodds/index.js +196 -18
- package/dist/opticodds/index.js.map +1 -1
- package/dist/opticodds/openapi.json +500 -2009
- package/dist/opticodds/schemas.js +5824 -42
- package/dist/opticodds/schemas.js.map +1 -1
- package/dist/opticodds/sdk.js +46 -44
- package/dist/opticodds/sdk.js.map +1 -1
- package/opticodds/index.ts +424 -2
- package/opticodds/openapi.json +501 -2010
- package/opticodds/schemas.ts +5877 -85
- package/opticodds/sdk.ts +267 -93
- package/opticodds/types.ts +244 -84
- package/package.json +1 -1
package/dist/opticodds/sdk.js
CHANGED
@@ -9,7 +9,7 @@ const openapi_json_1 = __importDefault(require("./openapi.json"));
|
|
9
9
|
class SDK {
|
10
10
|
constructor() {
|
11
11
|
this.spec = oas_1.default.init(openapi_json_1.default);
|
12
|
-
this.core = new core_1.default(this.spec,
|
12
|
+
this.core = new core_1.default(this.spec, "opticodds/3.0.0 (api/6.1.3)");
|
13
13
|
}
|
14
14
|
/**
|
15
15
|
* Optionally configure various options that the SDK allows.
|
@@ -69,132 +69,134 @@ class SDK {
|
|
69
69
|
this.core.setServer(url, variables);
|
70
70
|
}
|
71
71
|
getSports() {
|
72
|
-
return this.core.fetch(
|
72
|
+
return this.core.fetch("/sports", "get");
|
73
73
|
}
|
74
74
|
getSportsActive() {
|
75
|
-
return this.core.fetch(
|
75
|
+
return this.core.fetch("/sports/active", "get");
|
76
76
|
}
|
77
77
|
getLeagues(metadata) {
|
78
|
-
return this.core.fetch(
|
78
|
+
return this.core.fetch("/leagues", "get", metadata);
|
79
79
|
}
|
80
80
|
getLeaguesActive(metadata) {
|
81
|
-
return this.core.fetch(
|
81
|
+
return this.core.fetch("/leagues/active", "get", metadata);
|
82
82
|
}
|
83
83
|
getSportsbooks() {
|
84
|
-
return this.core.fetch(
|
84
|
+
return this.core.fetch("/sportsbooks", "get");
|
85
85
|
}
|
86
86
|
getSportsbooksActive(metadata) {
|
87
|
-
return this.core.fetch(
|
87
|
+
return this.core.fetch("/sportsbooks/active", "get", metadata);
|
88
88
|
}
|
89
89
|
getSportsbooksLastPolled(metadata) {
|
90
|
-
return this.core.fetch(
|
90
|
+
return this.core.fetch("/sportsbooks/last-polled", "get", metadata);
|
91
91
|
}
|
92
92
|
getMarkets(metadata) {
|
93
|
-
return this.core.fetch(
|
93
|
+
return this.core.fetch("/markets", "get", metadata);
|
94
94
|
}
|
95
95
|
getMarketsActive(metadata) {
|
96
|
-
return this.core.fetch(
|
96
|
+
return this.core.fetch("/markets/active", "get", metadata);
|
97
97
|
}
|
98
98
|
getMarketsSettleable(metadata) {
|
99
|
-
return this.core.fetch(
|
99
|
+
return this.core.fetch("/markets/settleable", "get", metadata);
|
100
100
|
}
|
101
101
|
getTeams(metadata) {
|
102
|
-
return this.core.fetch(
|
102
|
+
return this.core.fetch("/teams", "get", metadata);
|
103
103
|
}
|
104
104
|
getPlayers(metadata) {
|
105
|
-
return this.core.fetch(
|
105
|
+
return this.core.fetch("/players", "get", metadata);
|
106
106
|
}
|
107
107
|
getFixtures(metadata) {
|
108
|
-
return this.core.fetch(
|
108
|
+
return this.core.fetch("/fixtures", "get", metadata);
|
109
109
|
}
|
110
110
|
getFixturesActive(metadata) {
|
111
|
-
return this.core.fetch(
|
111
|
+
return this.core.fetch("/fixtures/active", "get", metadata);
|
112
112
|
}
|
113
113
|
getTournaments(metadata) {
|
114
|
-
return this.core.fetch(
|
114
|
+
return this.core.fetch("/tournaments", "get", metadata);
|
115
115
|
}
|
116
116
|
getConferences(metadata) {
|
117
|
-
return this.core.fetch(
|
117
|
+
return this.core.fetch("/conferences", "get", metadata);
|
118
118
|
}
|
119
119
|
getDivisions(metadata) {
|
120
|
-
return this.core.fetch(
|
120
|
+
return this.core.fetch("/divisions", "get", metadata);
|
121
121
|
}
|
122
122
|
getFixturesOdds(metadata) {
|
123
|
-
return this.core.fetch(
|
123
|
+
return this.core.fetch("/fixtures/odds", "get", metadata);
|
124
124
|
}
|
125
125
|
getFixturesOddsHistorical(metadata) {
|
126
|
-
return this.core.fetch(
|
126
|
+
return this.core.fetch("/fixtures/odds/historical", "get", metadata);
|
127
127
|
}
|
128
128
|
getFixturesResults(metadata) {
|
129
|
-
return this.core.fetch(
|
129
|
+
return this.core.fetch("/fixtures/results", "get", metadata);
|
130
130
|
}
|
131
131
|
getFixturesPlayerResults(metadata) {
|
132
|
-
return this.core.fetch(
|
132
|
+
return this.core.fetch("/fixtures/player-results", "get", metadata);
|
133
133
|
}
|
134
134
|
getTournamentsResults(metadata) {
|
135
|
-
return this.core.fetch(
|
135
|
+
return this.core.fetch("/tournaments/results", "get", metadata);
|
136
136
|
}
|
137
137
|
getFixturesPlayerResultsLastX(metadata) {
|
138
|
-
return this.core.fetch(
|
138
|
+
return this.core.fetch("/fixtures/player-results/last-x", "get", metadata);
|
139
139
|
}
|
140
140
|
getFixturesResultsHeadToHead(metadata) {
|
141
|
-
return this.core.fetch(
|
141
|
+
return this.core.fetch("/fixtures/results/head-to-head", "get", metadata);
|
142
142
|
}
|
143
143
|
getFutures(metadata) {
|
144
|
-
return this.core.fetch(
|
144
|
+
return this.core.fetch("/futures", "get", metadata);
|
145
145
|
}
|
146
146
|
getFuturesOdds(metadata) {
|
147
|
-
return this.core.fetch(
|
147
|
+
return this.core.fetch("/futures/odds", "get", metadata);
|
148
148
|
}
|
149
149
|
getGraderOdds(metadata) {
|
150
|
-
return this.core.fetch(
|
150
|
+
return this.core.fetch("/grader/odds", "get", metadata);
|
151
151
|
}
|
152
152
|
getGraderFutures(metadata) {
|
153
|
-
return this.core.fetch(
|
153
|
+
return this.core.fetch("/grader/futures", "get", metadata);
|
154
154
|
}
|
155
155
|
getInjuries(metadata) {
|
156
|
-
return this.core.fetch(
|
156
|
+
return this.core.fetch("/injuries", "get", metadata);
|
157
157
|
}
|
158
158
|
postParlayOdds(body, metadata) {
|
159
|
-
return this.core.fetch(
|
159
|
+
return this.core.fetch("/parlay/odds", "post", body, metadata);
|
160
160
|
}
|
161
161
|
getStreamOddsSport(metadata) {
|
162
|
-
return this.core.fetch(
|
162
|
+
return this.core.fetch("/stream/odds/{sport}", "get", metadata);
|
163
163
|
}
|
164
164
|
getStreamResultsSport(metadata) {
|
165
|
-
return this.core.fetch(
|
165
|
+
return this.core.fetch("/stream/results/{sport}", "get", metadata);
|
166
166
|
}
|
167
167
|
getCopilotFixturesOdds(metadata) {
|
168
|
-
return this.core.fetch(
|
168
|
+
return this.core.fetch("/copilot/fixtures/odds", "get", metadata);
|
169
169
|
}
|
170
170
|
getCopilotGraderOdds(metadata) {
|
171
|
-
return this.core.fetch(
|
171
|
+
return this.core.fetch("/copilot/grader/odds", "get", metadata);
|
172
172
|
}
|
173
173
|
getCopilotParlayOdds(metadata) {
|
174
|
-
return this.core.fetch(
|
174
|
+
return this.core.fetch("/copilot/parlay/odds", "get", metadata);
|
175
175
|
}
|
176
176
|
getStreamCopilotSportOdds(metadata) {
|
177
|
-
return this.core.fetch(
|
177
|
+
return this.core.fetch("/stream/copilot/{sport}/odds", "get", metadata);
|
178
178
|
}
|
179
179
|
postCopilotQueueStart(body) {
|
180
|
-
return this.core.fetch(
|
180
|
+
return this.core.fetch("/copilot/queue/start", "post", body);
|
181
181
|
}
|
182
182
|
postCopilotQueueStop(body) {
|
183
|
-
return this.core.fetch(
|
183
|
+
return this.core.fetch("/copilot/queue/stop", "post", body);
|
184
184
|
}
|
185
185
|
getCopilotQueueStatus(metadata) {
|
186
|
-
return this.core.fetch(
|
186
|
+
return this.core.fetch("/copilot/queue/status", "get", metadata);
|
187
187
|
}
|
188
188
|
postFixtureResultsQueueStart(body) {
|
189
|
-
return this.core.fetch(
|
189
|
+
return this.core.fetch("/fixture/results/queue/start", "post", body);
|
190
190
|
}
|
191
191
|
postFixtureResultsQueueStop(body) {
|
192
|
-
return this.core.fetch(
|
192
|
+
return this.core.fetch("/fixture/results/queue/stop", "post", body);
|
193
193
|
}
|
194
194
|
getFixtureResultsQueueStatus(metadata) {
|
195
|
-
return this.core.fetch(
|
195
|
+
return this.core.fetch("/fixture/results/queue/status", "get", metadata);
|
196
196
|
}
|
197
197
|
}
|
198
|
-
const createSDK = (() => {
|
198
|
+
const createSDK = (() => {
|
199
|
+
return new SDK();
|
200
|
+
})();
|
199
201
|
exports.default = createSDK;
|
200
202
|
//# sourceMappingURL=sdk.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../opticodds/sdk.ts"],"names":[],"mappings":";;;;;AAEA,8CAAsB;AACtB,yDAAoC;AACpC,kEAAwC;AAExC,MAAM,GAAG;IAIP;QACE,IAAI,CAAC,IAAI,GAAG,aAAG,CAAC,IAAI,CAAC,sBAAU,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,cAAO,CAAC,IAAI,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,MAAqB;QAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,IAAI,CAAC,GAAG,MAA2B;QACjC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,GAAW,EAAE,SAAS,GAAG,EAAE;QAChC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACtC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,eAAe;
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../opticodds/s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,CAAC,CAAC;IAC3E,CAAC;CACF;AAED,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE;IACtB,OAAO,IAAI,GAAG,EAAE,CAAC;AACnB,CAAC,CAAC,EAAE,CAAC;AACL,kBAAe,SAAS,CAAC"}
|
package/opticodds/index.ts
CHANGED
@@ -1,2 +1,424 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import type * as types from "./types";
|
2
|
+
import type { ConfigOptions, FetchResponse } from "api/dist/core";
|
3
|
+
import Oas from "oas";
|
4
|
+
import APICore from "api/dist/core";
|
5
|
+
import definition from "./openapi.json";
|
6
|
+
|
7
|
+
class SDK {
|
8
|
+
spec: Oas;
|
9
|
+
core: APICore;
|
10
|
+
|
11
|
+
constructor() {
|
12
|
+
this.spec = Oas.init(definition);
|
13
|
+
this.core = new APICore(this.spec, "opticodds/3.0.0 (api/6.1.3)");
|
14
|
+
}
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Optionally configure various options that the SDK allows.
|
18
|
+
*
|
19
|
+
* @param config Object of supported SDK options and toggles.
|
20
|
+
* @param config.timeout Override the default `fetch` request timeout of 30 seconds. This number
|
21
|
+
* should be represented in milliseconds.
|
22
|
+
*/
|
23
|
+
config(config: ConfigOptions) {
|
24
|
+
this.core.setConfig(config);
|
25
|
+
}
|
26
|
+
|
27
|
+
/**
|
28
|
+
* If the API you're using requires authentication you can supply the required credentials
|
29
|
+
* through this method and the library will magically determine how they should be used
|
30
|
+
* within your API request.
|
31
|
+
*
|
32
|
+
* With the exception of OpenID and MutualTLS, it supports all forms of authentication
|
33
|
+
* supported by the OpenAPI specification.
|
34
|
+
*
|
35
|
+
* @example <caption>HTTP Basic auth</caption>
|
36
|
+
* sdk.auth('username', 'password');
|
37
|
+
*
|
38
|
+
* @example <caption>Bearer tokens (HTTP or OAuth 2)</caption>
|
39
|
+
* sdk.auth('myBearerToken');
|
40
|
+
*
|
41
|
+
* @example <caption>API Keys</caption>
|
42
|
+
* sdk.auth('myApiKey');
|
43
|
+
*
|
44
|
+
* @see {@link https://spec.openapis.org/oas/v3.0.3#fixed-fields-22}
|
45
|
+
* @see {@link https://spec.openapis.org/oas/v3.1.0#fixed-fields-22}
|
46
|
+
* @param values Your auth credentials for the API; can specify up to two strings or numbers.
|
47
|
+
*/
|
48
|
+
auth(...values: string[] | number[]) {
|
49
|
+
this.core.setAuth(...values);
|
50
|
+
return this;
|
51
|
+
}
|
52
|
+
|
53
|
+
/**
|
54
|
+
* If the API you're using offers alternate server URLs, and server variables, you can tell
|
55
|
+
* the SDK which one to use with this method. To use it you can supply either one of the
|
56
|
+
* server URLs that are contained within the OpenAPI definition (along with any server
|
57
|
+
* variables), or you can pass it a fully qualified URL to use (that may or may not exist
|
58
|
+
* within the OpenAPI definition).
|
59
|
+
*
|
60
|
+
* @example <caption>Server URL with server variables</caption>
|
61
|
+
* sdk.server('https://{region}.api.example.com/{basePath}', {
|
62
|
+
* name: 'eu',
|
63
|
+
* basePath: 'v14',
|
64
|
+
* });
|
65
|
+
*
|
66
|
+
* @example <caption>Fully qualified server URL</caption>
|
67
|
+
* sdk.server('https://eu.api.example.com/v14');
|
68
|
+
*
|
69
|
+
* @param url Server URL
|
70
|
+
* @param variables An object of variables to replace into the server URL.
|
71
|
+
*/
|
72
|
+
server(url: string, variables = {}) {
|
73
|
+
this.core.setServer(url, variables);
|
74
|
+
}
|
75
|
+
|
76
|
+
getSports(): Promise<FetchResponse<200, types.GetSportsResponse200>> {
|
77
|
+
return this.core.fetch("/sports", "get");
|
78
|
+
}
|
79
|
+
|
80
|
+
getSportsActive(): Promise<
|
81
|
+
FetchResponse<200, types.GetSportsActiveResponse200>
|
82
|
+
> {
|
83
|
+
return this.core.fetch("/sports/active", "get");
|
84
|
+
}
|
85
|
+
|
86
|
+
getLeagues(
|
87
|
+
metadata?: types.GetLeaguesMetadataParam
|
88
|
+
): Promise<FetchResponse<200, types.GetLeaguesResponse200>> {
|
89
|
+
return this.core.fetch("/leagues", "get", metadata);
|
90
|
+
}
|
91
|
+
|
92
|
+
getLeaguesActive(
|
93
|
+
metadata?: types.GetLeaguesActiveMetadataParam
|
94
|
+
): Promise<FetchResponse<200, types.GetLeaguesActiveResponse200>> {
|
95
|
+
return this.core.fetch("/leagues/active", "get", metadata);
|
96
|
+
}
|
97
|
+
|
98
|
+
getSportsbooks(): Promise<
|
99
|
+
FetchResponse<200, types.GetSportsbooksResponse200>
|
100
|
+
> {
|
101
|
+
return this.core.fetch("/sportsbooks", "get");
|
102
|
+
}
|
103
|
+
|
104
|
+
getSportsbooksActive(
|
105
|
+
metadata?: types.GetSportsbooksActiveMetadataParam
|
106
|
+
): Promise<FetchResponse<200, types.GetSportsbooksActiveResponse200>> {
|
107
|
+
return this.core.fetch("/sportsbooks/active", "get", metadata);
|
108
|
+
}
|
109
|
+
|
110
|
+
getSportsbooksLastPolled(
|
111
|
+
metadata?: types.GetSportsbooksLastPolledMetadataParam
|
112
|
+
): Promise<FetchResponse<200, types.GetSportsbooksLastPolledResponse200>> {
|
113
|
+
return this.core.fetch("/sportsbooks/last-polled", "get", metadata);
|
114
|
+
}
|
115
|
+
|
116
|
+
getMarkets(
|
117
|
+
metadata?: types.GetMarketsMetadataParam
|
118
|
+
): Promise<FetchResponse<200, types.GetMarketsResponse200>> {
|
119
|
+
return this.core.fetch("/markets", "get", metadata);
|
120
|
+
}
|
121
|
+
|
122
|
+
getMarketsActive(
|
123
|
+
metadata: types.GetMarketsActiveMetadataParam
|
124
|
+
): Promise<FetchResponse<200, types.GetMarketsActiveResponse200>> {
|
125
|
+
return this.core.fetch("/markets/active", "get", metadata);
|
126
|
+
}
|
127
|
+
|
128
|
+
getMarketsSettleable(
|
129
|
+
metadata: types.GetMarketsSettleableMetadataParam
|
130
|
+
): Promise<FetchResponse<200, types.GetMarketsSettleableResponse200>> {
|
131
|
+
return this.core.fetch("/markets/settleable", "get", metadata);
|
132
|
+
}
|
133
|
+
|
134
|
+
getTeams(
|
135
|
+
metadata?: types.GetTeamsMetadataParam
|
136
|
+
): Promise<FetchResponse<200, types.GetTeamsResponse200>> {
|
137
|
+
return this.core.fetch("/teams", "get", metadata);
|
138
|
+
}
|
139
|
+
|
140
|
+
getPlayers(
|
141
|
+
metadata?: types.GetPlayersMetadataParam
|
142
|
+
): Promise<FetchResponse<200, types.GetPlayersResponse200>> {
|
143
|
+
return this.core.fetch("/players", "get", metadata);
|
144
|
+
}
|
145
|
+
|
146
|
+
getFixtures(
|
147
|
+
metadata?: types.GetFixturesMetadataParam
|
148
|
+
): Promise<FetchResponse<200, types.GetFixturesResponse200>> {
|
149
|
+
return this.core.fetch("/fixtures", "get", metadata);
|
150
|
+
}
|
151
|
+
|
152
|
+
getFixturesActive(
|
153
|
+
metadata?: types.GetFixturesActiveMetadataParam
|
154
|
+
): Promise<FetchResponse<200, types.GetFixturesActiveResponse200>> {
|
155
|
+
return this.core.fetch("/fixtures/active", "get", metadata);
|
156
|
+
}
|
157
|
+
|
158
|
+
getTournaments(
|
159
|
+
metadata?: types.GetTournamentsMetadataParam
|
160
|
+
): Promise<FetchResponse<200, types.GetTournamentsResponse200>> {
|
161
|
+
return this.core.fetch("/tournaments", "get", metadata);
|
162
|
+
}
|
163
|
+
|
164
|
+
getConferences(
|
165
|
+
metadata?: types.GetConferencesMetadataParam
|
166
|
+
): Promise<FetchResponse<200, types.GetConferencesResponse200>> {
|
167
|
+
return this.core.fetch("/conferences", "get", metadata);
|
168
|
+
}
|
169
|
+
|
170
|
+
getDivisions(
|
171
|
+
metadata?: types.GetDivisionsMetadataParam
|
172
|
+
): Promise<FetchResponse<200, types.GetDivisionsResponse200>> {
|
173
|
+
return this.core.fetch("/divisions", "get", metadata);
|
174
|
+
}
|
175
|
+
|
176
|
+
getFixturesOdds(
|
177
|
+
metadata: types.GetFixturesOddsMetadataParam
|
178
|
+
): Promise<FetchResponse<200, types.GetFixturesOddsResponse200>> {
|
179
|
+
return this.core.fetch("/fixtures/odds", "get", metadata);
|
180
|
+
}
|
181
|
+
|
182
|
+
getFixturesOddsHistorical(
|
183
|
+
metadata: types.GetFixturesOddsHistoricalMetadataParam
|
184
|
+
): Promise<FetchResponse<200, types.GetFixturesOddsHistoricalResponse200>> {
|
185
|
+
return this.core.fetch("/fixtures/odds/historical", "get", metadata);
|
186
|
+
}
|
187
|
+
|
188
|
+
getFixturesResults(
|
189
|
+
metadata?: types.GetFixturesResultsMetadataParam
|
190
|
+
): Promise<FetchResponse<200, types.GetFixturesResultsResponse200>> {
|
191
|
+
return this.core.fetch("/fixtures/results", "get", metadata);
|
192
|
+
}
|
193
|
+
|
194
|
+
getFixturesPlayerResults(
|
195
|
+
metadata?: types.GetFixturesPlayerResultsMetadataParam
|
196
|
+
): Promise<FetchResponse<200, types.GetFixturesPlayerResultsResponse200>> {
|
197
|
+
return this.core.fetch("/fixtures/player-results", "get", metadata);
|
198
|
+
}
|
199
|
+
|
200
|
+
getTournamentsResults(
|
201
|
+
metadata: types.GetTournamentsResultsMetadataParam
|
202
|
+
): Promise<FetchResponse<200, types.GetTournamentsResultsResponse200>> {
|
203
|
+
return this.core.fetch("/tournaments/results", "get", metadata);
|
204
|
+
}
|
205
|
+
|
206
|
+
getFixturesPlayerResultsLastX(
|
207
|
+
metadata?: types.GetFixturesPlayerResultsLastXMetadataParam
|
208
|
+
): Promise<
|
209
|
+
FetchResponse<200, types.GetFixturesPlayerResultsLastXResponse200>
|
210
|
+
> {
|
211
|
+
return this.core.fetch("/fixtures/player-results/last-x", "get", metadata);
|
212
|
+
}
|
213
|
+
|
214
|
+
getFixturesResultsHeadToHead(
|
215
|
+
metadata: types.GetFixturesResultsHeadToHeadMetadataParam
|
216
|
+
): Promise<
|
217
|
+
FetchResponse<200, types.GetFixturesResultsHeadToHeadResponse200>
|
218
|
+
> {
|
219
|
+
return this.core.fetch("/fixtures/results/head-to-head", "get", metadata);
|
220
|
+
}
|
221
|
+
|
222
|
+
getFutures(
|
223
|
+
metadata?: types.GetFuturesMetadataParam
|
224
|
+
): Promise<FetchResponse<200, types.GetFuturesResponse200>> {
|
225
|
+
return this.core.fetch("/futures", "get", metadata);
|
226
|
+
}
|
227
|
+
|
228
|
+
getFuturesOdds(
|
229
|
+
metadata: types.GetFuturesOddsMetadataParam
|
230
|
+
): Promise<FetchResponse<200, types.GetFuturesOddsResponse200>> {
|
231
|
+
return this.core.fetch("/futures/odds", "get", metadata);
|
232
|
+
}
|
233
|
+
|
234
|
+
getGraderOdds(
|
235
|
+
metadata: types.GetGraderOddsMetadataParam
|
236
|
+
): Promise<FetchResponse<200, types.GetGraderOddsResponse200>> {
|
237
|
+
return this.core.fetch("/grader/odds", "get", metadata);
|
238
|
+
}
|
239
|
+
|
240
|
+
getGraderFutures(
|
241
|
+
metadata: types.GetGraderFuturesMetadataParam
|
242
|
+
): Promise<FetchResponse<200, types.GetGraderFuturesResponse200>> {
|
243
|
+
return this.core.fetch("/grader/futures", "get", metadata);
|
244
|
+
}
|
245
|
+
|
246
|
+
getInjuries(
|
247
|
+
metadata?: types.GetInjuriesMetadataParam
|
248
|
+
): Promise<FetchResponse<200, types.GetInjuriesResponse200>> {
|
249
|
+
return this.core.fetch("/injuries", "get", metadata);
|
250
|
+
}
|
251
|
+
|
252
|
+
postParlayOdds(
|
253
|
+
body: types.PostParlayOddsBodyParam,
|
254
|
+
metadata?: types.PostParlayOddsMetadataParam
|
255
|
+
): Promise<FetchResponse<200, types.PostParlayOddsResponse200>> {
|
256
|
+
return this.core.fetch("/parlay/odds", "post", body, metadata);
|
257
|
+
}
|
258
|
+
|
259
|
+
getStreamOddsSport(
|
260
|
+
metadata: types.GetStreamOddsSportMetadataParam
|
261
|
+
): Promise<FetchResponse<200, types.GetStreamOddsSportResponse200>> {
|
262
|
+
return this.core.fetch("/stream/odds/{sport}", "get", metadata);
|
263
|
+
}
|
264
|
+
|
265
|
+
getStreamResultsSport(
|
266
|
+
metadata: types.GetStreamResultsSportMetadataParam
|
267
|
+
): Promise<FetchResponse<200, types.GetStreamResultsSportResponse200>> {
|
268
|
+
return this.core.fetch("/stream/results/{sport}", "get", metadata);
|
269
|
+
}
|
270
|
+
|
271
|
+
getCopilotFixturesOdds(
|
272
|
+
metadata?: types.GetCopilotFixturesOddsMetadataParam
|
273
|
+
): Promise<FetchResponse<200, types.GetCopilotFixturesOddsResponse200>> {
|
274
|
+
return this.core.fetch("/copilot/fixtures/odds", "get", metadata);
|
275
|
+
}
|
276
|
+
|
277
|
+
getCopilotGraderOdds(
|
278
|
+
metadata: types.GetCopilotGraderOddsMetadataParam
|
279
|
+
): Promise<FetchResponse<200, types.GetCopilotGraderOddsResponse200>> {
|
280
|
+
return this.core.fetch("/copilot/grader/odds", "get", metadata);
|
281
|
+
}
|
282
|
+
|
283
|
+
getCopilotParlayOdds(
|
284
|
+
metadata: types.GetCopilotParlayOddsMetadataParam
|
285
|
+
): Promise<FetchResponse<200, types.GetCopilotParlayOddsResponse200>> {
|
286
|
+
return this.core.fetch("/copilot/parlay/odds", "get", metadata);
|
287
|
+
}
|
288
|
+
|
289
|
+
getStreamCopilotSportOdds(
|
290
|
+
metadata: types.GetStreamCopilotSportOddsMetadataParam
|
291
|
+
): Promise<FetchResponse<200, types.GetStreamCopilotSportOddsResponse200>> {
|
292
|
+
return this.core.fetch("/stream/copilot/{sport}/odds", "get", metadata);
|
293
|
+
}
|
294
|
+
|
295
|
+
postCopilotQueueStart(
|
296
|
+
body: types.PostCopilotQueueStartBodyParam
|
297
|
+
): Promise<FetchResponse<200, types.PostCopilotQueueStartResponse200>> {
|
298
|
+
return this.core.fetch("/copilot/queue/start", "post", body);
|
299
|
+
}
|
300
|
+
|
301
|
+
postCopilotQueueStop(
|
302
|
+
body: types.PostCopilotQueueStopBodyParam
|
303
|
+
): Promise<FetchResponse<200, types.PostCopilotQueueStopResponse200>> {
|
304
|
+
return this.core.fetch("/copilot/queue/stop", "post", body);
|
305
|
+
}
|
306
|
+
|
307
|
+
getCopilotQueueStatus(
|
308
|
+
metadata?: types.GetCopilotQueueStatusMetadataParam
|
309
|
+
): Promise<FetchResponse<200, types.GetCopilotQueueStatusResponse200>> {
|
310
|
+
return this.core.fetch("/copilot/queue/status", "get", metadata);
|
311
|
+
}
|
312
|
+
|
313
|
+
postFixtureResultsQueueStart(
|
314
|
+
body: types.PostFixtureResultsQueueStartBodyParam
|
315
|
+
): Promise<
|
316
|
+
FetchResponse<200, types.PostFixtureResultsQueueStartResponse200>
|
317
|
+
> {
|
318
|
+
return this.core.fetch("/fixture/results/queue/start", "post", body);
|
319
|
+
}
|
320
|
+
|
321
|
+
postFixtureResultsQueueStop(
|
322
|
+
body: types.PostFixtureResultsQueueStopBodyParam
|
323
|
+
): Promise<FetchResponse<200, types.PostFixtureResultsQueueStopResponse200>> {
|
324
|
+
return this.core.fetch("/fixture/results/queue/stop", "post", body);
|
325
|
+
}
|
326
|
+
|
327
|
+
getFixtureResultsQueueStatus(
|
328
|
+
metadata?: types.GetFixtureResultsQueueStatusMetadataParam
|
329
|
+
): Promise<
|
330
|
+
FetchResponse<200, types.GetFixtureResultsQueueStatusResponse200>
|
331
|
+
> {
|
332
|
+
return this.core.fetch("/fixture/results/queue/status", "get", metadata);
|
333
|
+
}
|
334
|
+
}
|
335
|
+
|
336
|
+
const createSDK = (() => {
|
337
|
+
return new SDK();
|
338
|
+
})();
|
339
|
+
export default createSDK;
|
340
|
+
|
341
|
+
export type {
|
342
|
+
GetConferencesMetadataParam,
|
343
|
+
GetConferencesResponse200,
|
344
|
+
GetCopilotFixturesOddsMetadataParam,
|
345
|
+
GetCopilotFixturesOddsResponse200,
|
346
|
+
GetCopilotGraderOddsMetadataParam,
|
347
|
+
GetCopilotGraderOddsResponse200,
|
348
|
+
GetCopilotParlayOddsMetadataParam,
|
349
|
+
GetCopilotParlayOddsResponse200,
|
350
|
+
GetCopilotQueueStatusMetadataParam,
|
351
|
+
GetCopilotQueueStatusResponse200,
|
352
|
+
GetDivisionsMetadataParam,
|
353
|
+
GetDivisionsResponse200,
|
354
|
+
GetFixtureResultsQueueStatusMetadataParam,
|
355
|
+
GetFixtureResultsQueueStatusResponse200,
|
356
|
+
GetFixturesActiveMetadataParam,
|
357
|
+
GetFixturesActiveResponse200,
|
358
|
+
GetFixturesMetadataParam,
|
359
|
+
GetFixturesOddsHistoricalMetadataParam,
|
360
|
+
GetFixturesOddsHistoricalResponse200,
|
361
|
+
GetFixturesOddsMetadataParam,
|
362
|
+
GetFixturesOddsResponse200,
|
363
|
+
GetFixturesPlayerResultsLastXMetadataParam,
|
364
|
+
GetFixturesPlayerResultsLastXResponse200,
|
365
|
+
GetFixturesPlayerResultsMetadataParam,
|
366
|
+
GetFixturesPlayerResultsResponse200,
|
367
|
+
GetFixturesResponse200,
|
368
|
+
GetFixturesResultsHeadToHeadMetadataParam,
|
369
|
+
GetFixturesResultsHeadToHeadResponse200,
|
370
|
+
GetFixturesResultsMetadataParam,
|
371
|
+
GetFixturesResultsResponse200,
|
372
|
+
GetFuturesMetadataParam,
|
373
|
+
GetFuturesOddsMetadataParam,
|
374
|
+
GetFuturesOddsResponse200,
|
375
|
+
GetFuturesResponse200,
|
376
|
+
GetGraderFuturesMetadataParam,
|
377
|
+
GetGraderFuturesResponse200,
|
378
|
+
GetGraderOddsMetadataParam,
|
379
|
+
GetGraderOddsResponse200,
|
380
|
+
GetInjuriesMetadataParam,
|
381
|
+
GetInjuriesResponse200,
|
382
|
+
GetLeaguesActiveMetadataParam,
|
383
|
+
GetLeaguesActiveResponse200,
|
384
|
+
GetLeaguesMetadataParam,
|
385
|
+
GetLeaguesResponse200,
|
386
|
+
GetMarketsActiveMetadataParam,
|
387
|
+
GetMarketsActiveResponse200,
|
388
|
+
GetMarketsMetadataParam,
|
389
|
+
GetMarketsResponse200,
|
390
|
+
GetMarketsSettleableMetadataParam,
|
391
|
+
GetMarketsSettleableResponse200,
|
392
|
+
GetPlayersMetadataParam,
|
393
|
+
GetPlayersResponse200,
|
394
|
+
GetSportsActiveResponse200,
|
395
|
+
GetSportsResponse200,
|
396
|
+
GetSportsbooksActiveMetadataParam,
|
397
|
+
GetSportsbooksActiveResponse200,
|
398
|
+
GetSportsbooksLastPolledMetadataParam,
|
399
|
+
GetSportsbooksLastPolledResponse200,
|
400
|
+
GetSportsbooksResponse200,
|
401
|
+
GetStreamCopilotSportOddsMetadataParam,
|
402
|
+
GetStreamCopilotSportOddsResponse200,
|
403
|
+
GetStreamOddsSportMetadataParam,
|
404
|
+
GetStreamOddsSportResponse200,
|
405
|
+
GetStreamResultsSportMetadataParam,
|
406
|
+
GetStreamResultsSportResponse200,
|
407
|
+
GetTeamsMetadataParam,
|
408
|
+
GetTeamsResponse200,
|
409
|
+
GetTournamentsMetadataParam,
|
410
|
+
GetTournamentsResponse200,
|
411
|
+
GetTournamentsResultsMetadataParam,
|
412
|
+
GetTournamentsResultsResponse200,
|
413
|
+
PostCopilotQueueStartBodyParam,
|
414
|
+
PostCopilotQueueStartResponse200,
|
415
|
+
PostCopilotQueueStopBodyParam,
|
416
|
+
PostCopilotQueueStopResponse200,
|
417
|
+
PostFixtureResultsQueueStartBodyParam,
|
418
|
+
PostFixtureResultsQueueStartResponse200,
|
419
|
+
PostFixtureResultsQueueStopBodyParam,
|
420
|
+
PostFixtureResultsQueueStopResponse200,
|
421
|
+
PostParlayOddsBodyParam,
|
422
|
+
PostParlayOddsMetadataParam,
|
423
|
+
PostParlayOddsResponse200,
|
424
|
+
} from "./types";
|