chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_HISTORY_PROPERTIES,
|
||||
type SportmonksPremiumOddHistory,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetAllHistoricalOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetAllHistoricalOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
historicalOdds: SportmonksPremiumOddHistory[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetAllHistoricalOddsTool: ToolConfig<
|
||||
SportmonksGetAllHistoricalOddsParams,
|
||||
SportmonksGetAllHistoricalOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_all_historical_odds',
|
||||
name: 'Get All Historical Odds',
|
||||
description:
|
||||
'Retrieve all available historical (premium) pre-match odd values from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. odd)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. winningOdds)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/history`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_all_historical_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
historicalOdds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
historicalOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of historical premium odd value records',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_HISTORY_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_INPLAY_ODD_PROPERTIES,
|
||||
type SportmonksInplayOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetAllInplayOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetAllInplayOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksInplayOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetAllInplayOddsTool: ToolConfig<
|
||||
SportmonksGetAllInplayOddsParams,
|
||||
SportmonksGetAllInplayOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_all_inplay_odds',
|
||||
name: 'Get All In-play Odds',
|
||||
description: 'Retrieve all available live (in-play) odds from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12, bookmakers:2,14, IdAfter:oddID)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/inplay`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_all_inplay_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of in-play odd objects',
|
||||
items: { type: 'object', properties: SPORTMONKS_INPLAY_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_ODD_PROPERTIES,
|
||||
type SportmonksOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetAllPreMatchOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetAllPreMatchOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetAllPreMatchOddsTool: ToolConfig<
|
||||
SportmonksGetAllPreMatchOddsParams,
|
||||
SportmonksGetAllPreMatchOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_all_pre_match_odds',
|
||||
name: 'Get All Pre-match Odds',
|
||||
description: 'Retrieve all available pre-match odds from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Filters to apply (e.g. markets:1,12, bookmakers:2,14, winningOdds, IdAfter:oddID)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/pre-match`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_all_pre_match_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of pre-match odd objects',
|
||||
items: { type: 'object', properties: SPORTMONKS_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_PROPERTIES,
|
||||
type SportmonksPremiumOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetAllPremiumOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetAllPremiumOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
premiumOdds: SportmonksPremiumOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetAllPremiumOddsTool: ToolConfig<
|
||||
SportmonksGetAllPremiumOddsParams,
|
||||
SportmonksGetAllPremiumOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_all_premium_odds',
|
||||
name: 'Get All Premium Odds',
|
||||
description:
|
||||
'Retrieve all available premium (historical) pre-match odds from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12, bookmakers:2,14, IdAfter:oddID)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_all_premium_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
premiumOdds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
premiumOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of premium odd objects',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import {
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_BOOKMAKER_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksBookmaker,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetBookmakerParams extends SportmonksBaseParams {
|
||||
bookmakerId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetBookmakerResponse extends ToolResponse {
|
||||
output: {
|
||||
bookmaker: SportmonksBookmaker | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetBookmakerTool: ToolConfig<
|
||||
SportmonksGetBookmakerParams,
|
||||
SportmonksGetBookmakerResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_bookmaker',
|
||||
name: 'Get Bookmaker by ID',
|
||||
description: 'Retrieve a single bookmaker by its ID from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
bookmakerId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the bookmaker',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
`${SPORTMONKS_ODDS_BASE_URL}/bookmakers/${encodeURIComponent(params.bookmakerId.trim())}`,
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_bookmaker')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
bookmaker: data.data ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
bookmaker: {
|
||||
type: 'object',
|
||||
description: 'The requested bookmaker object',
|
||||
properties: SPORTMONKS_BOOKMAKER_PROPERTIES,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_BOOKMAKER_EVENT_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksBookmakerEvent,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetBookmakerEventIdsByFixtureParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fixtureId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetBookmakerEventIdsByFixtureResponse extends ToolResponse {
|
||||
output: {
|
||||
bookmakerEvents: SportmonksBookmakerEvent[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetBookmakerEventIdsByFixtureTool: ToolConfig<
|
||||
SportmonksGetBookmakerEventIdsByFixtureParams,
|
||||
SportmonksGetBookmakerEventIdsByFixtureResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_bookmaker_event_ids_by_fixture',
|
||||
name: 'Get Bookmaker Event IDs by Fixture',
|
||||
description:
|
||||
"Retrieve bookmakers' own event ids mapped to a Sportmonks fixture via the Sportmonks Odds API",
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_ODDS_BASE_URL}/bookmakers/fixtures/${encodeURIComponent(params.fixtureId.trim())}/mapping`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_bookmaker_event_ids_by_fixture')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
bookmakerEvents: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
bookmakerEvents: {
|
||||
type: 'array',
|
||||
description: 'Array of bookmaker event mapping records for the fixture',
|
||||
items: { type: 'object', properties: SPORTMONKS_BOOKMAKER_EVENT_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_BOOKMAKER_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksBookmaker,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetBookmakersParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetBookmakersResponse extends ToolResponse {
|
||||
output: {
|
||||
bookmakers: SportmonksBookmaker[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetBookmakersTool: ToolConfig<
|
||||
SportmonksGetBookmakersParams,
|
||||
SportmonksGetBookmakersResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_bookmakers',
|
||||
name: 'Get Bookmakers',
|
||||
description: 'Retrieve all bookmakers from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. IdAfter:bookmakerID)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => appendSportmonksQuery(`${SPORTMONKS_ODDS_BASE_URL}/bookmakers`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_bookmakers')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
bookmakers: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
bookmakers: {
|
||||
type: 'array',
|
||||
description: 'Array of bookmaker objects',
|
||||
items: { type: 'object', properties: SPORTMONKS_BOOKMAKER_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_BOOKMAKER_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksBookmaker,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetBookmakersByFixtureParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fixtureId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetBookmakersByFixtureResponse extends ToolResponse {
|
||||
output: {
|
||||
bookmakers: SportmonksBookmaker[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetBookmakersByFixtureTool: ToolConfig<
|
||||
SportmonksGetBookmakersByFixtureParams,
|
||||
SportmonksGetBookmakersByFixtureResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_bookmakers_by_fixture',
|
||||
name: 'Get Bookmakers by Fixture',
|
||||
description: 'Retrieve all bookmakers available for a fixture from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_ODDS_BASE_URL}/bookmakers/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_bookmakers_by_fixture')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
bookmakers: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
bookmakers: {
|
||||
type: 'array',
|
||||
description: 'Array of bookmaker objects available for the fixture',
|
||||
items: { type: 'object', properties: SPORTMONKS_BOOKMAKER_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_INPLAY_ODD_PROPERTIES,
|
||||
type SportmonksInplayOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetInplayOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fixtureId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetInplayOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksInplayOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetInplayOddsByFixtureTool: ToolConfig<
|
||||
SportmonksGetInplayOddsParams,
|
||||
SportmonksGetInplayOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_inplay_odds_by_fixture',
|
||||
name: 'Get In-play Odds by Fixture',
|
||||
description:
|
||||
'Retrieve live (in-play) odds for a fixture by fixture ID from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14 or winningOdds)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/inplay/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_inplay_odds_by_fixture')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of in-play odd objects for the fixture',
|
||||
items: { type: 'object', properties: SPORTMONKS_INPLAY_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_INPLAY_ODD_PROPERTIES,
|
||||
type SportmonksInplayOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetInplayOddsByFixtureAndBookmakerParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
bookmakerId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetInplayOddsByFixtureAndBookmakerResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksInplayOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetInplayOddsByFixtureAndBookmakerTool: ToolConfig<
|
||||
SportmonksGetInplayOddsByFixtureAndBookmakerParams,
|
||||
SportmonksGetInplayOddsByFixtureAndBookmakerResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_inplay_odds_by_fixture_and_bookmaker',
|
||||
name: 'Get In-play Odds by Fixture and Bookmaker',
|
||||
description:
|
||||
'Retrieve live (in-play) odds for a fixture from a specific bookmaker via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
bookmakerId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the bookmaker',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/inplay/fixtures/${encodeURIComponent(params.fixtureId.trim())}/bookmakers/${encodeURIComponent(params.bookmakerId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_inplay_odds_by_fixture_and_bookmaker')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of in-play odd objects for the fixture and bookmaker',
|
||||
items: { type: 'object', properties: SPORTMONKS_INPLAY_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_INPLAY_ODD_PROPERTIES,
|
||||
type SportmonksInplayOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetInplayOddsByFixtureAndMarketParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
marketId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetInplayOddsByFixtureAndMarketResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksInplayOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetInplayOddsByFixtureAndMarketTool: ToolConfig<
|
||||
SportmonksGetInplayOddsByFixtureAndMarketParams,
|
||||
SportmonksGetInplayOddsByFixtureAndMarketResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_inplay_odds_by_fixture_and_market',
|
||||
name: 'Get In-play Odds by Fixture and Market',
|
||||
description:
|
||||
'Retrieve live (in-play) odds for a fixture on a specific market via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
marketId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the market',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. bookmakers:2,14)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/inplay/fixtures/${encodeURIComponent(params.fixtureId.trim())}/markets/${encodeURIComponent(params.marketId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_inplay_odds_by_fixture_and_market')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of in-play odd objects for the fixture and market',
|
||||
items: { type: 'object', properties: SPORTMONKS_INPLAY_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_INPLAY_ODD_PROPERTIES,
|
||||
type SportmonksInplayOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetLastUpdatedInplayOddsParams extends SportmonksBaseParams {}
|
||||
|
||||
export interface SportmonksGetLastUpdatedInplayOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksInplayOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetLastUpdatedInplayOddsTool: ToolConfig<
|
||||
SportmonksGetLastUpdatedInplayOddsParams,
|
||||
SportmonksGetLastUpdatedInplayOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_last_updated_inplay_odds',
|
||||
name: 'Get Last Updated In-play Odds',
|
||||
description: 'Retrieve in-play odds updated in the last 10 seconds from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/inplay/latest`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_last_updated_inplay_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of in-play odd objects updated in the last 10 seconds',
|
||||
items: { type: 'object', properties: SPORTMONKS_INPLAY_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_ODD_PROPERTIES,
|
||||
type SportmonksOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetLastUpdatedPreMatchOddsParams extends SportmonksBaseParams {}
|
||||
|
||||
export interface SportmonksGetLastUpdatedPreMatchOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetLastUpdatedPreMatchOddsTool: ToolConfig<
|
||||
SportmonksGetLastUpdatedPreMatchOddsParams,
|
||||
SportmonksGetLastUpdatedPreMatchOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_last_updated_pre_match_odds',
|
||||
name: 'Get Last Updated Pre-match Odds',
|
||||
description:
|
||||
'Retrieve pre-match odds updated in the last 10 seconds from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14 or winningOdds)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
appendSportmonksQuery(`${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/pre-match/latest`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_last_updated_pre_match_odds')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of pre-match odd objects updated in the last 10 seconds',
|
||||
items: { type: 'object', properties: SPORTMONKS_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import {
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_MARKET_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksMarket,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetMarketParams extends SportmonksBaseParams {
|
||||
marketId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetMarketResponse extends ToolResponse {
|
||||
output: {
|
||||
market: SportmonksMarket | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetMarketTool: ToolConfig<
|
||||
SportmonksGetMarketParams,
|
||||
SportmonksGetMarketResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_market',
|
||||
name: 'Get Market by ID',
|
||||
description: 'Retrieve a single betting market by its ID from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
marketId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the market',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) =>
|
||||
`${SPORTMONKS_ODDS_BASE_URL}/markets/${encodeURIComponent(params.marketId.trim())}`,
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_market')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
market: data.data ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
market: {
|
||||
type: 'object',
|
||||
description: 'The requested market object',
|
||||
properties: SPORTMONKS_MARKET_PROPERTIES,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_MARKET_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksMarket,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetMarketsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {}
|
||||
|
||||
export interface SportmonksGetMarketsResponse extends ToolResponse {
|
||||
output: {
|
||||
markets: SportmonksMarket[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetMarketsTool: ToolConfig<
|
||||
SportmonksGetMarketsParams,
|
||||
SportmonksGetMarketsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_markets',
|
||||
name: 'Get Markets',
|
||||
description: 'Retrieve all betting markets from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. IdAfter:marketID)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => appendSportmonksQuery(`${SPORTMONKS_ODDS_BASE_URL}/markets`, params),
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_markets')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
markets: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
markets: {
|
||||
type: 'array',
|
||||
description: 'Array of market objects',
|
||||
items: { type: 'object', properties: SPORTMONKS_MARKET_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_ODD_PROPERTIES,
|
||||
type SportmonksOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPreMatchOddsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fixtureId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPreMatchOddsResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPreMatchOddsByFixtureTool: ToolConfig<
|
||||
SportmonksGetPreMatchOddsParams,
|
||||
SportmonksGetPreMatchOddsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_pre_match_odds_by_fixture',
|
||||
name: 'Get Pre-match Odds by Fixture',
|
||||
description: 'Retrieve pre-match odds for a fixture by fixture ID from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14 or winningOdds)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/pre-match/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_pre_match_odds_by_fixture')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of pre-match odd objects for the fixture',
|
||||
items: { type: 'object', properties: SPORTMONKS_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_ODD_PROPERTIES,
|
||||
type SportmonksOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPreMatchOddsByFixtureAndBookmakerParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
bookmakerId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPreMatchOddsByFixtureAndBookmakerResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPreMatchOddsByFixtureAndBookmakerTool: ToolConfig<
|
||||
SportmonksGetPreMatchOddsByFixtureAndBookmakerParams,
|
||||
SportmonksGetPreMatchOddsByFixtureAndBookmakerResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_pre_match_odds_by_fixture_and_bookmaker',
|
||||
name: 'Get Pre-match Odds by Fixture and Bookmaker',
|
||||
description:
|
||||
'Retrieve pre-match odds for a fixture from a specific bookmaker via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
bookmakerId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the bookmaker',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or winningOdds)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/pre-match/fixtures/${encodeURIComponent(params.fixtureId.trim())}/bookmakers/${encodeURIComponent(params.bookmakerId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_pre_match_odds_by_fixture_and_bookmaker')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of pre-match odd objects for the fixture and bookmaker',
|
||||
items: { type: 'object', properties: SPORTMONKS_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_ODD_PROPERTIES,
|
||||
type SportmonksOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPreMatchOddsByFixtureAndMarketParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
marketId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPreMatchOddsByFixtureAndMarketResponse extends ToolResponse {
|
||||
output: {
|
||||
odds: SportmonksOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPreMatchOddsByFixtureAndMarketTool: ToolConfig<
|
||||
SportmonksGetPreMatchOddsByFixtureAndMarketParams,
|
||||
SportmonksGetPreMatchOddsByFixtureAndMarketResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_pre_match_odds_by_fixture_and_market',
|
||||
name: 'Get Pre-match Odds by Fixture and Market',
|
||||
description:
|
||||
'Retrieve pre-match odds for a fixture on a specific market via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
marketId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the market',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. bookmakers:2,14 or winningOdds)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/pre-match/fixtures/${encodeURIComponent(params.fixtureId.trim())}/markets/${encodeURIComponent(params.marketId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_pre_match_odds_by_fixture_and_market')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
odds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
odds: {
|
||||
type: 'array',
|
||||
description: 'Array of pre-match odd objects for the fixture and market',
|
||||
items: { type: 'object', properties: SPORTMONKS_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_PROPERTIES,
|
||||
type SportmonksPremiumOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureResponse extends ToolResponse {
|
||||
output: {
|
||||
premiumOdds: SportmonksPremiumOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPremiumOddsByFixtureTool: ToolConfig<
|
||||
SportmonksGetPremiumOddsByFixtureParams,
|
||||
SportmonksGetPremiumOddsByFixtureResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_premium_odds_by_fixture',
|
||||
name: 'Get Premium Odds by Fixture',
|
||||
description:
|
||||
'Retrieve premium (historical) pre-match odds for a fixture from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/fixtures/${encodeURIComponent(params.fixtureId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_premium_odds_by_fixture')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
premiumOdds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
premiumOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of premium odd objects for the fixture',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_PROPERTIES,
|
||||
type SportmonksPremiumOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureAndBookmakerParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
bookmakerId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureAndBookmakerResponse extends ToolResponse {
|
||||
output: {
|
||||
premiumOdds: SportmonksPremiumOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPremiumOddsByFixtureAndBookmakerTool: ToolConfig<
|
||||
SportmonksGetPremiumOddsByFixtureAndBookmakerParams,
|
||||
SportmonksGetPremiumOddsByFixtureAndBookmakerResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_premium_odds_by_fixture_and_bookmaker',
|
||||
name: 'Get Premium Odds by Fixture and Bookmaker',
|
||||
description:
|
||||
'Retrieve premium pre-match odds for a fixture from a specific bookmaker via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
bookmakerId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the bookmaker',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/fixtures/${encodeURIComponent(params.fixtureId.trim())}/bookmakers/${encodeURIComponent(params.bookmakerId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_premium_odds_by_fixture_and_bookmaker')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
premiumOdds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
premiumOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of premium odd objects for the fixture and bookmaker',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
type SportmonksBaseParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_PROPERTIES,
|
||||
type SportmonksPremiumOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureAndMarketParams extends SportmonksBaseParams {
|
||||
fixtureId: string
|
||||
marketId: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetPremiumOddsByFixtureAndMarketResponse extends ToolResponse {
|
||||
output: {
|
||||
premiumOdds: SportmonksPremiumOdd[]
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetPremiumOddsByFixtureAndMarketTool: ToolConfig<
|
||||
SportmonksGetPremiumOddsByFixtureAndMarketParams,
|
||||
SportmonksGetPremiumOddsByFixtureAndMarketResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_premium_odds_by_fixture_and_market',
|
||||
name: 'Get Premium Odds by Fixture and Market',
|
||||
description:
|
||||
'Retrieve premium pre-match odds for a fixture on a specific market via the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fixtureId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the fixture',
|
||||
},
|
||||
marketId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The unique id of the market',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. bookmakers:2,14)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/fixtures/${encodeURIComponent(params.fixtureId.trim())}/markets/${encodeURIComponent(params.marketId.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_premium_odds_by_fixture_and_market')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
premiumOdds: Array.isArray(data.data) ? data.data : [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
premiumOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of premium odd objects for the fixture and market',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_HISTORY_PROPERTIES,
|
||||
type SportmonksPremiumOddHistory,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetUpdatedHistoricalOddsBetweenParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fromTimestamp: string
|
||||
toTimestamp: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetUpdatedHistoricalOddsBetweenResponse extends ToolResponse {
|
||||
output: {
|
||||
historicalOdds: SportmonksPremiumOddHistory[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetUpdatedHistoricalOddsBetweenTool: ToolConfig<
|
||||
SportmonksGetUpdatedHistoricalOddsBetweenParams,
|
||||
SportmonksGetUpdatedHistoricalOddsBetweenResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_updated_historical_odds_between',
|
||||
name: 'Get Updated Historical Odds Between Time Range',
|
||||
description:
|
||||
'Retrieve historical (premium) odds updated between two UNIX timestamps (max 5 minutes) from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fromTimestamp: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Start of the range as a UNIX timestamp (e.g. 1767225600)',
|
||||
},
|
||||
toTimestamp: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'End of the range as a UNIX timestamp (max 5 minutes after the start)',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. odd)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. winningOdds)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/history/updated/between/${encodeURIComponent(params.fromTimestamp.trim())}/${encodeURIComponent(params.toTimestamp.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_updated_historical_odds_between')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
historicalOdds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
historicalOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of historical premium odd value records updated within the time range',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_HISTORY_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_FOOTBALL_ODDS_BASE_URL,
|
||||
SPORTMONKS_PREMIUM_ODD_PROPERTIES,
|
||||
type SportmonksPremiumOdd,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksGetUpdatedPremiumOddsBetweenParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
fromTimestamp: string
|
||||
toTimestamp: string
|
||||
}
|
||||
|
||||
export interface SportmonksGetUpdatedPremiumOddsBetweenResponse extends ToolResponse {
|
||||
output: {
|
||||
premiumOdds: SportmonksPremiumOdd[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsGetUpdatedPremiumOddsBetweenTool: ToolConfig<
|
||||
SportmonksGetUpdatedPremiumOddsBetweenParams,
|
||||
SportmonksGetUpdatedPremiumOddsBetweenResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_get_updated_premium_odds_between',
|
||||
name: 'Get Updated Premium Odds Between Time Range',
|
||||
description:
|
||||
'Retrieve premium odds updated between two UNIX timestamps (max 5 minutes) from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
fromTimestamp: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Start of the range as a UNIX timestamp (e.g. 1767225600)',
|
||||
},
|
||||
toTimestamp: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'End of the range as a UNIX timestamp (max 5 minutes after the start)',
|
||||
},
|
||||
include: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Semicolon-separated relations to enrich the response (e.g. market;bookmaker)',
|
||||
},
|
||||
filters: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filters to apply (e.g. markets:1,12 or bookmakers:2,14)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_FOOTBALL_ODDS_BASE_URL}/premium/updated/between/${encodeURIComponent(params.fromTimestamp.trim())}/${encodeURIComponent(params.toTimestamp.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'get_updated_premium_odds_between')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
premiumOdds: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
premiumOdds: {
|
||||
type: 'array',
|
||||
description: 'Array of premium odd objects updated within the time range',
|
||||
items: { type: 'object', properties: SPORTMONKS_PREMIUM_ODD_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
export { sportmonksOddsGetAllHistoricalOddsTool } from './get_all_historical_odds'
|
||||
export { sportmonksOddsGetAllInplayOddsTool } from './get_all_inplay_odds'
|
||||
export { sportmonksOddsGetAllPreMatchOddsTool } from './get_all_pre_match_odds'
|
||||
export { sportmonksOddsGetAllPremiumOddsTool } from './get_all_premium_odds'
|
||||
export { sportmonksOddsGetBookmakerTool } from './get_bookmaker'
|
||||
export { sportmonksOddsGetBookmakerEventIdsByFixtureTool } from './get_bookmaker_event_ids_by_fixture'
|
||||
export { sportmonksOddsGetBookmakersTool } from './get_bookmakers'
|
||||
export { sportmonksOddsGetBookmakersByFixtureTool } from './get_bookmakers_by_fixture'
|
||||
export { sportmonksOddsGetInplayOddsByFixtureTool } from './get_inplay_odds_by_fixture'
|
||||
export { sportmonksOddsGetInplayOddsByFixtureAndBookmakerTool } from './get_inplay_odds_by_fixture_and_bookmaker'
|
||||
export { sportmonksOddsGetInplayOddsByFixtureAndMarketTool } from './get_inplay_odds_by_fixture_and_market'
|
||||
export { sportmonksOddsGetLastUpdatedInplayOddsTool } from './get_last_updated_inplay_odds'
|
||||
export { sportmonksOddsGetLastUpdatedPreMatchOddsTool } from './get_last_updated_pre_match_odds'
|
||||
export { sportmonksOddsGetMarketTool } from './get_market'
|
||||
export { sportmonksOddsGetMarketsTool } from './get_markets'
|
||||
export { sportmonksOddsGetPreMatchOddsByFixtureTool } from './get_pre_match_odds_by_fixture'
|
||||
export { sportmonksOddsGetPreMatchOddsByFixtureAndBookmakerTool } from './get_pre_match_odds_by_fixture_and_bookmaker'
|
||||
export { sportmonksOddsGetPreMatchOddsByFixtureAndMarketTool } from './get_pre_match_odds_by_fixture_and_market'
|
||||
export { sportmonksOddsGetPremiumOddsByFixtureTool } from './get_premium_odds_by_fixture'
|
||||
export { sportmonksOddsGetPremiumOddsByFixtureAndBookmakerTool } from './get_premium_odds_by_fixture_and_bookmaker'
|
||||
export { sportmonksOddsGetPremiumOddsByFixtureAndMarketTool } from './get_premium_odds_by_fixture_and_market'
|
||||
export { sportmonksOddsGetUpdatedHistoricalOddsBetweenTool } from './get_updated_historical_odds_between'
|
||||
export { sportmonksOddsGetUpdatedPremiumOddsBetweenTool } from './get_updated_premium_odds_between'
|
||||
export { sportmonksOddsSearchBookmakersTool } from './search_bookmakers'
|
||||
export { sportmonksOddsSearchMarketsTool } from './search_markets'
|
||||
@@ -0,0 +1,103 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_BOOKMAKER_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksBookmaker,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksSearchBookmakersParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
query: string
|
||||
}
|
||||
|
||||
export interface SportmonksSearchBookmakersResponse extends ToolResponse {
|
||||
output: {
|
||||
bookmakers: SportmonksBookmaker[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsSearchBookmakersTool: ToolConfig<
|
||||
SportmonksSearchBookmakersParams,
|
||||
SportmonksSearchBookmakersResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_search_bookmakers',
|
||||
name: 'Search Bookmakers',
|
||||
description: 'Search for bookmakers by name from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
query: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The bookmaker name to search for (e.g. bet365)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_ODDS_BASE_URL}/bookmakers/search/${encodeURIComponent(params.query.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'search_bookmakers')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
bookmakers: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
bookmakers: {
|
||||
type: 'array',
|
||||
description: 'Array of bookmaker objects matching the search query',
|
||||
items: { type: 'object', properties: SPORTMONKS_BOOKMAKER_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import {
|
||||
appendSportmonksQuery,
|
||||
buildSportmonksHeaders,
|
||||
handleSportmonksError,
|
||||
SPORTMONKS_PAGINATION_OUTPUT,
|
||||
type SportmonksBaseParams,
|
||||
type SportmonksPagination,
|
||||
type SportmonksPaginationParams,
|
||||
} from '@/tools/sportmonks/types'
|
||||
import {
|
||||
SPORTMONKS_MARKET_PROPERTIES,
|
||||
SPORTMONKS_ODDS_BASE_URL,
|
||||
type SportmonksMarket,
|
||||
} from '@/tools/sportmonks_odds/types'
|
||||
import type { ToolConfig, ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface SportmonksSearchMarketsParams
|
||||
extends SportmonksBaseParams,
|
||||
SportmonksPaginationParams {
|
||||
query: string
|
||||
}
|
||||
|
||||
export interface SportmonksSearchMarketsResponse extends ToolResponse {
|
||||
output: {
|
||||
markets: SportmonksMarket[]
|
||||
pagination?: SportmonksPagination | null
|
||||
}
|
||||
}
|
||||
|
||||
export const sportmonksOddsSearchMarketsTool: ToolConfig<
|
||||
SportmonksSearchMarketsParams,
|
||||
SportmonksSearchMarketsResponse
|
||||
> = {
|
||||
id: 'sportmonks_odds_search_markets',
|
||||
name: 'Search Markets',
|
||||
description: 'Search for betting markets by name from the Sportmonks Odds API',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Sportmonks API token',
|
||||
},
|
||||
query: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The market name to search for (e.g. Over/Under)',
|
||||
},
|
||||
per_page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page (max 50, default 25)',
|
||||
},
|
||||
page: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number to retrieve',
|
||||
},
|
||||
order: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Order direction (asc or desc)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = `${SPORTMONKS_ODDS_BASE_URL}/markets/search/${encodeURIComponent(params.query.trim())}`
|
||||
return appendSportmonksQuery(url, params)
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => buildSportmonksHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
if (!response.ok) {
|
||||
handleSportmonksError(data, response.status, 'search_markets')
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
markets: Array.isArray(data.data) ? data.data : [],
|
||||
pagination: data.pagination ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
markets: {
|
||||
type: 'array',
|
||||
description: 'Array of market objects matching the search query',
|
||||
items: { type: 'object', properties: SPORTMONKS_MARKET_PROPERTIES },
|
||||
},
|
||||
pagination: SPORTMONKS_PAGINATION_OUTPUT,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,441 @@
|
||||
import type { OutputProperty } from '@/tools/types'
|
||||
|
||||
/**
|
||||
* Base URL for the shared Sportmonks Odds reference resources (bookmakers and
|
||||
* markets). These live under the sport-agnostic `/v3/odds` path.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/endpoints/bookmakers/get-all-bookmakers
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/endpoints/markets/get-all-markets
|
||||
*/
|
||||
export const SPORTMONKS_ODDS_BASE_URL = 'https://api.sportmonks.com/v3/odds'
|
||||
|
||||
/**
|
||||
* Base URL for the Sportmonks football odds feeds (pre-match and in-play odds by
|
||||
* fixture). Unlike bookmakers/markets, these endpoints are sport-scoped and live
|
||||
* under the `/v3/football/odds` path.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/endpoints/pre-match-odds/get-odds-by-fixture-id
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/endpoints/inplay-odds/get-odds-by-fixture-id
|
||||
*/
|
||||
export const SPORTMONKS_FOOTBALL_ODDS_BASE_URL = 'https://api.sportmonks.com/v3/football/odds'
|
||||
|
||||
/**
|
||||
* Output property definitions for a pre-match Odd object.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/entities/odd
|
||||
*/
|
||||
export const SPORTMONKS_ODD_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the odd' },
|
||||
fixture_id: { type: 'number', description: 'Fixture the odd belongs to' },
|
||||
market_id: { type: 'number', description: 'Market the odd belongs to' },
|
||||
bookmaker_id: { type: 'number', description: 'Bookmaker offering the odd' },
|
||||
label: { type: 'string', description: 'Outcome label (e.g. 1, X, 2)', nullable: true },
|
||||
value: { type: 'string', description: 'Decimal odds value', nullable: true },
|
||||
name: { type: 'string', description: 'Outcome name (e.g. Home, Draw, Away)', nullable: true },
|
||||
sort_order: {
|
||||
type: 'number',
|
||||
description: 'Sort order of the odd',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
market_description: {
|
||||
type: 'string',
|
||||
description: 'Description of the market',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
probability: {
|
||||
type: 'string',
|
||||
description: 'Implied probability (e.g. 48.78%)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
dp3: {
|
||||
type: 'string',
|
||||
description: 'Decimal odds to 3 decimal places',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
fractional: {
|
||||
type: 'string',
|
||||
description: 'Fractional odds (e.g. 31/15)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
american: {
|
||||
type: 'string',
|
||||
description: 'American/moneyline odds (e.g. +104)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
winning: {
|
||||
type: 'boolean',
|
||||
description: 'Whether this is the winning outcome',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
stopped: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the odd is stopped',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
total: {
|
||||
type: 'string',
|
||||
description: 'Total line for over/under markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
handicap: {
|
||||
type: 'string',
|
||||
description: 'Handicap line for handicap markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
participants: {
|
||||
type: 'string',
|
||||
description: 'Participant ids related to the outcome',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
original_label: {
|
||||
type: 'string',
|
||||
description: 'Original handicap value of the odd (handicap markets)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for an in-play Odd object.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/entities/inplayodd
|
||||
*/
|
||||
export const SPORTMONKS_INPLAY_ODD_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the odd' },
|
||||
fixture_id: { type: 'number', description: 'Fixture the odd belongs to' },
|
||||
external_id: {
|
||||
type: 'number',
|
||||
description: 'External id of the odd',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
market_id: { type: 'number', description: 'Market the odd belongs to' },
|
||||
bookmaker_id: { type: 'number', description: 'Bookmaker offering the odd' },
|
||||
label: { type: 'string', description: 'Outcome label (e.g. 1, X, 2)', nullable: true },
|
||||
value: { type: 'string', description: 'Decimal odds value', nullable: true },
|
||||
name: { type: 'string', description: 'Outcome name', nullable: true },
|
||||
sort_order: {
|
||||
type: 'number',
|
||||
description: 'Sort order of the odd',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
market_description: {
|
||||
type: 'string',
|
||||
description: 'Description of the market',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
probability: {
|
||||
type: 'string',
|
||||
description: 'Implied probability',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
dp3: {
|
||||
type: 'string',
|
||||
description: 'Decimal odds to 3 decimal places',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
fractional: { type: 'string', description: 'Fractional odds', nullable: true, optional: true },
|
||||
american: {
|
||||
type: 'string',
|
||||
description: 'American/moneyline odds',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
winning: {
|
||||
type: 'boolean',
|
||||
description: 'Whether this is the winning outcome',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
suspended: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the odd is suspended',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
stopped: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the odd is stopped',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
total: {
|
||||
type: 'string',
|
||||
description: 'Total line for over/under markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
handicap: {
|
||||
type: 'string',
|
||||
description: 'Handicap line for handicap markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
participants: {
|
||||
type: 'string',
|
||||
description: 'Participant ids related to the outcome',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for a Premium Odd object. Premium odds carry
|
||||
* created/updated timestamps and do not yet expose winning calculations.
|
||||
* @see https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/premium-odds-feed/premium-pre-match-odds/get-all-premium-odds
|
||||
*/
|
||||
export const SPORTMONKS_PREMIUM_ODD_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the odd' },
|
||||
fixture_id: { type: 'number', description: 'Fixture the odd belongs to' },
|
||||
market_id: { type: 'number', description: 'Market the odd belongs to' },
|
||||
bookmaker_id: { type: 'number', description: 'Bookmaker offering the odd' },
|
||||
label: { type: 'string', description: 'Outcome label', nullable: true },
|
||||
value: { type: 'string', description: 'Decimal odds value', nullable: true },
|
||||
name: { type: 'string', description: 'Outcome name', nullable: true },
|
||||
sort_order: {
|
||||
type: 'number',
|
||||
description: 'Sort order of the odd',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
market_description: {
|
||||
type: 'string',
|
||||
description: 'Description of the market',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
probability: {
|
||||
type: 'string',
|
||||
description: 'Implied probability (e.g. 29.85%)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
dp3: {
|
||||
type: 'string',
|
||||
description: 'Decimal odds to 3 decimal places',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
fractional: { type: 'string', description: 'Fractional odds', nullable: true, optional: true },
|
||||
american: {
|
||||
type: 'string',
|
||||
description: 'American/moneyline odds',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
stopped: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the odd is stopped',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
total: {
|
||||
type: 'string',
|
||||
description: 'Total line for over/under markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
handicap: {
|
||||
type: 'string',
|
||||
description: 'Handicap line for handicap markets',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
created_at: {
|
||||
type: 'string',
|
||||
description: 'Timestamp the odd was created (UTC)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
updated_at: {
|
||||
type: 'string',
|
||||
description: 'Timestamp the odd was last updated (UTC)',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
latest_bookmaker_update: {
|
||||
type: 'string',
|
||||
description: "Bookmaker's own last-update timestamp (UTC)",
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for a Premium Odd history record. Each record is a
|
||||
* historical value of a premium odd referenced by `odd_id`.
|
||||
* @see https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints/premium-odds-feed/premium-pre-match-odds/get-all-historical-odds
|
||||
*/
|
||||
export const SPORTMONKS_PREMIUM_ODD_HISTORY_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the history record' },
|
||||
odd_id: { type: 'number', description: 'Premium odd this history record belongs to' },
|
||||
value: {
|
||||
type: 'string',
|
||||
description: 'Historical decimal odds value',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
probability: {
|
||||
type: 'string',
|
||||
description: 'Implied probability at this point in time',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
dp3: {
|
||||
type: 'string',
|
||||
description: 'Decimal odds to 3 decimal places',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
fractional: { type: 'string', description: 'Fractional odds', nullable: true, optional: true },
|
||||
american: {
|
||||
type: 'string',
|
||||
description: 'American/moneyline odds',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
bookmaker_update: {
|
||||
type: 'string',
|
||||
description: "Bookmaker's update timestamp for this record (UTC)",
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for a Bookmaker object.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/entities/bookmaker
|
||||
*/
|
||||
export const SPORTMONKS_BOOKMAKER_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the bookmaker' },
|
||||
name: { type: 'string', description: 'Name of the bookmaker' },
|
||||
logo: { type: 'string', description: 'Logo of the bookmaker', nullable: true, optional: true },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for a bookmaker event mapping record, returned by
|
||||
* the "bookmaker event ids by fixture" endpoint. Maps a Sportmonks fixture to a
|
||||
* bookmaker's own event id.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/endpoints/bookmakers/get-bookmaker-event-ids-by-fixture-id
|
||||
*/
|
||||
export const SPORTMONKS_BOOKMAKER_EVENT_PROPERTIES = {
|
||||
fixture_id: { type: 'number', description: 'Sportmonks fixture id' },
|
||||
bookmaker_id: { type: 'number', description: 'Id of the bookmaker' },
|
||||
bookmaker_name: {
|
||||
type: 'string',
|
||||
description: 'Name of the bookmaker',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
bookmaker_event_id: {
|
||||
type: 'string',
|
||||
description: "The fixture's event id at the bookmaker",
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/**
|
||||
* Output property definitions for a Market object.
|
||||
* @see https://docs.sportmonks.com/v3/odds-api/getting-started/entities/market
|
||||
*/
|
||||
export const SPORTMONKS_MARKET_PROPERTIES = {
|
||||
id: { type: 'number', description: 'Unique id of the market' },
|
||||
name: { type: 'string', description: 'Name of the market' },
|
||||
developer_name: {
|
||||
type: 'string',
|
||||
description: 'Developer (machine-readable) name of the market',
|
||||
nullable: true,
|
||||
optional: true,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
export interface SportmonksOdd {
|
||||
id: number
|
||||
fixture_id: number
|
||||
market_id: number
|
||||
bookmaker_id: number
|
||||
label: string | null
|
||||
value: string | null
|
||||
name: string | null
|
||||
sort_order?: number | null
|
||||
market_description?: string | null
|
||||
probability?: string | null
|
||||
dp3?: string | null
|
||||
fractional?: string | null
|
||||
american?: string | null
|
||||
winning?: boolean | null
|
||||
stopped?: boolean | null
|
||||
total?: string | null
|
||||
handicap?: string | null
|
||||
participants?: string | null
|
||||
original_label?: string | null
|
||||
}
|
||||
|
||||
export interface SportmonksInplayOdd extends SportmonksOdd {
|
||||
external_id?: number | null
|
||||
suspended?: boolean | null
|
||||
}
|
||||
|
||||
export interface SportmonksPremiumOdd {
|
||||
id: number
|
||||
fixture_id: number
|
||||
market_id: number
|
||||
bookmaker_id: number
|
||||
label: string | null
|
||||
value: string | null
|
||||
name: string | null
|
||||
sort_order?: number | null
|
||||
market_description?: string | null
|
||||
probability?: string | null
|
||||
dp3?: string | null
|
||||
fractional?: string | null
|
||||
american?: string | null
|
||||
stopped?: boolean | null
|
||||
total?: string | null
|
||||
handicap?: string | null
|
||||
created_at?: string | null
|
||||
updated_at?: string | null
|
||||
latest_bookmaker_update?: string | null
|
||||
}
|
||||
|
||||
export interface SportmonksPremiumOddHistory {
|
||||
id: number
|
||||
odd_id: number
|
||||
value?: string | null
|
||||
probability?: string | null
|
||||
dp3?: string | null
|
||||
fractional?: string | null
|
||||
american?: string | null
|
||||
bookmaker_update?: string | null
|
||||
}
|
||||
|
||||
export interface SportmonksBookmaker {
|
||||
id: number
|
||||
name: string
|
||||
logo?: string | null
|
||||
}
|
||||
|
||||
export interface SportmonksBookmakerEvent {
|
||||
fixture_id: number
|
||||
bookmaker_id: number
|
||||
bookmaker_name?: string | null
|
||||
bookmaker_event_id?: string | null
|
||||
}
|
||||
|
||||
export interface SportmonksMarket {
|
||||
id: number
|
||||
name: string
|
||||
developer_name?: string | null
|
||||
}
|
||||
Reference in New Issue
Block a user